public class KnownIntrinsics extends Object
| Constructor and Description |
|---|
KnownIntrinsics() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
castExact(Object object,
Class<T> clazz)
Casts the given object to the exact class represented by
clazz. |
static void |
farReturn(Object result,
org.graalvm.word.Pointer sp,
org.graalvm.nativeimage.c.function.CodePointer ip,
boolean fromMethodWithCalleeSavedRegisters)
Continues execution in the specified caller frame, at the specified instruction pointer.
|
static org.graalvm.word.Pointer |
heapBase()
Returns the value of the heap base.
|
static boolean |
isDeoptimizationTarget()
For deoptimization testing only.
|
static org.graalvm.word.Pointer |
nonNullPointer(org.graalvm.word.Pointer pointer)
Narrow down the range of values to exclude 0 as the possible pointer value.
|
static org.graalvm.word.Pointer |
readCallerStackPointer()
Returns the value of the native stack pointer for the physical caller frame.
|
static DynamicHub |
readHub(Object obj)
Returns the hub of the given object.
|
static org.graalvm.nativeimage.c.function.CodePointer |
readReturnAddress()
Returns the value of the native instruction pointer for the physical caller frame.
|
static org.graalvm.word.Pointer |
readStackPointer()
Returns the value of the native stack pointer.
|
static void |
testDeoptimize()
For deoptimization testing only.
|
public static org.graalvm.word.Pointer heapBase()
public static DynamicHub readHub(Object obj)
public static org.graalvm.word.Pointer nonNullPointer(org.graalvm.word.Pointer pointer)
pointer - that we are narrowing to non-nullpublic static org.graalvm.word.Pointer readStackPointer()
public static org.graalvm.word.Pointer readCallerStackPointer()
NeverInline to ensure that the
physical caller frame is deterministic.public static org.graalvm.nativeimage.c.function.CodePointer readReturnAddress()
NeverInline to ensure that the
physical caller frame is deterministic.public static void farReturn(Object result, org.graalvm.word.Pointer sp, org.graalvm.nativeimage.c.function.CodePointer ip, boolean fromMethodWithCalleeSavedRegisters)
public static void testDeoptimize()
public static boolean isDeoptimizationTarget()
true in a deoptimization target method
and to false in a deoptimization source method.public static <T> T castExact(Object object, Class<T> clazz)
clazz. The cast succeeds
only if object == null || object.getClass() == clazz and thus fails for any subclass.object - the object to be castclazz - the class to check against, must not be nullClassCastException - if the object is non-null and not exactly of the given classNullPointerException - if the class argument is nullClass.cast(Object)