Index: src/full-codegen/mips64/full-codegen-mips64.cc |
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc |
index 9ee5e4073aa21723ccebf71def0bbb559cf8487f..6cd0a425452a6d197adc84ee6be82605b4408de3 100644 |
--- a/src/full-codegen/mips64/full-codegen-mips64.cc |
+++ b/src/full-codegen/mips64/full-codegen-mips64.cc |
@@ -1268,9 +1268,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". |
__ ld(temp, ContextMemOperand(current, Context::EXTENSION_INDEX)); |
- __ Branch(slow, ne, temp, Operand(zero_reg)); |
+ __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
} |
// Load next context in chain. |
__ ld(next, ContextMemOperand(current, Context::PREVIOUS_INDEX)); |
@@ -1293,9 +1293,9 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
__ ld(temp, FieldMemOperand(next, HeapObject::kMapOffset)); |
__ LoadRoot(a4, Heap::kNativeContextMapRootIndex); |
__ Branch(&fast, eq, temp, Operand(a4)); |
- // Check that extension is NULL. |
+ // Check that extension is "the hole". |
__ ld(temp, ContextMemOperand(next, Context::EXTENSION_INDEX)); |
- __ Branch(slow, ne, temp, Operand(zero_reg)); |
+ __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
// Load next context in chain. |
__ ld(next, ContextMemOperand(next, Context::PREVIOUS_INDEX)); |
__ Branch(&loop); |
@@ -1318,18 +1318,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". |
__ ld(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); |
- __ Branch(slow, ne, temp, Operand(zero_reg)); |
+ __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
} |
__ ld(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". |
__ ld(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); |
- __ Branch(slow, ne, temp, Operand(zero_reg)); |
+ __ 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 |