Changeset 127939 in webkit for trunk/Source/JavaScriptCore/parser
- Timestamp:
- Sep 7, 2012, 4:59:10 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore/parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/ASTBuilder.h
r127654 r127939 315 315 if (*name == m_globalData->propertyNames->arguments) 316 316 usesArguments(); 317 m_scope.m_funcDeclarations->data.append( decl->body());317 m_scope.m_funcDeclarations->data.append(DeclarationStacks::FunctionDeclaration(decl->body())); 318 318 body->setLoc(bodyStartLine, bodyEndLine, location.column); 319 319 return decl; … … 509 509 if (m_globalData->propertyNames->arguments == *ident) 510 510 usesArguments(); 511 m_scope.m_varDeclarations->data.append( std::make_pair(ident, attrs));511 m_scope.m_varDeclarations->data.append(DeclarationStacks::VarDeclaration(ident, attrs)); 512 512 } 513 513 -
trunk/Source/JavaScriptCore/parser/Nodes.h
r127810 r127939 86 86 87 87 namespace DeclarationStacks { 88 struct VarDeclaration { 89 VarDeclaration(const Identifier* name, unsigned attributes) 90 : name(name) 91 , attributes(attributes) 92 , reg(0) 93 { 94 } 95 const Identifier* name; 96 unsigned attributes; 97 RegisterID* reg; 98 }; 99 struct FunctionDeclaration { 100 explicit FunctionDeclaration(FunctionBodyNode* node) 101 : node(node) 102 , reg(0) 103 { 104 } 105 FunctionBodyNode* node; 106 RegisterID* reg; 107 }; 88 108 enum VarAttrs { IsConstant = 1, HasInitializer = 2 }; 89 typedef Vector< std::pair<const Identifier*, unsigned>> VarStack;90 typedef Vector<Function BodyNode*> FunctionStack;109 typedef Vector<VarDeclaration> VarStack; 110 typedef Vector<FunctionDeclaration> FunctionStack; 91 111 } 92 112
Note:
See TracChangeset
for help on using the changeset viewer.