virtual-machine 0.3.1 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -97,6 +97,26 @@ function handleError(f, args) {
97
97
  function isLikeNone(x) {
98
98
  return x === void 0 || x === null;
99
99
  }
100
+ function makeClosure(arg0, arg1, dtor, f) {
101
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
102
+ const real = (...args) => {
103
+ state.cnt++;
104
+ try {
105
+ return f(state.a, state.b, ...args);
106
+ } finally {
107
+ real._wbg_cb_unref();
108
+ }
109
+ };
110
+ real._wbg_cb_unref = () => {
111
+ if (--state.cnt === 0) {
112
+ state.dtor(state.a, state.b);
113
+ state.a = 0;
114
+ CLOSURE_DTORS.unregister(state);
115
+ }
116
+ };
117
+ CLOSURE_DTORS.register(real, state, state);
118
+ return real;
119
+ }
100
120
  function makeMutClosure(arg0, arg1, dtor, f) {
101
121
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
102
122
  const real = (...args) => {
@@ -186,8 +206,17 @@ if (!("encodeInto" in cachedTextEncoder)) {
186
206
  };
187
207
  }
188
208
  var WASM_VECTOR_LEN = 0;
189
- function wasm_bindgen__convert__closures_____invoke__hfbd40044a7a1ae85(arg0, arg1, arg2) {
190
- wasm.wasm_bindgen__convert__closures_____invoke__hfbd40044a7a1ae85(arg0, arg1, arg2);
209
+ function wasm_bindgen__convert__closures_____invoke__hd07cf7ae12ea5c3f(arg0, arg1) {
210
+ wasm.wasm_bindgen__convert__closures_____invoke__hd07cf7ae12ea5c3f(arg0, arg1);
211
+ }
212
+ function wasm_bindgen__convert__closures_____invoke__h260170fb96639bcf(arg0, arg1, arg2) {
213
+ wasm.wasm_bindgen__convert__closures_____invoke__h260170fb96639bcf(arg0, arg1, arg2);
214
+ }
215
+ function wasm_bindgen__convert__closures_____invoke__hf75f3b5e3736d482(arg0, arg1) {
216
+ wasm.wasm_bindgen__convert__closures_____invoke__hf75f3b5e3736d482(arg0, arg1);
217
+ }
218
+ function wasm_bindgen__convert__closures_____invoke__hc3bef96af6592eb1(arg0, arg1, arg2) {
219
+ wasm.wasm_bindgen__convert__closures_____invoke__hc3bef96af6592eb1(arg0, arg1, arg2);
191
220
  }
192
221
  var __wbindgen_enum_WorkerType = ["classic", "module"];
193
222
  var WasmVmFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
@@ -897,10 +926,20 @@ function __wbg_get_imports() {
897
926
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
898
927
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
899
928
  };
929
+ imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
930
+ const ret = typeof arg0 === "function";
931
+ return ret;
932
+ };
900
933
  imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
901
934
  const ret = arg0 === void 0;
902
935
  return ret;
903
936
  };
937
+ imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
938
+ const obj = arg1;
939
+ const ret = typeof obj === "number" ? obj : void 0;
940
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
941
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
942
+ };
904
943
  imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
905
944
  const obj = arg1;
906
945
  const ret = typeof obj === "string" ? obj : void 0;
@@ -912,6 +951,9 @@ function __wbg_get_imports() {
912
951
  imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
913
952
  throw new Error(getStringFromWasm0(arg0, arg1));
914
953
  };
954
+ imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
955
+ arg0._wbg_cb_unref();
956
+ };
915
957
  imports.wbg.__wbg_add_e0e7f4f1ce6560fb = function() {
916
958
  return handleError(function(arg0, arg1, arg2) {
917
959
  const ret = Atomics.add(arg0, arg1 >>> 0, arg2);
@@ -928,12 +970,24 @@ function __wbg_get_imports() {
928
970
  const ret = arg0.byteLength;
929
971
  return ret;
930
972
  };
973
+ imports.wbg.__wbg_call_3020136f7a2d6e44 = function() {
974
+ return handleError(function(arg0, arg1, arg2) {
975
+ const ret = arg0.call(arg1, arg2);
976
+ return ret;
977
+ }, arguments);
978
+ };
931
979
  imports.wbg.__wbg_call_abb4ff46ce38be40 = function() {
932
980
  return handleError(function(arg0, arg1) {
933
981
  const ret = arg0.call(arg1);
934
982
  return ret;
935
983
  }, arguments);
936
984
  };
985
+ imports.wbg.__wbg_call_c8baa5c5e72d274e = function() {
986
+ return handleError(function(arg0, arg1, arg2, arg3) {
987
+ const ret = arg0.call(arg1, arg2, arg3);
988
+ return ret;
989
+ }, arguments);
990
+ };
937
991
  imports.wbg.__wbg_compareExchange_a2a167681b69cf6f = function() {
938
992
  return handleError(function(arg0, arg1, arg2, arg3) {
939
993
  const ret = Atomics.compareExchange(arg0, arg1 >>> 0, arg2, arg3);
@@ -944,6 +998,10 @@ function __wbg_get_imports() {
944
998
  const ret = arg0.data;
945
999
  return ret;
946
1000
  };
1001
+ imports.wbg.__wbg_datagrams_05d12f8029dbc662 = function(arg0) {
1002
+ const ret = arg0.datagrams;
1003
+ return ret;
1004
+ };
947
1005
  imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
948
1006
  let deferred0_0;
949
1007
  let deferred0_1;
@@ -968,6 +1026,16 @@ function __wbg_get_imports() {
968
1026
  const ret = arg0.fill(arg1, arg2 >>> 0, arg3 >>> 0);
969
1027
  return ret;
970
1028
  };
1029
+ imports.wbg.__wbg_getReader_b6676f6d8b326942 = function(arg0) {
1030
+ const ret = arg0.getReader();
1031
+ return ret;
1032
+ };
1033
+ imports.wbg.__wbg_getWriter_bbffb7cf601bec61 = function() {
1034
+ return handleError(function(arg0) {
1035
+ const ret = arg0.getWriter();
1036
+ return ret;
1037
+ }, arguments);
1038
+ };
971
1039
  imports.wbg.__wbg_get_af9dab7e9603ea93 = function() {
972
1040
  return handleError(function(arg0, arg1) {
973
1041
  const ret = Reflect.get(arg0, arg1);
@@ -1059,6 +1127,12 @@ function __wbg_get_imports() {
1059
1127
  return ret;
1060
1128
  }, arguments);
1061
1129
  };
1130
+ imports.wbg.__wbg_new_with_options_661ae023a99756d4 = function() {
1131
+ return handleError(function(arg0, arg1, arg2) {
1132
+ const ret = new WebTransport(getStringFromWasm0(arg0, arg1), arg2);
1133
+ return ret;
1134
+ }, arguments);
1135
+ };
1062
1136
  imports.wbg.__wbg_new_with_shared_array_buffer_f801846979192910 = function(arg0, arg1, arg2) {
1063
1137
  const ret = new DataView(arg0, arg1 >>> 0, arg2 >>> 0);
1064
1138
  return ret;
@@ -1097,6 +1171,33 @@ function __wbg_get_imports() {
1097
1171
  const ret = arg0.push(arg1);
1098
1172
  return ret;
1099
1173
  };
1174
+ imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
1175
+ const ret = arg0.queueMicrotask;
1176
+ return ret;
1177
+ };
1178
+ imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
1179
+ queueMicrotask(arg0);
1180
+ };
1181
+ imports.wbg.__wbg_random_cc1f9237d866d212 = function() {
1182
+ const ret = Math.random();
1183
+ return ret;
1184
+ };
1185
+ imports.wbg.__wbg_read_39c4b35efcd03c25 = function(arg0) {
1186
+ const ret = arg0.read();
1187
+ return ret;
1188
+ };
1189
+ imports.wbg.__wbg_readable_91b7193a7ae57e51 = function(arg0) {
1190
+ const ret = arg0.readable;
1191
+ return ret;
1192
+ };
1193
+ imports.wbg.__wbg_ready_a3e887a4174c582b = function(arg0) {
1194
+ const ret = arg0.ready;
1195
+ return ret;
1196
+ };
1197
+ imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
1198
+ const ret = Promise.resolve(arg0);
1199
+ return ret;
1200
+ };
1100
1201
  imports.wbg.__wbg_set_169e13b608078b7b = function(arg0, arg1, arg2) {
1101
1202
  arg0.set(getArrayU8FromWasm0(arg1, arg2));
1102
1203
  };
@@ -1106,6 +1207,9 @@ function __wbg_get_imports() {
1106
1207
  return ret;
1107
1208
  }, arguments);
1108
1209
  };
1210
+ imports.wbg.__wbg_set_algorithm_f5b9d6dae15e63e3 = function(arg0, arg1, arg2) {
1211
+ arg0.algorithm = getStringFromWasm0(arg1, arg2);
1212
+ };
1109
1213
  imports.wbg.__wbg_set_bc3a432bdcd60886 = function(arg0, arg1, arg2) {
1110
1214
  arg0.set(arg1, arg2 >>> 0);
1111
1215
  };
@@ -1118,9 +1222,15 @@ function __wbg_get_imports() {
1118
1222
  imports.wbg.__wbg_set_onmessage_deb94985de696ac7 = function(arg0, arg1) {
1119
1223
  arg0.onmessage = arg1;
1120
1224
  };
1225
+ imports.wbg.__wbg_set_server_certificate_hashes_d12c95e03a45bcd5 = function(arg0, arg1) {
1226
+ arg0.serverCertificateHashes = arg1;
1227
+ };
1121
1228
  imports.wbg.__wbg_set_type_c2eb2929316959f4 = function(arg0, arg1) {
1122
1229
  arg0.type = __wbindgen_enum_WorkerType[arg1];
1123
1230
  };
1231
+ imports.wbg.__wbg_set_value_3371f9dc48a34104 = function(arg0, arg1) {
1232
+ arg0.value = arg1;
1233
+ };
1124
1234
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
1125
1235
  const ret = arg1.stack;
1126
1236
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -1157,6 +1267,14 @@ function __wbg_get_imports() {
1157
1267
  imports.wbg.__wbg_terminate_08a1236dd2e69da0 = function(arg0) {
1158
1268
  arg0.terminate();
1159
1269
  };
1270
+ imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
1271
+ const ret = arg0.then(arg1, arg2);
1272
+ return ret;
1273
+ };
1274
+ imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
1275
+ const ret = arg0.then(arg1);
1276
+ return ret;
1277
+ };
1160
1278
  imports.wbg.__wbg_wait_ceb109d0011d6567 = function() {
1161
1279
  return handleError(function(arg0, arg1, arg2, arg3) {
1162
1280
  const ret = Atomics.wait(arg0, arg1 >>> 0, arg2, arg3);
@@ -1166,22 +1284,42 @@ function __wbg_get_imports() {
1166
1284
  imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) {
1167
1285
  console.warn(arg0);
1168
1286
  };
1287
+ imports.wbg.__wbg_writable_523e68bd72433329 = function(arg0) {
1288
+ const ret = arg0.writable;
1289
+ return ret;
1290
+ };
1291
+ imports.wbg.__wbg_write_0823b42435137c02 = function(arg0, arg1) {
1292
+ const ret = arg0.write(arg1);
1293
+ return ret;
1294
+ };
1169
1295
  imports.wbg.__wbg_xor_5e9be92d2e01a692 = function() {
1170
1296
  return handleError(function(arg0, arg1, arg2) {
1171
1297
  const ret = Atomics.xor(arg0, arg1 >>> 0, arg2);
1172
1298
  return ret;
1173
1299
  }, arguments);
1174
1300
  };
1301
+ imports.wbg.__wbindgen_cast_041c77978d70bb0a = function(arg0, arg1) {
1302
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h61d0a8be6dc7f9b5, wasm_bindgen__convert__closures_____invoke__hd07cf7ae12ea5c3f);
1303
+ return ret;
1304
+ };
1175
1305
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1176
1306
  const ret = getStringFromWasm0(arg0, arg1);
1177
1307
  return ret;
1178
1308
  };
1179
- imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1180
- const ret = arg0;
1309
+ imports.wbg.__wbindgen_cast_9867f867794f6d1d = function(arg0, arg1) {
1310
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h61d0a8be6dc7f9b5, wasm_bindgen__convert__closures_____invoke__hc3bef96af6592eb1);
1311
+ return ret;
1312
+ };
1313
+ imports.wbg.__wbindgen_cast_abf350a606387627 = function(arg0, arg1) {
1314
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h612f8e24953b61d5, wasm_bindgen__convert__closures_____invoke__h260170fb96639bcf);
1181
1315
  return ret;
1182
1316
  };
1183
- imports.wbg.__wbindgen_cast_e7641268fcb75979 = function(arg0, arg1) {
1184
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h4b145e497aa7828d, wasm_bindgen__convert__closures_____invoke__hfbd40044a7a1ae85);
1317
+ imports.wbg.__wbindgen_cast_b33b7ab8ffafb5fe = function(arg0, arg1) {
1318
+ const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h61d0a8be6dc7f9b5, wasm_bindgen__convert__closures_____invoke__hf75f3b5e3736d482);
1319
+ return ret;
1320
+ };
1321
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1322
+ const ret = arg0;
1185
1323
  return ret;
1186
1324
  };
1187
1325
  imports.wbg.__wbindgen_init_externref_table = function() {