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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3897 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { | 3897 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { |
3898 Variable* new_target_var = scope()->DeclarationScope()->new_target_var(); | 3898 Variable* new_target_var = scope()->DeclarationScope()->new_target_var(); |
3899 GetVar(result_register(), new_target_var); | 3899 GetVar(result_register(), new_target_var); |
3900 __ Push(result_register()); | 3900 __ Push(result_register()); |
3901 | 3901 |
3902 EmitLoadSuperConstructor(); | 3902 EmitLoadSuperConstructor(); |
3903 __ Push(result_register()); | 3903 __ Push(result_register()); |
3904 | 3904 |
3905 // Check if the calling frame is an arguments adaptor frame. | 3905 // Check if the calling frame is an arguments adaptor frame. |
3906 Label adaptor_frame, args_set_up, runtime; | 3906 Label adaptor_frame, args_set_up, runtime; |
3907 Register caller_fp = x11; | |
3908 __ Ldr(x11, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 3907 __ Ldr(x11, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
3909 __ Ldr(x12, MemOperand(x11, StandardFrameConstants::kContextOffset)); | 3908 __ Ldr(x12, MemOperand(x11, StandardFrameConstants::kContextOffset)); |
3910 __ Cmp(x12, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | 3909 __ Cmp(x12, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
3911 __ B(eq, &adaptor_frame); | 3910 __ B(eq, &adaptor_frame); |
3912 // default constructor has no arguments, so no adaptor frame means no args. | 3911 // default constructor has no arguments, so no adaptor frame means no args. |
3913 __ Mov(x0, Operand(0)); | 3912 __ Mov(x0, Operand(0)); |
3914 __ B(&args_set_up); | 3913 __ B(&args_set_up); |
3915 | 3914 |
3916 // Copy arguments from adaptor frame. | 3915 // Copy arguments from adaptor frame. |
3917 { | 3916 { |
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5481 return previous_; | 5480 return previous_; |
5482 } | 5481 } |
5483 | 5482 |
5484 | 5483 |
5485 #undef __ | 5484 #undef __ |
5486 | 5485 |
5487 | 5486 |
5488 } } // namespace v8::internal | 5487 } } // namespace v8::internal |
5489 | 5488 |
5490 #endif // V8_TARGET_ARCH_ARM64 | 5489 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |