8069016: Add BarrierSet downcast support

Add FakeRttiSupport utility and use to provide barrier_set_cast.

Reviewed-by: jmasa, sangheki
This commit is contained in:
Kim Barrett 2015-02-27 19:52:48 -05:00
parent 1426bc9dc1
commit 40d3986051
32 changed files with 289 additions and 131 deletions

View file

@ -3759,7 +3759,8 @@ void GraphKit::final_sync(IdealKit& ideal) {
Node* GraphKit::byte_map_base_node() {
// Get base of card map
CardTableModRefBS* ct = (CardTableModRefBS*)(Universe::heap()->barrier_set());
CardTableModRefBS* ct =
barrier_set_cast<CardTableModRefBS>(Universe::heap()->barrier_set());
assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust users of this code");
if (ct->byte_map_base != NULL) {
return makecon(TypeRawPtr::make((address)ct->byte_map_base));