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 6589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6600 __ Ret(); | 6600 __ Ret(); |
6601 | 6601 |
6602 __ bind(&non_ascii); | 6602 __ bind(&non_ascii); |
6603 // At least one of the strings is two-byte. Check whether it happens | 6603 // At least one of the strings is two-byte. Check whether it happens |
6604 // to contain only ASCII characters. | 6604 // to contain only ASCII characters. |
6605 // r4: first instance type. | 6605 // r4: first instance type. |
6606 // r5: second instance type. | 6606 // r5: second instance type. |
6607 __ tst(r4, Operand(kAsciiDataHintMask)); | 6607 __ tst(r4, Operand(kAsciiDataHintMask)); |
6608 __ tst(r5, Operand(kAsciiDataHintMask), ne); | 6608 __ tst(r5, Operand(kAsciiDataHintMask), ne); |
6609 __ b(ne, &ascii_data); | 6609 __ b(ne, &ascii_data); |
6610 __ eor(r4, r4, Operand(r5)); | |
6611 STATIC_ASSERT(kOneByteStringTag != 0 && kAsciiDataHintTag != 0); | |
6612 __ and_(r4, r4, Operand(kOneByteStringTag | kAsciiDataHintTag)); | |
6613 __ cmp(r4, Operand(kOneByteStringTag | kAsciiDataHintTag)); | |
6614 __ b(eq, &ascii_data); | |
6615 | 6610 |
6616 // Allocate a two byte cons string. | 6611 // Allocate a two byte cons string. |
6617 __ AllocateTwoByteConsString(r7, r6, r4, r5, &call_runtime); | 6612 __ AllocateTwoByteConsString(r7, r6, r4, r5, &call_runtime); |
6618 __ jmp(&allocated); | 6613 __ jmp(&allocated); |
6619 | 6614 |
6620 // We cannot encounter sliced strings or cons strings here since: | 6615 // We cannot encounter sliced strings or cons strings here since: |
6621 STATIC_ASSERT(SlicedString::kMinLength >= ConsString::kMinLength); | 6616 STATIC_ASSERT(SlicedString::kMinLength >= ConsString::kMinLength); |
6622 // Handle creating a flat result from either external or sequential strings. | 6617 // Handle creating a flat result from either external or sequential strings. |
6623 // Locate the first characters' locations. | 6618 // Locate the first characters' locations. |
6624 // r0: first string | 6619 // r0: first string |
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7757 | 7752 |
7758 __ Pop(lr, r5, r1); | 7753 __ Pop(lr, r5, r1); |
7759 __ Ret(); | 7754 __ Ret(); |
7760 } | 7755 } |
7761 | 7756 |
7762 #undef __ | 7757 #undef __ |
7763 | 7758 |
7764 } } // namespace v8::internal | 7759 } } // namespace v8::internal |
7765 | 7760 |
7766 #endif // V8_TARGET_ARCH_ARM | 7761 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |