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

Side by Side Diff: src/arm64/builtins-arm64.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/arm/code-stubs-arm.cc ('k') | src/arm64/code-stubs-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 // Because we copied values 2 by 2 we may have copied one extra value. 598 // Because we copied values 2 by 2 we may have copied one extra value.
599 // Drop it if that is the case. 599 // Drop it if that is the case.
600 __ B(eq, &done_copying_arguments); 600 __ B(eq, &done_copying_arguments);
601 __ Drop(1); 601 __ Drop(1);
602 __ Bind(&done_copying_arguments); 602 __ Bind(&done_copying_arguments);
603 603
604 // Call the function. 604 // Call the function.
605 // x0: number of arguments 605 // x0: number of arguments
606 // x1: constructor function 606 // x1: constructor function
607 // x3: new target 607 // x3: new target
608 if (is_api_function) { 608 ParameterCount actual(argc);
609 __ Ldr(cp, FieldMemOperand(constructor, JSFunction::kContextOffset)); 609 __ InvokeFunction(constructor, new_target, actual, CALL_FUNCTION,
610 Handle<Code> code = 610 CheckDebugStepCallWrapper());
611 masm->isolate()->builtins()->HandleApiCallConstruct();
612 __ Call(code, RelocInfo::CODE_TARGET);
613 } else {
614 ParameterCount actual(argc);
615 __ InvokeFunction(constructor, new_target, actual, CALL_FUNCTION,
616 CheckDebugStepCallWrapper());
617 }
618 611
619 // Store offset of return address for deoptimizer. 612 // Store offset of return address for deoptimizer.
620 if (create_implicit_receiver && !is_api_function) { 613 if (create_implicit_receiver && !is_api_function) {
621 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); 614 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset());
622 } 615 }
623 616
624 // Restore the context from the frame. 617 // Restore the context from the frame.
625 // x0: result 618 // x0: result
626 // jssp[0]: receiver 619 // jssp[0]: receiver
627 // jssp[1]: number of arguments (smi-tagged) 620 // jssp[1]: number of arguments (smi-tagged)
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2902 } 2895 }
2903 } 2896 }
2904 2897
2905 2898
2906 #undef __ 2899 #undef __
2907 2900
2908 } // namespace internal 2901 } // namespace internal
2909 } // namespace v8 2902 } // namespace v8
2910 2903
2911 #endif // V8_TARGET_ARCH_ARM 2904 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698