| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | cpp: fix single-line comment after preprocessor directive | 2026-01-09 | 1 | -1/+1 | |
| | | | | | It was eating up the newline token | ||||
| * | c: fix diagnostic with "return <undeclared>" | 2025-12-31 | 1 | -2/+2 | |
| | | |||||
| * | backend: separate instrs for integer/float store | 2025-12-31 | 1 | -5/+5 | |
| | | |||||
| * | c: SYM expr should store decl ref as an index, not pointer | 2025-12-30 | 3 | -52/+59 | |
| | | | | | | | | | Because envdecls (now declsbuf) can be resized and invalidate those pointers. I missed this because the default initialization size of that buffer (and the fact that it would mostly only manifest with function-local expressions) made it not really come up in practice. Silly | ||||
| * | cpp: nicer handling of predefined macros | 2025-12-29 | 1 | -40/+29 | |
| | | |||||
| * | backend: start implementing aarch64 | 2025-12-28 | 1 | -0/+4 | |
| | | |||||
| * | avoid GOT relocations in unnecessary instances | 2025-12-25 | 1 | -1/+1 | |
| | | | | | | Also change xcon to have a flagset for symbols (whether it's a function, locally defined; later: thread local, etc). | ||||
| * | c: add _Generic | 2025-12-22 | 1 | -0/+53 | |
| | | |||||
| * | c: recognize __attribute__ as decltok, improve diagnostic for expected ↵ | 2025-12-22 | 1 | -1/+2 | |
| | | | | | declaration | ||||
| * | preprocessor make some errors just warnings | 2025-12-22 | 1 | -4/+6 | |
| | | |||||
| * | c/c.c: cleanup exprparse a little | 2025-12-22 | 1 | -13/+12 | |
| | | |||||
| * | c: Fix some dumb uses of initialized stuff | 2025-12-22 | 2 | -10/+12 | |
| | | | | | | | Can't figure out what's wrong with the change to struct expr from 9721d6ba40 but it makes valgrind complain and causes miscompilation of the compiler itself.. | ||||
| * | c: keyword aliases | 2025-12-21 | 3 | -66/+81 | |
| | | | | | | Some linux headers use __signed__ for whatever reason.. this is a general fix for those alternate keyword | ||||
| * | c: allow `return voidfn()` extension | 2025-12-21 | 1 | -4/+30 | |
| | | |||||
| * | lexer: more small optimizations | 2025-12-21 | 1 | -14/+33 | |
| | | |||||
| * | lexer: note source of #include when error occurs in #included file | 2025-12-20 | 2 | -1/+8 | |
| | | |||||
| * | c: small typechecking bugfixes | 2025-12-20 | 1 | -3/+3 | |
| | | |||||
| * | some static assertions for packed type sizes | 2025-12-20 | 1 | -6/+8 | |
| | | |||||
| * | backend: unify pass memory allocation strategies | 2025-12-20 | 1 | -1/+1 | |
| | | | | | | | It was all over the place for temporary data structures used by individual passes. Now there is an arena specifically for that, which is nicer. | ||||
| * | c: support CRLF newlines | 2025-12-20 | 1 | -3/+11 | |
| | | |||||
| * | c: fix a silly C edge case with function redeclaration storage class | 2025-12-20 | 1 | -14/+21 | |
| | | | | | | | C (or at least clang and gcc) allows declaring `static int f(...);` and defining it later as `int f(...) {...}`, omitting the 'static' in the latter definition. | ||||
| * | lexer: fix remnant use of TKEOF for character | 2025-12-20 | 1 | -9/+7 | |
| | | |||||
| * | optimize lexer a bit more | 2025-12-20 | 2 | -62/+88 | |
| | | |||||
| * | lexer: convert pp-idents to keywords only after preprocessing | 2025-12-20 | 2 | -71/+75 | |
| | | |||||
| * | c: factor out to tldecl(), improve error recovery, | 2025-12-20 | 1 | -73/+97 | |
| | | |||||
| * | c.h init zero bitset portability | 2025-12-19 | 1 | -1/+1 | |
| | | |||||
| * | c: support 0-length arrays as syntax for flexible array members | 2025-12-19 | 1 | -19/+29 | |
| | | | | | | Keeping the expr around in the decllist paves the way for VLA support later on | ||||
| * | c: fix incr/decr codegen for floats | 2025-12-19 | 1 | -2/+2 | |
| | | |||||
| * | c: hack to support __FUNCTION__ GNU extension | 2025-12-19 | 1 | -4/+10 | |
| | | |||||
| * | cpp: GNU extension for named variadic arguments | 2025-12-18 | 1 | -4/+7 | |
| | | |||||
| * | cpp: better error recovery for #define syntax error | 2025-12-18 | 1 | -6/+7 | |
| | | |||||
| * | c: fix uninitiliazed field in decltypes | 2025-12-17 | 1 | -0/+1 | |
| | | |||||
| * | nicer defaults and facilities for cross-compilation | 2025-12-17 | 1 | -2/+16 | |
| | | |||||
| * | c: improve some type error diagnostics | 2025-12-15 | 1 | -13/+22 | |
| | | |||||
| * | create distinct interned string type | 2025-12-15 | 4 | -75/+76 | |
| | | | | | | | | | | | | | | | 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 | 3 | -47/+0 | |
| | | | | | | Being in lex.c was vestigial, since it was being used all over the frontend and backend. | ||||
| * | lex: loop with goto instead of tail recursion | 2025-12-15 | 1 | -7/+8 | |
| | | | | | | This uncovered a edgecase with loops and lifetime construction in regalloc! | ||||
| * | lexer: use a hashmap to lookup keywords | 2025-12-15 | 2 | -28/+28 | |
| | | |||||
| * | c: error when defining function with incomplete parameter type | 2025-12-15 | 1 | -0/+4 | |
| | | |||||
| * | c: support forward-declared enums | 2025-12-15 | 1 | -34/+32 | |
| | | | | | This is a common non-standard GNU extension. | ||||
| * | c: emit data for __func__ lazily | 2025-12-15 | 1 | -15/+16 | |
| | | |||||
| * | c: fix another memory-leak-when-errors case | 2025-12-14 | 1 | -1/+2 | |
| | | |||||
| * | c: as a hack, warn for zero-length array instead of error | 2025-12-14 | 1 | -1/+1 | |
| | | | | | | Treated as unsized array T[]. This shows up in some linux headers as a non-standard way to have flexible array members. | ||||
| * | c/builtin: fix vacopy | 2025-12-14 | 1 | -5/+6 | |
| | | |||||
| * | c: fix memory leak if initializer data if error | 2025-12-14 | 1 | -1/+1 | |
| | | |||||
| * | eval: long double placeholder | 2025-12-14 | 1 | -1/+2 | |
| | | |||||
| * | cpp: support #line directives | 2025-12-14 | 1 | -10/+75 | |
| | | |||||
| * | cpp: correctly handle extra tokens after directives | 2025-12-14 | 1 | -16/+21 | |
| | | |||||
| * | only put dats can in .text now when emitting it | 2025-12-14 | 1 | -2/+2 | |
| | | |||||
| * | various relocation related optimization | 2025-12-14 | 1 | -3/+3 | |
| | | | | | | | | | | | With 59ca5a8db, querying if a symbol is defined is cheap. If we're compiling code that calls foo() and we defined foo() in this compilation unit, we already know its offset within the .text section, so use it instead of emitting a relocation for the linker to handle. Also, put small literal data in the .text section instead of .rodata. This seems to improve performance (cache locality?), and as a bonus, it will be good for aarch64's instr encoding with smallish PC-relative offsets. | ||||