Changeset 11802 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp
- Timestamp:
- Dec 29, 2005, 3:16:11 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.cpp
r11566 r11802 310 310 JSObject *array = exec->lexicalInterpreter()->builtinArray()->construct(exec, List::empty()); 311 311 int length = 0; 312 for (ElementNode *n = this; n; n = n-> list.get()) {312 for (ElementNode *n = this; n; n = n->next.get()) { 313 313 JSValue *val = n->node->evaluate(exec); 314 314 KJS_CHECKEXCEPTIONVALUE … … 361 361 JSObject *obj = exec->lexicalInterpreter()->builtinObject()->construct(exec, List::empty()); 362 362 363 for (PropertyListNode *p = this; p; p = p-> list.get()) {363 for (PropertyListNode *p = this; p; p = p->next.get()) { 364 364 JSValue *n = p->node->name->evaluate(exec); 365 365 KJS_CHECKEXCEPTIONVALUE … … 450 450 List l; 451 451 452 for (ArgumentListNode *n = this; n; n = n-> list.get()) {452 for (ArgumentListNode *n = this; n; n = n->next.get()) { 453 453 JSValue *v = n->expr->evaluate(exec); 454 454 KJS_CHECKEXCEPTIONLIST … … 1416 1416 1417 1417 StatListNode::StatListNode(StatementNode *s) 1418 : statement(s), list(this)1418 : statement(s), next(this) 1419 1419 { 1420 1420 setLoc(s->firstLine(), s->lastLine(), s->sourceId()); … … 1422 1422 1423 1423 StatListNode::StatListNode(StatListNode *l, StatementNode *s) 1424 : statement(s), list(l->list)1425 { 1426 l-> list = this;1424 : statement(s), next(l->next) 1425 { 1426 l->next = this; 1427 1427 setLoc(l->firstLine(), s->lastLine(), l->sourceId()); 1428 1428 } … … 1438 1438 JSValue *v = c.value(); 1439 1439 1440 for (StatListNode *n = list.get(); n; n = n->list.get()) {1440 for (StatListNode *n = next.get(); n; n = n->next.get()) { 1441 1441 Completion c2 = n->statement->execute(exec); 1442 1442 KJS_ABORTPOINT … … 1454 1454 void StatListNode::processVarDecls(ExecState *exec) 1455 1455 { 1456 for (StatListNode *n = this; n; n = n-> list.get())1456 for (StatListNode *n = this; n; n = n->next.get()) 1457 1457 n->statement->processVarDecls(exec); 1458 1458 } … … 1527 1527 JSValue *VarDeclListNode::evaluate(ExecState *exec) 1528 1528 { 1529 for (VarDeclListNode *n = this; n; n = n-> list.get()) {1529 for (VarDeclListNode *n = this; n; n = n->next.get()) { 1530 1530 n->var->evaluate(exec); 1531 1531 KJS_CHECKEXCEPTIONVALUE … … 1536 1536 void VarDeclListNode::processVarDecls(ExecState *exec) 1537 1537 { 1538 for (VarDeclListNode *n = this; n; n = n-> list.get())1538 for (VarDeclListNode *n = this; n; n = n->next.get()) 1539 1539 n->var->processVarDecls(exec); 1540 1540 } … … 1547 1547 KJS_BREAKPOINT; 1548 1548 1549 (void) list->evaluate(exec);1549 (void) next->evaluate(exec); 1550 1550 KJS_CHECKEXCEPTION 1551 1551 … … 1555 1555 void VarStatementNode::processVarDecls(ExecState *exec) 1556 1556 { 1557 list->processVarDecls(exec);1557 next->processVarDecls(exec); 1558 1558 } 1559 1559 … … 1563 1563 { 1564 1564 if (s) { 1565 source = s-> elements;1566 s-> elements= 0;1565 source = s->next; 1566 s->next = 0; 1567 1567 setLoc(s->firstLine(), s->lastLine(), s->sourceId()); 1568 1568 } else { … … 1985 1985 Completion CaseClauseNode::evalStatements(ExecState *exec) 1986 1986 { 1987 if ( list)1988 return list->execute(exec);1987 if (next) 1988 return next->execute(exec); 1989 1989 else 1990 1990 return Completion(Normal, jsUndefined()); … … 1993 1993 void CaseClauseNode::processVarDecls(ExecState *exec) 1994 1994 { 1995 if ( list)1996 list->processVarDecls(exec);1995 if (next) 1996 next->processVarDecls(exec); 1997 1997 } 1998 1998 … … 2009 2009 void ClauseListNode::processVarDecls(ExecState *exec) 2010 2010 { 2011 for (ClauseListNode *n = this; n; n = n->n x.get())2012 if (n->cl )2013 n->cl ->processVarDecls(exec);2011 for (ClauseListNode *n = this; n; n = n->next.get()) 2012 if (n->clause) 2013 n->clause->processVarDecls(exec); 2014 2014 } 2015 2015 … … 2020 2020 { 2021 2021 if (l1) { 2022 list1 = l1->n x;2023 l1->n x= 0;2022 list1 = l1->next; 2023 l1->next = 0; 2024 2024 } else { 2025 2025 list1 = 0; … … 2029 2029 2030 2030 if (l2) { 2031 list2 = l2->n x;2032 l2->n x= 0;2031 list2 = l2->next; 2032 l2->next = 0; 2033 2033 } else { 2034 2034 list2 = 0; … … 2053 2053 2054 2054 while (a) { 2055 clause = a-> clause();2056 a = a-> next();2055 clause = a->getClause(); 2056 a = a->getNext(); 2057 2057 v = clause->evaluate(exec); 2058 2058 KJS_CHECKEXCEPTION … … 2062 2062 return res; 2063 2063 while (a) { 2064 res = a-> clause()->evalStatements(exec);2064 res = a->getClause()->evalStatements(exec); 2065 2065 if (res.complType() != Normal) 2066 2066 return res; 2067 a = a-> next();2067 a = a->getNext(); 2068 2068 } 2069 2069 break; … … 2072 2072 2073 2073 while (b) { 2074 clause = b-> clause();2075 b = b-> next();2074 clause = b->getClause(); 2075 b = b->getNext(); 2076 2076 v = clause->evaluate(exec); 2077 2077 KJS_CHECKEXCEPTION … … 2093 2093 step18: 2094 2094 while (b) { 2095 clause = b-> clause();2095 clause = b->getClause(); 2096 2096 res = clause->evalStatements(exec); 2097 2097 if (res.complType() != Normal) 2098 2098 return res; 2099 b = b-> next();2099 b = b->getNext(); 2100 2100 } 2101 2101 … … 2306 2306 // ------------------------------ SourceElementsNode --------------------------- 2307 2307 2308 int SourceElementsNode::count = 0; 2309 2308 2310 SourceElementsNode::SourceElementsNode(StatementNode *s1) 2309 : element(s1), elements(this)2311 : node(s1), next(this) 2310 2312 { 2311 2313 setLoc(s1->firstLine(), s1->lastLine(), s1->sourceId()); 2312 2314 } 2313 2315 2314 2316 SourceElementsNode::SourceElementsNode(SourceElementsNode *s1, StatementNode *s2) 2315 : element(s2), elements(s1->elements)2316 { 2317 s1-> elements= this;2317 : node(s2), next(s1->next) 2318 { 2319 s1->next = this; 2318 2320 setLoc(s1->firstLine(), s2->lastLine(), s1->sourceId()); 2319 2321 } … … 2324 2326 KJS_CHECKEXCEPTION 2325 2327 2326 Completion c1 = element->execute(exec);2328 Completion c1 = node->execute(exec); 2327 2329 KJS_CHECKEXCEPTION; 2328 2330 if (c1.complType() != Normal) 2329 2331 return c1; 2330 2332 2331 for (SourceElementsNode *n = elements.get(); n; n = n->elements.get()) {2332 Completion c2 = n-> element->execute(exec);2333 for (SourceElementsNode *n = next.get(); n; n = n->next.get()) { 2334 Completion c2 = n->node->execute(exec); 2333 2335 if (c2.complType() != Normal) 2334 2336 return c2; … … 2345 2347 void SourceElementsNode::processFuncDecl(ExecState *exec) 2346 2348 { 2347 for (SourceElementsNode *n = this; n; n = n-> elements.get())2348 n-> element->processFuncDecl(exec);2349 for (SourceElementsNode *n = this; n; n = n->next.get()) 2350 n->node->processFuncDecl(exec); 2349 2351 } 2350 2352 2351 2353 void SourceElementsNode::processVarDecls(ExecState *exec) 2352 2354 { 2353 for (SourceElementsNode *n = this; n; n = n-> elements.get())2354 n-> element->processVarDecls(exec);2355 for (SourceElementsNode *n = this; n; n = n->next.get()) 2356 n->node->processVarDecls(exec); 2355 2357 } 2356 2358
Note:
See TracChangeset
for help on using the changeset viewer.