Changeset 27885 in webkit for trunk/JavaScriptCore/kjs/ExecState.cpp
- Timestamp:
- Nov 18, 2007, 1:09:27 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ExecState.cpp
r27344 r27885 34 34 35 35 // ECMA 10.2 36 ExecState::ExecState(Interpreter* interpreter, JSGlobalObject* glob , JSObject* thisV,36 ExecState::ExecState(Interpreter* interpreter, JSGlobalObject* globalObject, JSObject* thisV, 37 37 FunctionBodyNode* currentBody, CodeType type, ExecState* callingExec, 38 38 FunctionImp* func, const List* args) … … 56 56 } else { 57 57 m_activation = 0; 58 m_variable = glob ;58 m_variable = globalObject; 59 59 } 60 60 … … 63 63 case EvalCode: 64 64 if (m_callingExecState) { 65 scope= m_callingExecState->scopeChain();65 m_scopeChain = m_callingExecState->scopeChain(); 66 66 m_variable = m_callingExecState->variableObject(); 67 67 m_thisVal = m_callingExecState->thisValue(); … … 69 69 } // else same as GlobalCode 70 70 case GlobalCode: 71 scope.clear(); 72 scope.push(glob); 73 m_thisVal = static_cast<JSObject*>(glob); 71 if (globalObject) 72 setGlobalObject(globalObject); 74 73 break; 75 74 case FunctionCode: 76 scope= func->scope();77 scope.push(m_activation);75 m_scopeChain = func->scope(); 76 m_scopeChain.push(m_activation); 78 77 m_variable = m_activation; // TODO: DontDelete ? (ECMA 10.2.3) 79 78 m_thisVal = thisV; … … 93 92 { 94 93 for (ExecState* exec = this; exec; exec = exec->m_callingExecState) 95 exec->scope.mark(); 94 exec->m_scopeChain.mark(); 95 } 96 97 void ExecState::setGlobalObject(JSGlobalObject* globalObject) 98 { 99 m_scopeChain.clear(); 100 m_scopeChain.push(globalObject); 101 m_thisVal = static_cast<JSObject*>(globalObject); 96 102 } 97 103
Note:
See TracChangeset
for help on using the changeset viewer.