Ignore:
Timestamp:
Oct 19, 2011, 2:25:10 PM (14 years ago)
Author:
[email protected]
Message:

Support CanvasPixelArray in the DFG
https://bugs.webkit.org/show_bug.cgi?id=70384

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Add support for the old CanvasPixelArray optimisations to the
DFG. This removes the regression seen in the DFG when using
a CPA.

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::store8):
(JSC::MacroAssemblerX86Common::truncateDoubleToInt32):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::movb_rm):
(JSC::X86Assembler::X86InstructionFormatter::oneByteOp8):

  • bytecode/PredictedType.cpp:

(JSC::predictionToString):
(JSC::predictionFromClassInfo):

  • bytecode/PredictedType.h:

(JSC::isByteArrayPrediction):

  • dfg/DFGAbstractState.cpp:

(JSC::DFG::AbstractState::initialize):
(JSC::DFG::AbstractState::execute):

  • dfg/DFGNode.h:

(JSC::DFG::Node::shouldSpeculateByteArray):

  • dfg/DFGPropagator.cpp:

(JSC::DFG::Propagator::propagateNodePredictions):
(JSC::DFG::Propagator::fixupNode):
(JSC::DFG::Propagator::performNodeCSE):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::compileClampDoubleToByte):
(JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnByteArray):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • runtime/JSByteArray.h:

(JSC::JSByteArray::offsetOfStorage):

  • wtf/ByteArray.cpp:
  • wtf/ByteArray.h:

(WTF::ByteArray::offsetOfSize):
(WTF::ByteArray::offsetOfData):

Source/WebCore:

Make CanvasPixelArray inherit from ByteArray's ClassInfo so
can identify it more sensibly.

  • bindings/js/JSImageDataCustom.cpp:

(WebCore::toJS):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/wtf/ByteArray.h

    r96151 r97876  
    3131#include <wtf/Platform.h>
    3232#include <wtf/RefCounted.h>
     33#include <wtf/StdLibExtras.h>
    3334
    3435namespace WTF {
     
    8586        static PassRefPtr<ByteArray> create(size_t size);
    8687
     88        static size_t offsetOfSize() { return OBJECT_OFFSETOF(ByteArray, m_size); }
     89        static size_t offsetOfData() { return OBJECT_OFFSETOF(ByteArray, m_data); }
     90
    8791    private:
    8892        ByteArray(size_t size)
Note: See TracChangeset for help on using the changeset viewer.