src/share/vm/ci/ciType.cpp

changeset 4447
f1de9dbc914e
parent 4278
070d523b96a7
child 6198
55fb97c4c58d
     1.1 --- a/src/share/vm/ci/ciType.cpp	Mon Jan 14 08:22:32 2013 -0800
     1.2 +++ b/src/share/vm/ci/ciType.cpp	Tue Jan 15 12:06:18 2013 -0800
     1.3 @@ -60,6 +60,19 @@
     1.4  }
     1.5  
     1.6  // ------------------------------------------------------------------
     1.7 +// ciType::name
     1.8 +//
     1.9 +// Return the name of this type
    1.10 +const char* ciType::name() {
    1.11 +  if (is_primitive_type()) {
    1.12 +    return type2name(basic_type());
    1.13 +  } else {
    1.14 +    assert(is_klass(), "must be");
    1.15 +    return as_klass()->name()->as_utf8();
    1.16 +  }
    1.17 +}
    1.18 +
    1.19 +// ------------------------------------------------------------------
    1.20  // ciType::print_impl
    1.21  //
    1.22  // Implementation of the print method.
    1.23 @@ -73,7 +86,8 @@
    1.24  //
    1.25  // Print the name of this type
    1.26  void ciType::print_name_on(outputStream* st) {
    1.27 -  st->print(type2name(basic_type()));
    1.28 +  ResourceMark rm;
    1.29 +  st->print(name());
    1.30  }
    1.31  
    1.32  

mercurial