< prev index next >

src/hotspot/share/code/debugInfo.hpp

Print this page
@@ -128,46 +128,51 @@
  
  class ObjectValue: public ScopeValue {
   protected:
    int                        _id;
    ScopeValue*                _klass;
+   ScopeValue*                _is_init;
    GrowableArray<ScopeValue*> _field_values;
    Handle                     _value;
    bool                       _visited;
    bool                       _is_root;   // Will be true if this object is referred to
                                           // as a local/expression/monitor in the JVMs.
                                           // Otherwise false, meaning it's just a candidate
                                           // in an object allocation merge.
   public:
-   ObjectValue(int id, ScopeValue* klass)
+   ObjectValue(int id, ScopeValue* klass, ScopeValue* is_init = nullptr)
       : _id(id)
       , _klass(klass)
+      , _is_init(is_init)
       , _field_values()
       , _value()
       , _visited(false)
       , _is_root(true) {
      assert(klass->is_constant_oop(), "should be constant java mirror oop");
    }
  
    ObjectValue(int id)
       : _id(id)
       , _klass(nullptr)
+      , _is_init(new MarkerValue())
       , _field_values()
       , _value()
       , _visited(false)
       , _is_root(true) {}
  
    // Accessors
    bool                        is_object() const           { return true; }
    int                         id() const                  { return _id; }
    virtual ScopeValue*         klass() const               { return _klass; }
+   virtual ScopeValue*         is_init() const             { return _is_init; }
    virtual GrowableArray<ScopeValue*>* field_values()      { return &_field_values; }
    virtual ScopeValue*         field_at(int i) const       { return _field_values.at(i); }
    virtual int                 field_size()                { return _field_values.length(); }
    virtual Handle              value() const               { return _value; }
    bool                        is_visited() const          { return _visited; }
    bool                        is_root() const             { return _is_root; }
+   bool                        maybe_null() const          { return !_is_init->is_marker(); }
  
    void                        set_id(int id)              { _id = id; }
    virtual void                set_value(oop value);
    void                        set_visited(bool visited)   { _visited = visited; }
    void                        set_root(bool root)         { _is_root = root; }
< prev index next >