Changeset 127774 in webkit for trunk/Source/JavaScriptCore/runtime/Executable.h
- Timestamp:
- Sep 6, 2012, 12:45:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/Executable.h
r127698 r127774 540 540 typedef ScriptExecutable Base; 541 541 542 static FunctionExecutable* create( JSGlobalData& globalData, FunctionBodyNode* node)543 { 544 FunctionExecutable* executable = new (NotNull, allocateCell<FunctionExecutable>( globalData.heap)) FunctionExecutable(globalData, node);545 executable->finishCreation( globalData);542 static FunctionExecutable* create(ExecState* exec, const Identifier& name, const Identifier& inferredName, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, bool isInStrictContext, int firstLine, int lastLine) 543 { 544 FunctionExecutable* executable = new (NotNull, allocateCell<FunctionExecutable>(*exec->heap())) FunctionExecutable(exec, name, inferredName, source, forceUsesArguments, parameters, isInStrictContext); 545 executable->finishCreation(exec->globalData(), name, firstLine, lastLine); 546 546 return executable; 547 547 } 548 static FunctionExecutable* fromGlobalCode(const Identifier& name, ExecState*, Debugger*, const SourceCode&, JSObject** exception); 548 549 static FunctionExecutable* create(JSGlobalData& globalData, const Identifier& name, const Identifier& inferredName, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, bool isInStrictContext, int firstLine, int lastLine) 550 { 551 FunctionExecutable* executable = new (NotNull, allocateCell<FunctionExecutable>(globalData.heap)) FunctionExecutable(globalData, name, inferredName, source, forceUsesArguments, parameters, isInStrictContext); 552 executable->finishCreation(globalData, name, firstLine, lastLine); 553 return executable; 554 } 549 555 550 556 static void destroy(JSCell*); 551 557 558 JSFunction* make(ExecState* exec, JSScope* scope) 559 { 560 return JSFunction::create(exec, this, scope); 561 } 562 552 563 // Returns either call or construct bytecode. This can be appropriate 553 564 // for answering questions that that don't vary between call and construct -- … … 698 709 void clearCodeIfNotCompiling(); 699 710 static void visitChildren(JSCell*, SlotVisitor&); 711 static FunctionExecutable* fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, JSObject** exception); 700 712 static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) 701 713 { … … 710 722 711 723 protected: 712 void finishCreation(JSGlobalData& globalData )724 void finishCreation(JSGlobalData& globalData, const Identifier& name, int firstLine, int lastLine) 713 725 { 714 726 Base::finishCreation(globalData); 715 m_nameValue.set(globalData, this, jsString(&globalData, name().ustring())); 727 m_firstLine = firstLine; 728 m_lastLine = lastLine; 729 m_nameValue.set(globalData, this, jsString(&globalData, name.ustring())); 716 730 } 717 731 718 732 private: 719 FunctionExecutable(JSGlobalData&, FunctionBodyNode*); 733 FunctionExecutable(JSGlobalData&, const Identifier& name, const Identifier& inferredName, const SourceCode&, bool forceUsesArguments, FunctionParameters*, bool); 734 FunctionExecutable(ExecState*, const Identifier& name, const Identifier& inferredName, const SourceCode&, bool forceUsesArguments, FunctionParameters*, bool); 720 735 721 736 JSObject* compileForCallInternal(ExecState*, JSScope*, JITCode::JITType, unsigned bytecodeIndex = UINT_MAX);
Note:
See TracChangeset
for help on using the changeset viewer.