Index: src/compiler/code-generator.cc |
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc |
index de3edaab3d5712653f8ea1269929efdf6e4ebb25..c496ff451fd3d3793a5be1747a18a7421b709b56 100644 |
--- a/src/compiler/code-generator.cc |
+++ b/src/compiler/code-generator.cc |
@@ -34,7 +34,7 @@ class CodeGenerator::JumpTable final : public ZoneObject { |
CodeGenerator::CodeGenerator(Frame* frame, Linkage* linkage, |
InstructionSequence* code, CompilationInfo* info) |
- : frame_(frame), |
+ : frame_access_state_(new (code->zone()) FrameAccessState(frame)), |
linkage_(linkage), |
code_(code), |
info_(info), |
@@ -52,11 +52,13 @@ CodeGenerator::CodeGenerator(Frame* frame, Linkage* linkage, |
last_lazy_deopt_pc_(0), |
jump_tables_(nullptr), |
ools_(nullptr), |
- osr_pc_offset_(-1), |
- needs_frame_(frame->GetSpillSlotCount() > 0 || code->ContainsCall()) { |
+ osr_pc_offset_(-1) { |
for (int i = 0; i < code->InstructionBlockCount(); ++i) { |
new (&labels_[i]) Label; |
} |
+ if (code->ContainsCall()) { |
+ frame->MarkNeedsFrame(); |
+ } |
} |