Skip to content

Commit

Permalink
[GR-9404] Enable the Stamp.readConstant tests.
Browse files Browse the repository at this point in the history
PullRequest: graal/1346
  • Loading branch information
tkrodriguez committed Apr 17, 2018
2 parents 6e1067e + 6e479e4 commit ca071b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.core.common.type.StampFactory;
import org.junit.Ignore;
import org.junit.Test;

import jdk.vm.ci.meta.JavaConstant;
Expand All @@ -36,21 +35,23 @@
*/
public class StampMemoryAccessTest extends GraalCompilerTest {

@Ignore("not all JVMCI versions are safe yet")
@Test
public void testReadPrimitive() {
MemoryAccessProvider memory = getConstantReflection().getMemoryAccessProvider();
JavaConstant base = getSnippetReflection().forObject("");
Stamp stamp = StampFactory.forKind(JavaKind.Long);
assertTrue(stamp.readConstant(memory, base, 128) == null);
JavaConstant objectBase = getSnippetReflection().forObject("");
assertTrue(stamp.readConstant(memory, objectBase, 128) == null);
JavaConstant arrayBase = getSnippetReflection().forObject(new int[]{});
assertTrue(stamp.readConstant(memory, arrayBase, 128) == null);
}

@Ignore("not all JVMCI versions are safe yet")
@Test
public void testReadObject() {
MemoryAccessProvider memory = getConstantReflection().getMemoryAccessProvider();
JavaConstant base = getSnippetReflection().forObject("");
Stamp stamp = StampFactory.forKind(JavaKind.Object);
assertTrue(stamp.readConstant(memory, base, 128) == null);
JavaConstant objectBase = getSnippetReflection().forObject("");
assertTrue(stamp.readConstant(memory, objectBase, 128) == null);
JavaConstant arrayBase = getSnippetReflection().forObject(new int[]{});
assertTrue(stamp.readConstant(memory, arrayBase, 128) == null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.graalvm.compiler.core.common.type.StampFactory;
import org.graalvm.compiler.hotspot.nodes.type.HotSpotNarrowOopStamp;
import org.junit.Assume;
import org.junit.Ignore;
import org.junit.Test;

import jdk.vm.ci.meta.JavaConstant;
Expand All @@ -37,7 +36,6 @@

public class HotSpotStampMemoryAccessTest extends HotSpotGraalCompilerTest {

@Ignore("not all versions are safe yet")
@Test
public void testReadNarrowObject() {
CompressEncoding oopEncoding = runtime().getVMConfig().getOopEncoding();
Expand Down

0 comments on commit ca071b9

Please sign in to comment.