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

Side by Side Diff: test/cctest/compiler/test-loop-assignment-analysis.cc

Issue 1863083002: [parser] Remove ParseInfo::closure field. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-internal-9
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-linkage.cc ('k') | test/cctest/compiler/test-pipeline.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ast/scopes.h" 5 #include "src/ast/scopes.h"
6 #include "src/compiler/ast-loop-assignment-analyzer.h" 6 #include "src/compiler/ast-loop-assignment-analyzer.h"
7 #include "src/parsing/parser.h" 7 #include "src/parsing/parser.h"
8 #include "src/parsing/rewriter.h" 8 #include "src/parsing/rewriter.h"
9 #include "test/cctest/cctest.h" 9 #include "test/cctest/cctest.h"
10 10
(...skipping 13 matching lines...) Expand all
24 ScopedVector<char> program(kBufferSize); 24 ScopedVector<char> program(kBufferSize);
25 SNPrintF(program, "function f(a,b,c) { %s; } f;", body); 25 SNPrintF(program, "function f(a,b,c) { %s; } f;", body);
26 v8::Local<v8::Value> v = CompileRun(program.start()); 26 v8::Local<v8::Value> v = CompileRun(program.start());
27 Handle<Object> obj = v8::Utils::OpenHandle(*v); 27 Handle<Object> obj = v8::Utils::OpenHandle(*v);
28 function = Handle<JSFunction>::cast(obj); 28 function = Handle<JSFunction>::cast(obj);
29 } 29 }
30 30
31 void CheckLoopAssignedCount(int expected, const char* var_name) { 31 void CheckLoopAssignedCount(int expected, const char* var_name) {
32 // TODO(titzer): don't scope analyze every single time. 32 // TODO(titzer): don't scope analyze every single time.
33 ParseInfo parse_info(main_zone(), function); 33 ParseInfo parse_info(main_zone(), function);
34 CompilationInfo info(&parse_info); 34 CompilationInfo info(&parse_info, function);
35 35
36 CHECK(Parser::ParseStatic(&parse_info)); 36 CHECK(Parser::ParseStatic(&parse_info));
37 CHECK(Rewriter::Rewrite(&parse_info)); 37 CHECK(Rewriter::Rewrite(&parse_info));
38 CHECK(Scope::Analyze(&parse_info)); 38 CHECK(Scope::Analyze(&parse_info));
39 39
40 Scope* scope = info.literal()->scope(); 40 Scope* scope = info.literal()->scope();
41 AstValueFactory* factory = parse_info.ast_value_factory(); 41 AstValueFactory* factory = parse_info.ast_value_factory();
42 CHECK(scope); 42 CHECK(scope);
43 43
44 if (result == NULL) { 44 if (result == NULL) {
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 291
292 f.CheckLoopAssignedCount(1, "x"); 292 f.CheckLoopAssignedCount(1, "x");
293 f.CheckLoopAssignedCount(3, "y"); 293 f.CheckLoopAssignedCount(3, "y");
294 f.CheckLoopAssignedCount(5, "z"); 294 f.CheckLoopAssignedCount(5, "z");
295 f.CheckLoopAssignedCount(0, "w"); 295 f.CheckLoopAssignedCount(0, "w");
296 } 296 }
297 297
298 } // namespace compiler 298 } // namespace compiler
299 } // namespace internal 299 } // namespace internal
300 } // namespace v8 300 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-linkage.cc ('k') | test/cctest/compiler/test-pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698