Package com.oracle.truffle.api.nodes
Enum Class NodeCost
- All Implemented Interfaces:
Serializable
,Comparable<NodeCost>
,Constable
Deprecated.
in 24.1 without replacement
Represents a rough estimate for the cost of a
Node
. This estimate can be used by runtime
systems or guest languages to implement heuristics based on Truffle ASTs.- Since:
- 0.8 or earlier
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionDeprecated.This node represents a megamorphic version of an operation.Deprecated.This node represents a specialized monomorphic version of an operation.Deprecated.This node has literally no costs and should be ignored for heuristics.Deprecated.This node represents a polymorphic version of an operation.Deprecated.This node has aCompilerDirectives.transferToInterpreter()
orCompilerDirectives.transferToInterpreterAndInvalidate()
as its first unconditional statement. -
Method Summary
Modifier and TypeMethodDescriptionstatic NodeCost
fromCount
(int nodeCount) Deprecated.Finds the node cost for an associated node count.boolean
Deprecated.static NodeCost
Deprecated.Returns the enum constant of this class with the specified name.static NodeCost[]
values()
Deprecated.Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Deprecated.This node has literally no costs and should be ignored for heuristics. This is particularly useful for wrapper and profiling nodes which should not influence the heuristics.- Since:
- 0.8 or earlier
-
UNINITIALIZED
Deprecated.This node has aCompilerDirectives.transferToInterpreter()
orCompilerDirectives.transferToInterpreterAndInvalidate()
as its first unconditional statement.- Since:
- 0.8 or earlier
-
MONOMORPHIC
Deprecated.This node represents a specialized monomorphic version of an operation.- Since:
- 0.8 or earlier
-
POLYMORPHIC
Deprecated.This node represents a polymorphic version of an operation. For multiple chained polymorphic nodes the first may returnMONOMORPHIC
and all additional nodes should returnPOLYMORPHIC
.- Since:
- 0.8 or earlier
-
MEGAMORPHIC
Deprecated.This node represents a megamorphic version of an operation. This value should only be used if the operation implementation supports monomorphism and polymorphism otherwiseMONOMORPHIC
should be used instead.- Since:
- 0.8 or earlier
-
-
Method Details
-
values
Deprecated.Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Deprecated.Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isTrivial
public boolean isTrivial()Deprecated.- Since:
- 0.8 or earlier
-
fromCount
Deprecated.Finds the node cost for an associated node count. ReturnsUNINITIALIZED
for 0,MONOMORPHIC
for 1 andPOLYMORPHIC
for any other value.- Since:
- 19.0
-