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

Side by Side Diff: src/compiler.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 | « src/ast-expression-visitor.cc ('k') | src/hydrogen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/ast-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 << " using Crankshaft"; 481 << " using Crankshaft";
482 if (info()->is_osr()) os << " OSR"; 482 if (info()->is_osr()) os << " OSR";
483 os << "]" << std::endl; 483 os << "]" << std::endl;
484 } 484 }
485 485
486 if (FLAG_trace_hydrogen) { 486 if (FLAG_trace_hydrogen) {
487 isolate()->GetHTracer()->TraceCompilation(info()); 487 isolate()->GetHTracer()->TraceCompilation(info());
488 } 488 }
489 489
490 // Type-check the function. 490 // Type-check the function.
491 AstTyper(info()).Run(); 491 AstTyper(info()->isolate(), info()->zone(), info()->closure(),
492 info()->scope(), info()->osr_ast_id(), info()->literal())
493 .Run();
492 494
493 // Optimization could have been disabled by the parser. Note that this check 495 // Optimization could have been disabled by the parser. Note that this check
494 // is only needed because the Hydrogen graph builder is missing some bailouts. 496 // is only needed because the Hydrogen graph builder is missing some bailouts.
495 if (info()->shared_info()->optimization_disabled()) { 497 if (info()->shared_info()->optimization_disabled()) {
496 return AbortOptimization( 498 return AbortOptimization(
497 info()->shared_info()->disable_optimization_reason()); 499 info()->shared_info()->disable_optimization_reason());
498 } 500 }
499 501
500 graph_builder_ = (info()->is_tracking_positions() || FLAG_trace_ic) 502 graph_builder_ = (info()->is_tracking_positions() || FLAG_trace_ic)
501 ? new (info()->zone()) 503 ? new (info()->zone())
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 } 1755 }
1754 1756
1755 #if DEBUG 1757 #if DEBUG
1756 void CompilationInfo::PrintAstForTesting() { 1758 void CompilationInfo::PrintAstForTesting() {
1757 PrintF("--- Source from AST ---\n%s\n", 1759 PrintF("--- Source from AST ---\n%s\n",
1758 PrettyPrinter(isolate(), zone()).PrintProgram(literal())); 1760 PrettyPrinter(isolate(), zone()).PrintProgram(literal()));
1759 } 1761 }
1760 #endif 1762 #endif
1761 } // namespace internal 1763 } // namespace internal
1762 } // namespace v8 1764 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast-expression-visitor.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698