Ignore:
Timestamp:
Nov 19, 2010, 2:40:12 PM (15 years ago)
Author:
[email protected]
Message:

2010-11-19 Oliver Hunt <[email protected]>

Reviewed by Geoffrey Garen.

Don't check for constant registers when we can guarantee that the register won't be in the constant pool
https://bugs.webkit.org/show_bug.cgi?id=49814

Add uncheckedR(int) to CallFrame, and replace all the uses of r() with uncheckedR()
when we can guarantee that the register is not referring to a constant.
This makes the interpreter about 0.5% faster, and makes the CallFrame initialisation
logic correct when we're using a faked callframe (as in the case of the globalExec).

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::createActivation):
  • debugger/DebuggerCallFrame.cpp: (JSC::DebuggerCallFrame::thisObject):
  • interpreter/CallFrame.h: (JSC::ExecState::uncheckedR):
  • interpreter/Interpreter.cpp: (JSC::Interpreter::resolve): (JSC::Interpreter::resolveSkip): (JSC::Interpreter::resolveGlobal): (JSC::Interpreter::resolveGlobalDynamic): (JSC::Interpreter::resolveBase): (JSC::Interpreter::resolveBaseAndProperty): (JSC::Interpreter::callEval): (JSC::Interpreter::unwindCallFrame): (JSC::Interpreter::throwException): (JSC::Interpreter::execute): (JSC::Interpreter::executeCall): (JSC::Interpreter::executeConstruct): (JSC::Interpreter::prepareForRepeatCall): (JSC::Interpreter::createExceptionScope): (JSC::Interpreter::privateExecute):
  • jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION):
  • runtime/JSActivation.cpp: (JSC::JSActivation::argumentsGetter):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSActivation.cpp

    r69516 r72442  
    203203    CallFrame* callFrame = CallFrame::create(activation->d()->registers);
    204204    int argumentsRegister = activation->d()->functionExecutable->generatedBytecode().argumentsRegister();
    205     if (!callFrame->r(argumentsRegister).jsValue()) {
     205    if (!callFrame->uncheckedR(argumentsRegister).jsValue()) {
    206206        JSValue arguments = JSValue(new (callFrame) Arguments(callFrame));
    207         callFrame->r(argumentsRegister) = arguments;
    208         callFrame->r(unmodifiedArgumentsRegister(argumentsRegister)) = arguments;
    209     }
    210 
    211     ASSERT(callFrame->r(argumentsRegister).jsValue().inherits(&Arguments::info));
    212     return callFrame->r(argumentsRegister).jsValue();
     207        callFrame->uncheckedR(argumentsRegister) = arguments;
     208        callFrame->uncheckedR(unmodifiedArgumentsRegister(argumentsRegister)) = arguments;
     209    }
     210
     211    ASSERT(callFrame->uncheckedR(argumentsRegister).jsValue().inherits(&Arguments::info));
     212    return callFrame->uncheckedR(argumentsRegister).jsValue();
    213213}
    214214
Note: See TracChangeset for help on using the changeset viewer.