| 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 5940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5951 STATIC_ASSERT(kTwoByteStringTag == 0); | 5951 STATIC_ASSERT(kTwoByteStringTag == 0); |
| 5952 __ tst(r4, Operand(kStringEncodingMask)); | 5952 __ tst(r4, Operand(kStringEncodingMask)); |
| 5953 __ tst(r5, Operand(kStringEncodingMask), ne); | 5953 __ tst(r5, Operand(kStringEncodingMask), ne); |
| 5954 __ b(eq, &non_ascii); | 5954 __ b(eq, &non_ascii); |
| 5955 | 5955 |
| 5956 // Allocate an ASCII cons string. | 5956 // Allocate an ASCII cons string. |
| 5957 __ bind(&ascii_data); | 5957 __ bind(&ascii_data); |
| 5958 __ AllocateAsciiConsString(r7, r6, r4, r5, &call_runtime); | 5958 __ AllocateAsciiConsString(r7, r6, r4, r5, &call_runtime); |
| 5959 __ bind(&allocated); | 5959 __ bind(&allocated); |
| 5960 // Fill the fields of the cons string. | 5960 // Fill the fields of the cons string. |
| 5961 Label skip_write_barrier, after_writing; |
| 5962 ExternalReference high_promotion_mode = ExternalReference:: |
| 5963 new_space_high_promotion_mode_active_address(masm->isolate()); |
| 5964 __ mov(r4, Operand(high_promotion_mode)); |
| 5965 __ ldr(r4, MemOperand(r4, 0)); |
| 5966 __ cmp(r4, Operand::Zero()); |
| 5967 __ b(eq, &skip_write_barrier); |
| 5968 |
| 5969 __ str(r0, FieldMemOperand(r7, ConsString::kFirstOffset)); |
| 5970 __ RecordWriteField(r7, |
| 5971 ConsString::kFirstOffset, |
| 5972 r0, |
| 5973 r4, |
| 5974 kLRHasNotBeenSaved, |
| 5975 kDontSaveFPRegs); |
| 5976 __ str(r1, FieldMemOperand(r7, ConsString::kSecondOffset)); |
| 5977 __ RecordWriteField(r7, |
| 5978 ConsString::kSecondOffset, |
| 5979 r1, |
| 5980 r4, |
| 5981 kLRHasNotBeenSaved, |
| 5982 kDontSaveFPRegs); |
| 5983 __ jmp(&after_writing); |
| 5984 |
| 5985 __ bind(&skip_write_barrier); |
| 5961 __ str(r0, FieldMemOperand(r7, ConsString::kFirstOffset)); | 5986 __ str(r0, FieldMemOperand(r7, ConsString::kFirstOffset)); |
| 5962 __ str(r1, FieldMemOperand(r7, ConsString::kSecondOffset)); | 5987 __ str(r1, FieldMemOperand(r7, ConsString::kSecondOffset)); |
| 5988 |
| 5989 __ bind(&after_writing); |
| 5990 |
| 5963 __ mov(r0, Operand(r7)); | 5991 __ mov(r0, Operand(r7)); |
| 5964 __ IncrementCounter(counters->string_add_native(), 1, r2, r3); | 5992 __ IncrementCounter(counters->string_add_native(), 1, r2, r3); |
| 5965 __ add(sp, sp, Operand(2 * kPointerSize)); | 5993 __ add(sp, sp, Operand(2 * kPointerSize)); |
| 5966 __ Ret(); | 5994 __ Ret(); |
| 5967 | 5995 |
| 5968 __ bind(&non_ascii); | 5996 __ bind(&non_ascii); |
| 5969 // At least one of the strings is two-byte. Check whether it happens | 5997 // At least one of the strings is two-byte. Check whether it happens |
| 5970 // to contain only one byte characters. | 5998 // to contain only one byte characters. |
| 5971 // r4: first instance type. | 5999 // r4: first instance type. |
| 5972 // r5: second instance type. | 6000 // r5: second instance type. |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6798 // and ElementsTransitionGenerator::GenerateDoubleToObject | 6826 // and ElementsTransitionGenerator::GenerateDoubleToObject |
| 6799 { REG(r2), REG(r3), REG(r9), EMIT_REMEMBERED_SET }, | 6827 { REG(r2), REG(r3), REG(r9), EMIT_REMEMBERED_SET }, |
| 6800 { REG(r2), REG(r3), REG(r9), OMIT_REMEMBERED_SET }, | 6828 { REG(r2), REG(r3), REG(r9), OMIT_REMEMBERED_SET }, |
| 6801 // ElementsTransitionGenerator::GenerateDoubleToObject | 6829 // ElementsTransitionGenerator::GenerateDoubleToObject |
| 6802 { REG(r6), REG(r2), REG(r0), EMIT_REMEMBERED_SET }, | 6830 { REG(r6), REG(r2), REG(r0), EMIT_REMEMBERED_SET }, |
| 6803 { REG(r2), REG(r6), REG(r9), EMIT_REMEMBERED_SET }, | 6831 { REG(r2), REG(r6), REG(r9), EMIT_REMEMBERED_SET }, |
| 6804 // StoreArrayLiteralElementStub::Generate | 6832 // StoreArrayLiteralElementStub::Generate |
| 6805 { REG(r5), REG(r0), REG(r6), EMIT_REMEMBERED_SET }, | 6833 { REG(r5), REG(r0), REG(r6), EMIT_REMEMBERED_SET }, |
| 6806 // FastNewClosureStub::Generate | 6834 // FastNewClosureStub::Generate |
| 6807 { REG(r2), REG(r4), REG(r1), EMIT_REMEMBERED_SET }, | 6835 { REG(r2), REG(r4), REG(r1), EMIT_REMEMBERED_SET }, |
| 6836 // StringAddStub::Generate |
| 6837 { REG(r7), REG(r1), REG(r4), EMIT_REMEMBERED_SET }, |
| 6838 { REG(r7), REG(r0), REG(r4), EMIT_REMEMBERED_SET }, |
| 6808 // Null termination. | 6839 // Null termination. |
| 6809 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET} | 6840 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET} |
| 6810 }; | 6841 }; |
| 6811 | 6842 |
| 6812 #undef REG | 6843 #undef REG |
| 6813 | 6844 |
| 6814 | 6845 |
| 6815 bool RecordWriteStub::IsPregenerated() { | 6846 bool RecordWriteStub::IsPregenerated() { |
| 6816 for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; | 6847 for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; |
| 6817 !entry->object.is(no_reg); | 6848 !entry->object.is(no_reg); |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7378 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 7409 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 7379 } | 7410 } |
| 7380 } | 7411 } |
| 7381 | 7412 |
| 7382 | 7413 |
| 7383 #undef __ | 7414 #undef __ |
| 7384 | 7415 |
| 7385 } } // namespace v8::internal | 7416 } } // namespace v8::internal |
| 7386 | 7417 |
| 7387 #endif // V8_TARGET_ARCH_ARM | 7418 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |