Index: src/ic/x87/handler-compiler-x87.cc |
diff --git a/src/ic/x87/handler-compiler-x87.cc b/src/ic/x87/handler-compiler-x87.cc |
index fd31e168036f16fda7aa2415b215fb54c6ff2a5d..b83d561e2ade02ca15f45ceb4b00261e30021203 100644 |
--- a/src/ic/x87/handler-compiler-x87.cc |
+++ b/src/ic/x87/handler-compiler-x87.cc |
@@ -114,10 +114,7 @@ void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup( |
void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
MacroAssembler* masm, int index, Register result, Label* miss) { |
- const int offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); |
- __ mov(result, Operand(esi, offset)); |
- __ mov(result, FieldOperand(result, JSGlobalObject::kNativeContextOffset)); |
- __ mov(result, Operand(result, Context::SlotOffset(index))); |
+ __ LoadGlobalFunction(index, result); |
// Load its initial map. The global functions all have initial maps. |
__ mov(result, |
FieldOperand(result, JSFunction::kPrototypeOrInitialMapOffset)); |