DenialAdams / roland

Roland programming language
https://www.brick.codes/roland
Apache License 2.0
48 stars 0 forks source link

Can't this happen for more types of transmutes? #54

Closed DenialAdams closed 2 years ago

DenialAdams commented 2 years ago

https://github.com/DenialAdams/roland/blob/aa98437021009ac08acbe51223f24bfc3984c6b2/rolandc/src/wasm.rs#L1186

float <=> pointer <=> int

(also structs too, but we probably wouldn't constant fold any transmutes involving aggregate types)

DenialAdams commented 2 years ago

ah, no, it's fine because other transmutions actually change the expressionnode.

It's just that there is no "pointer literal" node, so it stays as an int.

Seems ok for now.