Mercurial > hg > truffle
diff src/share/vm/ci/ciType.cpp @ 7643:3ac7d10a6572
Merge with hsx25/hotspot.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 31 Jan 2013 15:42:25 +0100 |
parents | f1de9dbc914e |
children | de6a9e811145 |
line wrap: on
line diff
--- a/src/share/vm/ci/ciType.cpp Thu Jan 31 11:32:14 2013 +0100 +++ b/src/share/vm/ci/ciType.cpp Thu Jan 31 15:42:25 2013 +0100 @@ -60,6 +60,19 @@ } // ------------------------------------------------------------------ +// ciType::name +// +// Return the name of this type +const char* ciType::name() { + if (is_primitive_type()) { + return type2name(basic_type()); + } else { + assert(is_klass(), "must be"); + return as_klass()->name()->as_utf8(); + } +} + +// ------------------------------------------------------------------ // ciType::print_impl // // Implementation of the print method. @@ -73,7 +86,8 @@ // // Print the name of this type void ciType::print_name_on(outputStream* st) { - st->print(type2name(basic_type())); + ResourceMark rm; + st->print(name()); }