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

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

Issue 1910253005: [api] Expose FunctionCallbackInfo::NewTarget (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added a TODO Created 4 years, 8 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/code-stubs-mips64.cc ('k') | src/x64/code-stubs-x64.cc » ('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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 Label loop, entry; 178 Label loop, entry;
179 __ movp(rcx, rax); 179 __ movp(rcx, rax);
180 __ jmp(&entry); 180 __ jmp(&entry);
181 __ bind(&loop); 181 __ bind(&loop);
182 __ Push(Operand(rbx, rcx, times_pointer_size, 0)); 182 __ Push(Operand(rbx, rcx, times_pointer_size, 0));
183 __ bind(&entry); 183 __ bind(&entry);
184 __ decp(rcx); 184 __ decp(rcx);
185 __ j(greater_equal, &loop); 185 __ j(greater_equal, &loop);
186 186
187 // Call the function. 187 // Call the function.
188 if (is_api_function) { 188 ParameterCount actual(rax);
189 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); 189 __ InvokeFunction(rdi, rdx, actual, CALL_FUNCTION,
190 Handle<Code> code = 190 CheckDebugStepCallWrapper());
191 masm->isolate()->builtins()->HandleApiCallConstruct();
192 __ Call(code, RelocInfo::CODE_TARGET);
193 } else {
194 ParameterCount actual(rax);
195 __ InvokeFunction(rdi, rdx, actual, CALL_FUNCTION,
196 CheckDebugStepCallWrapper());
197 }
198 191
199 // Store offset of return address for deoptimizer. 192 // Store offset of return address for deoptimizer.
200 if (create_implicit_receiver && !is_api_function) { 193 if (create_implicit_receiver && !is_api_function) {
201 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); 194 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset());
202 } 195 }
203 196
204 // Restore context from the frame. 197 // Restore context from the frame.
205 __ movp(rsi, Operand(rbp, ConstructFrameConstants::kContextOffset)); 198 __ movp(rsi, Operand(rbp, ConstructFrameConstants::kContextOffset));
206 199
207 if (create_implicit_receiver) { 200 if (create_implicit_receiver) {
(...skipping 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2932 __ ret(0); 2925 __ ret(0);
2933 } 2926 }
2934 2927
2935 2928
2936 #undef __ 2929 #undef __
2937 2930
2938 } // namespace internal 2931 } // namespace internal
2939 } // namespace v8 2932 } // namespace v8
2940 2933
2941 #endif // V8_TARGET_ARCH_X64 2934 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698