/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_VM_CODE_DEBUGINFO_HPP
#define SHARE_VM_CODE_DEBUGINFO_HPP
#include "code/compressedStream.hpp"
#include "code/location.hpp"
#include "code/nmethod.hpp"
#include "code/oopRecorder.hpp"
#include "runtime/stackValue.hpp"
#include "utilities/growableArray.hpp"
// Classes used for serializing debugging information.
// These abstractions are introducted to provide symmetric
// read and write operations.
// ScopeValue describes the value of a variable/expression in a scope
// - LocationValue describes a value in a given location (in frame or register)
// - ConstantValue describes a constant
public:
// Testers
virtual bool is_location() const { return false; }
virtual bool is_object() const { return false; }
virtual bool is_constant_int() const { return false; }
virtual bool is_constant_double() const { return false; }
virtual bool is_constant_long() const { return false; }
virtual bool is_constant_oop() const { return false; }
// Serialization of debugging information
};
// A Location value describes a value in a given location; i.e. the corresponding
// logical entity (e.g., a method temporary) lives in this location.
private:
public:
bool is_location() const { return true; }
// Serialization of debugging information
// Printing
};
// An ObjectValue describes an object eliminated by escape analysis.
private:
int _id;
bool _visited;
public:
, _field_values()
, _value()
, _visited(false) {
}
, _field_values()
, _value()
, _visited(false) {}
// Accessors
bool is_object() const { return true; }
// Serialization of debugging information
// Printing
};
// A ConstantIntValue describes a constant int; i.e., the corresponding logical entity
// is either a source constant or its computation has been constant-folded.
private:
public:
bool is_constant_int() const { return true; }
// Serialization of debugging information
// Printing
};
private:
public:
bool is_constant_long() const { return true; }
// Serialization of debugging information
// Printing
};
private:
public:
bool is_constant_double() const { return true; }
// Serialization of debugging information
// Printing
};
// A ConstantOopWriteValue is created by the compiler to
// be written as debugging information.
private:
public:
bool is_constant_oop() const { return true; }
// Serialization of debugging information
// Printing
};
// A ConstantOopReadValue is created by the VM when reading
// debug information
private:
public:
bool is_constant_oop() const { return true; }
// Serialization of debugging information
// Printing
};
// MonitorValue describes the pair used for monitor_enter and monitor_exit.
private:
bool _eliminated;
public:
// Constructor
// Accessors
// Serialization of debugging information
// Printing
};
// DebugInfoReadStream specializes CompressedReadStream for reading
// debugging information. Used by ScopeDesc.
private:
public:
} ;
}
// BCI encoding is mostly unsigned, but -1 is a distinguished value
};
// DebugInfoWriteStream specializes CompressedWriteStream for
// writing debugging information. Used by ScopeDescRecorder.
private:
public:
void write_handle(jobject h);
};
#endif // SHARE_VM_CODE_DEBUGINFO_HPP