Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1478303002: Revert of [runtime] Replace global object link with native context link in all contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/gdb-jit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/x64/full-codegen-x64.cc
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc
index cfebf41a0921a7848ad9a24e96c2a08d7a2df69c..7b5231666002184a736cd9843c8f3a8eaa85dbf5 100644
--- a/src/full-codegen/x64/full-codegen-x64.cc
+++ b/src/full-codegen/x64/full-codegen-x64.cc
@@ -1334,7 +1334,7 @@
DCHECK(var->IsUnallocatedOrGlobalSlot() ||
(var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL));
__ Move(LoadDescriptor::NameRegister(), var->name());
- __ LoadGlobalObject(LoadDescriptor::ReceiverRegister());
+ __ movp(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(proxy->VariableFeedbackSlot()));
CallLoadIC(typeof_mode);
@@ -2120,7 +2120,9 @@
__ CallRuntime(Runtime::kAllocateInNewSpace, 1);
__ bind(&done_allocate);
- __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, rbx);
+ __ movp(rbx, GlobalObjectOperand());
+ __ movp(rbx, FieldOperand(rbx, JSGlobalObject::kNativeContextOffset));
+ __ movp(rbx, ContextOperand(rbx, Context::ITERATOR_RESULT_MAP_INDEX));
__ movp(FieldOperand(rax, HeapObject::kMapOffset), rbx);
__ LoadRoot(rbx, Heap::kEmptyFixedArrayRootIndex);
__ movp(FieldOperand(rax, JSObject::kPropertiesOffset), rbx);
@@ -2408,7 +2410,7 @@
if (var->IsUnallocated()) {
// Global var, const, or let.
__ Move(StoreDescriptor::NameRegister(), var->name());
- __ LoadGlobalObject(StoreDescriptor::ReceiverRegister());
+ __ movp(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
EmitLoadStoreICSlot(slot);
CallStoreIC();
@@ -4052,7 +4054,9 @@
Label runtime, done;
__ Allocate(JSIteratorResult::kSize, rax, rcx, rdx, &runtime, TAG_OBJECT);
- __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, rbx);
+ __ movp(rbx, GlobalObjectOperand());
+ __ movp(rbx, FieldOperand(rbx, JSGlobalObject::kNativeContextOffset));
+ __ movp(rbx, ContextOperand(rbx, Context::ITERATOR_RESULT_MAP_INDEX));
__ movp(FieldOperand(rax, HeapObject::kMapOffset), rbx);
__ LoadRoot(rbx, Heap::kEmptyFixedArrayRootIndex);
__ movp(FieldOperand(rax, JSObject::kPropertiesOffset), rbx);
@@ -4074,7 +4078,9 @@
// Push the builtins object as receiver.
__ PushRoot(Heap::kUndefinedValueRootIndex);
- __ LoadNativeContextSlot(expr->context_index(), rax);
+ __ movp(rax, GlobalObjectOperand());
+ __ movp(rax, FieldOperand(rax, JSGlobalObject::kNativeContextOffset));
+ __ movp(rax, ContextOperand(rax, expr->context_index()));
}
@@ -4164,8 +4170,7 @@
bool is_this = var->HasThisName(isolate());
DCHECK(is_sloppy(language_mode()) || is_this);
if (var->IsUnallocatedOrGlobalSlot()) {
- __ movp(rax, NativeContextOperand());
- __ Push(ContextOperand(rax, Context::EXTENSION_INDEX));
+ __ Push(GlobalObjectOperand());
__ Push(var->name());
__ CallRuntime(Runtime::kDeleteProperty_Sloppy, 2);
context()->Plug(rax);
@@ -4727,7 +4732,8 @@
// Contexts nested in the native context have a canonical empty function
// as their closure, not the anonymous closure containing the global
// code.
- __ movp(rax, NativeContextOperand());
+ __ movp(rax, GlobalObjectOperand());
+ __ movp(rax, FieldOperand(rax, JSGlobalObject::kNativeContextOffset));
__ Push(ContextOperand(rax, Context::CLOSURE_INDEX));
} else if (closure_scope->is_eval_scope()) {
// Contexts created by a call to eval have the same closure as the
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/gdb-jit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698