jserv / amacc

Small C Compiler generating ELF executable Arm architecture, supporting JIT execution
Other
1.01k stars 160 forks source link

Allow array declarations using [] operators. #82

Closed HPCguy closed 2 years ago

HPCguy commented 3 years ago

Creating an issue for this so it can be tracked.

Using an array operator '[ ]' is currently supported for use with (certain) pointer variables in array expressions, but never supported for array declarations. This ticket is to specifically address declarations using '[ ]' directly.

HPCguy commented 2 years ago

I've implemented 1d global arrays on lines 1310-1319 here: https://github.com/HPCguy/Squint/pull/1/files . Support for Local arrays and multidimensional arrays is a little more involved. My strategy there would likely be to rename the ident_s.stype member to etype, and use those bits to store information about the array decls.

HPCguy commented 2 years ago

Closing this issue. Substantial array functionality has been completed in Github HPCguy/Squint that would require substantial changes if backported to the AMaCC compiler.