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 6480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6491 __ Ret(); | 6491 __ Ret(); |
6492 | 6492 |
6493 __ bind(&non_ascii); | 6493 __ bind(&non_ascii); |
6494 // At least one of the strings is two-byte. Check whether it happens | 6494 // At least one of the strings is two-byte. Check whether it happens |
6495 // to contain only ASCII characters. | 6495 // to contain only ASCII characters. |
6496 // r4: first instance type. | 6496 // r4: first instance type. |
6497 // r5: second instance type. | 6497 // r5: second instance type. |
6498 __ tst(r4, Operand(kAsciiDataHintMask)); | 6498 __ tst(r4, Operand(kAsciiDataHintMask)); |
6499 __ tst(r5, Operand(kAsciiDataHintMask), ne); | 6499 __ tst(r5, Operand(kAsciiDataHintMask), ne); |
6500 __ b(ne, &ascii_data); | 6500 __ b(ne, &ascii_data); |
6501 __ eor(r4, r4, Operand(r5)); | |
6502 STATIC_ASSERT(kOneByteStringTag != 0 && kAsciiDataHintTag != 0); | |
6503 __ and_(r4, r4, Operand(kOneByteStringTag | kAsciiDataHintTag)); | |
6504 __ cmp(r4, Operand(kOneByteStringTag | kAsciiDataHintTag)); | |
6505 __ b(eq, &ascii_data); | |
6506 | 6501 |
6507 // Allocate a two byte cons string. | 6502 // Allocate a two byte cons string. |
6508 __ AllocateTwoByteConsString(r7, r6, r4, r5, &call_runtime); | 6503 __ AllocateTwoByteConsString(r7, r6, r4, r5, &call_runtime); |
6509 __ jmp(&allocated); | 6504 __ jmp(&allocated); |
6510 | 6505 |
6511 // We cannot encounter sliced strings or cons strings here since: | 6506 // We cannot encounter sliced strings or cons strings here since: |
6512 STATIC_ASSERT(SlicedString::kMinLength >= ConsString::kMinLength); | 6507 STATIC_ASSERT(SlicedString::kMinLength >= ConsString::kMinLength); |
6513 // Handle creating a flat result from either external or sequential strings. | 6508 // Handle creating a flat result from either external or sequential strings. |
6514 // Locate the first characters' locations. | 6509 // Locate the first characters' locations. |
6515 // r0: first string | 6510 // r0: first string |
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7629 | 7624 |
7630 __ Pop(lr, r5, r1); | 7625 __ Pop(lr, r5, r1); |
7631 __ Ret(); | 7626 __ Ret(); |
7632 } | 7627 } |
7633 | 7628 |
7634 #undef __ | 7629 #undef __ |
7635 | 7630 |
7636 } } // namespace v8::internal | 7631 } } // namespace v8::internal |
7637 | 7632 |
7638 #endif // V8_TARGET_ARCH_ARM | 7633 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |