| 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 2892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2903 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == | 2903 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == |
| 2904 expr->CallNewFeedbackSlot().ToInt() + 1); | 2904 expr->CallNewFeedbackSlot().ToInt() + 1); |
| 2905 } | 2905 } |
| 2906 | 2906 |
| 2907 __ LoadObject(x2, FeedbackVector()); | 2907 __ LoadObject(x2, FeedbackVector()); |
| 2908 __ Mov(x3, SmiFromSlot(expr->CallNewFeedbackSlot())); | 2908 __ Mov(x3, SmiFromSlot(expr->CallNewFeedbackSlot())); |
| 2909 | 2909 |
| 2910 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 2910 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
| 2911 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 2911 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 2912 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 2912 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 2913 // Restore context register. |
| 2914 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 2913 context()->Plug(x0); | 2915 context()->Plug(x0); |
| 2914 } | 2916 } |
| 2915 | 2917 |
| 2916 | 2918 |
| 2917 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 2919 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 2918 SuperCallReference* super_call_ref = | 2920 SuperCallReference* super_call_ref = |
| 2919 expr->expression()->AsSuperCallReference(); | 2921 expr->expression()->AsSuperCallReference(); |
| 2920 DCHECK_NOT_NULL(super_call_ref); | 2922 DCHECK_NOT_NULL(super_call_ref); |
| 2921 | 2923 |
| 2922 EmitLoadSuperConstructor(super_call_ref); | 2924 EmitLoadSuperConstructor(super_call_ref); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2952 } | 2954 } |
| 2953 | 2955 |
| 2954 __ LoadObject(x2, FeedbackVector()); | 2956 __ LoadObject(x2, FeedbackVector()); |
| 2955 __ Mov(x3, SmiFromSlot(expr->CallFeedbackSlot())); | 2957 __ Mov(x3, SmiFromSlot(expr->CallFeedbackSlot())); |
| 2956 | 2958 |
| 2957 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); | 2959 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); |
| 2958 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 2960 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 2959 | 2961 |
| 2960 RecordJSReturnSite(expr); | 2962 RecordJSReturnSite(expr); |
| 2961 | 2963 |
| 2964 // Restore context register. |
| 2965 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 2962 context()->Plug(x0); | 2966 context()->Plug(x0); |
| 2963 } | 2967 } |
| 2964 | 2968 |
| 2965 | 2969 |
| 2966 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 2970 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
| 2967 ZoneList<Expression*>* args = expr->arguments(); | 2971 ZoneList<Expression*>* args = expr->arguments(); |
| 2968 DCHECK(args->length() == 1); | 2972 DCHECK(args->length() == 1); |
| 2969 | 2973 |
| 2970 VisitForAccumulatorValue(args->at(0)); | 2974 VisitForAccumulatorValue(args->at(0)); |
| 2971 | 2975 |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3876 __ Cbnz(x1, &loop); | 3880 __ Cbnz(x1, &loop); |
| 3877 } | 3881 } |
| 3878 | 3882 |
| 3879 __ bind(&args_set_up); | 3883 __ bind(&args_set_up); |
| 3880 __ Peek(x1, Operand(x0, LSL, kPointerSizeLog2)); | 3884 __ Peek(x1, Operand(x0, LSL, kPointerSizeLog2)); |
| 3881 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex); | 3885 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex); |
| 3882 | 3886 |
| 3883 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); | 3887 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); |
| 3884 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3888 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3885 | 3889 |
| 3886 __ Drop(1); | 3890 // Restore context register. |
| 3891 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3887 | 3892 |
| 3888 context()->Plug(result_register()); | 3893 context()->DropAndPlug(1, x0); |
| 3889 } | 3894 } |
| 3890 | 3895 |
| 3891 | 3896 |
| 3892 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { | 3897 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { |
| 3893 RegExpConstructResultStub stub(isolate()); | 3898 RegExpConstructResultStub stub(isolate()); |
| 3894 ZoneList<Expression*>* args = expr->arguments(); | 3899 ZoneList<Expression*>* args = expr->arguments(); |
| 3895 DCHECK(args->length() == 3); | 3900 DCHECK(args->length() == 3); |
| 3896 VisitForStackValue(args->at(0)); | 3901 VisitForStackValue(args->at(0)); |
| 3897 VisitForStackValue(args->at(1)); | 3902 VisitForStackValue(args->at(1)); |
| 3898 VisitForAccumulatorValue(args->at(2)); | 3903 VisitForAccumulatorValue(args->at(2)); |
| (...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5361 } | 5366 } |
| 5362 | 5367 |
| 5363 return INTERRUPT; | 5368 return INTERRUPT; |
| 5364 } | 5369 } |
| 5365 | 5370 |
| 5366 | 5371 |
| 5367 } // namespace internal | 5372 } // namespace internal |
| 5368 } // namespace v8 | 5373 } // namespace v8 |
| 5369 | 5374 |
| 5370 #endif // V8_TARGET_ARCH_ARM64 | 5375 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |