mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
7172843: C1: fix "assert(has_printable_bci()) failed: _printable_bci should have been set"
Reviewed-by: twisti
This commit is contained in:
parent
687fab1763
commit
20b16ea7aa
2 changed files with 12 additions and 5 deletions
|
@ -42,6 +42,11 @@ void Canonicalizer::set_canonical(Value x) {
|
||||||
// the instruction stream (because the instruction list is embedded
|
// the instruction stream (because the instruction list is embedded
|
||||||
// in the instructions).
|
// in the instructions).
|
||||||
if (canonical() != x) {
|
if (canonical() != x) {
|
||||||
|
#ifndef PRODUCT
|
||||||
|
if (!x->has_printable_bci()) {
|
||||||
|
x->set_printable_bci(bci());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (PrintCanonicalization) {
|
if (PrintCanonicalization) {
|
||||||
PrintValueVisitor do_print_value;
|
PrintValueVisitor do_print_value;
|
||||||
canonical()->input_values_do(&do_print_value);
|
canonical()->input_values_do(&do_print_value);
|
||||||
|
@ -677,8 +682,8 @@ void Canonicalizer::do_If(If* x) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set_canonical(canon);
|
|
||||||
set_bci(cmp->state_before()->bci());
|
set_bci(cmp->state_before()->bci());
|
||||||
|
set_canonical(canon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (l->as_InstanceOf() != NULL) {
|
} else if (l->as_InstanceOf() != NULL) {
|
||||||
|
|
|
@ -302,8 +302,6 @@ class Instruction: public CompilationResourceObj {
|
||||||
|
|
||||||
void update_exception_state(ValueStack* state);
|
void update_exception_state(ValueStack* state);
|
||||||
|
|
||||||
bool has_printable_bci() const { return NOT_PRODUCT(_printable_bci != -99) PRODUCT_ONLY(false); }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void set_type(ValueType* type) {
|
void set_type(ValueType* type) {
|
||||||
assert(type != NULL, "type must exist");
|
assert(type != NULL, "type must exist");
|
||||||
|
@ -392,8 +390,9 @@ class Instruction: public CompilationResourceObj {
|
||||||
// accessors
|
// accessors
|
||||||
int id() const { return _id; }
|
int id() const { return _id; }
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
|
bool has_printable_bci() const { return _printable_bci != -99; }
|
||||||
int printable_bci() const { assert(has_printable_bci(), "_printable_bci should have been set"); return _printable_bci; }
|
int printable_bci() const { assert(has_printable_bci(), "_printable_bci should have been set"); return _printable_bci; }
|
||||||
void set_printable_bci(int bci) { NOT_PRODUCT(_printable_bci = bci;) }
|
void set_printable_bci(int bci) { _printable_bci = bci; }
|
||||||
#endif
|
#endif
|
||||||
int use_count() const { return _use_count; }
|
int use_count() const { return _use_count; }
|
||||||
int pin_state() const { return _pin_state; }
|
int pin_state() const { return _pin_state; }
|
||||||
|
@ -576,6 +575,7 @@ LEAF(Phi, Instruction)
|
||||||
, _block(b)
|
, _block(b)
|
||||||
, _index(index)
|
, _index(index)
|
||||||
{
|
{
|
||||||
|
NOT_PRODUCT(set_printable_bci(Value(b)->printable_bci()));
|
||||||
if (type->is_illegal()) {
|
if (type->is_illegal()) {
|
||||||
make_illegal();
|
make_illegal();
|
||||||
}
|
}
|
||||||
|
@ -631,7 +631,9 @@ LEAF(Local, Instruction)
|
||||||
: Instruction(type)
|
: Instruction(type)
|
||||||
, _java_index(index)
|
, _java_index(index)
|
||||||
, _declared_type(declared)
|
, _declared_type(declared)
|
||||||
{}
|
{
|
||||||
|
NOT_PRODUCT(set_printable_bci(-1));
|
||||||
|
}
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
int java_index() const { return _java_index; }
|
int java_index() const { return _java_index; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue