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

Unified Diff: src/mips/code-stubs-mips.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/mips/builtins-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 6fc9c71aaf3c8329b0b76b4c636578dc3a59242f..0cce68fd7171b54ab56fe479e8252b3442b51176 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -1698,7 +1698,8 @@
const int kAliasedOffset =
Context::SlotOffset(Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX);
- __ lw(t0, NativeContextMemOperand());
+ __ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
+ __ lw(t0, FieldMemOperand(t0, JSGlobalObject::kNativeContextOffset));
Label skip2_ne, skip2_eq;
__ Branch(&skip2_ne, ne, t2, Operand(zero_reg));
__ lw(t0, MemOperand(t0, kNormalOffset));
@@ -1901,7 +1902,10 @@
static_cast<AllocationFlags>(TAG_OBJECT | SIZE_IN_WORDS));
// Get the arguments boilerplate from the current native context.
- __ LoadNativeContextSlot(Context::STRICT_ARGUMENTS_MAP_INDEX, t0);
+ __ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
+ __ lw(t0, FieldMemOperand(t0, JSGlobalObject::kNativeContextOffset));
+ __ lw(t0, MemOperand(
+ t0, Context::SlotOffset(Context::STRICT_ARGUMENTS_MAP_INDEX)));
__ sw(t0, FieldMemOperand(v0, JSObject::kMapOffset));
__ LoadRoot(t1, Heap::kEmptyFixedArrayRootIndex);
@@ -2455,7 +2459,7 @@
__ Branch(&miss, ne, feedback_map, Operand(at));
// Make sure the function is the Array() function
- __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, t2);
+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, t2);
__ Branch(&megamorphic, ne, a1, Operand(t2));
__ jmp(&done);
@@ -2477,7 +2481,7 @@
// An uninitialized cache is patched with the function.
__ bind(&initialize);
// Make sure the function is the Array() function.
- __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, t2);
+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, t2);
__ Branch(&not_array_function, ne, a1, Operand(t2));
// The target function is the Array constructor,
@@ -2543,7 +2547,7 @@
// a3 - slot id
// a2 - vector
// t0 - loaded from vector[slot]
- __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, at);
+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, at);
__ Branch(miss, ne, a1, Operand(at));
__ li(a0, Operand(arg_count()));
@@ -2671,13 +2675,14 @@
// Make sure the function is not the Array() function, which requires special
// behavior on MISS.
- __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, t0);
+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, t0);
__ Branch(&miss, eq, a1, Operand(t0));
- // 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).
__ lw(t0, FieldMemOperand(a1, JSFunction::kContextOffset));
- __ lw(t0, ContextMemOperand(t0, Context::NATIVE_CONTEXT_INDEX));
- __ lw(t1, NativeContextMemOperand());
+ __ lw(t0, ContextOperand(t0, Context::GLOBAL_OBJECT_INDEX));
+ __ lw(t1, GlobalObjectOperand());
__ Branch(&miss, ne, t0, Operand(t1));
// Update stats.
@@ -5126,14 +5131,14 @@
// Go up context chain to the script context.
for (int i = 0; i < depth(); ++i) {
- __ lw(result_reg, ContextMemOperand(context_reg, Context::PREVIOUS_INDEX));
+ __ lw(result_reg, ContextOperand(context_reg, Context::PREVIOUS_INDEX));
context_reg = result_reg;
}
// Load the PropertyCell value at the specified slot.
__ sll(at, slot_reg, kPointerSizeLog2);
__ Addu(at, at, Operand(context_reg));
- __ lw(result_reg, ContextMemOperand(at, 0));
+ __ lw(result_reg, ContextOperand(at, 0));
__ lw(result_reg, FieldMemOperand(result_reg, PropertyCell::kValueOffset));
// Check that value is not the_hole.
@@ -5165,14 +5170,14 @@
// Go up context chain to the script context.
for (int i = 0; i < depth(); ++i) {
- __ lw(cell_reg, ContextMemOperand(context_reg, Context::PREVIOUS_INDEX));
+ __ lw(cell_reg, ContextOperand(context_reg, Context::PREVIOUS_INDEX));
context_reg = cell_reg;
}
// Load the PropertyCell at the specified slot.
__ sll(at, slot_reg, kPointerSizeLog2);
__ Addu(at, at, Operand(context_reg));
- __ lw(cell_reg, ContextMemOperand(at, 0));
+ __ lw(cell_reg, ContextOperand(at, 0));
// Load PropertyDetails for the cell (actually only the cell_type and kind).
__ lw(cell_details_reg,
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698