src/share/vm/oops/methodOop.cpp

Print this page
rev 2073 : imported patch vcproj-64


1355   BytecodeTracer::set_closure(BytecodeTracer::std_closure());
1356   while (s.next() >= 0) BytecodeTracer::trace(mh, s.bcp(), st);
1357 }
1358 #endif // not PRODUCT
1359 
1360 
1361 // Simple compression of line number tables. We use a regular compressed stream, except that we compress deltas
1362 // between (bci,line) pairs since they are smaller. If (bci delta, line delta) fits in (5-bit unsigned, 3-bit unsigned)
1363 // we save it as one byte, otherwise we write a 0xFF escape character and use regular compression. 0x0 is used
1364 // as end-of-stream terminator.
1365 
1366 void CompressedLineNumberWriteStream::write_pair_regular(int bci_delta, int line_delta) {
1367   // bci and line number does not compress into single byte.
1368   // Write out escape character and use regular compression for bci and line number.
1369   write_byte((jubyte)0xFF);
1370   write_signed_int(bci_delta);
1371   write_signed_int(line_delta);
1372 }
1373 
1374 // See comment in methodOop.hpp which explains why this exists.
1375 #if defined(_M_AMD64) && MSC_VER >= 1400
1376 #pragma optimize("", off)
1377 void CompressedLineNumberWriteStream::write_pair(int bci, int line) {
1378   write_pair_inline(bci, line);
1379 }
1380 #pragma optimize("", on)
1381 #endif
1382 
1383 CompressedLineNumberReadStream::CompressedLineNumberReadStream(u_char* buffer) : CompressedReadStream(buffer) {
1384   _bci = 0;
1385   _line = 0;
1386 };
1387 
1388 
1389 bool CompressedLineNumberReadStream::read_pair() {
1390   jubyte next = read_byte();
1391   // Check for terminator
1392   if (next == 0) return false;
1393   if (next == 0xFF) {
1394     // Escape character, regular compression used
1395     _bci  += read_signed_int();




1355   BytecodeTracer::set_closure(BytecodeTracer::std_closure());
1356   while (s.next() >= 0) BytecodeTracer::trace(mh, s.bcp(), st);
1357 }
1358 #endif // not PRODUCT
1359 
1360 
1361 // Simple compression of line number tables. We use a regular compressed stream, except that we compress deltas
1362 // between (bci,line) pairs since they are smaller. If (bci delta, line delta) fits in (5-bit unsigned, 3-bit unsigned)
1363 // we save it as one byte, otherwise we write a 0xFF escape character and use regular compression. 0x0 is used
1364 // as end-of-stream terminator.
1365 
1366 void CompressedLineNumberWriteStream::write_pair_regular(int bci_delta, int line_delta) {
1367   // bci and line number does not compress into single byte.
1368   // Write out escape character and use regular compression for bci and line number.
1369   write_byte((jubyte)0xFF);
1370   write_signed_int(bci_delta);
1371   write_signed_int(line_delta);
1372 }
1373 
1374 // See comment in methodOop.hpp which explains why this exists.
1375 #if defined(_M_AMD64) && _MSC_VER >= 1400
1376 #pragma optimize("", off)
1377 void CompressedLineNumberWriteStream::write_pair(int bci, int line) {
1378   write_pair_inline(bci, line);
1379 }
1380 #pragma optimize("", on)
1381 #endif
1382 
1383 CompressedLineNumberReadStream::CompressedLineNumberReadStream(u_char* buffer) : CompressedReadStream(buffer) {
1384   _bci = 0;
1385   _line = 0;
1386 };
1387 
1388 
1389 bool CompressedLineNumberReadStream::read_pair() {
1390   jubyte next = read_byte();
1391   // Check for terminator
1392   if (next == 0) return false;
1393   if (next == 0xFF) {
1394     // Escape character, regular compression used
1395     _bci  += read_signed_int();