| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
| (...skipping 7607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7618 | 7618 |
| 7619 // We don't want to add more than a certain number of nodes from inlining. | 7619 // We don't want to add more than a certain number of nodes from inlining. |
| 7620 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, | 7620 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, |
| 7621 kUnlimitedMaxInlinedNodesCumulative)) { | 7621 kUnlimitedMaxInlinedNodesCumulative)) { |
| 7622 TraceInline(target, caller, "cumulative AST node limit reached"); | 7622 TraceInline(target, caller, "cumulative AST node limit reached"); |
| 7623 return false; | 7623 return false; |
| 7624 } | 7624 } |
| 7625 | 7625 |
| 7626 // Parse and allocate variables. | 7626 // Parse and allocate variables. |
| 7627 CompilationInfo target_info(target, zone()); | 7627 CompilationInfo target_info(target, zone()); |
| 7628 // Use the same AstValueFactory for creating strings in the sub-compilation |
| 7629 // step, but don't transfer ownership to target_info. |
| 7630 target_info.SetAstValueFactory(top_info()->ast_value_factory(), false); |
| 7628 Handle<SharedFunctionInfo> target_shared(target->shared()); | 7631 Handle<SharedFunctionInfo> target_shared(target->shared()); |
| 7629 if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info)) { | 7632 if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info)) { |
| 7630 if (target_info.isolate()->has_pending_exception()) { | 7633 if (target_info.isolate()->has_pending_exception()) { |
| 7631 // Parse or scope error, never optimize this function. | 7634 // Parse or scope error, never optimize this function. |
| 7632 SetStackOverflow(); | 7635 SetStackOverflow(); |
| 7633 target_shared->DisableOptimization(kParseScopeError); | 7636 target_shared->DisableOptimization(kParseScopeError); |
| 7634 } | 7637 } |
| 7635 TraceInline(target, caller, "parse failure"); | 7638 TraceInline(target, caller, "parse failure"); |
| 7636 return false; | 7639 return false; |
| 7637 } | 7640 } |
| (...skipping 4779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12417 if (ShouldProduceTraceOutput()) { | 12420 if (ShouldProduceTraceOutput()) { |
| 12418 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12421 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12419 } | 12422 } |
| 12420 | 12423 |
| 12421 #ifdef DEBUG | 12424 #ifdef DEBUG |
| 12422 graph_->Verify(false); // No full verify. | 12425 graph_->Verify(false); // No full verify. |
| 12423 #endif | 12426 #endif |
| 12424 } | 12427 } |
| 12425 | 12428 |
| 12426 } } // namespace v8::internal | 12429 } } // namespace v8::internal |
| OLD | NEW |