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

Unified Diff: src/x64/builtins-x64.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/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);
}
}

Powered by Google App Engine
This is Rietveld 408576698