< prev index next >

src/hotspot/share/code/debugInfo.hpp

Print this page
@@ -128,23 +128,25 @@
  
  class ObjectValue: public ScopeValue {
   protected:
    int                        _id;
    ScopeValue*                _klass;
+   ScopeValue*                _is_init;
    GrowableArray<ScopeValue*> _field_values;
    Handle                     _value;
    bool                       _visited;
    bool                       _is_scalar_replaced;      // Whether this ObjectValue describes an object scalar replaced or just
                                                         // an object (possibly null) participating in an allocation merge.
    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 = nullptr, bool is_scalar_replaced = true)
+   ObjectValue(int id, ScopeValue* klass = nullptr, bool is_scalar_replaced = true, ScopeValue* is_init = nullptr)
       : _id(id)
       , _klass(klass)
+      , _is_init((is_init == nullptr) ? new MarkerValue() : is_init)
       , _field_values()
       , _value()
       , _visited(false)
       , _is_scalar_replaced(is_scalar_replaced)
       , _is_root(true) {

@@ -153,17 +155,19 @@
  
    // 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_scalar_replaced() const  { return _is_scalar_replaced; }
    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_is_scalar_replaced(bool scd) { _is_scalar_replaced = scd; }
< prev index next >