Changeset 2760 in webkit for trunk/JavaScriptCore/kjs/nodes.h
- Timestamp:
- Nov 19, 2002, 2:02:26 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.h
r1837 r2760 120 120 bool abortStatement(ExecState *exec); 121 121 virtual Completion execute(ExecState *exec) = 0; 122 void pushLabel(const UString *id) { 123 if (id) ls.push(*id); 124 } 122 void pushLabel(const Identifier &id) { ls.push(id); } 125 123 protected: 126 124 LabelStack ls; … … 185 183 class ResolveNode : public Node { 186 184 public: 187 ResolveNode(const UString *s) : ident(*s) { }185 ResolveNode(const Identifier &s) : ident(s) { } 188 186 Value evaluate(ExecState *exec); 189 187 virtual Reference evaluateReference(ExecState *exec); 190 188 virtual void streamTo(SourceStream &s) const; 191 189 private: 192 UStringident;190 Identifier ident; 193 191 }; 194 192 … … 273 271 public: 274 272 PropertyNode(double d) : numeric(d) { } 275 PropertyNode(const UString *s) : str(*s) { }273 PropertyNode(const Identifier &s) : str(s) { } 276 274 Value evaluate(ExecState *exec); 277 275 virtual void streamTo(SourceStream &s) const; 278 276 private: 279 277 double numeric; 280 UStringstr;278 Identifier str; 281 279 }; 282 280 … … 296 294 class AccessorNode2 : public Node { 297 295 public: 298 AccessorNode2(Node *e, const UString *s) : expr(e), ident(*s) { }296 AccessorNode2(Node *e, const Identifier &s) : expr(e), ident(s) { } 299 297 virtual void ref(); 300 298 virtual bool deref(); … … 304 302 private: 305 303 Node *expr; 306 UStringident;304 Identifier ident; 307 305 }; 308 306 … … 617 615 class VarDeclNode : public Node { 618 616 public: 619 VarDeclNode(const UString *id, AssignExprNode *in);620 virtual void ref(); 621 virtual bool deref(); 622 Value evaluate(ExecState *exec); 623 virtual void processVarDecls(ExecState *exec); 624 virtual void streamTo(SourceStream &s) const; 625 private: 626 UStringident;617 VarDeclNode(const Identifier &id, AssignExprNode *in); 618 virtual void ref(); 619 virtual bool deref(); 620 Value evaluate(ExecState *exec); 621 virtual void processVarDecls(ExecState *exec); 622 virtual void streamTo(SourceStream &s) const; 623 private: 624 Identifier ident; 627 625 AssignExprNode *init; 628 626 }; … … 741 739 public: 742 740 ForInNode(Node *l, Node *e, StatementNode *s); 743 ForInNode(const UString *i, AssignExprNode *in, Node *e, StatementNode *s);744 virtual void ref(); 745 virtual bool deref(); 746 virtual Completion execute(ExecState *exec); 747 virtual void processVarDecls(ExecState *exec); 748 virtual void streamTo(SourceStream &s) const; 749 private: 750 UStringident;741 ForInNode(const Identifier &i, AssignExprNode *in, Node *e, StatementNode *s); 742 virtual void ref(); 743 virtual bool deref(); 744 virtual Completion execute(ExecState *exec); 745 virtual void processVarDecls(ExecState *exec); 746 virtual void streamTo(SourceStream &s) const; 747 private: 748 Identifier ident; 751 749 AssignExprNode *init; 752 750 Node *lexpr, *expr; … … 758 756 public: 759 757 ContinueNode() { } 760 ContinueNode(const UString *i) : ident(*i) { }761 virtual Completion execute(ExecState *exec); 762 virtual void streamTo(SourceStream &s) const; 763 private: 764 UStringident;758 ContinueNode(const Identifier &i) : ident(i) { } 759 virtual Completion execute(ExecState *exec); 760 virtual void streamTo(SourceStream &s) const; 761 private: 762 Identifier ident; 765 763 }; 766 764 … … 768 766 public: 769 767 BreakNode() { } 770 BreakNode(const UString *i) : ident(*i) { }771 virtual Completion execute(ExecState *exec); 772 virtual void streamTo(SourceStream &s) const; 773 private: 774 UStringident;768 BreakNode(const Identifier &i) : ident(i) { } 769 virtual Completion execute(ExecState *exec); 770 virtual void streamTo(SourceStream &s) const; 771 private: 772 Identifier ident; 775 773 }; 776 774 … … 860 858 class LabelNode : public StatementNode { 861 859 public: 862 LabelNode(const UString *l, StatementNode *s) : label(*l), statement(s) { }863 virtual void ref(); 864 virtual bool deref(); 865 virtual Completion execute(ExecState *exec); 866 virtual void processVarDecls(ExecState *exec); 867 virtual void streamTo(SourceStream &s) const; 868 private: 869 UStringlabel;860 LabelNode(const Identifier &l, StatementNode *s) : label(l), statement(s) { } 861 virtual void ref(); 862 virtual bool deref(); 863 virtual Completion execute(ExecState *exec); 864 virtual void processVarDecls(ExecState *exec); 865 virtual void streamTo(SourceStream &s) const; 866 private: 867 Identifier label; 870 868 StatementNode *statement; 871 869 }; … … 884 882 class CatchNode : public StatementNode { 885 883 public: 886 CatchNode(const UString *i, StatementNode *b) : ident(*i), block(b) {}884 CatchNode(const Identifier &i, StatementNode *b) : ident(i), block(b) {} 887 885 virtual void ref(); 888 886 virtual bool deref(); … … 892 890 virtual void streamTo(SourceStream &s) const; 893 891 private: 894 UStringident;892 Identifier ident; 895 893 StatementNode *block; 896 894 }; … … 925 923 class ParameterNode : public Node { 926 924 public: 927 ParameterNode(const UString *i) : id(*i), next(0L) { }928 ParameterNode *append(const UString *i);929 virtual void ref(); 930 virtual bool deref(); 931 Value evaluate(ExecState *exec); 932 UStringident() { return id; }925 ParameterNode(const Identifier &i) : id(i), next(0L) { } 926 ParameterNode *append(const Identifier &i); 927 virtual void ref(); 928 virtual bool deref(); 929 Value evaluate(ExecState *exec); 930 Identifier ident() { return id; } 933 931 ParameterNode *nextParam() { return next; } 934 932 virtual void streamTo(SourceStream &s) const; 935 933 private: 936 UStringid;934 Identifier id; 937 935 ParameterNode *next; 938 936 }; … … 954 952 class FuncDeclNode : public StatementNode { 955 953 public: 956 FuncDeclNode(const UString *i, ParameterNode *p, FunctionBodyNode *b)957 : ident( *i), param(p), body(b) { }954 FuncDeclNode(const Identifier &i, ParameterNode *p, FunctionBodyNode *b) 955 : ident(i), param(p), body(b) { } 958 956 virtual void ref(); 959 957 virtual bool deref(); … … 963 961 virtual void streamTo(SourceStream &s) const; 964 962 private: 965 UStringident;963 Identifier ident; 966 964 ParameterNode *param; 967 965 FunctionBodyNode *body;
Note:
See TracChangeset
for help on using the changeset viewer.