| Index: runtime/vm/deopt_instructions.cc
|
| diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
|
| index 200ec7710b549e701e3b515800d5e2b16623e7f9..1d44098a0cfa0493603c19b0d6c35df773f4e06f 100644
|
| --- a/runtime/vm/deopt_instructions.cc
|
| +++ b/runtime/vm/deopt_instructions.cc
|
| @@ -262,7 +262,7 @@ void DeoptContext::FillDestFrame() {
|
| // described as part of the expression stack for the bottom-most deoptimized
|
| // frame. They will be used during materialization and removed from the stack
|
| // right before control switches to the unoptimized code.
|
| - const intptr_t num_materializations = len - frame_size;
|
| + const intptr_t num_materializations = deopt_info.NumMaterializations();
|
| PrepareForDeferredMaterialization(num_materializations);
|
| for (intptr_t from_index = 0, to_index = kDartFrameFixedSize;
|
| from_index < num_materializations;
|
|
|