Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: src/hydrogen.cc

Issue 561103002: Inlining builtin functions when inlining cumulative nodes size exceeds (Closed) Base URL: http://github.com/v8/v8@bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7735 matching lines...) Expand 10 before | Expand all | Expand 10 after
7746 for (FunctionState* state = function_state(); 7746 for (FunctionState* state = function_state();
7747 state != NULL; 7747 state != NULL;
7748 state = state->outer()) { 7748 state = state->outer()) {
7749 if (*state->compilation_info()->closure() == *target) { 7749 if (*state->compilation_info()->closure() == *target) {
7750 TraceInline(target, caller, "target is recursive"); 7750 TraceInline(target, caller, "target is recursive");
7751 return false; 7751 return false;
7752 } 7752 }
7753 } 7753 }
7754 7754
7755 // We don't want to add more than a certain number of nodes from inlining. 7755 // We don't want to add more than a certain number of nodes from inlining.
7756 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, 7756 if (nodes_added > 0 &&
7757 inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative,
7757 kUnlimitedMaxInlinedNodesCumulative)) { 7758 kUnlimitedMaxInlinedNodesCumulative)) {
7758 TraceInline(target, caller, "cumulative AST node limit reached"); 7759 TraceInline(target, caller, "cumulative AST node limit reached");
7759 return false; 7760 return false;
7760 } 7761 }
7761 7762
7762 // Parse and allocate variables. 7763 // Parse and allocate variables.
7763 CompilationInfo target_info(target, zone()); 7764 CompilationInfo target_info(target, zone());
7764 // Use the same AstValueFactory for creating strings in the sub-compilation 7765 // Use the same AstValueFactory for creating strings in the sub-compilation
7765 // step, but don't transfer ownership to target_info. 7766 // step, but don't transfer ownership to target_info.
7766 target_info.SetAstValueFactory(top_info()->ast_value_factory(), false); 7767 target_info.SetAstValueFactory(top_info()->ast_value_factory(), false);
(...skipping 4726 matching lines...) Expand 10 before | Expand all | Expand 10 after
12493 if (ShouldProduceTraceOutput()) { 12494 if (ShouldProduceTraceOutput()) {
12494 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12495 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12495 } 12496 }
12496 12497
12497 #ifdef DEBUG 12498 #ifdef DEBUG
12498 graph_->Verify(false); // No full verify. 12499 graph_->Verify(false); // No full verify.
12499 #endif 12500 #endif
12500 } 12501 }
12501 12502
12502 } } // namespace v8::internal 12503 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698