< prev index next >

src/hotspot/share/code/dependencies.hpp

Print this page


 699     Change_new_impl,            // an interface with a new implementation
 700     CHANGE_LIMIT,
 701     Start_Klass = CHANGE_LIMIT  // internal indicator for ContextStream
 702   };
 703 
 704   // Usage:
 705   // for (DepChange::ContextStream str(changes); str.next(); ) {
 706   //   Klass* k = str.klass();
 707   //   switch (str.change_type()) {
 708   //     ...
 709   //   }
 710   // }
 711   class ContextStream : public StackObj {
 712    private:
 713     DepChange&  _changes;
 714     friend class DepChange;
 715 
 716     // iteration variables:
 717     ChangeType  _change_type;
 718     Klass*      _klass;
 719     Array<Klass*>* _ti_base;    // i.e., transitive_interfaces
 720     int         _ti_index;
 721     int         _ti_limit;
 722 
 723     // start at the beginning:
 724     void start();
 725 
 726    public:
 727     ContextStream(DepChange& changes)
 728       : _changes(changes)
 729     { start(); }
 730 
 731     ContextStream(DepChange& changes, NoSafepointVerifier& nsv)
 732       : _changes(changes)
 733       // the nsv argument makes it safe to hold oops like _klass
 734     { start(); }
 735 
 736     bool next();
 737 
 738     ChangeType change_type()     { return _change_type; }
 739     Klass*     klass()           { return _klass; }




 699     Change_new_impl,            // an interface with a new implementation
 700     CHANGE_LIMIT,
 701     Start_Klass = CHANGE_LIMIT  // internal indicator for ContextStream
 702   };
 703 
 704   // Usage:
 705   // for (DepChange::ContextStream str(changes); str.next(); ) {
 706   //   Klass* k = str.klass();
 707   //   switch (str.change_type()) {
 708   //     ...
 709   //   }
 710   // }
 711   class ContextStream : public StackObj {
 712    private:
 713     DepChange&  _changes;
 714     friend class DepChange;
 715 
 716     // iteration variables:
 717     ChangeType  _change_type;
 718     Klass*      _klass;
 719     Array<InstanceKlass*>* _ti_base;    // i.e., transitive_interfaces
 720     int         _ti_index;
 721     int         _ti_limit;
 722 
 723     // start at the beginning:
 724     void start();
 725 
 726    public:
 727     ContextStream(DepChange& changes)
 728       : _changes(changes)
 729     { start(); }
 730 
 731     ContextStream(DepChange& changes, NoSafepointVerifier& nsv)
 732       : _changes(changes)
 733       // the nsv argument makes it safe to hold oops like _klass
 734     { start(); }
 735 
 736     bool next();
 737 
 738     ChangeType change_type()     { return _change_type; }
 739     Klass*     klass()           { return _klass; }


< prev index next >