Mercurial > hg > truffle
diff src/share/vm/graal/graalVmIds.hpp @ 7811:94ea9a864fc6
Remove usages of VmIds.toString.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 18 Feb 2013 19:08:52 -0800 |
parents | 5aa05e6f9dee |
children | a42dc71ad051 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalVmIds.hpp Mon Feb 18 19:02:14 2013 -0800 +++ b/src/share/vm/graal/graalVmIds.hpp Mon Feb 18 19:08:52 2013 -0800 @@ -39,9 +39,6 @@ // Returns the stub address with the given vmId taken from a java.lang.Long static address getStub(oop id); - // Helper function to convert a symbol to a java.lang.String object - template <typename T> static T toString(Symbol* symbol, TRAPS); - // Helper function to convert a java.lang.String object to a symbol (this will return NULL if the symbol doesn't exist in the system) static Symbol* toSymbol(jstring string); @@ -53,22 +50,6 @@ return (address)(getBoxedLong(obj)); } -template <> inline Handle VmIds::toString<Handle>(Symbol* symbol, TRAPS) { - return java_lang_String::create_from_symbol(symbol, THREAD); -} - -template <> inline oop VmIds::toString<oop>(Symbol* symbol, TRAPS) { - return toString<Handle>(symbol, THREAD)(); -} - -template <> inline jstring VmIds::toString<jstring>(Symbol* symbol, TRAPS) { - return (jstring)JNIHandles::make_local(toString<oop>(symbol, THREAD)); -} - -template <> inline jobject VmIds::toString<jobject>(Symbol* symbol, TRAPS) { - return JNIHandles::make_local(toString<oop>(symbol, THREAD)); -} - inline Symbol* VmIds::toSymbol(jstring string) { return java_lang_String::as_symbol(JNIHandles::resolve(string), Thread::current()); }