diff src/share/vm/oops/instanceKlass.hpp @ 15052:5e6f29f287d6

added InstanceKlass::_graal_node_class field to accelerate Node.getNodeClass()
author Doug Simon <doug.simon@oracle.com>
date Thu, 10 Apr 2014 00:01:30 +0200
parents 4ca6dc0799b6
children 89152779163c
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.hpp	Wed Apr 09 23:48:22 2014 +0200
+++ b/src/share/vm/oops/instanceKlass.hpp	Thu Apr 10 00:01:30 2014 +0200
@@ -241,6 +241,10 @@
   Thread*         _init_thread;          // Pointer to current thread doing initialization (to handle recusive initialization)
   int             _vtable_len;           // length of Java vtable (in words)
   int             _itable_len;           // length of Java itable (in words)
+#ifdef GRAAL
+  // com/oracle/graal/graph/NodeClass instance mirroring this class
+  oop             _graal_node_class;
+#endif
   OopMapCache*    volatile _oop_map_cache;   // OopMapCache for all methods in the klass (allocated lazily)
   MemberNameTable* _member_names;        // Member names
   JNIid*          _jni_ids;              // First JNI identifier for static fields in this class
@@ -745,6 +749,16 @@
   void call_class_initializer(TRAPS);
   void set_initialization_state_and_notify(ClassState state, TRAPS);
 
+#ifdef GRAAL
+  // Graal com.oracle.graal.graph.NodeClass mirror
+  oop graal_node_class()           { return _graal_node_class;               }
+  void set_graal_node_class(oop m) { klass_oop_store(&_graal_node_class, m); }
+  oop* adr_graal_node_class()      { return (oop*)&this->_graal_node_class;  }
+
+  // GC support
+  virtual void oops_do(OopClosure* cl);
+#endif
+
   // OopMapCache support
   OopMapCache* oop_map_cache()               { return _oop_map_cache; }
   void set_oop_map_cache(OopMapCache *cache) { _oop_map_cache = cache; }