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

Unified Diff: runtime/vm/raw_object.cc

Issue 10837303: Make stackmaps store their actual length. (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
Index: runtime/vm/raw_object.cc
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index 9b96266b50ef01f50c306aeccf98756bfc1369ee..f39398b3d03e70255bbea6d97f1086c8ee7f5d76 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -208,8 +208,8 @@ intptr_t RawObject::SizeFromClass() const {
}
case kStackmapCid: {
const RawStackmap* map = reinterpret_cast<const RawStackmap*>(this);
- intptr_t size_in_bytes = Smi::Value(map->ptr()->bitmap_size_in_bytes_);
- instance_size = Stackmap::InstanceSize(size_in_bytes);
+ intptr_t length = map->ptr()->length_;
+ instance_size = Stackmap::InstanceSize(length);
break;
}
case kLocalVarDescriptorsCid: {
@@ -484,9 +484,9 @@ intptr_t RawPcDescriptors::VisitPcDescriptorsPointers(
intptr_t RawStackmap::VisitStackmapPointers(RawStackmap* raw_obj,
ObjectPointerVisitor* visitor) {
RawStackmap* obj = raw_obj->ptr();
- intptr_t size_in_bytes = Smi::Value(obj->bitmap_size_in_bytes_);
- visitor->VisitPointers(raw_obj->from(), raw_obj->to());
- return Stackmap::InstanceSize(size_in_bytes);
+ intptr_t length = obj->length_;
+ visitor->VisitPointer(reinterpret_cast<RawObject**>(&obj->code_));
+ return Stackmap::InstanceSize(length);
}
« runtime/vm/object.cc ('K') | « runtime/vm/raw_object.h ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698