Changeset 38047 in webkit for trunk/JavaScriptCore/VM/CodeGenerator.h
- Timestamp:
- Oct 31, 2008, 12:59:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CodeGenerator.h
r38027 r38047 35 35 #include "Instruction.h" 36 36 #include "LabelID.h" 37 #include "LabelScope.h" 37 38 #include "Machine.h" 38 39 #include "RegisterID.h" … … 49 50 class ScopeChain; 50 51 class ScopeNode; 51 52 // JumpContexts are used to track entry and exit points for javascript loops and switch statements53 struct JumpContext {54 LabelStack* labels;55 LabelID* continueTarget;56 LabelID* breakTarget;57 int scopeDepth;58 bool isValidUnlabeledBreakTarget;59 };60 52 61 53 struct FinallyContext { … … 158 150 } 159 151 152 PassRefPtr<LabelScope> newLabelScope(LabelScope::Type, const Identifier* = 0); 160 153 PassRefPtr<LabelID> newLabel(); 161 154 … … 310 303 void pushFinallyContext(LabelID* target, RegisterID* returnAddrDst); 311 304 void popFinallyContext(); 312 bool inContinueContext() { return m_continueDepth > 0; }; 313 bool inJumpContext() { return m_jumpContextStack.size() > 0; }; 314 void pushJumpContext(LabelStack*, LabelID* continueTarget, LabelID* breakTarget, bool isValidUnlabeledBreakTarget); 315 void popJumpContext(); 316 JumpContext* jumpContextForContinue(const Identifier&); 317 JumpContext* jumpContextForBreak(const Identifier&); 305 306 LabelScope* breakTarget(const Identifier&); 307 LabelScope* continueTarget(const Identifier&); 318 308 319 309 void beginSwitch(RegisterID*, SwitchInfo::SwitchType); … … 426 416 SegmentedVector<RegisterID, 512> m_parameters; 427 417 SegmentedVector<RegisterID, 512> m_globals; 428 SegmentedVector<LabelID, 512> m_labels; 418 SegmentedVector<LabelScope, 256> m_labelScopes; 419 SegmentedVector<LabelID, 256> m_labels; 429 420 RefPtr<RegisterID> m_lastConstant; 430 421 int m_finallyDepth; … … 432 423 CodeType m_codeType; 433 424 434 Vector<JumpContext> m_jumpContextStack;435 int m_continueDepth;436 425 Vector<ControlFlowContext> m_scopeContextStack; 437 426 Vector<SwitchInfo> m_switchContextStack;
Note:
See TracChangeset
for help on using the changeset viewer.