Mercurial > hg > truffle
comparison src/share/vm/code/debugInfo.hpp @ 19598: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 |
comparison
equal
deleted
inserted
replaced
19597:dcfdd60edaf1 | 19598:15ef24874df7 |
---|---|
39 // ScopeValue describes the value of a variable/expression in a scope | 39 // ScopeValue describes the value of a variable/expression in a scope |
40 // - LocationValue describes a value in a given location (in frame or register) | 40 // - LocationValue describes a value in a given location (in frame or register) |
41 // - ConstantValue describes a constant | 41 // - ConstantValue describes a constant |
42 | 42 |
43 class ConstantOopReadValue; | 43 class ConstantOopReadValue; |
44 class ObjectValue; | |
44 | 45 |
45 class ScopeValue: public ResourceObj { | 46 class ScopeValue: public ResourceObj { |
46 public: | 47 public: |
47 // Testers | 48 // Testers |
48 virtual bool is_location() const { return false; } | 49 virtual bool is_location() const { return false; } |
54 virtual bool equals(ScopeValue* other) const { return false; } | 55 virtual bool equals(ScopeValue* other) const { return false; } |
55 | 56 |
56 ConstantOopReadValue* as_ConstantOopReadValue() { | 57 ConstantOopReadValue* as_ConstantOopReadValue() { |
57 assert(is_constant_oop(), "must be"); | 58 assert(is_constant_oop(), "must be"); |
58 return (ConstantOopReadValue*) this; | 59 return (ConstantOopReadValue*) this; |
60 } | |
61 | |
62 ObjectValue* as_ObjectValue() { | |
63 assert(is_object(), "must be"); | |
64 return (ObjectValue*)this; | |
59 } | 65 } |
60 | 66 |
61 // Serialization of debugging information | 67 // Serialization of debugging information |
62 virtual void write_on(DebugInfoWriteStream* stream) = 0; | 68 virtual void write_on(DebugInfoWriteStream* stream) = 0; |
63 static ScopeValue* read_from(DebugInfoReadStream* stream); | 69 static ScopeValue* read_from(DebugInfoReadStream* stream); |