Mercurial > hg > graal-jvmci-8
diff src/share/vm/code/debugInfo.cpp @ 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.cpp Wed Feb 25 19:05:03 2015 -0800 +++ b/src/share/vm/code/debugInfo.cpp Wed Feb 25 19:13:16 2015 -0800 @@ -52,7 +52,7 @@ #ifdef ASSERT assert(_obj_pool != NULL, "object pool does not exist"); for (int i = _obj_pool->length() - 1; i >= 0; i--) { - assert(((ObjectValue*) _obj_pool->at(i))->id() != id, "should not be read twice"); + assert(_obj_pool->at(i)->as_ObjectValue()->id() != id, "should not be read twice"); } #endif ObjectValue* result = new ObjectValue(id); @@ -66,7 +66,7 @@ int id = read_int(); assert(_obj_pool != NULL, "object pool does not exist"); for (int i = _obj_pool->length() - 1; i >= 0; i--) { - ObjectValue* ov = (ObjectValue*) _obj_pool->at(i); + ObjectValue* ov = _obj_pool->at(i)->as_ObjectValue(); if (ov->id() == id) { return ov; }