public class SubstrateOptimizedCallTargetInstalledCode extends jdk.vm.ci.code.InstalledCode implements SubstrateInstalledCode, org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency
SubstrateOptimizedCallTarget
.
Assume that methods return stale values because internal state can change at any safepoint (see
SubstrateInstalledCode
).
SubstrateInstalledCode.Factory
Modifier and Type | Field and Description |
---|---|
protected SubstrateOptimizedCallTarget |
callTarget |
Modifier | Constructor and Description |
---|---|
protected |
SubstrateOptimizedCallTargetInstalledCode(SubstrateOptimizedCallTarget callTarget) |
Modifier and Type | Method and Description |
---|---|
void |
clearAddress()
This method is called during code uninstallation.
|
Object |
executeVarargs(Object... args) |
byte[] |
getCode() |
org.graalvm.compiler.truffle.common.CompilableTruffleAST |
getCompilable() |
jdk.vm.ci.meta.ResolvedJavaMethod |
getMethod()
Returns the last method object passed to
SubstrateInstalledCode.setAddress(long, jdk.vm.ci.meta.ResolvedJavaMethod) . |
String |
getName() |
SubstrateSpeculationLog |
getSpeculationLog() |
long |
getStart() |
void |
invalidate()
Invalidates this installed code and deoptimizes all live invocations, after which both
SubstrateInstalledCode.isValid() and SubstrateInstalledCode.isAlive() return false . |
void |
invalidateWithoutDeoptimization()
Make this code non-entrant, but let live invocations continue execution.
|
boolean |
isValid()
Returns false if not valid, including if previously invalidated without deoptimization in which case there can still be
live activations.
|
void |
onAssumptionInvalidated(Object source,
CharSequence reason) |
void |
setAddress(long address,
jdk.vm.ci.meta.ResolvedJavaMethod method)
Called during code installation: initialize this instance with the given address where its
instructions are, and the method it was compiled from.
|
void |
setCompilationId(org.graalvm.compiler.core.common.CompilationIdentifier id)
Sets the identifier of the compilation that resulted in this code, which can be used to
provide additional information in
SubstrateInstalledCode.getName() . |
getAddress, getEntryPoint, getVersion, isAlive
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAddress, getEntryPoint, isAlive
protected final SubstrateOptimizedCallTarget callTarget
protected SubstrateOptimizedCallTargetInstalledCode(SubstrateOptimizedCallTarget callTarget)
public final void invalidate()
SubstrateInstalledCode
SubstrateInstalledCode.isValid()
and SubstrateInstalledCode.isAlive()
return false
.invalidate
in interface SubstrateInstalledCode
invalidate
in class jdk.vm.ci.code.InstalledCode
public void onAssumptionInvalidated(Object source, CharSequence reason)
onAssumptionInvalidated
in interface org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency
public boolean isValid()
SubstrateOptimizedCallTargetInstalledCode.invalidate()
must still be called even when this method returns false.isValid
in interface SubstrateInstalledCode
isValid
in interface org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency
isValid
in class jdk.vm.ci.code.InstalledCode
public org.graalvm.compiler.truffle.common.CompilableTruffleAST getCompilable()
getCompilable
in interface org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency
public SubstrateSpeculationLog getSpeculationLog()
getSpeculationLog
in interface SubstrateInstalledCode
public void setCompilationId(org.graalvm.compiler.core.common.CompilationIdentifier id)
SubstrateInstalledCode
SubstrateInstalledCode.getName()
.setCompilationId
in interface SubstrateInstalledCode
public String getName()
getName
in interface SubstrateInstalledCode
getName
in class jdk.vm.ci.code.InstalledCode
public jdk.vm.ci.meta.ResolvedJavaMethod getMethod()
SubstrateInstalledCode
SubstrateInstalledCode.setAddress(long, jdk.vm.ci.meta.ResolvedJavaMethod)
. The return value might be
passed as the argument to future calls to SubstrateInstalledCode.setAddress(long, jdk.vm.ci.meta.ResolvedJavaMethod)
.
May return null
if the subclass does not have a use for the method object (also not
in SubstrateInstalledCode.setAddress(long, jdk.vm.ci.meta.ResolvedJavaMethod)
) and therefore no need to retain it. Expected to return null
if SubstrateInstalledCode.setAddress(long, jdk.vm.ci.meta.ResolvedJavaMethod)
has never been called, or after SubstrateInstalledCode.clearAddress()
has been called.
getMethod
in interface SubstrateInstalledCode
public void setAddress(long address, jdk.vm.ci.meta.ResolvedJavaMethod method)
SubstrateInstalledCode
SubstrateInstalledCode.getAddress()
and
SubstrateInstalledCode.getEntryPoint()
return the given address, and SubstrateInstalledCode.isValid()
and
SubstrateInstalledCode.isAlive()
return true
.setAddress
in interface SubstrateInstalledCode
public void clearAddress()
SubstrateInstalledCode
SubstrateInstalledCode.invalidate()
instead.
Reset this instance so that SubstrateInstalledCode.getAddress()
and SubstrateInstalledCode.getEntryPoint()
return 0, and
SubstrateInstalledCode.isValid()
and SubstrateInstalledCode.isAlive()
return false
.
clearAddress
in interface SubstrateInstalledCode
public void invalidateWithoutDeoptimization()
SubstrateInstalledCode
SubstrateInstalledCode.isValid()
returns false
, SubstrateInstalledCode.isAlive()
returns true
, and
SubstrateInstalledCode.getEntryPoint()
returns 0.invalidateWithoutDeoptimization
in interface SubstrateInstalledCode
public long getStart()
getStart
in class jdk.vm.ci.code.InstalledCode
public byte[] getCode()
getCode
in class jdk.vm.ci.code.InstalledCode