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 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2596 callee->IsVariableProxy() ? CallICState::FUNCTION : CallICState::METHOD; | 2596 callee->IsVariableProxy() ? CallICState::FUNCTION : CallICState::METHOD; |
2597 | 2597 |
2598 // Get the target function. | 2598 // Get the target function. |
2599 if (call_type == CallICState::FUNCTION) { | 2599 if (call_type == CallICState::FUNCTION) { |
2600 { StackValueContext context(this); | 2600 { StackValueContext context(this); |
2601 EmitVariableLoad(callee->AsVariableProxy()); | 2601 EmitVariableLoad(callee->AsVariableProxy()); |
2602 PrepareForBailout(callee, NO_REGISTERS); | 2602 PrepareForBailout(callee, NO_REGISTERS); |
2603 } | 2603 } |
2604 // Push undefined as receiver. This is patched in the method prologue if it | 2604 // Push undefined as receiver. This is patched in the method prologue if it |
2605 // is a sloppy mode method. | 2605 // is a sloppy mode method. |
2606 __ Push(isolate()->factory()->undefined_value()); | 2606 { |
| 2607 UseScratchRegisterScope temps(masm_); |
| 2608 Register temp = temps.AcquireX(); |
| 2609 __ LoadRoot(temp, Heap::kUndefinedValueRootIndex); |
| 2610 __ Push(temp); |
| 2611 } |
2607 } else { | 2612 } else { |
2608 // Load the function from the receiver. | 2613 // Load the function from the receiver. |
2609 DCHECK(callee->IsProperty()); | 2614 DCHECK(callee->IsProperty()); |
2610 DCHECK(!callee->AsProperty()->IsSuperAccess()); | 2615 DCHECK(!callee->AsProperty()->IsSuperAccess()); |
2611 __ Peek(LoadDescriptor::ReceiverRegister(), 0); | 2616 __ Peek(LoadDescriptor::ReceiverRegister(), 0); |
2612 EmitNamedPropertyLoad(callee->AsProperty()); | 2617 EmitNamedPropertyLoad(callee->AsProperty()); |
2613 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); | 2618 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); |
2614 // Push the target function under the receiver. | 2619 // Push the target function under the receiver. |
2615 __ Pop(x10); | 2620 __ Pop(x10); |
2616 __ Push(x0, x10); | 2621 __ Push(x0, x10); |
(...skipping 2863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5480 return previous_; | 5485 return previous_; |
5481 } | 5486 } |
5482 | 5487 |
5483 | 5488 |
5484 #undef __ | 5489 #undef __ |
5485 | 5490 |
5486 | 5491 |
5487 } } // namespace v8::internal | 5492 } } // namespace v8::internal |
5488 | 5493 |
5489 #endif // V8_TARGET_ARCH_ARM64 | 5494 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |