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

Side by Side Diff: src/builtins/x64/builtins-x64.cc

Issue 2259883002: [turbofan] Inline calls to CPP builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@builtin-descriptors
Patch Set: Address comments Created 4 years, 4 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/builtins/builtins.cc ('k') | src/compiler/js-graph.h » ('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 10 matching lines...) Expand all
21 // -- rdi : target 21 // -- rdi : target
22 // -- rdx : new.target 22 // -- rdx : new.target
23 // -- rsp[0] : return address 23 // -- rsp[0] : return address
24 // -- rsp[8] : last argument 24 // -- rsp[8] : last argument
25 // -- ... 25 // -- ...
26 // -- rsp[8 * argc] : first argument 26 // -- rsp[8 * argc] : first argument
27 // -- rsp[8 * (argc + 1)] : receiver 27 // -- rsp[8 * (argc + 1)] : receiver
28 // ----------------------------------- 28 // -----------------------------------
29 __ AssertFunction(rdi); 29 __ AssertFunction(rdi);
30 30
31 // The logic contained here is mirrored for TurboFan inlining in
32 // JSTypedLowering::ReduceJSCall{Function,Construct}. Keep these in sync.
33
31 // Make sure we operate in the context of the called function (for example 34 // Make sure we operate in the context of the called function (for example
32 // ConstructStubs implemented in C++ will be run in the context of the caller 35 // ConstructStubs implemented in C++ will be run in the context of the caller
33 // instead of the callee, due to the way that [[Construct]] is defined for 36 // instead of the callee, due to the way that [[Construct]] is defined for
34 // ordinary functions). 37 // ordinary functions).
35 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); 38 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
36 39
37 // JumpToExternalReference expects rax to contain the number of arguments 40 // JumpToExternalReference expects rax to contain the number of arguments
38 // including the receiver and the extra arguments. 41 // including the receiver and the extra arguments.
39 const int num_extra_args = 3; 42 const int num_extra_args = 3;
40 __ addp(rax, Immediate(num_extra_args + 1)); 43 __ addp(rax, Immediate(num_extra_args + 1));
(...skipping 3032 matching lines...) Expand 10 before | Expand all | Expand 10 after
3073 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3076 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3074 Generate_OnStackReplacementHelper(masm, true); 3077 Generate_OnStackReplacementHelper(masm, true);
3075 } 3078 }
3076 3079
3077 #undef __ 3080 #undef __
3078 3081
3079 } // namespace internal 3082 } // namespace internal
3080 } // namespace v8 3083 } // namespace v8
3081 3084
3082 #endif // V8_TARGET_ARCH_X64 3085 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/builtins/builtins.cc ('k') | src/compiler/js-graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698