| 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/hydrogen.h" | 5 #include "src/hydrogen.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 7830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7841 // Always inline small methods (<= 10 nodes). | 7841 // Always inline small methods (<= 10 nodes). |
| 7842 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, | 7842 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, |
| 7843 kUnlimitedMaxInlinedNodesCumulative)) { | 7843 kUnlimitedMaxInlinedNodesCumulative)) { |
| 7844 TraceInline(target, caller, "cumulative AST node limit reached"); | 7844 TraceInline(target, caller, "cumulative AST node limit reached"); |
| 7845 return false; | 7845 return false; |
| 7846 } | 7846 } |
| 7847 | 7847 |
| 7848 // Parse and allocate variables. | 7848 // Parse and allocate variables. |
| 7849 // Use the same AstValueFactory for creating strings in the sub-compilation | 7849 // Use the same AstValueFactory for creating strings in the sub-compilation |
| 7850 // step, but don't transfer ownership to target_info. | 7850 // step, but don't transfer ownership to target_info. |
| 7851 ParseInfo parse_info(zone()); | 7851 ParseInfo parse_info(zone(), target); |
| 7852 parse_info.InitializeFromJSFunction(target); | |
| 7853 parse_info.set_ast_value_factory( | 7852 parse_info.set_ast_value_factory( |
| 7854 top_info()->parse_info()->ast_value_factory()); | 7853 top_info()->parse_info()->ast_value_factory()); |
| 7855 parse_info.set_ast_value_factory_owned(false); | 7854 parse_info.set_ast_value_factory_owned(false); |
| 7856 | 7855 |
| 7857 CompilationInfo target_info(&parse_info); | 7856 CompilationInfo target_info(&parse_info); |
| 7858 Handle<SharedFunctionInfo> target_shared(target->shared()); | 7857 Handle<SharedFunctionInfo> target_shared(target->shared()); |
| 7859 if (!Compiler::ParseAndAnalyze(target_info.parse_info())) { | 7858 if (!Compiler::ParseAndAnalyze(target_info.parse_info())) { |
| 7860 if (target_info.isolate()->has_pending_exception()) { | 7859 if (target_info.isolate()->has_pending_exception()) { |
| 7861 // Parse or scope error, never optimize this function. | 7860 // Parse or scope error, never optimize this function. |
| 7862 SetStackOverflow(); | 7861 SetStackOverflow(); |
| (...skipping 5517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13380 if (ShouldProduceTraceOutput()) { | 13379 if (ShouldProduceTraceOutput()) { |
| 13381 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13380 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13382 } | 13381 } |
| 13383 | 13382 |
| 13384 #ifdef DEBUG | 13383 #ifdef DEBUG |
| 13385 graph_->Verify(false); // No full verify. | 13384 graph_->Verify(false); // No full verify. |
| 13386 #endif | 13385 #endif |
| 13387 } | 13386 } |
| 13388 | 13387 |
| 13389 } } // namespace v8::internal | 13388 } } // namespace v8::internal |
| OLD | NEW |