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

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

Issue 1318823010: Eliminate use of CompilationInfo in several AstVisitor descendants. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revised 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 | « test/cctest/test-asm-validator.cc ('k') | test/cctest/test-typing-reset.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 <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 20 matching lines...) Expand all
31 31
32 i::ParseInfo info(handles->main_zone(), script); 32 i::ParseInfo info(handles->main_zone(), script);
33 i::Parser parser(&info); 33 i::Parser parser(&info);
34 parser.set_allow_harmony_arrow_functions(true); 34 parser.set_allow_harmony_arrow_functions(true);
35 parser.set_allow_harmony_sloppy(true); 35 parser.set_allow_harmony_sloppy(true);
36 info.set_global(); 36 info.set_global();
37 info.set_lazy(false); 37 info.set_lazy(false);
38 info.set_allow_lazy_parsing(false); 38 info.set_allow_lazy_parsing(false);
39 info.set_toplevel(true); 39 info.set_toplevel(true);
40 40
41 i::CompilationInfo compilation_info(&info);
42 CHECK(i::Compiler::ParseAndAnalyze(&info)); 41 CHECK(i::Compiler::ParseAndAnalyze(&info));
43 info.set_literal(
44 info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun());
45 42
46 ExpressionTypeCollector(&compilation_info, dst).Run(); 43 ExpressionTypeCollector(
44 isolate, handles->main_zone(),
45 info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun(), dst)
46 .Run();
47 } 47 }
48 } 48 }
49 49
50 50
51 TEST(VisitExpressions) { 51 TEST(VisitExpressions) {
52 v8::V8::Initialize(); 52 v8::V8::Initialize();
53 HandleAndZoneScope handles; 53 HandleAndZoneScope handles;
54 ZoneVector<ExpressionTypeEntry> types(handles.main_zone()); 54 ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
55 const char test_function[] = 55 const char test_function[] =
56 "function GeometricMean(stdlib, foreign, buffer) {\n" 56 "function GeometricMean(stdlib, foreign, buffer) {\n"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) { 383 CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {
384 CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) { 384 CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) {
385 // Skip x + x 385 // Skip x + x
386 CHECK_SKIP(); 386 CHECK_SKIP();
387 CHECK_EXPR(Literal, Bounds::Unbounded()); 387 CHECK_EXPR(Literal, Bounds::Unbounded());
388 } 388 }
389 } 389 }
390 } 390 }
391 CHECK_TYPES_END 391 CHECK_TYPES_END
392 } 392 }
OLDNEW
« no previous file with comments | « test/cctest/test-asm-validator.cc ('k') | test/cctest/test-typing-reset.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698