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 b49a74ea9bed3587d739bbde01d15920220fca7d..8b3c4a5f028920a0ca8c6f632eece5b380d2b770 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -1368,7 +1368,7 @@ void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
Variable* var = proxy->var(); |
DCHECK(var->IsUnallocatedOrGlobalSlot() || |
(var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); |
- __ Ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectMemOperand()); |
+ __ LoadGlobalObject(LoadDescriptor::ReceiverRegister()); |
__ Mov(LoadDescriptor::NameRegister(), Operand(var->name())); |
__ Mov(LoadDescriptor::SlotRegister(), |
SmiFromSlot(proxy->VariableFeedbackSlot())); |
@@ -2228,7 +2228,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
if (var->IsUnallocated()) { |
// Global var, const, or let. |
__ Mov(StoreDescriptor::NameRegister(), Operand(var->name())); |
- __ Ldr(StoreDescriptor::ReceiverRegister(), GlobalObjectMemOperand()); |
+ __ LoadGlobalObject(StoreDescriptor::ReceiverRegister()); |
EmitLoadStoreICSlot(slot); |
CallStoreIC(); |
@@ -3820,11 +3820,7 @@ void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { |
Register boolean_done = x3; |
Register empty_fixed_array = x4; |
Register untagged_result = x5; |
- __ Ldr(map_reg, GlobalObjectMemOperand()); |
- __ Ldr(map_reg, |
- FieldMemOperand(map_reg, JSGlobalObject::kNativeContextOffset)); |
- __ Ldr(map_reg, |
- ContextMemOperand(map_reg, Context::ITERATOR_RESULT_MAP_INDEX)); |
+ __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, map_reg); |
__ Pop(boolean_done); |
__ Pop(result_value); |
__ LoadRoot(empty_fixed_array, Heap::kEmptyFixedArrayRootIndex); |
@@ -3854,9 +3850,7 @@ void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { |
__ LoadRoot(x0, Heap::kUndefinedValueRootIndex); |
__ Push(x0); |
- __ Ldr(x0, GlobalObjectMemOperand()); |
- __ Ldr(x0, FieldMemOperand(x0, JSGlobalObject::kNativeContextOffset)); |
- __ Ldr(x0, ContextMemOperand(x0, expr->context_index())); |
+ __ LoadNativeContextSlot(expr->context_index(), x0); |
} |
@@ -3945,7 +3939,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
bool is_this = var->HasThisName(isolate()); |
DCHECK(is_sloppy(language_mode()) || is_this); |
if (var->IsUnallocatedOrGlobalSlot()) { |
- __ Ldr(x12, GlobalObjectMemOperand()); |
+ __ LoadGlobalObject(x12); |
__ Mov(x11, Operand(var->name())); |
__ Push(x12, x11); |
__ CallRuntime(Runtime::kDeleteProperty_Sloppy, 2); |
@@ -4772,11 +4766,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
Register boolean_done = x3; |
Register empty_fixed_array = x4; |
Register untagged_result = x5; |
- __ Ldr(map_reg, GlobalObjectMemOperand()); |
- __ Ldr(map_reg, |
- FieldMemOperand(map_reg, JSGlobalObject::kNativeContextOffset)); |
- __ Ldr(map_reg, |
- ContextMemOperand(map_reg, Context::ITERATOR_RESULT_MAP_INDEX)); |
+ __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, map_reg); |
__ Pop(result_value); |
__ LoadRoot(boolean_done, |
done ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex); |
@@ -4833,9 +4823,7 @@ void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { |
// as their closure, not the anonymous closure containing the global |
// code. |
DCHECK(kSmiTag == 0); |
- __ Ldr(x10, GlobalObjectMemOperand()); |
- __ Ldr(x10, FieldMemOperand(x10, JSGlobalObject::kNativeContextOffset)); |
- __ Ldr(x10, ContextMemOperand(x10, Context::CLOSURE_INDEX)); |
+ __ LoadNativeContextSlot(Context::CLOSURE_INDEX, x10); |
} 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 |