Changeset 31167 in webkit for trunk/JavaScriptCore/kjs/ExecState.cpp
- Timestamp:
- Mar 19, 2008, 6:00:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ExecState.cpp
r30871 r31167 145 145 } 146 146 147 void ExecState::markActiveExecStates()148 {149 ExecStateStack::const_iterator end = activeExecStates().end();150 for (ExecStateStack::const_iterator it = activeExecStates().begin(); it != end; ++it)151 (*it)->m_scopeChain.mark();152 }153 154 static inline ExecStateStack& inlineActiveExecStates()155 {156 static ExecStateStack staticActiveExecStates;157 return staticActiveExecStates;158 }159 160 ExecStateStack& ExecState::activeExecStates()161 {162 return inlineActiveExecStates();163 }164 165 147 GlobalExecState::GlobalExecState(JSGlobalObject* globalObject) 166 148 : ExecState(globalObject) … … 175 157 : ExecState(globalObject, thisObject, programNode) 176 158 { 177 inlineActiveExecStates().append(this);159 m_globalObject->activeExecStates().append(this); 178 160 } 179 161 180 162 InterpreterExecState::~InterpreterExecState() 181 163 { 182 ASSERT( inlineActiveExecStates().last() == this);183 inlineActiveExecStates().removeLast();164 ASSERT(m_globalObject->activeExecStates().last() == this); 165 m_globalObject->activeExecStates().removeLast(); 184 166 } 185 167 … … 187 169 : ExecState(globalObject, thisObj, evalNode, callingExec, scopeChain, variableObject) 188 170 { 189 inlineActiveExecStates().append(this);171 m_globalObject->activeExecStates().append(this); 190 172 } 191 173 192 174 EvalExecState::~EvalExecState() 193 175 { 194 ASSERT( inlineActiveExecStates().last() == this);195 inlineActiveExecStates().removeLast();176 ASSERT(m_globalObject->activeExecStates().last() == this); 177 m_globalObject->activeExecStates().removeLast(); 196 178 } 197 179 … … 201 183 : ExecState(globalObject, thisObject, functionBodyNode, callingExec, func, args) 202 184 { 203 inlineActiveExecStates().append(this);185 m_globalObject->activeExecStates().append(this); 204 186 } 205 187 206 188 FunctionExecState::~FunctionExecState() 207 189 { 208 ASSERT( inlineActiveExecStates().last() == this);209 inlineActiveExecStates().removeLast();190 ASSERT(m_globalObject->activeExecStates().last() == this); 191 m_globalObject->activeExecStates().removeLast(); 210 192 211 193 if (m_activation->needsPop())
Note:
See TracChangeset
for help on using the changeset viewer.