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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 2829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2840 | 2840 |
2841 Register object = x1; | 2841 Register object = x1; |
2842 Register index = x0; | 2842 Register index = x0; |
2843 Register result = x3; | 2843 Register result = x3; |
2844 | 2844 |
2845 PopOperand(object); | 2845 PopOperand(object); |
2846 | 2846 |
2847 Label need_conversion; | 2847 Label need_conversion; |
2848 Label index_out_of_range; | 2848 Label index_out_of_range; |
2849 Label done; | 2849 Label done; |
2850 StringCharCodeAtGenerator generator(object, | 2850 StringCharCodeAtGenerator generator(object, index, result, &need_conversion, |
2851 index, | 2851 &need_conversion, &index_out_of_range); |
2852 result, | |
2853 &need_conversion, | |
2854 &need_conversion, | |
2855 &index_out_of_range, | |
2856 STRING_INDEX_IS_NUMBER); | |
2857 generator.GenerateFast(masm_); | 2852 generator.GenerateFast(masm_); |
2858 __ B(&done); | 2853 __ B(&done); |
2859 | 2854 |
2860 __ Bind(&index_out_of_range); | 2855 __ Bind(&index_out_of_range); |
2861 // When the index is out of range, the spec requires us to return NaN. | 2856 // When the index is out of range, the spec requires us to return NaN. |
2862 __ LoadRoot(result, Heap::kNanValueRootIndex); | 2857 __ LoadRoot(result, Heap::kNanValueRootIndex); |
2863 __ B(&done); | 2858 __ B(&done); |
2864 | 2859 |
2865 __ Bind(&need_conversion); | 2860 __ Bind(&need_conversion); |
2866 // Load the undefined value into the result register, which will | 2861 // Load the undefined value into the result register, which will |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3896 } | 3891 } |
3897 | 3892 |
3898 return INTERRUPT; | 3893 return INTERRUPT; |
3899 } | 3894 } |
3900 | 3895 |
3901 | 3896 |
3902 } // namespace internal | 3897 } // namespace internal |
3903 } // namespace v8 | 3898 } // namespace v8 |
3904 | 3899 |
3905 #endif // V8_TARGET_ARCH_ARM64 | 3900 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |