A Script is very similar to a `CompiledScript` but data is "transformed" to a representation more appropriate to execution. When code executes, indexes in instructions are resolved against runtime structures (rather then "compiled") to make available data needed for execution #[derive(Debug)]
| 1636 | // (rather then "compiled") to make available data needed for execution |
| 1637 | // #[derive(Debug)] |
| 1638 | struct Script { |
| 1639 | // primitive pools |
| 1640 | script: CompiledScript, |
| 1641 | |
| 1642 | // types as indexes into the Loader type list |
| 1643 | // REVIEW: why is this unused? |
| 1644 | #[allow(dead_code)] |
| 1645 | struct_refs: Vec<CachedStructIndex>, |
| 1646 | |
| 1647 | // functions as indexes into the Loader function list |
| 1648 | function_refs: Vec<usize>, |
| 1649 | // materialized instantiations, whether partial or not |
| 1650 | function_instantiations: Vec<FunctionInstantiation>, |
| 1651 | |
| 1652 | // entry point |
| 1653 | main: Arc<Function>, |
| 1654 | |
| 1655 | // parameters of main |
| 1656 | parameter_tys: Vec<Type>, |
| 1657 | |
| 1658 | // return values |
| 1659 | return_tys: Vec<Type>, |
| 1660 | |
| 1661 | // a map of single-token signature indices to type |
| 1662 | single_signature_token_map: BTreeMap<SignatureIndex, Type>, |
| 1663 | } |
| 1664 | |
| 1665 | impl Script { |
| 1666 | fn new( |
no outgoing calls
no test coverage detected