Changeset 13304 in webkit for trunk/JavaScriptCore/kjs/function.cpp
- Timestamp:
- Mar 15, 2006, 2:21:48 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/function.cpp
r13015 r13304 56 56 }; 57 57 58 FunctionImp::FunctionImp(ExecState *exec, const Identifier &n )58 FunctionImp::FunctionImp(ExecState *exec, const Identifier &n, FunctionBodyNode* b) 59 59 : InternalFunctionImp(static_cast<FunctionPrototype*> 60 60 (exec->lexicalInterpreter()->builtinFunctionPrototype()), n) 61 , body(b) 61 62 { 62 63 } … … 66 67 } 67 68 68 JSValue *FunctionImp::callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)69 JSValue *FunctionImp::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args) 69 70 { 70 71 JSObject *globalObj = exec->dynamicInterpreter()->globalObject(); 71 72 72 73 // enter a new execution context 73 ContextImp ctx(globalObj, exec->dynamicInterpreter()->imp(), thisObj, codeType(),74 exec->context().imp(), this, &args);74 ContextImp ctx(globalObj, exec->dynamicInterpreter()->imp(), thisObj, body.get(), 75 codeType(), exec->context().imp(), this, &args); 75 76 ExecState newExec(exec->dynamicInterpreter(), &ctx); 76 77 newExec.setException(exec->exception()); // could be null … … 203 204 { 204 205 FunctionImp *thisObj = static_cast<FunctionImp *>(slot.slotBase()); 205 ContextImp *context = exec-> _context;206 ContextImp *context = exec->m_context; 206 207 while (context) { 207 208 if (context->function() == thisObj) { … … 295 296 DeclaredFunctionImp::DeclaredFunctionImp(ExecState *exec, const Identifier &n, 296 297 FunctionBodyNode *b, const ScopeChain &sc) 297 : FunctionImp(exec, n), body(b)298 : FunctionImp(exec, n, b) 298 299 { 299 300 setScope(sc); … … 804 805 exec->dynamicInterpreter()->imp(), 805 806 thisVal, 807 progNode.get(), 806 808 EvalCode, 807 809 exec->context().imp());
Note:
See TracChangeset
for help on using the changeset viewer.