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

Unified Diff: runtime/vm/object.cc

Issue 10829036: Change the stack map search to require an exact match. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « runtime/vm/flow_graph_allocator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index bb4d82b5c2f3448da4c018f5cbfadc031a37d7fa..19a5de803ce50b84e0b61661d6d44bcb89cae7e2 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -7050,24 +7050,18 @@ RawStackmap* Code::GetStackmap(uword pc, Array* maps, Stackmap* map) const {
}
// A stack map is present in the code object, use the stack map to visit
// frame slots which are marked as having objects.
- RawStackmap* previous_map = Stackmap::null();
*maps = stackmaps();
*map = Stackmap::null();
for (intptr_t i = 0; i < maps->Length(); i++) {
*map ^= maps->At(i);
ASSERT(!map->IsNull());
if (map->PC() == pc) {
- break; // We found a stack map for this frame.
+ return map->raw(); // We found a stack map for this frame.
}
- if (map->PC() > pc) {
- // We have not found a stackmap corresponding to the PC of this frame,
- // we will use the closest previous stack map.
- *map = previous_map;
- break;
- }
- previous_map = map->raw();
}
- return map->raw();
+ // If the code has stackmaps, it must have them for all safepoints.
+ UNREACHABLE();
+ return Stackmap::null();
}
« no previous file with comments | « runtime/vm/flow_graph_allocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698