Lines Matching refs:imp
916 for (let imp of wasm.imports) {
917 section.emit_string(imp.module);
918 section.emit_string(imp.name || '');
919 section.emit_u8(imp.kind);
920 if (imp.kind == kExternalFunction) {
921 section.emit_u32v(imp.type);
922 } else if (imp.kind == kExternalGlobal) {
923 section.emit_u32v(imp.type);
924 section.emit_u8(imp.mutable);
925 } else if (imp.kind == kExternalMemory) {
926 var has_max = (typeof imp.maximum) != "undefined";
927 var is_shared = (typeof imp.shared) != "undefined";
933 section.emit_u32v(imp.initial); // initial
934 if (has_max) section.emit_u32v(imp.maximum); // maximum
935 } else if (imp.kind == kExternalTable) {
936 section.emit_u8(imp.type);
937 var has_max = (typeof imp.maximum) != "undefined";
939 section.emit_u32v(imp.initial); // initial
940 if (has_max) section.emit_u32v(imp.maximum); // maximum
941 } else if (imp.kind == kExternalTag) {
943 section.emit_u32v(imp.type);
945 throw new Error("unknown/unsupported import kind " + imp.kind);