Index: src/ic/x64/handler-compiler-x64.cc |
diff --git a/src/ic/x64/handler-compiler-x64.cc b/src/ic/x64/handler-compiler-x64.cc |
index 708311e3dbcb70817b3030722843e2974be4e8e5..5826c7e4ef74f893f50cf549bb6ecab638e85f12 100644 |
--- a/src/ic/x64/handler-compiler-x64.cc |
+++ b/src/ic/x64/handler-compiler-x64.cc |
@@ -78,10 +78,7 @@ void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup( |
void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
MacroAssembler* masm, int index, Register result, Label* miss) { |
- const int offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); |
- __ movp(result, Operand(rsi, offset)); |
- __ movp(result, FieldOperand(result, JSGlobalObject::kNativeContextOffset)); |
- __ movp(result, Operand(result, Context::SlotOffset(index))); |
+ __ LoadNativeContextSlot(index, result); |
// Load its initial map. The global functions all have initial maps. |
__ movp(result, |
FieldOperand(result, JSFunction::kPrototypeOrInitialMapOffset)); |