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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 4094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4105 __ bind(&done); | 4105 __ bind(&done); |
4106 | 4106 |
4107 context()->Plug(r0); | 4107 context()->Plug(r0); |
4108 } | 4108 } |
4109 | 4109 |
4110 | 4110 |
4111 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { | 4111 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { |
4112 ZoneList<Expression*>* args = expr->arguments(); | 4112 ZoneList<Expression*>* args = expr->arguments(); |
4113 DCHECK(args->length() == 2); | 4113 DCHECK(args->length() == 2); |
4114 | 4114 |
4115 // new.target | 4115 // Evaluate new.target and super constructor. |
4116 VisitForStackValue(args->at(0)); | 4116 VisitForStackValue(args->at(0)); |
4117 | |
4118 // .this_function | |
4119 VisitForStackValue(args->at(1)); | 4117 VisitForStackValue(args->at(1)); |
4120 __ CallRuntime(Runtime::kGetPrototype, 1); | |
4121 __ Push(result_register()); | |
4122 | 4118 |
4123 // Load original constructor into r4. | 4119 // Load original constructor into r4. |
4124 __ ldr(r4, MemOperand(sp, 1 * kPointerSize)); | 4120 __ ldr(r4, MemOperand(sp, 1 * kPointerSize)); |
4125 | 4121 |
4126 // Check if the calling frame is an arguments adaptor frame. | 4122 // Check if the calling frame is an arguments adaptor frame. |
4127 Label adaptor_frame, args_set_up, runtime; | 4123 Label adaptor_frame, args_set_up, runtime; |
4128 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 4124 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
4129 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); | 4125 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); |
4130 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 4126 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
4131 __ b(eq, &adaptor_frame); | 4127 __ b(eq, &adaptor_frame); |
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5368 DCHECK(interrupt_address == | 5364 DCHECK(interrupt_address == |
5369 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5365 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5370 return OSR_AFTER_STACK_CHECK; | 5366 return OSR_AFTER_STACK_CHECK; |
5371 } | 5367 } |
5372 | 5368 |
5373 | 5369 |
5374 } // namespace internal | 5370 } // namespace internal |
5375 } // namespace v8 | 5371 } // namespace v8 |
5376 | 5372 |
5377 #endif // V8_TARGET_ARCH_ARM | 5373 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |