[goalc] macro expansion in integer constants (#1282)

* [goalc] macro expansion in integer constants

* working

* didn't break it yet

* support conditional compilation

* fix up some more small bugs

* fix duplicate evaluation of bitfield definitions

* paranoid
This commit is contained in:
water111
2022-04-07 19:13:22 -04:00
committed by GitHub
parent 2caf75a11c
commit 1db96c72ab
25 changed files with 501 additions and 241 deletions
+6 -1
View File
@@ -214,4 +214,9 @@
- Asm ops requiring 128-bit inputs will now try harder to convert their inputs when it is appropriate.
- 0's that are constant propagated to the input of a 128-bit instruction will use `vpxor` instruction to generate the value, instead of `xor` and a `mov`.
- Add a `stack-singleton-no-clear` stack construction type. It will create a "singleton" inside this function - all other `(new 'stack-singleton` forms with the same type will return the same stack object.
- Added support for using `(new 'static 'array ...)` for setting a static field of type `(pointer ...)`
- Added support for using `(new 'static 'array ...)` for setting a static field of type `(pointer ...)`
## V0.9 Large change to macro expansion and constant propagation
The compiler is now much more aggressive in where and how it expands macros and handles expressions at compiler time.
- Several places where macros could be incorrectly executed more than once (possibly causing unwanted side effects) have been fixed.
- Fixed bug in size calculation of non-inline stack arrays. Previous behavior was a compiler assert.