OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/ast-expression-visitor.h" | 10 #include "src/ast-expression-visitor.h" |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 "function foo() {\n" | 296 "function foo() {\n" |
297 " switch (0) { case 1: break; default: break; }\n" | 297 " switch (0) { case 1: break; default: break; }\n" |
298 "}\n"; | 298 "}\n"; |
299 CollectTypes(&handles, test_function, &types); | 299 CollectTypes(&handles, test_function, &types); |
300 CHECK_TYPES_BEGIN { | 300 CHECK_TYPES_BEGIN { |
301 CHECK_EXPR(FunctionLiteral, DEFAULT_TYPE) { | 301 CHECK_EXPR(FunctionLiteral, DEFAULT_TYPE) { |
302 CHECK_EXPR(Assignment, DEFAULT_TYPE) { | 302 CHECK_EXPR(Assignment, DEFAULT_TYPE) { |
303 CHECK_VAR(.switch_tag, DEFAULT_TYPE); | 303 CHECK_VAR(.switch_tag, DEFAULT_TYPE); |
304 CHECK_EXPR(Literal, DEFAULT_TYPE); | 304 CHECK_EXPR(Literal, DEFAULT_TYPE); |
305 } | 305 } |
| 306 CHECK_EXPR(Literal, DEFAULT_TYPE); |
306 CHECK_VAR(.switch_tag, DEFAULT_TYPE); | 307 CHECK_VAR(.switch_tag, DEFAULT_TYPE); |
307 CHECK_EXPR(Literal, DEFAULT_TYPE); | 308 CHECK_EXPR(Literal, DEFAULT_TYPE); |
308 } | 309 } |
309 } | 310 } |
310 CHECK_TYPES_END | 311 CHECK_TYPES_END |
311 } | 312 } |
312 | 313 |
313 | 314 |
314 TEST(VisitThrow) { | 315 TEST(VisitThrow) { |
315 v8::V8::Initialize(); | 316 v8::V8::Initialize(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 } | 358 } |
358 // Then yields 123. | 359 // Then yields 123. |
359 CHECK_EXPR(Yield, DEFAULT_TYPE) { | 360 CHECK_EXPR(Yield, DEFAULT_TYPE) { |
360 CHECK_VAR(.generator_object, DEFAULT_TYPE); | 361 CHECK_VAR(.generator_object, DEFAULT_TYPE); |
361 CHECK_EXPR(Literal, DEFAULT_TYPE); | 362 CHECK_EXPR(Literal, DEFAULT_TYPE); |
362 } | 363 } |
363 } | 364 } |
364 } | 365 } |
365 CHECK_TYPES_END | 366 CHECK_TYPES_END |
366 } | 367 } |
OLD | NEW |