< prev index next >

src/hotspot/share/code/debugInfo.hpp

Print this page




 111     assert(klass->is_constant_oop(), "should be constant java mirror oop");
 112   }
 113 
 114   ObjectValue(int id)
 115      : _id(id)
 116      , _klass(NULL)
 117      , _field_values()
 118      , _value()
 119      , _visited(false) {}
 120 
 121   // Accessors
 122   bool                        is_object() const         { return true; }
 123   int                         id() const                { return _id; }
 124   ScopeValue*                 klass() const             { return _klass; }
 125   GrowableArray<ScopeValue*>* field_values()            { return &_field_values; }
 126   ScopeValue*                 field_at(int i) const     { return _field_values.at(i); }
 127   int                         field_size()              { return _field_values.length(); }
 128   Handle                      value() const             { return _value; }
 129   bool                        is_visited() const        { return _visited; }
 130 
 131   void                        set_value(oop value)      { _value = Handle(Thread::current(), value); }
 132   void                        set_visited(bool visited) { _visited = false; }
 133 
 134   // Serialization of debugging information
 135   void read_object(DebugInfoReadStream* stream);
 136   void write_on(DebugInfoWriteStream* stream);
 137 
 138   // Printing
 139   void print_on(outputStream* st) const;
 140   void print_fields_on(outputStream* st) const;
 141 };
 142 
 143 
 144 // A ConstantIntValue describes a constant int; i.e., the corresponding logical entity
 145 // is either a source constant or its computation has been constant-folded.
 146 
 147 class ConstantIntValue: public ScopeValue {
 148  private:
 149   jint _value;
 150  public:
 151   ConstantIntValue(jint value)         { _value = value; }




 111     assert(klass->is_constant_oop(), "should be constant java mirror oop");
 112   }
 113 
 114   ObjectValue(int id)
 115      : _id(id)
 116      , _klass(NULL)
 117      , _field_values()
 118      , _value()
 119      , _visited(false) {}
 120 
 121   // Accessors
 122   bool                        is_object() const         { return true; }
 123   int                         id() const                { return _id; }
 124   ScopeValue*                 klass() const             { return _klass; }
 125   GrowableArray<ScopeValue*>* field_values()            { return &_field_values; }
 126   ScopeValue*                 field_at(int i) const     { return _field_values.at(i); }
 127   int                         field_size()              { return _field_values.length(); }
 128   Handle                      value() const             { return _value; }
 129   bool                        is_visited() const        { return _visited; }
 130 
 131   void                        set_value(oop value);
 132   void                        set_visited(bool visited) { _visited = false; }
 133 
 134   // Serialization of debugging information
 135   void read_object(DebugInfoReadStream* stream);
 136   void write_on(DebugInfoWriteStream* stream);
 137 
 138   // Printing
 139   void print_on(outputStream* st) const;
 140   void print_fields_on(outputStream* st) const;
 141 };
 142 
 143 
 144 // A ConstantIntValue describes a constant int; i.e., the corresponding logical entity
 145 // is either a source constant or its computation has been constant-folded.
 146 
 147 class ConstantIntValue: public ScopeValue {
 148  private:
 149   jint _value;
 150  public:
 151   ConstantIntValue(jint value)         { _value = value; }


< prev index next >