| Index: src/full-codegen/arm/full-codegen-arm.cc
|
| diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc
|
| index a0ca8f3ebf4905601f2cd9a60d7a98cf30fae12e..a296b3ee3f2d5a457f7eb1ec4c75244ecc4a3a65 100644
|
| --- a/src/full-codegen/arm/full-codegen-arm.cc
|
| +++ b/src/full-codegen/arm/full-codegen-arm.cc
|
| @@ -207,7 +207,7 @@
|
| // Load parameter from stack.
|
| __ ldr(r0, MemOperand(fp, parameter_offset));
|
| // Store it in the context.
|
| - MemOperand target = ContextMemOperand(cp, var->index());
|
| + MemOperand target = ContextOperand(cp, var->index());
|
| __ str(r0, target);
|
|
|
| // Update the write barrier.
|
| @@ -710,7 +710,7 @@
|
| if (var->IsContextSlot()) {
|
| int context_chain_length = scope()->ContextChainLength(var->scope());
|
| __ LoadContext(scratch, context_chain_length);
|
| - return ContextMemOperand(scratch, var->index());
|
| + return ContextOperand(scratch, var->index());
|
| } else {
|
| return StackOperand(var);
|
| }
|
| @@ -816,7 +816,7 @@
|
| Comment cmnt(masm_, "[ VariableDeclaration");
|
| EmitDebugCheckDeclarationContext(variable);
|
| __ LoadRoot(r0, Heap::kTheHoleValueRootIndex);
|
| - __ str(r0, ContextMemOperand(cp, variable->index()));
|
| + __ str(r0, ContextOperand(cp, variable->index()));
|
| // No write barrier since the_hole_value is in old space.
|
| PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
|
| }
|
| @@ -873,7 +873,7 @@
|
| Comment cmnt(masm_, "[ FunctionDeclaration");
|
| EmitDebugCheckDeclarationContext(variable);
|
| VisitForAccumulatorValue(declaration->fun());
|
| - __ str(result_register(), ContextMemOperand(cp, variable->index()));
|
| + __ str(result_register(), ContextOperand(cp, variable->index()));
|
| int offset = Context::SlotOffset(variable->index());
|
| // We know that we have written a function, which is not a smi.
|
| __ RecordWriteContextSlot(cp,
|
| @@ -1270,12 +1270,12 @@
|
| if (s->num_heap_slots() > 0) {
|
| if (s->calls_sloppy_eval()) {
|
| // Check that extension is NULL.
|
| - __ ldr(temp, ContextMemOperand(current, Context::EXTENSION_INDEX));
|
| + __ ldr(temp, ContextOperand(current, Context::EXTENSION_INDEX));
|
| __ tst(temp, temp);
|
| __ b(ne, slow);
|
| }
|
| // Load next context in chain.
|
| - __ ldr(next, ContextMemOperand(current, Context::PREVIOUS_INDEX));
|
| + __ ldr(next, ContextOperand(current, Context::PREVIOUS_INDEX));
|
| // Walk the rest of the chain without clobbering cp.
|
| current = next;
|
| }
|
| @@ -1297,11 +1297,11 @@
|
| __ cmp(temp, ip);
|
| __ b(eq, &fast);
|
| // Check that extension is NULL.
|
| - __ ldr(temp, ContextMemOperand(next, Context::EXTENSION_INDEX));
|
| + __ ldr(temp, ContextOperand(next, Context::EXTENSION_INDEX));
|
| __ tst(temp, temp);
|
| __ b(ne, slow);
|
| // Load next context in chain.
|
| - __ ldr(next, ContextMemOperand(next, Context::PREVIOUS_INDEX));
|
| + __ ldr(next, ContextOperand(next, Context::PREVIOUS_INDEX));
|
| __ b(&loop);
|
| __ bind(&fast);
|
| }
|
| @@ -1323,24 +1323,24 @@
|
| if (s->num_heap_slots() > 0) {
|
| if (s->calls_sloppy_eval()) {
|
| // Check that extension is NULL.
|
| - __ ldr(temp, ContextMemOperand(context, Context::EXTENSION_INDEX));
|
| + __ ldr(temp, ContextOperand(context, Context::EXTENSION_INDEX));
|
| __ tst(temp, temp);
|
| __ b(ne, slow);
|
| }
|
| - __ ldr(next, ContextMemOperand(context, Context::PREVIOUS_INDEX));
|
| + __ ldr(next, ContextOperand(context, Context::PREVIOUS_INDEX));
|
| // Walk the rest of the chain without clobbering cp.
|
| context = next;
|
| }
|
| }
|
| // Check that last extension is NULL.
|
| - __ ldr(temp, ContextMemOperand(context, Context::EXTENSION_INDEX));
|
| + __ ldr(temp, ContextOperand(context, Context::EXTENSION_INDEX));
|
| __ tst(temp, temp);
|
| __ b(ne, 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
|
| // destroy the cp register).
|
| - return ContextMemOperand(context, var->index());
|
| + return ContextOperand(context, var->index());
|
| }
|
|
|
|
|
| @@ -1381,7 +1381,7 @@
|
| Variable* var = proxy->var();
|
| DCHECK(var->IsUnallocatedOrGlobalSlot() ||
|
| (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL));
|
| - __ LoadGlobalObject(LoadDescriptor::ReceiverRegister());
|
| + __ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
|
| __ mov(LoadDescriptor::NameRegister(), Operand(var->name()));
|
| __ mov(LoadDescriptor::SlotRegister(),
|
| Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
|
| @@ -2194,7 +2194,9 @@
|
| __ CallRuntime(Runtime::kAllocateInNewSpace, 1);
|
|
|
| __ bind(&done_allocate);
|
| - __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r1);
|
| + __ ldr(r1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX));
|
| + __ ldr(r1, FieldMemOperand(r1, JSGlobalObject::kNativeContextOffset));
|
| + __ ldr(r1, ContextOperand(r1, Context::ITERATOR_RESULT_MAP_INDEX));
|
| __ pop(r2);
|
| __ LoadRoot(r3,
|
| done ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex);
|
| @@ -2522,7 +2524,7 @@
|
| if (var->IsUnallocated()) {
|
| // Global var, const, or let.
|
| __ mov(StoreDescriptor::NameRegister(), Operand(var->name()));
|
| - __ LoadGlobalObject(StoreDescriptor::ReceiverRegister());
|
| + __ ldr(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
|
| EmitLoadStoreICSlot(slot);
|
| CallStoreIC();
|
|
|
| @@ -4116,7 +4118,9 @@
|
| Label runtime, done;
|
|
|
| __ Allocate(JSIteratorResult::kSize, r0, r2, r3, &runtime, TAG_OBJECT);
|
| - __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r1);
|
| + __ ldr(r1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX));
|
| + __ ldr(r1, FieldMemOperand(r1, JSGlobalObject::kNativeContextOffset));
|
| + __ ldr(r1, ContextOperand(r1, Context::ITERATOR_RESULT_MAP_INDEX));
|
| __ pop(r3);
|
| __ pop(r2);
|
| __ LoadRoot(r4, Heap::kEmptyFixedArrayRootIndex);
|
| @@ -4141,7 +4145,9 @@
|
| __ LoadRoot(r0, Heap::kUndefinedValueRootIndex);
|
| __ push(r0);
|
|
|
| - __ LoadNativeContextSlot(expr->context_index(), r0);
|
| + __ ldr(r0, GlobalObjectOperand());
|
| + __ ldr(r0, FieldMemOperand(r0, JSGlobalObject::kNativeContextOffset));
|
| + __ ldr(r0, ContextOperand(r0, expr->context_index()));
|
| }
|
|
|
|
|
| @@ -4232,7 +4238,7 @@
|
| bool is_this = var->HasThisName(isolate());
|
| DCHECK(is_sloppy(language_mode()) || is_this);
|
| if (var->IsUnallocatedOrGlobalSlot()) {
|
| - __ LoadGlobalObject(r2);
|
| + __ ldr(r2, GlobalObjectOperand());
|
| __ mov(r1, Operand(var->name()));
|
| __ Push(r2, r1);
|
| __ CallRuntime(Runtime::kDeleteProperty_Sloppy, 2);
|
| @@ -4779,7 +4785,7 @@
|
|
|
|
|
| void FullCodeGenerator::LoadContextField(Register dst, int context_index) {
|
| - __ ldr(dst, ContextMemOperand(cp, context_index));
|
| + __ ldr(dst, ContextOperand(cp, context_index));
|
| }
|
|
|
|
|
| @@ -4790,12 +4796,14 @@
|
| // Contexts nested in the native context have a canonical empty function
|
| // as their closure, not the anonymous closure containing the global
|
| // code.
|
| - __ LoadNativeContextSlot(Context::CLOSURE_INDEX, ip);
|
| + __ ldr(ip, GlobalObjectOperand());
|
| + __ ldr(ip, FieldMemOperand(ip, JSGlobalObject::kNativeContextOffset));
|
| + __ ldr(ip, ContextOperand(ip, Context::CLOSURE_INDEX));
|
| } else if (closure_scope->is_eval_scope()) {
|
| // Contexts created by a call to eval have the same closure as the
|
| // context calling eval, not the anonymous closure containing the eval
|
| // code. Fetch it from the context.
|
| - __ ldr(ip, ContextMemOperand(cp, Context::CLOSURE_INDEX));
|
| + __ ldr(ip, ContextOperand(cp, Context::CLOSURE_INDEX));
|
| } else {
|
| DCHECK(closure_scope->is_function_scope());
|
| __ ldr(ip, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
|
|