Index: src/ic/arm/handler-compiler-arm.cc |
diff --git a/src/ic/arm/handler-compiler-arm.cc b/src/ic/arm/handler-compiler-arm.cc |
index 2acb96c75ce862820558628f5b3a6faac6588ff8..a0387f6180a4fb1ea9cd501122f5075d66aa6e6f 100644 |
--- a/src/ic/arm/handler-compiler-arm.cc |
+++ b/src/ic/arm/handler-compiler-arm.cc |
@@ -171,7 +171,10 @@ |
void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
MacroAssembler* masm, int index, Register result, Label* miss) { |
- __ LoadNativeContextSlot(index, result); |
+ const int offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); |
+ __ ldr(result, MemOperand(cp, offset)); |
+ __ ldr(result, FieldMemOperand(result, JSGlobalObject::kNativeContextOffset)); |
+ __ ldr(result, MemOperand(result, Context::SlotOffset(index))); |
// Load its initial map. The global functions all have initial maps. |
__ ldr(result, |
FieldMemOperand(result, JSFunction::kPrototypeOrInitialMapOffset)); |