Iterate over all the [`TableDef`]s defined by the module, in alphabetical order by name. Sorting is necessary to have deterministic reproducible codegen.
(module: &ModuleDef, visibility: CodegenVisibility)
| 140 | /// |
| 141 | /// Sorting is necessary to have deterministic reproducible codegen. |
| 142 | pub(super) fn iter_tables(module: &ModuleDef, visibility: CodegenVisibility) -> impl Iterator<Item = &TableDef> { |
| 143 | module |
| 144 | .tables() |
| 145 | .filter(move |table| match visibility { |
| 146 | CodegenVisibility::IncludePrivate => true, |
| 147 | CodegenVisibility::OnlyPublic => table.table_access == TableAccess::Public, |
| 148 | }) |
| 149 | .sorted_by_key(|table| &table.name) |
| 150 | } |
| 151 | |
| 152 | /// Return the names of all private tables, in alphabetical order. |
| 153 | pub fn private_table_names(module: &ModuleDef) -> Vec<String> { |
no test coverage detected
searching dependent graphs…