aboutsummaryrefslogtreecommitdiff
path: root/stmt.c
AgeCommit message (Collapse)Author
2024-04-02map: Use simpler fnv-1a hash functionMichael Forney
2024-03-24Add support for C23 attribute syntaxMichael Forney
Currently, all attributes are ignored. References: https://todo.sr.ht/~mcf/cproc/68
2022-05-11expr: Implement type-checking for casts and assignmentsMichael Forney
2022-01-22Remove most usage of fixed-width integer typesMichael Forney
We only require a type of at least 64 bits, so just use unsigned long long. Only siphash remains as the last user of uint64_t.
2021-10-21stmt: Allow labels intermixed with declarations in compound statementsMichael Forney
C23 relaxes the restriction that labels must always be followed by statements in N2508[0]. [0] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2508.pdf
2021-10-21Rename variableMichael Forney
We will use the name 'label' for a function.
2021-10-21Remove obsolete commentMichael Forney
2021-09-28Skip unnecessary conversion to bool for logical and conditional expressionsMichael Forney
As in ede6a5c9, if an expression is used only to control a jnz, we don't need to convert it to a 0 or 1 value. QBE ignores the upper 32-bits of the argument to jnz, so the conversion is still needed for pointer, long, and floating point types (including float since -0 has non-zero bit representation).
2021-07-02qbe: Remove repr from struct value and use per-instruction class insteadMichael Forney
This way we avoid leaking backend-specific details of type representation outside qbe.c. It also facilitates some future simplifications.
2021-06-30stmt: Check that controlling expression is a scalar, and drop unneeded ↵Michael Forney
conversion The conversion is only needed for floating types. QBE isn't able to optimize it away for integer types yet, so removing this unnecessary conversion has a substantial performance benefit.
2021-03-31qbe: Use separate type for block/labelMichael Forney
Labels are no longer used as instruction arguments.
2019-07-05stmt: Fix conversion of controlling expression to boolMichael Forney
In d875bf74, I accidentally converted the increment expression to bool rather than the controlling expression. Whoops, I should check the updated test case IL more carefully next time.
2019-07-03Convert controlling expression of loops to boolMichael Forney
2019-07-02stmt: Add specific error message for missing inline asmMichael Forney
2019-05-16stmt: continue in do-loop should evaluate controlling expressionMichael Forney
2019-04-23Fix integer promotion on bit-fieldsMichael Forney
Fixes #47.
2019-04-21Keep track of type properties in typeMichael Forney
2019-04-21Improve error messageMichael Forney
2019-04-06Separate unqualified type and qualifiers in struct exprMichael Forney
2019-04-04Merge headers into cc.hMichael Forney
2019-03-14Abbreviate tag namesMichael Forney
2019-03-13Make `struct function` opaqueMichael Forney
2019-02-24Check for negative array lengths/indicesMichael Forney
2019-02-16Allow labels with same name as typedefMichael Forney
2019-02-15Rename emit.h -> backend.hMichael Forney
2019-02-12Initial importMichael Forney