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

Unified Diff: runtime/vm/flow_graph_allocator.cc

Issue 22412002: Fix register allocation bug in building use intervals. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | tests/language/regress_11800_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_allocator.cc
===================================================================
--- runtime/vm/flow_graph_allocator.cc (revision 25808)
+++ runtime/vm/flow_graph_allocator.cc (working copy)
@@ -264,13 +264,17 @@
// If the first use interval and the use interval we are adding
// touch then we can just extend the first interval to cover their
// union.
- if (start >= first_use_interval()->start()) {
+ if (start > first_use_interval()->start()) {
// The only case when we can add intervals with start greater than
// start of an already created interval is BlockLocation.
- ASSERT((start == first_use_interval()->start()) ||
- (vreg() == kNoVirtualRegister));
+ ASSERT(vreg() == kNoVirtualRegister);
ASSERT(end <= first_use_interval()->end());
return;
+ } else if (start == first_use_interval()->start()) {
+ // Grow first interval if necessary.
+ if (end <= first_use_interval()->end()) return;
+ first_use_interval_->end_ = end;
+ return;
} else if (end == first_use_interval()->start()) {
first_use_interval()->start_ = start;
return;
« no previous file with comments | « no previous file | tests/language/regress_11800_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698