| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
| 10 #include "src/ast/ast-numbering.h" | 10 #include "src/ast/ast-numbering.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 return AbortOptimization(kTooManyParameters); | 125 return AbortOptimization(kTooManyParameters); |
| 126 } | 126 } |
| 127 | 127 |
| 128 if (info()->is_osr() && | 128 if (info()->is_osr() && |
| 129 LUnallocated::TooManyParametersOrStackSlots(scope->num_parameters(), | 129 LUnallocated::TooManyParametersOrStackSlots(scope->num_parameters(), |
| 130 scope->num_stack_slots())) { | 130 scope->num_stack_slots())) { |
| 131 // Crankshaft would require too many Lithium operands. | 131 // Crankshaft would require too many Lithium operands. |
| 132 return AbortOptimization(kTooManyParametersLocals); | 132 return AbortOptimization(kTooManyParametersLocals); |
| 133 } | 133 } |
| 134 | 134 |
| 135 if (FLAG_trace_opt) { | |
| 136 OFStream os(stdout); | |
| 137 os << "[compiling method " << Brief(*info()->closure()) | |
| 138 << " using Crankshaft"; | |
| 139 if (info()->is_osr()) os << " OSR"; | |
| 140 os << "]" << std::endl; | |
| 141 } | |
| 142 | |
| 143 if (FLAG_trace_hydrogen) { | 135 if (FLAG_trace_hydrogen) { |
| 144 isolate()->GetHTracer()->TraceCompilation(info()); | 136 isolate()->GetHTracer()->TraceCompilation(info()); |
| 145 } | 137 } |
| 146 | 138 |
| 147 // Type-check the function. | 139 // Type-check the function. |
| 148 AstTyper(info()->isolate(), info()->zone(), info()->closure(), | 140 AstTyper(info()->isolate(), info()->zone(), info()->closure(), |
| 149 info()->scope(), info()->osr_ast_id(), info()->literal()) | 141 info()->scope(), info()->osr_ast_id(), info()->literal()) |
| 150 .Run(); | 142 .Run(); |
| 151 | 143 |
| 152 // Optimization could have been disabled by the parser. Note that this check | 144 // Optimization could have been disabled by the parser. Note that this check |
| (...skipping 13550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13703 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13695 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13704 } | 13696 } |
| 13705 | 13697 |
| 13706 #ifdef DEBUG | 13698 #ifdef DEBUG |
| 13707 graph_->Verify(false); // No full verify. | 13699 graph_->Verify(false); // No full verify. |
| 13708 #endif | 13700 #endif |
| 13709 } | 13701 } |
| 13710 | 13702 |
| 13711 } // namespace internal | 13703 } // namespace internal |
| 13712 } // namespace v8 | 13704 } // namespace v8 |
| OLD | NEW |