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