Package com.oracle.truffle.api.dsl
Class InlineSupport.InlineTarget
java.lang.Object
com.oracle.truffle.api.dsl.InlineSupport.InlineTarget
- Enclosing class:
InlineSupport
An inline targert for an inlinable node. This is used as first parameter of an inline method.
The inline method is used by generated Truffle DSL code as well as manually written inlinable
nodes.
Usage example:
public static InlinedCountingConditionProfile inline( @RequiredField(value = StateField.class, bits = 7) // @RequiredField(value = PrimitiveIntField.class) // @RequiredField(value = ReferenceField.class, type = String.class) InlineTarget target) { StateField state = target.getState(0, 7); PrimitiveIntField primitive = target.getPrimitive(1, PrimitiveIntField.class); ReferenceField reference = target.getReference(2, String.class); // pass fields on to inline node }
- Since:
- 23.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic InlineSupport.InlineTarget
create
(Class<?> targetClass, InlineSupport.InlinableField... updaters) Creates an inline target for an inlined node.<T extends InlineSupport.InlinableField>
TgetPrimitive
(int index, Class<T> fieldClass) Requests a primitive field for a given field index.<V> InlineSupport.ReferenceField
<V> getReference
(int index, Class<?> valueClass) Requests a reference field for a given field index.getState
(int index, int minimumBits) Requests a state field for a given field index.Class
<?> Returns static target class this inlining specification was applied.
-
Method Details
-
getTargetClass
Returns static target class this inlining specification was applied.- Since:
- 23.0
-
getPrimitive
Requests a primitive field for a given field index. Fields that are requested from a target must match the required fields specified usingInlineSupport.RequiredField
on the target parameter of an inline method otherwise anIncompatibleClassChangeError
is thrown.- Since:
- 23.0
-
getState
Requests a state field for a given field index. Fields that are requested from a target must match the required fields specified usingInlineSupport.RequiredField
on the target parameter of an inline method otherwise anIncompatibleClassChangeError
is thrown.- Since:
- 23.0
-
getReference
Requests a reference field for a given field index. Fields that are requested from a target must match the required fields specified usingInlineSupport.RequiredField
on the target parameter of an inline method otherwise anIncompatibleClassChangeError
is thrown.- Since:
- 23.0
-
create
public static InlineSupport.InlineTarget create(Class<?> targetClass, InlineSupport.InlinableField... updaters) Creates an inline target for an inlined node. Intended for use by generated code only.- Since:
- 23.0
-