Ignore:
Timestamp:
Sep 29, 2013, 8:45:30 PM (12 years ago)
Author:
[email protected]
Message:

Pass VM instead of JSGlobalObject to function constructors.
<https://webkit.org/b/122082>

Reviewed by Darin Adler.

Functions don't need anything from the global object during their
construction and only use it to get to the VM. Reduce loads by
simply passing the VM around instead.

This patch is mostly mechanical, I just changed the signature of
InternalFunction and worked my way from there until it built.

JSC release binary size -= 4840 bytes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSObjectRef.cpp

    r154459 r156624  
    106106    ExecState* exec = toJS(ctx);
    107107    APIEntryShim entryShim(exec);
    108     return toRef(JSCallbackFunction::create(exec, exec->lexicalGlobalObject(), callAsFunction, name ? name->string() : ASCIILiteral("anonymous")));
     108    return toRef(JSCallbackFunction::create(exec->vm(), exec->lexicalGlobalObject(), callAsFunction, name ? name->string() : ASCIILiteral("anonymous")));
    109109}
    110110
Note: See TracChangeset for help on using the changeset viewer.