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

Side by Side Diff: test/cctest/test-ast-expression-visitor.cc

Issue 1309303006: Propagate switch statement value for 'eval' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix AST tests Created 5 years, 3 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
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/regress/regress-4399.js » ('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 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
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
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 }
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/regress/regress-4399.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698