< prev index next >
test/compiler/jvmci/errors/TestInvalidOopMap.java
Print this page
*** 27,37 ****
* @modules jdk.vm.ci/jdk.vm.ci.hotspot
* jdk.vm.ci/jdk.vm.ci.code
* jdk.vm.ci/jdk.vm.ci.code.site
* jdk.vm.ci/jdk.vm.ci.meta
* jdk.vm.ci/jdk.vm.ci.runtime
- * jdk.vm.ci/jdk.vm.ci.common
* @compile CodeInstallerTest.java
* @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidOopMap
*/
package compiler.jvmci.errors;
--- 27,36 ----
*** 44,54 ****
import jdk.vm.ci.code.StackSlot;
import jdk.vm.ci.code.site.DataPatch;
import jdk.vm.ci.code.site.Infopoint;
import jdk.vm.ci.code.site.InfopointReason;
import jdk.vm.ci.code.site.Site;
- import jdk.vm.ci.common.JVMCIError;
import jdk.vm.ci.hotspot.HotSpotCompiledCode.Comment;
import jdk.vm.ci.hotspot.HotSpotReferenceMap;
import jdk.vm.ci.hotspot.HotSpotVMConfig;
import jdk.vm.ci.meta.Assumptions.Assumption;
import jdk.vm.ci.meta.JavaKind;
--- 43,52 ----
*** 74,84 ****
@Test(expected = NullPointerException.class)
public void testMissingReferenceMap() {
test(null);
}
! @Test(expected = JVMCIError.class)
public void testInvalidReferenceMap() {
test(new InvalidReferenceMap());
}
@Test(expected = NullPointerException.class)
--- 72,82 ----
@Test(expected = NullPointerException.class)
public void testMissingReferenceMap() {
test(null);
}
! @Test(expected = InternalError.class)
public void testInvalidReferenceMap() {
test(new InvalidReferenceMap());
}
@Test(expected = NullPointerException.class)
*** 94,109 ****
@Test(expected = NullPointerException.class)
public void testNullSize() {
test(new HotSpotReferenceMap(new Location[0], new Location[0], null, 8));
}
! @Test(expected = JVMCIError.class)
public void testInvalidLength() {
test(new HotSpotReferenceMap(new Location[1], new Location[2], new int[3], 8));
}
! @Test(expected = JVMCIError.class)
public void testInvalidShortOop() {
PlatformKind kind = arch.getPlatformKind(JavaKind.Short);
Register reg = getRegister(kind, 0);
Location[] oops = new Location[]{Location.register(reg)};
--- 92,107 ----
@Test(expected = NullPointerException.class)
public void testNullSize() {
test(new HotSpotReferenceMap(new Location[0], new Location[0], null, 8));
}
! @Test(expected = InternalError.class)
public void testInvalidLength() {
test(new HotSpotReferenceMap(new Location[1], new Location[2], new int[3], 8));
}
! @Test(expected = InternalError.class)
public void testInvalidShortOop() {
PlatformKind kind = arch.getPlatformKind(JavaKind.Short);
Register reg = getRegister(kind, 0);
Location[] oops = new Location[]{Location.register(reg)};
*** 111,124 ****
int[] size = new int[]{kind.getSizeInBytes()};
test(new HotSpotReferenceMap(oops, base, size, 8));
}
! @Test(expected = JVMCIError.class)
public void testInvalidNarrowDerivedOop() {
if (!HotSpotVMConfig.config().useCompressedOops) {
! throw new JVMCIError("skipping test");
}
PlatformKind kind = arch.getPlatformKind(JavaKind.Int);
Register reg = getRegister(kind, 0);
Register baseReg = getRegister(arch.getPlatformKind(JavaKind.Object), 1);
--- 109,122 ----
int[] size = new int[]{kind.getSizeInBytes()};
test(new HotSpotReferenceMap(oops, base, size, 8));
}
! @Test(expected = InternalError.class)
public void testInvalidNarrowDerivedOop() {
if (!HotSpotVMConfig.config().useCompressedOops) {
! throw new InternalError("skipping test");
}
PlatformKind kind = arch.getPlatformKind(JavaKind.Int);
Register reg = getRegister(kind, 0);
Register baseReg = getRegister(arch.getPlatformKind(JavaKind.Object), 1);
< prev index next >