OLD | NEW |
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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 2880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2891 | 2891 |
2892 // Call the construct call builtin that handles allocation and | 2892 // Call the construct call builtin that handles allocation and |
2893 // constructor invocation. | 2893 // constructor invocation. |
2894 SetConstructCallPosition(expr); | 2894 SetConstructCallPosition(expr); |
2895 | 2895 |
2896 // Load function and argument count into x1 and x0. | 2896 // Load function and argument count into x1 and x0. |
2897 __ Mov(x0, arg_count); | 2897 __ Mov(x0, arg_count); |
2898 __ Peek(x1, arg_count * kXRegSize); | 2898 __ Peek(x1, arg_count * kXRegSize); |
2899 | 2899 |
2900 // Record call targets in unoptimized code. | 2900 // Record call targets in unoptimized code. |
2901 if (FLAG_pretenuring_call_new) { | |
2902 EnsureSlotContainsAllocationSite(expr->AllocationSiteFeedbackSlot()); | |
2903 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == | |
2904 expr->CallNewFeedbackSlot().ToInt() + 1); | |
2905 } | |
2906 | |
2907 __ LoadObject(x2, FeedbackVector()); | 2901 __ LoadObject(x2, FeedbackVector()); |
2908 __ Mov(x3, SmiFromSlot(expr->CallNewFeedbackSlot())); | 2902 __ Mov(x3, SmiFromSlot(expr->CallNewFeedbackSlot())); |
2909 | 2903 |
2910 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 2904 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
2911 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 2905 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
2912 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 2906 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
2913 // Restore context register. | 2907 // Restore context register. |
2914 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2908 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
2915 context()->Plug(x0); | 2909 context()->Plug(x0); |
2916 } | 2910 } |
(...skipping 20 matching lines...) Expand all Loading... |
2937 | 2931 |
2938 // Load original constructor into x4. | 2932 // Load original constructor into x4. |
2939 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 2933 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
2940 __ Mov(x4, result_register()); | 2934 __ Mov(x4, result_register()); |
2941 | 2935 |
2942 // Load function and argument count into x1 and x0. | 2936 // Load function and argument count into x1 and x0. |
2943 __ Mov(x0, arg_count); | 2937 __ Mov(x0, arg_count); |
2944 __ Peek(x1, arg_count * kXRegSize); | 2938 __ Peek(x1, arg_count * kXRegSize); |
2945 | 2939 |
2946 // Record call targets in unoptimized code. | 2940 // Record call targets in unoptimized code. |
2947 if (FLAG_pretenuring_call_new) { | |
2948 UNREACHABLE(); | |
2949 /* TODO(dslomov): support pretenuring. | |
2950 EnsureSlotContainsAllocationSite(expr->AllocationSiteFeedbackSlot()); | |
2951 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == | |
2952 expr->CallNewFeedbackSlot().ToInt() + 1); | |
2953 */ | |
2954 } | |
2955 | |
2956 __ LoadObject(x2, FeedbackVector()); | 2941 __ LoadObject(x2, FeedbackVector()); |
2957 __ Mov(x3, SmiFromSlot(expr->CallFeedbackSlot())); | 2942 __ Mov(x3, SmiFromSlot(expr->CallFeedbackSlot())); |
2958 | 2943 |
2959 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); | 2944 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); |
2960 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 2945 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
2961 | 2946 |
2962 RecordJSReturnSite(expr); | 2947 RecordJSReturnSite(expr); |
2963 | 2948 |
2964 // Restore context register. | 2949 // Restore context register. |
2965 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2950 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
(...skipping 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5264 } | 5249 } |
5265 | 5250 |
5266 return INTERRUPT; | 5251 return INTERRUPT; |
5267 } | 5252 } |
5268 | 5253 |
5269 | 5254 |
5270 } // namespace internal | 5255 } // namespace internal |
5271 } // namespace v8 | 5256 } // namespace v8 |
5272 | 5257 |
5273 #endif // V8_TARGET_ARCH_ARM64 | 5258 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |