Ignore:
Timestamp:
Aug 20, 2014, 1:47:45 PM (11 years ago)
Author:
[email protected]
Message:

Stop implicitly skipping a function's own activation when walking the scope chain
https://bugs.webkit.org/show_bug.cgi?id=136118

Reviewed by Geoffrey Garen.

Remove the current logic that implicitly skips a function's
own activation when walking the scope chain. This is ground
work for ensuring that all closed variable access is made
through the function's activation. This leads to a further
10% regression on earley, but we're already tracking the
overall performance regression.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGHeapLocation.h:
  • dfg/DFGNodeType.h:
  • dfg/DFGPredictionPropagationPhase.cpp:

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

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitResolveClosure):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSScope.cpp:

(JSC::JSScope::abstractResolve):

  • runtime/JSScope.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r172665 r172808  
    19451945            ResolveType type = static_cast<ResolveType>(pc[3].u.operand);
    19461946
    1947             ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), scope, ident, Get, type);
     1947            ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), needsActivation(), scope, ident, Get, type);
    19481948            instructions[i + 3].u.operand = op.type;
    19491949            instructions[i + 4].u.operand = op.depth;
     
    19621962            const Identifier& ident = identifier(pc[3].u.operand);
    19631963            ResolveModeAndType modeAndType = ResolveModeAndType(pc[4].u.operand);
    1964             ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), scope, ident, Get, modeAndType.type());
     1964            ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), needsActivation(), scope, ident, Get, modeAndType.type());
    19651965
    19661966            instructions[i + 4].u.operand = ResolveModeAndType(modeAndType.mode(), op.type).operand();
     
    19781978            const Identifier& ident = identifier(pc[2].u.operand);
    19791979            ResolveModeAndType modeAndType = ResolveModeAndType(pc[4].u.operand);
    1980             ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), scope, ident, Put, modeAndType.type());
     1980            ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), needsActivation(), scope, ident, Put, modeAndType.type());
    19811981
    19821982            instructions[i + 4].u.operand = ResolveModeAndType(modeAndType.mode(), op.type).operand();
     
    20092009                const Identifier& ident = identifier(pc[4].u.operand);
    20102010                ResolveType type = static_cast<ResolveType>(pc[5].u.operand);
    2011                 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), scope, ident, (flag == ProfileTypesBytecodeGetFromScope ? Get : Put), type);
     2011                ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), needsActivation(), scope, ident, (flag == ProfileTypesBytecodeGetFromScope ? Get : Put), type);
    20122012
    20132013                // FIXME: handle other values for op.type here, and also consider what to do when we can't statically determine the globalID
Note: See TracChangeset for help on using the changeset viewer.