| OLD | NEW |
| 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 << " using Crankshaft"; | 461 << " using Crankshaft"; |
| 462 if (info()->is_osr()) os << " OSR"; | 462 if (info()->is_osr()) os << " OSR"; |
| 463 os << "]" << std::endl; | 463 os << "]" << std::endl; |
| 464 } | 464 } |
| 465 | 465 |
| 466 if (FLAG_trace_hydrogen) { | 466 if (FLAG_trace_hydrogen) { |
| 467 isolate()->GetHTracer()->TraceCompilation(info()); | 467 isolate()->GetHTracer()->TraceCompilation(info()); |
| 468 } | 468 } |
| 469 | 469 |
| 470 // Type-check the function. | 470 // Type-check the function. |
| 471 AstTyper::Run(info()); | 471 AstTyper(info()).Run(); |
| 472 | 472 |
| 473 // Optimization could have been disabled by the parser. Note that this check | 473 // Optimization could have been disabled by the parser. Note that this check |
| 474 // is only needed because the Hydrogen graph builder is missing some bailouts. | 474 // is only needed because the Hydrogen graph builder is missing some bailouts. |
| 475 if (info()->shared_info()->optimization_disabled()) { | 475 if (info()->shared_info()->optimization_disabled()) { |
| 476 return AbortOptimization( | 476 return AbortOptimization( |
| 477 info()->shared_info()->disable_optimization_reason()); | 477 info()->shared_info()->disable_optimization_reason()); |
| 478 } | 478 } |
| 479 | 479 |
| 480 graph_builder_ = (info()->is_tracking_positions() || FLAG_trace_ic) | 480 graph_builder_ = (info()->is_tracking_positions() || FLAG_trace_ic) |
| 481 ? new (info()->zone()) | 481 ? new (info()->zone()) |
| (...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1717 | 1717 |
| 1718 | 1718 |
| 1719 #if DEBUG | 1719 #if DEBUG |
| 1720 void CompilationInfo::PrintAstForTesting() { | 1720 void CompilationInfo::PrintAstForTesting() { |
| 1721 PrintF("--- Source from AST ---\n%s\n", | 1721 PrintF("--- Source from AST ---\n%s\n", |
| 1722 PrettyPrinter(isolate(), zone()).PrintProgram(literal())); | 1722 PrettyPrinter(isolate(), zone()).PrintProgram(literal())); |
| 1723 } | 1723 } |
| 1724 #endif | 1724 #endif |
| 1725 } // namespace internal | 1725 } // namespace internal |
| 1726 } // namespace v8 | 1726 } // namespace v8 |
| OLD | NEW |