Read Oot first.
Details of Oot
In these sections, we try not to repeat what was said above in the 'Overview' and 'Tour' section. (todo take out redundancy)
todo
while, cond (switch; uses 'is'), continue, break, for, repeat
range (xrange, arange)
like webassembly, "Break and continue statements can only target blocks or loops in which they are nested."
webassemblyish comma: evaluate and ignore the result of the first operand, evaluate and return the second operand
todo: operators for various arithmetic fns in Oot Core
todo:
other stuff that looks cool from nacl:
- threading
- freaky control flow
- atomics
- llvm.nacl.atomic.store, llvm.nacl.atomic.load, llvm.nacl.atomic.rmw (read-modify-write operations; compile-time constant specifying the operation as one of: add, sub, or, and, xor, exchange), llvm.nacl.atomic.cmpxchg, llvm.nacl.atomic.fence, llvm.nacl.atomic.fence.all, llvm.nacl.atomic.is.lock.free: See atomic intrinsics
- instrinsics:
- memcpy, memmove, memset
- bswap (?)
- llvm.stacksave, llvm.stackrestore (These intrinsics are used to implement language features like scoped automatic variable sized arrays in C99. llvm.stacksave returns a value that represents the current state of the stack. This value may only be used as the argument to llvm.stackrestore, which restores the stack to the given state)
- llvm.trap (This intrinsic is lowered to a target dependent trap instruction, which aborts execution)
- unreachable
!=
todo:
to avoid locale-specific encoding errors derailing the reporting of unusual conditions in errors or log messages, by default 'print' does not raise an exception when it cannot encode a character.
TODO revise and work in the stuff from [2]