| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | cpp: nicer handling of predefined macros | 2025-12-29 | 1 | -40/+29 | |
| | | |||||
| * | backend: start implementing aarch64 | 2025-12-28 | 1 | -0/+4 | |
| | | |||||
| * | preprocessor make some errors just warnings | 2025-12-22 | 1 | -4/+6 | |
| | | |||||
| * | c: Fix some dumb uses of initialized stuff | 2025-12-22 | 1 | -3/+7 | |
| | | | | | | | 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 | 1 | -4/+17 | |
| | | | | | | Some linux headers use __signed__ for whatever reason.. this is a general fix for those alternate keyword | ||||
| * | lexer: more small optimizations | 2025-12-21 | 1 | -14/+33 | |
| | | |||||
| * | lexer: note source of #include when error occurs in #included file | 2025-12-20 | 1 | -0/+6 | |
| | | |||||
| * | c: support CRLF newlines | 2025-12-20 | 1 | -3/+11 | |
| | | |||||
| * | lexer: fix remnant use of TKEOF for character | 2025-12-20 | 1 | -9/+7 | |
| | | |||||
| * | optimize lexer a bit more | 2025-12-20 | 1 | -60/+86 | |
| | | |||||
| * | lexer: convert pp-idents to keywords only after preprocessing | 2025-12-20 | 1 | -63/+65 | |
| | | |||||
| * | 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 | |
| | | |||||
| * | nicer defaults and facilities for cross-compilation | 2025-12-17 | 1 | -2/+16 | |
| | | |||||
| * | create distinct interned string type | 2025-12-15 | 1 | -22/+21 | |
| | | | | | | | | | | | | | | | 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 | -45/+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 | 1 | -27/+27 | |
| | | |||||
| * | cpp: support #line directives | 2025-12-14 | 1 | -10/+75 | |
| | | |||||
| * | cpp: correctly handle extra tokens after directives | 2025-12-14 | 1 | -16/+21 | |
| | | |||||
| * | s/amd64/x86_64/ | 2025-12-12 | 1 | -1/+1 | |
| | | |||||
| * | lex: use pmap for macro lookup | 2025-12-12 | 1 | -125/+69 | |
| | | | | | To reduce hashmap code repetition. Also add pmap_del for this purpose | ||||
| * | rename arraylength macro -> countof | 2025-12-11 | 1 | -20/+20 | |
| | | |||||
| * | -trigraphs option | 2025-12-11 | 1 | -3/+3 | |
| | | |||||
| * | lex/expr(): cleanup | 2025-12-11 | 1 | -29/+29 | |
| | | |||||
| * | lexer: properly add padding for cpppredefs | 2025-12-10 | 1 | -2/+2 | |
| | | |||||
| * | lex: make some hashtables resizable | 2025-12-09 | 1 | -29/+67 | |
| | | | | | Was hiting the fixed limits trying to preprocess sqlite3amalgamation | ||||
| * | add command-line predefined macros (-D, -U) | 2025-12-06 | 1 | -4/+52 | |
| | | |||||
| * | cpp: implement preprocessor expressions short circuiting behaviour | 2025-12-03 | 1 | -17/+23 | |
| | | | | | This only affects whether an error is given for something like `0 && 0/0` (it shouldn't) | ||||
| * | preprocessor: add #ifndef...#endif include guard optimization | 2025-12-02 | 1 | -11/+27 | |
| | | |||||
| * | lex: remove some hacks and optimize preprocessor | 2025-11-28 | 1 | -39/+34 | |
| | | |||||
| * | pp: fix token pasting (hopefully) | 2025-11-24 | 1 | -27/+15 | |
| | | |||||
| * | lex: TEMP hack: #define __x86_64__ or some system headers break subtly | 2025-11-23 | 1 | -0/+1 | |
| | | |||||
| * | cpp: fix bugs with recursive macro expansion (hopefully) | 2025-11-23 | 1 | -28/+24 | |
| | | |||||
| * | cpp: fix ## bug | 2025-11-23 | 1 | -1/+1 | |
| | | |||||
| * | c: move warning for extension keyword til after preprocessor | 2025-11-22 | 1 | -2/+2 | |
| | | |||||
| * | lex: #include ".." should also look in working directory | 2025-11-22 | 1 | -19/+17 | |
| | | |||||
| * | lex: move token data from tmp to glob arena when used in a macro body | 2025-11-22 | 1 | -2/+7 | |
| | | | | | | | maybe introduce per-macro arenas to tie their lifetimes to that. but most macros have global lifetime (i.e. aren't #undef'd) so there probably wouldn't be much benefit to that | ||||
| * | cpp: add predefined __antcc__ macro, for debugging | 2025-11-20 | 1 | -0/+1 | |
| | | |||||
| * | ir: 'trap' jump; c: __builtin_trap; lex: __has_builtin | 2025-11-15 | 1 | -4/+25 | |
| | | |||||
| * | lex: fix single-line comment eating up preprocessor directive in next line | 2025-11-08 | 1 | -1/+1 | |
| | | |||||
| * | lex: #warning and #error | 2025-11-08 | 1 | -2/+13 | |
| | | |||||
| * | lex: fix bugs filling char buffer | 2025-10-27 | 1 | -14/+22 | |
| | | |||||
| * | lex enlarge internht | 2025-10-23 | 1 | -1/+1 | |
| | | |||||
| * | lex: fix expansion for fn like macros passed as macro arguments | 2025-10-23 | 1 | -1/+1 | |
| | | |||||
| * | lex: fix consecutive preprocessor concatenation | 2025-10-23 | 1 | -7/+10 | |
| | | |||||
| * | use libc's stdout/stderr; also eliminate some unnecessary recursion in bfmt | 2025-10-23 | 1 | -1/+1 | |
| | | |||||
| * | lex: fix base-16 literals adding an extra zero when there's a type suffix | 2025-10-23 | 1 | -4/+3 | |
| | | |||||
| * | lex: handle all the whitespace characters | 2025-10-21 | 1 | -1/+1 | |
| | | |||||
| * | refactor vec_of(T) and misc | 2025-10-20 | 1 | -7/+14 | |
| | | |||||