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

Unified Diff: runtime/vm/flow_graph_allocator.cc

Issue 10963029: Fix bug in assigning the positions of safepoints. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | 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 12703)
+++ runtime/vm/flow_graph_allocator.cc (working copy)
@@ -55,6 +55,11 @@
}
+static intptr_t ToInstructionEnd(intptr_t pos) {
+ return (pos | 1);
+}
+
+
FlowGraphAllocator::FlowGraphAllocator(const FlowGraph& flow_graph)
: flow_graph_(flow_graph),
block_order_(flow_graph.reverse_postorder()),
@@ -304,7 +309,9 @@
void LiveRange::AddSafepoint(intptr_t pos, LocationSummary* locs) {
- SafepointPosition* safepoint = new SafepointPosition(pos, locs);
+ ASSERT(IsInstructionStartPosition(pos));
+ SafepointPosition* safepoint =
+ new SafepointPosition(ToInstructionEnd(pos), locs);
if (first_safepoint_ == NULL) {
ASSERT(last_safepoint_ == NULL);
« 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