| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |