Changeset 78727 in webkit for trunk/Source/JavaScriptCore/parser/ASTBuilder.h
- Timestamp:
- Feb 16, 2011, 11:31:16 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/ASTBuilder.h
r76177 r78727 77 77 : m_globalData(globalData) 78 78 , m_lexer(lexer) 79 , m_scope(globalData) 79 80 , m_evalCount(0) 80 81 { 81 m_scopes.append(Scope(globalData));82 82 } 83 83 … … 116 116 JSC::SourceElements* createSourceElements() { return new (m_globalData) JSC::SourceElements(m_globalData); } 117 117 118 ParserArenaData<DeclarationStacks::VarStack>* varDeclarations() { return m_scope s.last().m_varDeclarations; }119 ParserArenaData<DeclarationStacks::FunctionStack>* funcDeclarations() { return m_scope s.last().m_funcDeclarations; }120 int features() const { return m_scope s.last().m_features; }121 int numConstants() const { return m_scope s.last().m_numConstants; }118 ParserArenaData<DeclarationStacks::VarStack>* varDeclarations() { return m_scope.m_varDeclarations; } 119 ParserArenaData<DeclarationStacks::FunctionStack>* funcDeclarations() { return m_scope.m_funcDeclarations; } 120 int features() const { return m_scope.m_features; } 121 int numConstants() const { return m_scope.m_numConstants; } 122 122 123 123 void appendToComma(CommaNode* commaNode, ExpressionNode* expr) { commaNode->append(expr); } … … 301 301 if (*name == m_globalData->propertyNames->arguments) 302 302 usesArguments(); 303 m_scope s.last().m_funcDeclarations->data.append(decl->body());303 m_scope.m_funcDeclarations->data.append(decl->body()); 304 304 body->setLoc(bodyStartLine, bodyEndLine); 305 305 return decl; … … 495 495 if (m_globalData->propertyNames->arguments == *ident) 496 496 usesArguments(); 497 m_scope s.last().m_varDeclarations->data.append(std::make_pair(ident, attrs));497 m_scope.m_varDeclarations->data.append(std::make_pair(ident, attrs)); 498 498 } 499 499 … … 612 612 } 613 613 614 void incConstants() { m_scope s.last().m_numConstants++; }615 void usesThis() { m_scope s.last().m_features |= ThisFeature; }616 void usesCatch() { m_scope s.last().m_features |= CatchFeature; }617 void usesClosures() { m_scope s.last().m_features |= ClosureFeature; }618 void usesArguments() { m_scope s.last().m_features |= ArgumentsFeature; }619 void usesAssignment() { m_scope s.last().m_features |= AssignFeature; }620 void usesWith() { m_scope s.last().m_features |= WithFeature; }614 void incConstants() { m_scope.m_numConstants++; } 615 void usesThis() { m_scope.m_features |= ThisFeature; } 616 void usesCatch() { m_scope.m_features |= CatchFeature; } 617 void usesClosures() { m_scope.m_features |= ClosureFeature; } 618 void usesArguments() { m_scope.m_features |= ArgumentsFeature; } 619 void usesAssignment() { m_scope.m_features |= AssignFeature; } 620 void usesWith() { m_scope.m_features |= WithFeature; } 621 621 void usesEval() 622 622 { 623 623 m_evalCount++; 624 m_scope s.last().m_features |= EvalFeature;624 m_scope.m_features |= EvalFeature; 625 625 } 626 626 ExpressionNode* createNumber(double d) … … 631 631 JSGlobalData* m_globalData; 632 632 Lexer* m_lexer; 633 Vector<Scope> m_scopes;633 Scope m_scope; 634 634 Vector<BinaryOperand, 10> m_binaryOperandStack; 635 635 Vector<AssignmentInfo, 10> m_assignmentInfoStack;
Note:
See TracChangeset
for help on using the changeset viewer.