| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | fix position independent loads of function symbols. | 2025-12-13 | 1 | -3/+3 | |
| | | | | | | | | | For `extern int x[1];`, can use PCREL32 for &x. But for `extern int x(int)`, must use GOTREL, when not being called directly (that's PLT). Therefore the type of an external symbol (actually just whether it denotes a function) matters when deciding what kind of relocation to emit, so keep that information. | ||||
| * | s/amd64/x86_64/ | 2025-12-12 | 1 | -1/+1 | |
| | | |||||
| * | c: switch stmt diagnostics | 2025-12-12 | 1 | -8/+49 | |
| | | | | | For duplicate cases, case value overflow | ||||
| * | lex: use pmap for macro lookup | 2025-12-12 | 2 | -126/+70 | |
| | | | | | To reduce hashmap code repetition. Also add pmap_del for this purpose | ||||
| * | rename arraylength macro -> countof | 2025-12-11 | 3 | -51/+51 | |
| | | |||||
| * | c: accept C99 `[static N]` style array decls, changes to fn quals | 2025-12-11 | 1 | -24/+45 | |
| | | | | | | | Function parameters qualifiers don't matter outside of function definition. `int (const int)` should be compatible with `int(int)` etc. So no need to store them in the typedata. | ||||
| * | _Alignof and stuff | 2025-12-11 | 1 | -11/+18 | |
| | | |||||
| * | c: use a look-up table for isdecltok() | 2025-12-11 | 1 | -14/+18 | |
| | | |||||
| * | -trigraphs option | 2025-12-11 | 1 | -3/+3 | |
| | | |||||
| * | c: optimize environment decl lookup | 2025-12-11 | 1 | -6/+26 | |
| | | | | | | Use a hashmap for the toplevel, optimizing for the common use case where the file-scope has many more declarations than local scopes do | ||||
| * | c: disallow mismatched nested extern decl, & more diagnostics | 2025-12-11 | 1 | -17/+24 | |
| | | |||||
| * | c: support for noreturn, and decl parsing cleanup | 2025-12-11 | 2 | -107/+115 | |
| | | |||||
| * | lex/expr(): cleanup | 2025-12-11 | 1 | -29/+29 | |
| | | |||||
| * | c: expr2reloc() change sig to return addend | 2025-12-11 | 1 | -15/+12 | |
| | | |||||
| * | lexer: properly add padding for cpppredefs | 2025-12-10 | 1 | -2/+2 | |
| | | |||||
| * | c: fix static relocation for &sym[offset] | 2025-12-10 | 1 | -7/+6 | |
| | | |||||
| * | c: fix compound assignment type conversions when types don't match | 2025-12-10 | 1 | -2/+3 | |
| | | |||||
| * | lex: make some hashtables resizable | 2025-12-09 | 1 | -29/+67 | |
| | | | | | Was hiting the fixed limits trying to preprocess sqlite3amalgamation | ||||
| * | c: fix some static initialziers | 2025-12-08 | 1 | -1/+3 | |
| | | |||||
| * | eval: &*x address constants | 2025-12-08 | 1 | -0/+4 | |
| | | |||||
| * | c: fix more declaration parsing bugs | 2025-12-08 | 1 | -7/+17 | |
| | | |||||
| * | add command-line predefined macros (-D, -U) | 2025-12-06 | 1 | -4/+52 | |
| | | |||||
| * | eval: fix float cmps | 2025-12-05 | 1 | -0/+2 | |
| | | |||||
| * | 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) | ||||
| * | c: allow redeclaration with K&R and non K&R prototypes | 2025-12-03 | 1 | -2/+10 | |
| | | |||||
| * | preprocessor: add #ifndef...#endif include guard optimization | 2025-12-02 | 2 | -11/+30 | |
| | | |||||
| * | c: make tentative definitions work | 2025-12-02 | 1 | -17/+34 | |
| | | |||||
| * | c: narrowing ints of different signedness... | 2025-12-01 | 1 | -1/+1 | |
| | | |||||
| * | c: edgecase for redeclaration of implicit sized array | 2025-12-01 | 1 | -1/+1 | |
| | | |||||
| * | c: fix some decl bugs and diagnostics | 2025-11-30 | 1 | -18/+34 | |
| | | |||||
| * | lex: remove some hacks and optimize preprocessor | 2025-11-28 | 1 | -39/+34 | |
| | | |||||
| * | c/type: make implicit const T* -> T* conversion warning, not error | 2025-11-26 | 1 | -1/+8 | |
| | | |||||
| * | c: more static initializer fixes | 2025-11-26 | 2 | -7/+9 | |
| | | |||||
| * | c: fix elided-braces initializers for nested unions | 2025-11-26 | 1 | -5/+16 | |
| | | | | | | | | | For example in ```c struct {int a; union { int b,c; }; int d; } X = {1,2,3}; ``` Fields `a`,`b`,`d` must get initialized to 1,2,3. Not `c` | ||||
| * | pp: fix token pasting (hopefully) | 2025-11-24 | 1 | -27/+15 | |
| | | |||||
| * | c: fix condexprvalue | 2025-11-24 | 1 | -54/+42 | |
| | | | | | | The original implementation was broken when presented with nested short-circuiting logical operators. | ||||
| * | c: remove unused function | 2025-11-24 | 1 | -8/+0 | |
| | | |||||
| * | c: create dummy unreachable block after trap | 2025-11-24 | 2 | -5/+2 | |
| | | | | | | | Reverts 9abe27f6712. This simplies expr codegen, otherwise would manually have to check `fn->curblk != NULL` repeatedly. Later passes will easily delete those unreachable blocks | ||||
| * | ir: implement cvtu64f. and other bug fixes | 2025-11-23 | 1 | -1/+4 | |
| | | | | | | compiler is bootstrapping?! however, stage1 and stage2+ executables aren't bit-identical.. small differences in the codegen.. need to look into that | ||||
| * | c: check actual reachability for non-void func may not return value | 2025-11-23 | 1 | -2/+6 | |
| | | |||||
| * | c: implement compound initializer in static context | 2025-11-23 | 1 | -2/+18 | |
| | | |||||
| * | lex: TEMP hack: #define __x86_64__ or some system headers break subtly | 2025-11-23 | 1 | -0/+1 | |
| | | |||||
| * | c: fix runtime implicit-length array initializer | 2025-11-23 | 1 | -2/+3 | |
| | | |||||
| * | c: __builtin_va_copy | 2025-11-23 | 1 | -8/+21 | |
| | | |||||
| * | implement float varargs, and some other fixes | 2025-11-23 | 1 | -0/+3 | |
| | | |||||
| * | cpp: fix bugs with recursive macro expansion (hopefully) | 2025-11-23 | 2 | -28/+25 | |
| | | |||||
| * | cpp: fix ## bug | 2025-11-23 | 1 | -1/+1 | |
| | | |||||
| * | c: fix precedence of conditional expression rhs | 2025-11-22 | 1 | -2/+2 | |
| | | |||||
| * | c: make the warning for '()' function declarations less strict | 2025-11-22 | 1 | -1/+1 | |
| | | |||||
| * | c: fix static eval for address of some array refs | 2025-11-22 | 2 | -2/+7 | |
| | | |||||