Ignore:
Timestamp:
Apr 11, 2012, 5:55:44 PM (13 years ago)
Author:
[email protected]
Message:

op_is_foo should be optimized
https://bugs.webkit.org/show_bug.cgi?id=83666

Reviewed by Gavin Barraclough.

This implements inlining of op_is_undefined, op_is_string, op_is_number,
and op_is_boolean in LLInt and the baseline JIT. op_is_object and
op_is_function are not inlined because they are quite a bit more complex.

This also implements all of the op_is_foo opcodes in the DFG, but it does
not do any type profiling based optimizations, yet.

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::compare8):
(MacroAssemblerARMv7):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::compare8):
(MacroAssemblerX86Common):

  • assembler/MacroAssemblerX86_64.h:

(MacroAssemblerX86_64):
(JSC::MacroAssemblerX86_64::testPtr):

  • dfg/DFGAbstractState.cpp:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCCallHelpers.h:

(JSC::DFG::CCallHelpers::setupArguments):
(CCallHelpers):

  • dfg/DFGCSEPhase.cpp:

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

  • dfg/DFGCapabilities.h:

(JSC::DFG::canCompileOpcode):

  • dfg/DFGNodeType.h:

(DFG):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:

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

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):
(JSC::DFG::SpeculativeJIT::appendCallSetResult):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:

(JIT):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_is_undefined):
(JSC):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_string):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_is_undefined):
(JSC):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_string):

  • jit/JITStubs.cpp:

(JSC):

  • llint/LLIntSlowPaths.cpp:

(LLInt):

  • llint/LLIntSlowPaths.h:

(LLInt):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/armv7.rb:
  • offlineasm/instructions.rb:
  • offlineasm/x86.rb:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r113642 r113930  
    10501050}
    10511051
    1052 double operationFModOnInts(int32_t a, int32_t b)
     1052size_t DFG_OPERATION operationIsObject(EncodedJSValue value)
     1053{
     1054    return jsIsObjectType(JSValue::decode(value));
     1055}
     1056
     1057size_t DFG_OPERATION operationIsFunction(EncodedJSValue value)
     1058{
     1059    return jsIsFunctionType(JSValue::decode(value));
     1060}
     1061
     1062double DFG_OPERATION operationFModOnInts(int32_t a, int32_t b)
    10531063{
    10541064    return fmod(a, b);
Note: See TracChangeset for help on using the changeset viewer.