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

Side by Side Diff: test/cctest/test-asm-validator.cc

Issue 1858943002: Remove runtime flags for sloppy mode block scoping features (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 8 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 | « test/cctest/compiler/test-run-jsops.cc ('k') | test/cctest/test-ast-expression-visitor.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 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/ast-expression-visitor.h" 8 #include "src/ast/ast-expression-visitor.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/parsing/parser.h" 10 #include "src/parsing/parser.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 i::Isolate* isolate = CcTest::i_isolate(); 54 i::Isolate* isolate = CcTest::i_isolate();
55 i::Factory* factory = isolate->factory(); 55 i::Factory* factory = isolate->factory();
56 56
57 i::Handle<i::String> source_code = 57 i::Handle<i::String> source_code =
58 factory->NewStringFromUtf8(i::CStrVector(source)).ToHandleChecked(); 58 factory->NewStringFromUtf8(i::CStrVector(source)).ToHandleChecked();
59 59
60 i::Handle<i::Script> script = factory->NewScript(source_code); 60 i::Handle<i::Script> script = factory->NewScript(source_code);
61 61
62 i::ParseInfo info(zone, script); 62 i::ParseInfo info(zone, script);
63 i::Parser parser(&info); 63 i::Parser parser(&info);
64 parser.set_allow_harmony_sloppy(true);
65 info.set_global(); 64 info.set_global();
66 info.set_lazy(false); 65 info.set_lazy(false);
67 info.set_allow_lazy_parsing(false); 66 info.set_allow_lazy_parsing(false);
68 info.set_toplevel(true); 67 info.set_toplevel(true);
69 68
70 CHECK(i::Compiler::ParseAndAnalyze(&info)); 69 CHECK(i::Compiler::ParseAndAnalyze(&info));
71 70
72 FunctionLiteral* root = 71 FunctionLiteral* root =
73 info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun(); 72 info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun();
74 AsmTyper typer(isolate, zone, *script, root); 73 AsmTyper typer(isolate, zone, *script, root);
(...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after
2505 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) { 2504 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) {
2506 CHECK_VAR(x, Bounds(cache.kAsmDouble)); 2505 CHECK_VAR(x, Bounds(cache.kAsmDouble));
2507 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); 2506 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble));
2508 } 2507 }
2509 } 2508 }
2510 } 2509 }
2511 CHECK_SKIP(); 2510 CHECK_SKIP();
2512 } 2511 }
2513 CHECK_FUNC_TYPES_END 2512 CHECK_FUNC_TYPES_END
2514 } 2513 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-run-jsops.cc ('k') | test/cctest/test-ast-expression-visitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698