| 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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 2709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2720 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2720 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 2721 context()->Plug(x0); | 2721 context()->Plug(x0); |
| 2722 } | 2722 } |
| 2723 | 2723 |
| 2724 | 2724 |
| 2725 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 2725 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 2726 SuperCallReference* super_call_ref = | 2726 SuperCallReference* super_call_ref = |
| 2727 expr->expression()->AsSuperCallReference(); | 2727 expr->expression()->AsSuperCallReference(); |
| 2728 DCHECK_NOT_NULL(super_call_ref); | 2728 DCHECK_NOT_NULL(super_call_ref); |
| 2729 | 2729 |
| 2730 EmitLoadSuperConstructor(super_call_ref); | 2730 // Push the super constructor target on the stack (may be null, |
| 2731 __ push(result_register()); | 2731 // but the Construct builtin can deal with that properly). |
| 2732 VisitForAccumulatorValue(super_call_ref->this_function_var()); |
| 2733 __ AssertFunction(result_register()); |
| 2734 __ Ldr(result_register(), |
| 2735 FieldMemOperand(result_register(), HeapObject::kMapOffset)); |
| 2736 __ Ldr(result_register(), |
| 2737 FieldMemOperand(result_register(), Map::kPrototypeOffset)); |
| 2738 __ Push(result_register()); |
| 2732 | 2739 |
| 2733 // Push the arguments ("left-to-right") on the stack. | 2740 // Push the arguments ("left-to-right") on the stack. |
| 2734 ZoneList<Expression*>* args = expr->arguments(); | 2741 ZoneList<Expression*>* args = expr->arguments(); |
| 2735 int arg_count = args->length(); | 2742 int arg_count = args->length(); |
| 2736 for (int i = 0; i < arg_count; i++) { | 2743 for (int i = 0; i < arg_count; i++) { |
| 2737 VisitForStackValue(args->at(i)); | 2744 VisitForStackValue(args->at(i)); |
| 2738 } | 2745 } |
| 2739 | 2746 |
| 2740 // Call the construct call builtin that handles allocation and | 2747 // Call the construct call builtin that handles allocation and |
| 2741 // constructor invocation. | 2748 // constructor invocation. |
| (...skipping 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4874 } | 4881 } |
| 4875 | 4882 |
| 4876 return INTERRUPT; | 4883 return INTERRUPT; |
| 4877 } | 4884 } |
| 4878 | 4885 |
| 4879 | 4886 |
| 4880 } // namespace internal | 4887 } // namespace internal |
| 4881 } // namespace v8 | 4888 } // namespace v8 |
| 4882 | 4889 |
| 4883 #endif // V8_TARGET_ARCH_ARM64 | 4890 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |