1.1 --- a/src/share/vm/c1/c1_InstructionPrinter.cpp Fri Aug 31 16:39:35 2012 -0700 1.2 +++ b/src/share/vm/c1/c1_InstructionPrinter.cpp Sat Sep 01 13:25:18 2012 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -133,9 +133,6 @@ 1.11 output()->print("null"); 1.12 } else if (!value->is_loaded()) { 1.13 output()->print("<unloaded object " PTR_FORMAT ">", value); 1.14 - } else if (value->is_method()) { 1.15 - ciMethod* m = (ciMethod*)value; 1.16 - output()->print("<method %s.%s>", m->holder()->name()->as_utf8(), m->name()->as_utf8()); 1.17 } else { 1.18 output()->print("<object " PTR_FORMAT " klass=", value->constant_encoding()); 1.19 print_klass(value->klass()); 1.20 @@ -159,6 +156,9 @@ 1.21 } 1.22 output()->print("class "); 1.23 print_klass(klass); 1.24 + } else if (type->as_MethodConstant() != NULL) { 1.25 + ciMethod* m = type->as_MethodConstant()->value(); 1.26 + output()->print("<method %s.%s>", m->holder()->name()->as_utf8(), m->name()->as_utf8()); 1.27 } else { 1.28 output()->print("???"); 1.29 } 1.30 @@ -461,7 +461,10 @@ 1.31 output()->print("type_cast("); 1.32 print_value(x->obj()); 1.33 output()->print(") "); 1.34 - print_klass(x->declared_type()->klass()); 1.35 + if (x->declared_type()->is_klass()) 1.36 + print_klass(x->declared_type()->as_klass()); 1.37 + else 1.38 + output()->print(type2name(x->declared_type()->basic_type())); 1.39 } 1.40 1.41