diff src/share/vm/classfile/javaClasses.hpp @ 726:be93aad57795

6655646: dynamic languages need dynamically linked call sites Summary: invokedynamic instruction (JSR 292 RI) Reviewed-by: twisti, never
author jrose
date Tue, 21 Apr 2009 23:21:04 -0700
parents e5b0439ef4ae
children 987e948ebbc8
line wrap: on
line diff
--- a/src/share/vm/classfile/javaClasses.hpp	Mon Apr 20 14:48:03 2009 -0700
+++ b/src/share/vm/classfile/javaClasses.hpp	Tue Apr 21 23:21:04 2009 -0700
@@ -1060,6 +1060,33 @@
 };
 
 
+// Interface to sun.dyn.CallSiteImpl objects
+
+class sun_dyn_CallSiteImpl: AllStatic {
+  friend class JavaClasses;
+
+private:
+  static int _type_offset;
+  static int _target_offset;
+  static int _vmmethod_offset;
+
+  static void compute_offsets();
+
+public:
+  // Accessors
+  static oop            type(oop site);
+
+  static oop            target(oop site);
+  static void       set_target(oop site, oop target);
+
+  static oop            vmmethod(oop site);
+  static void       set_vmmethod(oop site, oop ref);
+
+  // Accessors for code generation:
+  static int target_offset_in_bytes()           { return _target_offset; }
+  static int type_offset_in_bytes()             { return _type_offset; }
+  static int vmmethod_offset_in_bytes()         { return _vmmethod_offset; }
+};
 
 
 // Interface to java.security.AccessControlContext objects