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/runtime/InternalFunction.cpp

    r155143 r156624  
    3535const ClassInfo InternalFunction::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(InternalFunction) };
    3636
    37 InternalFunction::InternalFunction(JSGlobalObject* globalObject, Structure* structure)
    38     : JSDestructibleObject(globalObject->vm(), structure)
     37InternalFunction::InternalFunction(VM& vm, Structure* structure)
     38    : JSDestructibleObject(vm, structure)
    3939{
    4040}
Note: See TracChangeset for help on using the changeset viewer.