OLD | NEW |
1 // Copyright (c) 2011 Sun Microsystems Inc. | 1 // Copyright (c) 2011 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 int rmode = extra_tag + RelocInfo::LAST_COMPACT_ENUM; | 511 int rmode = extra_tag + RelocInfo::LAST_COMPACT_ENUM; |
512 if (SetMode(static_cast<RelocInfo::Mode>(rmode))) return; | 512 if (SetMode(static_cast<RelocInfo::Mode>(rmode))) return; |
513 } | 513 } |
514 } | 514 } |
515 } | 515 } |
516 done_ = true; | 516 done_ = true; |
517 } | 517 } |
518 | 518 |
519 | 519 |
520 RelocIterator::RelocIterator(Code* code, int mode_mask) { | 520 RelocIterator::RelocIterator(Code* code, int mode_mask) { |
| 521 rinfo_.host_ = code; |
521 rinfo_.pc_ = code->instruction_start(); | 522 rinfo_.pc_ = code->instruction_start(); |
522 rinfo_.data_ = 0; | 523 rinfo_.data_ = 0; |
523 // Relocation info is read backwards. | 524 // Relocation info is read backwards. |
524 pos_ = code->relocation_start() + code->relocation_size(); | 525 pos_ = code->relocation_start() + code->relocation_size(); |
525 end_ = code->relocation_start(); | 526 end_ = code->relocation_start(); |
526 done_ = false; | 527 done_ = false; |
527 mode_mask_ = mode_mask; | 528 mode_mask_ = mode_mask; |
528 last_id_ = 0; | 529 last_id_ = 0; |
529 last_position_ = 0; | 530 last_position_ = 0; |
530 if (mode_mask_ == 0) pos_ = end_; | 531 if (mode_mask_ == 0) pos_ = end_; |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1237 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
1237 state_.written_position = state_.current_position; | 1238 state_.written_position = state_.current_position; |
1238 written = true; | 1239 written = true; |
1239 } | 1240 } |
1240 | 1241 |
1241 // Return whether something was written. | 1242 // Return whether something was written. |
1242 return written; | 1243 return written; |
1243 } | 1244 } |
1244 | 1245 |
1245 } } // namespace v8::internal | 1246 } } // namespace v8::internal |
OLD | NEW |