Changeset 5209 in webkit for trunk/JavaScriptCore/kjs
- Timestamp:
- Oct 18, 2003, 2:13:32 PM (22 years ago)
- Location:
- trunk/JavaScriptCore/kjs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.cpp
r5115 r5209 1988 1988 // ------------------------------ ForNode -------------------------------------- 1989 1989 1990 VarDeclListNode *ForNode::reverseList(VarDeclListNode *list) 1991 { 1992 VarDeclListNode *head = 0; 1993 VarDeclListNode *next; 1994 for (VarDeclListNode *n = list; n; n = next) { 1995 next = n->list; 1996 n->list = head; 1997 head = n; 1998 } 1999 return head; 2000 } 2001 1990 2002 void ForNode::ref() 1991 2003 { -
trunk/JavaScriptCore/kjs/nodes.h
r4363 r5209 640 640 virtual void streamTo(SourceStream &s) const; 641 641 private: 642 friend class ForNode; 642 643 friend class VarStatementNode; 643 644 VarDeclListNode *list; … … 733 734 ForNode(Node *e1, Node *e2, Node *e3, StatementNode *s) : 734 735 expr1(e1), expr2(e2), expr3(e3), statement(s) {} 735 virtual void ref(); 736 virtual bool deref(); 737 virtual Completion execute(ExecState *exec); 738 virtual void processVarDecls(ExecState *exec); 739 virtual void streamTo(SourceStream &s) const; 740 private: 736 ForNode(VarDeclListNode *e1, Node *e2, Node *e3, StatementNode *s) : 737 expr1(reverseList(e1)), expr2(e2), expr3(e3), statement(s) {} 738 virtual void ref(); 739 virtual bool deref(); 740 virtual Completion execute(ExecState *exec); 741 virtual void processVarDecls(ExecState *exec); 742 virtual void streamTo(SourceStream &s) const; 743 private: 744 static VarDeclListNode *reverseList(VarDeclListNode *); 741 745 Node *expr1, *expr2, *expr3; 742 746 StatementNode *statement;
Note:
See TracChangeset
for help on using the changeset viewer.