Package com.oracle.truffle.api.impl
Class DefaultDirectCallNode
- java.lang.Object
-
- com.oracle.truffle.api.nodes.Node
-
- com.oracle.truffle.api.nodes.DirectCallNode
-
- com.oracle.truffle.api.impl.DefaultDirectCallNode
-
- All Implemented Interfaces:
NodeInterface
,java.lang.Cloneable
public final class DefaultDirectCallNode extends DirectCallNode
This is runtime specific API. Do not use in a guest language.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
Node.Child, Node.Children
-
-
Field Summary
-
Fields inherited from class com.oracle.truffle.api.nodes.DirectCallNode
callTarget
-
-
Constructor Summary
Constructors Constructor Description DefaultDirectCallNode(CallTarget target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
call(VirtualFrame frame, java.lang.Object[] arguments)
Calls the innerCallTarget
returned byDirectCallNode.getCurrentCallTarget()
.boolean
cloneCallTarget()
Clones theCallTarget
instance returned byDirectCallNode.getCallTarget()
in an uninitialized state for thisDirectCallNode
.void
forceInlining()
Enforces the runtime system to inline theCallTarget
at this call site.CallTarget
getClonedCallTarget()
Returns the splitCallTarget
if this call site'sCallTarget
is cloned.boolean
isCallTargetCloningAllowed()
Returnstrue
if the runtime system supports cloning and theRootNode
returnstrue
inRootNode.isCloningAllowed()
.boolean
isInlinable()
Returnstrue
if the underlying runtime system supports inlining for theCallTarget
in thisDirectCallNode
.boolean
isInliningForced()
Returnstrue
if theCallTarget
is forced to be inlined.-
Methods inherited from class com.oracle.truffle.api.nodes.DirectCallNode
getCallTarget, getCurrentCallTarget, getCurrentRootNode, isCallTargetCloned, isInlined, toString
-
Methods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, assignSourceSection, atomic, atomic, clearSourceSection, clone, copy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLanguage, getParent, getRootNode, getSourceSection, insert, insert, isReplaceable, onAdopt, onReplace, replace, replace
-
-
-
-
Constructor Detail
-
DefaultDirectCallNode
public DefaultDirectCallNode(CallTarget target)
-
-
Method Detail
-
call
public java.lang.Object call(VirtualFrame frame, java.lang.Object[] arguments)
Description copied from class:DirectCallNode
Calls the innerCallTarget
returned byDirectCallNode.getCurrentCallTarget()
.- Specified by:
call
in classDirectCallNode
arguments
- the arguments that should be passed to the callee- Returns:
- the return result of the call
-
forceInlining
public void forceInlining()
Description copied from class:DirectCallNode
Enforces the runtime system to inline theCallTarget
at this call site. If the runtime system does not support inlining or it is already inlined this method has no effect. The runtime system may decide to not inline calls which were forced to inline.- Specified by:
forceInlining
in classDirectCallNode
-
isInliningForced
public boolean isInliningForced()
Description copied from class:DirectCallNode
Returnstrue
if theCallTarget
is forced to be inlined. ADirectCallNode
can either be inlined manually by invokingDirectCallNode.forceInlining()
or by the runtime system which may at any point decide to inline.- Specified by:
isInliningForced
in classDirectCallNode
- Returns:
- true if this method was inlined else false.
-
getClonedCallTarget
public CallTarget getClonedCallTarget()
Description copied from class:DirectCallNode
Returns the splitCallTarget
if this call site'sCallTarget
is cloned.- Specified by:
getClonedCallTarget
in classDirectCallNode
- Returns:
- the split
CallTarget
-
cloneCallTarget
public boolean cloneCallTarget()
Description copied from class:DirectCallNode
Clones theCallTarget
instance returned byDirectCallNode.getCallTarget()
in an uninitialized state for thisDirectCallNode
. This can be sensible to gather call site sensitive profiling information for thisDirectCallNode
. IfDirectCallNode.isCallTargetCloningAllowed()
returnsfalse
this method has no effect and returnsfalse
.- Specified by:
cloneCallTarget
in classDirectCallNode
-
isCallTargetCloningAllowed
public boolean isCallTargetCloningAllowed()
Description copied from class:DirectCallNode
Returnstrue
if the runtime system supports cloning and theRootNode
returnstrue
inRootNode.isCloningAllowed()
.- Specified by:
isCallTargetCloningAllowed
in classDirectCallNode
- Returns:
true
if the target is allowed to be cloned.
-
isInlinable
public boolean isInlinable()
Description copied from class:DirectCallNode
Returnstrue
if the underlying runtime system supports inlining for theCallTarget
in thisDirectCallNode
.- Specified by:
isInlinable
in classDirectCallNode
- Returns:
- true if inlining is supported.
-
-