Index: src/ia32/builtins-ia32.cc |
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
index 97ba685a9312d05237a9b506e5d90d43f672da39..44cc876cba1bd058f76298eb58466d3503c181d8 100644 |
--- a/src/ia32/builtins-ia32.cc |
+++ b/src/ia32/builtins-ia32.cc |
@@ -1193,6 +1193,9 @@ void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) { |
void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, |
int field_index) { |
// ----------- S t a t e ------------- |
+ // -- eax : number of arguments |
+ // -- edi : function |
+ // -- esi : context |
// -- esp[0] : return address |
// -- esp[4] : receiver |
// ----------------------------------- |
@@ -1200,6 +1203,7 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, |
// 1. Load receiver into eax and check that it's actually a JSDate object. |
Label receiver_not_date; |
{ |
+ __ Move(ecx, eax); // Store argc for builtin frame construction. |
__ mov(eax, Operand(esp, kPointerSize)); |
__ JumpIfSmi(eax, &receiver_not_date); |
__ CmpObjectType(eax, JS_DATE_TYPE, ebx); |
@@ -1235,7 +1239,12 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, |
__ bind(&receiver_not_date); |
{ |
FrameScope scope(masm, StackFrame::MANUAL); |
- __ EnterFrame(StackFrame::INTERNAL); |
+ __ Push(ebp); |
+ __ Move(ebp, esp); |
+ __ Push(esi); |
+ __ Push(edi); |
+ __ SmiTag(ecx); |
+ __ Push(ecx); |
__ CallRuntime(Runtime::kThrowNotDateError); |
} |
} |