| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 | 432 |
| 433 // Skip barrier if writing a smi. | 433 // Skip barrier if writing a smi. |
| 434 if (smi_check == INLINE_SMI_CHECK) { | 434 if (smi_check == INLINE_SMI_CHECK) { |
| 435 JumpIfSmi(value, &done); | 435 JumpIfSmi(value, &done); |
| 436 } | 436 } |
| 437 | 437 |
| 438 // Although the object register is tagged, the offset is relative to the start | 438 // Although the object register is tagged, the offset is relative to the start |
| 439 // of the object, so so offset must be a multiple of kPointerSize. | 439 // of the object, so so offset must be a multiple of kPointerSize. |
| 440 ASSERT(IsAligned(offset, kPointerSize)); | 440 ASSERT(IsAligned(offset, kPointerSize)); |
| 441 | 441 |
| 442 add(dst, object, Operand(offset)); | 442 add(dst, object, Operand(offset - kHeapObjectTag)); |
| 443 if (emit_debug_code()) { | 443 if (emit_debug_code()) { |
| 444 Label ok; | 444 Label ok; |
| 445 JumpIfNotSmi(dst, &ok); | 445 tst(dst, Operand((1 << kPointerSizeLog2) - 1)); |
| 446 b(eq, &ok); |
| 446 stop("Unaligned cell in write barrier"); | 447 stop("Unaligned cell in write barrier"); |
| 447 bind(&ok); | 448 bind(&ok); |
| 448 } | 449 } |
| 449 | 450 |
| 450 RecordWrite(object, | 451 RecordWrite(object, |
| 451 dst, | 452 dst, |
| 452 value, | 453 value, |
| 453 lr_status, | 454 lr_status, |
| 454 save_fp, | 455 save_fp, |
| 455 remembered_set_action, | 456 remembered_set_action, |
| (...skipping 2921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3377 void CodePatcher::EmitCondition(Condition cond) { | 3378 void CodePatcher::EmitCondition(Condition cond) { |
| 3378 Instr instr = Assembler::instr_at(masm_.pc_); | 3379 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3379 instr = (instr & ~kCondMask) | cond; | 3380 instr = (instr & ~kCondMask) | cond; |
| 3380 masm_.emit(instr); | 3381 masm_.emit(instr); |
| 3381 } | 3382 } |
| 3382 | 3383 |
| 3383 | 3384 |
| 3384 } } // namespace v8::internal | 3385 } } // namespace v8::internal |
| 3385 | 3386 |
| 3386 #endif // V8_TARGET_ARCH_ARM | 3387 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |