Changeset 59637 in webkit for trunk/JavaScriptCore/runtime/Executable.h
- Timestamp:
- May 17, 2010, 7:39:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Executable.h
r59587 r59637 27 27 #define Executable_h 28 28 29 #include "CallData.h" 29 30 #include "JSFunction.h" 30 31 #include "Interpreter.h" … … 91 92 #if ENABLE(JIT) 92 93 class NativeExecutable : public ExecutableBase { 93 public: 94 NativeExecutable(ExecState* exec) 94 friend class JIT; 95 public: 96 static PassRefPtr<NativeExecutable> create(MacroAssemblerCodePtr thunk, NativeFunction function) 97 { 98 return adoptRef(new NativeExecutable(JITCode::HostFunction(thunk), function)); 99 } 100 101 ~NativeExecutable(); 102 103 NativeFunction function() { return m_function; } 104 105 private: 106 NativeExecutable(JITCode thunk, NativeFunction function) 95 107 : ExecutableBase(NUM_PARAMETERS_IS_HOST) 96 { 97 m_jitCodeForCall = exec->globalData().jitStubs.ctiNativeCallThunk()->m_jitCodeForCall; 98 m_jitCodeForConstruct = exec->globalData().jitStubs.ctiNativeCallThunk()->m_jitCodeForCall; // FIXME: this thunk should have a construct form 99 } 100 NativeExecutable(JITCode thunk) 101 : ExecutableBase(NUM_PARAMETERS_IS_HOST) 108 , m_function(function) 102 109 { 103 110 m_jitCodeForCall = thunk; … … 105 112 } 106 113 107 ~NativeExecutable();114 NativeFunction m_function; 108 115 }; 109 116 #endif … … 404 411 } 405 412 413 inline NativeFunction JSFunction::nativeFunction() 414 { 415 ASSERT(isHostFunction()); 416 return static_cast<NativeExecutable*>(m_executable.get())->function(); 417 } 406 418 } 407 419
Note:
See TracChangeset
for help on using the changeset viewer.