< prev index next >

src/hotspot/share/oops/instanceKlass.hpp

Print this page
*** 233,10 ***
--- 233,12 ---
    // InstanceKlass. This should be an enum (?)
    static const unsigned _kind_other        = 0; // concrete InstanceKlass
    static const unsigned _kind_reference    = 1; // InstanceRefKlass
    static const unsigned _kind_class_loader = 2; // InstanceClassLoaderKlass
    static const unsigned _kind_mirror       = 3; // InstanceMirrorKlass
+   static const unsigned _misc_kind_stack_chunk  = 4; // InstanceStackChunk
+   static const unsigned _misc_kind_last  = _misc_kind_stack_chunk;
  
    u1              _reference_type;                // reference type
    u1              _kind;                          // kind of InstanceKlass
  
    enum {

*** 786,10 ***
--- 788,11 ---
      _misc_flags |= _misc_has_resolved_methods;
    }
  private:
  
    void set_kind(unsigned kind) {
+     assert(kind <= _misc_kind_last, "Invalid InstanceKlass kind");
      _kind = (u1)kind;
    }
  
    bool is_kind(unsigned desired) const {
      return _kind == (u1)desired;

*** 800,10 ***
--- 803,11 ---
    // Other is anything that is not one of the more specialized kinds of InstanceKlass.
    bool is_other_instance_klass() const        { return is_kind(_kind_other); }
    bool is_reference_instance_klass() const    { return is_kind(_kind_reference); }
    bool is_mirror_instance_klass() const       { return is_kind(_kind_mirror); }
    bool is_class_loader_instance_klass() const { return is_kind(_kind_class_loader); }
+   bool is_stack_chunk_instance_klass() const  { return is_kind(_misc_kind_stack_chunk); }
  
  #if INCLUDE_JVMTI
  
    void init_previous_versions() {
      _previous_versions = NULL;
< prev index next >