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 6299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6310 // Branch to non_ascii if either string-encoding field is zero (non-ASCII). | 6310 // Branch to non_ascii if either string-encoding field is zero (non-ASCII). |
6311 __ And(t4, t0, Operand(t1)); | 6311 __ And(t4, t0, Operand(t1)); |
6312 __ And(t4, t4, Operand(kStringEncodingMask)); | 6312 __ And(t4, t4, Operand(kStringEncodingMask)); |
6313 __ Branch(&non_ascii, eq, t4, Operand(zero_reg)); | 6313 __ Branch(&non_ascii, eq, t4, Operand(zero_reg)); |
6314 | 6314 |
6315 // Allocate an ASCII cons string. | 6315 // Allocate an ASCII cons string. |
6316 __ bind(&ascii_data); | 6316 __ bind(&ascii_data); |
6317 __ AllocateAsciiConsString(v0, t2, t0, t1, &call_runtime); | 6317 __ AllocateAsciiConsString(v0, t2, t0, t1, &call_runtime); |
6318 __ bind(&allocated); | 6318 __ bind(&allocated); |
6319 // Fill the fields of the cons string. | 6319 // Fill the fields of the cons string. |
| 6320 Label skip_write_barrier, after_writing; |
| 6321 ExternalReference high_promotion_mode = ExternalReference:: |
| 6322 new_space_high_promotion_mode_active_address(masm->isolate()); |
| 6323 __ li(t0, Operand(high_promotion_mode)); |
| 6324 __ lw(t0, MemOperand(t0, 0)); |
| 6325 __ Branch(&skip_write_barrier, eq, t0, Operand(zero_reg)); |
| 6326 |
| 6327 __ mov(t3, v0); |
| 6328 __ sw(a0, FieldMemOperand(t3, ConsString::kFirstOffset)); |
| 6329 __ RecordWriteField(t3, |
| 6330 ConsString::kFirstOffset, |
| 6331 a0, |
| 6332 t0, |
| 6333 kRAHasNotBeenSaved, |
| 6334 kDontSaveFPRegs); |
| 6335 __ sw(a1, FieldMemOperand(t3, ConsString::kSecondOffset)); |
| 6336 __ RecordWriteField(t3, |
| 6337 ConsString::kSecondOffset, |
| 6338 a1, |
| 6339 t0, |
| 6340 kRAHasNotBeenSaved, |
| 6341 kDontSaveFPRegs); |
| 6342 __ jmp(&after_writing); |
| 6343 |
| 6344 __ bind(&skip_write_barrier); |
6320 __ sw(a0, FieldMemOperand(v0, ConsString::kFirstOffset)); | 6345 __ sw(a0, FieldMemOperand(v0, ConsString::kFirstOffset)); |
6321 __ sw(a1, FieldMemOperand(v0, ConsString::kSecondOffset)); | 6346 __ sw(a1, FieldMemOperand(v0, ConsString::kSecondOffset)); |
| 6347 |
| 6348 __ bind(&after_writing); |
| 6349 |
6322 __ IncrementCounter(counters->string_add_native(), 1, a2, a3); | 6350 __ IncrementCounter(counters->string_add_native(), 1, a2, a3); |
6323 __ DropAndRet(2); | 6351 __ DropAndRet(2); |
6324 | 6352 |
6325 __ bind(&non_ascii); | 6353 __ bind(&non_ascii); |
6326 // At least one of the strings is two-byte. Check whether it happens | 6354 // At least one of the strings is two-byte. Check whether it happens |
6327 // to contain only one byte characters. | 6355 // to contain only one byte characters. |
6328 // t0: first instance type. | 6356 // t0: first instance type. |
6329 // t1: second instance type. | 6357 // t1: second instance type. |
6330 // Branch to if _both_ instances have kOneByteDataHintMask set. | 6358 // Branch to if _both_ instances have kOneByteDataHintMask set. |
6331 __ And(at, t0, Operand(kOneByteDataHintMask)); | 6359 __ And(at, t0, Operand(kOneByteDataHintMask)); |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7191 // and ElementsTransitionGenerator::GenerateDoubleToObject | 7219 // and ElementsTransitionGenerator::GenerateDoubleToObject |
7192 { REG(a2), REG(a3), REG(t5), EMIT_REMEMBERED_SET }, | 7220 { REG(a2), REG(a3), REG(t5), EMIT_REMEMBERED_SET }, |
7193 { REG(a2), REG(a3), REG(t5), OMIT_REMEMBERED_SET }, | 7221 { REG(a2), REG(a3), REG(t5), OMIT_REMEMBERED_SET }, |
7194 // ElementsTransitionGenerator::GenerateDoubleToObject | 7222 // ElementsTransitionGenerator::GenerateDoubleToObject |
7195 { REG(t2), REG(a2), REG(a0), EMIT_REMEMBERED_SET }, | 7223 { REG(t2), REG(a2), REG(a0), EMIT_REMEMBERED_SET }, |
7196 { REG(a2), REG(t2), REG(t5), EMIT_REMEMBERED_SET }, | 7224 { REG(a2), REG(t2), REG(t5), EMIT_REMEMBERED_SET }, |
7197 // StoreArrayLiteralElementStub::Generate | 7225 // StoreArrayLiteralElementStub::Generate |
7198 { REG(t1), REG(a0), REG(t2), EMIT_REMEMBERED_SET }, | 7226 { REG(t1), REG(a0), REG(t2), EMIT_REMEMBERED_SET }, |
7199 // FastNewClosureStub::Generate | 7227 // FastNewClosureStub::Generate |
7200 { REG(a2), REG(t0), REG(a1), EMIT_REMEMBERED_SET }, | 7228 { REG(a2), REG(t0), REG(a1), EMIT_REMEMBERED_SET }, |
| 7229 // StringAddStub::Generate |
| 7230 { REG(t3), REG(a1), REG(t0), EMIT_REMEMBERED_SET }, |
| 7231 { REG(t3), REG(a0), REG(t0), EMIT_REMEMBERED_SET }, |
7201 // Null termination. | 7232 // Null termination. |
7202 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET} | 7233 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET} |
7203 }; | 7234 }; |
7204 | 7235 |
7205 #undef REG | 7236 #undef REG |
7206 | 7237 |
7207 | 7238 |
7208 bool RecordWriteStub::IsPregenerated() { | 7239 bool RecordWriteStub::IsPregenerated() { |
7209 for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; | 7240 for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; |
7210 !entry->object.is(no_reg); | 7241 !entry->object.is(no_reg); |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7767 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 7798 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
7768 } | 7799 } |
7769 } | 7800 } |
7770 | 7801 |
7771 | 7802 |
7772 #undef __ | 7803 #undef __ |
7773 | 7804 |
7774 } } // namespace v8::internal | 7805 } } // namespace v8::internal |
7775 | 7806 |
7776 #endif // V8_TARGET_ARCH_MIPS | 7807 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |