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

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: IsConstructCall refactor Created 4 years, 7 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
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 if (is_api_function) {
Benedikt Meurer 2016/04/26 04:21:34 You shouldn't need this if anymore. The InvokeFunc
adamk 2016/04/26 18:17:14 Done.
Benedikt Meurer 2016/04/26 18:28:40 Acknowledged.
189 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); 189 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
190 Handle<Code> code = 190 Handle<Code> code = masm->isolate()->builtins()->HandleApiCall();
191 masm->isolate()->builtins()->HandleApiCallConstruct();
192 __ Call(code, RelocInfo::CODE_TARGET); 191 __ Call(code, RelocInfo::CODE_TARGET);
193 } else { 192 } else {
194 ParameterCount actual(rax); 193 ParameterCount actual(rax);
195 __ InvokeFunction(rdi, rdx, actual, CALL_FUNCTION, 194 __ InvokeFunction(rdi, rdx, actual, CALL_FUNCTION,
196 CheckDebugStepCallWrapper()); 195 CheckDebugStepCallWrapper());
197 } 196 }
198 197
199 // Store offset of return address for deoptimizer. 198 // Store offset of return address for deoptimizer.
200 if (create_implicit_receiver && !is_api_function) { 199 if (create_implicit_receiver && !is_api_function) {
201 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); 200 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset());
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2932 __ ret(0); 2931 __ ret(0);
2933 } 2932 }
2934 2933
2935 2934
2936 #undef __ 2935 #undef __
2937 2936
2938 } // namespace internal 2937 } // namespace internal
2939 } // namespace v8 2938 } // namespace v8
2940 2939
2941 #endif // V8_TARGET_ARCH_X64 2940 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/builtins.cc ('K') | « src/builtins.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698