| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | nicer defaults and facilities for cross-compilation | 2025-12-17 | 1 | -2/+6 | |
| | | |||||
| * | bitset: better implementation of bsiter() and stuff | 2025-12-16 | 1 | -9/+15 | |
| | | | | | Also changed the type to size_t for portability | ||||
| * | create distinct interned string type | 2025-12-15 | 1 | -3/+4 | |
| | | | | | | | | | | | | | | | Interned strings are used pervasively, so it's a good idea to add a layer of type safety to differentiate them from general cstrs and avoid potential bugs from comparing non-interned and interned strings. Not that that's happened so far that I can remember, but it could. I'm 90% sure it's legal to alias `struct {char c;}` pointers with `char` pointers. This specific typedef gives type safety but with a simple one-way `internstr -> const char *` typecast (with `&istr->c`). Converting the other way around is more intentional: a straight up cast `(internstr)cstr` which sticks out as unchecked and probably wrong, or calling the intern(cstr) function, which is the right way. | ||||
| * | move intern() to mem.c | 2025-12-15 | 1 | -0/+3 | |
| | | | | | | Being in lex.c was vestigial, since it was being used all over the frontend and backend. | ||||
| * | cpp: support #line directives | 2025-12-14 | 1 | -2/+3 | |
| | | |||||
| * | Add -O optimization flag | 2025-12-13 | 1 | -0/+4 | |
| | | |||||
| * | s/amd64/x86_64/ | 2025-12-12 | 1 | -1/+1 | |
| | | |||||
| * | lex: use pmap for macro lookup | 2025-12-12 | 1 | -2/+5 | |
| | | | | | To reduce hashmap code repetition. Also add pmap_del for this purpose | ||||
| * | rename arraylength macro -> countof | 2025-12-11 | 1 | -1/+1 | |
| | | |||||
| * | _Alignof and stuff | 2025-12-11 | 1 | -0/+2 | |
| | | |||||
| * | driver: add -Werror | 2025-12-11 | 1 | -0/+1 | |
| | | |||||
| * | fatal() make noreturn | 2025-12-11 | 1 | -2/+8 | |
| | | |||||
| * | make fatal() _Noreturn | 2025-12-11 | 1 | -1/+1 | |
| | | |||||
| * | misc fixes | 2025-12-10 | 1 | -1/+1 | |
| | | |||||
| * | mem: fix pmap_init and change hashmap load factors to 75% | 2025-12-09 | 1 | -1/+1 | |
| | | |||||
| * | lex: make some hashtables resizable | 2025-12-09 | 1 | -7/+6 | |
| | | | | | Was hiting the fixed limits trying to preprocess sqlite3amalgamation | ||||
| * | add command-line predefined macros (-D, -U) | 2025-12-06 | 1 | -0/+3 | |
| | | |||||
| * | preprocessor: add #ifndef...#endif include guard optimization | 2025-12-02 | 1 | -2/+2 | |
| | | |||||
| * | use bstdout for -E | 2025-11-26 | 1 | -1/+1 | |
| | | |||||
| * | debug output to stdout | 2025-11-19 | 1 | -0/+1 | |
| | | |||||
| * | factor type stuff into type.h | 2025-11-16 | 1 | -208/+1 | |
| | | |||||
| * | amd64: fix aggregate abi stuff;; ir: fold, peephole optimizing constructors | 2025-11-05 | 1 | -3/+3 | |
| | | |||||
| * | c: make builtin va_list an opaque struct | 2025-10-23 | 1 | -2/+2 | |
| | | |||||
| * | use libc's stdout/stderr; also eliminate some unnecessary recursion in bfmt | 2025-10-23 | 1 | -6/+13 | |
| | | |||||
| * | refactor vec_of(T) and misc | 2025-10-20 | 1 | -32/+42 | |
| | | |||||
| * | c irgen fixes | 2025-10-19 | 1 | -1/+0 | |
| | | |||||
| * | #pragma once | 2025-10-18 | 1 | -2/+7 | |
| | | |||||
| * | add -E preprocessing option | 2025-10-17 | 1 | -1/+2 | |
| | | |||||
| * | wide str and char literals | 2025-10-16 | 1 | -2/+6 | |
| | | |||||
| * | lowsetsetbit | 2025-10-15 | 1 | -1/+2 | |
| | | |||||
| * | c: fix codegen for enum types | 2025-10-15 | 1 | -2/+7 | |
| | | |||||
| * | implement most of preprocessor | 2025-10-13 | 1 | -0/+11 | |
| | | | | | | | | | - concatenation (##) - builtin macros (__FILE__ etc) - fails in some edge cases, and code needs cleanup - add embedded system include files (stddef.h, stdarg.h for now) - can handle stdio.h now | ||||
| * | c: call memset for some runtime zero initializations | 2025-10-09 | 1 | -0/+8 | |
| | | |||||
| * | alloc changes | 2025-09-17 | 1 | -0/+4 | |
| | | |||||
| * | preliminary pie and pic | 2025-09-14 | 1 | -0/+1 | |
| | | |||||
| * | regset doesnt need all those macros | 2025-09-14 | 1 | -5/+2 | |
| | | |||||
| * | change freearena for correctness | 2025-09-14 | 1 | -4/+4 | |
| | | |||||
| * | regalloc improvements | 2025-09-14 | 1 | -0/+1 | |
| | | |||||
| * | fixes, delnops | 2025-09-09 | 1 | -0/+1 | |
| | | |||||
| * | regalloc: start implementing linear scan | 2025-09-08 | 1 | -2/+9 | |
| | | |||||
| * | backend: fix mem2reg & regalloc | 2023-06-26 | 1 | -0/+9 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | they were broken, especially for unstructured control flow. most significant fix is to register allocator for temporaries that are used before the first definition in the source order, e.g.: @1: %x = add %y, 1 b @3 @2 %y = ... b @1 it's legal for %x to use %y there (assuming @2 dominates @1) but from the point of view of the register allocator %y is defined and freed and then used again, which broke things. the fix is to introduce phis for this situation: @1: %y.1 = phi @2 %y %x = add %y.1, 1 b @3 @2 %y = ... b @1 then regalloc phi handling code makes it work | ||||
| * | frontend: add labels and goto statement | 2023-06-26 | 1 | -0/+1 | |
| | | |||||
| * | fix some warnings | 2023-06-25 | 1 | -1/+1 | |
| | | |||||
| * | backend: fix regalloc to work with more complex dataflow | 2023-06-24 | 1 | -1/+41 | |
| | | | | | | | | | basically an allocation map at the beginning (in) and end (out) of each block is kept and after the first allocation pass another pass is ran to resolve allocation conflicts between each edge, plus another pass to finish lowering phi functions. also introduced `regset` and plenty of other miscellaneous fixes | ||||
| * | mem2reg: implement ssa construction; this breaks regalloc right now | 2023-06-21 | 1 | -1/+1 | |
| | | |||||
| * | explicitly store predecessors in each block | 2023-06-21 | 1 | -0/+23 | |
| | | |||||
| * | add basic mem2reg | 2023-06-20 | 1 | -0/+1 | |
| | | | | | | | | promotes uniform stack slots to temporaries currently only for immutable variables, next thing to implement is ssa construction | ||||
| * | move ctype to common.h | 2023-06-19 | 1 | -0/+7 | |
| | | |||||
| * | add endian.h for endian dependent stuff | 2023-06-18 | 1 | -3/+10 | |
| | | |||||
| * | fix memory bugs | 2023-06-18 | 1 | -1/+1 | |
| | | |||||