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

Unified Diff: src/arm64/code-stubs-arm64.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/arm64/builtins-arm64.cc ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index 76807f803f0f1c4d3f10b41e76781b7133fcb1e8..90aad4556c2422fa63a28753704d734c1802882e 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -1801,10 +1801,13 @@
// x11 sloppy_args_map offset to args (or aliased args) map (uninit)
// x14 arg_count number of function arguments
+ Register global_object = x10;
Register global_ctx = x10;
Register sloppy_args_map = x11;
Register aliased_args_map = x10;
- __ Ldr(global_ctx, NativeContextMemOperand());
+ __ Ldr(global_object, GlobalObjectMemOperand());
+ __ Ldr(global_ctx,
+ FieldMemOperand(global_object, JSGlobalObject::kNativeContextOffset));
__ Ldr(sloppy_args_map,
ContextMemOperand(global_ctx, Context::SLOPPY_ARGUMENTS_MAP_INDEX));
@@ -2044,9 +2047,14 @@
static_cast<AllocationFlags>(TAG_OBJECT | SIZE_IN_WORDS));
// Get the arguments boilerplate from the current (native) context.
+ Register global_object = x10;
+ Register global_ctx = x10;
Register strict_args_map = x4;
- __ LoadNativeContextSlot(Context::STRICT_ARGUMENTS_MAP_INDEX,
- strict_args_map);
+ __ Ldr(global_object, GlobalObjectMemOperand());
+ __ Ldr(global_ctx,
+ FieldMemOperand(global_object, JSGlobalObject::kNativeContextOffset));
+ __ Ldr(strict_args_map,
+ ContextMemOperand(global_ctx, Context::STRICT_ARGUMENTS_MAP_INDEX));
// x0 alloc_obj pointer to allocated objects: parameter array and
// arguments object
@@ -2685,7 +2693,7 @@
__ JumpIfNotRoot(feedback_map, Heap::kAllocationSiteMapRootIndex, &miss);
// Make sure the function is the Array() function
- __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, scratch1);
+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, scratch1);
__ Cmp(function, scratch1);
__ B(ne, &megamorphic);
__ B(&done);
@@ -2709,7 +2717,7 @@
__ Bind(&initialize);
// Make sure the function is the Array() function
- __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, scratch1);
+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, scratch1);
__ Cmp(function, scratch1);
__ B(ne, &not_array_function);
@@ -2785,7 +2793,7 @@
Register allocation_site = x4;
Register scratch = x5;
- __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, scratch);
+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, scratch);
__ Cmp(function, scratch);
__ B(ne, miss);
@@ -2920,14 +2928,15 @@
// Make sure the function is not the Array() function, which requires special
// behavior on MISS.
- __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, x5);
+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, x5);
__ Cmp(function, x5);
__ B(eq, &miss);
- // Make sure the function belongs to the same native context.
+ // Make sure the function belongs to the same native context (which implies
+ // the same global object).
__ Ldr(x4, FieldMemOperand(function, JSFunction::kContextOffset));
- __ Ldr(x4, ContextMemOperand(x4, Context::NATIVE_CONTEXT_INDEX));
- __ Ldr(x5, NativeContextMemOperand());
+ __ Ldr(x4, ContextMemOperand(x4, Context::GLOBAL_OBJECT_INDEX));
+ __ Ldr(x4, GlobalObjectMemOperand());
__ Cmp(x4, x5);
__ B(ne, &miss);
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698