Panther Search Documentation Tutorials Devlogs Downloads Source Code

Documentation > Panther Documentation > Intrinsics > Type Traits

Type Traits

Panther
Documentation


@getTypeID

func @getTypeID = <{T: Type}> () -> TypeID;

Get the TypeID of type T. T cannot be Void.

@arrayElementTypeID

func @arrayElementTypeID = <{T: Type}> () -> TypeID;

Get the TypeID of the elements of an array type T. T must be an array type.

@arrayRefElementTypeID

func @arrayRefElementTypeID = <{T: Type}> () -> TypeID;

Get the TypeID of the elements of an array reference type T. T must be an array reference type.

@numBytes

func @numBytes = <{T: Type, INCLUDE_PADDING: Bool}> () -> USize;

Get the number of bytes of type T. INCLUDE_PADDING if should include padding bytes. T cannot be Void.

@numBits

func @numBits = <{T: Type, INCLUDE_PADDING: Bool}> () -> USize;

Get the number of bits of type T. INCLUDE_PADDING if should include padding bits. T cannot be Void.