1.1 --- a/src/share/vm/oops/constantPool.hpp Fri Feb 22 10:03:02 2013 +0100 1.2 +++ b/src/share/vm/oops/constantPool.hpp Fri Feb 22 08:36:42 2013 -0500 1.3 @@ -97,10 +97,8 @@ 1.4 Array<u2>* _reference_map; 1.5 1.6 enum { 1.7 - _has_invokedynamic = 1, // Flags 1.8 - _has_pseudo_string = 2, 1.9 - _has_preresolution = 4, 1.10 - _on_stack = 8 1.11 + _has_preresolution = 1, // Flags 1.12 + _on_stack = 2 1.13 }; 1.14 1.15 int _flags; // old fashioned bit twiddling 1.16 @@ -175,12 +173,6 @@ 1.17 Array<u1>* tags() const { return _tags; } 1.18 Array<u2>* operands() const { return _operands; } 1.19 1.20 - bool has_invokedynamic() const { return (_flags & _has_invokedynamic) != 0; } 1.21 - void set_has_invokedynamic() { _flags |= _has_invokedynamic; } 1.22 - 1.23 - bool has_pseudo_string() const { return (_flags & _has_pseudo_string) != 0; } 1.24 - void set_has_pseudo_string() { _flags |= _has_pseudo_string; } 1.25 - 1.26 bool has_preresolution() const { return (_flags & _has_preresolution) != 0; } 1.27 void set_has_preresolution() { _flags |= _has_preresolution; } 1.28 1.29 @@ -324,14 +316,6 @@ 1.30 resolved_references()->obj_at_put(obj_index, str); 1.31 } 1.32 1.33 - void set_object_tag_at(int which) { 1.34 - release_tag_at_put(which, JVM_CONSTANT_Object); 1.35 - } 1.36 - 1.37 - void object_at_put(int which, oop obj) { 1.38 - resolved_references()->obj_at_put(cp_to_object_index(which), obj); 1.39 - } 1.40 - 1.41 // For temporary use while constructing constant pool 1.42 void string_index_at_put(int which, int string_index) { 1.43 tag_at_put(which, JVM_CONSTANT_StringIndex); 1.44 @@ -429,12 +413,6 @@ 1.45 // Version that can be used before string oop array is created. 1.46 oop uncached_string_at(int which, TRAPS); 1.47 1.48 - oop object_at(int which) { 1.49 - assert(tag_at(which).is_object(), "Corrupted constant pool"); 1.50 - int obj_index = cp_to_object_index(which); 1.51 - return resolved_references()->obj_at(obj_index); 1.52 - } 1.53 - 1.54 // A "pseudo-string" is an non-string oop that has found is way into 1.55 // a String entry. 1.56 // Under EnableInvokeDynamic this can happen if the user patches a live 1.57 @@ -454,10 +432,18 @@ 1.58 return s; 1.59 } 1.60 1.61 + oop pseudo_string_at(int which) { 1.62 + assert(tag_at(which).is_string(), "Corrupted constant pool"); 1.63 + assert(unresolved_string_at(which) == NULL, "shouldn't have symbol"); 1.64 + int obj_index = cp_to_object_index(which); 1.65 + oop s = resolved_references()->obj_at(obj_index); 1.66 + return s; 1.67 + } 1.68 + 1.69 void pseudo_string_at_put(int which, int obj_index, oop x) { 1.70 assert(EnableInvokeDynamic, ""); 1.71 - set_has_pseudo_string(); // mark header 1.72 assert(tag_at(which).is_string(), "Corrupted constant pool"); 1.73 + unresolved_string_at_put(which, NULL); // indicates patched string 1.74 string_at_put(which, obj_index, x); // this works just fine 1.75 } 1.76