Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index bd2c671e3137961dd7bd4b9a6c45f530a76c6171..32440bbcda38904cd3f918ec4f4835338f9ec470 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -1264,9 +1264,9 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
while (s != NULL) { |
if (s->num_heap_slots() > 0) { |
if (s->calls_sloppy_eval()) { |
- // Check that extension is NULL. |
+ // Check that extension is "the hole". |
__ Ldr(temp, ContextMemOperand(current, Context::EXTENSION_INDEX)); |
- __ Cbnz(temp, slow); |
+ __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
} |
// Load next context in chain. |
__ Ldr(next, ContextMemOperand(current, Context::PREVIOUS_INDEX)); |
@@ -1287,9 +1287,9 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
// Terminate at native context. |
__ Ldr(temp, FieldMemOperand(next, HeapObject::kMapOffset)); |
__ JumpIfRoot(temp, Heap::kNativeContextMapRootIndex, &fast); |
- // Check that extension is NULL. |
+ // Check that extension is "the hole". |
__ Ldr(temp, ContextMemOperand(next, Context::EXTENSION_INDEX)); |
- __ Cbnz(temp, slow); |
+ __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
// Load next context in chain. |
__ Ldr(next, ContextMemOperand(next, Context::PREVIOUS_INDEX)); |
__ B(&loop); |
@@ -1312,18 +1312,18 @@ MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, |
for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { |
if (s->num_heap_slots() > 0) { |
if (s->calls_sloppy_eval()) { |
- // Check that extension is NULL. |
+ // Check that extension is "the hole". |
__ Ldr(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); |
- __ Cbnz(temp, slow); |
+ __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
} |
__ Ldr(next, ContextMemOperand(context, Context::PREVIOUS_INDEX)); |
// Walk the rest of the chain without clobbering cp. |
context = next; |
} |
} |
- // Check that last extension is NULL. |
+ // Check that last extension is "the hole". |
__ Ldr(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); |
- __ Cbnz(temp, slow); |
+ __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
// This function is used only for loads, not stores, so it's safe to |
// return an cp-based operand (the write barrier cannot be allowed to |