Index: src/deoptimizer.cc |
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc |
index 1f645e41cc6d7c18063b623178d4fcfc197dcfc8..5e4ae5e47e2f1c71cc96440d24c50cecb592a0af 100644 |
--- a/src/deoptimizer.cc |
+++ b/src/deoptimizer.cc |
@@ -3287,6 +3287,13 @@ Handle<Object> SlotRefValueBuilder::GetNext(Isolate* isolate, int lvl) { |
// tagged and skip materializing the HeapNumber explicitly. |
Handle<Object> object = GetNext(isolate, lvl + 1); |
materialized_objects_.Add(object); |
+ // On 32-bit architectures, there is an extra slot there because |
+ // the escape analysis calculates the number of slots as |
+ // object-size/pointer-size. To account for this, we read out |
+ // any extra slots. |
+ for (int i = 0; i < length - 2; i++) { |
+ GetNext(isolate, lvl + 1); |
+ } |
return object; |
} |
case JS_OBJECT_TYPE: { |
@@ -3341,7 +3348,7 @@ Handle<Object> SlotRefValueBuilder::GetNext(Isolate* isolate, int lvl) { |
void SlotRefValueBuilder::Finish(Isolate* isolate) { |
- // We should have processed all slot |
+ // We should have processed all the slots |
ASSERT(slot_refs_.length() == current_slot_); |
if (materialized_objects_.length() > prev_materialized_count_) { |