Changeset 127810 in webkit for trunk/Source/JavaScriptCore/runtime/Executable.h
- Timestamp:
- Sep 6, 2012, 6:42:53 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/Executable.h
r127774 r127810 540 540 typedef ScriptExecutable Base; 541 541 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);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); 546 546 return executable; 547 547 } 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 } 548 static FunctionExecutable* fromGlobalCode(const Identifier& name, ExecState*, Debugger*, const SourceCode&, JSObject** exception); 555 549 556 550 static void destroy(JSCell*); 557 551 558 JSFunction* make(ExecState* exec, JSScope* scope)559 {560 return JSFunction::create(exec, this, scope);561 }562 563 552 // Returns either call or construct bytecode. This can be appropriate 564 553 // for answering questions that that don't vary between call and construct -- … … 709 698 void clearCodeIfNotCompiling(); 710 699 static void visitChildren(JSCell*, SlotVisitor&); 711 static FunctionExecutable* fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, JSObject** exception);712 700 static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) 713 701 { … … 722 710 723 711 protected: 724 void finishCreation(JSGlobalData& globalData , const Identifier& name, int firstLine, int lastLine)712 void finishCreation(JSGlobalData& globalData) 725 713 { 726 714 Base::finishCreation(globalData); 727 m_firstLine = firstLine; 728 m_lastLine = lastLine; 729 m_nameValue.set(globalData, this, jsString(&globalData, name.ustring())); 715 m_nameValue.set(globalData, this, jsString(&globalData, name().ustring())); 730 716 } 731 717 732 718 private: 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); 719 FunctionExecutable(JSGlobalData&, FunctionBodyNode*); 735 720 736 721 JSObject* compileForCallInternal(ExecState*, JSScope*, JITCode::JITType, unsigned bytecodeIndex = UINT_MAX); … … 765 750 Identifier m_name; 766 751 Identifier m_inferredName; 752 FunctionNameIsInScopeToggle m_functionNameIsInScopeToggle; 767 753 WriteBarrier<JSString> m_nameValue; 768 754 WriteBarrier<SharedSymbolTable> m_symbolTable;
Note:
See TracChangeset
for help on using the changeset viewer.