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

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

Issue 1394303008: Remove unused Zone argument from InitializeAstVisitor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix cctests Created 5 years, 2 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/expression-type-collector.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.h" 7 #include "src/ast.h"
8 #include "src/ast-expression-visitor.h" 8 #include "src/ast-expression-visitor.h"
9 #include "src/parser.h" 9 #include "src/parser.h"
10 #include "src/rewriter.h" 10 #include "src/rewriter.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 info.set_lazy(false); 60 info.set_lazy(false);
61 info.set_allow_lazy_parsing(false); 61 info.set_allow_lazy_parsing(false);
62 info.set_toplevel(true); 62 info.set_toplevel(true);
63 63
64 CHECK(i::Compiler::ParseAndAnalyze(&info)); 64 CHECK(i::Compiler::ParseAndAnalyze(&info));
65 65
66 FunctionLiteral* root = 66 FunctionLiteral* root =
67 info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun(); 67 info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun();
68 AsmTyper typer(isolate, zone, *script, root); 68 AsmTyper typer(isolate, zone, *script, root);
69 if (typer.Validate()) { 69 if (typer.Validate()) {
70 ExpressionTypeCollector(isolate, zone, root, types).Run(); 70 ExpressionTypeCollector(isolate, root, types).Run();
71 return ""; 71 return "";
72 } else { 72 } else {
73 return typer.error_message(); 73 return typer.error_message();
74 } 74 }
75 } 75 }
76 76
77 } // namespace 77 } // namespace
78 78
79 79
80 TEST(ValidateMinimum) { 80 TEST(ValidateMinimum) {
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 "return {foo: foo, bar: 1};" 907 "return {foo: foo, bar: 1};"
908 "}\n"; 908 "}\n";
909 909
910 v8::V8::Initialize(); 910 v8::V8::Initialize();
911 HandleAndZoneScope handles; 911 HandleAndZoneScope handles;
912 Zone* zone = handles.main_zone(); 912 Zone* zone = handles.main_zone();
913 ZoneVector<ExpressionTypeEntry> types(zone); 913 ZoneVector<ExpressionTypeEntry> types(zone);
914 CHECK_EQ("asm: line 40: non-function in function table\n", 914 CHECK_EQ("asm: line 40: non-function in function table\n",
915 Validate(zone, test_function, &types)); 915 Validate(zone, test_function, &types));
916 } 916 }
OLDNEW
« no previous file with comments | « test/cctest/expression-type-collector.cc ('k') | test/cctest/test-ast-expression-visitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698