OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // code generation. | 203 // code generation. |
204 kUninitialized, | 204 kUninitialized, |
205 // Evaluated for its side effects. | 205 // Evaluated for its side effects. |
206 kEffect, | 206 kEffect, |
207 // Evaluated for its value (and side effects). | 207 // Evaluated for its value (and side effects). |
208 kValue, | 208 kValue, |
209 // Evaluated for control flow (and side effects). | 209 // Evaluated for control flow (and side effects). |
210 kTest | 210 kTest |
211 }; | 211 }; |
212 | 212 |
213 Expression() : id_(GetNextId()) {} | 213 Expression() : id_(GetNextId()), test_id_(GetNextId()) {} |
214 | 214 |
215 virtual int position() const { | 215 virtual int position() const { |
216 UNREACHABLE(); | 216 UNREACHABLE(); |
217 return 0; | 217 return 0; |
218 } | 218 } |
219 | 219 |
220 virtual Expression* AsExpression() { return this; } | 220 virtual Expression* AsExpression() { return this; } |
221 | 221 |
222 virtual bool IsTrivial() { return false; } | 222 virtual bool IsTrivial() { return false; } |
223 virtual bool IsValidLeftHandSide() { return false; } | 223 virtual bool IsValidLeftHandSide() { return false; } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 virtual ZoneMapList* GetReceiverTypes() { | 255 virtual ZoneMapList* GetReceiverTypes() { |
256 UNREACHABLE(); | 256 UNREACHABLE(); |
257 return NULL; | 257 return NULL; |
258 } | 258 } |
259 virtual Handle<Map> GetMonomorphicReceiverType() { | 259 virtual Handle<Map> GetMonomorphicReceiverType() { |
260 UNREACHABLE(); | 260 UNREACHABLE(); |
261 return Handle<Map>(); | 261 return Handle<Map>(); |
262 } | 262 } |
263 | 263 |
264 unsigned id() const { return id_; } | 264 unsigned id() const { return id_; } |
| 265 unsigned test_id() const { return test_id_; } |
265 | 266 |
266 private: | 267 private: |
267 unsigned id_; | 268 unsigned id_; |
| 269 unsigned test_id_; |
268 }; | 270 }; |
269 | 271 |
270 | 272 |
271 /** | 273 /** |
272 * A sentinel used during pre parsing that represents some expression | 274 * A sentinel used during pre parsing that represents some expression |
273 * that is a valid left hand side without having to actually build | 275 * that is a valid left hand side without having to actually build |
274 * the expression. | 276 * the expression. |
275 */ | 277 */ |
276 class ValidLeftHandSideSentinel: public Expression { | 278 class ValidLeftHandSideSentinel: public Expression { |
277 public: | 279 public: |
(...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2142 | 2144 |
2143 private: | 2145 private: |
2144 Isolate* isolate_; | 2146 Isolate* isolate_; |
2145 bool stack_overflow_; | 2147 bool stack_overflow_; |
2146 }; | 2148 }; |
2147 | 2149 |
2148 | 2150 |
2149 } } // namespace v8::internal | 2151 } } // namespace v8::internal |
2150 | 2152 |
2151 #endif // V8_AST_H_ | 2153 #endif // V8_AST_H_ |
OLD | NEW |