Index: src/arm/builtins-arm.cc |
diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc |
index f5a0c706d7e40c0699b8a849eae04c68d0b844f8..e7ba988c6b517ae9cfcbee8c55850caf0d298b35 100644 |
--- a/src/arm/builtins-arm.cc |
+++ b/src/arm/builtins-arm.cc |
@@ -1734,6 +1734,9 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { |
void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, |
int field_index) { |
// ----------- S t a t e ------------- |
+ // -- r0 : number of arguments |
+ // -- r1 : function |
+ // -- cp : context |
// -- lr : return address |
// -- sp[0] : receiver |
// ----------------------------------- |
@@ -1741,9 +1744,10 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, |
// 1. Pop receiver into r0 and check that it's actually a JSDate object. |
Label receiver_not_date; |
{ |
+ __ Move(r4, r0); // Store argc for builtin frame construction. |
Benedikt Meurer
2016/06/16 11:37:05
You don't need to remember r0 here, because it's a
jgruber
2016/06/16 15:59:21
Done.
|
__ Pop(r0); |
__ JumpIfSmi(r0, &receiver_not_date); |
- __ CompareObjectType(r0, r1, r2, JS_DATE_TYPE); |
+ __ CompareObjectType(r0, r2, r3, JS_DATE_TYPE); |
__ b(ne, &receiver_not_date); |
} |
@@ -1773,7 +1777,14 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, |
// 3. Raise a TypeError if the receiver is not a date. |
__ bind(&receiver_not_date); |
- __ TailCallRuntime(Runtime::kThrowNotDateError); |
+ { |
+ FrameScope scope(masm, StackFrame::MANUAL); |
+ __ Push(r0, lr, fp); |
+ __ Move(fp, sp); |
+ __ SmiTag(r4); |
+ __ Push(cp, r1, r4); |
+ __ CallRuntime(Runtime::kThrowNotDateError); |
+ } |
} |
// static |