Allocate a List from items and push. Centralises the Rc::new(RefCell::new(items)) construction inlined. */
(&mut self, items: Vec<Val>)
| 14 | |
| 15 | /* Allocate a List from items and push. Centralises the Rc::new(RefCell::new(items)) construction inlined. */ |
| 16 | pub(crate) fn alloc_list(&mut self, items: Vec<Val>) -> Result<Val, VmErr> { |
| 17 | self.heap.alloc(HeapObj::List(Rc::new(RefCell::new(items)))) |
| 18 | } |
| 19 | |
| 20 | /* Allocate a List, push it, return Ok. */ |
| 21 | pub(crate) fn alloc_and_push_list(&mut self, items: Vec<Val>) -> Result<(), VmErr> { |
no test coverage detected