aboutsummaryrefslogtreecommitdiffhomepage
path: root/c/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* c: static eval refactoringlemon2026-03-141-194/+265
| | | | | Explicit node for static symbol (addresses). Should not break with edge cases like the previous ad-hoc approach. And some other bugfixes
* c: relax constexpr constraints, fix alignoflemon2026-03-091-12/+23
| | | | | | | | | | | | - Allow short-circuiting of constant logical expressions where the unevaluated operand is not a constant expression (`1 || 0/0`) - Allow constant integer expressions that evaluate to zero to be used as null pointer constants (GNU extension). + According to the standard, `int *x = 5*0;` should be rejected. But compilers evaluate `5*0 -> 0` and allow it as if a null pointer literal.
* c: do not try to eval conditional expression's not taken branchlemon2026-03-051-2/+0
|
* c: static intializer bugfix introduced in6c3f1593e9lemon2026-02-281-0/+1
|
* c: allow casting of symbol address to intptr_t in static initializerslemon2026-02-251-1/+2
|
* c: support at least parsing C99 _Complex typeslemon2026-01-251-1/+1
|
* c: SYM expr should store decl ref as an index, not pointerlemon2025-12-301-1/+1
| | | | | | | | 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
* eval: long double placeholderlemon2025-12-141-1/+2
|
* c: handle more static eval edgecases for int -> ptrlemon2025-12-131-4/+19
| | | | | sqlite3 was falling back to `((void*)&((char*)0)[X])` for INT_TO_PTR, which this handles now.
* eval: &*x address constantslemon2025-12-081-0/+4
|
* eval: fix float cmpslemon2025-12-051-0/+2
|
* c: more static initializer fixeslemon2025-11-261-0/+2
|
* c: fix static eval for address of some array refslemon2025-11-221-1/+4
|
* eval: fix enum edge caselemon2025-11-191-2/+2
|
* eval: fix b0c0f2d2d885 for ptr convertiblelemon2025-11-191-1/+1
|
* eval: only isaddrconst for ptrslemon2025-11-161-1/+1
|
* amd64: fix aggregate abi stuff;; ir: fold, peephole optimizing constructorslemon2025-11-051-2/+4
|
* c errataslemon2025-10-231-1/+1
|
* eval: fix indexing string literallemon2025-10-231-2/+2
|
* c irgen fixeslemon2025-10-191-6/+14
|
* Organize source files into directorieslemon2025-10-191-0/+316