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

Unified Diff: src/compiler.cc

Issue 885004: Only invoke reaching definitions if there are >0 variables and >0 definitions... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/data-flow.cc » ('j') | src/data-flow.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
===================================================================
--- src/compiler.cc (revision 4119)
+++ src/compiler.cc (working copy)
@@ -95,10 +95,12 @@
if (!builder.HasStackOverflow()) {
int variable_count =
function->num_parameters() + function->scope()->num_stack_slots();
- ReachingDefinitions rd(builder.postorder(),
- builder.definitions(),
- variable_count);
- rd.Compute();
+ if (variable_count > 0 && builder.definitions()->length() > 0) {
Kevin Millikin (Chromium) 2010/03/12 14:58:16 Hmm. I'd let the ReachingDefinitions class check
+ ReachingDefinitions rd(builder.postorder(),
+ builder.definitions(),
+ variable_count);
+ rd.Compute();
+ }
}
#ifdef DEBUG
@@ -497,10 +499,12 @@
if (!builder.HasStackOverflow()) {
int variable_count =
literal->num_parameters() + literal->scope()->num_stack_slots();
- ReachingDefinitions rd(builder.postorder(),
- builder.definitions(),
- variable_count);
- rd.Compute();
+ if (variable_count > 0 && builder.definitions()->length() > 0) {
+ ReachingDefinitions rd(builder.postorder(),
+ builder.definitions(),
+ variable_count);
+ rd.Compute();
+ }
}
#ifdef DEBUG
« no previous file with comments | « no previous file | src/data-flow.cc » ('j') | src/data-flow.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698