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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |