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

Side by Side Diff: runtime/vm/flow_graph_allocator.cc

Issue 10827139: Fix a register allocation crash on IA32, caused by an uninitialized finger. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« runtime/vm/compiler.cc ('K') | « runtime/vm/compiler.cc ('k') | 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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_allocator.h" 5 #include "vm/flow_graph_allocator.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/il_printer.h" 9 #include "vm/il_printer.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 LiveRange* LiveRange::MakeTemp(intptr_t pos, Location* location_slot) { 1057 LiveRange* LiveRange::MakeTemp(intptr_t pos, Location* location_slot) {
1058 UNREACHABLE(); 1058 UNREACHABLE();
1059 return NULL; 1059 return NULL;
1060 } 1060 }
1061 1061
1062 1062
1063 LiveRange* LiveRange::SplitAt(intptr_t split_pos) { 1063 LiveRange* LiveRange::SplitAt(intptr_t split_pos) {
1064 if (Start() == split_pos) return this; 1064 if (Start() == split_pos) return this;
1065 1065
1066 UseInterval* interval = finger_.first_pending_use_interval(); 1066 UseInterval* interval = finger_.first_pending_use_interval();
1067 if (interval == NULL) {
Vyacheslav Egorov (Google) 2012/08/02 13:38:56 We should consider initializing finger eagerly.
1068 finger_.Initialize(this);
1069 interval = finger_.first_pending_use_interval();
1070 }
1071
1067 ASSERT(interval->start() < split_pos); 1072 ASSERT(interval->start() < split_pos);
1068 ASSERT(split_pos < End()); 1073 ASSERT(split_pos < End());
1069 1074
1070 // Corner case. We need to start over to find previous interval. 1075 // Corner case. We need to start over to find previous interval.
1071 if (interval->start() == split_pos) interval = first_use_interval_; 1076 if (interval->start() == split_pos) interval = first_use_interval_;
1072 1077
1073 UseInterval* last_before_split = NULL; 1078 UseInterval* last_before_split = NULL;
1074 while (interval->end() <= split_pos) { 1079 while (interval->end() <= split_pos) {
1075 last_before_split = interval; 1080 last_before_split = interval;
1076 interval = interval->next(); 1081 interval = interval->next();
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1749 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", 1754 OS::Print("-- [after ssa allocator] ir [%s] -------------\n",
1750 function.ToFullyQualifiedCString()); 1755 function.ToFullyQualifiedCString());
1751 FlowGraphPrinter printer(Function::Handle(), block_order_, true); 1756 FlowGraphPrinter printer(Function::Handle(), block_order_, true);
1752 printer.PrintBlocks(); 1757 printer.PrintBlocks();
1753 OS::Print("----------------------------------------------\n"); 1758 OS::Print("----------------------------------------------\n");
1754 } 1759 }
1755 } 1760 }
1756 1761
1757 1762
1758 } // namespace dart 1763 } // namespace dart
OLDNEW
« runtime/vm/compiler.cc ('K') | « runtime/vm/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698