public class UnsafeSubstitutionsTest extends MethodSubstitutionTest
Unsafe
methods.Modifier and Type | Class and Description |
---|---|
(package private) static class |
UnsafeSubstitutionsTest.Foo |
GraalCompilerTest.ArgSupplier, GraalCompilerTest.Result
GraalTest.MultiCauseAssertionError
lastCompiledGraph
Constructor and Description |
---|
UnsafeSubstitutionsTest() |
Modifier and Type | Method and Description |
---|---|
private static long |
fooOffset(String name) |
static int |
getAndAddInt(Object obj,
long offset,
int delta) |
static long |
getAndAddLong(Object obj,
long offset,
long delta) |
static int |
getAndSetInt(Object obj,
long offset,
int newValue) |
static long |
getAndSetLong(Object obj,
long offset,
long newValue) |
static Object |
getAndSetObject(Object obj,
long offset,
Object newValue) |
(package private) static long |
off(Object o,
String name) |
void |
testGetAndAddInt() |
void |
testGetAndAddLong() |
void |
testGetAndSetInt() |
void |
testGetAndSetLong() |
void |
testGetAndSetObject() |
void |
testSubstitution(String testMethodName,
Class<?> holder,
String methodName,
Class<?>[] parameterTypes,
Object receiver,
Object[] args1,
Object[] args2) |
void |
testUnsafeSubstitutions() |
static boolean |
unsafeCompareAndSwapInt(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static boolean |
unsafeCompareAndSwapLong(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static boolean |
unsafeCompareAndSwapObject(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static double |
unsafeDirectMemoryRead(sun.misc.Unsafe unsafe,
long address) |
static double |
unsafeDirectMemoryWrite(sun.misc.Unsafe unsafe,
long address,
long value) |
static long |
unsafeGetAddress(sun.misc.Unsafe unsafe,
long offset) |
static boolean |
unsafeGetBoolean(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static int |
unsafeGetByte(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static int |
unsafeGetChar(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static double |
unsafeGetDouble(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static float |
unsafeGetFloat(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static int |
unsafeGetInt(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static long |
unsafeGetLong(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static boolean |
unsafeGetObject(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static int |
unsafeGetShort(sun.misc.Unsafe unsafe,
Object obj,
long offset) |
static long |
unsafePutAddress(sun.misc.Unsafe unsafe,
long offset,
long value) |
static int |
unsafePutBoolean(sun.misc.Unsafe unsafe,
Object obj,
long offset,
boolean value) |
static int |
unsafePutByte(sun.misc.Unsafe unsafe,
Object obj,
long offset,
byte value) |
static int |
unsafePutChar(sun.misc.Unsafe unsafe,
Object obj,
long offset,
char value) |
static double |
unsafePutDouble(sun.misc.Unsafe unsafe,
Object obj,
long offset,
double value) |
static float |
unsafePutFloat(sun.misc.Unsafe unsafe,
Object obj,
long offset,
float value) |
static int |
unsafePutInt(sun.misc.Unsafe unsafe,
Object obj,
long offset,
int value) |
static long |
unsafePutLong(sun.misc.Unsafe unsafe,
Object obj,
long offset,
long value) |
static Object[] |
unsafePutObject(sun.misc.Unsafe unsafe,
Object obj,
long offset,
Object value1,
Object value2,
Object value3) |
static int |
unsafePutShort(sun.misc.Unsafe unsafe,
Object obj,
long offset,
short value) |
assertInGraph, assertNotInGraph, executeVarargsSafe, invokeSafe, testGraph, testSubstitution
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, 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, parseForCompile, 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 UnsafeSubstitutionsTest()
public void testSubstitution(String testMethodName, Class<?> holder, String methodName, Class<?>[] parameterTypes, Object receiver, Object[] args1, Object[] args2)
public void testUnsafeSubstitutions() throws Exception
Exception
public static boolean unsafeCompareAndSwapInt(sun.misc.Unsafe unsafe, Object obj, long offset)
public static boolean unsafeCompareAndSwapLong(sun.misc.Unsafe unsafe, Object obj, long offset)
public static boolean unsafeCompareAndSwapObject(sun.misc.Unsafe unsafe, Object obj, long offset)
public static boolean unsafeGetBoolean(sun.misc.Unsafe unsafe, Object obj, long offset)
public static int unsafeGetByte(sun.misc.Unsafe unsafe, Object obj, long offset)
public static int unsafeGetShort(sun.misc.Unsafe unsafe, Object obj, long offset)
public static int unsafeGetChar(sun.misc.Unsafe unsafe, Object obj, long offset)
public static int unsafeGetInt(sun.misc.Unsafe unsafe, Object obj, long offset)
public static long unsafeGetLong(sun.misc.Unsafe unsafe, Object obj, long offset)
public static float unsafeGetFloat(sun.misc.Unsafe unsafe, Object obj, long offset)
public static double unsafeGetDouble(sun.misc.Unsafe unsafe, Object obj, long offset)
public static boolean unsafeGetObject(sun.misc.Unsafe unsafe, Object obj, long offset)
public static int unsafePutBoolean(sun.misc.Unsafe unsafe, Object obj, long offset, boolean value)
public static int unsafePutByte(sun.misc.Unsafe unsafe, Object obj, long offset, byte value)
public static int unsafePutShort(sun.misc.Unsafe unsafe, Object obj, long offset, short value)
public static int unsafePutChar(sun.misc.Unsafe unsafe, Object obj, long offset, char value)
public static int unsafePutInt(sun.misc.Unsafe unsafe, Object obj, long offset, int value)
public static long unsafePutLong(sun.misc.Unsafe unsafe, Object obj, long offset, long value)
public static float unsafePutFloat(sun.misc.Unsafe unsafe, Object obj, long offset, float value)
public static double unsafePutDouble(sun.misc.Unsafe unsafe, Object obj, long offset, double value)
public static Object[] unsafePutObject(sun.misc.Unsafe unsafe, Object obj, long offset, Object value1, Object value2, Object value3)
public static long unsafeGetAddress(sun.misc.Unsafe unsafe, long offset)
public static long unsafePutAddress(sun.misc.Unsafe unsafe, long offset, long value)
public static double unsafeDirectMemoryRead(sun.misc.Unsafe unsafe, long address)
public static double unsafeDirectMemoryWrite(sun.misc.Unsafe unsafe, long address, long value)
public void testGetAndAddInt() throws Exception
Exception
public static int getAndAddInt(Object obj, long offset, int delta)
public void testGetAndAddLong() throws Exception
Exception
public static long getAndAddLong(Object obj, long offset, long delta)
public void testGetAndSetInt() throws Exception
Exception
public static int getAndSetInt(Object obj, long offset, int newValue)
public void testGetAndSetLong() throws Exception
Exception
public static long getAndSetLong(Object obj, long offset, long newValue)
public void testGetAndSetObject() throws Exception
Exception
public static Object getAndSetObject(Object obj, long offset, Object newValue)