mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Delete HeapMemory variant of WasmLayout, just treat pointers as Primitive
When I created this (at the very beginning of the Wasm backend), I didn't really have a clear reason for it. I just thought it might end up making sense treat heap pointers differently from numbers, somehow. But the semantic differences between pointers and other numbers is not relevant to WasmLayout. The semantics are clear from where the Symbol appears in the IR. Also we were storing heap pointers in locals, for no real reason. And the fact that it's *different* meant a lot of new cases in match expressions, to do the exact same thing as Primitives but with a pointless difference. Until now, we haven't really used this variant in any of our tests. But the refcount pointer needed it... and everything broke!
This commit is contained in:
parent
3581c7f5be
commit
079a8311ec
3 changed files with 2 additions and 21 deletions
|
@ -76,7 +76,6 @@ pub fn decode_low_level<'a>(
|
|||
StackMemoryFormat::Float128 => return NotImplemented,
|
||||
StackMemoryFormat::Decimal => return BuiltinCall(bitcode::DEC_ADD_WITH_OVERFLOW),
|
||||
},
|
||||
WasmLayout::HeapMemory { .. } => return NotImplemented,
|
||||
},
|
||||
NumAddWrap => match ret_layout.arg_types(CallConv::Zig)[0] {
|
||||
I32 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue