OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 5912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5923 __ CompareRoot(r5, Heap::kEmptyStringRootIndex); | 5923 __ CompareRoot(r5, Heap::kEmptyStringRootIndex); |
5924 __ b(ne, &runtime); | 5924 __ b(ne, &runtime); |
5925 __ ldr(r5, FieldMemOperand(r0, ConsString::kFirstOffset)); | 5925 __ ldr(r5, FieldMemOperand(r0, ConsString::kFirstOffset)); |
5926 // Update instance type. | 5926 // Update instance type. |
5927 __ ldr(r1, FieldMemOperand(r5, HeapObject::kMapOffset)); | 5927 __ ldr(r1, FieldMemOperand(r5, HeapObject::kMapOffset)); |
5928 __ ldrb(r1, FieldMemOperand(r1, Map::kInstanceTypeOffset)); | 5928 __ ldrb(r1, FieldMemOperand(r1, Map::kInstanceTypeOffset)); |
5929 __ jmp(&underlying_unpacked); | 5929 __ jmp(&underlying_unpacked); |
5930 | 5930 |
5931 __ bind(&sliced_string); | 5931 __ bind(&sliced_string); |
5932 // Sliced string. Fetch parent and correct start index by offset. | 5932 // Sliced string. Fetch parent and correct start index by offset. |
| 5933 __ ldr(r5, FieldMemOperand(r0, SlicedString::kParentOffset)); |
5933 __ ldr(r4, FieldMemOperand(r0, SlicedString::kOffsetOffset)); | 5934 __ ldr(r4, FieldMemOperand(r0, SlicedString::kOffsetOffset)); |
5934 __ ldr(r5, FieldMemOperand(r0, SlicedString::kParentOffset)); | |
5935 __ add(r3, r3, Operand(r4, ASR, 1)); // Add offset to index. | 5935 __ add(r3, r3, Operand(r4, ASR, 1)); // Add offset to index. |
5936 // Update instance type. | 5936 // Update instance type. |
5937 __ ldr(r1, FieldMemOperand(r5, HeapObject::kMapOffset)); | 5937 __ ldr(r1, FieldMemOperand(r5, HeapObject::kMapOffset)); |
5938 __ ldrb(r1, FieldMemOperand(r1, Map::kInstanceTypeOffset)); | 5938 __ ldrb(r1, FieldMemOperand(r1, Map::kInstanceTypeOffset)); |
5939 __ jmp(&underlying_unpacked); | 5939 __ jmp(&underlying_unpacked); |
5940 | 5940 |
5941 __ bind(&seq_or_external_string); | 5941 __ bind(&seq_or_external_string); |
5942 // Sequential or external string. Just move string to the expected register. | 5942 // Sequential or external string. Just move string to the expected register. |
5943 __ mov(r5, r0); | 5943 __ mov(r5, r0); |
5944 | 5944 |
(...skipping 17 matching lines...) Expand all Loading... |
5962 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0); | 5962 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0); |
5963 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0); | 5963 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0); |
5964 __ tst(r1, Operand(kStringEncodingMask)); | 5964 __ tst(r1, Operand(kStringEncodingMask)); |
5965 __ b(eq, &two_byte_slice); | 5965 __ b(eq, &two_byte_slice); |
5966 __ AllocateAsciiSlicedString(r0, r2, r6, r7, &runtime); | 5966 __ AllocateAsciiSlicedString(r0, r2, r6, r7, &runtime); |
5967 __ jmp(&set_slice_header); | 5967 __ jmp(&set_slice_header); |
5968 __ bind(&two_byte_slice); | 5968 __ bind(&two_byte_slice); |
5969 __ AllocateTwoByteSlicedString(r0, r2, r6, r7, &runtime); | 5969 __ AllocateTwoByteSlicedString(r0, r2, r6, r7, &runtime); |
5970 __ bind(&set_slice_header); | 5970 __ bind(&set_slice_header); |
5971 __ mov(r3, Operand(r3, LSL, 1)); | 5971 __ mov(r3, Operand(r3, LSL, 1)); |
| 5972 __ str(r5, FieldMemOperand(r0, SlicedString::kParentOffset)); |
5972 __ str(r3, FieldMemOperand(r0, SlicedString::kOffsetOffset)); | 5973 __ str(r3, FieldMemOperand(r0, SlicedString::kOffsetOffset)); |
5973 __ str(r5, FieldMemOperand(r0, SlicedString::kParentOffset)); | |
5974 __ jmp(&return_r0); | 5974 __ jmp(&return_r0); |
5975 | 5975 |
5976 __ bind(©_routine); | 5976 __ bind(©_routine); |
5977 } | 5977 } |
5978 | 5978 |
5979 // r5: underlying subject string | 5979 // r5: underlying subject string |
5980 // r1: instance type of underlying subject string | 5980 // r1: instance type of underlying subject string |
5981 // r2: length | 5981 // r2: length |
5982 // r3: adjusted start index (untagged) | 5982 // r3: adjusted start index (untagged) |
5983 Label two_byte_sequential, sequential_string, allocate_result; | 5983 Label two_byte_sequential, sequential_string, allocate_result; |
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7394 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r2, | 7394 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r2, |
7395 &slow_elements); | 7395 &slow_elements); |
7396 __ Ret(); | 7396 __ Ret(); |
7397 } | 7397 } |
7398 | 7398 |
7399 #undef __ | 7399 #undef __ |
7400 | 7400 |
7401 } } // namespace v8::internal | 7401 } } // namespace v8::internal |
7402 | 7402 |
7403 #endif // V8_TARGET_ARCH_ARM | 7403 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |