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

Side by Side Diff: src/ast.h

Issue 110123002: Enable optimization of functions with generic switches. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adding tests Created 7 years 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/full-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 V(Yield) \ 108 V(Yield) \
109 V(Throw) \ 109 V(Throw) \
110 V(Property) \ 110 V(Property) \
111 V(Call) \ 111 V(Call) \
112 V(CallNew) \ 112 V(CallNew) \
113 V(CallRuntime) \ 113 V(CallRuntime) \
114 V(UnaryOperation) \ 114 V(UnaryOperation) \
115 V(CountOperation) \ 115 V(CountOperation) \
116 V(BinaryOperation) \ 116 V(BinaryOperation) \
117 V(CompareOperation) \ 117 V(CompareOperation) \
118 V(ThisFunction) 118 V(ThisFunction) \
119
120 #define AUXILIARY_NODE_LIST(V) \
121 V(CaseClause) 119 V(CaseClause)
122 120
123 #define AST_NODE_LIST(V) \ 121 #define AST_NODE_LIST(V) \
124 DECLARATION_NODE_LIST(V) \ 122 DECLARATION_NODE_LIST(V) \
125 MODULE_NODE_LIST(V) \ 123 MODULE_NODE_LIST(V) \
126 STATEMENT_NODE_LIST(V) \ 124 STATEMENT_NODE_LIST(V) \
127 EXPRESSION_NODE_LIST(V) \ 125 EXPRESSION_NODE_LIST(V)
128 AUXILIARY_NODE_LIST(V)
129 126
130 // Forward declarations 127 // Forward declarations
131 class AstConstructionVisitor; 128 class AstConstructionVisitor;
132 template<class> class AstNodeFactory; 129 template<class> class AstNodeFactory;
133 class AstVisitor; 130 class AstVisitor;
134 class Declaration; 131 class Declaration;
135 class Module; 132 class Module;
136 class BreakableStatement; 133 class BreakableStatement;
137 class Expression; 134 class Expression;
138 class IterationStatement; 135 class IterationStatement;
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 expression_(expression), 1096 expression_(expression),
1100 statement_(statement) { } 1097 statement_(statement) { }
1101 1098
1102 private: 1099 private:
1103 Scope* scope_; 1100 Scope* scope_;
1104 Expression* expression_; 1101 Expression* expression_;
1105 Statement* statement_; 1102 Statement* statement_;
1106 }; 1103 };
1107 1104
1108 1105
1109 class CaseClause V8_FINAL : public AstNode { 1106 class CaseClause V8_FINAL : public Expression {
1110 public: 1107 public:
1111 DECLARE_NODE_TYPE(CaseClause) 1108 DECLARE_NODE_TYPE(CaseClause)
1112 1109
1113 bool is_default() const { return label_ == NULL; } 1110 bool is_default() const { return label_ == NULL; }
1114 Expression* label() const { 1111 Expression* label() const {
1115 CHECK(!is_default()); 1112 CHECK(!is_default());
1116 return label_; 1113 return label_;
1117 } 1114 }
1118 Label* body_target() { return &body_target_; } 1115 Label* body_target() { return &body_target_; }
1119 ZoneList<Statement*>* statements() const { return statements_; } 1116 ZoneList<Statement*>* statements() const { return statements_; }
(...skipping 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after
3301 private: 3298 private:
3302 Isolate* isolate_; 3299 Isolate* isolate_;
3303 Zone* zone_; 3300 Zone* zone_;
3304 Visitor visitor_; 3301 Visitor visitor_;
3305 }; 3302 };
3306 3303
3307 3304
3308 } } // namespace v8::internal 3305 } } // namespace v8::internal
3309 3306
3310 #endif // V8_AST_H_ 3307 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698