OLD | NEW |
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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2734 { | 2734 { |
2735 PreservePositionScope scope(masm()->positions_recorder()); | 2735 PreservePositionScope scope(masm()->positions_recorder()); |
2736 VisitForStackValue(property->obj()); | 2736 VisitForStackValue(property->obj()); |
2737 } | 2737 } |
2738 if (is_named_call) { | 2738 if (is_named_call) { |
2739 EmitCallWithLoadIC(expr); | 2739 EmitCallWithLoadIC(expr); |
2740 } else { | 2740 } else { |
2741 EmitKeyedCallWithLoadIC(expr, property->key()); | 2741 EmitKeyedCallWithLoadIC(expr, property->key()); |
2742 } | 2742 } |
2743 } | 2743 } |
| 2744 } else if (call_type == Call::SUPER_CALL) { |
| 2745 SuperReference* super_ref = callee->AsSuperReference(); |
| 2746 DCHECK(super_ref != NULL); |
| 2747 __ Ldr(x0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 2748 __ Push(x0); |
| 2749 __ CallRuntime(Runtime::kGetPrototype, 1); |
| 2750 __ Push(result_register()); |
| 2751 VisitForStackValue(super_ref->this_var()); |
| 2752 EmitCall(expr, CallICState::METHOD); |
2744 } else { | 2753 } else { |
2745 DCHECK(call_type == Call::OTHER_CALL); | 2754 DCHECK(call_type == Call::OTHER_CALL); |
2746 // Call to an arbitrary expression not handled specially above. | 2755 // Call to an arbitrary expression not handled specially above. |
2747 { PreservePositionScope scope(masm()->positions_recorder()); | 2756 { PreservePositionScope scope(masm()->positions_recorder()); |
2748 VisitForStackValue(callee); | 2757 VisitForStackValue(callee); |
2749 } | 2758 } |
2750 __ LoadRoot(x1, Heap::kUndefinedValueRootIndex); | 2759 __ LoadRoot(x1, Heap::kUndefinedValueRootIndex); |
2751 __ Push(x1); | 2760 __ Push(x1); |
2752 // Emit function call. | 2761 // Emit function call. |
2753 EmitCall(expr); | 2762 EmitCall(expr); |
(...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5235 return previous_; | 5244 return previous_; |
5236 } | 5245 } |
5237 | 5246 |
5238 | 5247 |
5239 #undef __ | 5248 #undef __ |
5240 | 5249 |
5241 | 5250 |
5242 } } // namespace v8::internal | 5251 } } // namespace v8::internal |
5243 | 5252 |
5244 #endif // V8_TARGET_ARCH_ARM64 | 5253 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |