Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index 860ab46f7847799431153c133fde3b1f510c42ff..e58f471203b219c02969bd94effe2689eb68ce94 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -1245,6 +1245,9 @@ void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) { |
void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, |
int field_index) { |
// ----------- S t a t e ------------- |
+ // -- rax : number of arguments |
+ // -- rdi : function |
+ // -- rsi : context |
// -- rsp[0] : return address |
// -- rsp[8] : receiver |
// ----------------------------------- |
@@ -1253,6 +1256,7 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, |
Label receiver_not_date; |
{ |
StackArgumentsAccessor args(rsp, 0); |
+ __ Integer32ToSmi(rcx, rax); // Store argc for builtin frame construction. |
__ movp(rax, args.GetReceiverOperand()); |
__ JumpIfSmi(rax, &receiver_not_date); |
__ CmpObjectType(rax, JS_DATE_TYPE, rbx); |
@@ -1286,7 +1290,11 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, |
__ bind(&receiver_not_date); |
{ |
FrameScope scope(masm, StackFrame::MANUAL); |
- __ EnterFrame(StackFrame::INTERNAL); |
+ __ Push(rbp); |
+ __ Move(rbp, rsp); |
+ __ Push(rsi); |
+ __ Push(rdi); |
+ __ Push(rcx); |
__ CallRuntime(Runtime::kThrowNotDateError); |
} |
} |