comparison src/share/vm/graal/graalVmIds.hpp @ 7812:a42dc71ad051

Remove usages of VmIds.toSymbol.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 18 Feb 2013 19:12:32 -0800
parents 94ea9a864fc6
children
comparison
equal deleted inserted replaced
7811:94ea9a864fc6 7812:a42dc71ad051
37 public: 37 public:
38 38
39 // Returns the stub address with the given vmId taken from a java.lang.Long 39 // Returns the stub address with the given vmId taken from a java.lang.Long
40 static address getStub(oop id); 40 static address getStub(oop id);
41 41
42 // 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)
43 static Symbol* toSymbol(jstring string);
44
45 // Helper function to get the contents of a java.lang.Long 42 // Helper function to get the contents of a java.lang.Long
46 static jlong getBoxedLong(oop obj); 43 static jlong getBoxedLong(oop obj);
47 }; 44 };
48 45
49 inline address VmIds::getStub(oop obj) { 46 inline address VmIds::getStub(oop obj) {
50 return (address)(getBoxedLong(obj)); 47 return (address)(getBoxedLong(obj));
51 } 48 }
52 49
53 inline Symbol* VmIds::toSymbol(jstring string) {
54 return java_lang_String::as_symbol(JNIHandles::resolve(string), Thread::current());
55 }
56
57 inline jlong VmIds::getBoxedLong(oop obj) { 50 inline jlong VmIds::getBoxedLong(oop obj) {
58 assert(obj->is_oop(true), "cannot unbox null or non-oop"); 51 assert(obj->is_oop(true), "cannot unbox null or non-oop");
59 return obj->long_field(java_lang_boxing_object::value_offset_in_bytes(T_LONG)); 52 return obj->long_field(java_lang_boxing_object::value_offset_in_bytes(T_LONG));
60 } 53 }
61 54