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

Unified Diff: runtime/vm/object.cc

Issue 10832410: Give a length field to stack bitmaps. (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 side-by-side diff with in-line comments
Download patch
« runtime/vm/code_descriptors.cc ('K') | « runtime/vm/object.h ('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 af8695abcf43b802c1adeeeed8abc8553a5c65a3..4bd7cf57866aab75d56a900ea8fbb4850d5c0f13 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -6773,13 +6773,12 @@ void Stackmap::SetBit(intptr_t bit_index, bool value) const {
}
-RawStackmap* Stackmap::New(intptr_t pc_offset,
- intptr_t length,
- BitmapBuilder* bmap) {
+RawStackmap* Stackmap::New(intptr_t pc_offset, BitmapBuilder* bmap) {
ASSERT(Object::stackmap_class() != Class::null());
ASSERT(bmap != NULL);
Stackmap& result = Stackmap::Handle();
// Guard against integer overflow of the instance size computation.
+ intptr_t length = bmap->Length();
intptr_t payload_size =
Utils::RoundUp(length, kBitsPerByte) / kBitsPerByte;
if (payload_size < 0 ||
@@ -6807,7 +6806,6 @@ RawStackmap* Stackmap::New(intptr_t pc_offset,
for (intptr_t i = 0; i < length; ++i) {
result.SetBit(i, bmap->Get(i));
}
- ASSERT(bmap->Maximum() < length);
return result.raw();
}
« runtime/vm/code_descriptors.cc ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698