Changeset 34791 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jun 25, 2008, 12:07:38 AM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r34790 r34791 1 2008-06-25 Alexey Proskuryakov <[email protected]> 2 3 Reviewed by Geoff. 4 5 Remove more threadInstance() calls. 6 7 * kjs/JSFunction.cpp: 8 (KJS::JSFunction::getParameterName): 9 (KJS::IndexToNameMap::unMap): 10 (KJS::Arguments::deleteProperty): 11 * kjs/JSFunction.h: 12 Access nullIdentifier without going to thread specific storage. 13 14 * JavaScriptCore.exp: 15 * kjs/JSGlobalData.cpp: 16 (KJS::JSGlobalData::JSGlobalData): 17 * kjs/JSGlobalData.h: 18 * kjs/Parser.cpp: 19 (KJS::Parser::parse): 20 * kjs/Parser.h: 21 (KJS::ParserRefCountedData::ParserRefCountedData): 22 (KJS::Parser::parse): 23 * kjs/grammar.y: 24 * kjs/nodes.cpp: 25 (KJS::ParserRefCounted::ParserRefCounted): 26 (KJS::ParserRefCounted::ref): 27 (KJS::ParserRefCounted::deref): 28 (KJS::ParserRefCounted::hasOneRef): 29 (KJS::ParserRefCounted::deleteNewObjects): 30 (KJS::Node::Node): 31 (KJS::StatementNode::StatementNode): 32 (KJS::BreakpointCheckStatement::BreakpointCheckStatement): 33 (KJS::ConstDeclNode::ConstDeclNode): 34 (KJS::BlockNode::BlockNode): 35 (KJS::ForInNode::ForInNode): 36 (KJS::ScopeNode::ScopeNode): 37 (KJS::ProgramNode::ProgramNode): 38 (KJS::ProgramNode::create): 39 (KJS::EvalNode::EvalNode): 40 (KJS::EvalNode::create): 41 (KJS::FunctionBodyNode::FunctionBodyNode): 42 (KJS::FunctionBodyNode::create): 43 * kjs/nodes.h: 44 (KJS::ExpressionNode::): 45 (KJS::NullNode::): 46 (KJS::BooleanNode::): 47 (KJS::NumberNode::): 48 (KJS::ImmediateNumberNode::): 49 (KJS::StringNode::): 50 (KJS::RegExpNode::): 51 (KJS::ThisNode::): 52 (KJS::ResolveNode::): 53 (KJS::ElementNode::): 54 (KJS::ArrayNode::): 55 (KJS::PropertyNode::): 56 (KJS::PropertyListNode::): 57 (KJS::ObjectLiteralNode::): 58 (KJS::BracketAccessorNode::): 59 (KJS::DotAccessorNode::): 60 (KJS::ArgumentListNode::): 61 (KJS::ArgumentsNode::): 62 (KJS::NewExprNode::): 63 (KJS::EvalFunctionCallNode::): 64 (KJS::FunctionCallValueNode::): 65 (KJS::FunctionCallResolveNode::): 66 (KJS::FunctionCallBracketNode::): 67 (KJS::FunctionCallDotNode::): 68 (KJS::PrePostResolveNode::): 69 (KJS::PostIncResolveNode::): 70 (KJS::PostDecResolveNode::): 71 (KJS::PostfixBracketNode::): 72 (KJS::PostIncBracketNode::): 73 (KJS::PostDecBracketNode::): 74 (KJS::PostfixDotNode::): 75 (KJS::PostIncDotNode::): 76 (KJS::PostDecDotNode::): 77 (KJS::PostfixErrorNode::): 78 (KJS::DeleteResolveNode::): 79 (KJS::DeleteBracketNode::): 80 (KJS::DeleteDotNode::): 81 (KJS::DeleteValueNode::): 82 (KJS::VoidNode::): 83 (KJS::TypeOfResolveNode::): 84 (KJS::TypeOfValueNode::): 85 (KJS::PreIncResolveNode::): 86 (KJS::PreDecResolveNode::): 87 (KJS::PrefixBracketNode::): 88 (KJS::PreIncBracketNode::): 89 (KJS::PreDecBracketNode::): 90 (KJS::PrefixDotNode::): 91 (KJS::PreIncDotNode::): 92 (KJS::PreDecDotNode::): 93 (KJS::PrefixErrorNode::): 94 (KJS::UnaryOpNode::UnaryOpNode): 95 (KJS::UnaryPlusNode::): 96 (KJS::NegateNode::): 97 (KJS::BitwiseNotNode::): 98 (KJS::LogicalNotNode::): 99 (KJS::BinaryOpNode::BinaryOpNode): 100 (KJS::ReverseBinaryOpNode::ReverseBinaryOpNode): 101 (KJS::MultNode::): 102 (KJS::DivNode::): 103 (KJS::ModNode::): 104 (KJS::AddNode::): 105 (KJS::SubNode::): 106 (KJS::LeftShiftNode::): 107 (KJS::RightShiftNode::): 108 (KJS::UnsignedRightShiftNode::): 109 (KJS::LessNode::): 110 (KJS::GreaterNode::): 111 (KJS::LessEqNode::): 112 (KJS::GreaterEqNode::): 113 (KJS::InstanceOfNode::): 114 (KJS::InNode::): 115 (KJS::EqualNode::): 116 (KJS::NotEqualNode::): 117 (KJS::StrictEqualNode::): 118 (KJS::NotStrictEqualNode::): 119 (KJS::BitAndNode::): 120 (KJS::BitOrNode::): 121 (KJS::BitXOrNode::): 122 (KJS::LogicalAndNode::): 123 (KJS::LogicalOrNode::): 124 (KJS::ConditionalNode::): 125 (KJS::ReadModifyResolveNode::): 126 (KJS::AssignResolveNode::): 127 (KJS::ReadModifyBracketNode::): 128 (KJS::AssignBracketNode::): 129 (KJS::AssignDotNode::): 130 (KJS::ReadModifyDotNode::): 131 (KJS::AssignErrorNode::): 132 (KJS::CommaNode::): 133 (KJS::VarDeclCommaNode::): 134 (KJS::ConstStatementNode::): 135 (KJS::SourceElements::SourceElements): 136 (KJS::EmptyStatementNode::): 137 (KJS::DebuggerStatementNode::): 138 (KJS::ExprStatementNode::): 139 (KJS::VarStatementNode::): 140 (KJS::IfNode::): 141 (KJS::IfElseNode::): 142 (KJS::DoWhileNode::): 143 (KJS::WhileNode::): 144 (KJS::ForNode::): 145 (KJS::ContinueNode::): 146 (KJS::BreakNode::): 147 (KJS::ReturnNode::): 148 (KJS::WithNode::): 149 (KJS::LabelNode::): 150 (KJS::ThrowNode::): 151 (KJS::TryNode::): 152 (KJS::ParameterNode::): 153 (KJS::FuncExprNode::): 154 (KJS::FuncDeclNode::): 155 (KJS::CaseClauseNode::): 156 (KJS::ClauseListNode::): 157 (KJS::CaseBlockNode::): 158 (KJS::SwitchNode::): 159 Changed ParserRefCounted to hold a JSGlobalData pointer, and used it to replace 160 threadInstance calls. 161 1 162 2008-06-24 Cameron Zwarich <[email protected]> 2 163 -
trunk/JavaScriptCore/JavaScriptCore.exp
r34754 r34791 92 92 __ZN3KJS11JSImmediate8toStringEPKNS_7JSValueE 93 93 __ZN3KJS11ProfileNode4sortEPFbRKN3WTF6RefPtrIS0_EES5_E 94 __ZN3KJS11ProgramNode6createEPNS_1 4SourceElementsEPN3WTF6VectorISt4pairINS_10IdentifierEjELm16EEEPNS4_INS3_6RefPtrINS_12FuncDeclNodeEEELm16EEEbb94 __ZN3KJS11ProgramNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairINS_10IdentifierEjELm16EEEPNS6_INS5_6RefPtrINS_12FuncDeclNodeEEELm16EEEbb 95 95 __ZN3KJS11PropertyMap11getLocationERKNS_10IdentifierE 96 96 __ZN3KJS11PropertyMap11getLocationERKNS_10IdentifierERb -
trunk/JavaScriptCore/kjs/JSFunction.cpp
r34754 r34791 164 164 165 165 if (static_cast<size_t>(index) >= body->parameters().size()) 166 return JSGlobalData::threadInstance().propertyNames->nullIdentifier;166 return _scope.globalObject()->globalData()->propertyNames->nullIdentifier; 167 167 168 168 const Identifier& name = parameters[index]; … … 172 172 for (size_t i = index + 1; i < size; ++i) 173 173 if (parameters[i] == name) 174 return JSGlobalData::threadInstance().propertyNames->nullIdentifier;174 return _scope.globalObject()->globalData()->propertyNames->nullIdentifier; 175 175 176 176 return name; … … 252 252 } 253 253 254 void IndexToNameMap::unMap( const Identifier& index)254 void IndexToNameMap::unMap(ExecState* exec, const Identifier& index) 255 255 { 256 256 bool indexIsNumber; … … 259 259 ASSERT(indexIsNumber && indexAsNumber < size); 260 260 261 _map[indexAsNumber] = JSGlobalData::threadInstance().propertyNames->nullIdentifier;261 _map[indexAsNumber] = exec->propertyNames().nullIdentifier; 262 262 } 263 263 … … 328 328 { 329 329 if (indexToNameMap.isMapped(propertyName)) { 330 indexToNameMap.unMap( propertyName);330 indexToNameMap.unMap(exec, propertyName); 331 331 return true; 332 332 } else { -
trunk/JavaScriptCore/kjs/JSFunction.h
r34754 r34791 98 98 Identifier& operator[](const Identifier& index); 99 99 bool isMapped(const Identifier& index) const; 100 void unMap( const Identifier& index);100 void unMap(ExecState* exec, const Identifier& index); 101 101 102 102 private: -
trunk/JavaScriptCore/kjs/JSGlobalData.cpp
r34684 r34791 78 78 , identifierTable(createIdentifierTable()) 79 79 , propertyNames(new CommonIdentifiers(this)) 80 , newTrackedObjects(0) 81 , trackedObjectExtraRefCounts(0) 80 82 , lexer(new Lexer(this)) 81 83 , parser(new Parser) -
trunk/JavaScriptCore/kjs/JSGlobalData.h
r34684 r34791 73 73 const ArgList emptyList; // Lists are supposed to be allocated on the stack to have their elements properly marked, which is not the case here - but this list has nothing to mark. 74 74 75 HashSet<ParserRefCounted*> newTrackedObjects; 76 HashCountedSet<ParserRefCounted*> trackedObjectExtraRefCounts; 75 // Tracked object sets are transient, only needed when parsing. 76 HashSet<ParserRefCounted*>* newTrackedObjects; 77 HashCountedSet<ParserRefCounted*>* trackedObjectExtraRefCounts; 77 78 78 79 Lexer* lexer; -
trunk/JavaScriptCore/kjs/Parser.cpp
r34673 r34791 74 74 lexer.clear(); 75 75 76 ParserRefCounted::deleteNewObjects( );76 ParserRefCounted::deleteNewObjects(&exec->globalData()); 77 77 78 78 if (parseError || lexError) { -
trunk/JavaScriptCore/kjs/Parser.h
r34412 r34791 40 40 41 41 template <typename T> struct ParserRefCountedData : ParserRefCounted { 42 ParserRefCountedData(JSGlobalData* globalData) 43 : ParserRefCounted(globalData) 44 { 45 } 46 42 47 T data; 43 48 }; … … 84 89 return 0; 85 90 } 86 RefPtr<ParsedNode> node = ParsedNode::create(m_sourceElements.release().get(), 91 RefPtr<ParsedNode> node = ParsedNode::create(&exec->globalData(), 92 m_sourceElements.release().get(), 87 93 m_varDeclarations ? &m_varDeclarations->data : 0, 88 94 m_funcDeclarations ? &m_funcDeclarations->data : 0, -
trunk/JavaScriptCore/kjs/grammar.y
r34615 r34791 63 63 using namespace std; 64 64 65 static ExpressionNode* makeAssignNode( ExpressionNode* loc, Operator, ExpressionNode* expr, bool locHasAssignments, bool exprHasAssignments);66 static ExpressionNode* makePrefixNode( ExpressionNode* expr, Operator);67 static ExpressionNode* makePostfixNode( ExpressionNode* expr, Operator);65 static ExpressionNode* makeAssignNode(void*, ExpressionNode* loc, Operator, ExpressionNode* expr, bool locHasAssignments, bool exprHasAssignments); 66 static ExpressionNode* makePrefixNode(void*, ExpressionNode* expr, Operator); 67 static ExpressionNode* makePostfixNode(void*, ExpressionNode* expr, Operator); 68 68 static PropertyNode* makeGetterOrSetterPropertyNode(void*, const Identifier &getOrSet, const Identifier& name, ParameterNode*, FunctionBodyNode*, const SourceRange&); 69 69 static ExpressionNodeInfo makeFunctionCallNode(void*, ExpressionNodeInfo func, ArgumentsNodeInfo); 70 static ExpressionNode* makeTypeOfNode( ExpressionNode*);71 static ExpressionNode* makeDeleteNode( ExpressionNode*);72 static ExpressionNode* makeNegateNode( ExpressionNode*);73 static NumberNode* makeNumberNode( double);74 static StatementNode* makeVarStatementNode( ExpressionNode*);75 static ExpressionNode* combineVarInitializers( ExpressionNode* list, AssignResolveNode* init);70 static ExpressionNode* makeTypeOfNode(void*, ExpressionNode*); 71 static ExpressionNode* makeDeleteNode(void*, ExpressionNode*); 72 static ExpressionNode* makeNegateNode(void*, ExpressionNode*); 73 static NumberNode* makeNumberNode(void*, double); 74 static StatementNode* makeVarStatementNode(void*, ExpressionNode*); 75 static ExpressionNode* combineVarInitializers(void*, ExpressionNode* list, AssignResolveNode* init); 76 76 77 77 … … 128 128 } 129 129 130 static void appendToVarDeclarationList( ParserRefCountedData<DeclarationStacks::VarStack>*& varDecls, const Identifier& ident, unsigned attrs)130 static void appendToVarDeclarationList(void* globalPtr, ParserRefCountedData<DeclarationStacks::VarStack>*& varDecls, const Identifier& ident, unsigned attrs) 131 131 { 132 132 if (!varDecls) 133 varDecls = new ParserRefCountedData<DeclarationStacks::VarStack> ;133 varDecls = new ParserRefCountedData<DeclarationStacks::VarStack>(GLOBAL_DATA); 134 134 135 135 varDecls->data.append(make_pair(ident, attrs)); … … 137 137 } 138 138 139 static inline void appendToVarDeclarationList( ParserRefCountedData<DeclarationStacks::VarStack>*& varDecls, ConstDeclNode* decl)139 static inline void appendToVarDeclarationList(void* globalPtr, ParserRefCountedData<DeclarationStacks::VarStack>*& varDecls, ConstDeclNode* decl) 140 140 { 141 141 unsigned attrs = DeclarationStacks::IsConstant; 142 142 if (decl->m_init) 143 143 attrs |= DeclarationStacks::HasInitializer; 144 appendToVarDeclarationList( varDecls, decl->m_ident, attrs);144 appendToVarDeclarationList(globalPtr, varDecls, decl->m_ident, attrs); 145 145 } 146 146 … … 279 279 280 280 Literal: 281 NULLTOKEN { $$ = createNodeFeatureInfo<ExpressionNode*>(new NullNode , 0); }282 | TRUETOKEN { $$ = createNodeFeatureInfo<ExpressionNode*>(new BooleanNode( true), 0); }283 | FALSETOKEN { $$ = createNodeFeatureInfo<ExpressionNode*>(new BooleanNode( false), 0); }284 | NUMBER { $$ = createNodeFeatureInfo<ExpressionNode*>(makeNumberNode( $1), 0); }285 | STRING { $$ = createNodeFeatureInfo<ExpressionNode*>(new StringNode( $1), 0); }281 NULLTOKEN { $$ = createNodeFeatureInfo<ExpressionNode*>(new NullNode(GLOBAL_DATA), 0); } 282 | TRUETOKEN { $$ = createNodeFeatureInfo<ExpressionNode*>(new BooleanNode(GLOBAL_DATA, true), 0); } 283 | FALSETOKEN { $$ = createNodeFeatureInfo<ExpressionNode*>(new BooleanNode(GLOBAL_DATA, false), 0); } 284 | NUMBER { $$ = createNodeFeatureInfo<ExpressionNode*>(makeNumberNode(GLOBAL_DATA, $1), 0); } 285 | STRING { $$ = createNodeFeatureInfo<ExpressionNode*>(new StringNode(GLOBAL_DATA, $1), 0); } 286 286 | '/' /* regexp */ { 287 287 Lexer& l = *LEXER; 288 288 if (!l.scanRegExp()) 289 289 YYABORT; 290 $$ = createNodeFeatureInfo<ExpressionNode*>(new RegExpNode( l.pattern(), l.flags()), 0);290 $$ = createNodeFeatureInfo<ExpressionNode*>(new RegExpNode(GLOBAL_DATA, l.pattern(), l.flags()), 0); 291 291 } 292 292 | DIVEQUAL /* regexp with /= */ { … … 294 294 if (!l.scanRegExp()) 295 295 YYABORT; 296 $$ = createNodeFeatureInfo<ExpressionNode*>(new RegExpNode( "=" + l.pattern(), l.flags()), 0);296 $$ = createNodeFeatureInfo<ExpressionNode*>(new RegExpNode(GLOBAL_DATA, "=" + l.pattern(), l.flags()), 0); 297 297 } 298 298 ; 299 299 300 300 Property: 301 IDENT ':' AssignmentExpr { $$ = createNodeFeatureInfo<PropertyNode*>(new PropertyNode( *$1, $3.m_node, PropertyNode::Constant), $3.m_featureInfo); }302 | STRING ':' AssignmentExpr { $$ = createNodeFeatureInfo<PropertyNode*>(new PropertyNode( Identifier(GLOBAL_DATA, *$1), $3.m_node, PropertyNode::Constant), $3.m_featureInfo); }303 | NUMBER ':' AssignmentExpr { $$ = createNodeFeatureInfo<PropertyNode*>(new PropertyNode( Identifier(GLOBAL_DATA, UString::from($1)), $3.m_node, PropertyNode::Constant), $3.m_featureInfo); }301 IDENT ':' AssignmentExpr { $$ = createNodeFeatureInfo<PropertyNode*>(new PropertyNode(GLOBAL_DATA, *$1, $3.m_node, PropertyNode::Constant), $3.m_featureInfo); } 302 | STRING ':' AssignmentExpr { $$ = createNodeFeatureInfo<PropertyNode*>(new PropertyNode(GLOBAL_DATA, Identifier(GLOBAL_DATA, *$1), $3.m_node, PropertyNode::Constant), $3.m_featureInfo); } 303 | NUMBER ':' AssignmentExpr { $$ = createNodeFeatureInfo<PropertyNode*>(new PropertyNode(GLOBAL_DATA, Identifier(GLOBAL_DATA, UString::from($1)), $3.m_node, PropertyNode::Constant), $3.m_featureInfo); } 304 304 | IDENT IDENT '(' ')' OPENBRACE FunctionBody CLOSEBRACE { $$ = createNodeFeatureInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(globalPtr, *$1, *$2, 0, $6, LEXER->sourceRange($5, $7)), ClosureFeature); DBG($6, @5, @7); if (!$$.m_node) YYABORT; } 305 305 | IDENT IDENT '(' FormalParameterList ')' OPENBRACE FunctionBody CLOSEBRACE … … 308 308 309 309 PropertyList: 310 Property { $$.m_node.head = new PropertyListNode( $1.m_node);310 Property { $$.m_node.head = new PropertyListNode(GLOBAL_DATA, $1.m_node); 311 311 $$.m_node.tail = $$.m_node.head; 312 312 $$.m_featureInfo = $1.m_featureInfo; } 313 313 | PropertyList ',' Property { $$.m_node.head = $1.m_node.head; 314 $$.m_node.tail = new PropertyListNode( $3.m_node, $1.m_node.tail);314 $$.m_node.tail = new PropertyListNode(GLOBAL_DATA, $3.m_node, $1.m_node.tail); 315 315 $$.m_featureInfo = $1.m_featureInfo | $3.m_featureInfo; } 316 316 ; … … 318 318 PrimaryExpr: 319 319 PrimaryExprNoBrace 320 | OPENBRACE CLOSEBRACE { $$ = createNodeFeatureInfo<ExpressionNode*>(new ObjectLiteralNode( ), 0); }321 | OPENBRACE PropertyList CLOSEBRACE { $$ = createNodeFeatureInfo<ExpressionNode*>(new ObjectLiteralNode( $2.m_node.head), $2.m_featureInfo); }320 | OPENBRACE CLOSEBRACE { $$ = createNodeFeatureInfo<ExpressionNode*>(new ObjectLiteralNode(GLOBAL_DATA), 0); } 321 | OPENBRACE PropertyList CLOSEBRACE { $$ = createNodeFeatureInfo<ExpressionNode*>(new ObjectLiteralNode(GLOBAL_DATA, $2.m_node.head), $2.m_featureInfo); } 322 322 /* allow extra comma, see http://bugs.webkit.org/show_bug.cgi?id=5939 */ 323 | OPENBRACE PropertyList ',' CLOSEBRACE { $$ = createNodeFeatureInfo<ExpressionNode*>(new ObjectLiteralNode( $2.m_node.head), $2.m_featureInfo); }323 | OPENBRACE PropertyList ',' CLOSEBRACE { $$ = createNodeFeatureInfo<ExpressionNode*>(new ObjectLiteralNode(GLOBAL_DATA, $2.m_node.head), $2.m_featureInfo); } 324 324 ; 325 325 326 326 PrimaryExprNoBrace: 327 THISTOKEN { $$ = createNodeFeatureInfo<ExpressionNode*>(new ThisNode( ), 0); }327 THISTOKEN { $$ = createNodeFeatureInfo<ExpressionNode*>(new ThisNode(GLOBAL_DATA), 0); } 328 328 | Literal 329 329 | ArrayLiteral 330 | IDENT { $$ = createNodeFeatureInfo<ExpressionNode*>(new ResolveNode( *$1), 0); }330 | IDENT { $$ = createNodeFeatureInfo<ExpressionNode*>(new ResolveNode(GLOBAL_DATA, *$1), 0); } 331 331 | '(' Expr ')' { $$ = $2; } 332 332 ; 333 333 334 334 ArrayLiteral: 335 '[' ElisionOpt ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new ArrayNode( $2), 0); }336 | '[' ElementList ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new ArrayNode( $2.m_node.head), $2.m_featureInfo); }337 | '[' ElementList ',' ElisionOpt ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new ArrayNode( $4, $2.m_node.head), $2.m_featureInfo); }335 '[' ElisionOpt ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new ArrayNode(GLOBAL_DATA, $2), 0); } 336 | '[' ElementList ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new ArrayNode(GLOBAL_DATA, $2.m_node.head), $2.m_featureInfo); } 337 | '[' ElementList ',' ElisionOpt ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new ArrayNode(GLOBAL_DATA, $4, $2.m_node.head), $2.m_featureInfo); } 338 338 ; 339 339 340 340 ElementList: 341 ElisionOpt AssignmentExpr { $$.m_node.head = new ElementNode( $1, $2.m_node);341 ElisionOpt AssignmentExpr { $$.m_node.head = new ElementNode(GLOBAL_DATA, $1, $2.m_node); 342 342 $$.m_node.tail = $$.m_node.head; 343 343 $$.m_featureInfo = $2.m_featureInfo; } 344 344 | ElementList ',' ElisionOpt AssignmentExpr 345 345 { $$.m_node.head = $1.m_node.head; 346 $$.m_node.tail = new ElementNode( $1.m_node.tail, $3, $4.m_node);346 $$.m_node.tail = new ElementNode(GLOBAL_DATA, $1.m_node.tail, $3, $4.m_node); 347 347 $$.m_featureInfo = $1.m_featureInfo | $4.m_featureInfo; } 348 348 ; … … 361 361 PrimaryExpr 362 362 | FunctionExpr { $$ = createNodeFeatureInfo<ExpressionNode*>($1.m_node, $1.m_featureInfo); } 363 | MemberExpr '[' Expr ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new BracketAccessorNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }364 | MemberExpr '.' IDENT { $$ = createNodeFeatureInfo<ExpressionNode*>(new DotAccessorNode( $1.m_node, *$3), $1.m_featureInfo); }365 | NEW MemberExpr Arguments { $$ = createNodeFeatureInfo<ExpressionNode*>(new NewExprNode( $2.m_node, $3.m_node), $2.m_featureInfo | $3.m_featureInfo); }363 | MemberExpr '[' Expr ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new BracketAccessorNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 364 | MemberExpr '.' IDENT { $$ = createNodeFeatureInfo<ExpressionNode*>(new DotAccessorNode(GLOBAL_DATA, $1.m_node, *$3), $1.m_featureInfo); } 365 | NEW MemberExpr Arguments { $$ = createNodeFeatureInfo<ExpressionNode*>(new NewExprNode(GLOBAL_DATA, $2.m_node, $3.m_node), $2.m_featureInfo | $3.m_featureInfo); } 366 366 ; 367 367 368 368 MemberExprNoBF: 369 369 PrimaryExprNoBrace 370 | MemberExprNoBF '[' Expr ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new BracketAccessorNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }371 | MemberExprNoBF '.' IDENT { $$ = createNodeFeatureInfo<ExpressionNode*>(new DotAccessorNode( $1.m_node, *$3), $1.m_featureInfo); }372 | NEW MemberExpr Arguments { $$ = createNodeFeatureInfo<ExpressionNode*>(new NewExprNode( $2.m_node, $3.m_node), $2.m_featureInfo | $3.m_featureInfo); }370 | MemberExprNoBF '[' Expr ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new BracketAccessorNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 371 | MemberExprNoBF '.' IDENT { $$ = createNodeFeatureInfo<ExpressionNode*>(new DotAccessorNode(GLOBAL_DATA, $1.m_node, *$3), $1.m_featureInfo); } 372 | NEW MemberExpr Arguments { $$ = createNodeFeatureInfo<ExpressionNode*>(new NewExprNode(GLOBAL_DATA, $2.m_node, $3.m_node), $2.m_featureInfo | $3.m_featureInfo); } 373 373 ; 374 374 375 375 NewExpr: 376 376 MemberExpr 377 | NEW NewExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new NewExprNode( $2.m_node), $2.m_featureInfo); }377 | NEW NewExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new NewExprNode(GLOBAL_DATA, $2.m_node), $2.m_featureInfo); } 378 378 ; 379 379 380 380 NewExprNoBF: 381 381 MemberExprNoBF 382 | NEW NewExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new NewExprNode( $2.m_node), $2.m_featureInfo); }382 | NEW NewExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new NewExprNode(GLOBAL_DATA, $2.m_node), $2.m_featureInfo); } 383 383 ; 384 384 … … 386 386 MemberExpr Arguments { $$ = makeFunctionCallNode(globalPtr, $1, $2); } 387 387 | CallExpr Arguments { $$ = makeFunctionCallNode(globalPtr, $1, $2); } 388 | CallExpr '[' Expr ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new BracketAccessorNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }389 | CallExpr '.' IDENT { $$ = createNodeFeatureInfo<ExpressionNode*>(new DotAccessorNode( $1.m_node, *$3), $1.m_featureInfo); }388 | CallExpr '[' Expr ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new BracketAccessorNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 389 | CallExpr '.' IDENT { $$ = createNodeFeatureInfo<ExpressionNode*>(new DotAccessorNode(GLOBAL_DATA, $1.m_node, *$3), $1.m_featureInfo); } 390 390 ; 391 391 … … 393 393 MemberExprNoBF Arguments { $$ = makeFunctionCallNode(globalPtr, $1, $2); } 394 394 | CallExprNoBF Arguments { $$ = makeFunctionCallNode(globalPtr, $1, $2); } 395 | CallExprNoBF '[' Expr ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new BracketAccessorNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }396 | CallExprNoBF '.' IDENT { $$ = createNodeFeatureInfo<ExpressionNode*>(new DotAccessorNode( $1.m_node, *$3), $1.m_featureInfo); }395 | CallExprNoBF '[' Expr ']' { $$ = createNodeFeatureInfo<ExpressionNode*>(new BracketAccessorNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 396 | CallExprNoBF '.' IDENT { $$ = createNodeFeatureInfo<ExpressionNode*>(new DotAccessorNode(GLOBAL_DATA, $1.m_node, *$3), $1.m_featureInfo); } 397 397 ; 398 398 399 399 Arguments: 400 '(' ')' { $$ = createNodeFeatureInfo<ArgumentsNode*>(new ArgumentsNode( ), 0); }401 | '(' ArgumentList ')' { $$ = createNodeFeatureInfo<ArgumentsNode*>(new ArgumentsNode( $2.m_node.head), $2.m_featureInfo); }400 '(' ')' { $$ = createNodeFeatureInfo<ArgumentsNode*>(new ArgumentsNode(GLOBAL_DATA), 0); } 401 | '(' ArgumentList ')' { $$ = createNodeFeatureInfo<ArgumentsNode*>(new ArgumentsNode(GLOBAL_DATA, $2.m_node.head), $2.m_featureInfo); } 402 402 ; 403 403 404 404 ArgumentList: 405 AssignmentExpr { $$.m_node.head = new ArgumentListNode( $1.m_node);405 AssignmentExpr { $$.m_node.head = new ArgumentListNode(GLOBAL_DATA, $1.m_node); 406 406 $$.m_node.tail = $$.m_node.head; 407 407 $$.m_featureInfo = $1.m_featureInfo; } 408 408 | ArgumentList ',' AssignmentExpr { $$.m_node.head = $1.m_node.head; 409 $$.m_node.tail = new ArgumentListNode( $1.m_node.tail, $3.m_node);409 $$.m_node.tail = new ArgumentListNode(GLOBAL_DATA, $1.m_node.tail, $3.m_node); 410 410 $$.m_featureInfo = $1.m_featureInfo | $3.m_featureInfo; } 411 411 ; … … 423 423 PostfixExpr: 424 424 LeftHandSideExpr 425 | LeftHandSideExpr PLUSPLUS { $$ = createNodeFeatureInfo<ExpressionNode*>(makePostfixNode( $1.m_node, OpPlusPlus), $1.m_featureInfo | AssignFeature); }426 | LeftHandSideExpr MINUSMINUS { $$ = createNodeFeatureInfo<ExpressionNode*>(makePostfixNode( $1.m_node, OpMinusMinus), $1.m_featureInfo | AssignFeature); }425 | LeftHandSideExpr PLUSPLUS { $$ = createNodeFeatureInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, $1.m_node, OpPlusPlus), $1.m_featureInfo | AssignFeature); } 426 | LeftHandSideExpr MINUSMINUS { $$ = createNodeFeatureInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, $1.m_node, OpMinusMinus), $1.m_featureInfo | AssignFeature); } 427 427 ; 428 428 429 429 PostfixExprNoBF: 430 430 LeftHandSideExprNoBF 431 | LeftHandSideExprNoBF PLUSPLUS { $$ = createNodeFeatureInfo<ExpressionNode*>(makePostfixNode( $1.m_node, OpPlusPlus), $1.m_featureInfo | AssignFeature); }432 | LeftHandSideExprNoBF MINUSMINUS { $$ = createNodeFeatureInfo<ExpressionNode*>(makePostfixNode( $1.m_node, OpMinusMinus), $1.m_featureInfo | AssignFeature); }431 | LeftHandSideExprNoBF PLUSPLUS { $$ = createNodeFeatureInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, $1.m_node, OpPlusPlus), $1.m_featureInfo | AssignFeature); } 432 | LeftHandSideExprNoBF MINUSMINUS { $$ = createNodeFeatureInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, $1.m_node, OpMinusMinus), $1.m_featureInfo | AssignFeature); } 433 433 ; 434 434 435 435 UnaryExprCommon: 436 DELETETOKEN UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makeDeleteNode( $2.m_node), $2.m_featureInfo); }437 | VOIDTOKEN UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new VoidNode( $2.m_node), $2.m_featureInfo); }438 | TYPEOF UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makeTypeOfNode( $2.m_node), $2.m_featureInfo); }439 | PLUSPLUS UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makePrefixNode( $2.m_node, OpPlusPlus), $2.m_featureInfo | AssignFeature); }440 | AUTOPLUSPLUS UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makePrefixNode( $2.m_node, OpPlusPlus), $2.m_featureInfo | AssignFeature); }441 | MINUSMINUS UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makePrefixNode( $2.m_node, OpMinusMinus), $2.m_featureInfo | AssignFeature); }442 | AUTOMINUSMINUS UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makePrefixNode( $2.m_node, OpMinusMinus), $2.m_featureInfo | AssignFeature); }443 | '+' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new UnaryPlusNode( $2.m_node), $2.m_featureInfo); }444 | '-' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makeNegateNode( $2.m_node), $2.m_featureInfo); }445 | '~' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitwiseNotNode( $2.m_node), $2.m_featureInfo); }446 | '!' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalNotNode( $2.m_node), $2.m_featureInfo); }436 DELETETOKEN UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makeDeleteNode(GLOBAL_DATA, $2.m_node), $2.m_featureInfo); } 437 | VOIDTOKEN UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new VoidNode(GLOBAL_DATA, $2.m_node), $2.m_featureInfo); } 438 | TYPEOF UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makeTypeOfNode(GLOBAL_DATA, $2.m_node), $2.m_featureInfo); } 439 | PLUSPLUS UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, $2.m_node, OpPlusPlus), $2.m_featureInfo | AssignFeature); } 440 | AUTOPLUSPLUS UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, $2.m_node, OpPlusPlus), $2.m_featureInfo | AssignFeature); } 441 | MINUSMINUS UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, $2.m_node, OpMinusMinus), $2.m_featureInfo | AssignFeature); } 442 | AUTOMINUSMINUS UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, $2.m_node, OpMinusMinus), $2.m_featureInfo | AssignFeature); } 443 | '+' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new UnaryPlusNode(GLOBAL_DATA, $2.m_node), $2.m_featureInfo); } 444 | '-' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(makeNegateNode(GLOBAL_DATA, $2.m_node), $2.m_featureInfo); } 445 | '~' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitwiseNotNode(GLOBAL_DATA, $2.m_node), $2.m_featureInfo); } 446 | '!' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalNotNode(GLOBAL_DATA, $2.m_node), $2.m_featureInfo); } 447 447 448 448 UnaryExpr: … … 458 458 MultiplicativeExpr: 459 459 UnaryExpr 460 | MultiplicativeExpr '*' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new MultNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }461 | MultiplicativeExpr '/' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new DivNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }462 | MultiplicativeExpr '%' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new ModNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }460 | MultiplicativeExpr '*' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new MultNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 461 | MultiplicativeExpr '/' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new DivNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 462 | MultiplicativeExpr '%' UnaryExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new ModNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 463 463 ; 464 464 … … 466 466 UnaryExprNoBF 467 467 | MultiplicativeExprNoBF '*' UnaryExpr 468 { $$ = createNodeFeatureInfo<ExpressionNode*>(new MultNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }468 { $$ = createNodeFeatureInfo<ExpressionNode*>(new MultNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 469 469 | MultiplicativeExprNoBF '/' UnaryExpr 470 { $$ = createNodeFeatureInfo<ExpressionNode*>(new DivNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }470 { $$ = createNodeFeatureInfo<ExpressionNode*>(new DivNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 471 471 | MultiplicativeExprNoBF '%' UnaryExpr 472 { $$ = createNodeFeatureInfo<ExpressionNode*>(new ModNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }472 { $$ = createNodeFeatureInfo<ExpressionNode*>(new ModNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 473 473 ; 474 474 475 475 AdditiveExpr: 476 476 MultiplicativeExpr 477 | AdditiveExpr '+' MultiplicativeExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new AddNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }478 | AdditiveExpr '-' MultiplicativeExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new SubNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }477 | AdditiveExpr '+' MultiplicativeExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new AddNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 478 | AdditiveExpr '-' MultiplicativeExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new SubNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 479 479 ; 480 480 … … 482 482 MultiplicativeExprNoBF 483 483 | AdditiveExprNoBF '+' MultiplicativeExpr 484 { $$ = createNodeFeatureInfo<ExpressionNode*>(new AddNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }484 { $$ = createNodeFeatureInfo<ExpressionNode*>(new AddNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 485 485 | AdditiveExprNoBF '-' MultiplicativeExpr 486 { $$ = createNodeFeatureInfo<ExpressionNode*>(new SubNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }486 { $$ = createNodeFeatureInfo<ExpressionNode*>(new SubNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 487 487 ; 488 488 489 489 ShiftExpr: 490 490 AdditiveExpr 491 | ShiftExpr LSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LeftShiftNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }492 | ShiftExpr RSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new RightShiftNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }493 | ShiftExpr URSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new UnsignedRightShiftNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }491 | ShiftExpr LSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LeftShiftNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 492 | ShiftExpr RSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new RightShiftNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 493 | ShiftExpr URSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new UnsignedRightShiftNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 494 494 ; 495 495 496 496 ShiftExprNoBF: 497 497 AdditiveExprNoBF 498 | ShiftExprNoBF LSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LeftShiftNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }499 | ShiftExprNoBF RSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new RightShiftNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }500 | ShiftExprNoBF URSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new UnsignedRightShiftNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }498 | ShiftExprNoBF LSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LeftShiftNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 499 | ShiftExprNoBF RSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new RightShiftNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 500 | ShiftExprNoBF URSHIFT AdditiveExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new UnsignedRightShiftNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 501 501 ; 502 502 503 503 RelationalExpr: 504 504 ShiftExpr 505 | RelationalExpr '<' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }506 | RelationalExpr '>' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }507 | RelationalExpr LE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessEqNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }508 | RelationalExpr GE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterEqNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }509 | RelationalExpr INSTANCEOF ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new InstanceOfNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }510 | RelationalExpr INTOKEN ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new InNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }505 | RelationalExpr '<' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 506 | RelationalExpr '>' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 507 | RelationalExpr LE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessEqNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 508 | RelationalExpr GE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterEqNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 509 | RelationalExpr INSTANCEOF ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new InstanceOfNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 510 | RelationalExpr INTOKEN ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new InNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 511 511 ; 512 512 513 513 RelationalExprNoIn: 514 514 ShiftExpr 515 | RelationalExprNoIn '<' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }516 | RelationalExprNoIn '>' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }517 | RelationalExprNoIn LE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessEqNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }518 | RelationalExprNoIn GE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterEqNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }515 | RelationalExprNoIn '<' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 516 | RelationalExprNoIn '>' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 517 | RelationalExprNoIn LE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessEqNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 518 | RelationalExprNoIn GE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterEqNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 519 519 | RelationalExprNoIn INSTANCEOF ShiftExpr 520 { $$ = createNodeFeatureInfo<ExpressionNode*>(new InstanceOfNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }520 { $$ = createNodeFeatureInfo<ExpressionNode*>(new InstanceOfNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 521 521 ; 522 522 523 523 RelationalExprNoBF: 524 524 ShiftExprNoBF 525 | RelationalExprNoBF '<' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }526 | RelationalExprNoBF '>' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }527 | RelationalExprNoBF LE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessEqNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }528 | RelationalExprNoBF GE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterEqNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }525 | RelationalExprNoBF '<' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 526 | RelationalExprNoBF '>' ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 527 | RelationalExprNoBF LE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LessEqNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 528 | RelationalExprNoBF GE ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new GreaterEqNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 529 529 | RelationalExprNoBF INSTANCEOF ShiftExpr 530 { $$ = createNodeFeatureInfo<ExpressionNode*>(new InstanceOfNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }531 | RelationalExprNoBF INTOKEN ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new InNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }530 { $$ = createNodeFeatureInfo<ExpressionNode*>(new InstanceOfNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 531 | RelationalExprNoBF INTOKEN ShiftExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new InNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 532 532 ; 533 533 534 534 EqualityExpr: 535 535 RelationalExpr 536 | EqualityExpr EQEQ RelationalExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new EqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }537 | EqualityExpr NE RelationalExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotEqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }538 | EqualityExpr STREQ RelationalExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new StrictEqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }539 | EqualityExpr STRNEQ RelationalExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotStrictEqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }536 | EqualityExpr EQEQ RelationalExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new EqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 537 | EqualityExpr NE RelationalExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotEqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 538 | EqualityExpr STREQ RelationalExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new StrictEqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 539 | EqualityExpr STRNEQ RelationalExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotStrictEqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 540 540 ; 541 541 … … 543 543 RelationalExprNoIn 544 544 | EqualityExprNoIn EQEQ RelationalExprNoIn 545 { $$ = createNodeFeatureInfo<ExpressionNode*>(new EqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }545 { $$ = createNodeFeatureInfo<ExpressionNode*>(new EqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 546 546 | EqualityExprNoIn NE RelationalExprNoIn 547 { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotEqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }547 { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotEqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 548 548 | EqualityExprNoIn STREQ RelationalExprNoIn 549 { $$ = createNodeFeatureInfo<ExpressionNode*>(new StrictEqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }549 { $$ = createNodeFeatureInfo<ExpressionNode*>(new StrictEqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 550 550 | EqualityExprNoIn STRNEQ RelationalExprNoIn 551 { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotStrictEqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }551 { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotStrictEqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 552 552 ; 553 553 … … 555 555 RelationalExprNoBF 556 556 | EqualityExprNoBF EQEQ RelationalExpr 557 { $$ = createNodeFeatureInfo<ExpressionNode*>(new EqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }558 | EqualityExprNoBF NE RelationalExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotEqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }557 { $$ = createNodeFeatureInfo<ExpressionNode*>(new EqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 558 | EqualityExprNoBF NE RelationalExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotEqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 559 559 | EqualityExprNoBF STREQ RelationalExpr 560 { $$ = createNodeFeatureInfo<ExpressionNode*>(new StrictEqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }560 { $$ = createNodeFeatureInfo<ExpressionNode*>(new StrictEqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 561 561 | EqualityExprNoBF STRNEQ RelationalExpr 562 { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotStrictEqualNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }562 { $$ = createNodeFeatureInfo<ExpressionNode*>(new NotStrictEqualNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 563 563 ; 564 564 565 565 BitwiseANDExpr: 566 566 EqualityExpr 567 | BitwiseANDExpr '&' EqualityExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitAndNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }567 | BitwiseANDExpr '&' EqualityExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitAndNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 568 568 ; 569 569 … … 571 571 EqualityExprNoIn 572 572 | BitwiseANDExprNoIn '&' EqualityExprNoIn 573 { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitAndNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }573 { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitAndNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 574 574 ; 575 575 576 576 BitwiseANDExprNoBF: 577 577 EqualityExprNoBF 578 | BitwiseANDExprNoBF '&' EqualityExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitAndNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }578 | BitwiseANDExprNoBF '&' EqualityExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitAndNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 579 579 ; 580 580 581 581 BitwiseXORExpr: 582 582 BitwiseANDExpr 583 | BitwiseXORExpr '^' BitwiseANDExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitXOrNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }583 | BitwiseXORExpr '^' BitwiseANDExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitXOrNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 584 584 ; 585 585 … … 587 587 BitwiseANDExprNoIn 588 588 | BitwiseXORExprNoIn '^' BitwiseANDExprNoIn 589 { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitXOrNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }589 { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitXOrNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 590 590 ; 591 591 … … 593 593 BitwiseANDExprNoBF 594 594 | BitwiseXORExprNoBF '^' BitwiseANDExpr 595 { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitXOrNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }595 { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitXOrNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 596 596 ; 597 597 598 598 BitwiseORExpr: 599 599 BitwiseXORExpr 600 | BitwiseORExpr '|' BitwiseXORExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitOrNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }600 | BitwiseORExpr '|' BitwiseXORExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitOrNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 601 601 ; 602 602 … … 604 604 BitwiseXORExprNoIn 605 605 | BitwiseORExprNoIn '|' BitwiseXORExprNoIn 606 { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitOrNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }606 { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitOrNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 607 607 ; 608 608 … … 610 610 BitwiseXORExprNoBF 611 611 | BitwiseORExprNoBF '|' BitwiseXORExpr 612 { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitOrNode( $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); }612 { $$ = createNodeFeatureInfo<ExpressionNode*>(new BitOrNode(GLOBAL_DATA, $1.m_node, $3.m_node, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo); } 613 613 ; 614 614 615 615 LogicalANDExpr: 616 616 BitwiseORExpr 617 | LogicalANDExpr AND BitwiseORExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalAndNode( $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); }617 | LogicalANDExpr AND BitwiseORExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalAndNode(GLOBAL_DATA, $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); } 618 618 ; 619 619 … … 621 621 BitwiseORExprNoIn 622 622 | LogicalANDExprNoIn AND BitwiseORExprNoIn 623 { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalAndNode( $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); }623 { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalAndNode(GLOBAL_DATA, $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); } 624 624 ; 625 625 … … 627 627 BitwiseORExprNoBF 628 628 | LogicalANDExprNoBF AND BitwiseORExpr 629 { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalAndNode( $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); }629 { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalAndNode(GLOBAL_DATA, $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); } 630 630 ; 631 631 632 632 LogicalORExpr: 633 633 LogicalANDExpr 634 | LogicalORExpr OR LogicalANDExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalOrNode( $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); }634 | LogicalORExpr OR LogicalANDExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalOrNode(GLOBAL_DATA, $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); } 635 635 ; 636 636 … … 638 638 LogicalANDExprNoIn 639 639 | LogicalORExprNoIn OR LogicalANDExprNoIn 640 { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalOrNode( $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); }640 { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalOrNode(GLOBAL_DATA, $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); } 641 641 ; 642 642 643 643 LogicalORExprNoBF: 644 644 LogicalANDExprNoBF 645 | LogicalORExprNoBF OR LogicalANDExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalOrNode( $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); }645 | LogicalORExprNoBF OR LogicalANDExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new LogicalOrNode(GLOBAL_DATA, $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); } 646 646 ; 647 647 … … 649 649 LogicalORExpr 650 650 | LogicalORExpr '?' AssignmentExpr ':' AssignmentExpr 651 { $$ = createNodeFeatureInfo<ExpressionNode*>(new ConditionalNode( $1.m_node, $3.m_node, $5.m_node), $1.m_featureInfo | $3.m_featureInfo | $5.m_featureInfo); }651 { $$ = createNodeFeatureInfo<ExpressionNode*>(new ConditionalNode(GLOBAL_DATA, $1.m_node, $3.m_node, $5.m_node), $1.m_featureInfo | $3.m_featureInfo | $5.m_featureInfo); } 652 652 ; 653 653 … … 655 655 LogicalORExprNoIn 656 656 | LogicalORExprNoIn '?' AssignmentExprNoIn ':' AssignmentExprNoIn 657 { $$ = createNodeFeatureInfo<ExpressionNode*>(new ConditionalNode( $1.m_node, $3.m_node, $5.m_node), $1.m_featureInfo | $3.m_featureInfo | $5.m_featureInfo); }657 { $$ = createNodeFeatureInfo<ExpressionNode*>(new ConditionalNode(GLOBAL_DATA, $1.m_node, $3.m_node, $5.m_node), $1.m_featureInfo | $3.m_featureInfo | $5.m_featureInfo); } 658 658 ; 659 659 … … 661 661 LogicalORExprNoBF 662 662 | LogicalORExprNoBF '?' AssignmentExpr ':' AssignmentExpr 663 { $$ = createNodeFeatureInfo<ExpressionNode*>(new ConditionalNode( $1.m_node, $3.m_node, $5.m_node), $1.m_featureInfo | $3.m_featureInfo | $5.m_featureInfo); }663 { $$ = createNodeFeatureInfo<ExpressionNode*>(new ConditionalNode(GLOBAL_DATA, $1.m_node, $3.m_node, $5.m_node), $1.m_featureInfo | $3.m_featureInfo | $5.m_featureInfo); } 664 664 ; 665 665 … … 667 667 ConditionalExpr 668 668 | LeftHandSideExpr AssignmentOperator AssignmentExpr 669 { $$ = createNodeFeatureInfo<ExpressionNode*>(makeAssignNode( $1.m_node, $2, $3.m_node, $1.m_featureInfo & AssignFeature, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo | AssignFeature); }669 { $$ = createNodeFeatureInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, $1.m_node, $2, $3.m_node, $1.m_featureInfo & AssignFeature, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo | AssignFeature); } 670 670 ; 671 671 … … 673 673 ConditionalExprNoIn 674 674 | LeftHandSideExpr AssignmentOperator AssignmentExprNoIn 675 { $$ = createNodeFeatureInfo<ExpressionNode*>(makeAssignNode( $1.m_node, $2, $3.m_node, $1.m_featureInfo & AssignFeature, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo | AssignFeature); }675 { $$ = createNodeFeatureInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, $1.m_node, $2, $3.m_node, $1.m_featureInfo & AssignFeature, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo | AssignFeature); } 676 676 ; 677 677 … … 679 679 ConditionalExprNoBF 680 680 | LeftHandSideExprNoBF AssignmentOperator AssignmentExpr 681 { $$ = createNodeFeatureInfo<ExpressionNode*>(makeAssignNode( $1.m_node, $2, $3.m_node, $1.m_featureInfo & AssignFeature, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo | AssignFeature); }681 { $$ = createNodeFeatureInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, $1.m_node, $2, $3.m_node, $1.m_featureInfo & AssignFeature, $3.m_featureInfo & AssignFeature), $1.m_featureInfo | $3.m_featureInfo | AssignFeature); } 682 682 ; 683 683 … … 699 699 Expr: 700 700 AssignmentExpr 701 | Expr ',' AssignmentExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new CommaNode( $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); }701 | Expr ',' AssignmentExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new CommaNode(GLOBAL_DATA, $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); } 702 702 ; 703 703 704 704 ExprNoIn: 705 705 AssignmentExprNoIn 706 | ExprNoIn ',' AssignmentExprNoIn { $$ = createNodeFeatureInfo<ExpressionNode*>(new CommaNode( $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); }706 | ExprNoIn ',' AssignmentExprNoIn { $$ = createNodeFeatureInfo<ExpressionNode*>(new CommaNode(GLOBAL_DATA, $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); } 707 707 ; 708 708 709 709 ExprNoBF: 710 710 AssignmentExprNoBF 711 | ExprNoBF ',' AssignmentExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new CommaNode( $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); }711 | ExprNoBF ',' AssignmentExpr { $$ = createNodeFeatureInfo<ExpressionNode*>(new CommaNode(GLOBAL_DATA, $1.m_node, $3.m_node), $1.m_featureInfo | $3.m_featureInfo); } 712 712 ; 713 713 … … 732 732 733 733 Block: 734 OPENBRACE CLOSEBRACE { $$ = createNodeDeclarationInfo<StatementNode*>(new BlockNode( 0), 0, 0, 0);734 OPENBRACE CLOSEBRACE { $$ = createNodeDeclarationInfo<StatementNode*>(new BlockNode(GLOBAL_DATA, 0), 0, 0, 0); 735 735 DBG($$.m_node, @1, @2); } 736 | OPENBRACE SourceElements CLOSEBRACE { $$ = createNodeDeclarationInfo<StatementNode*>(new BlockNode( $2.m_node), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo);736 | OPENBRACE SourceElements CLOSEBRACE { $$ = createNodeDeclarationInfo<StatementNode*>(new BlockNode(GLOBAL_DATA, $2.m_node), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo); 737 737 DBG($$.m_node, @1, @3); } 738 738 ; 739 739 740 740 VariableStatement: 741 VAR VariableDeclarationList ';' { $$ = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode( $2.m_node), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo);741 VAR VariableDeclarationList ';' { $$ = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, $2.m_node), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo); 742 742 DBG($$.m_node, @1, @3); } 743 | VAR VariableDeclarationList error { $$ = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode( $2.m_node), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo);743 | VAR VariableDeclarationList error { $$ = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, $2.m_node), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo); 744 744 DBG($$.m_node, @1, @2); 745 745 AUTO_SEMICOLON; } … … 748 748 VariableDeclarationList: 749 749 IDENT { $$.m_node = 0; 750 $$.m_varDeclarations = new ParserRefCountedData<DeclarationStacks::VarStack> ;751 appendToVarDeclarationList( $$.m_varDeclarations, *$1, 0);750 $$.m_varDeclarations = new ParserRefCountedData<DeclarationStacks::VarStack>(GLOBAL_DATA); 751 appendToVarDeclarationList(GLOBAL_DATA, $$.m_varDeclarations, *$1, 0); 752 752 $$.m_funcDeclarations = 0; 753 753 $$.m_featureInfo = 0; 754 754 } 755 | IDENT Initializer { $$.m_node = new AssignResolveNode( *$1, $2.m_node, $2.m_featureInfo & AssignFeature);756 $$.m_varDeclarations = new ParserRefCountedData<DeclarationStacks::VarStack> ;757 appendToVarDeclarationList( $$.m_varDeclarations, *$1, DeclarationStacks::HasInitializer);755 | IDENT Initializer { $$.m_node = new AssignResolveNode(GLOBAL_DATA, *$1, $2.m_node, $2.m_featureInfo & AssignFeature); 756 $$.m_varDeclarations = new ParserRefCountedData<DeclarationStacks::VarStack>(GLOBAL_DATA); 757 appendToVarDeclarationList(GLOBAL_DATA, $$.m_varDeclarations, *$1, DeclarationStacks::HasInitializer); 758 758 $$.m_funcDeclarations = 0; 759 759 $$.m_featureInfo = $2.m_featureInfo; … … 762 762 { $$.m_node = $1.m_node; 763 763 $$.m_varDeclarations = $1.m_varDeclarations; 764 appendToVarDeclarationList( $$.m_varDeclarations, *$3, 0);764 appendToVarDeclarationList(GLOBAL_DATA, $$.m_varDeclarations, *$3, 0); 765 765 $$.m_funcDeclarations = 0; 766 766 $$.m_featureInfo = $1.m_featureInfo; 767 767 } 768 768 | VariableDeclarationList ',' IDENT Initializer 769 { $$.m_node = combineVarInitializers( $1.m_node, new AssignResolveNode(*$3, $4.m_node, $4.m_featureInfo & AssignFeature));769 { $$.m_node = combineVarInitializers(GLOBAL_DATA, $1.m_node, new AssignResolveNode(GLOBAL_DATA, *$3, $4.m_node, $4.m_featureInfo & AssignFeature)); 770 770 $$.m_varDeclarations = $1.m_varDeclarations; 771 appendToVarDeclarationList( $$.m_varDeclarations, *$3, DeclarationStacks::HasInitializer);771 appendToVarDeclarationList(GLOBAL_DATA, $$.m_varDeclarations, *$3, DeclarationStacks::HasInitializer); 772 772 $$.m_funcDeclarations = 0; 773 773 $$.m_featureInfo = $1.m_featureInfo | $4.m_featureInfo; … … 777 777 VariableDeclarationListNoIn: 778 778 IDENT { $$.m_node = 0; 779 $$.m_varDeclarations = new ParserRefCountedData<DeclarationStacks::VarStack> ;780 appendToVarDeclarationList( $$.m_varDeclarations, *$1, 0);779 $$.m_varDeclarations = new ParserRefCountedData<DeclarationStacks::VarStack>(GLOBAL_DATA); 780 appendToVarDeclarationList(GLOBAL_DATA, $$.m_varDeclarations, *$1, 0); 781 781 $$.m_funcDeclarations = 0; 782 782 $$.m_featureInfo = 0; 783 783 } 784 | IDENT InitializerNoIn { $$.m_node = new AssignResolveNode( *$1, $2.m_node, $2.m_featureInfo & AssignFeature);785 $$.m_varDeclarations = new ParserRefCountedData<DeclarationStacks::VarStack> ;786 appendToVarDeclarationList( $$.m_varDeclarations, *$1, DeclarationStacks::HasInitializer);784 | IDENT InitializerNoIn { $$.m_node = new AssignResolveNode(GLOBAL_DATA, *$1, $2.m_node, $2.m_featureInfo & AssignFeature); 785 $$.m_varDeclarations = new ParserRefCountedData<DeclarationStacks::VarStack>(GLOBAL_DATA); 786 appendToVarDeclarationList(GLOBAL_DATA, $$.m_varDeclarations, *$1, DeclarationStacks::HasInitializer); 787 787 $$.m_funcDeclarations = 0; 788 788 $$.m_featureInfo = $2.m_featureInfo; … … 791 791 { $$.m_node = $1.m_node; 792 792 $$.m_varDeclarations = $1.m_varDeclarations; 793 appendToVarDeclarationList( $$.m_varDeclarations, *$3, 0);793 appendToVarDeclarationList(GLOBAL_DATA, $$.m_varDeclarations, *$3, 0); 794 794 $$.m_funcDeclarations = 0; 795 795 $$.m_featureInfo = $1.m_featureInfo; 796 796 } 797 797 | VariableDeclarationListNoIn ',' IDENT InitializerNoIn 798 { $$.m_node = combineVarInitializers( $1.m_node, new AssignResolveNode(*$3, $4.m_node, $4.m_featureInfo & AssignFeature));798 { $$.m_node = combineVarInitializers(GLOBAL_DATA, $1.m_node, new AssignResolveNode(GLOBAL_DATA, *$3, $4.m_node, $4.m_featureInfo & AssignFeature)); 799 799 $$.m_varDeclarations = $1.m_varDeclarations; 800 appendToVarDeclarationList( $$.m_varDeclarations, *$3, DeclarationStacks::HasInitializer);800 appendToVarDeclarationList(GLOBAL_DATA, $$.m_varDeclarations, *$3, DeclarationStacks::HasInitializer); 801 801 $$.m_funcDeclarations = 0; 802 802 $$.m_featureInfo = $1.m_featureInfo | $4.m_featureInfo; … … 805 805 806 806 ConstStatement: 807 CONSTTOKEN ConstDeclarationList ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ConstStatementNode( $2.m_node.head), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo);807 CONSTTOKEN ConstDeclarationList ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ConstStatementNode(GLOBAL_DATA, $2.m_node.head), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo); 808 808 DBG($$.m_node, @1, @3); } 809 809 | CONSTTOKEN ConstDeclarationList error 810 { $$ = createNodeDeclarationInfo<StatementNode*>(new ConstStatementNode( $2.m_node.head), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo);810 { $$ = createNodeDeclarationInfo<StatementNode*>(new ConstStatementNode(GLOBAL_DATA, $2.m_node.head), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo); 811 811 DBG($$.m_node, @1, @2); AUTO_SEMICOLON; } 812 812 ; … … 815 815 ConstDeclaration { $$.m_node.head = $1.m_node; 816 816 $$.m_node.tail = $$.m_node.head; 817 $$.m_varDeclarations = new ParserRefCountedData<DeclarationStacks::VarStack> ;818 appendToVarDeclarationList( $$.m_varDeclarations, $1.m_node);817 $$.m_varDeclarations = new ParserRefCountedData<DeclarationStacks::VarStack>(GLOBAL_DATA); 818 appendToVarDeclarationList(GLOBAL_DATA, $$.m_varDeclarations, $1.m_node); 819 819 $$.m_funcDeclarations = 0; 820 820 $$.m_featureInfo = $1.m_featureInfo; … … 825 825 $$.m_node.tail = $3.m_node; 826 826 $$.m_varDeclarations = $1.m_varDeclarations; 827 appendToVarDeclarationList( $$.m_varDeclarations, $3.m_node);827 appendToVarDeclarationList(GLOBAL_DATA, $$.m_varDeclarations, $3.m_node); 828 828 $$.m_funcDeclarations = 0; 829 829 $$.m_featureInfo = $1.m_featureInfo | $3.m_featureInfo;} … … 831 831 832 832 ConstDeclaration: 833 IDENT { $$ = createNodeFeatureInfo<ConstDeclNode*>(new ConstDeclNode( *$1, 0), 0); }834 | IDENT Initializer { $$ = createNodeFeatureInfo<ConstDeclNode*>(new ConstDeclNode( *$1, $2.m_node), $2.m_featureInfo); }833 IDENT { $$ = createNodeFeatureInfo<ConstDeclNode*>(new ConstDeclNode(GLOBAL_DATA, *$1, 0), 0); } 834 | IDENT Initializer { $$ = createNodeFeatureInfo<ConstDeclNode*>(new ConstDeclNode(GLOBAL_DATA, *$1, $2.m_node), $2.m_featureInfo); } 835 835 ; 836 836 … … 844 844 845 845 EmptyStatement: 846 ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new EmptyStatementNode( ), 0, 0, 0); }846 ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new EmptyStatementNode(GLOBAL_DATA), 0, 0, 0); } 847 847 ; 848 848 849 849 ExprStatement: 850 ExprNoBF ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ExprStatementNode( $1.m_node), 0, 0, $1.m_featureInfo);850 ExprNoBF ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ExprStatementNode(GLOBAL_DATA, $1.m_node), 0, 0, $1.m_featureInfo); 851 851 DBG($$.m_node, @1, @2); } 852 | ExprNoBF error { $$ = createNodeDeclarationInfo<StatementNode*>(new ExprStatementNode( $1.m_node), 0, 0, $1.m_featureInfo);852 | ExprNoBF error { $$ = createNodeDeclarationInfo<StatementNode*>(new ExprStatementNode(GLOBAL_DATA, $1.m_node), 0, 0, $1.m_featureInfo); 853 853 DBG($$.m_node, @1, @1); AUTO_SEMICOLON; } 854 854 ; … … 856 856 IfStatement: 857 857 IF '(' Expr ')' Statement %prec IF_WITHOUT_ELSE 858 { $$ = createNodeDeclarationInfo<StatementNode*>(new IfNode( $3.m_node, $5.m_node), $5.m_varDeclarations, $5.m_funcDeclarations, $3.m_featureInfo | $5.m_featureInfo);858 { $$ = createNodeDeclarationInfo<StatementNode*>(new IfNode(GLOBAL_DATA, $3.m_node, $5.m_node), $5.m_varDeclarations, $5.m_funcDeclarations, $3.m_featureInfo | $5.m_featureInfo); 859 859 DBG($$.m_node, @1, @4); } 860 860 | IF '(' Expr ')' Statement ELSE Statement 861 { $$ = createNodeDeclarationInfo<StatementNode*>(new IfElseNode( $3.m_node, $5.m_node, $7.m_node),861 { $$ = createNodeDeclarationInfo<StatementNode*>(new IfElseNode(GLOBAL_DATA, $3.m_node, $5.m_node, $7.m_node), 862 862 mergeDeclarationLists($5.m_varDeclarations, $7.m_varDeclarations), mergeDeclarationLists($5.m_funcDeclarations, $7.m_funcDeclarations), 863 863 $3.m_featureInfo | $5.m_featureInfo | $7.m_featureInfo); … … 866 866 867 867 IterationStatement: 868 DO Statement WHILE '(' Expr ')' ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new DoWhileNode( $2.m_node, $5.m_node), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo | $5.m_featureInfo);868 DO Statement WHILE '(' Expr ')' ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new DoWhileNode(GLOBAL_DATA, $2.m_node, $5.m_node), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo | $5.m_featureInfo); 869 869 DBG($$.m_node, @1, @3); } 870 | DO Statement WHILE '(' Expr ')' error { $$ = createNodeDeclarationInfo<StatementNode*>(new DoWhileNode( $2.m_node, $5.m_node), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo | $5.m_featureInfo);870 | DO Statement WHILE '(' Expr ')' error { $$ = createNodeDeclarationInfo<StatementNode*>(new DoWhileNode(GLOBAL_DATA, $2.m_node, $5.m_node), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo | $5.m_featureInfo); 871 871 DBG($$.m_node, @1, @3); } // Always performs automatic semicolon insertion. 872 | WHILE '(' Expr ')' Statement { $$ = createNodeDeclarationInfo<StatementNode*>(new WhileNode( $3.m_node, $5.m_node), $5.m_varDeclarations, $5.m_funcDeclarations, $3.m_featureInfo | $5.m_featureInfo);872 | WHILE '(' Expr ')' Statement { $$ = createNodeDeclarationInfo<StatementNode*>(new WhileNode(GLOBAL_DATA, $3.m_node, $5.m_node), $5.m_varDeclarations, $5.m_funcDeclarations, $3.m_featureInfo | $5.m_featureInfo); 873 873 DBG($$.m_node, @1, @4); } 874 874 | FOR '(' ExprNoInOpt ';' ExprOpt ';' ExprOpt ')' Statement 875 { $$ = createNodeDeclarationInfo<StatementNode*>(new ForNode( $3.m_node, $5.m_node, $7.m_node, $9.m_node, false), $9.m_varDeclarations, $9.m_funcDeclarations,875 { $$ = createNodeDeclarationInfo<StatementNode*>(new ForNode(GLOBAL_DATA, $3.m_node, $5.m_node, $7.m_node, $9.m_node, false), $9.m_varDeclarations, $9.m_funcDeclarations, 876 876 $3.m_featureInfo | $5.m_featureInfo | $7.m_featureInfo | $9.m_featureInfo); 877 877 DBG($$.m_node, @1, @8); 878 878 } 879 879 | FOR '(' VAR VariableDeclarationListNoIn ';' ExprOpt ';' ExprOpt ')' Statement 880 { $$ = createNodeDeclarationInfo<StatementNode*>(new ForNode( $4.m_node, $6.m_node, $8.m_node, $10.m_node, true),880 { $$ = createNodeDeclarationInfo<StatementNode*>(new ForNode(GLOBAL_DATA, $4.m_node, $6.m_node, $8.m_node, $10.m_node, true), 881 881 mergeDeclarationLists($4.m_varDeclarations, $10.m_varDeclarations), 882 882 mergeDeclarationLists($4.m_funcDeclarations, $10.m_funcDeclarations), … … 888 888 if (!n->isLocation()) 889 889 YYABORT; 890 $$ = createNodeDeclarationInfo<StatementNode*>(new ForInNode( $3.m_node, $5.m_node, $7.m_node), $7.m_varDeclarations, $7.m_funcDeclarations,890 $$ = createNodeDeclarationInfo<StatementNode*>(new ForInNode(GLOBAL_DATA, $3.m_node, $5.m_node, $7.m_node), $7.m_varDeclarations, $7.m_funcDeclarations, 891 891 $3.m_featureInfo | $5.m_featureInfo | $7.m_featureInfo); 892 892 DBG($$.m_node, @1, @6); 893 893 } 894 894 | FOR '(' VAR IDENT INTOKEN Expr ')' Statement 895 { ForInNode *forIn = new ForInNode( *$4, 0, $6.m_node, $8.m_node);896 appendToVarDeclarationList( $8.m_varDeclarations, *$4, DeclarationStacks::HasInitializer);895 { ForInNode *forIn = new ForInNode(GLOBAL_DATA, *$4, 0, $6.m_node, $8.m_node); 896 appendToVarDeclarationList(GLOBAL_DATA, $8.m_varDeclarations, *$4, DeclarationStacks::HasInitializer); 897 897 $$ = createNodeDeclarationInfo<StatementNode*>(forIn, $8.m_varDeclarations, $8.m_funcDeclarations, $6.m_featureInfo | $8.m_featureInfo); 898 898 DBG($$.m_node, @1, @7); } 899 899 | FOR '(' VAR IDENT InitializerNoIn INTOKEN Expr ')' Statement 900 { ForInNode *forIn = new ForInNode( *$4, $5.m_node, $7.m_node, $9.m_node);901 appendToVarDeclarationList( $9.m_varDeclarations, *$4, DeclarationStacks::HasInitializer);900 { ForInNode *forIn = new ForInNode(GLOBAL_DATA, *$4, $5.m_node, $7.m_node, $9.m_node); 901 appendToVarDeclarationList(GLOBAL_DATA, $9.m_varDeclarations, *$4, DeclarationStacks::HasInitializer); 902 902 $$ = createNodeDeclarationInfo<StatementNode*>(forIn, $9.m_varDeclarations, $9.m_funcDeclarations, 903 903 $5.m_featureInfo | $7.m_featureInfo | $9.m_featureInfo); … … 916 916 917 917 ContinueStatement: 918 CONTINUE ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ContinueNode( ), 0, 0, 0);918 CONTINUE ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ContinueNode(GLOBAL_DATA), 0, 0, 0); 919 919 DBG($$.m_node, @1, @2); } 920 | CONTINUE error { $$ = createNodeDeclarationInfo<StatementNode*>(new ContinueNode( ), 0, 0, 0);920 | CONTINUE error { $$ = createNodeDeclarationInfo<StatementNode*>(new ContinueNode(GLOBAL_DATA), 0, 0, 0); 921 921 DBG($$.m_node, @1, @1); AUTO_SEMICOLON; } 922 | CONTINUE IDENT ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ContinueNode( *$2), 0, 0, 0);922 | CONTINUE IDENT ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ContinueNode(GLOBAL_DATA, *$2), 0, 0, 0); 923 923 DBG($$.m_node, @1, @3); } 924 | CONTINUE IDENT error { $$ = createNodeDeclarationInfo<StatementNode*>(new ContinueNode( *$2), 0, 0, 0);924 | CONTINUE IDENT error { $$ = createNodeDeclarationInfo<StatementNode*>(new ContinueNode(GLOBAL_DATA, *$2), 0, 0, 0); 925 925 DBG($$.m_node, @1, @2); AUTO_SEMICOLON; } 926 926 ; 927 927 928 928 BreakStatement: 929 BREAK ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new BreakNode( ), 0, 0, 0); DBG($$.m_node, @1, @2); }930 | BREAK error { $$ = createNodeDeclarationInfo<StatementNode*>(new BreakNode( ), 0, 0, 0); DBG($$.m_node, @1, @1); AUTO_SEMICOLON; }931 | BREAK IDENT ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new BreakNode( *$2), 0, 0, 0); DBG($$.m_node, @1, @3); }932 | BREAK IDENT error { $$ = createNodeDeclarationInfo<StatementNode*>(new BreakNode( *$2), 0, 0, 0); DBG($$.m_node, @1, @2); AUTO_SEMICOLON; }929 BREAK ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new BreakNode(GLOBAL_DATA), 0, 0, 0); DBG($$.m_node, @1, @2); } 930 | BREAK error { $$ = createNodeDeclarationInfo<StatementNode*>(new BreakNode(GLOBAL_DATA), 0, 0, 0); DBG($$.m_node, @1, @1); AUTO_SEMICOLON; } 931 | BREAK IDENT ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new BreakNode(GLOBAL_DATA, *$2), 0, 0, 0); DBG($$.m_node, @1, @3); } 932 | BREAK IDENT error { $$ = createNodeDeclarationInfo<StatementNode*>(new BreakNode(GLOBAL_DATA, *$2), 0, 0, 0); DBG($$.m_node, @1, @2); AUTO_SEMICOLON; } 933 933 ; 934 934 935 935 ReturnStatement: 936 RETURN ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ReturnNode( 0), 0, 0, 0); DBG($$.m_node, @1, @2); }937 | RETURN error { $$ = createNodeDeclarationInfo<StatementNode*>(new ReturnNode( 0), 0, 0, 0); DBG($$.m_node, @1, @1); AUTO_SEMICOLON; }938 | RETURN Expr ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ReturnNode( $2.m_node), 0, 0, $2.m_featureInfo); DBG($$.m_node, @1, @3); }939 | RETURN Expr error { $$ = createNodeDeclarationInfo<StatementNode*>(new ReturnNode( $2.m_node), 0, 0, $2.m_featureInfo); DBG($$.m_node, @1, @2); AUTO_SEMICOLON; }936 RETURN ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ReturnNode(GLOBAL_DATA, 0), 0, 0, 0); DBG($$.m_node, @1, @2); } 937 | RETURN error { $$ = createNodeDeclarationInfo<StatementNode*>(new ReturnNode(GLOBAL_DATA, 0), 0, 0, 0); DBG($$.m_node, @1, @1); AUTO_SEMICOLON; } 938 | RETURN Expr ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ReturnNode(GLOBAL_DATA, $2.m_node), 0, 0, $2.m_featureInfo); DBG($$.m_node, @1, @3); } 939 | RETURN Expr error { $$ = createNodeDeclarationInfo<StatementNode*>(new ReturnNode(GLOBAL_DATA, $2.m_node), 0, 0, $2.m_featureInfo); DBG($$.m_node, @1, @2); AUTO_SEMICOLON; } 940 940 ; 941 941 942 942 WithStatement: 943 WITH '(' Expr ')' Statement { $$ = createNodeDeclarationInfo<StatementNode*>(new WithNode( $3.m_node, $5.m_node), $5.m_varDeclarations, $5.m_funcDeclarations,943 WITH '(' Expr ')' Statement { $$ = createNodeDeclarationInfo<StatementNode*>(new WithNode(GLOBAL_DATA, $3.m_node, $5.m_node), $5.m_varDeclarations, $5.m_funcDeclarations, 944 944 $3.m_featureInfo | $5.m_featureInfo); 945 945 DBG($$.m_node, @1, @4); } … … 947 947 948 948 SwitchStatement: 949 SWITCH '(' Expr ')' CaseBlock { $$ = createNodeDeclarationInfo<StatementNode*>(new SwitchNode( $3.m_node, $5.m_node), $5.m_varDeclarations, $5.m_funcDeclarations,949 SWITCH '(' Expr ')' CaseBlock { $$ = createNodeDeclarationInfo<StatementNode*>(new SwitchNode(GLOBAL_DATA, $3.m_node, $5.m_node), $5.m_varDeclarations, $5.m_funcDeclarations, 950 950 $3.m_featureInfo | $5.m_featureInfo); 951 951 DBG($$.m_node, @1, @4); } … … 953 953 954 954 CaseBlock: 955 OPENBRACE CaseClausesOpt CLOSEBRACE { $$ = createNodeDeclarationInfo<CaseBlockNode*>(new CaseBlockNode( $2.m_node.head, 0, 0), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo); }955 OPENBRACE CaseClausesOpt CLOSEBRACE { $$ = createNodeDeclarationInfo<CaseBlockNode*>(new CaseBlockNode(GLOBAL_DATA, $2.m_node.head, 0, 0), $2.m_varDeclarations, $2.m_funcDeclarations, $2.m_featureInfo); } 956 956 | OPENBRACE CaseClausesOpt DefaultClause CaseClausesOpt CLOSEBRACE 957 { $$ = createNodeDeclarationInfo<CaseBlockNode*>(new CaseBlockNode( $2.m_node.head, $3.m_node, $4.m_node.head),957 { $$ = createNodeDeclarationInfo<CaseBlockNode*>(new CaseBlockNode(GLOBAL_DATA, $2.m_node.head, $3.m_node, $4.m_node.head), 958 958 mergeDeclarationLists(mergeDeclarationLists($2.m_varDeclarations, $3.m_varDeclarations), $4.m_varDeclarations), 959 959 mergeDeclarationLists(mergeDeclarationLists($2.m_funcDeclarations, $3.m_funcDeclarations), $4.m_funcDeclarations), … … 967 967 968 968 CaseClauses: 969 CaseClause { $$.m_node.head = new ClauseListNode( $1.m_node);969 CaseClause { $$.m_node.head = new ClauseListNode(GLOBAL_DATA, $1.m_node); 970 970 $$.m_node.tail = $$.m_node.head; 971 971 $$.m_varDeclarations = $1.m_varDeclarations; … … 973 973 $$.m_featureInfo = $1.m_featureInfo; } 974 974 | CaseClauses CaseClause { $$.m_node.head = $1.m_node.head; 975 $$.m_node.tail = new ClauseListNode( $1.m_node.tail, $2.m_node);975 $$.m_node.tail = new ClauseListNode(GLOBAL_DATA, $1.m_node.tail, $2.m_node); 976 976 $$.m_varDeclarations = mergeDeclarationLists($1.m_varDeclarations, $2.m_varDeclarations); 977 977 $$.m_funcDeclarations = mergeDeclarationLists($1.m_funcDeclarations, $2.m_funcDeclarations); … … 981 981 982 982 CaseClause: 983 CASE Expr ':' { $$ = createNodeDeclarationInfo<CaseClauseNode*>(new CaseClauseNode( $2.m_node), 0, 0, $2.m_featureInfo); }984 | CASE Expr ':' SourceElements { $$ = createNodeDeclarationInfo<CaseClauseNode*>(new CaseClauseNode( $2.m_node, $4.m_node), $4.m_varDeclarations, $4.m_funcDeclarations, $2.m_featureInfo | $4.m_featureInfo); }983 CASE Expr ':' { $$ = createNodeDeclarationInfo<CaseClauseNode*>(new CaseClauseNode(GLOBAL_DATA, $2.m_node), 0, 0, $2.m_featureInfo); } 984 | CASE Expr ':' SourceElements { $$ = createNodeDeclarationInfo<CaseClauseNode*>(new CaseClauseNode(GLOBAL_DATA, $2.m_node, $4.m_node), $4.m_varDeclarations, $4.m_funcDeclarations, $2.m_featureInfo | $4.m_featureInfo); } 985 985 ; 986 986 987 987 DefaultClause: 988 DEFAULT ':' { $$ = createNodeDeclarationInfo<CaseClauseNode*>(new CaseClauseNode( 0), 0, 0, 0); }989 | DEFAULT ':' SourceElements { $$ = createNodeDeclarationInfo<CaseClauseNode*>(new CaseClauseNode( 0, $3.m_node), $3.m_varDeclarations, $3.m_funcDeclarations, $3.m_featureInfo); }988 DEFAULT ':' { $$ = createNodeDeclarationInfo<CaseClauseNode*>(new CaseClauseNode(GLOBAL_DATA, 0), 0, 0, 0); } 989 | DEFAULT ':' SourceElements { $$ = createNodeDeclarationInfo<CaseClauseNode*>(new CaseClauseNode(GLOBAL_DATA, 0, $3.m_node), $3.m_varDeclarations, $3.m_funcDeclarations, $3.m_featureInfo); } 990 990 ; 991 991 992 992 LabelledStatement: 993 993 IDENT ':' Statement { $3.m_node->pushLabel(*$1); 994 $$ = createNodeDeclarationInfo<StatementNode*>(new LabelNode( *$1, $3.m_node), $3.m_varDeclarations, $3.m_funcDeclarations, $3.m_featureInfo); }994 $$ = createNodeDeclarationInfo<StatementNode*>(new LabelNode(GLOBAL_DATA, *$1, $3.m_node), $3.m_varDeclarations, $3.m_funcDeclarations, $3.m_featureInfo); } 995 995 ; 996 996 997 997 ThrowStatement: 998 THROW Expr ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ThrowNode( $2.m_node), 0, 0, $2.m_featureInfo); DBG($$.m_node, @1, @3); }999 | THROW Expr error { $$ = createNodeDeclarationInfo<StatementNode*>(new ThrowNode( $2.m_node), 0, 0, $2.m_featureInfo); DBG($$.m_node, @1, @2); AUTO_SEMICOLON; }998 THROW Expr ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new ThrowNode(GLOBAL_DATA, $2.m_node), 0, 0, $2.m_featureInfo); DBG($$.m_node, @1, @3); } 999 | THROW Expr error { $$ = createNodeDeclarationInfo<StatementNode*>(new ThrowNode(GLOBAL_DATA, $2.m_node), 0, 0, $2.m_featureInfo); DBG($$.m_node, @1, @2); AUTO_SEMICOLON; } 1000 1000 ; 1001 1001 1002 1002 TryStatement: 1003 TRY Block FINALLY Block { $$ = createNodeDeclarationInfo<StatementNode*>(new TryNode( $2.m_node, GLOBAL_DATA->propertyNames->nullIdentifier, 0, $4.m_node),1003 TRY Block FINALLY Block { $$ = createNodeDeclarationInfo<StatementNode*>(new TryNode(GLOBAL_DATA, $2.m_node, GLOBAL_DATA->propertyNames->nullIdentifier, 0, $4.m_node), 1004 1004 mergeDeclarationLists($2.m_varDeclarations, $4.m_varDeclarations), 1005 1005 mergeDeclarationLists($2.m_funcDeclarations, $4.m_funcDeclarations), 1006 1006 $2.m_featureInfo | $4.m_featureInfo); 1007 1007 DBG($$.m_node, @1, @2); } 1008 | TRY Block CATCH '(' IDENT ')' Block { $$ = createNodeDeclarationInfo<StatementNode*>(new TryNode( $2.m_node, *$5, $7.m_node, 0),1008 | TRY Block CATCH '(' IDENT ')' Block { $$ = createNodeDeclarationInfo<StatementNode*>(new TryNode(GLOBAL_DATA, $2.m_node, *$5, $7.m_node, 0), 1009 1009 mergeDeclarationLists($2.m_varDeclarations, $7.m_varDeclarations), 1010 1010 mergeDeclarationLists($2.m_funcDeclarations, $7.m_funcDeclarations), … … 1012 1012 DBG($$.m_node, @1, @2); } 1013 1013 | TRY Block CATCH '(' IDENT ')' Block FINALLY Block 1014 { $$ = createNodeDeclarationInfo<StatementNode*>(new TryNode( $2.m_node, *$5, $7.m_node, $9.m_node),1014 { $$ = createNodeDeclarationInfo<StatementNode*>(new TryNode(GLOBAL_DATA, $2.m_node, *$5, $7.m_node, $9.m_node), 1015 1015 mergeDeclarationLists(mergeDeclarationLists($2.m_varDeclarations, $7.m_varDeclarations), $9.m_varDeclarations), 1016 1016 mergeDeclarationLists(mergeDeclarationLists($2.m_funcDeclarations, $7.m_funcDeclarations), $9.m_funcDeclarations), … … 1020 1020 1021 1021 DebuggerStatement: 1022 DEBUGGER ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new DebuggerStatementNode( ), 0, 0, 0);1022 DEBUGGER ';' { $$ = createNodeDeclarationInfo<StatementNode*>(new DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0); 1023 1023 DBG($$.m_node, @1, @2); } 1024 | DEBUGGER error { $$ = createNodeDeclarationInfo<StatementNode*>(new DebuggerStatementNode( ), 0, 0, 0);1024 | DEBUGGER error { $$ = createNodeDeclarationInfo<StatementNode*>(new DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0); 1025 1025 DBG($$.m_node, @1, @1); AUTO_SEMICOLON; } 1026 1026 ; 1027 1027 1028 1028 FunctionDeclaration: 1029 FUNCTION IDENT '(' ')' OPENBRACE FunctionBody CLOSEBRACE { $$ = new FuncDeclNode( *$2, $6, LEXER->sourceRange($5, $7)); DBG($6, @5, @7); }1029 FUNCTION IDENT '(' ')' OPENBRACE FunctionBody CLOSEBRACE { $$ = new FuncDeclNode(GLOBAL_DATA, *$2, $6, LEXER->sourceRange($5, $7)); DBG($6, @5, @7); } 1030 1030 | FUNCTION IDENT '(' FormalParameterList ')' OPENBRACE FunctionBody CLOSEBRACE 1031 { $$ = new FuncDeclNode( *$2, $7, LEXER->sourceRange($6, $8), $4.head); DBG($7, @6, @8); }1031 { $$ = new FuncDeclNode(GLOBAL_DATA, *$2, $7, LEXER->sourceRange($6, $8), $4.head); DBG($7, @6, @8); } 1032 1032 ; 1033 1033 1034 1034 FunctionExpr: 1035 FUNCTION '(' ')' OPENBRACE FunctionBody CLOSEBRACE { $$ = createNodeFeatureInfo(new FuncExprNode(GLOBAL_DATA ->propertyNames->nullIdentifier, $5, LEXER->sourceRange($4, $6)), ClosureFeature); DBG($5, @4, @6); }1036 | FUNCTION '(' FormalParameterList ')' OPENBRACE FunctionBody CLOSEBRACE { $$ = createNodeFeatureInfo(new FuncExprNode(GLOBAL_DATA ->propertyNames->nullIdentifier, $6, LEXER->sourceRange($5, $7), $3.head), ClosureFeature); DBG($6, @5, @7); }1037 | FUNCTION IDENT '(' ')' OPENBRACE FunctionBody CLOSEBRACE { $$ = createNodeFeatureInfo(new FuncExprNode( *$2, $6, LEXER->sourceRange($5, $7)), ClosureFeature); DBG($6, @5, @7); }1038 | FUNCTION IDENT '(' FormalParameterList ')' OPENBRACE FunctionBody CLOSEBRACE { $$ = createNodeFeatureInfo(new FuncExprNode( *$2, $7, LEXER->sourceRange($6, $8), $4.head), ClosureFeature); DBG($7, @6, @8); }1035 FUNCTION '(' ')' OPENBRACE FunctionBody CLOSEBRACE { $$ = createNodeFeatureInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, $5, LEXER->sourceRange($4, $6)), ClosureFeature); DBG($5, @4, @6); } 1036 | FUNCTION '(' FormalParameterList ')' OPENBRACE FunctionBody CLOSEBRACE { $$ = createNodeFeatureInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, $6, LEXER->sourceRange($5, $7), $3.head), ClosureFeature); DBG($6, @5, @7); } 1037 | FUNCTION IDENT '(' ')' OPENBRACE FunctionBody CLOSEBRACE { $$ = createNodeFeatureInfo(new FuncExprNode(GLOBAL_DATA, *$2, $6, LEXER->sourceRange($5, $7)), ClosureFeature); DBG($6, @5, @7); } 1038 | FUNCTION IDENT '(' FormalParameterList ')' OPENBRACE FunctionBody CLOSEBRACE { $$ = createNodeFeatureInfo(new FuncExprNode(GLOBAL_DATA, *$2, $7, LEXER->sourceRange($6, $8), $4.head), ClosureFeature); DBG($7, @6, @8); } 1039 1039 ; 1040 1040 1041 1041 FormalParameterList: 1042 IDENT { $$.head = new ParameterNode( *$1);1042 IDENT { $$.head = new ParameterNode(GLOBAL_DATA, *$1); 1043 1043 $$.tail = $$.head; } 1044 1044 | FormalParameterList ',' IDENT { $$.head = $1.head; 1045 $$.tail = new ParameterNode( $1.tail, *$3); }1045 $$.tail = new ParameterNode(GLOBAL_DATA, $1.tail, *$3); } 1046 1046 ; 1047 1047 1048 1048 FunctionBody: 1049 /* not in spec */ { $$ = FunctionBodyNode::create( 0, 0, 0, false, false); }1050 | SourceElements { $$ = FunctionBodyNode::create( $1.m_node, $1.m_varDeclarations ? &$1.m_varDeclarations->data : 0,1049 /* not in spec */ { $$ = FunctionBodyNode::create(GLOBAL_DATA, 0, 0, 0, false, false); } 1050 | SourceElements { $$ = FunctionBodyNode::create(GLOBAL_DATA, $1.m_node, $1.m_varDeclarations ? &$1.m_varDeclarations->data : 0, 1051 1051 $1.m_funcDeclarations ? &$1.m_funcDeclarations->data : 0, 1052 1052 ($1.m_featureInfo & EvalFeature) != 0, ($1.m_featureInfo & ClosureFeature) != 0); … … 1065 1065 1066 1066 Program: 1067 /* not in spec */ { GLOBAL_DATA->parser->didFinishParsing(new SourceElements , 0, 0, false, false, @0.last_line); }1067 /* not in spec */ { GLOBAL_DATA->parser->didFinishParsing(new SourceElements(GLOBAL_DATA), 0, 0, false, false, @0.last_line); } 1068 1068 | SourceElements { GLOBAL_DATA->parser->didFinishParsing($1.m_node, $1.m_varDeclarations, $1.m_funcDeclarations, 1069 1069 ($1.m_featureInfo & EvalFeature) != 0, ($1.m_featureInfo & ClosureFeature) != 0, … … 1072 1072 1073 1073 SourceElements: 1074 SourceElement { $$.m_node = new SourceElements ;1074 SourceElement { $$.m_node = new SourceElements(GLOBAL_DATA); 1075 1075 $$.m_node->append($1.m_node); 1076 1076 $$.m_varDeclarations = $1.m_varDeclarations; … … 1086 1086 1087 1087 SourceElement: 1088 FunctionDeclaration { $$ = createNodeDeclarationInfo<StatementNode*>($1, 0, new ParserRefCountedData<DeclarationStacks::FunctionStack> , ClosureFeature); $$.m_funcDeclarations->data.append($1); }1088 FunctionDeclaration { $$ = createNodeDeclarationInfo<StatementNode*>($1, 0, new ParserRefCountedData<DeclarationStacks::FunctionStack>(GLOBAL_DATA), ClosureFeature); $$.m_funcDeclarations->data.append($1); } 1089 1089 | Statement { $$ = $1; } 1090 1090 ; … … 1092 1092 %% 1093 1093 1094 static ExpressionNode* makeAssignNode( ExpressionNode* loc, Operator op, ExpressionNode* expr, bool locHasAssignments, bool exprHasAssignments)1094 static ExpressionNode* makeAssignNode(void* globalPtr, ExpressionNode* loc, Operator op, ExpressionNode* expr, bool locHasAssignments, bool exprHasAssignments) 1095 1095 { 1096 1096 if (!loc->isLocation()) 1097 return new AssignErrorNode( loc, op, expr);1097 return new AssignErrorNode(GLOBAL_DATA, loc, op, expr); 1098 1098 1099 1099 if (loc->isResolveNode()) { 1100 1100 ResolveNode* resolve = static_cast<ResolveNode*>(loc); 1101 1101 if (op == OpEqual) 1102 return new AssignResolveNode( resolve->identifier(), expr, exprHasAssignments);1102 return new AssignResolveNode(GLOBAL_DATA, resolve->identifier(), expr, exprHasAssignments); 1103 1103 else 1104 return new ReadModifyResolveNode( resolve->identifier(), op, expr, exprHasAssignments);1104 return new ReadModifyResolveNode(GLOBAL_DATA, resolve->identifier(), op, expr, exprHasAssignments); 1105 1105 } 1106 1106 if (loc->isBracketAccessorNode()) { 1107 1107 BracketAccessorNode* bracket = static_cast<BracketAccessorNode*>(loc); 1108 1108 if (op == OpEqual) 1109 return new AssignBracketNode( bracket->base(), bracket->subscript(), expr, locHasAssignments, exprHasAssignments);1109 return new AssignBracketNode(GLOBAL_DATA, bracket->base(), bracket->subscript(), expr, locHasAssignments, exprHasAssignments); 1110 1110 else 1111 return new ReadModifyBracketNode( bracket->base(), bracket->subscript(), op, expr, locHasAssignments, exprHasAssignments);1111 return new ReadModifyBracketNode(GLOBAL_DATA, bracket->base(), bracket->subscript(), op, expr, locHasAssignments, exprHasAssignments); 1112 1112 } 1113 1113 ASSERT(loc->isDotAccessorNode()); 1114 1114 DotAccessorNode* dot = static_cast<DotAccessorNode*>(loc); 1115 1115 if (op == OpEqual) 1116 return new AssignDotNode( dot->base(), dot->identifier(), expr, exprHasAssignments);1117 return new ReadModifyDotNode( dot->base(), dot->identifier(), op, expr, exprHasAssignments);1118 } 1119 1120 static ExpressionNode* makePrefixNode( ExpressionNode* expr, Operator op)1116 return new AssignDotNode(GLOBAL_DATA, dot->base(), dot->identifier(), expr, exprHasAssignments); 1117 return new ReadModifyDotNode(GLOBAL_DATA, dot->base(), dot->identifier(), op, expr, exprHasAssignments); 1118 } 1119 1120 static ExpressionNode* makePrefixNode(void* globalPtr, ExpressionNode* expr, Operator op) 1121 1121 { 1122 1122 if (!expr->isLocation()) 1123 return new PrefixErrorNode( expr, op);1123 return new PrefixErrorNode(GLOBAL_DATA, expr, op); 1124 1124 1125 1125 if (expr->isResolveNode()) { 1126 1126 ResolveNode* resolve = static_cast<ResolveNode*>(expr); 1127 1127 if (op == OpPlusPlus) 1128 return new PreIncResolveNode( resolve->identifier());1128 return new PreIncResolveNode(GLOBAL_DATA, resolve->identifier()); 1129 1129 else 1130 return new PreDecResolveNode( resolve->identifier());1130 return new PreDecResolveNode(GLOBAL_DATA, resolve->identifier()); 1131 1131 } 1132 1132 if (expr->isBracketAccessorNode()) { 1133 1133 BracketAccessorNode* bracket = static_cast<BracketAccessorNode*>(expr); 1134 1134 if (op == OpPlusPlus) 1135 return new PreIncBracketNode( bracket->base(), bracket->subscript());1135 return new PreIncBracketNode(GLOBAL_DATA, bracket->base(), bracket->subscript()); 1136 1136 else 1137 return new PreDecBracketNode( bracket->base(), bracket->subscript());1137 return new PreDecBracketNode(GLOBAL_DATA, bracket->base(), bracket->subscript()); 1138 1138 } 1139 1139 ASSERT(expr->isDotAccessorNode()); 1140 1140 DotAccessorNode* dot = static_cast<DotAccessorNode*>(expr); 1141 1141 if (op == OpPlusPlus) 1142 return new PreIncDotNode( dot->base(), dot->identifier());1143 return new PreDecDotNode( dot->base(), dot->identifier());1144 } 1145 1146 static ExpressionNode* makePostfixNode( ExpressionNode* expr, Operator op)1142 return new PreIncDotNode(GLOBAL_DATA, dot->base(), dot->identifier()); 1143 return new PreDecDotNode(GLOBAL_DATA, dot->base(), dot->identifier()); 1144 } 1145 1146 static ExpressionNode* makePostfixNode(void* globalPtr, ExpressionNode* expr, Operator op) 1147 1147 { 1148 1148 if (!expr->isLocation()) 1149 return new PostfixErrorNode( expr, op);1149 return new PostfixErrorNode(GLOBAL_DATA, expr, op); 1150 1150 1151 1151 if (expr->isResolveNode()) { 1152 1152 ResolveNode* resolve = static_cast<ResolveNode*>(expr); 1153 1153 if (op == OpPlusPlus) 1154 return new PostIncResolveNode( resolve->identifier());1154 return new PostIncResolveNode(GLOBAL_DATA, resolve->identifier()); 1155 1155 else 1156 return new PostDecResolveNode( resolve->identifier());1156 return new PostDecResolveNode(GLOBAL_DATA, resolve->identifier()); 1157 1157 } 1158 1158 if (expr->isBracketAccessorNode()) { 1159 1159 BracketAccessorNode* bracket = static_cast<BracketAccessorNode*>(expr); 1160 1160 if (op == OpPlusPlus) 1161 return new PostIncBracketNode( bracket->base(), bracket->subscript());1161 return new PostIncBracketNode(GLOBAL_DATA, bracket->base(), bracket->subscript()); 1162 1162 else 1163 return new PostDecBracketNode( bracket->base(), bracket->subscript());1163 return new PostDecBracketNode(GLOBAL_DATA, bracket->base(), bracket->subscript()); 1164 1164 } 1165 1165 ASSERT(expr->isDotAccessorNode()); … … 1167 1167 1168 1168 if (op == OpPlusPlus) 1169 return new PostIncDotNode( dot->base(), dot->identifier());1170 return new PostDecDotNode( dot->base(), dot->identifier());1169 return new PostIncDotNode(GLOBAL_DATA, dot->base(), dot->identifier()); 1170 return new PostDecDotNode(GLOBAL_DATA, dot->base(), dot->identifier()); 1171 1171 } 1172 1172 … … 1175 1175 FeatureInfo features = func.m_featureInfo | args.m_featureInfo; 1176 1176 if (!func.m_node->isLocation()) 1177 return createNodeFeatureInfo<ExpressionNode*>(new FunctionCallValueNode( func.m_node, args.m_node), features);1177 return createNodeFeatureInfo<ExpressionNode*>(new FunctionCallValueNode(GLOBAL_DATA, func.m_node, args.m_node), features); 1178 1178 if (func.m_node->isResolveNode()) { 1179 1179 ResolveNode* resolve = static_cast<ResolveNode*>(func.m_node); 1180 1180 const Identifier& identifier = resolve->identifier(); 1181 1181 if (identifier == GLOBAL_DATA->propertyNames->eval) 1182 return createNodeFeatureInfo<ExpressionNode*>(new EvalFunctionCallNode( args.m_node), EvalFeature | features);1183 return createNodeFeatureInfo<ExpressionNode*>(new FunctionCallResolveNode( identifier, args.m_node), features);1182 return createNodeFeatureInfo<ExpressionNode*>(new EvalFunctionCallNode(GLOBAL_DATA, args.m_node), EvalFeature | features); 1183 return createNodeFeatureInfo<ExpressionNode*>(new FunctionCallResolveNode(GLOBAL_DATA, identifier, args.m_node), features); 1184 1184 } 1185 1185 if (func.m_node->isBracketAccessorNode()) { 1186 1186 BracketAccessorNode* bracket = static_cast<BracketAccessorNode*>(func.m_node); 1187 return createNodeFeatureInfo<ExpressionNode*>(new FunctionCallBracketNode( bracket->base(), bracket->subscript(), args.m_node), features);1187 return createNodeFeatureInfo<ExpressionNode*>(new FunctionCallBracketNode(GLOBAL_DATA, bracket->base(), bracket->subscript(), args.m_node), features); 1188 1188 } 1189 1189 ASSERT(func.m_node->isDotAccessorNode()); 1190 1190 DotAccessorNode* dot = static_cast<DotAccessorNode*>(func.m_node); 1191 return createNodeFeatureInfo<ExpressionNode*>(new FunctionCallDotNode( dot->base(), dot->identifier(), args.m_node), features);1192 } 1193 1194 static ExpressionNode* makeTypeOfNode( ExpressionNode* expr)1191 return createNodeFeatureInfo<ExpressionNode*>(new FunctionCallDotNode(GLOBAL_DATA, dot->base(), dot->identifier(), args.m_node), features); 1192 } 1193 1194 static ExpressionNode* makeTypeOfNode(void* globalPtr, ExpressionNode* expr) 1195 1195 { 1196 1196 if (expr->isResolveNode()) { 1197 1197 ResolveNode* resolve = static_cast<ResolveNode*>(expr); 1198 return new TypeOfResolveNode( resolve->identifier());1198 return new TypeOfResolveNode(GLOBAL_DATA, resolve->identifier()); 1199 1199 } 1200 return new TypeOfValueNode( expr);1201 } 1202 1203 static ExpressionNode* makeDeleteNode( ExpressionNode* expr)1200 return new TypeOfValueNode(GLOBAL_DATA, expr); 1201 } 1202 1203 static ExpressionNode* makeDeleteNode(void* globalPtr, ExpressionNode* expr) 1204 1204 { 1205 1205 if (!expr->isLocation()) 1206 return new DeleteValueNode( expr);1206 return new DeleteValueNode(GLOBAL_DATA, expr); 1207 1207 if (expr->isResolveNode()) { 1208 1208 ResolveNode* resolve = static_cast<ResolveNode*>(expr); 1209 return new DeleteResolveNode( resolve->identifier());1209 return new DeleteResolveNode(GLOBAL_DATA, resolve->identifier()); 1210 1210 } 1211 1211 if (expr->isBracketAccessorNode()) { 1212 1212 BracketAccessorNode* bracket = static_cast<BracketAccessorNode*>(expr); 1213 return new DeleteBracketNode( bracket->base(), bracket->subscript());1213 return new DeleteBracketNode(GLOBAL_DATA, bracket->base(), bracket->subscript()); 1214 1214 } 1215 1215 ASSERT(expr->isDotAccessorNode()); 1216 1216 DotAccessorNode* dot = static_cast<DotAccessorNode*>(expr); 1217 return new DeleteDotNode( dot->base(), dot->identifier());1217 return new DeleteDotNode(GLOBAL_DATA, dot->base(), dot->identifier()); 1218 1218 } 1219 1219 … … 1227 1227 else 1228 1228 return 0; 1229 return new PropertyNode( name, new FuncExprNode(GLOBAL_DATA->propertyNames->nullIdentifier, body, source, params), type);1230 } 1231 1232 static ExpressionNode* makeNegateNode( ExpressionNode* n)1229 return new PropertyNode(GLOBAL_DATA, name, new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, body, source, params), type); 1230 } 1231 1232 static ExpressionNode* makeNegateNode(void* globalPtr, ExpressionNode* n) 1233 1233 { 1234 1234 if (n->isNumber()) { … … 1241 1241 } 1242 1242 1243 return new NegateNode( n);1244 } 1245 1246 static NumberNode* makeNumberNode( double d)1243 return new NegateNode(GLOBAL_DATA, n); 1244 } 1245 1246 static NumberNode* makeNumberNode(void* globalPtr, double d) 1247 1247 { 1248 1248 JSValue* value = JSImmediate::from(d); 1249 1249 if (value) 1250 return new ImmediateNumberNode( value, d);1251 return new NumberNode( d);1250 return new ImmediateNumberNode(GLOBAL_DATA, value, d); 1251 return new NumberNode(GLOBAL_DATA, d); 1252 1252 } 1253 1253 … … 1264 1264 } 1265 1265 1266 static ExpressionNode* combineVarInitializers( ExpressionNode* list, AssignResolveNode* init)1266 static ExpressionNode* combineVarInitializers(void* globalPtr, ExpressionNode* list, AssignResolveNode* init) 1267 1267 { 1268 1268 if (!list) 1269 1269 return init; 1270 return new VarDeclCommaNode( list, init);1270 return new VarDeclCommaNode(GLOBAL_DATA, list, init); 1271 1271 } 1272 1272 … … 1274 1274 // statements (which later get stripped out), because the actual 1275 1275 // declaration work is hoisted up to the start of the function body 1276 static StatementNode* makeVarStatementNode( ExpressionNode* expr)1276 static StatementNode* makeVarStatementNode(void* globalPtr, ExpressionNode* expr) 1277 1277 { 1278 1278 if (!expr) 1279 return new EmptyStatementNode( );1280 return new VarStatementNode( expr);1279 return new EmptyStatementNode(GLOBAL_DATA); 1280 return new VarStatementNode(GLOBAL_DATA, expr); 1281 1281 } 1282 1282 -
trunk/JavaScriptCore/kjs/nodes.cpp
r34784 r34791 107 107 #endif 108 108 109 static HashSet<ParserRefCounted*>* newTrackedObjects; 110 static HashCountedSet<ParserRefCounted*>* trackedObjectExtraRefCounts; 111 112 ParserRefCounted::ParserRefCounted() 109 ParserRefCounted::ParserRefCounted(JSGlobalData* globalData) 110 : m_globalData(globalData) 113 111 { 114 112 #ifndef NDEBUG 115 113 ParserRefCountedCounter::increment(); 116 114 #endif 117 if (! newTrackedObjects)118 newTrackedObjects = new HashSet<ParserRefCounted*>;119 newTrackedObjects->add(this);120 ASSERT( newTrackedObjects->contains(this));115 if (!m_globalData->newTrackedObjects) 116 m_globalData->newTrackedObjects = new HashSet<ParserRefCounted*>; 117 m_globalData->newTrackedObjects->add(this); 118 ASSERT(m_globalData->newTrackedObjects->contains(this)); 121 119 } 122 120 … … 131 129 { 132 130 // bumping from 0 to 1 is just removing from the new nodes set 133 if ( newTrackedObjects) {134 HashSet<ParserRefCounted*>::iterator it = newTrackedObjects->find(this);135 if (it != newTrackedObjects->end()) {136 newTrackedObjects->remove(it);137 ASSERT(! trackedObjectExtraRefCounts || !trackedObjectExtraRefCounts->contains(this));131 if (m_globalData->newTrackedObjects) { 132 HashSet<ParserRefCounted*>::iterator it = m_globalData->newTrackedObjects->find(this); 133 if (it != m_globalData->newTrackedObjects->end()) { 134 m_globalData->newTrackedObjects->remove(it); 135 ASSERT(!m_globalData->trackedObjectExtraRefCounts || !m_globalData->trackedObjectExtraRefCounts->contains(this)); 138 136 return; 139 137 } 140 138 } 141 139 142 ASSERT(! newTrackedObjects || !newTrackedObjects->contains(this));143 144 if (! trackedObjectExtraRefCounts)145 trackedObjectExtraRefCounts = new HashCountedSet<ParserRefCounted*>;146 trackedObjectExtraRefCounts->add(this);140 ASSERT(!m_globalData->newTrackedObjects || !m_globalData->newTrackedObjects->contains(this)); 141 142 if (!m_globalData->trackedObjectExtraRefCounts) 143 m_globalData->trackedObjectExtraRefCounts = new HashCountedSet<ParserRefCounted*>; 144 m_globalData->trackedObjectExtraRefCounts->add(this); 147 145 } 148 146 149 147 void ParserRefCounted::deref() 150 148 { 151 ASSERT(! newTrackedObjects || !newTrackedObjects->contains(this));152 153 if (! trackedObjectExtraRefCounts) {149 ASSERT(!m_globalData->newTrackedObjects || !m_globalData->newTrackedObjects->contains(this)); 150 151 if (!m_globalData->trackedObjectExtraRefCounts) { 154 152 delete this; 155 153 return; 156 154 } 157 155 158 HashCountedSet<ParserRefCounted*>::iterator it = trackedObjectExtraRefCounts->find(this);159 if (it == trackedObjectExtraRefCounts->end())156 HashCountedSet<ParserRefCounted*>::iterator it = m_globalData->trackedObjectExtraRefCounts->find(this); 157 if (it == m_globalData->trackedObjectExtraRefCounts->end()) 160 158 delete this; 161 159 else 162 trackedObjectExtraRefCounts->remove(it);160 m_globalData->trackedObjectExtraRefCounts->remove(it); 163 161 } 164 162 165 163 bool ParserRefCounted::hasOneRef() 166 164 { 167 if ( newTrackedObjects &&newTrackedObjects->contains(this)) {168 ASSERT(! trackedObjectExtraRefCounts || !trackedObjectExtraRefCounts->contains(this));165 if (m_globalData->newTrackedObjects && m_globalData->newTrackedObjects->contains(this)) { 166 ASSERT(!m_globalData->trackedObjectExtraRefCounts || !m_globalData->trackedObjectExtraRefCounts->contains(this)); 169 167 return false; 170 168 } 171 169 172 ASSERT(! newTrackedObjects || !newTrackedObjects->contains(this));173 174 if (! trackedObjectExtraRefCounts)170 ASSERT(!m_globalData->newTrackedObjects || !m_globalData->newTrackedObjects->contains(this)); 171 172 if (!m_globalData->trackedObjectExtraRefCounts) 175 173 return true; 176 174 177 return ! trackedObjectExtraRefCounts->contains(this);178 } 179 180 void ParserRefCounted::deleteNewObjects( )181 { 182 if (! newTrackedObjects)175 return !m_globalData->trackedObjectExtraRefCounts->contains(this); 176 } 177 178 void ParserRefCounted::deleteNewObjects(JSGlobalData* globalData) 179 { 180 if (!globalData->newTrackedObjects) 183 181 return; 184 182 185 183 #ifndef NDEBUG 186 HashSet<ParserRefCounted*>::iterator end = newTrackedObjects->end();187 for (HashSet<ParserRefCounted*>::iterator it = newTrackedObjects->begin(); it != end; ++it)188 ASSERT(! trackedObjectExtraRefCounts || !trackedObjectExtraRefCounts->contains(*it));184 HashSet<ParserRefCounted*>::iterator end = globalData->newTrackedObjects->end(); 185 for (HashSet<ParserRefCounted*>::iterator it = globalData->newTrackedObjects->begin(); it != end; ++it) 186 ASSERT(!globalData->trackedObjectExtraRefCounts || !globalData->trackedObjectExtraRefCounts->contains(*it)); 189 187 #endif 190 deleteAllValues(*newTrackedObjects); 191 delete newTrackedObjects; 192 newTrackedObjects = 0; 193 } 194 195 Node::Node() 196 : m_expectedReturnType(ObjectType) 197 { 198 m_line = JSGlobalData::threadInstance().lexer->lineNo(); 199 } 200 201 Node::Node(JSType expectedReturn) 202 : m_expectedReturnType(expectedReturn) 203 { 204 m_line = JSGlobalData::threadInstance().lexer->lineNo(); 188 deleteAllValues(*globalData->newTrackedObjects); 189 delete globalData->newTrackedObjects; 190 globalData->newTrackedObjects = 0; 191 } 192 193 Node::Node(JSGlobalData* globalData) 194 : ParserRefCounted(globalData) 195 , m_expectedReturnType(ObjectType) 196 { 197 m_line = globalData->lexer->lineNo(); 198 } 199 200 Node::Node(JSGlobalData* globalData, JSType expectedReturn) 201 : ParserRefCounted(globalData) 202 , m_expectedReturnType(expectedReturn) 203 { 204 m_line = globalData->lexer->lineNo(); 205 205 } 206 206 … … 248 248 // ------------------------------ StatementNode -------------------------------- 249 249 250 StatementNode::StatementNode() 251 : m_lastLine(-1) 250 StatementNode::StatementNode(JSGlobalData* globalData) 251 : Node(globalData) 252 , m_lastLine(-1) 252 253 { 253 254 m_line = -1; … … 272 273 // ------------------------------ BreakpointCheckStatement -------------------------------- 273 274 274 BreakpointCheckStatement::BreakpointCheckStatement(PassRefPtr<StatementNode> statement) 275 : m_statement(statement) 275 BreakpointCheckStatement::BreakpointCheckStatement(JSGlobalData* globalData, PassRefPtr<StatementNode> statement) 276 : StatementNode(globalData) 277 , m_statement(statement) 276 278 { 277 279 ASSERT(m_statement); … … 1023 1025 // ------------------------------ ConstDeclNode ---------------------------------- 1024 1026 1025 ConstDeclNode::ConstDeclNode(const Identifier& ident, ExpressionNode* init) 1026 : m_ident(ident) 1027 ConstDeclNode::ConstDeclNode(JSGlobalData* globalData, const Identifier& ident, ExpressionNode* init) 1028 : ExpressionNode(globalData) 1029 , m_ident(ident) 1027 1030 , m_init(init) 1028 1031 { … … 1107 1110 // ------------------------------ BlockNode ------------------------------------ 1108 1111 1109 BlockNode::BlockNode(SourceElements* children) 1112 BlockNode::BlockNode(JSGlobalData* globalData, SourceElements* children) 1113 : StatementNode(globalData) 1110 1114 { 1111 1115 if (children) … … 1265 1269 // ------------------------------ ForInNode ------------------------------------ 1266 1270 1267 ForInNode::ForInNode(ExpressionNode* l, ExpressionNode* expr, StatementNode* statement) 1268 : m_init(0L) 1271 ForInNode::ForInNode(JSGlobalData* globalData, ExpressionNode* l, ExpressionNode* expr, StatementNode* statement) 1272 : StatementNode(globalData) 1273 , m_init(0L) 1269 1274 , m_lexpr(l) 1270 1275 , m_expr(expr) … … 1274 1279 } 1275 1280 1276 ForInNode::ForInNode(const Identifier& ident, ExpressionNode* in, ExpressionNode* expr, StatementNode* statement) 1277 : m_ident(ident) 1278 , m_lexpr(new ResolveNode(ident)) 1281 ForInNode::ForInNode(JSGlobalData* globalData, const Identifier& ident, ExpressionNode* in, ExpressionNode* expr, StatementNode* statement) 1282 : StatementNode(globalData) 1283 , m_ident(ident) 1284 , m_lexpr(new ResolveNode(globalData, ident)) 1279 1285 , m_expr(expr) 1280 1286 , m_statement(statement) … … 1282 1288 { 1283 1289 if (in) 1284 m_init = new AssignResolveNode( ident, in, true);1290 m_init = new AssignResolveNode(globalData,ident, in, true); 1285 1291 // for( var foo = bar in baz ) 1286 1292 } … … 1566 1572 // ------------------------------ FunctionBodyNode ----------------------------- 1567 1573 1568 ScopeNode::ScopeNode( SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure)1569 : BlockNode( children)1570 , m_sourceURL( JSGlobalData::threadInstance().parser->sourceURL())1571 , m_sourceId( JSGlobalData::threadInstance().parser->sourceId())1574 ScopeNode::ScopeNode(JSGlobalData* globalData, SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure) 1575 : BlockNode(globalData, children) 1576 , m_sourceURL(globalData->parser->sourceURL()) 1577 , m_sourceId(globalData->parser->sourceId()) 1572 1578 , m_usesEval(usesEval) 1573 1579 , m_needsClosure(needsClosure) … … 1581 1587 // ------------------------------ ProgramNode ----------------------------- 1582 1588 1583 ProgramNode::ProgramNode( SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure)1584 : ScopeNode( children, varStack, funcStack, usesEval, needsClosure)1585 { 1586 } 1587 1588 ProgramNode* ProgramNode::create( SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure)1589 { 1590 return new ProgramNode( children, varStack, funcStack, usesEval, needsClosure);1589 ProgramNode::ProgramNode(JSGlobalData* globalData, SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure) 1590 : ScopeNode(globalData, children, varStack, funcStack, usesEval, needsClosure) 1591 { 1592 } 1593 1594 ProgramNode* ProgramNode::create(JSGlobalData* globalData, SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure) 1595 { 1596 return new ProgramNode(globalData, children, varStack, funcStack, usesEval, needsClosure); 1591 1597 } 1592 1598 1593 1599 // ------------------------------ EvalNode ----------------------------- 1594 1600 1595 EvalNode::EvalNode( SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure)1596 : ScopeNode( children, varStack, funcStack, usesEval, needsClosure)1601 EvalNode::EvalNode(JSGlobalData* globalData, SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure) 1602 : ScopeNode(globalData, children, varStack, funcStack, usesEval, needsClosure) 1597 1603 { 1598 1604 } … … 1624 1630 } 1625 1631 1626 EvalNode* EvalNode::create( SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure)1627 { 1628 return new EvalNode( children, varStack, funcStack, usesEval, needsClosure);1632 EvalNode* EvalNode::create(JSGlobalData* globalData, SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure) 1633 { 1634 return new EvalNode(globalData, children, varStack, funcStack, usesEval, needsClosure); 1629 1635 } 1630 1636 1631 1637 // ------------------------------ FunctionBodyNode ----------------------------- 1632 1638 1633 FunctionBodyNode::FunctionBodyNode( SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure)1634 : ScopeNode( children, varStack, funcStack, usesEval, needsClosure)1639 FunctionBodyNode::FunctionBodyNode(JSGlobalData* globalData, SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure) 1640 : ScopeNode(globalData, children, varStack, funcStack, usesEval, needsClosure) 1635 1641 { 1636 1642 } … … 1642 1648 } 1643 1649 1644 FunctionBodyNode* FunctionBodyNode::create( SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure)1645 { 1646 return new FunctionBodyNode( children, varStack, funcStack, usesEval, needsClosure);1650 FunctionBodyNode* FunctionBodyNode::create(JSGlobalData* globalData, SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure) 1651 { 1652 return new FunctionBodyNode(globalData, children, varStack, funcStack, usesEval, needsClosure); 1647 1653 } 1648 1654 -
trunk/JavaScriptCore/kjs/nodes.h
r34711 r34791 120 120 class ParserRefCounted : Noncopyable { 121 121 protected: 122 ParserRefCounted( ) KJS_FAST_CALL;122 ParserRefCounted(JSGlobalData*) KJS_FAST_CALL; 123 123 ParserRefCounted(PlacementNewAdoptType) KJS_FAST_CALL 124 124 { 125 125 } 126 127 JSGlobalData* m_globalData; 126 128 127 129 public: … … 130 132 bool hasOneRef() KJS_FAST_CALL; 131 133 132 static void deleteNewObjects( ) KJS_FAST_CALL;134 static void deleteNewObjects(JSGlobalData*) KJS_FAST_CALL; 133 135 134 136 virtual ~ParserRefCounted(); … … 141 143 typedef DeclarationStacks::FunctionStack FunctionStack; 142 144 143 Node( ) KJS_FAST_CALL;145 Node(JSGlobalData*) KJS_FAST_CALL; 144 146 Node(PlacementNewAdoptType placementAdopt) KJS_FAST_CALL 145 147 : ParserRefCounted(placementAdopt) … … 187 189 188 190 protected: 189 Node(JS Type) KJS_FAST_CALL; // used by ExpressionNode191 Node(JSGlobalData*, JSType) KJS_FAST_CALL; // used by ExpressionNode 190 192 191 193 RegisterID* emitThrowError(CodeGenerator&, ErrorType, const char* msg); … … 198 200 class ExpressionNode : public Node { 199 201 public: 200 ExpressionNode( ) KJS_FAST_CALL : Node() {}201 ExpressionNode(JS Type expectedReturn) KJS_FAST_CALL202 : Node( expectedReturn)202 ExpressionNode(JSGlobalData* globalData) KJS_FAST_CALL : Node(globalData) {} 203 ExpressionNode(JSGlobalData* globalData, JSType expectedReturn) KJS_FAST_CALL 204 : Node(globalData, expectedReturn) 203 205 { 204 206 } … … 225 227 class StatementNode : public Node { 226 228 public: 227 StatementNode( ) KJS_FAST_CALL;229 StatementNode(JSGlobalData*) KJS_FAST_CALL; 228 230 void setLoc(int line0, int line1) KJS_FAST_CALL; 229 231 int firstLine() const KJS_FAST_CALL { return lineNo(); } … … 243 245 class NullNode : public ExpressionNode { 244 246 public: 245 NullNode( ) KJS_FAST_CALL246 : ExpressionNode( NullType)247 NullNode(JSGlobalData* globalData) KJS_FAST_CALL 248 : ExpressionNode(globalData, NullType) 247 249 { 248 250 } … … 256 258 class BooleanNode : public ExpressionNode { 257 259 public: 258 BooleanNode( bool value) KJS_FAST_CALL259 : ExpressionNode( BooleanType)260 BooleanNode(JSGlobalData* globalData, bool value) KJS_FAST_CALL 261 : ExpressionNode(globalData, BooleanType) 260 262 , m_value(value) 261 263 { … … 274 276 class NumberNode : public ExpressionNode { 275 277 public: 276 NumberNode( double v) KJS_FAST_CALL277 : ExpressionNode( NumberType)278 NumberNode(JSGlobalData* globalData, double v) KJS_FAST_CALL 279 : ExpressionNode(globalData, NumberType) 278 280 , m_double(v) 279 281 { … … 296 298 class ImmediateNumberNode : public NumberNode { 297 299 public: 298 ImmediateNumberNode(JS Value* v, double d) KJS_FAST_CALL299 : NumberNode( d)300 ImmediateNumberNode(JSGlobalData* globalData, JSValue* v, double d) KJS_FAST_CALL 301 : NumberNode(globalData, d) 300 302 , m_value(v) 301 303 { … … 311 313 class StringNode : public ExpressionNode { 312 314 public: 313 StringNode( const UString* v) KJS_FAST_CALL314 : ExpressionNode( StringType)315 StringNode(JSGlobalData* globalData, const UString* v) KJS_FAST_CALL 316 : ExpressionNode(globalData, StringType) 315 317 , m_value(*v) 316 318 { … … 329 331 class RegExpNode : public ExpressionNode { 330 332 public: 331 RegExpNode(const UString& pattern, const UString& flags) KJS_FAST_CALL 332 : m_regExp(RegExp::create(pattern, flags)) 333 RegExpNode(JSGlobalData* globalData, const UString& pattern, const UString& flags) KJS_FAST_CALL 334 : ExpressionNode(globalData) 335 , m_regExp(RegExp::create(pattern, flags)) 333 336 { 334 337 } … … 345 348 class ThisNode : public ExpressionNode { 346 349 public: 347 ThisNode() KJS_FAST_CALL 350 ThisNode(JSGlobalData* globalData) KJS_FAST_CALL 351 : ExpressionNode(globalData) 348 352 { 349 353 } … … 357 361 class ResolveNode : public ExpressionNode { 358 362 public: 359 ResolveNode(const Identifier& ident) KJS_FAST_CALL 360 : m_ident(ident) 363 ResolveNode(JSGlobalData* globalData, const Identifier& ident) KJS_FAST_CALL 364 : ExpressionNode(globalData) 365 , m_ident(ident) 361 366 { 362 367 } … … 387 392 class ElementNode : public Node { 388 393 public: 389 ElementNode(int elision, ExpressionNode* node) KJS_FAST_CALL 390 : m_elision(elision) 394 ElementNode(JSGlobalData* globalData, int elision, ExpressionNode* node) KJS_FAST_CALL 395 : Node(globalData) 396 , m_elision(elision) 391 397 , m_node(node) 392 398 { 393 399 } 394 400 395 ElementNode(ElementNode* l, int elision, ExpressionNode* node) KJS_FAST_CALL 396 : m_elision(elision) 401 ElementNode(JSGlobalData* globalData, ElementNode* l, int elision, ExpressionNode* node) KJS_FAST_CALL 402 : Node(globalData) 403 , m_elision(elision) 397 404 , m_node(node) 398 405 { … … 414 421 class ArrayNode : public ExpressionNode { 415 422 public: 416 ArrayNode(int elision) KJS_FAST_CALL 417 : m_elision(elision) 423 ArrayNode(JSGlobalData* globalData, int elision) KJS_FAST_CALL 424 : ExpressionNode(globalData) 425 , m_elision(elision) 418 426 , m_optional(true) 419 427 { 420 428 } 421 429 422 ArrayNode(ElementNode* element) KJS_FAST_CALL 423 : m_element(element) 430 ArrayNode(JSGlobalData* globalData, ElementNode* element) KJS_FAST_CALL 431 : ExpressionNode(globalData) 432 , m_element(element) 424 433 , m_elision(0) 425 434 , m_optional(false) … … 427 436 } 428 437 429 ArrayNode(int elision, ElementNode* element) KJS_FAST_CALL 430 : m_element(element) 438 ArrayNode(JSGlobalData* globalData, int elision, ElementNode* element) KJS_FAST_CALL 439 : ExpressionNode(globalData) 440 , m_element(element) 431 441 , m_elision(elision) 432 442 , m_optional(true) … … 449 459 enum Type { Constant, Getter, Setter }; 450 460 451 PropertyNode(const Identifier& name, ExpressionNode* assign, Type type) KJS_FAST_CALL 452 : m_name(name) 461 PropertyNode(JSGlobalData* globalData, const Identifier& name, ExpressionNode* assign, Type type) KJS_FAST_CALL 462 : Node(globalData) 463 , m_name(name) 453 464 , m_assign(assign) 454 465 , m_type(type) … … 470 481 class PropertyListNode : public Node { 471 482 public: 472 PropertyListNode(PropertyNode* node) KJS_FAST_CALL 473 : m_node(node) 474 { 475 } 476 477 PropertyListNode(PropertyNode* node, PropertyListNode* list) KJS_FAST_CALL 478 : m_node(node) 483 PropertyListNode(JSGlobalData* globalData, PropertyNode* node) KJS_FAST_CALL 484 : Node(globalData) 485 , m_node(node) 486 { 487 } 488 489 PropertyListNode(JSGlobalData* globalData, PropertyNode* node, PropertyListNode* list) KJS_FAST_CALL 490 : Node(globalData) 491 , m_node(node) 479 492 { 480 493 list->m_next = this; … … 495 508 class ObjectLiteralNode : public ExpressionNode { 496 509 public: 497 ObjectLiteralNode() KJS_FAST_CALL 498 { 499 } 500 501 ObjectLiteralNode(PropertyListNode* list) KJS_FAST_CALL 502 : m_list(list) 510 ObjectLiteralNode(JSGlobalData* globalData) KJS_FAST_CALL 511 : ExpressionNode(globalData) 512 { 513 } 514 515 ObjectLiteralNode(JSGlobalData* globalData, PropertyListNode* list) KJS_FAST_CALL 516 : ExpressionNode(globalData) 517 , m_list(list) 503 518 { 504 519 } … … 515 530 class BracketAccessorNode : public ExpressionNode { 516 531 public: 517 BracketAccessorNode(ExpressionNode* base, ExpressionNode* subscript, bool subscriptHasAssignments) KJS_FAST_CALL 518 : m_base(base) 532 BracketAccessorNode(JSGlobalData* globalData, ExpressionNode* base, ExpressionNode* subscript, bool subscriptHasAssignments) KJS_FAST_CALL 533 : ExpressionNode(globalData) 534 , m_base(base) 519 535 , m_subscript(subscript) 520 536 , m_subscriptHasAssignments(subscriptHasAssignments) … … 540 556 class DotAccessorNode : public ExpressionNode { 541 557 public: 542 DotAccessorNode(ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 543 : m_base(base) 558 DotAccessorNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 559 : ExpressionNode(globalData) 560 , m_base(base) 544 561 , m_ident(ident) 545 562 { … … 562 579 class ArgumentListNode : public Node { 563 580 public: 564 ArgumentListNode(ExpressionNode* expr) KJS_FAST_CALL 565 : m_expr(expr) 566 { 567 } 568 569 ArgumentListNode(ArgumentListNode* listNode, ExpressionNode* expr) KJS_FAST_CALL 570 : m_expr(expr) 581 ArgumentListNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 582 : Node(globalData) 583 , m_expr(expr) 584 { 585 } 586 587 ArgumentListNode(JSGlobalData* globalData, ArgumentListNode* listNode, ExpressionNode* expr) KJS_FAST_CALL 588 : Node(globalData) 589 , m_expr(expr) 571 590 { 572 591 listNode->m_next = this; … … 585 604 class ArgumentsNode : public Node { 586 605 public: 587 ArgumentsNode() KJS_FAST_CALL 588 { 589 } 590 591 ArgumentsNode(ArgumentListNode* listNode) KJS_FAST_CALL 592 : m_listNode(listNode) 606 ArgumentsNode(JSGlobalData* globalData) KJS_FAST_CALL 607 : Node(globalData) 608 { 609 } 610 611 ArgumentsNode(JSGlobalData* globalData, ArgumentListNode* listNode) KJS_FAST_CALL 612 : Node(globalData) 613 , m_listNode(listNode) 593 614 { 594 615 } … … 602 623 class NewExprNode : public ExpressionNode { 603 624 public: 604 NewExprNode(ExpressionNode* expr) KJS_FAST_CALL 605 : m_expr(expr) 606 { 607 } 608 609 NewExprNode(ExpressionNode* expr, ArgumentsNode* args) KJS_FAST_CALL 610 : m_expr(expr) 625 NewExprNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 626 : ExpressionNode(globalData) 627 , m_expr(expr) 628 { 629 } 630 631 NewExprNode(JSGlobalData* globalData, ExpressionNode* expr, ArgumentsNode* args) KJS_FAST_CALL 632 : ExpressionNode(globalData) 633 , m_expr(expr) 611 634 , m_args(args) 612 635 { … … 625 648 class EvalFunctionCallNode : public ExpressionNode { 626 649 public: 627 EvalFunctionCallNode(ArgumentsNode* args) KJS_FAST_CALL 628 : m_args(args) 650 EvalFunctionCallNode(JSGlobalData* globalData, ArgumentsNode* args) KJS_FAST_CALL 651 : ExpressionNode(globalData) 652 , m_args(args) 629 653 { 630 654 } … … 640 664 class FunctionCallValueNode : public ExpressionNode { 641 665 public: 642 FunctionCallValueNode(ExpressionNode* expr, ArgumentsNode* args) KJS_FAST_CALL 643 : m_expr(expr) 666 FunctionCallValueNode(JSGlobalData* globalData, ExpressionNode* expr, ArgumentsNode* args) KJS_FAST_CALL 667 : ExpressionNode(globalData) 668 , m_expr(expr) 644 669 , m_args(args) 645 670 { … … 657 682 class FunctionCallResolveNode : public ExpressionNode { 658 683 public: 659 FunctionCallResolveNode(const Identifier& ident, ArgumentsNode* args) KJS_FAST_CALL 660 : m_ident(ident) 684 FunctionCallResolveNode(JSGlobalData* globalData, const Identifier& ident, ArgumentsNode* args) KJS_FAST_CALL 685 : ExpressionNode(globalData) 686 , m_ident(ident) 661 687 , m_args(args) 662 688 { … … 684 710 class FunctionCallBracketNode : public ExpressionNode { 685 711 public: 686 FunctionCallBracketNode(ExpressionNode* base, ExpressionNode* subscript, ArgumentsNode* args) KJS_FAST_CALL 687 : m_base(base) 712 FunctionCallBracketNode(JSGlobalData* globalData, ExpressionNode* base, ExpressionNode* subscript, ArgumentsNode* args) KJS_FAST_CALL 713 : ExpressionNode(globalData) 714 , m_base(base) 688 715 , m_subscript(subscript) 689 716 , m_args(args) … … 703 730 class FunctionCallDotNode : public ExpressionNode { 704 731 public: 705 FunctionCallDotNode(ExpressionNode* base, const Identifier& ident, ArgumentsNode* args) KJS_FAST_CALL 706 : m_base(base) 732 FunctionCallDotNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident, ArgumentsNode* args) KJS_FAST_CALL 733 : ExpressionNode(globalData) 734 , m_base(base) 707 735 , m_ident(ident) 708 736 , m_args(args) … … 722 750 class PrePostResolveNode : public ExpressionNode { 723 751 public: 724 PrePostResolveNode( const Identifier& ident) KJS_FAST_CALL725 : ExpressionNode( NumberType)752 PrePostResolveNode(JSGlobalData* globalData, const Identifier& ident) KJS_FAST_CALL 753 : ExpressionNode(globalData, NumberType) 726 754 , m_ident(ident) 727 755 { … … 741 769 class PostIncResolveNode : public PrePostResolveNode { 742 770 public: 743 PostIncResolveNode( const Identifier& ident) KJS_FAST_CALL744 : PrePostResolveNode( ident)771 PostIncResolveNode(JSGlobalData* globalData, const Identifier& ident) KJS_FAST_CALL 772 : PrePostResolveNode(globalData, ident) 745 773 { 746 774 } … … 758 786 class PostDecResolveNode : public PrePostResolveNode { 759 787 public: 760 PostDecResolveNode( const Identifier& ident) KJS_FAST_CALL761 : PrePostResolveNode( ident)788 PostDecResolveNode(JSGlobalData* globalData, const Identifier& ident) KJS_FAST_CALL 789 : PrePostResolveNode(globalData, ident) 762 790 { 763 791 } … … 776 804 class PostfixBracketNode : public ExpressionNode { 777 805 public: 778 PostfixBracketNode(ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL 779 : m_base(base) 806 PostfixBracketNode(JSGlobalData* globalData, ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL 807 : ExpressionNode(globalData) 808 , m_base(base) 780 809 , m_subscript(subscript) 781 810 { … … 791 820 class PostIncBracketNode : public PostfixBracketNode { 792 821 public: 793 PostIncBracketNode( ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL794 : PostfixBracketNode( base, subscript)822 PostIncBracketNode(JSGlobalData* globalData, ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL 823 : PostfixBracketNode(globalData, base, subscript) 795 824 { 796 825 } … … 803 832 class PostDecBracketNode : public PostfixBracketNode { 804 833 public: 805 PostDecBracketNode( ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL806 : PostfixBracketNode( base, subscript)834 PostDecBracketNode(JSGlobalData* globalData, ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL 835 : PostfixBracketNode(globalData, base, subscript) 807 836 { 808 837 } … … 815 844 class PostfixDotNode : public ExpressionNode { 816 845 public: 817 PostfixDotNode(ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 818 : m_base(base) 846 PostfixDotNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 847 : ExpressionNode(globalData) 848 , m_base(base) 819 849 , m_ident(ident) 820 850 { … … 830 860 class PostIncDotNode : public PostfixDotNode { 831 861 public: 832 PostIncDotNode( ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL833 : PostfixDotNode( base, ident)862 PostIncDotNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 863 : PostfixDotNode(globalData, base, ident) 834 864 { 835 865 } … … 842 872 class PostDecDotNode : public PostfixDotNode { 843 873 public: 844 PostDecDotNode( ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL845 : PostfixDotNode( base, ident)874 PostDecDotNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 875 : PostfixDotNode(globalData, base, ident) 846 876 { 847 877 } … … 854 884 class PostfixErrorNode : public ExpressionNode { 855 885 public: 856 PostfixErrorNode(ExpressionNode* expr, Operator oper) KJS_FAST_CALL 857 : m_expr(expr) 886 PostfixErrorNode(JSGlobalData* globalData, ExpressionNode* expr, Operator oper) KJS_FAST_CALL 887 : ExpressionNode(globalData) 888 , m_expr(expr) 858 889 , m_operator(oper) 859 890 { … … 871 902 class DeleteResolveNode : public ExpressionNode { 872 903 public: 873 DeleteResolveNode(const Identifier& ident) KJS_FAST_CALL 874 : m_ident(ident) 904 DeleteResolveNode(JSGlobalData* globalData, const Identifier& ident) KJS_FAST_CALL 905 : ExpressionNode(globalData) 906 , m_ident(ident) 875 907 { 876 908 } … … 893 925 class DeleteBracketNode : public ExpressionNode { 894 926 public: 895 DeleteBracketNode(ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL 896 : m_base(base) 927 DeleteBracketNode(JSGlobalData* globalData, ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL 928 : ExpressionNode(globalData) 929 , m_base(base) 897 930 , m_subscript(subscript) 898 931 { … … 911 944 class DeleteDotNode : public ExpressionNode { 912 945 public: 913 DeleteDotNode(ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 914 : m_base(base) 946 DeleteDotNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 947 : ExpressionNode(globalData) 948 , m_base(base) 915 949 , m_ident(ident) 916 950 { … … 929 963 class DeleteValueNode : public ExpressionNode { 930 964 public: 931 DeleteValueNode(ExpressionNode* expr) KJS_FAST_CALL 932 : m_expr(expr) 965 DeleteValueNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 966 : ExpressionNode(globalData) 967 , m_expr(expr) 933 968 { 934 969 } … … 945 980 class VoidNode : public ExpressionNode { 946 981 public: 947 VoidNode(ExpressionNode* expr) KJS_FAST_CALL 948 : m_expr(expr) 982 VoidNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 983 : ExpressionNode(globalData) 984 , m_expr(expr) 949 985 { 950 986 } … … 961 997 class TypeOfResolveNode : public ExpressionNode { 962 998 public: 963 TypeOfResolveNode( const Identifier& ident) KJS_FAST_CALL964 : ExpressionNode( StringType)999 TypeOfResolveNode(JSGlobalData* globalData, const Identifier& ident) KJS_FAST_CALL 1000 : ExpressionNode(globalData, StringType) 965 1001 , m_ident(ident) 966 1002 { … … 988 1024 class TypeOfValueNode : public ExpressionNode { 989 1025 public: 990 TypeOfValueNode( ExpressionNode* expr) KJS_FAST_CALL991 : ExpressionNode( StringType)1026 TypeOfValueNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 1027 : ExpressionNode(globalData, StringType) 992 1028 , m_expr(expr) 993 1029 { … … 1005 1041 class PreIncResolveNode : public PrePostResolveNode { 1006 1042 public: 1007 PreIncResolveNode( const Identifier& ident) KJS_FAST_CALL1008 : PrePostResolveNode( ident)1043 PreIncResolveNode(JSGlobalData* globalData, const Identifier& ident) KJS_FAST_CALL 1044 : PrePostResolveNode(globalData, ident) 1009 1045 { 1010 1046 } … … 1023 1059 class PreDecResolveNode : public PrePostResolveNode { 1024 1060 public: 1025 PreDecResolveNode( const Identifier& ident) KJS_FAST_CALL1026 : PrePostResolveNode( ident)1061 PreDecResolveNode(JSGlobalData* globalData, const Identifier& ident) KJS_FAST_CALL 1062 : PrePostResolveNode(globalData, ident) 1027 1063 { 1028 1064 } … … 1041 1077 class PrefixBracketNode : public ExpressionNode { 1042 1078 public: 1043 PrefixBracketNode(ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL 1044 : m_base(base) 1079 PrefixBracketNode(JSGlobalData* globalData, ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL 1080 : ExpressionNode(globalData) 1081 , m_base(base) 1045 1082 , m_subscript(subscript) 1046 1083 { … … 1056 1093 class PreIncBracketNode : public PrefixBracketNode { 1057 1094 public: 1058 PreIncBracketNode( ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL1059 : PrefixBracketNode( base, subscript)1095 PreIncBracketNode(JSGlobalData* globalData, ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL 1096 : PrefixBracketNode(globalData, base, subscript) 1060 1097 { 1061 1098 } … … 1068 1105 class PreDecBracketNode : public PrefixBracketNode { 1069 1106 public: 1070 PreDecBracketNode( ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL1071 : PrefixBracketNode( base, subscript)1107 PreDecBracketNode(JSGlobalData* globalData, ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL 1108 : PrefixBracketNode(globalData, base, subscript) 1072 1109 { 1073 1110 } … … 1080 1117 class PrefixDotNode : public ExpressionNode { 1081 1118 public: 1082 PrefixDotNode(ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 1083 : m_base(base) 1119 PrefixDotNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 1120 : ExpressionNode(globalData) 1121 , m_base(base) 1084 1122 , m_ident(ident) 1085 1123 { … … 1095 1133 class PreIncDotNode : public PrefixDotNode { 1096 1134 public: 1097 PreIncDotNode( ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL1098 : PrefixDotNode( base, ident)1135 PreIncDotNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 1136 : PrefixDotNode(globalData, base, ident) 1099 1137 { 1100 1138 } … … 1107 1145 class PreDecDotNode : public PrefixDotNode { 1108 1146 public: 1109 PreDecDotNode( ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL1110 : PrefixDotNode( base, ident)1147 PreDecDotNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident) KJS_FAST_CALL 1148 : PrefixDotNode(globalData, base, ident) 1111 1149 { 1112 1150 } … … 1119 1157 class PrefixErrorNode : public ExpressionNode { 1120 1158 public: 1121 PrefixErrorNode(ExpressionNode* expr, Operator oper) KJS_FAST_CALL 1122 : m_expr(expr) 1159 PrefixErrorNode(JSGlobalData* globalData, ExpressionNode* expr, Operator oper) KJS_FAST_CALL 1160 : ExpressionNode(globalData) 1161 , m_expr(expr) 1123 1162 , m_operator(oper) 1124 1163 { … … 1136 1175 class UnaryOpNode : public ExpressionNode { 1137 1176 public: 1138 UnaryOpNode(ExpressionNode* expr) 1139 : m_expr(expr) 1140 { 1141 } 1142 1143 UnaryOpNode(JSType type, ExpressionNode* expr) 1144 : ExpressionNode(type) 1177 UnaryOpNode(JSGlobalData* globalData, ExpressionNode* expr) 1178 : ExpressionNode(globalData) 1145 1179 , m_expr(expr) 1146 1180 { 1147 1181 } 1148 1182 1183 UnaryOpNode(JSGlobalData* globalData, JSType type, ExpressionNode* expr) 1184 : ExpressionNode(globalData, type) 1185 , m_expr(expr) 1186 { 1187 } 1188 1149 1189 virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL; 1150 1190 virtual OpcodeID opcode() const KJS_FAST_CALL = 0; … … 1156 1196 class UnaryPlusNode : public UnaryOpNode { 1157 1197 public: 1158 UnaryPlusNode( ExpressionNode* expr) KJS_FAST_CALL1159 : UnaryOpNode( NumberType, expr)1198 UnaryPlusNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 1199 : UnaryOpNode(globalData, NumberType, expr) 1160 1200 { 1161 1201 } … … 1168 1208 class NegateNode : public UnaryOpNode { 1169 1209 public: 1170 NegateNode( ExpressionNode* expr) KJS_FAST_CALL1171 : UnaryOpNode( NumberType, expr)1210 NegateNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 1211 : UnaryOpNode(globalData, NumberType, expr) 1172 1212 { 1173 1213 } … … 1180 1220 class BitwiseNotNode : public UnaryOpNode { 1181 1221 public: 1182 BitwiseNotNode( ExpressionNode* expr) KJS_FAST_CALL1183 : UnaryOpNode( NumberType, expr)1222 BitwiseNotNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 1223 : UnaryOpNode(globalData, NumberType, expr) 1184 1224 { 1185 1225 } … … 1192 1232 class LogicalNotNode : public UnaryOpNode { 1193 1233 public: 1194 LogicalNotNode( ExpressionNode* expr) KJS_FAST_CALL1195 : UnaryOpNode( BooleanType, expr)1234 LogicalNotNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 1235 : UnaryOpNode(globalData, BooleanType, expr) 1196 1236 { 1197 1237 } … … 1204 1244 class BinaryOpNode : public ExpressionNode { 1205 1245 public: 1206 BinaryOpNode(ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) 1207 : m_term1(term1) 1208 , m_term2(term2) 1209 , m_rightHasAssignments(rightHasAssignments) 1210 { 1211 } 1212 1213 BinaryOpNode(JSType type, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) 1214 : ExpressionNode(type) 1246 BinaryOpNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) 1247 : ExpressionNode(globalData) 1215 1248 , m_term1(term1) 1216 1249 , m_term2(term2) … … 1219 1252 } 1220 1253 1254 BinaryOpNode(JSGlobalData* globalData, JSType type, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) 1255 : ExpressionNode(globalData, type) 1256 , m_term1(term1) 1257 , m_term2(term2) 1258 , m_rightHasAssignments(rightHasAssignments) 1259 { 1260 } 1261 1221 1262 virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL; 1222 1263 virtual OpcodeID opcode() const KJS_FAST_CALL = 0; … … 1230 1271 class ReverseBinaryOpNode : public ExpressionNode { 1231 1272 public: 1232 ReverseBinaryOpNode(ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) 1233 : m_term1(term1) 1234 , m_term2(term2) 1235 , m_rightHasAssignments(rightHasAssignments) 1236 { 1237 } 1238 1239 ReverseBinaryOpNode(JSType type, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) 1240 : ExpressionNode(type) 1273 ReverseBinaryOpNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) 1274 : ExpressionNode(globalData) 1241 1275 , m_term1(term1) 1242 1276 , m_term2(term2) … … 1245 1279 } 1246 1280 1281 ReverseBinaryOpNode(JSGlobalData* globalData, JSType type, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) 1282 : ExpressionNode(globalData, type) 1283 , m_term1(term1) 1284 , m_term2(term2) 1285 , m_rightHasAssignments(rightHasAssignments) 1286 { 1287 } 1288 1247 1289 virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL; 1248 1290 virtual OpcodeID opcode() const KJS_FAST_CALL = 0; … … 1256 1298 class MultNode : public BinaryOpNode { 1257 1299 public: 1258 MultNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1259 : BinaryOpNode( NumberType, term1, term2, rightHasAssignments)1300 MultNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1301 : BinaryOpNode(globalData, NumberType, term1, term2, rightHasAssignments) 1260 1302 { 1261 1303 } … … 1268 1310 class DivNode : public BinaryOpNode { 1269 1311 public: 1270 DivNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1271 : BinaryOpNode( NumberType, term1, term2, rightHasAssignments)1312 DivNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1313 : BinaryOpNode(globalData, NumberType, term1, term2, rightHasAssignments) 1272 1314 { 1273 1315 } … … 1280 1322 class ModNode : public BinaryOpNode { 1281 1323 public: 1282 ModNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1283 : BinaryOpNode( NumberType, term1, term2, rightHasAssignments)1324 ModNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1325 : BinaryOpNode(globalData, NumberType, term1, term2, rightHasAssignments) 1284 1326 { 1285 1327 } … … 1292 1334 class AddNode : public BinaryOpNode { 1293 1335 public: 1294 AddNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1295 : BinaryOpNode( term1, term2, rightHasAssignments)1336 AddNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1337 : BinaryOpNode(globalData, term1, term2, rightHasAssignments) 1296 1338 { 1297 1339 } … … 1304 1346 class SubNode : public BinaryOpNode { 1305 1347 public: 1306 SubNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1307 : BinaryOpNode( term1, term2, rightHasAssignments)1348 SubNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1349 : BinaryOpNode(globalData, term1, term2, rightHasAssignments) 1308 1350 { 1309 1351 } … … 1316 1358 class LeftShiftNode : public BinaryOpNode { 1317 1359 public: 1318 LeftShiftNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1319 : BinaryOpNode( NumberType, term1, term2, rightHasAssignments)1360 LeftShiftNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1361 : BinaryOpNode(globalData, NumberType, term1, term2, rightHasAssignments) 1320 1362 { 1321 1363 } … … 1328 1370 class RightShiftNode : public BinaryOpNode { 1329 1371 public: 1330 RightShiftNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1331 : BinaryOpNode( NumberType, term1, term2, rightHasAssignments)1372 RightShiftNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1373 : BinaryOpNode(globalData, NumberType, term1, term2, rightHasAssignments) 1332 1374 { 1333 1375 } … … 1340 1382 class UnsignedRightShiftNode : public BinaryOpNode { 1341 1383 public: 1342 UnsignedRightShiftNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1343 : BinaryOpNode( NumberType, term1, term2, rightHasAssignments)1384 UnsignedRightShiftNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1385 : BinaryOpNode(globalData, NumberType, term1, term2, rightHasAssignments) 1344 1386 { 1345 1387 } … … 1352 1394 class LessNode : public BinaryOpNode { 1353 1395 public: 1354 LessNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1355 : BinaryOpNode( BooleanType, term1, term2, rightHasAssignments)1396 LessNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1397 : BinaryOpNode(globalData, BooleanType, term1, term2, rightHasAssignments) 1356 1398 { 1357 1399 } … … 1364 1406 class GreaterNode : public ReverseBinaryOpNode { 1365 1407 public: 1366 GreaterNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1367 : ReverseBinaryOpNode( BooleanType, term1, term2, rightHasAssignments)1408 GreaterNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1409 : ReverseBinaryOpNode(globalData, BooleanType, term1, term2, rightHasAssignments) 1368 1410 { 1369 1411 } … … 1376 1418 class LessEqNode : public BinaryOpNode { 1377 1419 public: 1378 LessEqNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1379 : BinaryOpNode( BooleanType, term1, term2, rightHasAssignments)1420 LessEqNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1421 : BinaryOpNode(globalData, BooleanType, term1, term2, rightHasAssignments) 1380 1422 { 1381 1423 } … … 1388 1430 class GreaterEqNode : public ReverseBinaryOpNode { 1389 1431 public: 1390 GreaterEqNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1391 : ReverseBinaryOpNode( BooleanType, term1, term2, rightHasAssignments)1432 GreaterEqNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1433 : ReverseBinaryOpNode(globalData, BooleanType, term1, term2, rightHasAssignments) 1392 1434 { 1393 1435 } … … 1400 1442 class InstanceOfNode : public BinaryOpNode { 1401 1443 public: 1402 InstanceOfNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1403 : BinaryOpNode( BooleanType, term1, term2, rightHasAssignments)1444 InstanceOfNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1445 : BinaryOpNode(globalData, BooleanType, term1, term2, rightHasAssignments) 1404 1446 { 1405 1447 } … … 1412 1454 class InNode : public BinaryOpNode { 1413 1455 public: 1414 InNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1415 : BinaryOpNode( term1, term2, rightHasAssignments)1456 InNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1457 : BinaryOpNode(globalData, term1, term2, rightHasAssignments) 1416 1458 { 1417 1459 } … … 1424 1466 class EqualNode : public BinaryOpNode { 1425 1467 public: 1426 EqualNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1427 : BinaryOpNode( BooleanType, term1, term2, rightHasAssignments)1468 EqualNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1469 : BinaryOpNode(globalData, BooleanType, term1, term2, rightHasAssignments) 1428 1470 { 1429 1471 } … … 1436 1478 class NotEqualNode : public BinaryOpNode { 1437 1479 public: 1438 NotEqualNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1439 : BinaryOpNode( BooleanType, term1, term2, rightHasAssignments)1480 NotEqualNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1481 : BinaryOpNode(globalData, BooleanType, term1, term2, rightHasAssignments) 1440 1482 { 1441 1483 } … … 1448 1490 class StrictEqualNode : public BinaryOpNode { 1449 1491 public: 1450 StrictEqualNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1451 : BinaryOpNode( BooleanType, term1, term2, rightHasAssignments)1492 StrictEqualNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1493 : BinaryOpNode(globalData, BooleanType, term1, term2, rightHasAssignments) 1452 1494 { 1453 1495 } … … 1460 1502 class NotStrictEqualNode : public BinaryOpNode { 1461 1503 public: 1462 NotStrictEqualNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1463 : BinaryOpNode( BooleanType, term1, term2, rightHasAssignments)1504 NotStrictEqualNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1505 : BinaryOpNode(globalData, BooleanType, term1, term2, rightHasAssignments) 1464 1506 { 1465 1507 } … … 1472 1514 class BitAndNode : public BinaryOpNode { 1473 1515 public: 1474 BitAndNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1475 : BinaryOpNode( NumberType, term1, term2, rightHasAssignments)1516 BitAndNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1517 : BinaryOpNode(globalData, NumberType, term1, term2, rightHasAssignments) 1476 1518 { 1477 1519 } … … 1484 1526 class BitOrNode : public BinaryOpNode { 1485 1527 public: 1486 BitOrNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1487 : BinaryOpNode( NumberType, term1, term2, rightHasAssignments)1528 BitOrNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1529 : BinaryOpNode(globalData, NumberType, term1, term2, rightHasAssignments) 1488 1530 { 1489 1531 } … … 1496 1538 class BitXOrNode : public BinaryOpNode { 1497 1539 public: 1498 BitXOrNode( ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL1499 : BinaryOpNode( NumberType, term1, term2, rightHasAssignments)1540 BitXOrNode(JSGlobalData* globalData, ExpressionNode* term1, ExpressionNode* term2, bool rightHasAssignments) KJS_FAST_CALL 1541 : BinaryOpNode(globalData, NumberType, term1, term2, rightHasAssignments) 1500 1542 { 1501 1543 } … … 1511 1553 class LogicalAndNode : public ExpressionNode { 1512 1554 public: 1513 LogicalAndNode( ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL1514 : ExpressionNode( BooleanType)1555 LogicalAndNode(JSGlobalData* globalData, ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL 1556 : ExpressionNode(globalData, BooleanType) 1515 1557 , m_expr1(expr1) 1516 1558 , m_expr2(expr2) … … 1529 1571 class LogicalOrNode : public ExpressionNode { 1530 1572 public: 1531 LogicalOrNode( ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL1532 : ExpressionNode( BooleanType)1573 LogicalOrNode(JSGlobalData* globalData, ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL 1574 : ExpressionNode(globalData, BooleanType) 1533 1575 , m_expr1(expr1) 1534 1576 , m_expr2(expr2) … … 1550 1592 class ConditionalNode : public ExpressionNode { 1551 1593 public: 1552 ConditionalNode(ExpressionNode* logical, ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL 1553 : m_logical(logical) 1594 ConditionalNode(JSGlobalData* globalData, ExpressionNode* logical, ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL 1595 : ExpressionNode(globalData) 1596 , m_logical(logical) 1554 1597 , m_expr1(expr1) 1555 1598 , m_expr2(expr2) … … 1569 1612 class ReadModifyResolveNode : public ExpressionNode { 1570 1613 public: 1571 ReadModifyResolveNode(const Identifier& ident, Operator oper, ExpressionNode* right, bool rightHasAssignments) KJS_FAST_CALL 1572 : m_ident(ident) 1614 ReadModifyResolveNode(JSGlobalData* globalData, const Identifier& ident, Operator oper, ExpressionNode* right, bool rightHasAssignments) KJS_FAST_CALL 1615 : ExpressionNode(globalData) 1616 , m_ident(ident) 1573 1617 , m_right(right) 1574 1618 , m_operator(oper) … … 1600 1644 class AssignResolveNode : public ExpressionNode { 1601 1645 public: 1602 AssignResolveNode(const Identifier& ident, ExpressionNode* right, bool rightHasAssignments) KJS_FAST_CALL 1603 : m_ident(ident) 1646 AssignResolveNode(JSGlobalData* globalData, const Identifier& ident, ExpressionNode* right, bool rightHasAssignments) KJS_FAST_CALL 1647 : ExpressionNode(globalData) 1648 , m_ident(ident) 1604 1649 , m_right(right) 1605 1650 , m_rightHasAssignments(rightHasAssignments) … … 1628 1673 class ReadModifyBracketNode : public ExpressionNode { 1629 1674 public: 1630 ReadModifyBracketNode(ExpressionNode* base, ExpressionNode* subscript, Operator oper, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments) KJS_FAST_CALL 1631 : m_base(base) 1675 ReadModifyBracketNode(JSGlobalData* globalData, ExpressionNode* base, ExpressionNode* subscript, Operator oper, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments) KJS_FAST_CALL 1676 : ExpressionNode(globalData) 1677 , m_base(base) 1632 1678 , m_subscript(subscript) 1633 1679 , m_right(right) … … 1654 1700 class AssignBracketNode : public ExpressionNode { 1655 1701 public: 1656 AssignBracketNode(ExpressionNode* base, ExpressionNode* subscript, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments) KJS_FAST_CALL 1657 : m_base(base) 1702 AssignBracketNode(JSGlobalData* globalData, ExpressionNode* base, ExpressionNode* subscript, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments) KJS_FAST_CALL 1703 : ExpressionNode(globalData) 1704 , m_base(base) 1658 1705 , m_subscript(subscript) 1659 1706 , m_right(right) … … 1678 1725 class AssignDotNode : public ExpressionNode { 1679 1726 public: 1680 AssignDotNode(ExpressionNode* base, const Identifier& ident, ExpressionNode* right, bool rightHasAssignments) KJS_FAST_CALL 1681 : m_base(base) 1727 AssignDotNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident, ExpressionNode* right, bool rightHasAssignments) KJS_FAST_CALL 1728 : ExpressionNode(globalData) 1729 , m_base(base) 1682 1730 , m_ident(ident) 1683 1731 , m_right(right) … … 1699 1747 class ReadModifyDotNode : public ExpressionNode { 1700 1748 public: 1701 ReadModifyDotNode(ExpressionNode* base, const Identifier& ident, Operator oper, ExpressionNode* right, bool rightHasAssignments) KJS_FAST_CALL 1702 : m_base(base) 1749 ReadModifyDotNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident, Operator oper, ExpressionNode* right, bool rightHasAssignments) KJS_FAST_CALL 1750 : ExpressionNode(globalData) 1751 , m_base(base) 1703 1752 , m_ident(ident) 1704 1753 , m_right(right) … … 1723 1772 class AssignErrorNode : public ExpressionNode { 1724 1773 public: 1725 AssignErrorNode(ExpressionNode* left, Operator oper, ExpressionNode* right) KJS_FAST_CALL 1726 : m_left(left) 1774 AssignErrorNode(JSGlobalData* globalData, ExpressionNode* left, Operator oper, ExpressionNode* right) KJS_FAST_CALL 1775 : ExpressionNode(globalData) 1776 , m_left(left) 1727 1777 , m_operator(oper) 1728 1778 , m_right(right) … … 1742 1792 class CommaNode : public ExpressionNode { 1743 1793 public: 1744 CommaNode(ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL 1745 : m_expr1(expr1) 1794 CommaNode(JSGlobalData* globalData, ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL 1795 : ExpressionNode(globalData) 1796 , m_expr1(expr1) 1746 1797 , m_expr2(expr2) 1747 1798 { … … 1759 1810 class VarDeclCommaNode : public CommaNode { 1760 1811 public: 1761 VarDeclCommaNode( ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL1762 : CommaNode( expr1, expr2)1812 VarDeclCommaNode(JSGlobalData* globalData, ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL 1813 : CommaNode(globalData, expr1, expr2) 1763 1814 { 1764 1815 } … … 1768 1819 class ConstDeclNode : public ExpressionNode { 1769 1820 public: 1770 ConstDeclNode( const Identifier& ident, ExpressionNode* in) KJS_FAST_CALL;1821 ConstDeclNode(JSGlobalData* globalData, const Identifier& ident, ExpressionNode* in) KJS_FAST_CALL; 1771 1822 1772 1823 virtual void streamTo(SourceStream&) const KJS_FAST_CALL; … … 1784 1835 class ConstStatementNode : public StatementNode { 1785 1836 public: 1786 ConstStatementNode(ConstDeclNode* next) KJS_FAST_CALL 1787 : m_next(next) 1837 ConstStatementNode(JSGlobalData* globalData, ConstDeclNode* next) KJS_FAST_CALL 1838 : StatementNode(globalData) 1839 , m_next(next) 1788 1840 { 1789 1841 } … … 1801 1853 class SourceElements : public ParserRefCounted { 1802 1854 public: 1855 SourceElements(JSGlobalData* globalData) : ParserRefCounted(globalData) {} 1856 1803 1857 void append(PassRefPtr<StatementNode>); 1804 1858 void releaseContentsIntoVector(StatementVector& destination) … … 1814 1868 class BlockNode : public StatementNode { 1815 1869 public: 1816 BlockNode( SourceElements* children) KJS_FAST_CALL;1870 BlockNode(JSGlobalData*, SourceElements* children) KJS_FAST_CALL; 1817 1871 1818 1872 virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL; … … 1827 1881 class EmptyStatementNode : public StatementNode { 1828 1882 public: 1829 EmptyStatementNode() KJS_FAST_CALL // debug 1883 EmptyStatementNode(JSGlobalData* globalData) KJS_FAST_CALL // debug 1884 : StatementNode(globalData) 1830 1885 { 1831 1886 } … … 1839 1894 class DebuggerStatementNode : public StatementNode { 1840 1895 public: 1841 DebuggerStatementNode() KJS_FAST_CALL 1896 DebuggerStatementNode(JSGlobalData* globalData) KJS_FAST_CALL 1897 : StatementNode(globalData) 1842 1898 { 1843 1899 } … … 1850 1906 class ExprStatementNode : public StatementNode { 1851 1907 public: 1852 ExprStatementNode(ExpressionNode* expr) KJS_FAST_CALL 1853 : m_expr(expr) 1908 ExprStatementNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 1909 : StatementNode(globalData) 1910 , m_expr(expr) 1854 1911 { 1855 1912 } … … 1864 1921 class VarStatementNode : public StatementNode { 1865 1922 public: 1866 VarStatementNode(ExpressionNode* expr) KJS_FAST_CALL 1867 : m_expr(expr) 1923 VarStatementNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 1924 : StatementNode(globalData) 1925 , m_expr(expr) 1868 1926 { 1869 1927 } … … 1879 1937 class IfNode : public StatementNode { 1880 1938 public: 1881 IfNode(ExpressionNode* condition, StatementNode* ifBlock) KJS_FAST_CALL 1882 : m_condition(condition) 1939 IfNode(JSGlobalData* globalData, ExpressionNode* condition, StatementNode* ifBlock) KJS_FAST_CALL 1940 : StatementNode(globalData) 1941 , m_condition(condition) 1883 1942 , m_ifBlock(ifBlock) 1884 1943 { … … 1895 1954 class IfElseNode : public IfNode { 1896 1955 public: 1897 IfElseNode( ExpressionNode* condtion, StatementNode* ifBlock, StatementNode* elseBlock) KJS_FAST_CALL1898 : IfNode( condtion, ifBlock)1956 IfElseNode(JSGlobalData* globalData, ExpressionNode* condition, StatementNode* ifBlock, StatementNode* elseBlock) KJS_FAST_CALL 1957 : IfNode(globalData, condition, ifBlock) 1899 1958 , m_elseBlock(elseBlock) 1900 1959 { … … 1910 1969 class DoWhileNode : public StatementNode { 1911 1970 public: 1912 DoWhileNode(StatementNode* statement, ExpressionNode* expr) KJS_FAST_CALL 1913 : m_statement(statement) 1971 DoWhileNode(JSGlobalData* globalData, StatementNode* statement, ExpressionNode* expr) KJS_FAST_CALL 1972 : StatementNode(globalData) 1973 , m_statement(statement) 1914 1974 , m_expr(expr) 1915 1975 { … … 1926 1986 class WhileNode : public StatementNode { 1927 1987 public: 1928 WhileNode(ExpressionNode* expr, StatementNode* statement) KJS_FAST_CALL 1929 : m_expr(expr) 1988 WhileNode(JSGlobalData* globalData, ExpressionNode* expr, StatementNode* statement) KJS_FAST_CALL 1989 : StatementNode(globalData) 1990 , m_expr(expr) 1930 1991 , m_statement(statement) 1931 1992 { … … 1942 2003 class ForNode : public StatementNode { 1943 2004 public: 1944 ForNode(ExpressionNode* expr1, ExpressionNode* expr2, ExpressionNode* expr3, StatementNode* statement, bool expr1WasVarDecl) KJS_FAST_CALL 1945 : m_expr1(expr1) 2005 ForNode(JSGlobalData* globalData, ExpressionNode* expr1, ExpressionNode* expr2, ExpressionNode* expr3, StatementNode* statement, bool expr1WasVarDecl) KJS_FAST_CALL 2006 : StatementNode(globalData) 2007 , m_expr1(expr1) 1946 2008 , m_expr2(expr2) 1947 2009 , m_expr3(expr3) … … 1965 2027 class ForInNode : public StatementNode { 1966 2028 public: 1967 ForInNode( ExpressionNode*, ExpressionNode*, StatementNode*) KJS_FAST_CALL;1968 ForInNode( const Identifier&, ExpressionNode*, ExpressionNode*, StatementNode*) KJS_FAST_CALL;2029 ForInNode(JSGlobalData*, ExpressionNode*, ExpressionNode*, StatementNode*) KJS_FAST_CALL; 2030 ForInNode(JSGlobalData*, const Identifier&, ExpressionNode*, ExpressionNode*, StatementNode*) KJS_FAST_CALL; 1969 2031 1970 2032 virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL; … … 1982 2044 class ContinueNode : public StatementNode { 1983 2045 public: 1984 ContinueNode() KJS_FAST_CALL 1985 { 1986 } 1987 1988 ContinueNode(const Identifier& ident) KJS_FAST_CALL 1989 : m_ident(ident) 2046 ContinueNode(JSGlobalData* globalData) KJS_FAST_CALL 2047 : StatementNode(globalData) 2048 { 2049 } 2050 2051 ContinueNode(JSGlobalData* globalData, const Identifier& ident) KJS_FAST_CALL 2052 : StatementNode(globalData) 2053 , m_ident(ident) 1990 2054 { 1991 2055 } … … 2000 2064 class BreakNode : public StatementNode { 2001 2065 public: 2002 BreakNode() KJS_FAST_CALL 2003 { 2004 } 2005 2006 BreakNode(const Identifier& ident) KJS_FAST_CALL 2007 : m_ident(ident) 2066 BreakNode(JSGlobalData* globalData) KJS_FAST_CALL 2067 : StatementNode(globalData) 2068 { 2069 } 2070 2071 BreakNode(JSGlobalData* globalData, const Identifier& ident) KJS_FAST_CALL 2072 : StatementNode(globalData) 2073 , m_ident(ident) 2008 2074 { 2009 2075 } … … 2018 2084 class ReturnNode : public StatementNode { 2019 2085 public: 2020 ReturnNode(ExpressionNode* value) KJS_FAST_CALL 2021 : m_value(value) 2086 ReturnNode(JSGlobalData* globalData, ExpressionNode* value) KJS_FAST_CALL 2087 : StatementNode(globalData) 2088 , m_value(value) 2022 2089 { 2023 2090 } … … 2033 2100 class WithNode : public StatementNode { 2034 2101 public: 2035 WithNode(ExpressionNode* expr, StatementNode* statement) KJS_FAST_CALL 2036 : m_expr(expr) 2102 WithNode(JSGlobalData* globalData, ExpressionNode* expr, StatementNode* statement) KJS_FAST_CALL 2103 : StatementNode(globalData) 2104 , m_expr(expr) 2037 2105 , m_statement(statement) 2038 2106 { … … 2049 2117 class LabelNode : public StatementNode { 2050 2118 public: 2051 LabelNode(const Identifier& label, StatementNode* statement) KJS_FAST_CALL 2052 : m_label(label) 2119 LabelNode(JSGlobalData* globalData, const Identifier& label, StatementNode* statement) KJS_FAST_CALL 2120 : StatementNode(globalData) 2121 , m_label(label) 2053 2122 , m_statement(statement) 2054 2123 { … … 2066 2135 class ThrowNode : public StatementNode { 2067 2136 public: 2068 ThrowNode(ExpressionNode* expr) KJS_FAST_CALL 2069 : m_expr(expr) 2137 ThrowNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 2138 : StatementNode(globalData) 2139 , m_expr(expr) 2070 2140 { 2071 2141 } … … 2080 2150 class TryNode : public StatementNode { 2081 2151 public: 2082 TryNode(StatementNode* tryBlock, const Identifier& exceptionIdent, StatementNode* catchBlock, StatementNode* finallyBlock) KJS_FAST_CALL 2083 : m_tryBlock(tryBlock) 2152 TryNode(JSGlobalData* globalData, StatementNode* tryBlock, const Identifier& exceptionIdent, StatementNode* catchBlock, StatementNode* finallyBlock) KJS_FAST_CALL 2153 : StatementNode(globalData) 2154 , m_tryBlock(tryBlock) 2084 2155 , m_exceptionIdent(exceptionIdent) 2085 2156 , m_catchBlock(catchBlock) … … 2101 2172 class ParameterNode : public Node { 2102 2173 public: 2103 ParameterNode(const Identifier& ident) KJS_FAST_CALL 2104 : m_ident(ident) 2105 { 2106 } 2107 2108 ParameterNode(ParameterNode* l, const Identifier& ident) KJS_FAST_CALL 2109 : m_ident(ident) 2174 ParameterNode(JSGlobalData* globalData, const Identifier& ident) KJS_FAST_CALL 2175 : Node(globalData) 2176 , m_ident(ident) 2177 { 2178 } 2179 2180 ParameterNode(JSGlobalData* globalData, ParameterNode* l, const Identifier& ident) KJS_FAST_CALL 2181 : Node(globalData) 2182 , m_ident(ident) 2110 2183 { 2111 2184 l->m_next = this; … … 2127 2200 class ScopeNode : public BlockNode { 2128 2201 public: 2129 ScopeNode( SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;2202 ScopeNode(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL; 2130 2203 2131 2204 int sourceId() const KJS_FAST_CALL { return m_sourceId; } … … 2152 2225 class ProgramNode : public ScopeNode { 2153 2226 public: 2154 static ProgramNode* create( SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;2227 static ProgramNode* create(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL; 2155 2228 2156 2229 ProgramCodeBlock& code(ScopeChainNode* scopeChain, bool canCreateGlobals) KJS_FAST_CALL … … 2162 2235 2163 2236 private: 2164 ProgramNode( SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;2237 ProgramNode(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL; 2165 2238 2166 2239 void generateCode(ScopeChainNode*, bool) KJS_FAST_CALL; … … 2175 2248 class EvalNode : public ScopeNode { 2176 2249 public: 2177 static EvalNode* create( SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;2250 static EvalNode* create(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL; 2178 2251 2179 2252 EvalCodeBlock& code(ScopeChainNode* scopeChain) KJS_FAST_CALL … … 2185 2258 2186 2259 private: 2187 EvalNode( SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;2260 EvalNode(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL; 2188 2261 2189 2262 void generateCode(ScopeChainNode*) KJS_FAST_CALL; … … 2195 2268 class FunctionBodyNode : public ScopeNode { 2196 2269 public: 2197 static FunctionBodyNode* create( SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;2270 static FunctionBodyNode* create(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL; 2198 2271 2199 2272 Vector<Identifier>& parameters() KJS_FAST_CALL { return m_parameters; } … … 2224 2297 2225 2298 protected: 2226 FunctionBodyNode( SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;2299 FunctionBodyNode(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL; 2227 2300 2228 2301 private: … … 2237 2310 class FuncExprNode : public ExpressionNode { 2238 2311 public: 2239 FuncExprNode(const Identifier& ident, FunctionBodyNode* body, const SourceRange& source, ParameterNode* parameter = 0) KJS_FAST_CALL 2240 : m_ident(ident) 2312 FuncExprNode(JSGlobalData* globalData, const Identifier& ident, FunctionBodyNode* body, const SourceRange& source, ParameterNode* parameter = 0) KJS_FAST_CALL 2313 : ExpressionNode(globalData) 2314 , m_ident(ident) 2241 2315 , m_parameter(parameter) 2242 2316 , m_body(body) … … 2266 2340 class FuncDeclNode : public StatementNode { 2267 2341 public: 2268 FuncDeclNode(const Identifier& ident, FunctionBodyNode* body, const SourceRange& source, ParameterNode* parameter = 0) KJS_FAST_CALL 2269 : m_ident(ident) 2342 FuncDeclNode(JSGlobalData* globalData, const Identifier& ident, FunctionBodyNode* body, const SourceRange& source, ParameterNode* parameter = 0) KJS_FAST_CALL 2343 : StatementNode(globalData) 2344 , m_ident(ident) 2270 2345 , m_parameter(parameter) 2271 2346 , m_body(body) … … 2293 2368 class CaseClauseNode : public Node { 2294 2369 public: 2295 CaseClauseNode(ExpressionNode* expr) KJS_FAST_CALL 2296 : m_expr(expr) 2297 { 2298 } 2299 2300 CaseClauseNode(ExpressionNode* expr, SourceElements* children) KJS_FAST_CALL 2301 : m_expr(expr) 2370 CaseClauseNode(JSGlobalData* globalData, ExpressionNode* expr) KJS_FAST_CALL 2371 : Node(globalData) 2372 , m_expr(expr) 2373 { 2374 } 2375 2376 CaseClauseNode(JSGlobalData* globalData, ExpressionNode* expr, SourceElements* children) KJS_FAST_CALL 2377 : Node(globalData) 2378 , m_expr(expr) 2302 2379 { 2303 2380 if (children) … … 2318 2395 class ClauseListNode : public Node { 2319 2396 public: 2320 ClauseListNode(CaseClauseNode* clause) KJS_FAST_CALL 2321 : m_clause(clause) 2322 { 2323 } 2324 2325 ClauseListNode(ClauseListNode* clauseList, CaseClauseNode* clause) KJS_FAST_CALL 2326 : m_clause(clause) 2397 ClauseListNode(JSGlobalData* globalData, CaseClauseNode* clause) KJS_FAST_CALL 2398 : Node(globalData) 2399 , m_clause(clause) 2400 { 2401 } 2402 2403 ClauseListNode(JSGlobalData* globalData, ClauseListNode* clauseList, CaseClauseNode* clause) KJS_FAST_CALL 2404 : Node(globalData) 2405 , m_clause(clause) 2327 2406 { 2328 2407 clauseList->m_next = this; … … 2343 2422 class CaseBlockNode : public Node { 2344 2423 public: 2345 CaseBlockNode(ClauseListNode* list1, CaseClauseNode* defaultClause, ClauseListNode* list2) KJS_FAST_CALL 2346 : m_list1(list1) 2424 CaseBlockNode(JSGlobalData* globalData, ClauseListNode* list1, CaseClauseNode* defaultClause, ClauseListNode* list2) KJS_FAST_CALL 2425 : Node(globalData) 2426 , m_list1(list1) 2347 2427 , m_defaultClause(defaultClause) 2348 2428 , m_list2(list2) … … 2363 2443 class SwitchNode : public StatementNode { 2364 2444 public: 2365 SwitchNode(ExpressionNode* expr, CaseBlockNode* block) KJS_FAST_CALL 2366 : m_expr(expr) 2445 SwitchNode(JSGlobalData* globalData, ExpressionNode* expr, CaseBlockNode* block) KJS_FAST_CALL 2446 : StatementNode(globalData) 2447 , m_expr(expr) 2367 2448 , m_block(block) 2368 2449 { … … 2380 2461 class BreakpointCheckStatement : public StatementNode { 2381 2462 public: 2382 BreakpointCheckStatement( PassRefPtr<StatementNode>) KJS_FAST_CALL;2463 BreakpointCheckStatement(JSGlobalData*, PassRefPtr<StatementNode>) KJS_FAST_CALL; 2383 2464 2384 2465 virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
Note:
See TracChangeset
for help on using the changeset viewer.