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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 2991 matching lines...) Expand 10 before | Expand all | Expand 10 after
3002 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 3002 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3003 context()->Plug(v0); 3003 context()->Plug(v0);
3004 } 3004 }
3005 3005
3006 3006
3007 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { 3007 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
3008 SuperCallReference* super_call_ref = 3008 SuperCallReference* super_call_ref =
3009 expr->expression()->AsSuperCallReference(); 3009 expr->expression()->AsSuperCallReference();
3010 DCHECK_NOT_NULL(super_call_ref); 3010 DCHECK_NOT_NULL(super_call_ref);
3011 3011
3012 EmitLoadSuperConstructor(super_call_ref); 3012 // Push the super constructor target on the stack (may be null,
3013 __ push(result_register()); 3013 // but the Construct builtin can deal with that properly).
3014 VisitForAccumulatorValue(super_call_ref->this_function_var());
3015 __ AssertFunction(result_register());
3016 __ ld(result_register(),
3017 FieldMemOperand(result_register(), HeapObject::kMapOffset));
3018 __ ld(result_register(),
3019 FieldMemOperand(result_register(), Map::kPrototypeOffset));
3020 __ Push(result_register());
3014 3021
3015 // Push the arguments ("left-to-right") on the stack. 3022 // Push the arguments ("left-to-right") on the stack.
3016 ZoneList<Expression*>* args = expr->arguments(); 3023 ZoneList<Expression*>* args = expr->arguments();
3017 int arg_count = args->length(); 3024 int arg_count = args->length();
3018 for (int i = 0; i < arg_count; i++) { 3025 for (int i = 0; i < arg_count; i++) {
3019 VisitForStackValue(args->at(i)); 3026 VisitForStackValue(args->at(i));
3020 } 3027 }
3021 3028
3022 // Call the construct call builtin that handles allocation and 3029 // Call the construct call builtin that handles allocation and
3023 // constructor invocation. 3030 // constructor invocation.
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
4861 reinterpret_cast<uint64_t>( 4868 reinterpret_cast<uint64_t>(
4862 isolate->builtins()->OsrAfterStackCheck()->entry())); 4869 isolate->builtins()->OsrAfterStackCheck()->entry()));
4863 return OSR_AFTER_STACK_CHECK; 4870 return OSR_AFTER_STACK_CHECK;
4864 } 4871 }
4865 4872
4866 4873
4867 } // namespace internal 4874 } // namespace internal
4868 } // namespace v8 4875 } // namespace v8
4869 4876
4870 #endif // V8_TARGET_ARCH_MIPS64 4877 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698