Changeset 34355 in webkit for trunk/JavaScriptCore/kjs/ExecState.h
- Timestamp:
- Jun 3, 2008, 5:40:47 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ExecState.h
r34071 r34355 105 105 106 106 private: 107 // Default constructor required for OldInterpreterExecState withgcc 3.108 ExecState() { };107 // Default constructor required for gcc 3. 108 ExecState() { } 109 109 110 110 ExecState(ExecState*, Machine*, RegisterFile*, ScopeChainNode*, int callFrameOffset); … … 127 127 }; 128 128 129 // This code is now defunct:130 131 129 enum CodeType { GlobalCode, EvalCode, FunctionCode }; 132 class OldInterpreterExecState : public ExecState {133 public:134 void pushSwitch() { m_switchDepth++; }135 void popSwitch() { m_switchDepth--; }136 bool inSwitch() const { return (m_switchDepth > 0); }137 138 // These are only valid right after calling execute().139 ComplType completionType() const { return m_completionType; }140 const Identifier& breakOrContinueTarget() const141 {142 ASSERT(m_completionType == Break || m_completionType == Continue);143 return *m_breakOrContinueTarget;144 }145 146 // Only for use in the implementation of execute().147 void setCompletionType(ComplType type)148 {149 ASSERT(type != Break);150 ASSERT(type != Continue);151 m_completionType = type;152 }153 JSValue* setNormalCompletion()154 {155 ASSERT(!hadException());156 m_completionType = Normal;157 return 0;158 }159 JSValue* setNormalCompletion(JSValue* value)160 {161 ASSERT(!hadException());162 m_completionType = Normal;163 return value;164 }165 JSValue* setBreakCompletion(const Identifier* target)166 {167 ASSERT(!hadException());168 m_completionType = Break;169 m_breakOrContinueTarget = target;170 return 0;171 }172 JSValue* setContinueCompletion(const Identifier* target)173 {174 ASSERT(!hadException());175 m_completionType = Continue;176 m_breakOrContinueTarget = target;177 return 0;178 }179 JSValue* setReturnValueCompletion(JSValue* returnValue)180 {181 ASSERT(!hadException());182 ASSERT(returnValue);183 m_completionType = ReturnValue;184 return returnValue;185 }186 JSValue* setThrowCompletion(JSValue* exception)187 {188 ASSERT(!hadException());189 ASSERT(exception);190 m_completionType = Throw;191 return exception;192 }193 JSValue* setInterruptedCompletion()194 {195 ASSERT(!hadException());196 m_completionType = Interrupted;197 return 0;198 }199 CodeType codeType() { return m_codeType; }200 void pushIteration() { m_iterationDepth++; }201 void popIteration() { m_iterationDepth--; }202 bool inIteration() const { return (m_iterationDepth > 0); }203 LabelStack& seenLabels() { return m_labelStack; }204 void pushScope(JSObject* s) { m_scopeChain.push(s); }205 void popScope() { m_scopeChain.pop(); }206 JSVariableObject* variableObject() const { ASSERT_NOT_REACHED(); return m_variableObject; }207 void setVariableObject(JSVariableObject* v) { m_variableObject = v; }208 ExecState* callingExecState() { return m_callingExec; }209 ScopeNode* scopeNode() { return m_scopeNode; }210 const List* arguments() const { return m_arguments; }211 FunctionImp* function() const { return m_function; }212 LocalStorage& localStorage() { ASSERT_NOT_REACHED(); return *(LocalStorage*)0; }213 void setLocalStorage(LocalStorage*) { ASSERT_NOT_REACHED(); }214 ScopeChain& scopeChain() { return m_scopeChain; }215 JSObject* thisValue() const { return m_thisValue; }216 217 ComplType m_completionType;218 const Identifier* m_breakOrContinueTarget;219 int m_switchDepth;220 CodeType m_codeType;221 int m_iterationDepth;222 LabelStack m_labelStack;223 ScopeChainNode m_inlineScopeChainNode;224 ScopeChain m_scopeChain;225 JSVariableObject* m_variableObject;226 ScopeNode* m_scopeNode;227 const List* m_arguments;228 FunctionImp* m_function;229 ExecState* m_callingExec;230 JSObject* m_thisValue;231 };232 130 233 131 } // namespace KJS
Note:
See TracChangeset
for help on using the changeset viewer.