< prev index next >

src/hotspot/share/code/debugInfo.hpp

Print this page
*** 116,39 ***
  
  class ObjectValue: public ScopeValue {
   protected:
    int                        _id;
    ScopeValue*                _klass;
    GrowableArray<ScopeValue*> _field_values;
    Handle                     _value;
    bool                       _visited;
   public:
!   ObjectValue(int id, ScopeValue* klass)
       : _id(id)
       , _klass(klass)
       , _field_values()
       , _value()
       , _visited(false) {
      assert(klass->is_constant_oop(), "should be constant java mirror oop");
    }
  
    ObjectValue(int id)
       : _id(id)
       , _klass(NULL)
       , _field_values()
       , _value()
       , _visited(false) {}
  
    // Accessors
    bool                        is_object() const         { return true; }
    int                         id() const                { return _id; }
    ScopeValue*                 klass() const             { return _klass; }
    GrowableArray<ScopeValue*>* field_values()            { return &_field_values; }
    ScopeValue*                 field_at(int i) const     { return _field_values.at(i); }
    int                         field_size()              { return _field_values.length(); }
    Handle                      value() const             { return _value; }
    bool                        is_visited() const        { return _visited; }
  
    void                        set_value(oop value);
    void                        set_visited(bool visited) { _visited = visited; }
  
    // Serialization of debugging information
--- 116,44 ---
  
  class ObjectValue: public ScopeValue {
   protected:
    int                        _id;
    ScopeValue*                _klass;
+   ScopeValue*                _is_init;
    GrowableArray<ScopeValue*> _field_values;
    Handle                     _value;
    bool                       _visited;
   public:
!   ObjectValue(int id, ScopeValue* klass, ScopeValue* is_init = NULL)
       : _id(id)
       , _klass(klass)
+      , _is_init(is_init)
       , _field_values()
       , _value()
       , _visited(false) {
      assert(klass->is_constant_oop(), "should be constant java mirror oop");
    }
  
    ObjectValue(int id)
       : _id(id)
       , _klass(NULL)
+      , _is_init(NULL)
       , _field_values()
       , _value()
       , _visited(false) {}
  
    // Accessors
    bool                        is_object() const         { return true; }
    int                         id() const                { return _id; }
    ScopeValue*                 klass() const             { return _klass; }
+   ScopeValue*                 is_init() const           { return _is_init; }
    GrowableArray<ScopeValue*>* field_values()            { return &_field_values; }
    ScopeValue*                 field_at(int i) const     { return _field_values.at(i); }
    int                         field_size()              { return _field_values.length(); }
    Handle                      value() const             { return _value; }
    bool                        is_visited() const        { return _visited; }
+   bool                        maybe_null() const        { return !_is_init->is_marker(); }
  
    void                        set_value(oop value);
    void                        set_visited(bool visited) { _visited = visited; }
  
    // Serialization of debugging information
< prev index next >