| 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 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 2999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3010 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3010 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3011 context()->Plug(r0); | 3011 context()->Plug(r0); |
| 3012 } | 3012 } |
| 3013 | 3013 |
| 3014 | 3014 |
| 3015 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 3015 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 3016 SuperCallReference* super_call_ref = | 3016 SuperCallReference* super_call_ref = |
| 3017 expr->expression()->AsSuperCallReference(); | 3017 expr->expression()->AsSuperCallReference(); |
| 3018 DCHECK_NOT_NULL(super_call_ref); | 3018 DCHECK_NOT_NULL(super_call_ref); |
| 3019 | 3019 |
| 3020 EmitLoadSuperConstructor(super_call_ref); | 3020 // Push the super constructor target on the stack (may be null, |
| 3021 __ push(result_register()); | 3021 // but the Construct builtin can deal with that properly). |
| 3022 VisitForAccumulatorValue(super_call_ref->this_function_var()); |
| 3023 __ AssertFunction(result_register()); |
| 3024 __ ldr(result_register(), |
| 3025 FieldMemOperand(result_register(), HeapObject::kMapOffset)); |
| 3026 __ ldr(result_register(), |
| 3027 FieldMemOperand(result_register(), Map::kPrototypeOffset)); |
| 3028 __ Push(result_register()); |
| 3022 | 3029 |
| 3023 // Push the arguments ("left-to-right") on the stack. | 3030 // Push the arguments ("left-to-right") on the stack. |
| 3024 ZoneList<Expression*>* args = expr->arguments(); | 3031 ZoneList<Expression*>* args = expr->arguments(); |
| 3025 int arg_count = args->length(); | 3032 int arg_count = args->length(); |
| 3026 for (int i = 0; i < arg_count; i++) { | 3033 for (int i = 0; i < arg_count; i++) { |
| 3027 VisitForStackValue(args->at(i)); | 3034 VisitForStackValue(args->at(i)); |
| 3028 } | 3035 } |
| 3029 | 3036 |
| 3030 // Call the construct call builtin that handles allocation and | 3037 // Call the construct call builtin that handles allocation and |
| 3031 // constructor invocation. | 3038 // constructor invocation. |
| (...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4899 DCHECK(interrupt_address == | 4906 DCHECK(interrupt_address == |
| 4900 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4907 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 4901 return OSR_AFTER_STACK_CHECK; | 4908 return OSR_AFTER_STACK_CHECK; |
| 4902 } | 4909 } |
| 4903 | 4910 |
| 4904 | 4911 |
| 4905 } // namespace internal | 4912 } // namespace internal |
| 4906 } // namespace v8 | 4913 } // namespace v8 |
| 4907 | 4914 |
| 4908 #endif // V8_TARGET_ARCH_ARM | 4915 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |