module internal.types.generator
¶
Source: stdlib/internal/types/generator.codon
Generator[T]
@extend Class is extended to add given methods ¶
Magic methods¶
__promise__(self)
@internal Function is compiler-generated ¶
__iter__(self)
¶
__raw__(self)
@pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR ¶
ret ptr %self
__new__(ptr: cobj)
@pure Function has no side effects and returns same value for same inputs @derives Function return value captures arguments @llvm Function is implemented with inline LLVM IR ¶
ret ptr %ptr
__new__()
@overload Function is overloaded ¶
__done__(self)
@pure Function has no side effects and returns same value for same inputs @llvm Function is implemented with inline LLVM IR ¶
declare i1 @llvm.coro.done(ptr nocapture readonly)
%0 = call i1 @llvm.coro.done(ptr %self)
%1 = zext i1 %0 to i8
ret i8 %1
__resume__(self)
@nocapture Function does not capture arguments (return value might capture) @llvm Function is implemented with inline LLVM IR ¶
declare void @llvm.coro.resume(ptr)
call void @llvm.coro.resume(ptr %self)
ret {} {}
__repr__(self)
¶
Methods¶
done(self)
¶
next(self: Generator[T])
¶
send(self, what: T)
¶
destroy(self)
@nocapture Function does not capture arguments (return value might capture) @llvm Function is implemented with inline LLVM IR ¶
declare void @llvm.coro.destroy(ptr)
call void @llvm.coro.destroy(ptr %self)
ret {} {}