| OLD | NEW |
| (Empty) |
| 1 --- src/assembler.cc (revision 757) | |
| 2 +++ src/assembler.cc (working copy) | |
| 3 @@ -392,12 +392,16 @@ | |
| 4 RelocIterator::RelocIterator(Code* code, int mode_mask) { | |
| 5 rinfo_.pc_ = code->instruction_start(); | |
| 6 rinfo_.data_ = 0; | |
| 7 - // relocation info is read backwards | |
| 8 + // Relocation info is read backwards. | |
| 9 pos_ = code->relocation_start() + code->relocation_size(); | |
| 10 end_ = code->relocation_start(); | |
| 11 done_ = false; | |
| 12 mode_mask_ = mode_mask; | |
| 13 - if (mode_mask_ == 0) pos_ = end_; | |
| 14 + // Skip all relocation information if the mask is zero or if the | |
| 15 + // code has been deoptimized and thereby destructively patched. | |
| 16 + if (mode_mask_ == 0 || code->kind() == Code::DEOPTIMIZED_FUNCTION) { | |
| 17 + pos_ = end_; | |
| 18 + } | |
| 19 next(); | |
| 20 } | |
| 21 | |
| 22 @@ -405,7 +409,7 @@ | |
| 23 RelocIterator::RelocIterator(const CodeDesc& desc, int mode_mask) { | |
| 24 rinfo_.pc_ = desc.buffer; | |
| 25 rinfo_.data_ = 0; | |
| 26 - // relocation info is read backwards | |
| 27 + // Relocation info is read backwards. | |
| 28 pos_ = desc.buffer + desc.buffer_size; | |
| 29 end_ = pos_ - desc.reloc_size; | |
| 30 done_ = false; | |
| OLD | NEW |