| 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 6646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6657 __ bind(&non_ascii); | 6657 __ bind(&non_ascii); |
| 6658 // At least one of the strings is two-byte. Check whether it happens | 6658 // At least one of the strings is two-byte. Check whether it happens |
| 6659 // to contain only ASCII characters. | 6659 // to contain only ASCII characters. |
| 6660 // t0: first instance type. | 6660 // t0: first instance type. |
| 6661 // t1: second instance type. | 6661 // t1: second instance type. |
| 6662 // Branch to if _both_ instances have kAsciiDataHintMask set. | 6662 // Branch to if _both_ instances have kAsciiDataHintMask set. |
| 6663 __ And(at, t0, Operand(kAsciiDataHintMask)); | 6663 __ And(at, t0, Operand(kAsciiDataHintMask)); |
| 6664 __ and_(at, at, t1); | 6664 __ and_(at, at, t1); |
| 6665 __ Branch(&ascii_data, ne, at, Operand(zero_reg)); | 6665 __ Branch(&ascii_data, ne, at, Operand(zero_reg)); |
| 6666 | 6666 |
| 6667 __ xor_(t0, t0, t1); | |
| 6668 STATIC_ASSERT(kOneByteStringTag != 0 && kAsciiDataHintTag != 0); | |
| 6669 __ And(t0, t0, Operand(kOneByteStringTag | kAsciiDataHintTag)); | |
| 6670 __ Branch( | |
| 6671 &ascii_data, eq, t0, Operand(kOneByteStringTag | kAsciiDataHintTag)); | |
| 6672 | |
| 6673 // Allocate a two byte cons string. | 6667 // Allocate a two byte cons string. |
| 6674 __ AllocateTwoByteConsString(v0, t2, t0, t1, &call_runtime); | 6668 __ AllocateTwoByteConsString(v0, t2, t0, t1, &call_runtime); |
| 6675 __ Branch(&allocated); | 6669 __ Branch(&allocated); |
| 6676 | 6670 |
| 6677 // We cannot encounter sliced strings or cons strings here since: | 6671 // We cannot encounter sliced strings or cons strings here since: |
| 6678 STATIC_ASSERT(SlicedString::kMinLength >= ConsString::kMinLength); | 6672 STATIC_ASSERT(SlicedString::kMinLength >= ConsString::kMinLength); |
| 6679 // Handle creating a flat result from either external or sequential strings. | 6673 // Handle creating a flat result from either external or sequential strings. |
| 6680 // Locate the first characters' locations. | 6674 // Locate the first characters' locations. |
| 6681 // a0: first string | 6675 // a0: first string |
| 6682 // a1: second string | 6676 // a1: second string |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7835 __ Pop(ra, t1, a1); | 7829 __ Pop(ra, t1, a1); |
| 7836 __ Ret(); | 7830 __ Ret(); |
| 7837 } | 7831 } |
| 7838 | 7832 |
| 7839 | 7833 |
| 7840 #undef __ | 7834 #undef __ |
| 7841 | 7835 |
| 7842 } } // namespace v8::internal | 7836 } } // namespace v8::internal |
| 7843 | 7837 |
| 7844 #endif // V8_TARGET_ARCH_MIPS | 7838 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |