aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/stmt.zc
Commit message (Collapse)AuthorAgeFilesLines
* bounds: body scan, loop-entry hoisting, pointer proofs from requested size, ↵Gravatar zinc 13 days1-5/+21
| | | | --explain-checks v1 (non-o3 code)
* merge bounds checkingGravatar zinc 13 days1-1/+14
|\
| * bounds checking: port agent/bounds-checking onto main 0879d0a; unbounded ↵Gravatar zinc 13 days1-1/+14
| | | | | | | | main in o3call, o3 tests expect no check, boundsrules, bounds_fixed, bounds_heap and zc0unbounded tests
* | merge: seven self-hosted compiler fixes from conformanceGravatar zinc 13 days1-2/+2
|\ \ | |/ |/|
| * switch: case member(): with no names matches a tagged member by tag even ↵Gravatar zinc 13 days1-1/+1
| | | | | | | | when it has fields (spec 4.7.3)
| * return: a value returned from a void function is dropped and the function ↵Gravatar zinc 13 days1-1/+1
| | | | | | | | yields 0 (typecheck off, spec 4.8.3)
* | line tables and backtraces: port agent/line-tables onto main, op 56 on the ↵Gravatar zinc 13 days1-1/+1
|/ | | | x86-64 jit, docs, measurements, tests; default genome reservation 0x68000
* zc: add the defer statementGravatar zinc 13 days1-0/+100
| | | | | | | | | | | | defer expr; and defer { ... } register code that runs when the enclosing block ends: at the end of the block, and at return, break and continue that leave it. the tokens are kept at the defer and compiled again at each exit (block_close, body, kw_return, kw_break, kw_continue), newest first, before the block's variables are released, so the analyzer sees a deferred rt.free(p) as the transfer of p where it runs. names mean what they meant at the defer; values are read when it runs. return, break and continue inside a deferred statement are errors, reported once. works in unchecked code and closures (own base per function context).
* split compiler.zc into files by phaseGravatar zinc 13 days1-0/+816
src/compiler/compiler.zc is now twelve files under src/compiler/, listed in order in src/compiler/parts. cat of the parts in order is byte-identical to the old file, so every compiler and image except the language server's is unchanged. no function was edited. consumers read the list: the makefile, bootstrap-check, genmap (which still writes one compiler.zc into a generated map directory), tinyvm.bat, test.sh, test_win.ps1 and the lsp drivers. the language server embeds each part and serves them joined as the one document tinyvm:/compiler.zc.