Ignore:
Timestamp:
Apr 8, 2011, 1:33:24 PM (14 years ago)
Author:
[email protected]
Message:

Bug 58154 - Add support for comparison operators to the DFG JIT.

Reviewed by Oliver Hunt.

Add support for <, <=, ==, ===, and also !. Add support for all corresponding
bytecode ops, including the not- and -null forms. Initially add functionally
correct support, we'll revisit the performance.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::ByteCodeParser):
(JSC::DFG::ByteCodeParser::constantNull):
(JSC::DFG::ByteCodeParser::parse):

  • Add support for parsing of bytecode opcodes,
  • dfg/DFGJITCodeGenerator.h:

(JSC::DFG::JITCodeGenerator::callOperation):

  • Add new operation call types, return bool values.
  • dfg/DFGNode.h:
    • Add new node types.
  • dfg/DFGNonSpeculativeJIT.cpp:

(JSC::DFG::NonSpeculativeJIT::compile):

  • Add code generation for new nodes.
  • dfg/DFGOperations.cpp:

(JSC::DFG::operationCompareLess):
(JSC::DFG::operationCompareLessEq):
(JSC::DFG::operationCompareEq):
(JSC::DFG::operationCompareStrictEq):
(JSC::DFG::dfgConvertJSValueToBoolean):

  • dfg/DFGOperations.h:
    • Add operation callbacks to implement new ops.
  • dfg/DFGSpeculativeJIT.cpp:

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

  • Add code generation for new nodes.
  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):

  • Switched to a simpler <0 check, rather than relying on an internal value in JSImmediate.
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::privateCompilePatchGetArrayLength):

  • Switched to a simpler <0 check, rather than relying on an internal value in JSImmediate.
  • runtime/JSImmediate.h:
    • Make tag values public, rather than relying on a friend - this matches JSVALUE32_64.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp

    r82849 r83337  
    698698    loadPtr(Address(regT0, JSArray::storageOffset()), regT3);
    699699    load32(Address(regT3, OBJECT_OFFSETOF(ArrayStorage, m_length)), regT2);
    700     Jump failureCases2 = branch32(Above, regT2, TrustedImm32(JSImmediate::maxImmediateInt));
     700    Jump failureCases2 = branch32(LessThan, regT2, TrustedImm32(0));
    701701
    702702    emitFastArithIntToImmNoCheck(regT2, regT0);
Note: See TracChangeset for help on using the changeset viewer.