Mercurial > hg > graal-jvmci-8
comparison jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java @ 23667:f60746f36f3f
Properly track HotSpotConstantPool as metadata and fix bug that cause metadata to be lost during unloading
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 06 Jun 2016 12:22:14 -0700 |
parents | 1d4ce2d19e52 |
children | d995c88d9cd9 |
comparison
equal
deleted
inserted
replaced
23666:3fa6348084a0 | 23667:f60746f36f3f |
---|---|
194 * @param metaspaceConstantPool a metaspace ConstantPool object | 194 * @param metaspaceConstantPool a metaspace ConstantPool object |
195 * @return the {@link HotSpotConstantPool} corresponding to {@code metaspaceConstantPool} | 195 * @return the {@link HotSpotConstantPool} corresponding to {@code metaspaceConstantPool} |
196 */ | 196 */ |
197 @SuppressWarnings("unused") | 197 @SuppressWarnings("unused") |
198 private static HotSpotConstantPool fromMetaspace(long metaspaceConstantPool) { | 198 private static HotSpotConstantPool fromMetaspace(long metaspaceConstantPool) { |
199 return new HotSpotConstantPool(metaspaceConstantPool); | 199 HotSpotConstantPool cp = new HotSpotConstantPool(metaspaceConstantPool); |
200 runtime().metaAccessContext.add(cp); | |
201 return cp; | |
200 } | 202 } |
201 | 203 |
202 private HotSpotConstantPool(long metaspaceConstantPool) { | 204 private HotSpotConstantPool(long metaspaceConstantPool) { |
203 this.metaspaceConstantPool = metaspaceConstantPool; | 205 this.metaspaceConstantPool = metaspaceConstantPool; |
204 } | 206 } |