1682 s.set_interval(from, to); |
1682 s.set_interval(from, to); |
1683 BytecodeTracer::set_closure(BytecodeTracer::std_closure()); |
1683 BytecodeTracer::set_closure(BytecodeTracer::std_closure()); |
1684 while (s.next() >= 0) BytecodeTracer::trace(mh, s.bcp(), st); |
1684 while (s.next() >= 0) BytecodeTracer::trace(mh, s.bcp(), st); |
1685 } |
1685 } |
1686 |
1686 |
1687 |
|
1688 // Simple compression of line number tables. We use a regular compressed stream, except that we compress deltas |
|
1689 // between (bci,line) pairs since they are smaller. If (bci delta, line delta) fits in (5-bit unsigned, 3-bit unsigned) |
|
1690 // we save it as one byte, otherwise we write a 0xFF escape character and use regular compression. 0x0 is used |
|
1691 // as end-of-stream terminator. |
|
1692 |
|
1693 void CompressedLineNumberWriteStream::write_pair_regular(int bci_delta, int line_delta) { |
|
1694 // bci and line number does not compress into single byte. |
|
1695 // Write out escape character and use regular compression for bci and line number. |
|
1696 write_byte((jubyte)0xFF); |
|
1697 write_signed_int(bci_delta); |
|
1698 write_signed_int(line_delta); |
|
1699 } |
|
1700 |
|
1701 // See comment in method.hpp which explains why this exists. |
|
1702 #if defined(_M_AMD64) && _MSC_VER >= 1400 |
|
1703 #pragma optimize("", off) |
|
1704 void CompressedLineNumberWriteStream::write_pair(int bci, int line) { |
|
1705 write_pair_inline(bci, line); |
|
1706 } |
|
1707 #pragma optimize("", on) |
|
1708 #endif |
|
1709 |
|
1710 CompressedLineNumberReadStream::CompressedLineNumberReadStream(u_char* buffer) : CompressedReadStream(buffer) { |
1687 CompressedLineNumberReadStream::CompressedLineNumberReadStream(u_char* buffer) : CompressedReadStream(buffer) { |
1711 _bci = 0; |
1688 _bci = 0; |
1712 _line = 0; |
1689 _line = 0; |
1713 }; |
1690 }; |
1714 |
|
1715 |
1691 |
1716 bool CompressedLineNumberReadStream::read_pair() { |
1692 bool CompressedLineNumberReadStream::read_pair() { |
1717 jubyte next = read_byte(); |
1693 jubyte next = read_byte(); |
1718 // Check for terminator |
1694 // Check for terminator |
1719 if (next == 0) return false; |
1695 if (next == 0) return false; |