| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 HCompilationJob::Status HCompilationJob::CreateGraphImpl() { | 114 HCompilationJob::Status HCompilationJob::CreateGraphImpl() { |
| 115 bool dont_crankshaft = info()->shared_info()->dont_crankshaft(); | 115 bool dont_crankshaft = info()->shared_info()->dont_crankshaft(); |
| 116 | 116 |
| 117 if (!isolate()->use_crankshaft() || dont_crankshaft) { | 117 if (!isolate()->use_crankshaft() || dont_crankshaft) { |
| 118 // Crankshaft is entirely disabled. | 118 // Crankshaft is entirely disabled. |
| 119 return FAILED; | 119 return FAILED; |
| 120 } | 120 } |
| 121 | 121 |
| 122 // Check the whitelist for Crankshaft. |
| 123 if (!info()->shared_info()->PassesFilter(FLAG_hydrogen_filter)) { |
| 124 return AbortOptimization(kHydrogenFilter); |
| 125 } |
| 126 |
| 122 Scope* scope = info()->scope(); | 127 Scope* scope = info()->scope(); |
| 123 if (LUnallocated::TooManyParameters(scope->num_parameters())) { | 128 if (LUnallocated::TooManyParameters(scope->num_parameters())) { |
| 124 // Crankshaft would require too many Lithium operands. | 129 // Crankshaft would require too many Lithium operands. |
| 125 return AbortOptimization(kTooManyParameters); | 130 return AbortOptimization(kTooManyParameters); |
| 126 } | 131 } |
| 127 | 132 |
| 128 if (info()->is_osr() && | 133 if (info()->is_osr() && |
| 129 LUnallocated::TooManyParametersOrStackSlots(scope->num_parameters(), | 134 LUnallocated::TooManyParametersOrStackSlots(scope->num_parameters(), |
| 130 scope->num_stack_slots())) { | 135 scope->num_stack_slots())) { |
| 131 // Crankshaft would require too many Lithium operands. | 136 // Crankshaft would require too many Lithium operands. |
| (...skipping 13571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13703 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13708 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13704 } | 13709 } |
| 13705 | 13710 |
| 13706 #ifdef DEBUG | 13711 #ifdef DEBUG |
| 13707 graph_->Verify(false); // No full verify. | 13712 graph_->Verify(false); // No full verify. |
| 13708 #endif | 13713 #endif |
| 13709 } | 13714 } |
| 13710 | 13715 |
| 13711 } // namespace internal | 13716 } // namespace internal |
| 13712 } // namespace v8 | 13717 } // namespace v8 |
| OLD | NEW |