src/share/vm/oops/constantPoolOop.hpp

Print this page
rev 3 : [mq]: anonk.patch

*** 266,278 **** return symbolOop(*obj_at_addr(which)); } oop string_at(int which, TRAPS) { constantPoolHandle h_this(THREAD, this); ! return string_at_impl(h_this, which, CHECK_NULL); } // only called when we are sure a string entry is already resolved (via an // earlier string_at call. oop resolved_string_at(int which) { assert(tag_at(which).is_string(), "Corrupted constant pool"); // Must do an acquire here in case another thread resolved the klass --- 266,285 ---- return symbolOop(*obj_at_addr(which)); } oop string_at(int which, TRAPS) { constantPoolHandle h_this(THREAD, this); ! return string_at_impl(h_this, which, false, CHECK_NULL); } + bool is_pseudo_string_at(int which); + + oop pseudo_string_at(int which, TRAPS) { + constantPoolHandle h_this(THREAD, this); + return string_at_impl(h_this, which, true, CHECK_NULL); + } + // only called when we are sure a string entry is already resolved (via an // earlier string_at call. oop resolved_string_at(int which) { assert(tag_at(which).is_string(), "Corrupted constant pool"); // Must do an acquire here in case another thread resolved the klass
*** 290,299 **** --- 297,307 ---- // Returns an UTF8 for a CONSTANT_String entry at a given index. // UTF8 char* representation was chosen to avoid conversion of // java_lang_Strings at resolved entries into symbolOops // or vice versa. + // Caller is responsible for checking for pseudo-strings. char* string_at_noresolve(int which); jint name_and_type_at(int which) { assert(tag_at(which).is_name_and_type(), "Corrupted constant pool"); return *int_at_addr(which);
*** 393,403 **** static void verify_constant_pool_resolve(constantPoolHandle this_oop, KlassHandle klass, TRAPS); // Implementation of methods that needs an exposed 'this' pointer, in order to // handle GC while executing the method static klassOop klass_at_impl(constantPoolHandle this_oop, int which, TRAPS); ! static oop string_at_impl(constantPoolHandle this_oop, int which, TRAPS); // Resolve string constants (to prevent allocation during compilation) static void resolve_string_constants_impl(constantPoolHandle this_oop, TRAPS); public: --- 401,411 ---- static void verify_constant_pool_resolve(constantPoolHandle this_oop, KlassHandle klass, TRAPS); // Implementation of methods that needs an exposed 'this' pointer, in order to // handle GC while executing the method static klassOop klass_at_impl(constantPoolHandle this_oop, int which, TRAPS); ! static oop string_at_impl(constantPoolHandle this_oop, int which, bool pseudo_ok, TRAPS); // Resolve string constants (to prevent allocation during compilation) static void resolve_string_constants_impl(constantPoolHandle this_oop, TRAPS); public: