hotspot/src/share/vm/classfile/javaClasses.hpp
changeset 31037 01a5c5fa5681
parent 30310 522ea430079f
child 31038 2fd2fdc6a70a
--- a/hotspot/src/share/vm/classfile/javaClasses.hpp	Fri May 15 19:21:46 2015 +0300
+++ b/hotspot/src/share/vm/classfile/javaClasses.hpp	Fri May 15 19:23:11 2015 +0300
@@ -1170,8 +1170,6 @@
 private:
   static int _target_offset;
   static int _context_offset;
-  static int _default_context_offset;
-
 
   static void compute_offsets();
 
@@ -1181,11 +1179,7 @@
   static void         set_target(          oop site, oop target);
   static void         set_target_volatile( oop site, oop target);
 
-  static oop              context_volatile(oop site);
-  static void         set_context_volatile(oop site, oop context);
-  static bool         set_context_cas     (oop site, oop context, oop expected);
-
-  static oop default_context();
+  static oop              context(oop site);
 
   // Testers
   static bool is_subclass(Klass* klass) {
@@ -1197,6 +1191,31 @@
   static int target_offset_in_bytes()           { return _target_offset; }
 };
 
+// Interface to java.lang.invoke.MethodHandleNatives$CallSiteContext objects
+
+#define CALLSITECONTEXT_INJECTED_FIELDS(macro) \
+  macro(java_lang_invoke_MethodHandleNatives_CallSiteContext, vmdependencies, intptr_signature, false)
+
+class java_lang_invoke_MethodHandleNatives_CallSiteContext : AllStatic {
+  friend class JavaClasses;
+
+private:
+  static int _vmdependencies_offset;
+
+  static void compute_offsets();
+
+public:
+  // Accessors
+  static nmethodBucket* vmdependencies(oop context);
+  static void       set_vmdependencies(oop context, nmethodBucket* bucket);
+
+  // Testers
+  static bool is_subclass(Klass* klass) {
+    return klass->is_subclass_of(SystemDictionary::Context_klass());
+  }
+  static bool is_instance(oop obj);
+};
+
 // Interface to java.security.AccessControlContext objects
 
 class java_security_AccessControlContext: AllStatic {
@@ -1406,7 +1425,8 @@
 #define ALL_INJECTED_FIELDS(macro)          \
   CLASS_INJECTED_FIELDS(macro)              \
   CLASSLOADER_INJECTED_FIELDS(macro)        \
-  MEMBERNAME_INJECTED_FIELDS(macro)
+  MEMBERNAME_INJECTED_FIELDS(macro)         \
+  CALLSITECONTEXT_INJECTED_FIELDS(macro)
 
 // Interface to hard-coded offset checking