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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2802 } | 2802 } |
2803 | 2803 |
2804 | 2804 |
2805 // StringCharCodeAtGenerator. | 2805 // StringCharCodeAtGenerator. |
2806 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { | 2806 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { |
2807 DCHECK(!a4.is(index_)); | 2807 DCHECK(!a4.is(index_)); |
2808 DCHECK(!a4.is(result_)); | 2808 DCHECK(!a4.is(result_)); |
2809 DCHECK(!a4.is(object_)); | 2809 DCHECK(!a4.is(object_)); |
2810 | 2810 |
2811 // If the receiver is a smi trigger the non-string case. | 2811 // If the receiver is a smi trigger the non-string case. |
2812 __ JumpIfSmi(object_, receiver_not_string_); | 2812 if (check_mode_ == RECEIVER_IS_UNKNOWN) { |
| 2813 __ JumpIfSmi(object_, receiver_not_string_); |
2813 | 2814 |
2814 // Fetch the instance type of the receiver into result register. | 2815 // Fetch the instance type of the receiver into result register. |
2815 __ ld(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); | 2816 __ ld(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); |
2816 __ lbu(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); | 2817 __ lbu(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); |
2817 // If the receiver is not a string trigger the non-string case. | 2818 // If the receiver is not a string trigger the non-string case. |
2818 __ And(a4, result_, Operand(kIsNotStringMask)); | 2819 __ And(a4, result_, Operand(kIsNotStringMask)); |
2819 __ Branch(receiver_not_string_, ne, a4, Operand(zero_reg)); | 2820 __ Branch(receiver_not_string_, ne, a4, Operand(zero_reg)); |
| 2821 } |
2820 | 2822 |
2821 // If the index is non-smi trigger the non-smi case. | 2823 // If the index is non-smi trigger the non-smi case. |
2822 __ JumpIfNotSmi(index_, &index_not_smi_); | 2824 __ JumpIfNotSmi(index_, &index_not_smi_); |
2823 | 2825 |
2824 __ bind(&got_smi_index_); | 2826 __ bind(&got_smi_index_); |
2825 | 2827 |
2826 // Check for index out of range. | 2828 // Check for index out of range. |
2827 __ ld(a4, FieldMemOperand(object_, String::kLengthOffset)); | 2829 __ ld(a4, FieldMemOperand(object_, String::kLengthOffset)); |
2828 __ Branch(index_out_of_range_, ls, a4, Operand(index_)); | 2830 __ Branch(index_out_of_range_, ls, a4, Operand(index_)); |
2829 | 2831 |
(...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4949 MemOperand(fp, 6 * kPointerSize), | 4951 MemOperand(fp, 6 * kPointerSize), |
4950 NULL); | 4952 NULL); |
4951 } | 4953 } |
4952 | 4954 |
4953 | 4955 |
4954 #undef __ | 4956 #undef __ |
4955 | 4957 |
4956 } } // namespace v8::internal | 4958 } } // namespace v8::internal |
4957 | 4959 |
4958 #endif // V8_TARGET_ARCH_MIPS64 | 4960 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |