| 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 LinkRegisterStatus lr_status, | 509 LinkRegisterStatus lr_status, |
| 510 SaveFPRegsMode fp_mode, | 510 SaveFPRegsMode fp_mode, |
| 511 RememberedSetAction remembered_set_action, | 511 RememberedSetAction remembered_set_action, |
| 512 SmiCheck smi_check) { | 512 SmiCheck smi_check) { |
| 513 if (emit_debug_code()) { | 513 if (emit_debug_code()) { |
| 514 ldr(ip, MemOperand(address)); | 514 ldr(ip, MemOperand(address)); |
| 515 cmp(ip, value); | 515 cmp(ip, value); |
| 516 Check(eq, kWrongAddressOrValuePassedToRecordWrite); | 516 Check(eq, kWrongAddressOrValuePassedToRecordWrite); |
| 517 } | 517 } |
| 518 | 518 |
| 519 // Count number of write barriers in generated code. | |
| 520 isolate()->counters()->write_barriers_static()->Increment(); | |
| 521 // TODO(mstarzinger): Dynamic counter missing. | |
| 522 | |
| 523 // First, check if a write barrier is even needed. The tests below | |
| 524 // catch stores of smis and stores into the young generation. | |
| 525 Label done; | 519 Label done; |
| 526 | 520 |
| 527 if (smi_check == INLINE_SMI_CHECK) { | 521 if (smi_check == INLINE_SMI_CHECK) { |
| 528 JumpIfSmi(value, &done); | 522 JumpIfSmi(value, &done); |
| 529 } | 523 } |
| 530 | 524 |
| 531 CheckPageFlag(value, | 525 CheckPageFlag(value, |
| 532 value, // Used as scratch. | 526 value, // Used as scratch. |
| 533 MemoryChunk::kPointersToHereAreInterestingMask, | 527 MemoryChunk::kPointersToHereAreInterestingMask, |
| 534 eq, | 528 eq, |
| (...skipping 3521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4056 void CodePatcher::EmitCondition(Condition cond) { | 4050 void CodePatcher::EmitCondition(Condition cond) { |
| 4057 Instr instr = Assembler::instr_at(masm_.pc_); | 4051 Instr instr = Assembler::instr_at(masm_.pc_); |
| 4058 instr = (instr & ~kCondMask) | cond; | 4052 instr = (instr & ~kCondMask) | cond; |
| 4059 masm_.emit(instr); | 4053 masm_.emit(instr); |
| 4060 } | 4054 } |
| 4061 | 4055 |
| 4062 | 4056 |
| 4063 } } // namespace v8::internal | 4057 } } // namespace v8::internal |
| 4064 | 4058 |
| 4065 #endif // V8_TARGET_ARCH_ARM | 4059 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |