andrew-johnson-4 / lambda-mountain

Typed Macro Assembler (x86, HTML, WASM, lots of things)
https://andrew-johnson-4.github.io/lambda-mountain/
MIT License
17 stars 0 forks source link

Codegen maybe-deref of function call #409

Closed andrew-johnson-4 closed 4 months ago

andrew-johnson-4 commented 4 months ago
(set x (maybe-deref(f y)))

fails during codegen

andrew-johnson-4 commented 4 months ago

Return type doesn't have a representation specified so mov doesn't know what to do.

andrew-johnson-4 commented 4 months ago

maybe deref is hard defaulting to StackVariable which doesn't have a mov instruction specified.

andrew-johnson-4 commented 4 months ago

Destructive mov is not safe to use in compiler. Some types are still bound with StackVariables storage even when they are actually LocalVariables.