Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: src/ast.h

Issue 245042: Remove CallEval as a subclass of the Call AST node type. We were not... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 V(VariableProxy) \ 78 V(VariableProxy) \
79 V(Literal) \ 79 V(Literal) \
80 V(RegExpLiteral) \ 80 V(RegExpLiteral) \
81 V(ObjectLiteral) \ 81 V(ObjectLiteral) \
82 V(ArrayLiteral) \ 82 V(ArrayLiteral) \
83 V(CatchExtensionObject) \ 83 V(CatchExtensionObject) \
84 V(Assignment) \ 84 V(Assignment) \
85 V(Throw) \ 85 V(Throw) \
86 V(Property) \ 86 V(Property) \
87 V(Call) \ 87 V(Call) \
88 V(CallEval) \
89 V(CallNew) \ 88 V(CallNew) \
90 V(CallRuntime) \ 89 V(CallRuntime) \
91 V(UnaryOperation) \ 90 V(UnaryOperation) \
92 V(CountOperation) \ 91 V(CountOperation) \
93 V(BinaryOperation) \ 92 V(BinaryOperation) \
94 V(CompareOperation) \ 93 V(CompareOperation) \
95 V(ThisFunction) 94 V(ThisFunction)
96 95
97 #define AST_NODE_LIST(V) \ 96 #define AST_NODE_LIST(V) \
98 V(Declaration) \ 97 V(Declaration) \
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 983
985 class CallNew: public Call { 984 class CallNew: public Call {
986 public: 985 public:
987 CallNew(Expression* expression, ZoneList<Expression*>* arguments, int pos) 986 CallNew(Expression* expression, ZoneList<Expression*>* arguments, int pos)
988 : Call(expression, arguments, pos) { } 987 : Call(expression, arguments, pos) { }
989 988
990 virtual void Accept(AstVisitor* v); 989 virtual void Accept(AstVisitor* v);
991 }; 990 };
992 991
993 992
994 // The CallEval class represents a call of the form 'eval(...)' where eval
995 // cannot be seen to be overwritten at compile time. It is potentially a
996 // direct (i.e. not aliased) eval call. The real nature of the call is
997 // determined at runtime.
998 class CallEval: public Call {
999 public:
1000 CallEval(Expression* expression, ZoneList<Expression*>* arguments, int pos)
1001 : Call(expression, arguments, pos) { }
1002
1003 virtual void Accept(AstVisitor* v);
1004
1005 static CallEval* sentinel() { return &sentinel_; }
1006
1007 private:
1008 static CallEval sentinel_;
1009 };
1010
1011
1012 // The CallRuntime class does not represent any official JavaScript 993 // The CallRuntime class does not represent any official JavaScript
1013 // language construct. Instead it is used to call a C or JS function 994 // language construct. Instead it is used to call a C or JS function
1014 // with a set of arguments. This is used from the builtins that are 995 // with a set of arguments. This is used from the builtins that are
1015 // implemented in JavaScript (see "v8natives.js"). 996 // implemented in JavaScript (see "v8natives.js").
1016 class CallRuntime: public Expression { 997 class CallRuntime: public Expression {
1017 public: 998 public:
1018 CallRuntime(Handle<String> name, 999 CallRuntime(Handle<String> name,
1019 Runtime::Function* function, 1000 Runtime::Function* function,
1020 ZoneList<Expression*>* arguments) 1001 ZoneList<Expression*>* arguments)
1021 : name_(name), function_(function), arguments_(arguments) { } 1002 : name_(name), function_(function), arguments_(arguments) { }
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 #undef DEF_VISIT 1710 #undef DEF_VISIT
1730 1711
1731 private: 1712 private:
1732 bool stack_overflow_; 1713 bool stack_overflow_;
1733 }; 1714 };
1734 1715
1735 1716
1736 } } // namespace v8::internal 1717 } } // namespace v8::internal
1737 1718
1738 #endif // V8_AST_H_ 1719 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698