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

Side by Side Diff: src/arm/builtins-arm.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/api-arguments.cc ('k') | src/arm/code-stubs-arm.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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 __ ldr(ip, MemOperand(r2, r4, LSL, kPointerSizeLog2 - 1)); 597 __ ldr(ip, MemOperand(r2, r4, LSL, kPointerSizeLog2 - 1));
598 __ push(ip); 598 __ push(ip);
599 __ bind(&entry); 599 __ bind(&entry);
600 __ sub(r4, r4, Operand(2), SetCC); 600 __ sub(r4, r4, Operand(2), SetCC);
601 __ b(ge, &loop); 601 __ b(ge, &loop);
602 602
603 // Call the function. 603 // Call the function.
604 // r0: number of arguments 604 // r0: number of arguments
605 // r1: constructor function 605 // r1: constructor function
606 // r3: new target 606 // r3: new target
607 if (is_api_function) { 607 ParameterCount actual(r0);
608 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); 608 __ InvokeFunction(r1, r3, actual, CALL_FUNCTION,
609 Handle<Code> code = 609 CheckDebugStepCallWrapper());
610 masm->isolate()->builtins()->HandleApiCallConstruct();
611 __ Call(code, RelocInfo::CODE_TARGET);
612 } else {
613 ParameterCount actual(r0);
614 __ InvokeFunction(r1, r3, actual, CALL_FUNCTION,
615 CheckDebugStepCallWrapper());
616 }
617 610
618 // Store offset of return address for deoptimizer. 611 // Store offset of return address for deoptimizer.
619 if (create_implicit_receiver && !is_api_function) { 612 if (create_implicit_receiver && !is_api_function) {
620 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); 613 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset());
621 } 614 }
622 615
623 // Restore context from the frame. 616 // Restore context from the frame.
624 // r0: result 617 // r0: result
625 // sp[0]: receiver 618 // sp[0]: receiver
626 // sp[1]: number of arguments (smi-tagged) 619 // sp[1]: number of arguments (smi-tagged)
(...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after
2790 } 2783 }
2791 } 2784 }
2792 2785
2793 2786
2794 #undef __ 2787 #undef __
2795 2788
2796 } // namespace internal 2789 } // namespace internal
2797 } // namespace v8 2790 } // namespace v8
2798 2791
2799 #endif // V8_TARGET_ARCH_ARM 2792 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/api-arguments.cc ('k') | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698