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

Unified Diff: runtime/vm/object.cc

Issue 171513003: Don't forget to subtract materialization instructions when computing the offset of the frame pointe… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add accessor Created 6 years, 10 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/object.h ('k') | runtime/vm/stack_frame.h » ('j') | 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 df878d46bf24b22c675c544a76ca1be8610116ab..34826b660862ef5783e393a91751210cb534239f 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -9811,11 +9811,7 @@ intptr_t DeoptInfo::Instruction(intptr_t index) const {
intptr_t DeoptInfo::FrameSize() const {
- intptr_t pos = 0;
- while (Instruction(pos) == DeoptInstr::kMaterializeObject) {
- pos++;
- }
- return TranslationLength() - pos;
+ return TranslationLength() - NumMaterializations();
}
@@ -9832,6 +9828,15 @@ intptr_t DeoptInfo::TranslationLength() const {
}
+intptr_t DeoptInfo::NumMaterializations() const {
+ intptr_t pos = 0;
+ while (Instruction(pos) == DeoptInstr::kMaterializeObject) {
+ pos++;
+ }
+ return pos;
+}
+
+
void DeoptInfo::ToInstructions(const Array& table,
GrowableArray<DeoptInstr*>* instructions) const {
ASSERT(instructions->is_empty());
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/stack_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698