(
&mut self,
chunk_id: ChunkId,
params: &[serde_json::Value],
)
| 145 | } |
| 146 | |
| 147 | pub fn eval_function( |
| 148 | &mut self, |
| 149 | chunk_id: ChunkId, |
| 150 | params: &[serde_json::Value], |
| 151 | ) -> Result<ReturnValue, VmError> { |
| 152 | self.arena.mutate_root(|_mc, state| { |
| 153 | let ctx = state.get_context(); |
| 154 | let return_value = state.eval_function_with_id( |
| 155 | chunk_id, |
| 156 | ¶ms |
| 157 | .iter() |
| 158 | .map(|v| Value::from_serde_value(ctx, v)) |
| 159 | .collect::<Vec<_>>(), |
| 160 | )?; |
| 161 | Ok(ReturnValue::from(return_value)) |
| 162 | }) |
| 163 | } |
| 164 | |
| 165 | pub fn interpret(&mut self) -> Result<ReturnValue, VmError> { |
| 166 | loop { |
no test coverage detected