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

Unified Diff: src/x87/code-stubs-x87.cc

Issue 1481353002: X87: [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/x87/builtins-x87.cc ('k') | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/code-stubs-x87.cc
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
index d882e274fdef96405e97b6d78e5d78a6b487e013..e3eb2764b319c97cb4d0a28381c7259f6e6a02e6 100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -593,8 +593,7 @@ void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) {
// esp[8] = parameter count (tagged)
// Get the arguments map from the current native context into edi.
Label has_mapped_parameters, instantiate;
- __ mov(edi, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
- __ mov(edi, FieldOperand(edi, JSGlobalObject::kNativeContextOffset));
+ __ mov(edi, NativeContextOperand());
__ mov(ebx, Operand(esp, 0 * kPointerSize));
__ test(ebx, ebx);
__ j(not_zero, &has_mapped_parameters, Label::kNear);
@@ -797,10 +796,8 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
__ Allocate(eax, eax, ebx, no_reg, &runtime, TAG_OBJECT);
// Get the arguments map from the current native context.
- __ mov(edi, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
- __ mov(edi, FieldOperand(edi, JSGlobalObject::kNativeContextOffset));
- const int offset = Context::SlotOffset(Context::STRICT_ARGUMENTS_MAP_INDEX);
- __ mov(edi, Operand(edi, offset));
+ __ mov(edi, NativeContextOperand());
+ __ mov(edi, ContextOperand(edi, Context::STRICT_ARGUMENTS_MAP_INDEX));
__ mov(FieldOperand(eax, JSObject::kMapOffset), edi);
__ mov(FieldOperand(eax, JSObject::kPropertiesOffset),
@@ -1895,11 +1892,10 @@ void CallICStub::Generate(MacroAssembler* masm) {
__ cmp(edi, ecx);
__ j(equal, &miss);
- // Make sure the function belongs to the same native context (which implies
- // the same global object).
+ // Make sure the function belongs to the same native context.
__ mov(ecx, FieldOperand(edi, JSFunction::kContextOffset));
- __ mov(ecx, ContextOperand(ecx, Context::GLOBAL_OBJECT_INDEX));
- __ cmp(ecx, GlobalObjectOperand());
+ __ mov(ecx, ContextOperand(ecx, Context::NATIVE_CONTEXT_INDEX));
+ __ cmp(ecx, NativeContextOperand());
__ j(not_equal, &miss);
// Update stats.
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698