Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: src/arm/builtins-arm.cc

Issue 2078443002: [builtins] Use BUILTIN frame in DatePrototype_GetField (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@20160616-builtin-frame
Patch Set: Do not store argc Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/builtins-arm.cc
diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc
index f5a0c706d7e40c0699b8a849eae04c68d0b844f8..f8667c4c707cd5bb4965e568abd71aed8843184d 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
// -----------------------------------
@@ -1743,7 +1746,7 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
{
__ 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 +1776,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);
+ __ Push(cp, r1);
+ __ Push(Smi::FromInt(0));
+ __ CallRuntime(Runtime::kThrowNotDateError);
+ }
}
// static
« no previous file with comments | « no previous file | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698