Ignore:
Timestamp:
Jan 21, 2015, 1:43:55 PM (10 years ago)
Author:
[email protected]
Message:

Eliminate Scope slot from JavaScript CallFrame
https://bugs.webkit.org/show_bug.cgi?id=136724

Reviewed by Geoffrey Garen.

This finishes the removal of the scope chain slot from the call frame header.

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::reifyInlinedCallFrames):

  • dfg/DFGPreciseLocalClobberize.h:

(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • ftl/FTLJSCall.cpp:

(JSC::FTL::JSCall::emit):

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::compileNativeCallOrConstruct):
(JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct):

  • interpreter/JSStack.h:
  • interpreter/VMInspector.cpp:

(JSC::VMInspector::dumpFrame):

  • jit/JITCall.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileCTINativeCall):

  • jit/Repatch.cpp:

(JSC::generateByIdStub):
(JSC::linkClosureCall):

  • jit/ThunkGenerators.cpp:

(JSC::virtualForThunkGenerator):
(JSC::nativeForGenerator):
Deleted ScopeChain slot from JSStack. Removed all code where ScopeChain was being
read or set. In most cases this was where we make JS calls.

  • interpreter/CallFrameClosure.h:

(JSC::CallFrameClosure::setArgument):
(JSC::CallFrameClosure::resetCallFrame): Deleted.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):

  • interpreter/ProtoCallFrame.cpp:

(JSC::ProtoCallFrame::init):

  • interpreter/ProtoCallFrame.h:

(JSC::ProtoCallFrame::scope): Deleted.
(JSC::ProtoCallFrame::setScope): Deleted.

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter64.asm:

Removed the related scopeChainValue member from ProtoCallFrame. Reduced the number of
registers that needed to be copied from the ProtoCallFrame to a callee's frame
from 5 to 4.

  • llint/LowLevelInterpreter32_64.asm:

In addition to the prior changes, also deleted the unused macro getDeBruijnScope.

File:
1 edited

Legend:

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

    r178756 r178856  
    512512                MacroAssembler::TrustedImmPtr(0));
    513513           
    514             // loadedValueGPR is already burned. We can reuse it. From here on we assume that
    515             // any volatile register will be clobbered anyway.
    516             stubJit.loadPtr(
    517                 MacroAssembler::Address(loadedValueGPR, JSFunction::offsetOfScopeChain()),
    518                 loadedValueGPR);
    519             stubJit.storeCell(
    520                 loadedValueGPR, calleeFrame.withOffset(JSStack::ScopeChain * sizeof(Register)));
    521514            fastPathCall = stubJit.nearCall();
    522515           
     
    16861679            CCallHelpers::TrustedImmPtr(executable)));
    16871680   
    1688     stubJit.loadPtr(
    1689         CCallHelpers::Address(calleeGPR, JSFunction::offsetOfScopeChain()),
    1690         GPRInfo::returnValueGPR);
    1691    
    1692 #if USE(JSVALUE64)
    1693     stubJit.store64(
    1694         GPRInfo::returnValueGPR,
    1695         CCallHelpers::Address(MacroAssembler::stackPointerRegister, static_cast<ptrdiff_t>(sizeof(Register) * JSStack::ScopeChain) + offsetToFrame));
    1696 #else
    1697     stubJit.storePtr(
    1698         GPRInfo::returnValueGPR,
    1699         CCallHelpers::Address(MacroAssembler::stackPointerRegister, static_cast<ptrdiff_t>(sizeof(Register) * JSStack::ScopeChain) + OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload) + offsetToFrame));
    1700     stubJit.store32(
    1701         CCallHelpers::TrustedImm32(JSValue::CellTag),
    1702         CCallHelpers::Address(MacroAssembler::stackPointerRegister, static_cast<ptrdiff_t>(sizeof(Register) * JSStack::ScopeChain) + OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag) + offsetToFrame));
    1703 #endif
    1704    
    17051681    AssemblyHelpers::Call call = stubJit.nearCall();
    17061682    AssemblyHelpers::Jump done = stubJit.jump();
Note: See TracChangeset for help on using the changeset viewer.