(co: &CodeObject, a: u8, m: &RuntimeModule)
| 196 | } |
| 197 | |
| 198 | pub fn from_code_object(co: &CodeObject, a: u8, m: &RuntimeModule) -> Self { |
| 199 | let rc = co.body.clone(); |
| 200 | let lt = co.line_table.clone(); |
| 201 | let bcf = BytecodeFunction { |
| 202 | name: co.name.clone(), |
| 203 | body: rc, |
| 204 | arity: Arity { |
| 205 | required: co.required_argc, |
| 206 | optional: co.default_argc, |
| 207 | }, |
| 208 | frame_size: co.frame_size, |
| 209 | line_table: lt, |
| 210 | loc: co.loc.clone(), |
| 211 | attrib_byte: a, |
| 212 | module: m.clone(), |
| 213 | boxx: Default::default(), |
| 214 | uplevels: Default::default(), |
| 215 | }; |
| 216 | Self::BytecodeFunction(bcf) |
| 217 | } |
| 218 | |
| 219 | fn write(&self, name: &str, val: RuntimeValue) { |
| 220 | match self { |
nothing calls this directly
no test coverage detected