reimplement RocList and RocStr

This commit is contained in:
Tom Dohrmann 2022-02-23 14:49:10 +01:00
parent 16e568be76
commit 788c8a6af2
19 changed files with 680 additions and 792 deletions

View file

@ -1,4 +1,4 @@
use roc_std::{RocDec, RocList, RocOrder, RocStr};
use roc_std::{ReferenceCount, RocDec, RocList, RocOrder, RocStr};
pub trait Wasm32Sized: Sized {
const SIZE_OF_WASM: usize;
@ -35,7 +35,7 @@ impl Wasm32Sized for RocStr {
const ALIGN_OF_WASM: usize = 4;
}
impl<T: Wasm32Sized> Wasm32Sized for RocList<T> {
impl<T: Wasm32Sized + ReferenceCount> Wasm32Sized for RocList<T> {
const SIZE_OF_WASM: usize = 8;
const ALIGN_OF_WASM: usize = 4;
}