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 | 10 |
(...skipping 7608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7619 | 7619 |
7620 // We don't want to add more than a certain number of nodes from inlining. | 7620 // We don't want to add more than a certain number of nodes from inlining. |
7621 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, | 7621 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, |
7622 kUnlimitedMaxInlinedNodesCumulative)) { | 7622 kUnlimitedMaxInlinedNodesCumulative)) { |
7623 TraceInline(target, caller, "cumulative AST node limit reached"); | 7623 TraceInline(target, caller, "cumulative AST node limit reached"); |
7624 return false; | 7624 return false; |
7625 } | 7625 } |
7626 | 7626 |
7627 // Parse and allocate variables. | 7627 // Parse and allocate variables. |
7628 CompilationInfo target_info(target, zone()); | 7628 CompilationInfo target_info(target, zone()); |
| 7629 // Use the same AstValueFactory for creating strings in the sub-compilation |
| 7630 // step, but don't transfer ownership to target_info. |
| 7631 target_info.SetAstValueFactory(top_info()->ast_value_factory(), false); |
7629 Handle<SharedFunctionInfo> target_shared(target->shared()); | 7632 Handle<SharedFunctionInfo> target_shared(target->shared()); |
7630 if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info)) { | 7633 if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info)) { |
7631 if (target_info.isolate()->has_pending_exception()) { | 7634 if (target_info.isolate()->has_pending_exception()) { |
7632 // Parse or scope error, never optimize this function. | 7635 // Parse or scope error, never optimize this function. |
7633 SetStackOverflow(); | 7636 SetStackOverflow(); |
7634 target_shared->DisableOptimization(kParseScopeError); | 7637 target_shared->DisableOptimization(kParseScopeError); |
7635 } | 7638 } |
7636 TraceInline(target, caller, "parse failure"); | 7639 TraceInline(target, caller, "parse failure"); |
7637 return false; | 7640 return false; |
7638 } | 7641 } |
(...skipping 4710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12349 if (ShouldProduceTraceOutput()) { | 12352 if (ShouldProduceTraceOutput()) { |
12350 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12353 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12351 } | 12354 } |
12352 | 12355 |
12353 #ifdef DEBUG | 12356 #ifdef DEBUG |
12354 graph_->Verify(false); // No full verify. | 12357 graph_->Verify(false); // No full verify. |
12355 #endif | 12358 #endif |
12356 } | 12359 } |
12357 | 12360 |
12358 } } // namespace v8::internal | 12361 } } // namespace v8::internal |
OLD | NEW |