Changeset 94364 in webkit for trunk/Source/JavaScriptCore/runtime/Executable.h
- Timestamp:
- Sep 1, 2011, 4:49:23 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/Executable.h
r94035 r94364 177 177 { 178 178 NativeExecutable* executable; 179 if (!callThunk) 180 executable = new (allocateCell<NativeExecutable>(globalData.heap)) NativeExecutable(globalData, JITCode(), function, JITCode(), constructor); 181 else 182 executable = new (allocateCell<NativeExecutable>(globalData.heap)) NativeExecutable(globalData, JITCode::HostFunction(callThunk), function, JITCode::HostFunction(constructThunk), constructor); 179 if (!callThunk) { 180 executable = new (allocateCell<NativeExecutable>(globalData.heap)) NativeExecutable(globalData, function, constructor); 181 executable->finishCreation(globalData, JITCode(), JITCode()); 182 } else { 183 executable = new (allocateCell<NativeExecutable>(globalData.heap)) NativeExecutable(globalData, function, constructor); 184 executable->finishCreation(globalData, JITCode::HostFunction(callThunk), JITCode::HostFunction(constructThunk)); 185 } 183 186 return executable; 184 187 } … … 186 189 static NativeExecutable* create(JSGlobalData& globalData, NativeFunction function, NativeFunction constructor) 187 190 { 188 return new (allocateCell<NativeExecutable>(globalData.heap)) NativeExecutable(globalData, function, constructor); 191 NativeExecutable* executable = new (allocateCell<NativeExecutable>(globalData.heap)) NativeExecutable(globalData, function, constructor); 192 executable->finishCreation(globalData); 193 return executable; 189 194 } 190 195 #endif … … 212 217 private: 213 218 #if ENABLE(JIT) 214 NativeExecutable(JSGlobalData& globalData, JITCode callThunk, NativeFunction function, JITCode constructThunk, NativeFunction constructor)219 NativeExecutable(JSGlobalData& globalData, NativeFunction function, NativeFunction constructor) 215 220 : ExecutableBase(globalData, globalData.nativeExecutableStructure.get(), NUM_PARAMETERS_IS_HOST) 216 221 , m_function(function) 217 222 , m_constructor(constructor) 218 223 { 219 finishCreation(globalData, callThunk, constructThunk);220 224 } 221 225 #else … … 225 229 , m_constructor(constructor) 226 230 { 227 finishCreation(globalData);228 231 } 229 232 #endif … … 318 321 { 319 322 EvalExecutable* executable = new (allocateCell<EvalExecutable>(*exec->heap())) EvalExecutable(exec, source, isInStrictContext); 323 executable->finishCreation(exec->globalData()); 320 324 return executable; 321 325 } … … 355 359 { 356 360 ProgramExecutable* executable = new (allocateCell<ProgramExecutable>(*exec->heap())) ProgramExecutable(exec, source); 361 executable->finishCreation(exec->globalData()); 357 362 return executable; 358 363 } … … 413 418 static FunctionExecutable* create(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, bool isInStrictContext, int firstLine, int lastLine) 414 419 { 415 FunctionExecutable* executable = new (allocateCell<FunctionExecutable>(*exec->heap())) FunctionExecutable(exec, name, source, forceUsesArguments, parameters, isInStrictContext, firstLine, lastLine); 420 FunctionExecutable* executable = new (allocateCell<FunctionExecutable>(*exec->heap())) FunctionExecutable(exec, name, source, forceUsesArguments, parameters, isInStrictContext); 421 executable->finishCreation(exec->globalData(), name, firstLine, lastLine); 416 422 return executable; 417 423 } … … 419 425 static FunctionExecutable* create(JSGlobalData& globalData, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, bool isInStrictContext, int firstLine, int lastLine) 420 426 { 421 FunctionExecutable* executable = new (allocateCell<FunctionExecutable>(globalData.heap)) FunctionExecutable(globalData, name, source, forceUsesArguments, parameters, isInStrictContext, firstLine, lastLine); 427 FunctionExecutable* executable = new (allocateCell<FunctionExecutable>(globalData.heap)) FunctionExecutable(globalData, name, source, forceUsesArguments, parameters, isInStrictContext); 428 executable->finishCreation(globalData, name, firstLine, lastLine); 422 429 return executable; 423 430 } … … 540 547 541 548 private: 542 FunctionExecutable(JSGlobalData&, const Identifier& name, const SourceCode&, bool forceUsesArguments, FunctionParameters*, bool , int firstLine, int lastLine);543 FunctionExecutable(ExecState*, const Identifier& name, const SourceCode&, bool forceUsesArguments, FunctionParameters*, bool , int firstLine, int lastLine);549 FunctionExecutable(JSGlobalData&, const Identifier& name, const SourceCode&, bool forceUsesArguments, FunctionParameters*, bool); 550 FunctionExecutable(ExecState*, const Identifier& name, const SourceCode&, bool forceUsesArguments, FunctionParameters*, bool); 544 551 545 552 JSObject* compileForCallInternal(ExecState*, ScopeChainNode*, ExecState* calleeArgsExec);
Note:
See TracChangeset
for help on using the changeset viewer.