public class InstanceOfTest extends TypeCheckTest
Modifier and Type | Class and Description |
---|---|
(package private) static class |
InstanceOfTest.A |
(package private) static class |
InstanceOfTest.B |
(package private) static class |
InstanceOfTest.C |
(package private) static class |
InstanceOfTest.D |
(package private) static class |
InstanceOfTest.MyCall |
(package private) static class |
InstanceOfTest.MyMark |
(package private) static class |
InstanceOfTest.MySafepoint |
(package private) static class |
InstanceOfTest.MySite |
GraalCompilerTest.ArgSupplier, GraalCompilerTest.Result
GraalTest.MultiCauseAssertionError
currentProfile
lastCompiledGraph
Constructor and Description |
---|
InstanceOfTest() |
Modifier and Type | Method and Description |
---|---|
static <T> String |
arrayCopyTypeName(T[] original) |
protected StructuredGraph |
buildGraph(String snippet) |
static int |
compareMySites(InstanceOfTest.MySite s1,
InstanceOfTest.MySite s2) |
static int |
compareSites(CompilationResult.Site s1,
CompilationResult.Site s2) |
int |
conditionalInstantiation(Object o) |
boolean |
exactlyObject(Thread thread) |
boolean |
exactlyObjectArray(Thread[] threads) |
boolean |
exactlyString(Thread thread) |
boolean |
exactlyStringArray(Thread[] threads) |
static int |
id(int value) |
boolean |
instanceofString(Thread thread) |
boolean |
instanceofStringArray(Thread[] threads) |
static boolean |
isArrayOfA(Object o) |
static boolean |
isArrayOfB(Object o) |
static boolean |
isArrayOfC(Object o) |
static boolean |
isArrayOfD(Object o) |
static boolean |
isDepth12(Object o) |
static int |
isDepth12Int(Object o) |
static boolean |
isMap(Object o) |
static int |
isMapInt(Object o) |
static boolean |
isString(Object o) |
static int |
isStringInt(Object o) |
static int |
isStringIntComplex(Object o) |
static boolean |
isThrowable(Object o) |
static int |
isThrowableInt(Object o) |
static int |
onlyFirstIsException(Throwable t1,
Throwable t2) |
static String |
removeIntermediateMaterialization(List<Object> list,
Object e,
String a,
String b) |
protected void |
replaceProfile(StructuredGraph graph,
JavaTypeProfile profile) |
void |
test1() |
void |
test10() |
void |
test2() |
void |
test201() |
void |
test3() |
void |
test301() |
void |
test4() |
void |
test5() |
void |
test6() |
void |
test7() |
void |
test8() |
void |
test9() |
void |
testArray() |
void |
testArrayCopy() |
private void |
testConstantReturn(String name,
Object value) |
void |
testInstantiation() |
void |
testRemoveIntermediateMaterialization()
This test exists to show the kind of pattern that is be optimizable by
removeIntermediateMaterialization() in IfNode . |
void |
testTypeCheck()
TypeCheckNode and InstanceOfNode should be equivalently powerful when
comparing disjoint types. |
getCode, parseForCompile, profile, profile, test
addMethod, after, afterTest, applyArgSuppliers, argsWithReceiver, asResolvedJavaMethod, assertConstantReturn, assertEquals, assertEquals, assertEquals, before, beforeTest, branchProbability, breakpoint, breakpoint, checkArgs, checkHighTierGraph, checkLowTierGraph, checkMidTierGraph, compile, countUnusedConstants, createLIRSuites, createSuites, editGraphBuilderConfiguration, executeActual, executeActualCheckDeopt, executeExpected, getBackend, getCanonicalGraphString, getCode, getCode, getCodeCache, getConstantReflection, getCustomGraphBuilderSuite, getDefaultGraphBuilderPlugins, getDefaultGraphBuilderSuite, getDefaultHighTierContext, getLIRSuites, getLowerer, getMetaAccess, getNodeCountExcludingUnusedConstants, getProviders, getReplacements, getResolvedJavaMethod, getResolvedJavaMethod, getResolvedJavaMethod, getSnippetReflection, getSpeculationLog, getSuites, getTarget, initializeDebugging, invoke, isArchitecture, iterationCount, lookupMethod, parseDebug, parseEager, parseEager, parseProfiled, parseProfiled, referenceInvoke, supply, test, test, testAgainstExpected, testAgainstExpected, testN
assertDeepEquals, assertDeepEquals, assertDeepEquals, assertDeepEquals, assertFalse, assertFalse, assertFalse, assertTrue, assertTrue, assertTrue, equalFloatsOrDoublesDelta, fail, getMethod, getMethod, getMethod, ulpsDelta
public InstanceOfTest()
protected void replaceProfile(StructuredGraph graph, JavaTypeProfile profile)
replaceProfile
in class TypeCheckTest
public void test1()
public void test2()
public void test201()
public void test3()
public void test301()
public void test4()
public void test5()
public void test6()
public void test7()
public void test8()
public static int isStringInt(Object o)
public static int isStringIntComplex(Object o)
public static int id(int value)
public static boolean isThrowable(Object o)
public static int onlyFirstIsException(Throwable t1, Throwable t2)
public static int isThrowableInt(Object o)
public static int isDepth12Int(Object o)
public void test9()
public static int compareMySites(InstanceOfTest.MySite s1, InstanceOfTest.MySite s2)
public void test10()
public static int compareSites(CompilationResult.Site s1, CompilationResult.Site s2)
public void testRemoveIntermediateMaterialization()
removeIntermediateMaterialization()
in IfNode
.
The test exists in this source file as the transformation was originally motivated by the
need to remove use of special JumpNodes in the InstanceOfSnippets
.
public static String removeIntermediateMaterialization(List<Object> list, Object e, String a, String b)
public static boolean isArrayOfA(Object o)
public static boolean isArrayOfB(Object o)
public static boolean isArrayOfC(Object o)
public static boolean isArrayOfD(Object o)
public void testArray()
public static <T> String arrayCopyTypeName(T[] original)
public void testArrayCopy()
public int conditionalInstantiation(Object o)
public void testInstantiation()
public boolean exactlyObject(Thread thread)
public boolean exactlyObjectArray(Thread[] threads)
public boolean exactlyString(Thread thread)
public boolean exactlyStringArray(Thread[] threads)
public boolean instanceofStringArray(Thread[] threads)
public boolean instanceofString(Thread thread)
public void testTypeCheck()
TypeCheckNode
and InstanceOfNode
should be equivalently powerful when
comparing disjoint types.private void testConstantReturn(String name, Object value)
protected StructuredGraph buildGraph(String snippet)