Ignore:
Timestamp:
May 17, 2010, 7:39:20 PM (15 years ago)
Author:
[email protected]
Message:

Bug 39252 - Move host/native JSFunction's NativeFunction onto NativeExecutable.

Reviewed by Geoff Garen.

Currently host functions reuse JSFunction's ScopeChain as storage for their
NativeFunction (the C function pointer to the host function implementation).
Instead, move this onto NativeExecutable. This will allow host functions to
have a scopechain (which will be implemented as a separate patch).

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • jit/JIT.h:
  • jit/JITCall.cpp:

(JSC::JIT::compileOpCallInitializeCallFrame):
(JSC::JIT::compileOpCall):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):

  • jit/JITOpcodes32_64.cpp:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::emitSlow_op_get_by_val):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::emitSlow_op_get_by_val):

  • jit/JITStubs.cpp:

(JSC::JITThunks::specializedThunk):

  • jit/JITStubs.h:

(JSC::JITThunks::ctiNativeCall):

  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::finalize):

  • jit/ThunkGenerators.cpp:

(JSC::charCodeAtThunkGenerator):
(JSC::charAtThunkGenerator):
(JSC::fromCharCodeThunkGenerator):
(JSC::sqrtThunkGenerator):
(JSC::powThunkGenerator):

  • jit/ThunkGenerators.h:
  • runtime/Executable.h:

(JSC::NativeExecutable::create):
(JSC::NativeExecutable::function):
(JSC::NativeExecutable::NativeExecutable):
(JSC::JSFunction::nativeFunction):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::JSFunction):
(JSC::JSFunction::~JSFunction):
(JSC::JSFunction::markChildren):
(JSC::JSFunction::getCallData):
(JSC::JSFunction::call):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getConstructData):
(JSC::JSFunction::construct):

  • runtime/JSFunction.h:

(JSC::JSFunction::scope):

  • runtime/JSGlobalData.h:

(JSC::JSGlobalData::getThunk):

  • runtime/Lookup.cpp:

(JSC::setUpStaticFunctionSlot):

  • runtime/StringConstructor.cpp:

(JSC::StringConstructor::StringConstructor):

File:
1 edited

Legend:

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

    r58286 r59637  
    2121#include "Lookup.h"
    2222
     23#include "Executable.h"
    2324#include "JSFunction.h"
    2425#include "PrototypeFunction.h"
     
    7879#if ENABLE(JIT)
    7980        if (entry->generator())
    80             function = new (exec) NativeFunctionWrapper(exec, exec->lexicalGlobalObject()->prototypeFunctionStructure(), entry->functionLength(), propertyName, exec->globalData().getThunk(entry->generator()), entry->function());
     81            function = new (exec) NativeFunctionWrapper(exec, exec->lexicalGlobalObject()->prototypeFunctionStructure(), entry->functionLength(), propertyName, exec->globalData().getNativeExecutable(entry->function(), entry->generator()));
    8182        else
    8283#endif
Note: See TracChangeset for help on using the changeset viewer.