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

Unified Diff: src/arm64/builtins-arm64.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: 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
Index: src/arm64/builtins-arm64.cc
diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc
index 06e1016252ee6d96d6e648119aa08b36dc63ec37..9ecdeab7870664b7eb48494dfd0120c5dcf583e8 100644
--- a/src/arm64/builtins-arm64.cc
+++ b/src/arm64/builtins-arm64.cc
@@ -1746,6 +1746,9 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
int field_index) {
// ----------- S t a t e -------------
+ // -- x0 : number of arguments
+ // -- x1 : function
+ // -- cp : context
// -- lr : return address
// -- jssp[0] : receiver
// -----------------------------------
@@ -1754,9 +1757,10 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
// 1. Pop receiver into x0 and check that it's actually a JSDate object.
Label receiver_not_date;
{
+ __ Move(x4, x0); // Store argc for builtin frame construction.
__ Pop(x0);
__ JumpIfSmi(x0, &receiver_not_date);
- __ JumpIfNotObjectType(x0, x1, x2, JS_DATE_TYPE, &receiver_not_date);
+ __ JumpIfNotObjectType(x0, x2, x3, JS_DATE_TYPE, &receiver_not_date);
}
// 2. Load the specified date field, falling back to the runtime as necessary.
@@ -1784,7 +1788,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(x0, lr, fp);
+ __ Move(fp, jssp);
+ __ SmiTag(x4);
+ __ Push(cp, x1, x4);
+ __ CallRuntime(Runtime::kThrowNotDateError);
+ }
}
// static

Powered by Google App Engine
This is Rietveld 408576698