jyn514 / saltwater

A C compiler written in Rust, with a focus on good error messages.
BSD 3-Clause "New" or "Revised" License
290 stars 27 forks source link

Aggregate dynamic initialization #22

Open jyn514 opened 5 years ago

jyn514 commented 5 years ago
int main() { int a[3] = {1, 2, 3}; }
thread 'main' panicked at 'not yet implemented: aggregate dynamic initialization', src/ir.rs:211:48

Note: the way LLVM implements this is by storing the array in static memory and then loading it into the stack when the function is called. It also loads 8 bytes at a time regardless of the type of the array (at least on x86_64).

jyn514 commented 4 years ago

I plan to address this after finishing #151.