OLD | NEW |
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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 2985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2996 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2996 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
2997 context()->Plug(v0); | 2997 context()->Plug(v0); |
2998 } | 2998 } |
2999 | 2999 |
3000 | 3000 |
3001 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 3001 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
3002 SuperCallReference* super_call_ref = | 3002 SuperCallReference* super_call_ref = |
3003 expr->expression()->AsSuperCallReference(); | 3003 expr->expression()->AsSuperCallReference(); |
3004 DCHECK_NOT_NULL(super_call_ref); | 3004 DCHECK_NOT_NULL(super_call_ref); |
3005 | 3005 |
3006 EmitLoadSuperConstructor(super_call_ref); | 3006 // Push the super constructor target on the stack (may be null, |
3007 __ push(result_register()); | 3007 // but the Construct builtin can deal with that properly). |
| 3008 VisitForAccumulatorValue(super_call_ref->this_function_var()); |
| 3009 __ AssertFunction(result_register()); |
| 3010 __ lw(result_register(), |
| 3011 FieldMemOperand(result_register(), HeapObject::kMapOffset)); |
| 3012 __ lw(result_register(), |
| 3013 FieldMemOperand(result_register(), Map::kPrototypeOffset)); |
| 3014 __ Push(result_register()); |
3008 | 3015 |
3009 // Push the arguments ("left-to-right") on the stack. | 3016 // Push the arguments ("left-to-right") on the stack. |
3010 ZoneList<Expression*>* args = expr->arguments(); | 3017 ZoneList<Expression*>* args = expr->arguments(); |
3011 int arg_count = args->length(); | 3018 int arg_count = args->length(); |
3012 for (int i = 0; i < arg_count; i++) { | 3019 for (int i = 0; i < arg_count; i++) { |
3013 VisitForStackValue(args->at(i)); | 3020 VisitForStackValue(args->at(i)); |
3014 } | 3021 } |
3015 | 3022 |
3016 // Call the construct call builtin that handles allocation and | 3023 // Call the construct call builtin that handles allocation and |
3017 // constructor invocation. | 3024 // constructor invocation. |
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4847 reinterpret_cast<uint32_t>( | 4854 reinterpret_cast<uint32_t>( |
4848 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4855 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4849 return OSR_AFTER_STACK_CHECK; | 4856 return OSR_AFTER_STACK_CHECK; |
4850 } | 4857 } |
4851 | 4858 |
4852 | 4859 |
4853 } // namespace internal | 4860 } // namespace internal |
4854 } // namespace v8 | 4861 } // namespace v8 |
4855 | 4862 |
4856 #endif // V8_TARGET_ARCH_MIPS | 4863 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |