Index: src/crankshaft/arm64/lithium-codegen-arm64.cc |
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
index b5e1245f3a4593cfe26dcab28eb15e2090f75e29..977b9bca90ac95cd8ce45ed61653364def455038 100644 |
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc |
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
@@ -583,7 +583,7 @@ void LCodeGen::DoPrologue(LPrologue* instr) { |
Comment(";;; Prologue begin"); |
// Allocate a local context if needed. |
- if (info()->scope()->num_heap_slots() > 0) { |
+ if (info()->scope()->NeedsContext()) { |
Comment(";;; Allocate local context"); |
bool need_write_barrier = true; |
// Argument to NewContext is the function, which is in x1. |