Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 1529113002: [es6] Consistently use %_GetSuperConstructor to implement super calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698