update api usage in wasm backend

This commit is contained in:
Folkert 2022-07-22 16:22:26 +02:00
parent 4977d1c65e
commit e6104ee52f
No known key found for this signature in database
GPG Key ID: 1F17F6FFD112B97C

View File

@ -253,8 +253,6 @@ impl<'a> WasmBackend<'a> {
.to_symbol_string(symbol, self.interns);
let name = String::from_str_in(&name, self.env.arena).into_bump_str();
// dbg!(name);
self.proc_lookup.push(ProcLookupData {
name: symbol,
layout,
@ -1595,8 +1593,7 @@ impl<'a> WasmBackend<'a> {
// Store the tag ID (if any)
if stores_tag_id_as_data {
let id_offset =
data_offset + union_layout.data_size_without_tag_id(TARGET_INFO).unwrap();
let id_offset = data_offset + union_layout.tag_id_offset(TARGET_INFO).unwrap();
let id_align = union_layout.tag_id_builtin().alignment_bytes(TARGET_INFO);
let id_align = Align::from(id_align);
@ -1679,7 +1676,7 @@ impl<'a> WasmBackend<'a> {
};
if union_layout.stores_tag_id_as_data(TARGET_INFO) {
let id_offset = union_layout.data_size_without_tag_id(TARGET_INFO).unwrap();
let id_offset = union_layout.tag_id_offset(TARGET_INFO).unwrap();
let id_align = union_layout.tag_id_builtin().alignment_bytes(TARGET_INFO);
let id_align = Align::from(id_align);