First pass at some List implementation stuff

This commit is contained in:
Richard Feldman 2020-03-10 03:01:01 -04:00
parent 80722b872a
commit 4c19dd86ff
4 changed files with 75 additions and 22 deletions

View file

@ -92,6 +92,11 @@ impl<'a> Builtin<'a> {
const SET_WORDS: u32 = Builtin::MAP_WORDS; // Set is an alias for Map with {} for value
const LIST_WORDS: u32 = 3;
/// Layout of collection wrapper - a struct of (pointer, length, capacity)
pub const WRAPPER_PTR: u32 = 0;
pub const WRAPPER_LEN: u32 = 1;
pub const WRAPPER_CAPACITY: u32 = 2;
pub fn stack_size(&self, pointer_size: u32) -> u32 {
use Builtin::*;