OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 WriteExtraTaggedPC(pc_delta, kPCJumpExtraTag); | 504 WriteExtraTaggedPC(pc_delta, kPCJumpExtraTag); |
505 WriteExtraTaggedData(rinfo->data(), kCommentTag); | 505 WriteExtraTaggedData(rinfo->data(), kCommentTag); |
506 DCHECK(begin_pos - pos_ >= RelocInfo::kMinRelocCommentSize); | 506 DCHECK(begin_pos - pos_ >= RelocInfo::kMinRelocCommentSize); |
507 } else if (RelocInfo::IsConstPool(rmode) || RelocInfo::IsVeneerPool(rmode)) { | 507 } else if (RelocInfo::IsConstPool(rmode) || RelocInfo::IsVeneerPool(rmode)) { |
508 WriteExtraTaggedPC(pc_delta, kPCJumpExtraTag); | 508 WriteExtraTaggedPC(pc_delta, kPCJumpExtraTag); |
509 WriteExtraTaggedPoolData(static_cast<int>(rinfo->data()), | 509 WriteExtraTaggedPoolData(static_cast<int>(rinfo->data()), |
510 RelocInfo::IsConstPool(rmode) ? kConstPoolTag | 510 RelocInfo::IsConstPool(rmode) ? kConstPoolTag |
511 : kVeneerPoolTag); | 511 : kVeneerPoolTag); |
512 } else { | 512 } else { |
513 DCHECK(rmode > RelocInfo::LAST_COMPACT_ENUM); | 513 DCHECK(rmode > RelocInfo::LAST_COMPACT_ENUM); |
514 int saved_mode = rmode - RelocInfo::LAST_COMPACT_ENUM; | 514 int saved_mode = rmode - RelocInfo::LAST_COMPACT_ENUM - 1; |
515 // For all other modes we simply use the mode as the extra tag. | 515 // For all other modes we simply use the mode as the extra tag. |
516 // None of these modes need a data component. | 516 // None of these modes need a data component. |
517 DCHECK(saved_mode < kPoolExtraTag); | 517 DCHECK(saved_mode < kPoolExtraTag); |
518 WriteExtraTaggedPC(pc_delta, saved_mode); | 518 WriteExtraTaggedPC(pc_delta, saved_mode); |
519 } | 519 } |
520 last_pc_ = rinfo->pc(); | 520 last_pc_ = rinfo->pc(); |
521 last_mode_ = rmode; | 521 last_mode_ = rmode; |
522 #ifdef DEBUG | 522 #ifdef DEBUG |
523 DCHECK(begin_pos - pos_ <= kMaxSize); | 523 DCHECK(begin_pos - pos_ <= kMaxSize); |
524 #endif | 524 #endif |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 DCHECK(pool_type == kConstPoolTag || pool_type == kVeneerPoolTag); | 714 DCHECK(pool_type == kConstPoolTag || pool_type == kVeneerPoolTag); |
715 RelocInfo::Mode rmode = (pool_type == kConstPoolTag) ? | 715 RelocInfo::Mode rmode = (pool_type == kConstPoolTag) ? |
716 RelocInfo::CONST_POOL : RelocInfo::VENEER_POOL; | 716 RelocInfo::CONST_POOL : RelocInfo::VENEER_POOL; |
717 if (SetMode(rmode)) { | 717 if (SetMode(rmode)) { |
718 AdvanceReadPoolData(); | 718 AdvanceReadPoolData(); |
719 return; | 719 return; |
720 } | 720 } |
721 Advance(kIntSize); | 721 Advance(kIntSize); |
722 } else { | 722 } else { |
723 AdvanceReadPC(); | 723 AdvanceReadPC(); |
724 int rmode = extra_tag + RelocInfo::LAST_COMPACT_ENUM; | 724 int rmode = extra_tag + RelocInfo::LAST_COMPACT_ENUM + 1; |
725 if (SetMode(static_cast<RelocInfo::Mode>(rmode))) return; | 725 if (SetMode(static_cast<RelocInfo::Mode>(rmode))) return; |
726 } | 726 } |
727 } | 727 } |
728 } | 728 } |
729 if (code_age_sequence_ != NULL) { | 729 if (code_age_sequence_ != NULL) { |
730 byte* old_code_age_sequence = code_age_sequence_; | 730 byte* old_code_age_sequence = code_age_sequence_; |
731 code_age_sequence_ = NULL; | 731 code_age_sequence_ = NULL; |
732 if (SetMode(RelocInfo::CODE_AGE_SEQUENCE)) { | 732 if (SetMode(RelocInfo::CODE_AGE_SEQUENCE)) { |
733 rinfo_.data_ = 0; | 733 rinfo_.data_ = 0; |
734 rinfo_.pc_ = old_code_age_sequence; | 734 rinfo_.pc_ = old_code_age_sequence; |
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 RecordRelocInfo(RelocInfo::JS_RETURN); | 1674 RecordRelocInfo(RelocInfo::JS_RETURN); |
1675 } | 1675 } |
1676 | 1676 |
1677 | 1677 |
1678 void Assembler::RecordDebugBreakSlot() { | 1678 void Assembler::RecordDebugBreakSlot() { |
1679 positions_recorder()->WriteRecordedPositions(); | 1679 positions_recorder()->WriteRecordedPositions(); |
1680 EnsureSpace ensure_space(this); | 1680 EnsureSpace ensure_space(this); |
1681 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); | 1681 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); |
1682 } | 1682 } |
1683 } } // namespace v8::internal | 1683 } } // namespace v8::internal |
OLD | NEW |