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

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

Issue 1301583005: Rename ParserInfo::function() and CompilationInfo::function() to literal(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/x87/lithium-codegen-x87.cc ('k') | test/cctest/test-parsing.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/compiler/ast-loop-assignment-analyzer.h" 5 #include "src/compiler/ast-loop-assignment-analyzer.h"
6 #include "src/parser.h" 6 #include "src/parser.h"
7 #include "src/rewriter.h" 7 #include "src/rewriter.h"
8 #include "src/scopes.h" 8 #include "src/scopes.h"
9 #include "test/cctest/cctest.h" 9 #include "test/cctest/cctest.h"
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 void CheckLoopAssignedCount(int expected, const char* var_name) { 30 void CheckLoopAssignedCount(int expected, const char* var_name) {
31 // TODO(titzer): don't scope analyze every single time. 31 // TODO(titzer): don't scope analyze every single time.
32 ParseInfo parse_info(main_zone(), function); 32 ParseInfo parse_info(main_zone(), function);
33 CompilationInfo info(&parse_info); 33 CompilationInfo info(&parse_info);
34 34
35 CHECK(Parser::ParseStatic(&parse_info)); 35 CHECK(Parser::ParseStatic(&parse_info));
36 CHECK(Rewriter::Rewrite(&parse_info)); 36 CHECK(Rewriter::Rewrite(&parse_info));
37 CHECK(Scope::Analyze(&parse_info)); 37 CHECK(Scope::Analyze(&parse_info));
38 38
39 Scope* scope = info.function()->scope(); 39 Scope* scope = info.literal()->scope();
40 AstValueFactory* factory = parse_info.ast_value_factory(); 40 AstValueFactory* factory = parse_info.ast_value_factory();
41 CHECK(scope); 41 CHECK(scope);
42 42
43 if (result == NULL) { 43 if (result == NULL) {
44 AstLoopAssignmentAnalyzer analyzer(main_zone(), &info); 44 AstLoopAssignmentAnalyzer analyzer(main_zone(), &info);
45 result = analyzer.Analyze(); 45 result = analyzer.Analyze();
46 CHECK(result); 46 CHECK(result);
47 } 47 }
48 48
49 const i::AstRawString* name = factory->GetOneByteString(var_name); 49 const i::AstRawString* name = factory->GetOneByteString(var_name);
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 " while (1) z++;" 286 " while (1) z++;"
287 " }" 287 " }"
288 "}" 288 "}"
289 "w;"); 289 "w;");
290 290
291 f.CheckLoopAssignedCount(1, "x"); 291 f.CheckLoopAssignedCount(1, "x");
292 f.CheckLoopAssignedCount(3, "y"); 292 f.CheckLoopAssignedCount(3, "y");
293 f.CheckLoopAssignedCount(5, "z"); 293 f.CheckLoopAssignedCount(5, "z");
294 f.CheckLoopAssignedCount(0, "w"); 294 f.CheckLoopAssignedCount(0, "w");
295 } 295 }
OLDNEW
« no previous file with comments | « src/x87/lithium-codegen-x87.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698