< prev index next >
src/share/vm/oops/generateOopMap.cpp
Print this page
*** 235,244 ****
--- 235,246 ----
add_jsr(i.next_bci(), i.dest());
break;
case Bytecodes::_jsr_w:
add_jsr(i.next_bci(), i.dest_w());
break;
+ default:
+ break;
}
}
}
void RetTable::add_jsr(int return_bci, int target_bci) {
*** 428,437 ****
--- 430,441 ----
break;
case Bytecodes::_jsr_w:
assert(!fellThrough, "should not happen");
bb_mark_fct(this, bci + Bytecodes::length_for(bytecode), NULL);
break;
+ default:
+ break;
}
if (possible_gc_point(&bcs))
_gc_points++;
}
*** 487,496 ****
--- 491,502 ----
case Bytecodes::_jsr:
case Bytecodes::_jsr_w:
assert(!fell_through, "should not happen");
reachable_basicblock(this, bci + Bytecodes::length_for(bytecode), &change);
break;
+ default:
+ break;
}
if (fell_through) {
// Mark successor as alive
if (bb[1].is_dead()) {
bb[1].mark_as_alive();
*** 1185,1194 ****
--- 1191,1203 ----
// could throw an exception.
if (_monitor_top != bad_monitors && _monitor_top != 0) {
return;
}
break;
+
+ default:
+ break;
}
if (_has_exceptions) {
int bci = itr->bci();
ExceptionTable exct(method());
*** 1270,1331 ****
// Print the state values at the current bytecode.
void GenerateOopMap::print_current_state(outputStream *os,
BytecodeStream *currentBC,
bool detailed) {
-
if (detailed) {
os->print(" %4d vars = ", currentBC->bci());
print_states(os, vars(), _max_locals);
os->print(" %s", Bytecodes::name(currentBC->code()));
switch(currentBC->code()) {
case Bytecodes::_invokevirtual:
case Bytecodes::_invokespecial:
case Bytecodes::_invokestatic:
case Bytecodes::_invokedynamic:
! case Bytecodes::_invokeinterface:
int idx = currentBC->has_index_u4() ? currentBC->get_index_u4() : currentBC->get_index_u2_cpcache();
ConstantPool* cp = method()->constants();
int nameAndTypeIdx = cp->name_and_type_ref_index_at(idx);
int signatureIdx = cp->signature_ref_index_at(nameAndTypeIdx);
Symbol* signature = cp->symbol_at(signatureIdx);
os->print("%s", signature->as_C_string());
}
os->cr();
os->print(" stack = ");
print_states(os, stack(), _stack_top);
os->cr();
if (_monitor_top != bad_monitors) {
os->print(" monitors = ");
print_states(os, monitors(), _monitor_top);
} else {
os->print(" [bad monitor stack]");
}
- os->cr();
- } else {
- os->print(" %4d vars = '%s' ", currentBC->bci(), state_vec_to_string(vars(), _max_locals));
- os->print(" stack = '%s' ", state_vec_to_string(stack(), _stack_top));
- if (_monitor_top != bad_monitors) {
- os->print(" monitors = '%s' \t%s", state_vec_to_string(monitors(), _monitor_top), Bytecodes::name(currentBC->code()));
- } else {
- os->print(" [bad monitor stack]");
- }
- switch(currentBC->code()) {
- case Bytecodes::_invokevirtual:
- case Bytecodes::_invokespecial:
- case Bytecodes::_invokestatic:
- case Bytecodes::_invokedynamic:
- case Bytecodes::_invokeinterface:
- int idx = currentBC->has_index_u4() ? currentBC->get_index_u4() : currentBC->get_index_u2_cpcache();
- ConstantPool* cp = method()->constants();
- int nameAndTypeIdx = cp->name_and_type_ref_index_at(idx);
- int signatureIdx = cp->signature_ref_index_at(nameAndTypeIdx);
- Symbol* signature = cp->symbol_at(signatureIdx);
- os->print("%s", signature->as_C_string());
}
os->cr();
- }
}
// Sets the current state to be the state after executing the
// current instruction, starting in the current state.
void GenerateOopMap::interp1(BytecodeStream *itr) {
--- 1279,1333 ----
// Print the state values at the current bytecode.
void GenerateOopMap::print_current_state(outputStream *os,
BytecodeStream *currentBC,
bool detailed) {
if (detailed) {
os->print(" %4d vars = ", currentBC->bci());
print_states(os, vars(), _max_locals);
os->print(" %s", Bytecodes::name(currentBC->code()));
+ } else {
+ os->print(" %4d vars = '%s' ", currentBC->bci(), state_vec_to_string(vars(), _max_locals));
+ os->print(" stack = '%s' ", state_vec_to_string(stack(), _stack_top));
+ if (_monitor_top != bad_monitors) {
+ os->print(" monitors = '%s' \t%s", state_vec_to_string(monitors(), _monitor_top), Bytecodes::name(currentBC->code()));
+ } else {
+ os->print(" [bad monitor stack]");
+ }
+ }
+
switch(currentBC->code()) {
case Bytecodes::_invokevirtual:
case Bytecodes::_invokespecial:
case Bytecodes::_invokestatic:
case Bytecodes::_invokedynamic:
! case Bytecodes::_invokeinterface: {
int idx = currentBC->has_index_u4() ? currentBC->get_index_u4() : currentBC->get_index_u2_cpcache();
ConstantPool* cp = method()->constants();
int nameAndTypeIdx = cp->name_and_type_ref_index_at(idx);
int signatureIdx = cp->signature_ref_index_at(nameAndTypeIdx);
Symbol* signature = cp->symbol_at(signatureIdx);
os->print("%s", signature->as_C_string());
}
+ default:
+ break;
+ }
+
+ if (detailed) {
os->cr();
os->print(" stack = ");
print_states(os, stack(), _stack_top);
os->cr();
if (_monitor_top != bad_monitors) {
os->print(" monitors = ");
print_states(os, monitors(), _monitor_top);
} else {
os->print(" [bad monitor stack]");
}
}
+
os->cr();
}
// Sets the current state to be the state after executing the
// current instruction, starting in the current state.
void GenerateOopMap::interp1(BytecodeStream *itr) {
*** 2474,2485 ****
*index = bc - Bytecodes::_astore_0;
return true;
case Bytecodes::_astore:
*index = itr->get_index();
return true;
! }
return false;
}
bool GenerateOopMap::is_aload(BytecodeStream *itr, int *index) {
Bytecodes::Code bc = itr->code();
switch(bc) {
--- 2476,2488 ----
*index = bc - Bytecodes::_astore_0;
return true;
case Bytecodes::_astore:
*index = itr->get_index();
return true;
! default:
return false;
+ }
}
bool GenerateOopMap::is_aload(BytecodeStream *itr, int *index) {
Bytecodes::Code bc = itr->code();
switch(bc) {
*** 2491,2502 ****
return true;
case Bytecodes::_aload:
*index = itr->get_index();
return true;
! }
return false;
}
// Return true iff the top of the operand stack holds a return address at
// the current instruction
--- 2494,2507 ----
return true;
case Bytecodes::_aload:
*index = itr->get_index();
return true;
!
! default:
return false;
+ }
}
// Return true iff the top of the operand stack holds a return address at
// the current instruction
< prev index next >