hotspot/src/share/vm/oops/constantPoolOop.hpp
changeset 6062 bab93afe9df7
parent 5882 6b2aecc4f7d8
child 7111 ac1a0346bc0f
--- a/hotspot/src/share/vm/oops/constantPoolOop.hpp	Thu Jul 15 08:54:48 2010 -0700
+++ b/hotspot/src/share/vm/oops/constantPoolOop.hpp	Thu Jul 15 18:40:45 2010 -0700
@@ -156,6 +156,11 @@
     *int_at_addr(which) = ref_index;
   }
 
+  void invoke_dynamic_at_put(int which, int bootstrap_method_index, int name_and_type_index) {
+    tag_at_put(which, JVM_CONSTANT_InvokeDynamic);
+    *int_at_addr(which) = ((jint) name_and_type_index<<16) | bootstrap_method_index;
+  }
+
   // Temporary until actual use
   void unresolved_string_at_put(int which, symbolOop s) {
     *obj_at_addr(which) = NULL;
@@ -396,6 +401,16 @@
     int sym = method_type_index_at(which);
     return symbol_at(sym);
   }
+  int invoke_dynamic_bootstrap_method_ref_index_at(int which) {
+    assert(tag_at(which).is_invoke_dynamic(), "Corrupted constant pool");
+    jint ref_index = *int_at_addr(which);
+    return extract_low_short_from_int(ref_index);
+  }
+  int invoke_dynamic_name_and_type_ref_index_at(int which) {
+    assert(tag_at(which).is_invoke_dynamic(), "Corrupted constant pool");
+    jint ref_index = *int_at_addr(which);
+    return extract_high_short_from_int(ref_index);
+  }
 
   // The following methods (name/signature/klass_ref_at, klass_ref_at_noresolve,
   // name_and_type_ref_index_at) all expect to be passed indices obtained