MCPcopy Create free account
hub / github.com/WebAssembly/wabt / IsImport

Method IsImport

src/ir.cc:175–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175bool 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
197void LocalTypes::Set(const TypeVector& types) {
198 decls_.clear();

Callers 3

CheckImportExportMethod · 0.45
WriteBeginFuncMethod · 0.45
BuildInlineExportMapMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected