| 173 | } |
| 174 | |
| 175 | bool Module::IsImport(ExternalKind kind, const Var& var) const { |
| 176 | switch (kind) { |
| 177 | case ExternalKind::Func: |
| 178 | return GetFuncIndex(var) < num_func_imports; |
| 179 | |
| 180 | case ExternalKind::Global: |
| 181 | return GetGlobalIndex(var) < num_global_imports; |
| 182 | |
| 183 | case ExternalKind::Memory: |
| 184 | return GetMemoryIndex(var) < num_memory_imports; |
| 185 | |
| 186 | case ExternalKind::Table: |
| 187 | return GetTableIndex(var) < num_table_imports; |
| 188 | |
| 189 | case ExternalKind::Tag: |
| 190 | return GetTagIndex(var) < num_tag_imports; |
| 191 | |
| 192 | default: |
| 193 | return false; |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | void LocalTypes::Set(const TypeVector& types) { |
| 198 | decls_.clear(); |
no outgoing calls
no test coverage detected