Index: src/full-codegen/x87/full-codegen-x87.cc |
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc |
index db5e1f6d5f768124bf1f06987aa3b7f0550bc3cb..87c9170e84af15597c37a3ab8c9e714850eb7c2f 100644 |
--- a/src/full-codegen/x87/full-codegen-x87.cc |
+++ b/src/full-codegen/x87/full-codegen-x87.cc |
@@ -4460,16 +4460,12 @@ void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) { |
void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { |
- // Push the builtins object as receiver. |
- __ mov(eax, GlobalObjectOperand()); |
- __ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset)); |
+ // Push undefined as receiver. |
+ __ push(Immediate(isolate()->factory()->undefined_value())); |
- // Load the function from the receiver. |
- __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); |
- __ mov(LoadDescriptor::NameRegister(), Immediate(expr->name())); |
- __ mov(LoadDescriptor::SlotRegister(), |
- Immediate(SmiFromSlot(expr->CallRuntimeFeedbackSlot()))); |
- CallLoadIC(NOT_INSIDE_TYPEOF); |
+ __ mov(eax, GlobalObjectOperand()); |
+ __ mov(eax, FieldOperand(eax, GlobalObject::kNativeContextOffset)); |
+ __ mov(eax, ContextOperand(eax, expr->context_index())); |
} |