module internal.types.bool¶
Source: stdlib/internal/types/bool.codon
bool @extend Class is extended to add given methods ¶
Magic methods¶
__new__()¶
__new__(what) @overload Function is overloaded ¶
__repr__(self)¶
__copy__(self)¶
__deepcopy__(self)¶
__bool__(self)¶
__hash__(self)¶
__invert__(self) @pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR ¶
%0 = trunc i8 %self to i1
%1 = xor i1 %0, true
%2 = zext i1 %1 to i8
ret i8 %2
__eq__(self, other: bool) @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
__ne__(self, other: bool) @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: bool) @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: bool) @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: bool) @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: bool) @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
__and__(self, other: bool) @pure Function has no side effects and returns same value for same inputs @commutative Binary operator is commutative @associative Binary operator is associative @llvm Function is implemented with inline LLVM IR ¶
%0 = and i8 %self, %other
ret i8 %0
__or__(self, other: bool) @pure Function has no side effects and returns same value for same inputs @commutative Binary operator is commutative @associative Binary operator is associative @llvm Function is implemented with inline LLVM IR ¶
%0 = or i8 %self, %other
ret i8 %0
__xor__(self, other: bool) @pure Function has no side effects and returns same value for same inputs @commutative Binary operator is commutative @associative Binary operator is associative @llvm Function is implemented with inline LLVM IR ¶
%0 = xor i8 %self, %other
ret i8 %0
__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