Ignore:
Timestamp:
Apr 25, 2013, 5:41:38 PM (12 years ago)
Author:
[email protected]
Message:

Add support for Math.imul
https://bugs.webkit.org/show_bug.cgi?id=115143

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Add support for Math.imul, a thunk generator for Math.imul,
and an intrinsic.

Fairly self explanatory set of changes, DFG intrinsics simply
leverages the existing ValueToInt32 nodes.

  • create_hash_table:
  • dfg/DFGAbstractState.cpp:

(JSC::DFG::AbstractState::executeEffects):

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsic):

  • dfg/DFGCSEPhase.cpp:

(JSC::DFG::CSEPhase::performNodeCSE):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNodeType.h:

(DFG):

  • dfg/DFGPredictionPropagationPhase.cpp:

(JSC::DFG::PredictionPropagationPhase::propagate):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithIMul):

  • dfg/DFGSpeculativeJIT.h:

(SpeculativeJIT):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • jit/ThunkGenerators.cpp:

(JSC::imulThunkGenerator):
(JSC):

  • jit/ThunkGenerators.h:

(JSC):

  • runtime/Intrinsic.h:
  • runtime/MathObject.cpp:

(JSC):
(JSC::mathProtoFuncIMul):

  • runtime/VM.cpp:

(JSC::thunkGeneratorForIntrinsic):

LayoutTests:

Add a bunch of tests for Math.imul

  • fast/js/Object-getOwnPropertyNames-expected.txt:
  • fast/js/imul-expected.txt: Added.
  • fast/js/imul.html: Added.
  • fast/js/regress/imul-double-only-expected.txt: Added.
  • fast/js/regress/imul-double-only.html: Added.
  • fast/js/regress/imul-int-only-expected.txt: Added.
  • fast/js/regress/imul-int-only.html: Added.
  • fast/js/regress/imul-mixed-expected.txt: Added.
  • fast/js/regress/imul-mixed.html: Added.
  • fast/js/regress/script-tests/imul-double-only.js: Added.

(f):

  • fast/js/regress/script-tests/imul-int-only.js: Added.

(f):

  • fast/js/regress/script-tests/imul-mixed.js: Added.

(f):

  • fast/js/script-tests/Object-getOwnPropertyNames.js:
  • fast/js/script-tests/imul.js: Added.

(testIMul):

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.