< prev index next >

src/share/vm/oops/instanceKlass.hpp

Print this page

        

@@ -288,13 +288,19 @@
   //   named, or a previously loaded anonymous class. A non-anonymous class
   //   or an anonymous class loaded through normal classloading does not
   //   have this embedded field.
   //
 
+  // TODO
+  bool _set_finals;
+
   friend class SystemDictionary;
 
  public:
+  bool set_finals()       { return _set_finals; }
+  void set_finals(bool b) { _set_finals = b; }
+
   bool has_nonstatic_fields() const        {
     return (_misc_flags & _misc_has_nonstatic_fields) != 0;
   }
   void set_has_nonstatic_fields(bool b)    {
     if (b) {

@@ -1258,10 +1264,40 @@
   void set_is_static_field_id()   { _is_static_field_id = true; }
 #endif
   void verify(Klass* holder);
 };
 
+class nmethodBucketEntry : public CHeapObj<mtClass> {
+  friend class VMStructs;
+private:
+  nmethod*            _nmethod;
+  int                 _count;
+  nmethodBucketEntry* _next;
+public:
+    nmethodBucketEntry(nmethod* nmethod, nmethodBucketEntry* next) {
+    _nmethod = nmethod;
+    _next = next;
+    _count = 1;
+  }
+  int count()                             { return _count; }
+  int increment()                         { _count += 1; return _count; }
+  int decrement();
+  nmethodBucketEntry* next()              { return _next; }
+  void set_next(nmethodBucketEntry* b)    { _next = b; }
+  nmethod* get_nmethod()                  { return _nmethod; }
+
+  static int mark_dependent_nmethods(nmethodBucketEntry* deps, DepChange& changes);
+  static nmethodBucketEntry* add_dependent_nmethod(nmethodBucketEntry* deps, nmethod* nm);
+  static bool remove_dependent_nmethod(nmethodBucketEntry* deps, nmethod* nm, bool& found);
+  static nmethodBucketEntry* clean_dependent_nmethods(nmethodBucketEntry* deps);
+
+#ifndef PRODUCT
+  static void verify(nmethodBucketEntry* deps);
+  static void print_dependent_nmethods(nmethodBucketEntry* deps, bool verbose);
+  static bool is_dependent_nmethod(nmethodBucketEntry* deps, nmethod* nm);
+#endif //PRODUCT
+};
 
 //
 // nmethodBucket is used to record dependent nmethods for
 // deoptimization.  nmethod dependencies are actually <klass, method>
 // pairs but we really only care about the klass part for purposes of

@@ -1272,32 +1308,36 @@
 // added.
 //
 class nmethodBucket: public CHeapObj<mtClass> {
   friend class VMStructs;
  private:
-  nmethod*       _nmethod;
-  int            _count;
-  nmethodBucket* _next;
+  enum {
+    FIRST_Bucket = 0,
+    KlassBucket = FIRST_Bucket,
+    CallSiteBucket,
+    ConstantFieldBucket,
+    Bucket_LIMIT
+  };
 
- public:
-  nmethodBucket(nmethod* nmethod, nmethodBucket* next) {
-    _nmethod = nmethod;
-    _next = next;
-    _count = 1;
+  nmethodBucketEntry* _buckets[Bucket_LIMIT];
+
+  nmethodBucket() {
+    for (int i = FIRST_Bucket; i < Bucket_LIMIT; i++) {
+      _buckets[i] = NULL;
   }
-  int count()                             { return _count; }
-  int increment()                         { _count += 1; return _count; }
-  int decrement();
-  nmethodBucket* next()                   { return _next; }
-  void set_next(nmethodBucket* b)         { _next = b; }
-  nmethod* get_nmethod()                  { return _nmethod; }
+  }
+  static int bucket_index(DepChange& changes);
+
+ public:
 
   static int mark_dependent_nmethods(nmethodBucket* deps, DepChange& changes);
   static nmethodBucket* add_dependent_nmethod(nmethodBucket* deps, nmethod* nm);
   static bool remove_dependent_nmethod(nmethodBucket* deps, nmethod* nm);
   static nmethodBucket* clean_dependent_nmethods(nmethodBucket* deps);
+  static int release(nmethodBucket* deps);
 #ifndef PRODUCT
+  static void verify(nmethodBucket* deps);
   static void print_dependent_nmethods(nmethodBucket* deps, bool verbose);
   static bool is_dependent_nmethod(nmethodBucket* deps, nmethod* nm);
 #endif //PRODUCT
 };
 
< prev index next >