Lazily initializes the `program` field with a default value and returns it.
(&mut self)
| 446 | |
| 447 | /// Lazily initializes the `program` field with a default value and returns it. |
| 448 | pub fn get_program(&mut self) -> Rc<RefCell<dyn program::Program>> { |
| 449 | if self.program.is_none() { |
| 450 | self.program = Some(Rc::from(RefCell::from(program::ImmutableProgram::default()))); |
| 451 | } |
| 452 | self.program.clone().unwrap() |
| 453 | } |
| 454 | |
| 455 | /// Returns the storage subsystem that will be used for the machine. |
| 456 | pub fn get_storage(&mut self) -> Rc<RefCell<storage::Storage>> { |
no outgoing calls