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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 // Dispatch on the kind of generator object. | 768 // Dispatch on the kind of generator object. |
769 Label old_generator; | 769 Label old_generator; |
770 __ Ldr(x3, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset)); | 770 __ Ldr(x3, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset)); |
771 __ Ldr(x3, FieldMemOperand(x3, SharedFunctionInfo::kFunctionDataOffset)); | 771 __ Ldr(x3, FieldMemOperand(x3, SharedFunctionInfo::kFunctionDataOffset)); |
772 __ CompareObjectType(x3, x3, x3, BYTECODE_ARRAY_TYPE); | 772 __ CompareObjectType(x3, x3, x3, BYTECODE_ARRAY_TYPE); |
773 __ B(ne, &old_generator); | 773 __ B(ne, &old_generator); |
774 | 774 |
775 // New-style (ignition/turbofan) generator object | 775 // New-style (ignition/turbofan) generator object |
776 { | 776 { |
777 __ Ldr(x0, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset)); | 777 __ Ldr(x0, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset)); |
778 __ Ldr(x0, | 778 __ Ldr(w0, |
779 FieldMemOperand(x0, SharedFunctionInfo::kFormalParameterCountOffset)); | 779 FieldMemOperand(x0, SharedFunctionInfo::kFormalParameterCountOffset)); |
780 __ SmiUntag(x0); | |
781 // We abuse new.target both to indicate that this is a resume call and to | 780 // We abuse new.target both to indicate that this is a resume call and to |
782 // pass in the generator object. In ordinary calls, new.target is always | 781 // pass in the generator object. In ordinary calls, new.target is always |
783 // undefined because generator functions are non-constructable. | 782 // undefined because generator functions are non-constructable. |
784 __ Move(x3, x1); | 783 __ Move(x3, x1); |
785 __ Move(x1, x4); | 784 __ Move(x1, x4); |
786 __ Ldr(x5, FieldMemOperand(x1, JSFunction::kCodeEntryOffset)); | 785 __ Ldr(x5, FieldMemOperand(x1, JSFunction::kCodeEntryOffset)); |
787 __ Jump(x5); | 786 __ Jump(x5); |
788 } | 787 } |
789 | 788 |
790 // Old-style (full-codegen) generator object | 789 // Old-style (full-codegen) generator object |
(...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2888 } | 2887 } |
2889 } | 2888 } |
2890 | 2889 |
2891 | 2890 |
2892 #undef __ | 2891 #undef __ |
2893 | 2892 |
2894 } // namespace internal | 2893 } // namespace internal |
2895 } // namespace v8 | 2894 } // namespace v8 |
2896 | 2895 |
2897 #endif // V8_TARGET_ARCH_ARM | 2896 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |