Mercurial > hg > graal-jvmci-8
comparison src/share/vm/c1/c1_InstructionPrinter.cpp @ 3362:d4c1fbc3de95
7042153: guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp
Summary: Handle IfOps folding properly in case of unloaded constant oop arguments
Reviewed-by: kvn, never
author | iveresov |
---|---|
date | Fri, 06 May 2011 12:12:29 -0700 |
parents | 403dc4c1d7f5 |
children | 701a83c86f28 |
comparison
equal
deleted
inserted
replaced
3348:f879eafd5835 | 3362:d4c1fbc3de95 |
---|---|
130 if (type->as_ObjectConstant() != NULL) { | 130 if (type->as_ObjectConstant() != NULL) { |
131 ciObject* value = type->as_ObjectConstant()->value(); | 131 ciObject* value = type->as_ObjectConstant()->value(); |
132 if (value->is_null_object()) { | 132 if (value->is_null_object()) { |
133 output()->print("null"); | 133 output()->print("null"); |
134 } else if (!value->is_loaded()) { | 134 } else if (!value->is_loaded()) { |
135 output()->print("<unloaded object 0x%x>", value); | 135 output()->print("<unloaded object " PTR_FORMAT ">", value); |
136 } else if (value->is_method()) { | 136 } else if (value->is_method()) { |
137 ciMethod* m = (ciMethod*)value; | 137 ciMethod* m = (ciMethod*)value; |
138 output()->print("<method %s.%s>", m->holder()->name()->as_utf8(), m->name()->as_utf8()); | 138 output()->print("<method %s.%s>", m->holder()->name()->as_utf8(), m->name()->as_utf8()); |
139 } else { | 139 } else { |
140 output()->print("<object 0x%x>", value->constant_encoding()); | 140 output()->print("<object " PTR_FORMAT ">", value->constant_encoding()); |
141 } | 141 } |
142 } else if (type->as_InstanceConstant() != NULL) { | 142 } else if (type->as_InstanceConstant() != NULL) { |
143 output()->print("<instance 0x%x>", type->as_InstanceConstant()->value()->constant_encoding()); | 143 ciInstance* value = type->as_InstanceConstant()->value(); |
144 if (value->is_loaded()) { | |
145 output()->print("<instance " PTR_FORMAT ">", value->constant_encoding()); | |
146 } else { | |
147 output()->print("<unloaded instance " PTR_FORMAT ">", value); | |
148 } | |
144 } else if (type->as_ArrayConstant() != NULL) { | 149 } else if (type->as_ArrayConstant() != NULL) { |
145 output()->print("<array 0x%x>", type->as_ArrayConstant()->value()->constant_encoding()); | 150 output()->print("<array " PTR_FORMAT ">", type->as_ArrayConstant()->value()->constant_encoding()); |
146 } else if (type->as_ClassConstant() != NULL) { | 151 } else if (type->as_ClassConstant() != NULL) { |
147 ciInstanceKlass* klass = type->as_ClassConstant()->value(); | 152 ciInstanceKlass* klass = type->as_ClassConstant()->value(); |
148 if (!klass->is_loaded()) { | 153 if (!klass->is_loaded()) { |
149 output()->print("<unloaded> "); | 154 output()->print("<unloaded> "); |
150 } | 155 } |