Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index a46cf1e0ea6e1af44b50622e6e8f9f5b08e134a7..439da2bcf096c695b7ffa732729c518f22705d26 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -4469,16 +4469,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())); |
} |