// ------------------------------------------------------------------ // ciBytecodeStream::force_bci void ciBytecodeStream::force_bci(int bci) { if (bci < 0) { reset_to_bci(0); _bc_start = _start + bci; _bc = EOBC(); } else { reset_to_bci(bci); next(); } }
// Return current ByteCode and increment PC to next bytecode, skipping all // intermediate constants. Returns EOBC at end. // Expected usage: // while( (bc = iter.next()) != EOBC() ) { ... } Bytecodes::Code next() { _bc_start = _pc; // Capture start of bc if( _pc >= _end ) return EOBC(); // End-Of-Bytecodes // Fetch Java bytecode // All rewritten bytecodes maintain the size of original bytecode. _bc = Bytecodes::java_code(_raw_bc = (Bytecodes::Code)*_pc); int csize = Bytecodes::length_for(_bc); // Expected size _pc += csize; // Bump PC past bytecode if (csize == 0) { _bc = next_wide_or_table(_bc); } return check_java(_bc); }
// Return current ByteCode and increment PC to next bytecode, skipping all // intermediate constants. Returns EOBC at end. // Expected usage: // while( (bc = iter.next()) != EOBC() ) { ... } Bytecodes::Code next() { _bc_start = _pc; // Capture start of bc if( _pc >= _end ) return EOBC(); // End-Of-Bytecodes // Fetch Java bytecode // All rewritten bytecodes maintain the size of original bytecode. _bc = Bytecodes::java_code((Bytecodes::Code)*_pc); int csize = Bytecodes::length_for(_bc); // Expected size if( _bc == Bytecodes::_wide ) { _bc=wide(); // Handle wide bytecode } else if( csize == 0 ) { _bc=table(_bc); // Handle inline tables } else { _pc += csize; // Bump PC past bytecode } return check_java(_bc); }