Changeset 3313 in webkit for trunk/JavaScriptCore/kjs/nodes.h
- Timestamp:
- Jan 13, 2003, 7:49:23 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.h
r3215 r3313 599 599 virtual void streamTo(SourceStream &s) const; 600 600 private: 601 friend class CaseClauseNode; 601 602 StatementNode *statement; 602 603 StatListNode *list; … … 803 804 class CaseClauseNode: public Node { 804 805 public: 805 CaseClauseNode(Node *e, StatListNode *l) : expr(e), list(l) { }806 CaseClauseNode(Node *e, StatListNode *l) : expr(e), list(l) { reverseList(); } 806 807 virtual void ref(); 807 808 virtual bool deref(); … … 811 812 virtual void streamTo(SourceStream &s) const; 812 813 private: 814 void reverseList(); 813 815 Node *expr; 814 816 StatListNode *list; … … 818 820 public: 819 821 ClauseListNode(CaseClauseNode *c) : cl(c), nx(0L) { } 820 virtual void ref();821 virtual bool deref();822 ClauseListNode* append(CaseClauseNode *c);822 ClauseListNode(ClauseListNode *n, CaseClauseNode *c) : cl(c), nx(n) { } 823 virtual void ref(); 824 virtual bool deref(); 823 825 Value evaluate(ExecState *exec); 824 826 CaseClauseNode *clause() const { return cl; } … … 827 829 virtual void streamTo(SourceStream &s) const; 828 830 private: 831 friend class CaseBlockNode; 829 832 CaseClauseNode *cl; 830 833 ClauseListNode *nx; … … 834 837 public: 835 838 CaseBlockNode(ClauseListNode *l1, CaseClauseNode *d, ClauseListNode *l2) 836 : list1(l1), def(d), list2(l2) { }839 : list1(l1), def(d), list2(l2) { reverseLists(); } 837 840 virtual void ref(); 838 841 virtual bool deref(); … … 842 845 virtual void streamTo(SourceStream &s) const; 843 846 private: 847 void reverseLists(); 844 848 ClauseListNode *list1; 845 849 CaseClauseNode *def; … … 928 932 public: 929 933 ParameterNode(const Identifier &i) : id(i), next(0L) { } 930 ParameterNode *append(const Identifier &i);934 ParameterNode(ParameterNode *list, const Identifier &i) : id(i), next(list) { } 931 935 virtual void ref(); 932 936 virtual bool deref(); … … 936 940 virtual void streamTo(SourceStream &s) const; 937 941 private: 942 friend class FuncDeclNode; 943 friend class FuncExprNode; 938 944 Identifier id; 939 945 ParameterNode *next; … … 950 956 public: 951 957 FuncDeclNode(const Identifier &i, ParameterNode *p, FunctionBodyNode *b) 952 : ident(i), param(p), body(b) { }958 : ident(i), param(p), body(b) { reverseParameterList(); } 953 959 virtual void ref(); 954 960 virtual bool deref(); … … 958 964 virtual void streamTo(SourceStream &s) const; 959 965 private: 966 void reverseParameterList(); 960 967 Identifier ident; 961 968 ParameterNode *param; … … 966 973 public: 967 974 FuncExprNode(ParameterNode *p, FunctionBodyNode *b) 968 : param(p), body(b) { } 969 virtual void ref(); 970 virtual bool deref(); 971 Value evaluate(ExecState *exec); 972 virtual void streamTo(SourceStream &s) const; 973 private: 975 : param(p), body(b) { reverseParameterList(); } 976 virtual void ref(); 977 virtual bool deref(); 978 Value evaluate(ExecState *exec); 979 virtual void streamTo(SourceStream &s) const; 980 private: 981 void reverseParameterList(); 974 982 ParameterNode *param; 975 983 FunctionBodyNode *body;
Note:
See TracChangeset
for help on using the changeset viewer.