| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
| 8 // | 8 // |
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
| (...skipping 2925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2936 | 2936 |
| 2937 Register object = a1; | 2937 Register object = a1; |
| 2938 Register index = a0; | 2938 Register index = a0; |
| 2939 Register result = v0; | 2939 Register result = v0; |
| 2940 | 2940 |
| 2941 PopOperand(object); | 2941 PopOperand(object); |
| 2942 | 2942 |
| 2943 Label need_conversion; | 2943 Label need_conversion; |
| 2944 Label index_out_of_range; | 2944 Label index_out_of_range; |
| 2945 Label done; | 2945 Label done; |
| 2946 StringCharCodeAtGenerator generator(object, | 2946 StringCharCodeAtGenerator generator(object, index, result, &need_conversion, |
| 2947 index, | 2947 &need_conversion, &index_out_of_range); |
| 2948 result, | |
| 2949 &need_conversion, | |
| 2950 &need_conversion, | |
| 2951 &index_out_of_range, | |
| 2952 STRING_INDEX_IS_NUMBER); | |
| 2953 generator.GenerateFast(masm_); | 2948 generator.GenerateFast(masm_); |
| 2954 __ jmp(&done); | 2949 __ jmp(&done); |
| 2955 | 2950 |
| 2956 __ bind(&index_out_of_range); | 2951 __ bind(&index_out_of_range); |
| 2957 // When the index is out of range, the spec requires us to return | 2952 // When the index is out of range, the spec requires us to return |
| 2958 // NaN. | 2953 // NaN. |
| 2959 __ LoadRoot(result, Heap::kNanValueRootIndex); | 2954 __ LoadRoot(result, Heap::kNanValueRootIndex); |
| 2960 __ jmp(&done); | 2955 __ jmp(&done); |
| 2961 | 2956 |
| 2962 __ bind(&need_conversion); | 2957 __ bind(&need_conversion); |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3839 reinterpret_cast<uint64_t>( | 3834 reinterpret_cast<uint64_t>( |
| 3840 isolate->builtins()->OnStackReplacement()->entry())); | 3835 isolate->builtins()->OnStackReplacement()->entry())); |
| 3841 return ON_STACK_REPLACEMENT; | 3836 return ON_STACK_REPLACEMENT; |
| 3842 } | 3837 } |
| 3843 | 3838 |
| 3844 | 3839 |
| 3845 } // namespace internal | 3840 } // namespace internal |
| 3846 } // namespace v8 | 3841 } // namespace v8 |
| 3847 | 3842 |
| 3848 #endif // V8_TARGET_ARCH_MIPS64 | 3843 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |