Package org.pkl.core.ast.type
Class TypeNode.NumberTypeNode
- java.lang.Object
-
- com.oracle.truffle.api.nodes.Node
-
- org.pkl.core.ast.PklNode
-
- org.pkl.core.ast.type.TypeNode
-
- org.pkl.core.ast.type.TypeNode.FrameSlotTypeNode
-
- org.pkl.core.ast.type.TypeNode.NumberTypeNode
-
- All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface,java.lang.Cloneable
- Enclosing class:
- TypeNode
public static final class TypeNode.NumberTypeNode extends TypeNode.FrameSlotTypeNode
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pkl.core.ast.type.TypeNode
TypeNode.AnyTypeNode, TypeNode.BooleanTypeNode, TypeNode.CollectionTypeNode, TypeNode.ConstrainedTypeNode, TypeNode.DynamicTypeNode, TypeNode.FinalClassTypeNode, TypeNode.FinalModuleTypeNode, TypeNode.FloatTypeNode, TypeNode.FrameSlotTypeNode, TypeNode.FunctionClassTypeNode, TypeNode.FunctionNClassTypeNode, TypeNode.FunctionTypeNode, TypeNode.Int16TypeAliasTypeNode, TypeNode.Int32TypeAliasTypeNode, TypeNode.Int8TypeAliasTypeNode, TypeNode.IntSlotTypeNode, TypeNode.IntTypeNode, TypeNode.ListingOrMappingTypeNode, TypeNode.ListingTypeNode, TypeNode.ListTypeNode, TypeNode.MappingTypeNode, TypeNode.MapTypeNode, TypeNode.NonFinalClassTypeNode, TypeNode.NonFinalModuleTypeNode, TypeNode.NonNullTypeAliasTypeNode, TypeNode.NothingTypeNode, TypeNode.NullableTypeNode, TypeNode.NumberTypeNode, TypeNode.ObjectSlotTypeNode, TypeNode.PairTypeNode, TypeNode.SetTypeNode, TypeNode.StringLiteralTypeNode, TypeNode.StringTypeNode, TypeNode.TypeAliasTypeNode, TypeNode.TypedTypeNode, TypeNode.TypeVariableNode, TypeNode.UIntTypeAliasTypeNode, TypeNode.UnionOfStringLiteralsTypeNode, TypeNode.UnionTypeNode, TypeNode.UnknownTypeNode, TypeNode.VarArgsTypeNode, TypeNode.WriteFrameSlotTypeNode
-
-
Field Summary
-
Fields inherited from class org.pkl.core.ast.type.TypeNode.FrameSlotTypeNode
slot, writeFrameSlotNode
-
Fields inherited from class org.pkl.core.ast.PklNode
sourceSection
-
-
Constructor Summary
Constructors Constructor Description NumberTypeNode(com.oracle.truffle.api.source.SourceSection sourceSection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(com.oracle.truffle.api.frame.VirtualFrame frame, java.lang.Object value)Checks if `value` conforms to this type.voidexecuteAndSet(com.oracle.truffle.api.frame.VirtualFrame frame, java.lang.Object value)Checks if `value` conforms to this type.com.oracle.truffle.api.frame.FrameSlotKindgetFrameSlotKind()VmClassgetVmClass()-
Methods inherited from class org.pkl.core.ast.type.TypeNode.FrameSlotTypeNode
initWriteSlotNode
-
Methods inherited from class org.pkl.core.ast.type.TypeNode
createDefaultValue, doExport, export, forClass, getMirror, getMirror, getMirrors, getTypeArgumentMirrors, getVmTypeAlias, isNoopTypeCheck, typeMismatch
-
Methods inherited from class org.pkl.core.ast.PklNode
exceptionBuilder, getShortName, getSourceSection, toString
-
Methods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize
-
-
-
-
Method Detail
-
getFrameSlotKind
public com.oracle.truffle.api.frame.FrameSlotKind getFrameSlotKind()
- Specified by:
getFrameSlotKindin classTypeNode
-
execute
public void execute(com.oracle.truffle.api.frame.VirtualFrame frame, java.lang.Object value)Description copied from class:TypeNodeChecks if `value` conforms to this type. If so, returns normally. Otherwise, throws a `VmTypeMismatchException`.
-
executeAndSet
public void executeAndSet(com.oracle.truffle.api.frame.VirtualFrame frame, java.lang.Object value)Description copied from class:TypeNodeChecks if `value` conforms to this type. If so, sets `slot` to `value`. Otherwise, throws a `VmTypeMismatchException`.- Specified by:
executeAndSetin classTypeNode
-
getVmClass
public VmClass getVmClass()
- Overrides:
getVmClassin classTypeNode
-
-