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 3824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3835 __ Bind(&done); | 3835 __ Bind(&done); |
3836 | 3836 |
3837 context()->Plug(x0); | 3837 context()->Plug(x0); |
3838 } | 3838 } |
3839 | 3839 |
3840 | 3840 |
3841 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { | 3841 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { |
3842 ZoneList<Expression*>* args = expr->arguments(); | 3842 ZoneList<Expression*>* args = expr->arguments(); |
3843 DCHECK(args->length() == 2); | 3843 DCHECK(args->length() == 2); |
3844 | 3844 |
3845 // new.target | 3845 // Evaluate new.target and super constructor. |
3846 VisitForStackValue(args->at(0)); | 3846 VisitForStackValue(args->at(0)); |
3847 | |
3848 // .this_function | |
3849 VisitForStackValue(args->at(1)); | 3847 VisitForStackValue(args->at(1)); |
3850 __ CallRuntime(Runtime::kGetPrototype, 1); | |
3851 __ Push(result_register()); | |
3852 | 3848 |
3853 // Load original constructor into x4. | 3849 // Load original constructor into x4. |
3854 __ Peek(x4, 1 * kPointerSize); | 3850 __ Peek(x4, 1 * kPointerSize); |
3855 | 3851 |
3856 // Check if the calling frame is an arguments adaptor frame. | 3852 // Check if the calling frame is an arguments adaptor frame. |
3857 Label adaptor_frame, args_set_up, runtime; | 3853 Label adaptor_frame, args_set_up, runtime; |
3858 __ Ldr(x11, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 3854 __ Ldr(x11, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
3859 __ Ldr(x12, MemOperand(x11, StandardFrameConstants::kContextOffset)); | 3855 __ Ldr(x12, MemOperand(x11, StandardFrameConstants::kContextOffset)); |
3860 __ Cmp(x12, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | 3856 __ Cmp(x12, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
3861 __ B(eq, &adaptor_frame); | 3857 __ B(eq, &adaptor_frame); |
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5369 } | 5365 } |
5370 | 5366 |
5371 return INTERRUPT; | 5367 return INTERRUPT; |
5372 } | 5368 } |
5373 | 5369 |
5374 | 5370 |
5375 } // namespace internal | 5371 } // namespace internal |
5376 } // namespace v8 | 5372 } // namespace v8 |
5377 | 5373 |
5378 #endif // V8_TARGET_ARCH_ARM64 | 5374 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |