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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | test/mjsunit/regress/regress-4815.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 1238
1239 void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) { 1239 void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) {
1240 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::LAZY); 1240 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::LAZY);
1241 } 1241 }
1242 1242
1243 1243
1244 // static 1244 // static
1245 void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, 1245 void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
1246 int field_index) { 1246 int field_index) {
1247 // ----------- S t a t e ------------- 1247 // ----------- S t a t e -------------
1248 // -- rax : number of arguments
1249 // -- rdi : function
1250 // -- rsi : context
1248 // -- rsp[0] : return address 1251 // -- rsp[0] : return address
1249 // -- rsp[8] : receiver 1252 // -- rsp[8] : receiver
1250 // ----------------------------------- 1253 // -----------------------------------
1251 1254
1252 // 1. Load receiver into rax and check that it's actually a JSDate object. 1255 // 1. Load receiver into rax and check that it's actually a JSDate object.
1253 Label receiver_not_date; 1256 Label receiver_not_date;
1254 { 1257 {
1255 StackArgumentsAccessor args(rsp, 0); 1258 StackArgumentsAccessor args(rsp, 0);
1256 __ movp(rax, args.GetReceiverOperand()); 1259 __ movp(rax, args.GetReceiverOperand());
1257 __ JumpIfSmi(rax, &receiver_not_date); 1260 __ JumpIfSmi(rax, &receiver_not_date);
(...skipping 21 matching lines...) Expand all
1279 __ Move(arg_reg_2, Smi::FromInt(field_index)); 1282 __ Move(arg_reg_2, Smi::FromInt(field_index));
1280 __ CallCFunction( 1283 __ CallCFunction(
1281 ExternalReference::get_date_field_function(masm->isolate()), 2); 1284 ExternalReference::get_date_field_function(masm->isolate()), 2);
1282 } 1285 }
1283 __ ret(1 * kPointerSize); 1286 __ ret(1 * kPointerSize);
1284 1287
1285 // 3. Raise a TypeError if the receiver is not a date. 1288 // 3. Raise a TypeError if the receiver is not a date.
1286 __ bind(&receiver_not_date); 1289 __ bind(&receiver_not_date);
1287 { 1290 {
1288 FrameScope scope(masm, StackFrame::MANUAL); 1291 FrameScope scope(masm, StackFrame::MANUAL);
1289 __ EnterFrame(StackFrame::INTERNAL); 1292 __ Push(rbp);
1293 __ Move(rbp, rsp);
1294 __ Push(rsi);
1295 __ Push(rdi);
1296 __ Push(Immediate(0));
1290 __ CallRuntime(Runtime::kThrowNotDateError); 1297 __ CallRuntime(Runtime::kThrowNotDateError);
1291 } 1298 }
1292 } 1299 }
1293 1300
1294 // static 1301 // static
1295 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1302 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1296 // ----------- S t a t e ------------- 1303 // ----------- S t a t e -------------
1297 // -- rax : argc 1304 // -- rax : argc
1298 // -- rsp[0] : return address 1305 // -- rsp[0] : return address
1299 // -- rsp[8] : argArray 1306 // -- rsp[8] : argArray
(...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after
3034 __ ret(0); 3041 __ ret(0);
3035 } 3042 }
3036 3043
3037 3044
3038 #undef __ 3045 #undef __
3039 3046
3040 } // namespace internal 3047 } // namespace internal
3041 } // namespace v8 3048 } // namespace v8
3042 3049
3043 #endif // V8_TARGET_ARCH_X64 3050 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | test/mjsunit/regress/regress-4815.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698