Changeset 48774 in webkit for trunk/JavaScriptCore/jit


Ignore:
Timestamp:
Sep 25, 2009, 3:26:44 PM (16 years ago)
Author:
[email protected]
Message:

JavaScriptCore: Inlined some object creation code, including lexicalGlobalObject access
https://bugs.webkit.org/show_bug.cgi?id=29750

Patch by Geoffrey Garen <[email protected]> on 2009-09-25
Reviewed by Darin Adler.

SunSpider says 0.5% faster.

0.8% speedup on bench-alloc-nonretained.js.
2.5% speedup on v8-splay.js.

  • interpreter/CachedCall.h:

(JSC::CachedCall::CachedCall):

  • interpreter/CallFrame.h:

(JSC::ExecState::lexicalGlobalObject):
(JSC::ExecState::globalThisValue):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::dumpRegisters):
(JSC::Interpreter::execute):
(JSC::Interpreter::privateExecute):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunction):

  • runtime/ScopeChain.cpp:

(JSC::ScopeChainNode::print):

  • runtime/ScopeChain.h:

(JSC::ScopeChainNode::ScopeChainNode):
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainNode::push):
(JSC::ScopeChain::ScopeChain):
(JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode.
Replaced accessor function for globalObject() with data member. Replaced
globalThisObject() accessor with direct access to globalThis, to match.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h: Inlined array and object construction.

WebCore: Inlined some object creation code, including lexicalGlobalObject access
https://bugs.webkit.org/show_bug.cgi?id=29750

Patch by Geoffrey Garen <[email protected]> on 2009-09-25
Reviewed by Darin Adler.

  • bindings/js/JSInspectorBackendCustom.cpp:

(WebCore::JSInspectorBackend::currentCallFrame):

  • inspector/JavaScriptDebugServer.cpp:

(WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
API changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r48590 r48774  
    11831183        // purpose.  The object is in no way exposed, and as such the check will always pass.
    11841184        if (slot.slotBase() == baseValue) {
    1185             JIT::patchMethodCallProto(codeBlock, methodCallLinkInfo, callee, structure, callFrame->scopeChain()->globalObject()->methodCallDummy(), STUB_RETURN_ADDRESS);
     1185            JIT::patchMethodCallProto(codeBlock, methodCallLinkInfo, callee, structure, callFrame->scopeChain()->globalObject->methodCallDummy(), STUB_RETURN_ADDRESS);
    11861186            return JSValue::encode(result);
    11871187        }
     
    17391739        structure = asObject(stackFrame.args[3].jsValue())->inheritorID();
    17401740    else
    1741         structure = constructor->scope().node()->globalObject()->emptyObjectStructure();
     1741        structure = constructor->scope().node()->globalObject->emptyObjectStructure();
    17421742    return new (stackFrame.globalData) JSObject(structure);
    17431743}
     
    26422642    Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount;
    26432643    JSValue thisValue = argv[0].jsValue();
    2644     JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject();
     2644    JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject;
    26452645
    26462646    if (thisValue == globalObject && funcVal == globalObject->evalFunction()) {
Note: See TracChangeset for help on using the changeset viewer.