Mercurial > hg > truffle
changeset 15731:7260016882ef
fix assert in HotSpotResolvedJavaMethod.vtableEntryOffset
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Sat, 17 May 2014 17:04:25 +0200 |
parents | 920b7bb058a6 |
children | 08f131535f9a |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethod.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethod.java Sat May 17 16:29:19 2014 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethod.java Sat May 17 17:04:25 2014 +0200 @@ -595,7 +595,7 @@ * @return the offset of this method into the v-table */ public int vtableEntryOffset(ResolvedJavaType resolved) { - guarantee(isInVirtualMethodTable(resolved) && holder.isInitialized(), "%s does not have a vtable entry", this); + guarantee(isInVirtualMethodTable(resolved), "%s does not have a vtable entry", this); HotSpotVMConfig config = runtime().getConfig(); final int vtableIndex = getVtableIndex(resolved); return config.instanceKlassVtableStartOffset + vtableIndex * config.vtableEntrySize + config.vtableEntryMethodOffset; @@ -607,6 +607,9 @@ } private int getVtableIndex(ResolvedJavaType resolved) { + if (!holder.isLinked()) { + return runtime().getConfig().invalidVtableIndex; + } if (holder.isInterface()) { if (resolved.isArray() || resolved.isInterface()) { return runtime().getConfig().invalidVtableIndex;