| 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 6289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6300 __ AllocateAsciiConsString(v0, t2, t0, t1, &call_runtime); | 6300 __ AllocateAsciiConsString(v0, t2, t0, t1, &call_runtime); |
| 6301 __ bind(&allocated); | 6301 __ bind(&allocated); |
| 6302 // Fill the fields of the cons string. | 6302 // Fill the fields of the cons string. |
| 6303 __ sw(a0, FieldMemOperand(v0, ConsString::kFirstOffset)); | 6303 __ sw(a0, FieldMemOperand(v0, ConsString::kFirstOffset)); |
| 6304 __ sw(a1, FieldMemOperand(v0, ConsString::kSecondOffset)); | 6304 __ sw(a1, FieldMemOperand(v0, ConsString::kSecondOffset)); |
| 6305 __ IncrementCounter(counters->string_add_native(), 1, a2, a3); | 6305 __ IncrementCounter(counters->string_add_native(), 1, a2, a3); |
| 6306 __ DropAndRet(2); | 6306 __ DropAndRet(2); |
| 6307 | 6307 |
| 6308 __ bind(&non_ascii); | 6308 __ bind(&non_ascii); |
| 6309 // At least one of the strings is two-byte. Check whether it happens | 6309 // At least one of the strings is two-byte. Check whether it happens |
| 6310 // to contain only ASCII characters. | 6310 // to contain only one byte characters. |
| 6311 // t0: first instance type. | 6311 // t0: first instance type. |
| 6312 // t1: second instance type. | 6312 // t1: second instance type. |
| 6313 // Branch to if _both_ instances have kAsciiDataHintMask set. | 6313 // Branch to if _both_ instances have kOneByteDataHintMask set. |
| 6314 __ And(at, t0, Operand(kAsciiDataHintMask)); | 6314 __ And(at, t0, Operand(kOneByteDataHintMask)); |
| 6315 __ and_(at, at, t1); | 6315 __ and_(at, at, t1); |
| 6316 __ Branch(&ascii_data, ne, at, Operand(zero_reg)); | 6316 __ Branch(&ascii_data, ne, at, Operand(zero_reg)); |
| 6317 __ Xor(t0, t0, Operand(t1)); | 6317 __ Xor(t0, t0, Operand(t1)); |
| 6318 STATIC_ASSERT(kOneByteStringTag != 0 && kAsciiDataHintTag != 0); | 6318 STATIC_ASSERT(kOneByteStringTag != 0 && kOneByteDataHintTag != 0); |
| 6319 __ And(t0, t0, Operand(kOneByteStringTag | kAsciiDataHintTag)); | 6319 __ And(t0, t0, Operand(kOneByteStringTag | kOneByteDataHintTag)); |
| 6320 __ Branch(&ascii_data, eq, t0, | 6320 __ Branch(&ascii_data, eq, t0, |
| 6321 Operand(kOneByteStringTag | kAsciiDataHintTag)); | 6321 Operand(kOneByteStringTag | kOneByteDataHintTag)); |
| 6322 | 6322 |
| 6323 // Allocate a two byte cons string. | 6323 // Allocate a two byte cons string. |
| 6324 __ AllocateTwoByteConsString(v0, t2, t0, t1, &call_runtime); | 6324 __ AllocateTwoByteConsString(v0, t2, t0, t1, &call_runtime); |
| 6325 __ Branch(&allocated); | 6325 __ Branch(&allocated); |
| 6326 | 6326 |
| 6327 // We cannot encounter sliced strings or cons strings here since: | 6327 // We cannot encounter sliced strings or cons strings here since: |
| 6328 STATIC_ASSERT(SlicedString::kMinLength >= ConsString::kMinLength); | 6328 STATIC_ASSERT(SlicedString::kMinLength >= ConsString::kMinLength); |
| 6329 // Handle creating a flat result from either external or sequential strings. | 6329 // Handle creating a flat result from either external or sequential strings. |
| 6330 // Locate the first characters' locations. | 6330 // Locate the first characters' locations. |
| 6331 // a0: first string | 6331 // a0: first string |
| (...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7750 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 7750 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 7751 } | 7751 } |
| 7752 } | 7752 } |
| 7753 | 7753 |
| 7754 | 7754 |
| 7755 #undef __ | 7755 #undef __ |
| 7756 | 7756 |
| 7757 } } // namespace v8::internal | 7757 } } // namespace v8::internal |
| 7758 | 7758 |
| 7759 #endif // V8_TARGET_ARCH_MIPS | 7759 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |