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 2591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2602 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2602 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
2603 context()->DropAndPlug(1, x0); | 2603 context()->DropAndPlug(1, x0); |
2604 } | 2604 } |
2605 | 2605 |
2606 | 2606 |
2607 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { | 2607 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
2608 ASM_LOCATION("FullCodeGenerator::EmitResolvePossiblyDirectEval"); | 2608 ASM_LOCATION("FullCodeGenerator::EmitResolvePossiblyDirectEval"); |
2609 // Prepare to push a copy of the first argument or undefined if it doesn't | 2609 // Prepare to push a copy of the first argument or undefined if it doesn't |
2610 // exist. | 2610 // exist. |
2611 if (arg_count > 0) { | 2611 if (arg_count > 0) { |
2612 __ Peek(x10, arg_count * kXRegSize); | 2612 __ Peek(x9, arg_count * kXRegSize); |
2613 } else { | 2613 } else { |
2614 __ LoadRoot(x10, Heap::kUndefinedValueRootIndex); | 2614 __ LoadRoot(x9, Heap::kUndefinedValueRootIndex); |
2615 } | 2615 } |
2616 | 2616 |
| 2617 __ Ldr(x10, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
2617 // Prepare to push the receiver of the enclosing function. | 2618 // Prepare to push the receiver of the enclosing function. |
2618 int receiver_offset = 2 + info_->scope()->num_parameters(); | 2619 int receiver_offset = 2 + info_->scope()->num_parameters(); |
2619 __ Ldr(x11, MemOperand(fp, receiver_offset * kPointerSize)); | 2620 __ Ldr(x11, MemOperand(fp, receiver_offset * kPointerSize)); |
2620 | 2621 |
2621 // Prepare to push the language mode. | 2622 // Prepare to push the language mode. |
2622 __ Mov(x12, Smi::FromInt(strict_mode())); | 2623 __ Mov(x12, Smi::FromInt(strict_mode())); |
2623 // Prepare to push the start position of the scope the calls resides in. | 2624 // Prepare to push the start position of the scope the calls resides in. |
2624 __ Mov(x13, Smi::FromInt(scope()->start_position())); | 2625 __ Mov(x13, Smi::FromInt(scope()->start_position())); |
2625 | 2626 |
2626 // Push. | 2627 // Push. |
2627 __ Push(x10, x11, x12, x13); | 2628 __ Push(x9, x10, x11, x12, x13); |
2628 | 2629 |
2629 // Do the runtime call. | 2630 // Do the runtime call. |
2630 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5); | 2631 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); |
2631 } | 2632 } |
2632 | 2633 |
2633 | 2634 |
2634 void FullCodeGenerator::EmitLoadSuperConstructor(SuperReference* super_ref) { | 2635 void FullCodeGenerator::EmitLoadSuperConstructor(SuperReference* super_ref) { |
2635 DCHECK(super_ref != NULL); | 2636 DCHECK(super_ref != NULL); |
2636 __ ldr(x0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 2637 __ ldr(x0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
2637 __ Push(x0); | 2638 __ Push(x0); |
2638 __ CallRuntime(Runtime::kGetPrototype, 1); | 2639 __ CallRuntime(Runtime::kGetPrototype, 1); |
2639 } | 2640 } |
2640 | 2641 |
(...skipping 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5260 return previous_; | 5261 return previous_; |
5261 } | 5262 } |
5262 | 5263 |
5263 | 5264 |
5264 #undef __ | 5265 #undef __ |
5265 | 5266 |
5266 | 5267 |
5267 } } // namespace v8::internal | 5268 } } // namespace v8::internal |
5268 | 5269 |
5269 #endif // V8_TARGET_ARCH_ARM64 | 5270 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |