equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
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 " PTR_FORMAT ">", value); |
135 output()->print("<unloaded object " PTR_FORMAT ">", value); |
136 } else if (value->is_method()) { |
|
137 ciMethod* m = (ciMethod*)value; |
|
138 output()->print("<method %s.%s>", m->holder()->name()->as_utf8(), m->name()->as_utf8()); |
|
139 } else { |
136 } else { |
140 output()->print("<object " PTR_FORMAT " klass=", value->constant_encoding()); |
137 output()->print("<object " PTR_FORMAT " klass=", value->constant_encoding()); |
141 print_klass(value->klass()); |
138 print_klass(value->klass()); |
142 output()->print(">"); |
139 output()->print(">"); |
143 } |
140 } |
157 if (!klass->is_loaded()) { |
154 if (!klass->is_loaded()) { |
158 output()->print("<unloaded> "); |
155 output()->print("<unloaded> "); |
159 } |
156 } |
160 output()->print("class "); |
157 output()->print("class "); |
161 print_klass(klass); |
158 print_klass(klass); |
|
159 } else if (type->as_MethodConstant() != NULL) { |
|
160 ciMethod* m = type->as_MethodConstant()->value(); |
|
161 output()->print("<method %s.%s>", m->holder()->name()->as_utf8(), m->name()->as_utf8()); |
162 } else { |
162 } else { |
163 output()->print("???"); |
163 output()->print("???"); |
164 } |
164 } |
165 } |
165 } |
166 |
166 |
459 |
459 |
460 void InstructionPrinter::do_TypeCast(TypeCast* x) { |
460 void InstructionPrinter::do_TypeCast(TypeCast* x) { |
461 output()->print("type_cast("); |
461 output()->print("type_cast("); |
462 print_value(x->obj()); |
462 print_value(x->obj()); |
463 output()->print(") "); |
463 output()->print(") "); |
464 print_klass(x->declared_type()->klass()); |
464 if (x->declared_type()->is_klass()) |
|
465 print_klass(x->declared_type()->as_klass()); |
|
466 else |
|
467 output()->print(type2name(x->declared_type()->basic_type())); |
465 } |
468 } |
466 |
469 |
467 |
470 |
468 void InstructionPrinter::do_Invoke(Invoke* x) { |
471 void InstructionPrinter::do_Invoke(Invoke* x) { |
469 if (x->receiver() != NULL) { |
472 if (x->receiver() != NULL) { |