mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
7042153: guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp
Handle IfOps folding properly in case of unloaded constant oop arguments Reviewed-by: kvn, never
This commit is contained in:
parent
8698030a91
commit
bb2c21a025
3 changed files with 69 additions and 17 deletions
|
@ -132,17 +132,22 @@ void InstructionPrinter::print_object(Value obj) {
|
|||
if (value->is_null_object()) {
|
||||
output()->print("null");
|
||||
} else if (!value->is_loaded()) {
|
||||
output()->print("<unloaded object 0x%x>", value);
|
||||
output()->print("<unloaded object " PTR_FORMAT ">", value);
|
||||
} else if (value->is_method()) {
|
||||
ciMethod* m = (ciMethod*)value;
|
||||
output()->print("<method %s.%s>", m->holder()->name()->as_utf8(), m->name()->as_utf8());
|
||||
} else {
|
||||
output()->print("<object 0x%x>", value->constant_encoding());
|
||||
output()->print("<object " PTR_FORMAT ">", value->constant_encoding());
|
||||
}
|
||||
} else if (type->as_InstanceConstant() != NULL) {
|
||||
output()->print("<instance 0x%x>", type->as_InstanceConstant()->value()->constant_encoding());
|
||||
ciInstance* value = type->as_InstanceConstant()->value();
|
||||
if (value->is_loaded()) {
|
||||
output()->print("<instance " PTR_FORMAT ">", value->constant_encoding());
|
||||
} else {
|
||||
output()->print("<unloaded instance " PTR_FORMAT ">", value);
|
||||
}
|
||||
} else if (type->as_ArrayConstant() != NULL) {
|
||||
output()->print("<array 0x%x>", type->as_ArrayConstant()->value()->constant_encoding());
|
||||
output()->print("<array " PTR_FORMAT ">", type->as_ArrayConstant()->value()->constant_encoding());
|
||||
} else if (type->as_ClassConstant() != NULL) {
|
||||
ciInstanceKlass* klass = type->as_ClassConstant()->value();
|
||||
if (!klass->is_loaded()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue