Skip to content

module internal.types.byte

Source: stdlib/internal/types/byte.codon


byte @extend Class is extended to add given methods

Magic methods

__new__() @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR

ret i8 0

__new__(b: byte) @overload Function is overloaded

__new__(s: str) @overload Function is overloaded

__new__(i: int) @pure Function has no side effects and returns same value for same inputs @overload Function is overloaded @llvm Function is implemented with inline LLVM IR

%0 = trunc i64 %i to i8
ret i8 %0

__copy__(self)

__deepcopy__(self)

__bool__(self) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR

%0 = icmp ne i8 %self, 0
%1 = zext i1 %0 to i8
ret i8 %1

__eq__(self, other: byte) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR

%0 = icmp eq i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1

__eq__(self, other: int) @overload Function is overloaded

__ne__(self, other: byte) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR

%0 = icmp ne i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1

__lt__(self, other: byte) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR

%0 = icmp ult i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1

__gt__(self, other: byte) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR

%0 = icmp ugt i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1

__le__(self, other: byte) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR

%0 = icmp ule i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1

__ge__(self, other: byte) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR

%0 = icmp uge i8 %self, %other
%1 = zext i1 %0 to i8
ret i8 %1

__str__(self)

__repr__(self)

__int__(self) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR

%0 = zext i8 %self to i64
ret i64 %0

__float__(self) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR

%0 = uitofp i8 %self to double
ret double %0