Ignore:
Timestamp:
Jan 8, 2015, 4:10:01 PM (11 years ago)
Author:
[email protected]
Message:

Make the LLINT and Baseline JIT's op_create_arguments and op_get_argument_by_val use their lexicalEnvironment operand.
<https://webkit.org/b/140236>

Reviewed by Geoffrey Garen.

Will change the DFG to use the operand on a subsequent pass. For now,
the DFG uses a temporary thunk (operationCreateArgumentsForDFG()) to
retain the old behavior of getting the lexicalEnviroment from the
ExecState.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitGetArgumentByVal):
(JSC::BytecodeGenerator::createArgumentsIfNecessary):

  • When the lexicalEnvironment is not available, pass the invalid VirtualRegister instead of an empty JSValue as the lexicalEnvironment operand.
  • dfg/DFGOperations.cpp:
  • Use the lexicalEnvironment from the ExecState for now.
  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • Use the operationCreateArgumentsForDFG() thunk for now.
  • interpreter/CallFrame.cpp:

(JSC::CallFrame::lexicalEnvironmentOrNullptr):

  • interpreter/CallFrame.h:
  • Added this convenience function to return either the lexicalEnvironment or a nullptr so that we don't need to do a conditional check on codeBlock->needsActivation() at multiple sites.
  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::createArguments):

  • jit/JIT.h:
  • jit/JITInlines.h:

(JSC::JIT::callOperation):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_create_arguments):
(JSC::JIT::emitSlow_op_get_argument_by_val):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_create_arguments):
(JSC::JIT::emitSlow_op_get_argument_by_val):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/Arguments.h:

(JSC::Arguments::create):
(JSC::Arguments::finishCreation):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/JSLexicalEnvironment.cpp:

(JSC::JSLexicalEnvironment::argumentsGetter):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITOperations.h

    r177146 r178143  
    7272    Jsc: JSScope*
    7373    Jss: JSString*
     74    L: JSLexicalEnvironment*
    7475    O: JSObject*
    7576    P: pointer (char*)
     
    137138typedef JSCell* JIT_OPERATION (*C_JITOperation_EJssJss)(ExecState*, JSString*, JSString*);
    138139typedef JSCell* JIT_OPERATION (*C_JITOperation_EJssJssJss)(ExecState*, JSString*, JSString*, JSString*);
     140typedef JSCell* JIT_OPERATION (*C_JITOperation_EL)(ExecState*, JSLexicalEnvironment*);
    139141typedef JSCell* JIT_OPERATION (*C_JITOperation_EO)(ExecState*, JSObject*);
    140142typedef JSCell* JIT_OPERATION (*C_JITOperation_EOZ)(ExecState*, JSObject*, int32_t);
     
    295297EncodedJSValue JIT_OPERATION operationCheckHasInstance(ExecState*, EncodedJSValue, EncodedJSValue baseVal) WTF_INTERNAL;
    296298JSCell* JIT_OPERATION operationCreateActivation(ExecState*, JSScope* currentScope, int32_t offset) WTF_INTERNAL;
    297 JSCell* JIT_OPERATION operationCreateArguments(ExecState*) WTF_INTERNAL;
     299JSCell* JIT_OPERATION operationCreateArgumentsForDFG(ExecState*) WTF_INTERNAL; // FIXME: This is a temporary thunk for the DFG until we add the lexicalEnvironment operand to the DFG CreateArguments node.
     300JSCell* JIT_OPERATION operationCreateArguments(ExecState*, JSLexicalEnvironment*) WTF_INTERNAL;
    298301JSCell* JIT_OPERATION operationCreateArgumentsDuringOSRExit(ExecState*) WTF_INTERNAL;
    299302EncodedJSValue JIT_OPERATION operationGetArgumentsLength(ExecState*, int32_t) WTF_INTERNAL;
Note: See TracChangeset for help on using the changeset viewer.