Mercurial > hg > graal-jvmci-8
diff src/share/vm/code/debugInfo.hpp @ 19605:15ef24874df7
Add assertion to ObjectValue conversion
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Wed, 25 Feb 2015 19:13:16 -0800 |
parents | 52b4284cb496 |
children |
line wrap: on
line diff
--- a/src/share/vm/code/debugInfo.hpp Wed Feb 25 19:05:03 2015 -0800 +++ b/src/share/vm/code/debugInfo.hpp Wed Feb 25 19:13:16 2015 -0800 @@ -41,6 +41,7 @@ // - ConstantValue describes a constant class ConstantOopReadValue; +class ObjectValue; class ScopeValue: public ResourceObj { public: @@ -58,6 +59,11 @@ return (ConstantOopReadValue*) this; } + ObjectValue* as_ObjectValue() { + assert(is_object(), "must be"); + return (ObjectValue*)this; + } + // Serialization of debugging information virtual void write_on(DebugInfoWriteStream* stream) = 0; static ScopeValue* read_from(DebugInfoReadStream* stream);