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 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 | 1610 |
1611 bool PositionsRecorder::WriteRecordedPositions() { | 1611 bool PositionsRecorder::WriteRecordedPositions() { |
1612 bool written = false; | 1612 bool written = false; |
1613 | 1613 |
1614 // Write the statement position if it is different from what was written last | 1614 // Write the statement position if it is different from what was written last |
1615 // time. | 1615 // time. |
1616 if (state_.current_statement_position != state_.written_statement_position) { | 1616 if (state_.current_statement_position != state_.written_statement_position) { |
1617 EnsureSpace ensure_space(assembler_); | 1617 EnsureSpace ensure_space(assembler_); |
1618 assembler_->RecordRelocInfo(RelocInfo::STATEMENT_POSITION, | 1618 assembler_->RecordRelocInfo(RelocInfo::STATEMENT_POSITION, |
1619 state_.current_statement_position); | 1619 state_.current_statement_position); |
| 1620 state_.written_position = state_.current_statement_position; |
| 1621 state_.written_statement_position = state_.current_statement_position; |
1620 written = true; | 1622 written = true; |
1621 } | 1623 } |
1622 state_.written_statement_position = state_.current_statement_position; | |
1623 | 1624 |
1624 // Write the position if it is different from what was written last time and | 1625 // Write the position if it is different from what was written last time and |
1625 // also different from the statement position that was just written. | 1626 // also different from the statement position that was just written. |
1626 if (state_.current_position != state_.written_position && | 1627 if (state_.current_position != state_.written_position) { |
1627 (state_.current_position != state_.written_statement_position || | |
1628 !written)) { | |
1629 EnsureSpace ensure_space(assembler_); | 1628 EnsureSpace ensure_space(assembler_); |
1630 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1629 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1630 state_.written_position = state_.current_position; |
1631 written = true; | 1631 written = true; |
1632 } | 1632 } |
1633 state_.written_position = state_.current_position; | |
1634 | 1633 |
1635 // Return whether something was written. | 1634 // Return whether something was written. |
1636 return written; | 1635 return written; |
1637 } | 1636 } |
1638 | 1637 |
1639 | 1638 |
1640 ConstantPoolBuilder::ConstantPoolBuilder(int ptr_reach_bits, | 1639 ConstantPoolBuilder::ConstantPoolBuilder(int ptr_reach_bits, |
1641 int double_reach_bits) { | 1640 int double_reach_bits) { |
1642 info_[ConstantPoolEntry::INTPTR].entries.reserve(64); | 1641 info_[ConstantPoolEntry::INTPTR].entries.reserve(64); |
1643 info_[ConstantPoolEntry::INTPTR].regular_reach_bits = ptr_reach_bits; | 1642 info_[ConstantPoolEntry::INTPTR].regular_reach_bits = ptr_reach_bits; |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 | 1861 |
1863 | 1862 |
1864 void Assembler::RecordJSReturn() { | 1863 void Assembler::RecordJSReturn() { |
1865 positions_recorder()->WriteRecordedPositions(); | 1864 positions_recorder()->WriteRecordedPositions(); |
1866 EnsureSpace ensure_space(this); | 1865 EnsureSpace ensure_space(this); |
1867 RecordRelocInfo(RelocInfo::JS_RETURN); | 1866 RecordRelocInfo(RelocInfo::JS_RETURN); |
1868 } | 1867 } |
1869 | 1868 |
1870 | 1869 |
1871 void Assembler::RecordDebugBreakSlot() { | 1870 void Assembler::RecordDebugBreakSlot() { |
1872 positions_recorder()->WriteRecordedPositions(); | |
1873 EnsureSpace ensure_space(this); | 1871 EnsureSpace ensure_space(this); |
1874 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); | 1872 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); |
1875 } | 1873 } |
1876 | 1874 |
1877 | 1875 |
1878 void Assembler::DataAlign(int m) { | 1876 void Assembler::DataAlign(int m) { |
1879 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1877 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
1880 while ((pc_offset() & (m - 1)) != 0) { | 1878 while ((pc_offset() & (m - 1)) != 0) { |
1881 db(0); | 1879 db(0); |
1882 } | 1880 } |
1883 } | 1881 } |
1884 } // namespace internal | 1882 } // namespace internal |
1885 } // namespace v8 | 1883 } // namespace v8 |
OLD | NEW |