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 <memory> | 7 #include <memory> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
(...skipping 8220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8231 // Always inline small methods (<= 10 nodes). | 8231 // Always inline small methods (<= 10 nodes). |
8232 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, | 8232 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, |
8233 kUnlimitedMaxInlinedNodesCumulative)) { | 8233 kUnlimitedMaxInlinedNodesCumulative)) { |
8234 TraceInline(target, caller, "cumulative AST node limit reached"); | 8234 TraceInline(target, caller, "cumulative AST node limit reached"); |
8235 return false; | 8235 return false; |
8236 } | 8236 } |
8237 | 8237 |
8238 // Parse and allocate variables. | 8238 // Parse and allocate variables. |
8239 // Use the same AstValueFactory for creating strings in the sub-compilation | 8239 // Use the same AstValueFactory for creating strings in the sub-compilation |
8240 // step, but don't transfer ownership to target_info. | 8240 // step, but don't transfer ownership to target_info. |
8241 Handle<SharedFunctionInfo> target_shared(target->shared()); | 8241 ParseInfo parse_info(zone(), target); |
8242 ParseInfo parse_info(zone(), target_shared); | |
8243 parse_info.set_ast_value_factory( | 8242 parse_info.set_ast_value_factory( |
8244 top_info()->parse_info()->ast_value_factory()); | 8243 top_info()->parse_info()->ast_value_factory()); |
8245 parse_info.set_ast_value_factory_owned(false); | 8244 parse_info.set_ast_value_factory_owned(false); |
8246 | 8245 |
8247 CompilationInfo target_info(&parse_info, target); | 8246 CompilationInfo target_info(&parse_info, target); |
| 8247 Handle<SharedFunctionInfo> target_shared(target->shared()); |
8248 | 8248 |
8249 if (inlining_kind != CONSTRUCT_CALL_RETURN && | 8249 if (inlining_kind != CONSTRUCT_CALL_RETURN && |
8250 IsClassConstructor(target_shared->kind())) { | 8250 IsClassConstructor(target_shared->kind())) { |
8251 TraceInline(target, caller, "target is classConstructor"); | 8251 TraceInline(target, caller, "target is classConstructor"); |
8252 return false; | 8252 return false; |
8253 } | 8253 } |
8254 | 8254 |
8255 if (target_shared->HasDebugInfo()) { | 8255 if (target_shared->HasDebugInfo()) { |
8256 TraceInline(target, caller, "target is being debugged"); | 8256 TraceInline(target, caller, "target is being debugged"); |
8257 return false; | 8257 return false; |
(...skipping 5025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13283 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13283 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13284 } | 13284 } |
13285 | 13285 |
13286 #ifdef DEBUG | 13286 #ifdef DEBUG |
13287 graph_->Verify(false); // No full verify. | 13287 graph_->Verify(false); // No full verify. |
13288 #endif | 13288 #endif |
13289 } | 13289 } |
13290 | 13290 |
13291 } // namespace internal | 13291 } // namespace internal |
13292 } // namespace v8 | 13292 } // namespace v8 |
OLD | NEW |