type Architecture = enum { X86_64, }
Enum to specify the architecture compiling for / on. Use @config.architecture to access the current target architecture.
type Platform = enum { WINDOWS, }
Enum to specify the platform compiling for / on. Use @config.platform to access the current target platform.
type Mode = enum { COMPILE, COMPILE_RUN, SCRIPT, BUILD, }
Enum to specify the compiler mode. Use @config.mode to access the current mode.
type WindowsSubsystem = enum { COMPILE, COMPILE_RUN, SCRIPT, BUILD, }
Enum to specify the target windows subsystem. Use @config.windowsSubsystem to access the current windows subsystem.
type OptMode = enum { NONE, SPEED_MINOR, SPEED, SPEED_AGRESSIVE, SIZE, SIZE_AGRESSIVE, }
Enum to specify the optimization mode. Use @config.optMode to access the current optimization mode.
type CallingConvention = enum { FAST, COLD, C, WIN_API, }
Enum to specify the different function calling conventions. For use in function attribute #callConv (not including attribute #callConv means the function has the FAST calling convention).
These intrinsic types are helpers for intrinsic functions meant for internal use by the standard library.
type AtomicOrdering = enum { MONOTONIC, ACQUIRE, RELEASE, ACQ_REL, SEQ_CST, }
Enum to specify the different atomic orderings. All orderings guarantee atomicity. Use of any ordering other than SEQ_CST should only be done if the developer is 100% sure it is safe to do so.
Has no synchronization or ordering constraints. Can be used on any atomic operation.
This is equivalent to "relaxed" in C/C++.
No memory operations in the current thread can be reordered to before this operation. Can be used on load atomic operations.
No memory operations in the current thread can be reordered to after this operation. Can be used on store atomic operations.
Acquire Release. Performs an acquire and a release operation. No memory operations in the current thread can be reordered to before acquire or to after the release. Can be used on read-modify-write atomic operation.
Sequentially-consistent. Performs an acquire for a load, a release for a store, acquire-release for a read-modify-write operation. In addition, all threads observe all modifications in the same order. Can be used on any atomic operation.
type AtomicRMWOp = enum { XCHG, ADD, SUB, AND, NAND, OR, XOR, MIN, MAX, }
For use in @atomicRMW to denote the operation to use.
interface Iterable = { func createIterator = (this) -> impl($$:@pthr.Iterator); func createIterator = (this mut) -> impl($$:@pthr.MutIterator); } interface IterableRT = { func createIterator = (this) #rt -> impl($$:@pthr.Iterator); func createIterator = (this mut) #rt -> impl($$:@pthr.MutIterator); }
Interface to define iterable types. Should be used if the type uses the array iterable model.
interface IterableRef = { func createIterator = (this) -> impl($$:@pthr.Iterator); } interface IterableRefRT = { func createIterator = (this) #rt -> impl($$:@pthr.Iterator); }
Interface to define iterable types. Should be used if the type uses the array reference iterable model.
interface IterableMutRef = { func createIterator = (this) -> impl($$:@pthr.MutIterator); } interface IterableMutRefRT = { func createIterator = (this) #rt -> impl($$:@pthr.MutIterator); }
Interface to define iterable types. Should be used if the type uses the mutable array reference iterable model.
interface Iterator = { func next = (this mut) -> Void; func get = (this) -> $$*; func atEnd = (this) -> Bool; } interface IteratorRT = { func next = (this mut) #rt -> Void; func get = (this) #rt -> $$*; func atEnd = (this) #rt -> Bool; }
Interface to define an iterator.
interface MutIterator = { func next = (this mut) -> Void; func get = (this) -> $$*mut; func atEnd = (this) -> Bool; } interface MutIteratorRT = { func next = (this mut) #rt -> Void; func get = (this) #rt -> $$*mut; func atEnd = (this) #rt -> Bool; }
Interface to define a mut iterator.