@bytecodealliance/jco 1.19.0 → 1.21.0

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.
package/obj/wasm-tools.js CHANGED
@@ -11,7 +11,6 @@ if (getEnvironment=== undefined) {
11
11
  throw err;
12
12
  }
13
13
 
14
- getEnvironment._isHostProvided = true;
15
14
  const { exit } = exit$1;
16
15
 
17
16
  if (exit=== undefined) {
@@ -20,7 +19,6 @@ if (exit=== undefined) {
20
19
  throw err;
21
20
  }
22
21
 
23
- exit._isHostProvided = true;
24
22
  const { getStderr } = stderr;
25
23
 
26
24
  if (getStderr=== undefined) {
@@ -29,7 +27,6 @@ if (getStderr=== undefined) {
29
27
  throw err;
30
28
  }
31
29
 
32
- getStderr._isHostProvided = true;
33
30
  const { getStdin } = stdin;
34
31
 
35
32
  if (getStdin=== undefined) {
@@ -38,7 +35,6 @@ if (getStdin=== undefined) {
38
35
  throw err;
39
36
  }
40
37
 
41
- getStdin._isHostProvided = true;
42
38
  const { getStdout } = stdout;
43
39
 
44
40
  if (getStdout=== undefined) {
@@ -47,7 +43,6 @@ if (getStdout=== undefined) {
47
43
  throw err;
48
44
  }
49
45
 
50
- getStdout._isHostProvided = true;
51
46
  const { TerminalInput } = terminalInput;
52
47
 
53
48
  if (TerminalInput=== undefined) {
@@ -56,7 +51,6 @@ if (TerminalInput=== undefined) {
56
51
  throw err;
57
52
  }
58
53
 
59
- TerminalInput._isHostProvided = true;
60
54
  const { TerminalOutput } = terminalOutput;
61
55
 
62
56
  if (TerminalOutput=== undefined) {
@@ -65,7 +59,6 @@ if (TerminalOutput=== undefined) {
65
59
  throw err;
66
60
  }
67
61
 
68
- TerminalOutput._isHostProvided = true;
69
62
  const { getTerminalStderr } = terminalStderr;
70
63
 
71
64
  if (getTerminalStderr=== undefined) {
@@ -74,7 +67,6 @@ if (getTerminalStderr=== undefined) {
74
67
  throw err;
75
68
  }
76
69
 
77
- getTerminalStderr._isHostProvided = true;
78
70
  const { getTerminalStdin } = terminalStdin;
79
71
 
80
72
  if (getTerminalStdin=== undefined) {
@@ -83,7 +75,6 @@ if (getTerminalStdin=== undefined) {
83
75
  throw err;
84
76
  }
85
77
 
86
- getTerminalStdin._isHostProvided = true;
87
78
  const { getTerminalStdout } = terminalStdout;
88
79
 
89
80
  if (getTerminalStdout=== undefined) {
@@ -92,7 +83,6 @@ if (getTerminalStdout=== undefined) {
92
83
  throw err;
93
84
  }
94
85
 
95
- getTerminalStdout._isHostProvided = true;
96
86
  const { getDirectories } = preopens;
97
87
 
98
88
  if (getDirectories=== undefined) {
@@ -101,7 +91,6 @@ if (getDirectories=== undefined) {
101
91
  throw err;
102
92
  }
103
93
 
104
- getDirectories._isHostProvided = true;
105
94
  const { Descriptor,
106
95
  DirectoryEntryStream,
107
96
  filesystemErrorCode } = types;
@@ -112,7 +101,6 @@ if (Descriptor=== undefined) {
112
101
  throw err;
113
102
  }
114
103
 
115
- Descriptor._isHostProvided = true;
116
104
 
117
105
  if (DirectoryEntryStream=== undefined) {
118
106
  const err = new Error("unexpectedly undefined local import 'DirectoryEntryStream', was 'DirectoryEntryStream' available at instantiation?");
@@ -120,7 +108,6 @@ if (DirectoryEntryStream=== undefined) {
120
108
  throw err;
121
109
  }
122
110
 
123
- DirectoryEntryStream._isHostProvided = true;
124
111
 
125
112
  if (filesystemErrorCode=== undefined) {
126
113
  const err = new Error("unexpectedly undefined local import 'filesystemErrorCode', was 'filesystemErrorCode' available at instantiation?");
@@ -128,7 +115,6 @@ if (filesystemErrorCode=== undefined) {
128
115
  throw err;
129
116
  }
130
117
 
131
- filesystemErrorCode._isHostProvided = true;
132
118
  const { Error: Error$1 } = error;
133
119
 
134
120
  if (Error$1=== undefined) {
@@ -137,7 +123,6 @@ if (Error$1=== undefined) {
137
123
  throw err;
138
124
  }
139
125
 
140
- Error$1._isHostProvided = true;
141
126
  const { InputStream,
142
127
  OutputStream } = streams;
143
128
 
@@ -147,7 +132,6 @@ if (InputStream=== undefined) {
147
132
  throw err;
148
133
  }
149
134
 
150
- InputStream._isHostProvided = true;
151
135
 
152
136
  if (OutputStream=== undefined) {
153
137
  const err = new Error("unexpectedly undefined local import 'OutputStream', was 'OutputStream' available at instantiation?");
@@ -155,7 +139,6 @@ if (OutputStream=== undefined) {
155
139
  throw err;
156
140
  }
157
141
 
158
- OutputStream._isHostProvided = true;
159
142
  const { getRandomBytes } = random;
160
143
 
161
144
  if (getRandomBytes=== undefined) {
@@ -164,7 +147,6 @@ if (getRandomBytes=== undefined) {
164
147
  throw err;
165
148
  }
166
149
 
167
- getRandomBytes._isHostProvided = true;
168
150
 
169
151
  function promiseWithResolvers() {
170
152
  if (Promise.withResolvers) {
@@ -193,10 +175,11 @@ const CURRENT_TASK_META = {};
193
175
 
194
176
  function _getGlobalCurrentTaskMeta(componentIdx) {
195
177
  const v = CURRENT_TASK_META[componentIdx];
196
- if (v === undefined) { return v; }
178
+ if (v === undefined || v === null) { return undefined; }
197
179
  return { ...v };
198
180
  }
199
181
 
182
+
200
183
  function _setGlobalCurrentTaskMeta(args) {
201
184
  if (!args) { throw new TypeError('args missing'); }
202
185
  if (args.taskID === undefined) { throw new TypeError('missing task ID'); }
@@ -205,6 +188,7 @@ function _setGlobalCurrentTaskMeta(args) {
205
188
  return CURRENT_TASK_META[componentIdx] = { taskID, componentIdx };
206
189
  }
207
190
 
191
+
208
192
  function _withGlobalCurrentTaskMeta(args) {
209
193
  _debugLog('[_withGlobalCurrentTaskMeta()] args', args);
210
194
  if (!args) { throw new TypeError('args missing'); }
@@ -383,7 +367,9 @@ class RepTable {
383
367
  const _coinFlip = () => { return Math.random() > 0.5; };
384
368
  let SCOPE_ID = 0;
385
369
  const I32_MIN = -2_147_483_648;
386
- const I32_MAX = 2_147_483_647;
370
+
371
+ const I32_MAX= 2_147_483_647;
372
+
387
373
 
388
374
  function _isValidNumericPrimitive(ty, v) {
389
375
  if (v === undefined || v === null) { return false; }
@@ -425,8 +411,10 @@ function _requireValidNumericPrimitive(ty, v) {
425
411
  }
426
412
  return true;
427
413
  }
414
+
428
415
  const _typeCheckValidI32 = (n) => typeof n === 'number' && n >= I32_MIN && n <= I32_MAX;
429
416
 
417
+
430
418
  const _typeCheckAsyncFn= (f) => {
431
419
  return f instanceof ASYNC_FN_CTOR;
432
420
  };
@@ -462,7 +450,9 @@ function clearCurrentTask(componentIdx, taskID) {
462
450
  const taskMeta = tasks.pop();
463
451
  return taskMeta.task;
464
452
  }
465
- const CURRENT_TASK_MAY_BLOCK = new WebAssembly.Global({ value: 'i32', mutable: true }, 0);
453
+
454
+ const CURRENT_TASK_MAY_BLOCK= globalThis.WebAssembly ? new globalThis.WebAssembly.Global({ value: 'i32', mutable: true }, 0) : false;
455
+
466
456
  const ASYNC_CURRENT_TASK_IDS = [];
467
457
  const ASYNC_CURRENT_COMPONENT_IDXS = [];
468
458
 
@@ -674,11 +664,7 @@ class AsyncSubtask {
674
664
 
675
665
  if (this.#onProgressFn) { this.#onProgressFn(); }
676
666
 
677
- if (subtaskValue === null) {
678
- if (this.#cancelRequested) {
679
- throw new Error('cancel was not requested, but no value present at return');
680
- }
681
-
667
+ if (subtaskValue === null && this.#cancelRequested) {
682
668
  if (this.#state === AsyncSubtask.State.STARTING) {
683
669
  this.#state = AsyncSubtask.State.CANCELLED_BEFORE_STARTED;
684
670
  } else {
@@ -1348,6 +1334,7 @@ class Waitable {
1348
1334
 
1349
1335
  function rscTableCreateOwn(table, rep) {
1350
1336
  const free = table[0] & ~T_FLAG;
1337
+ table._createdReps.add(rep);
1351
1338
  if (free === 0) {
1352
1339
  table.push(0);
1353
1340
  table.push(rep | T_FLAG);
@@ -1493,8 +1480,6 @@ class Waitable {
1493
1480
 
1494
1481
  #parentSubtask = null;
1495
1482
 
1496
- #needsExclusiveLock = false;
1497
-
1498
1483
  #errHandling;
1499
1484
 
1500
1485
  #backpressurePromise;
@@ -1569,7 +1554,6 @@ class Waitable {
1569
1554
 
1570
1555
  if (opts.parentSubtask) { this.#parentSubtask = opts.parentSubtask; }
1571
1556
 
1572
- this.#needsExclusiveLock = this.isSync() || !this.hasCallback();
1573
1557
 
1574
1558
  if (opts.errHandling) { this.#errHandling = opts.errHandling; }
1575
1559
  }
@@ -1643,8 +1627,12 @@ class Waitable {
1643
1627
  }
1644
1628
 
1645
1629
  async runCallbackFn(...args) {
1646
- if (!this.#callbackFn) { throw new Error('on callback function has been set for task'); }
1647
- return await this.#callbackFn.apply(null, args);
1630
+ if (!this.#callbackFn) { throw new Error('no callback function has been set for task'); }
1631
+ return _withGlobalCurrentTaskMetaAsync({
1632
+ taskID: this.#id,
1633
+ componentIdx: this.#componentIdx,
1634
+ fn: () => { return this.#callbackFn.apply(null, args); }
1635
+ });
1648
1636
  }
1649
1637
 
1650
1638
  getCalleeParams() {
@@ -1675,6 +1663,11 @@ class Waitable {
1675
1663
  enterSync() {
1676
1664
  if (this.needsExclusiveLock()) {
1677
1665
  const cstate = getOrCreateAsyncState(this.#componentIdx);
1666
+ // TODO(???): it is *very possible* for a the line below to fail if
1667
+ // an async function is already running (and holding the exclusive lock)
1668
+ //
1669
+ // It's not really possible to fix this unless we turn every sync export into
1670
+ // an async export that will use the regular async enabled `enter()`.
1678
1671
  cstate.exclusiveLock();
1679
1672
  }
1680
1673
  return true;
@@ -1685,6 +1678,7 @@ class Waitable {
1685
1678
  taskID: this.#id,
1686
1679
  componentIdx: this.#componentIdx,
1687
1680
  subtaskID: this.getParentSubtask()?.id(),
1681
+ entryFnName: this.#entryFnName,
1688
1682
  });
1689
1683
 
1690
1684
  if (this.#entered) {
@@ -1693,12 +1687,14 @@ class Waitable {
1693
1687
 
1694
1688
  const cstate = getOrCreateAsyncState(this.#componentIdx);
1695
1689
 
1690
+ await cstate.nextTaskExecutionSlot({ task: this });
1691
+
1696
1692
  // If a task is either synchronous or host-provided (e.g. a host import, whether sync or async)
1697
1693
  // then we can avoid component-relevant tracking and immediately enter
1698
1694
  if (this.isSync() || opts?.isHost) {
1699
1695
  this.#entered = true;
1700
1696
 
1701
- // TODO(breaking): remove once manually-spccifying async fns is removed
1697
+ // TODO(breaking): remove once manually-specifying async fns is removed
1702
1698
  // It is currently possible for an actually sync export to be specified
1703
1699
  // as async via JSPI
1704
1700
  if (this.#isManualAsync) {
@@ -1708,11 +1704,15 @@ class Waitable {
1708
1704
  return this.#entered;
1709
1705
  }
1710
1706
 
1711
- if (cstate.hasBackpressure()) {
1707
+ // Perform intial backpressure check
1708
+ if (cstate.hasBackpressure() || this.needsExclusiveLock() && cstate.isExclusivelyLocked()) {
1712
1709
  cstate.addBackpressureWaiter();
1713
1710
 
1714
1711
  const result = await this.waitUntil({
1715
- readyFn: () => !cstate.hasBackpressure(),
1712
+ readyFn: () => {
1713
+ return !(cstate.hasBackpressure()
1714
+ || this.needsExclusiveLock() && cstate.isExclusivelyLocked());
1715
+ },
1716
1716
  cancellable: true,
1717
1717
  });
1718
1718
 
@@ -1724,7 +1724,32 @@ class Waitable {
1724
1724
  }
1725
1725
  }
1726
1726
 
1727
- if (this.needsExclusiveLock()) { cstate.exclusiveLock(); }
1727
+ // Lock the component state or keep trying until we can/do
1728
+ try {
1729
+ if (this.needsExclusiveLock()) { cstate.exclusiveLock(); }
1730
+ } catch {
1731
+ // Continuously attempt to lock until we can
1732
+ while (cstate.hasBackpressure() || this.needsExclusiveLock() && cstate.isExclusivelyLocked()) {
1733
+ try {
1734
+ if (this.needsExclusiveLock()) { cstate.exclusiveLock(); }
1735
+ break;
1736
+ } catch(err) {
1737
+ cstate.addBackpressureWaiter();
1738
+ const result = await this.waitUntil({
1739
+ readyFn: () => {
1740
+ return !(cstate.hasBackpressure()
1741
+ || this.needsExclusiveLock() && cstate.isExclusivelyLocked());
1742
+ },
1743
+ cancellable: true,
1744
+ });
1745
+ cstate.removeBackpressureWaiter();
1746
+ if (result === AsyncTask.BlockResult.CANCELLED) {
1747
+ this.cancel();
1748
+ return false;
1749
+ }
1750
+ }
1751
+ }
1752
+ }
1728
1753
 
1729
1754
  this.#entered = true;
1730
1755
  return this.#entered;
@@ -1735,38 +1760,19 @@ class Waitable {
1735
1760
  isResolved() { return this.#state === AsyncTask.State.RESOLVED; }
1736
1761
 
1737
1762
  async waitUntil(opts) {
1738
- const { readyFn, waitableSetRep, cancellable } = opts;
1739
- _debugLog('[AsyncTask#waitUntil()] args', { taskID: this.#id, waitableSetRep, cancellable });
1740
-
1741
- const state = getOrCreateAsyncState(this.#componentIdx);
1742
- const wset = state.handles.get(waitableSetRep);
1743
-
1744
- let event;
1763
+ const { readyFn, cancellable } = opts;
1764
+ _debugLog('[AsyncTask#waitUntil()] args', { taskID: this.#id, cancellable });
1745
1765
 
1746
- wset.incrementNumWaiting();
1766
+ // TODO(fix): check for cancel
1767
+ // TODO(fix): determinism
1768
+ // TODO(threads): add this thread to waiting list
1747
1769
 
1748
1770
  const keepGoing = await this.suspendUntil({
1749
- readyFn: () => {
1750
- const hasPendingEvent = wset.hasPendingEvent();
1751
- const ready = readyFn();
1752
- return ready && hasPendingEvent;
1753
- },
1771
+ readyFn,
1754
1772
  cancellable,
1755
1773
  });
1756
1774
 
1757
- if (keepGoing) {
1758
- event = wset.getPendingEvent();
1759
- } else {
1760
- event = {
1761
- code: ASYNC_EVENT_CODE.TASK_CANCELLED,
1762
- payload0: 0,
1763
- payload1: 0,
1764
- };
1765
- }
1766
-
1767
- wset.decrementNumWaiting();
1768
-
1769
- return event;
1775
+ return keepGoing;
1770
1776
  }
1771
1777
 
1772
1778
  async yieldUntil(opts) {
@@ -1807,9 +1813,8 @@ class Waitable {
1807
1813
 
1808
1814
  const ready = readyFn();
1809
1815
  if (ready && ASYNC_DETERMINISM === 'random') {
1810
- // const coinFlip = _coinFlip();
1811
- // if (coinFlip) { return true }
1812
- return true;
1816
+ const coinFlip = _coinFlip();
1817
+ if (coinFlip) { return true }
1813
1818
  }
1814
1819
 
1815
1820
  const keepGoing = await this.immediateSuspend({ cancellable, readyFn });
@@ -1936,7 +1941,6 @@ class Waitable {
1936
1941
 
1937
1942
  // TODO: do cleanup here to reset the machinery so we can run again?
1938
1943
 
1939
-
1940
1944
  this.cancel({ error: taskErr });
1941
1945
  }
1942
1946
 
@@ -1978,7 +1982,7 @@ class Waitable {
1978
1982
  }
1979
1983
  }
1980
1984
 
1981
- exit() {
1985
+ exit(args) {
1982
1986
  _debugLog('[AsyncTask#exit()]', {
1983
1987
  componentIdx: this.#componentIdx,
1984
1988
  taskID: this.#id,
@@ -2013,8 +2017,10 @@ class Waitable {
2013
2017
  if (!state) { throw new Error('missing async state for component [' + this.#componentIdx + ']'); }
2014
2018
 
2015
2019
  // Exempt the host from exclusive lock check
2016
- if (this.#componentIdx !== -1 && this.needsExclusiveLock() && !state.isExclusivelyLocked()) {
2017
- throw new Error(`task [${this.#id}] exit: component [${this.#componentIdx}] should have been exclusively locked`);
2020
+ if (this.#componentIdx !== -1 && !args?.skipExclusiveLockCheck) {
2021
+ if (this.needsExclusiveLock() && !state.isExclusivelyLocked()) {
2022
+ throw new Error(`task [${this.#id}] exit: component [${this.#componentIdx}] should have been exclusively locked`);
2023
+ }
2018
2024
  }
2019
2025
 
2020
2026
  state.exclusiveRelease();
@@ -2100,6 +2106,7 @@ function _lowerImportBackwardsCompat(args) {
2100
2106
  isManualAsync,
2101
2107
  paramLiftFns,
2102
2108
  resultLowerFns,
2109
+ hasResultPointer,
2103
2110
  funcTypeIsAsync,
2104
2111
  metadata,
2105
2112
  memoryIdx,
@@ -2174,6 +2181,10 @@ function _lowerImportBackwardsCompat(args) {
2174
2181
 
2175
2182
  // If there is an existing task, this should be part of a subtask
2176
2183
  const memory = getMemoryFn();
2184
+ // Canonical ABI lower appends result storage as a trailing
2185
+ // param when async lower has any flat result, or sync lower
2186
+ // has more than one flat result.
2187
+ const resultPtr = hasResultPointer ? params[params.length - 1] : undefined;
2177
2188
  const subtask = task.createSubtask({
2178
2189
  componentIdx,
2179
2190
  parentTask: task,
@@ -2183,8 +2194,9 @@ function _lowerImportBackwardsCompat(args) {
2183
2194
  callMetadata: {
2184
2195
  memoryIdx,
2185
2196
  memory,
2186
- realloc: getReallocFn(),
2187
- resultPtr: params[0],
2197
+ realloc: getReallocFn?.(),
2198
+ getReallocFn,
2199
+ resultPtr,
2188
2200
  lowers: resultLowerFns,
2189
2201
  stringEncoding,
2190
2202
  }
@@ -2235,7 +2247,7 @@ function _lowerImportBackwardsCompat(args) {
2235
2247
  // NOTE: at this point we know that we are working with an async lowered import
2236
2248
 
2237
2249
  const subtaskState = subtask.getStateNumber();
2238
- if (subtaskState < 0 || subtaskState > 2**5) {
2250
+ if (subtaskState < 0 || subtaskState >= 2**4) {
2239
2251
  throw new Error('invalid subtask state, out of valid range');
2240
2252
  }
2241
2253
 
@@ -2334,7 +2346,7 @@ function _lowerImportBackwardsCompat(args) {
2334
2346
  let val;
2335
2347
 
2336
2348
  if (ctx.useDirectParams) {
2337
- if (params.length === 0) { throw new Error('expected at least a single i32 argument'); }
2349
+ if (ctx.params.length === 0) { throw new Error('expected at least a single i32 argument'); }
2338
2350
  val = ctx.params[0];
2339
2351
  ctx.params = ctx.params.slice(1);
2340
2352
  return [val, ctx];
@@ -2490,7 +2502,7 @@ function _lowerImportBackwardsCompat(args) {
2490
2502
  caseIdx = liftRes[0];
2491
2503
  ctx = liftRes[1];
2492
2504
 
2493
- const [ tag, liftFn, size32, align32, payloadOffset32 ] = casesAndLiftFns[caseIdx];
2505
+ const [ tag, liftFn, size32, align32, payloadOffset32, caseFlatCount, variantFlatCount ] = casesAndLiftFns[caseIdx];
2494
2506
  if (payloadOffset32 === undefined) { throw new Error('unexpectedly missing payload offset'); }
2495
2507
 
2496
2508
  if (originalPtr !== undefined) {
@@ -2502,7 +2514,9 @@ function _lowerImportBackwardsCompat(args) {
2502
2514
  val = { tag };
2503
2515
  // NOTE: here we need to move past the entire object in memory
2504
2516
  // despite moving to the payload which we now know is missing/unnecessary
2505
- ctx.storagePtr = originalPtr + size32;
2517
+ if (originalPtr !== undefined) {
2518
+ ctx.storagePtr = originalPtr + size32;
2519
+ }
2506
2520
  } else {
2507
2521
  const [newVal, newCtx] = liftFn(ctx);
2508
2522
  val = { tag, val: newVal };
@@ -2510,105 +2524,144 @@ function _lowerImportBackwardsCompat(args) {
2510
2524
 
2511
2525
  // NOTE: Padding can be left over after doing the lift if it was less than
2512
2526
  // space left for the payload normally.
2513
- if (ctx.storagePtr < originalPtr + size32) {
2514
- ctx.storagePtr = originalPtr + size32;
2527
+ if (originalPtr !== undefined) {
2528
+ ctx.storagePtr = Math.max(ctx.storagePtr, originalPtr + size32);
2515
2529
  }
2516
2530
  }
2517
2531
 
2518
- const rem = ctx.storagePtr % align32;
2519
- if (rem !== 0) { ctx.storagePtr += align32 - rem; }
2532
+ if (origUseParams) {
2533
+ if (caseFlatCount === undefined || variantFlatCount === undefined) {
2534
+ throw new Error('variant flat count metadata is missing');
2535
+ }
2536
+ if (caseFlatCount === null || variantFlatCount === null) {
2537
+ throw new Error('cannot lift variant with unknown flat count');
2538
+ }
2539
+ const remainingPayloadParams = variantFlatCount - 1 - caseFlatCount;
2540
+ if (remainingPayloadParams < 0) {
2541
+ throw new Error(`invalid variant flat count metadata`);
2542
+ }
2543
+ if (ctx.params.length < remainingPayloadParams) {
2544
+ throw new Error(`expected at least [${remainingPayloadParams}] remaining variant payload params, but got [${ctx.params.length}]`);
2545
+ }
2546
+ ctx.params = ctx.params.slice(remainingPayloadParams);
2547
+ }
2548
+
2549
+ if (ctx.storagePtr !== undefined) {
2550
+ const rem = ctx.storagePtr % align32;
2551
+ if (rem !== 0) { ctx.storagePtr += align32 - rem; }
2552
+ }
2520
2553
 
2521
2554
  return [val, ctx];
2522
2555
  }
2523
2556
  }
2524
2557
 
2525
2558
  function _liftFlatList(meta) {
2526
- const { elemLiftFn, elemSize32, elemAlign32, knownLen } = meta;
2559
+ const { elemLiftFn, elemSize32, elemAlign32, knownLen, typedArray } = meta;
2560
+
2561
+ const listValue =
2562
+ typedArray === undefined
2563
+ ? values => values
2564
+ : values => new typedArray(values);
2527
2565
 
2528
2566
  const readValuesAndReset = (ctx, originalPtr, dataPtr, len) => {
2529
2567
  ctx.storagePtr = dataPtr;
2530
2568
  const val = [];
2531
2569
  for (var i = 0; i < len; i++) {
2570
+ const elemPtr = dataPtr + i * elemSize32;
2571
+ ctx.storagePtr = elemPtr;
2532
2572
  const [res, nextCtx] = elemLiftFn(ctx);
2533
2573
  val.push(res);
2534
2574
  ctx = nextCtx;
2535
2575
 
2536
- const rem = ctx.storagePtr % elemAlign32;
2537
- if (rem !== 0) { ctx.storagePtr += elemAlign32 - rem; }
2576
+ ctx.storagePtr = Math.max(ctx.storagePtr, elemPtr + elemSize32);
2538
2577
  }
2539
2578
  if (originalPtr !== null) { ctx.storagePtr = originalPtr; }
2540
- return [val, ctx];
2579
+ return [listValue(val), ctx];
2541
2580
  };
2542
2581
 
2543
- // TODO(fix): special case for u8/u16/etc into appropriate type
2544
-
2545
2582
  return function _liftFlatListInner(ctx) {
2546
2583
  _debugLog('[_liftFlatList()] args', { ctx });
2547
2584
 
2548
2585
  let liftResults;
2549
2586
  if (knownLen !== undefined) { // list with known length
2550
-
2551
2587
  if (ctx.useDirectParams) {
2552
- // list with known length w/ direct params
2553
- const dataPtr = ctx.params[0];
2554
- ctx.params = ctx.params.slice(1);
2555
-
2556
- // TODO(???): is it possible for all values to come in from params?
2557
-
2558
- ctx.useDirectParams = false;
2559
- const originalPtr = ctx.storagePtr;
2560
- ctx.storageLen = knownLen * elemSize32;
2561
-
2562
- liftResults = readValuesAndReset(ctx, originalPtr, dataPtr, knownLen);
2563
-
2564
- ctx.useDirectParams = true;
2565
- ctx.storagePtr = null;
2566
- ctx.storageLen = null;
2567
-
2568
- } else {
2569
- ctx.storageLen = knownLen * elemSize32;
2570
- liftResults = readValuesAndReset(ctx, null, ctx.storagePtr, knownLen);
2588
+ if (ctx.memory === null) {
2589
+ // If this lift should be using direct params,
2590
+ // and the memory is missing, we are in the case where
2591
+ // a fixed length list (or other value) is being passed only
2592
+ // via parameters to the function.
2593
+ //
2594
+ // Normally, we would expect to use the direct parameters as a
2595
+ // memory location + size, but in this case, *all* values are being passed directly,
2596
+ // via params.
2597
+ //
2598
+ _debugLog('memory unexpectedly missing while lifting unknown length list', { ctx });
2599
+ liftResults = [listValue(ctx.params.slice(0, knownLen)), ctx];
2600
+ ctx.params = ctx.params.slice(knownLen);
2601
+ } else {
2602
+ // in-memory list with unknown length w/ direct params
2603
+ const dataPtr = ctx.params[0];
2604
+ ctx.params = ctx.params.slice(1);
2605
+
2606
+ ctx.useDirectParams = false;
2607
+ const originalPtr = ctx.storagePtr;
2608
+ ctx.storageLen = knownLen * elemSize32;
2609
+
2610
+ liftResults = readValuesAndReset(ctx, originalPtr, dataPtr, knownLen);
2611
+
2612
+ ctx.useDirectParams = true;
2613
+ ctx.storagePtr = undefined;
2614
+ ctx.storageLen = undefined;
2615
+ }
2616
+ } else { // indirect params
2617
+ if (ctx.memory === null) {
2618
+ _debugLog('memory unexpectedly missing while lifting known length list', { knownLen, ctx });
2619
+ throw new Error(`memory missing while lifting known length (${knownLen}) list`);
2571
2620
  }
2572
2621
 
2573
- } else { // unknown length list
2574
-
2575
- if (ctx.useDirectParams) {
2576
- // unknown length list ptr w/ direct params
2577
- const dataPtr = ctx.params[0];
2578
- const len = ctx.params[1];
2579
- ctx.params = ctx.params.slice(2);
2580
-
2581
- ctx.useDirectParams = false;
2582
- const originalPtr = ctx.storagePtr;
2583
- ctx.storageLen = len * elemSize32;
2584
-
2585
- liftResults = readValuesAndReset(ctx, originalPtr, dataPtr, len);
2586
-
2587
- ctx.useDirectParams = true;
2588
- ctx.storagePtr = null;
2589
- ctx.storageLen = null;
2590
-
2591
- } else {
2592
- // unknown length list ptr w/ in-memory params
2593
- ctx.storageLen = 8;
2594
-
2595
- const dataPtrLiftRes = _liftFlatU32(ctx);
2596
- const dataPtr = dataPtrLiftRes[0];
2597
- ctx = dataPtrLiftRes[1];
2598
-
2599
- const lenLiftRes = _liftFlatU32(ctx);
2600
- const len = lenLiftRes[0];
2601
- ctx = lenLiftRes[1];
2602
-
2603
- const originalPtr = ctx.storagePtr;
2604
- ctx.storagePtr = dataPtr;
2605
-
2606
- ctx.storageLen = len * elemSize32;
2607
- liftResults = readValuesAndReset(ctx, originalPtr, dataPtr, len);
2622
+ ctx.storageLen = knownLen * elemSize32;
2623
+ liftResults = readValuesAndReset(ctx, null, ctx.storagePtr, knownLen);
2608
2624
  }
2609
- }
2625
+
2626
+ } else { // unknown length list
2610
2627
 
2611
- return liftResults;
2628
+ if (ctx.useDirectParams) {
2629
+ // unknown length list ptr w/ direct params
2630
+ const dataPtr = ctx.params[0];
2631
+ const len = ctx.params[1];
2632
+ ctx.params = ctx.params.slice(2);
2633
+
2634
+ ctx.useDirectParams = false;
2635
+ const originalPtr = ctx.storagePtr;
2636
+ ctx.storageLen = len * elemSize32;
2637
+
2638
+ liftResults = readValuesAndReset(ctx, originalPtr, dataPtr, len);
2639
+
2640
+ ctx.useDirectParams = true;
2641
+ ctx.storagePtr = undefined;
2642
+ ctx.storageLen = undefined;
2643
+
2644
+ } else {
2645
+ // unknown length list ptr w/ in-memory params
2646
+ ctx.storageLen = 8;
2647
+
2648
+ const dataPtrLiftRes = _liftFlatU32(ctx);
2649
+ const dataPtr = dataPtrLiftRes[0];
2650
+ ctx = dataPtrLiftRes[1];
2651
+
2652
+ const lenLiftRes = _liftFlatU32(ctx);
2653
+ const len = lenLiftRes[0];
2654
+ ctx = lenLiftRes[1];
2655
+
2656
+ const originalPtr = ctx.storagePtr;
2657
+ ctx.storagePtr = dataPtr;
2658
+
2659
+ ctx.storageLen = len * elemSize32;
2660
+ liftResults = readValuesAndReset(ctx, originalPtr, dataPtr, len);
2661
+ }
2662
+ }
2663
+
2664
+ return liftResults;
2612
2665
  }
2613
2666
  }
2614
2667
 
@@ -2773,14 +2826,29 @@ function _lowerFlatStringUTF16(ctx) {
2773
2826
  ctx.storagePtr += len;
2774
2827
  }
2775
2828
 
2776
- function _lowerFlatRecord(fieldMetas) {
2829
+ function _lowerFlatRecord(meta) {
2830
+ const { fieldMetas, size32: recordSize32, align32: recordAlign32 } = meta;
2777
2831
  return function _lowerFlatRecordInner(ctx) {
2778
2832
  _debugLog('[_lowerFlatRecord()] args', { ctx });
2779
2833
 
2834
+ const originalPtr = ctx.storagePtr;
2780
2835
  const r = ctx.vals[0];
2781
2836
  for (const [tag, lowerFn, size32, align32 ] of fieldMetas) {
2837
+ const rem = ctx.storagePtr % align32;
2838
+ if (rem !== 0) { ctx.storagePtr += align32 - rem; }
2839
+
2840
+ const fieldPtr = ctx.storagePtr;
2782
2841
  ctx.vals = [r[tag]];
2783
2842
  lowerFn(ctx);
2843
+
2844
+ ctx.storagePtr = Math.max(ctx.storagePtr, fieldPtr + size32);
2845
+ }
2846
+
2847
+ ctx.storagePtr = Math.max(ctx.storagePtr, originalPtr + recordSize32);
2848
+
2849
+ const rem = ctx.storagePtr % recordAlign32;
2850
+ if (rem !== 0) {
2851
+ ctx.storagePtr += recordAlign32 - rem;
2784
2852
  }
2785
2853
  }
2786
2854
  }
@@ -2821,16 +2889,10 @@ function _lowerFlatVariant(lowerMetas) {
2821
2889
  ctx.vals = [val];
2822
2890
  if (lowerFn) { lowerFn(ctx); }
2823
2891
 
2824
- let bytesWritten = ctx.storagePtr - payloadOffsetPtr;
2892
+ ctx.storagePtr = Math.max(ctx.storagePtr, originalPtr + size32);
2825
2893
 
2826
2894
  const rem = ctx.storagePtr % align32;
2827
- if (rem !== 0) {
2828
- const pad = align32 - rem;
2829
- ctx.storagePtr += pad;
2830
- bytesWritten += pad;
2831
- }
2832
-
2833
- ctx.storagePtr += bytesWritten;
2895
+ if (rem !== 0) { ctx.storagePtr += align32 - rem; }
2834
2896
  }
2835
2897
  }
2836
2898
 
@@ -2864,16 +2926,16 @@ function _lowerFlatList(meta) {
2864
2926
  stringEncoding: ctx.stringEncoding,
2865
2927
  };
2866
2928
  for (let idx = 0; idx < list.length; idx++) {
2929
+ const elemPtr = storagePtr + idx * elemSize32;
2930
+ lowerCtx.storagePtr = elemPtr;
2867
2931
  lowerCtx.vals = list.slice(idx, idx+1);
2868
2932
  elemLowerFn(lowerCtx);
2933
+ lowerCtx.storagePtr = Math.max(lowerCtx.storagePtr, elemPtr + elemSize32);
2869
2934
  }
2870
-
2871
- const bytesLowered = lowerCtx.storagePtr - ctx.storagePtr;
2872
2935
  ctx.storagePtr = lowerCtx.storagePtr;
2873
2936
 
2874
2937
  // TODO: implement parma-only known-length processing
2875
2938
 
2876
- ctx.storagePtr += bytesLowered;
2877
2939
  return;
2878
2940
  }
2879
2941
 
@@ -2895,10 +2957,12 @@ function _lowerFlatList(meta) {
2895
2957
  const origPtr = ctx.storagePtr;
2896
2958
  ctx.storagePtr = dataPtr;
2897
2959
 
2898
- ctx.storagePtr = dataPtr;
2899
- for (const elem of elems) {
2960
+ for (const [idx, elem] of elems.entries()) {
2961
+ const elemPtr = dataPtr + idx * elemSize32;
2962
+ ctx.storagePtr = elemPtr;
2900
2963
  ctx.vals = [elem];
2901
2964
  elemLowerFn(ctx);
2965
+ ctx.storagePtr = Math.max(ctx.storagePtr, elemPtr + elemSize32);
2902
2966
  }
2903
2967
 
2904
2968
  ctx.storagePtr = origPtr;
@@ -2910,9 +2974,13 @@ function _lowerFlatList(meta) {
2910
2974
  throw new TypeError(`invalid list input of length [${elems.length}], must be length [${knownLen}]`);
2911
2975
  }
2912
2976
 
2913
- for (const elem of elems) {
2977
+ const originalPtr = ctx.storagePtr;
2978
+ for (const [idx, elem] of elems.entries()) {
2979
+ const elemPtr = originalPtr + idx * elemSize32;
2980
+ ctx.storagePtr = elemPtr;
2914
2981
  ctx.vals = [elem];
2915
2982
  elemLowerFn(ctx);
2983
+ ctx.storagePtr = Math.max(ctx.storagePtr, elemPtr + elemSize32);
2916
2984
  }
2917
2985
  }
2918
2986
 
@@ -2925,13 +2993,27 @@ function _lowerFlatList(meta) {
2925
2993
  }
2926
2994
  }
2927
2995
 
2928
- function _lowerFlatTuple(elemLowerMetas) {
2996
+ function _lowerFlatTuple(meta) {
2997
+ const { elemLowerMetas, size32: tupleSize32, align32: tupleAlign32 } = meta;
2929
2998
  return function _lowerFlatTupleInner(ctx) {
2930
2999
  _debugLog('[_lowerFlatTuple()] args', { ctx });
3000
+ const originalPtr = ctx.storagePtr;
2931
3001
  const tuple = ctx.vals[0];
2932
3002
  for (const [idx, [ lowerFn, size32, align32 ]] of elemLowerMetas.entries()) {
3003
+ const rem = ctx.storagePtr % align32;
3004
+ if (rem !== 0) { ctx.storagePtr += align32 - rem; }
3005
+
3006
+ const elemPtr = ctx.storagePtr;
2933
3007
  ctx.vals = [tuple[idx]];
2934
3008
  lowerFn(ctx);
3009
+ ctx.storagePtr = Math.max(ctx.storagePtr, elemPtr + size32);
3010
+ }
3011
+
3012
+ ctx.storagePtr = Math.max(ctx.storagePtr, originalPtr + tupleSize32);
3013
+
3014
+ const rem = ctx.storagePtr % tupleAlign32;
3015
+ if (rem !== 0) {
3016
+ ctx.storagePtr += tupleAlign32 - rem;
2935
3017
  }
2936
3018
  }
2937
3019
  }
@@ -2945,10 +3027,14 @@ function _lowerFlatFlags(meta) {
2945
3027
 
2946
3028
  let flagObj = ctx.vals[0];
2947
3029
  let flagValue = 0;
2948
- for (const [idx, name] of names.entries()) {
2949
- if (flagObj[name] === true) {
2950
- flagValue |= 1 << idx;
3030
+ if (typeof flagObj === 'object' && flagObj !== null) {
3031
+ for (const [idx, name] of names.entries()) {
3032
+ if (flagObj[name] === true) {
3033
+ flagValue |= 1 << idx;
3034
+ }
2951
3035
  }
3036
+ } else if (flagObj !== null && flagObj !== undefined) {
3037
+ throw new TypeError('only an object, undefined or null can be converted to flags');
2952
3038
  }
2953
3039
 
2954
3040
  const rem = ctx.storagePtr % align32;
@@ -3220,8 +3306,6 @@ class ComponentAsyncState {
3220
3306
  this.#locked = locked;
3221
3307
  }
3222
3308
 
3223
- // TODO(fix): we might want to check for pre-locked status here, we should be deterministically
3224
- // going from locked -> unlocked and vice versa
3225
3309
  exclusiveLock() {
3226
3310
  _debugLog('[ComponentAsyncState#exclusiveLock()]', {
3227
3311
  locked: this.#locked,
@@ -3254,6 +3338,54 @@ class ComponentAsyncState {
3254
3338
  this.#onExclusiveReleaseHandlers.push(fn);
3255
3339
  }
3256
3340
 
3341
+ // nextTaskPromise & nextTaskQueue are used to await current task completion and queues
3342
+ // any tasks attempting to enter() and complete.
3343
+ //
3344
+ // see: nextTaskExecutionSlot()
3345
+ //
3346
+ // TODO(threads): this should be unnecessary once threads are properly implemented,
3347
+ // as the task.enter() logic should suffice (it should be guaranteed that we cannot re-enter
3348
+ // unless the task in question is the current task in the thread execution, and only one can
3349
+ // run at a time)
3350
+ #nextTaskPromise = Promise.resolve(true);
3351
+ #nextTaskQueue = [];
3352
+
3353
+ async nextTaskExecutionSlot(args) {
3354
+ const { task } = args;
3355
+
3356
+ const placeholder = {
3357
+ completed: false,
3358
+ task,
3359
+ promise: task.exitPromise().then(() => {
3360
+ placeholder.completed = true;
3361
+ }),
3362
+ };
3363
+ this.#nextTaskQueue.push(placeholder);
3364
+
3365
+ let next;
3366
+ while (true) {
3367
+ await this.#nextTaskPromise;
3368
+
3369
+ next = this.#nextTaskQueue.find(placeholder => !placeholder.completed);
3370
+
3371
+ // This task is next in the queue, we can continue
3372
+ if (next === undefined || next === placeholder) {
3373
+ this.#nextTaskPromise = next.promise;
3374
+ if (this.#nextTaskQueue.length > 1000) {
3375
+ this.#nextTaskQueue = this.#nextTaskQueue.filter(p => !p.completed);
3376
+ if (this.#nextTaskQueue.length > 1000) {
3377
+ _debugLog('[ComponentAsyncState#()nextTaskExecutionSlot] next task queue length > 1000 even after cleanup, tasks may be leaking');
3378
+ }
3379
+ }
3380
+ break;
3381
+ }
3382
+
3383
+ // If we get here, this task was *not* next in the queue, continue waiting
3384
+ // (at this point the task that *is* next will likely have already set itself
3385
+ // as this.#nextTaskPromise)
3386
+ }
3387
+ }
3388
+
3257
3389
  #getSuspendedTaskMeta(taskID) {
3258
3390
  return this.#suspendedTasksByTaskID.get(taskID);
3259
3391
  }
@@ -3699,7 +3831,12 @@ class ComponentAsyncState {
3699
3831
 
3700
3832
  }
3701
3833
 
3702
- const base64Compile = str => WebAssembly.compile(typeof Buffer !== 'undefined' ? Buffer.from(str, 'base64') : Uint8Array.from(atob(str), b => b.charCodeAt(0)));
3834
+ const base64Compile = str => WebAssembly.compile(
3835
+ typeof Buffer !== 'undefined'
3836
+ ? Buffer.from(str, 'base64')
3837
+ : Uint8Array.from(atob(str), b => b.charCodeAt(0))
3838
+ );
3839
+
3703
3840
 
3704
3841
  const isNode = typeof process !== 'undefined' && process.versions && process.versions.node;
3705
3842
  let _fs;
@@ -3717,7 +3854,8 @@ const symbolRscHandle = Symbol('handle');
3717
3854
 
3718
3855
  const symbolRscRep = Symbol.for('cabiRep');
3719
3856
 
3720
- const handleTables = [];
3857
+ const HANDLE_TABLES= [];
3858
+
3721
3859
 
3722
3860
  class ComponentError extends Error {
3723
3861
  constructor (value) {
@@ -3746,10 +3884,15 @@ const instantiateCore = WebAssembly.instantiate;
3746
3884
 
3747
3885
  let exports0;
3748
3886
  let exports1;
3887
+
3749
3888
  const handleTable2 = [T_FLAG, 0];
3889
+ handleTable2._createdReps = new Set();
3890
+
3891
+
3750
3892
  const captureTable2= new Map();
3751
- let captureCnt2 = 0;
3752
- handleTables[2] = handleTable2;
3893
+ let captureCnt2= 0;
3894
+
3895
+ HANDLE_TABLES[2] = handleTable2;
3753
3896
 
3754
3897
  const _trampoline5 = function() {
3755
3898
  _debugLog('[iface="wasi:cli/stderr@0.2.3", function="get-stderr"] [Instruction::CallInterface] (sync, @ enter)');
@@ -3761,11 +3904,11 @@ const _trampoline5 = function() {
3761
3904
 
3762
3905
  const createTask = () => {
3763
3906
  const results = createNewCurrentTask({
3764
- componentIdx: -1, // 0,
3907
+ componentIdx: -1,
3765
3908
  isAsync: false,
3766
3909
  entryFnName: 'getStderr',
3767
3910
  getCallbackFn: () => null,
3768
- callbackFnName: 'null',
3911
+ callbackFnName: null,
3769
3912
  errHandling: 'none',
3770
3913
  callingWasmExport: false,
3771
3914
  });
@@ -3773,7 +3916,11 @@ const _trampoline5 = function() {
3773
3916
  };
3774
3917
 
3775
3918
  taskCreation: {
3776
- parentTask = getCurrentTask(0)?.task;
3919
+ parentTask = getCurrentTask(
3920
+ 0,
3921
+ _getGlobalCurrentTaskMeta(0)?.taskID,
3922
+ )?.task;
3923
+
3777
3924
  if (!parentTask) {
3778
3925
  createTask();
3779
3926
  break taskCreation;
@@ -3791,12 +3938,25 @@ const _trampoline5 = function() {
3791
3938
  }
3792
3939
 
3793
3940
  const started = task.enterSync();
3794
- let ret = _withGlobalCurrentTaskMeta({
3795
- componentIdx: task.componentIdx(),
3796
- taskID: task.id(),
3797
- fn: () => getStderr()
3798
- })
3799
- ;
3941
+
3942
+ let ret;
3943
+
3944
+ try {
3945
+ ret = _withGlobalCurrentTaskMeta({
3946
+ componentIdx: task.componentIdx(),
3947
+ taskID: task.id(),
3948
+ fn: () => getStderr(),
3949
+ })
3950
+ ;
3951
+ } catch (err) {
3952
+
3953
+ task.setErrored(err);
3954
+ task.reject(err);
3955
+ task.exit();
3956
+ throw err;
3957
+
3958
+ }
3959
+
3800
3960
 
3801
3961
  if (!(ret instanceof OutputStream)) {
3802
3962
  throw new TypeError('Resource error: Not a valid \"OutputStream\" resource.');
@@ -3819,10 +3979,15 @@ const _trampoline5 = function() {
3819
3979
  return handle0;
3820
3980
  }
3821
3981
  _trampoline5.fnName = 'wasi:cli/stderr@0.2.3#getStderr';
3982
+
3822
3983
  const handleTable1 = [T_FLAG, 0];
3984
+ handleTable1._createdReps = new Set();
3985
+
3986
+
3823
3987
  const captureTable1= new Map();
3824
- let captureCnt1 = 0;
3825
- handleTables[1] = handleTable1;
3988
+ let captureCnt1= 0;
3989
+
3990
+ HANDLE_TABLES[1] = handleTable1;
3826
3991
 
3827
3992
  const _trampoline8 = function() {
3828
3993
  _debugLog('[iface="wasi:cli/stdin@0.2.3", function="get-stdin"] [Instruction::CallInterface] (sync, @ enter)');
@@ -3834,11 +3999,11 @@ const _trampoline8 = function() {
3834
3999
 
3835
4000
  const createTask = () => {
3836
4001
  const results = createNewCurrentTask({
3837
- componentIdx: -1, // 0,
4002
+ componentIdx: -1,
3838
4003
  isAsync: false,
3839
4004
  entryFnName: 'getStdin',
3840
4005
  getCallbackFn: () => null,
3841
- callbackFnName: 'null',
4006
+ callbackFnName: null,
3842
4007
  errHandling: 'none',
3843
4008
  callingWasmExport: false,
3844
4009
  });
@@ -3846,7 +4011,11 @@ const _trampoline8 = function() {
3846
4011
  };
3847
4012
 
3848
4013
  taskCreation: {
3849
- parentTask = getCurrentTask(0)?.task;
4014
+ parentTask = getCurrentTask(
4015
+ 0,
4016
+ _getGlobalCurrentTaskMeta(0)?.taskID,
4017
+ )?.task;
4018
+
3850
4019
  if (!parentTask) {
3851
4020
  createTask();
3852
4021
  break taskCreation;
@@ -3864,12 +4033,25 @@ const _trampoline8 = function() {
3864
4033
  }
3865
4034
 
3866
4035
  const started = task.enterSync();
3867
- let ret = _withGlobalCurrentTaskMeta({
3868
- componentIdx: task.componentIdx(),
3869
- taskID: task.id(),
3870
- fn: () => getStdin()
3871
- })
3872
- ;
4036
+
4037
+ let ret;
4038
+
4039
+ try {
4040
+ ret = _withGlobalCurrentTaskMeta({
4041
+ componentIdx: task.componentIdx(),
4042
+ taskID: task.id(),
4043
+ fn: () => getStdin(),
4044
+ })
4045
+ ;
4046
+ } catch (err) {
4047
+
4048
+ task.setErrored(err);
4049
+ task.reject(err);
4050
+ task.exit();
4051
+ throw err;
4052
+
4053
+ }
4054
+
3873
4055
 
3874
4056
  if (!(ret instanceof InputStream)) {
3875
4057
  throw new TypeError('Resource error: Not a valid \"InputStream\" resource.');
@@ -3903,11 +4085,11 @@ const _trampoline9 = function() {
3903
4085
 
3904
4086
  const createTask = () => {
3905
4087
  const results = createNewCurrentTask({
3906
- componentIdx: -1, // 0,
4088
+ componentIdx: -1,
3907
4089
  isAsync: false,
3908
4090
  entryFnName: 'getStdout',
3909
4091
  getCallbackFn: () => null,
3910
- callbackFnName: 'null',
4092
+ callbackFnName: null,
3911
4093
  errHandling: 'none',
3912
4094
  callingWasmExport: false,
3913
4095
  });
@@ -3915,7 +4097,11 @@ const _trampoline9 = function() {
3915
4097
  };
3916
4098
 
3917
4099
  taskCreation: {
3918
- parentTask = getCurrentTask(0)?.task;
4100
+ parentTask = getCurrentTask(
4101
+ 0,
4102
+ _getGlobalCurrentTaskMeta(0)?.taskID,
4103
+ )?.task;
4104
+
3919
4105
  if (!parentTask) {
3920
4106
  createTask();
3921
4107
  break taskCreation;
@@ -3933,12 +4119,25 @@ const _trampoline9 = function() {
3933
4119
  }
3934
4120
 
3935
4121
  const started = task.enterSync();
3936
- let ret = _withGlobalCurrentTaskMeta({
3937
- componentIdx: task.componentIdx(),
3938
- taskID: task.id(),
3939
- fn: () => getStdout()
3940
- })
3941
- ;
4122
+
4123
+ let ret;
4124
+
4125
+ try {
4126
+ ret = _withGlobalCurrentTaskMeta({
4127
+ componentIdx: task.componentIdx(),
4128
+ taskID: task.id(),
4129
+ fn: () => getStdout(),
4130
+ })
4131
+ ;
4132
+ } catch (err) {
4133
+
4134
+ task.setErrored(err);
4135
+ task.reject(err);
4136
+ task.exit();
4137
+ throw err;
4138
+
4139
+ }
4140
+
3942
4141
 
3943
4142
  if (!(ret instanceof OutputStream)) {
3944
4143
  throw new TypeError('Resource error: Not a valid \"OutputStream\" resource.');
@@ -3992,11 +4191,11 @@ const _trampoline10 = function(arg0) {
3992
4191
 
3993
4192
  const createTask = () => {
3994
4193
  const results = createNewCurrentTask({
3995
- componentIdx: -1, // 0,
4194
+ componentIdx: -1,
3996
4195
  isAsync: false,
3997
4196
  entryFnName: 'exit',
3998
4197
  getCallbackFn: () => null,
3999
- callbackFnName: 'null',
4198
+ callbackFnName: null,
4000
4199
  errHandling: 'none',
4001
4200
  callingWasmExport: false,
4002
4201
  });
@@ -4004,7 +4203,11 @@ const _trampoline10 = function(arg0) {
4004
4203
  };
4005
4204
 
4006
4205
  taskCreation: {
4007
- parentTask = getCurrentTask(0)?.task;
4206
+ parentTask = getCurrentTask(
4207
+ 0,
4208
+ _getGlobalCurrentTaskMeta(0)?.taskID,
4209
+ )?.task;
4210
+
4008
4211
  if (!parentTask) {
4009
4212
  createTask();
4010
4213
  break taskCreation;
@@ -4022,12 +4225,25 @@ const _trampoline10 = function(arg0) {
4022
4225
  }
4023
4226
 
4024
4227
  const started = task.enterSync();
4025
- let ret;_withGlobalCurrentTaskMeta({
4026
- componentIdx: task.componentIdx(),
4027
- taskID: task.id(),
4028
- fn: () => exit(variant0)
4029
- })
4030
- ;
4228
+
4229
+ let ret;
4230
+
4231
+ try {
4232
+ _withGlobalCurrentTaskMeta({
4233
+ componentIdx: task.componentIdx(),
4234
+ taskID: task.id(),
4235
+ fn: () => exit(variant0),
4236
+ })
4237
+ ;
4238
+ } catch (err) {
4239
+
4240
+ task.setErrored(err);
4241
+ task.reject(err);
4242
+ task.exit();
4243
+ throw err;
4244
+
4245
+ }
4246
+
4031
4247
  _debugLog('[iface="wasi:cli/exit@0.2.3", function="exit"][Instruction::Return]', {
4032
4248
  funcName: 'exit',
4033
4249
  paramCount: 0,
@@ -4053,11 +4269,11 @@ const _trampoline11 = function(arg0) {
4053
4269
 
4054
4270
  const createTask = () => {
4055
4271
  const results = createNewCurrentTask({
4056
- componentIdx: -1, // 0,
4272
+ componentIdx: -1,
4057
4273
  isAsync: false,
4058
4274
  entryFnName: 'getEnvironment',
4059
4275
  getCallbackFn: () => null,
4060
- callbackFnName: 'null',
4276
+ callbackFnName: null,
4061
4277
  errHandling: 'none',
4062
4278
  callingWasmExport: false,
4063
4279
  });
@@ -4065,7 +4281,11 @@ const _trampoline11 = function(arg0) {
4065
4281
  };
4066
4282
 
4067
4283
  taskCreation: {
4068
- parentTask = getCurrentTask(0)?.task;
4284
+ parentTask = getCurrentTask(
4285
+ 0,
4286
+ _getGlobalCurrentTaskMeta(0)?.taskID,
4287
+ )?.task;
4288
+
4069
4289
  if (!parentTask) {
4070
4290
  createTask();
4071
4291
  break taskCreation;
@@ -4083,12 +4303,25 @@ const _trampoline11 = function(arg0) {
4083
4303
  }
4084
4304
 
4085
4305
  const started = task.enterSync();
4086
- let ret = _withGlobalCurrentTaskMeta({
4087
- componentIdx: task.componentIdx(),
4088
- taskID: task.id(),
4089
- fn: () => getEnvironment()
4090
- })
4091
- ;
4306
+
4307
+ let ret;
4308
+
4309
+ try {
4310
+ ret = _withGlobalCurrentTaskMeta({
4311
+ componentIdx: task.componentIdx(),
4312
+ taskID: task.id(),
4313
+ fn: () => getEnvironment(),
4314
+ })
4315
+ ;
4316
+ } catch (err) {
4317
+
4318
+ task.setErrored(err);
4319
+ task.reject(err);
4320
+ task.exit();
4321
+ throw err;
4322
+
4323
+ }
4324
+
4092
4325
  var vec3 = ret;
4093
4326
  var len3 = vec3.length;
4094
4327
  var result3 = realloc0(0, 0, 4, len3 * 16);
@@ -4122,10 +4355,15 @@ const _trampoline11 = function(arg0) {
4122
4355
  task.exit();
4123
4356
  }
4124
4357
  _trampoline11.fnName = 'wasi:cli/environment@0.2.3#getEnvironment';
4358
+
4125
4359
  const handleTable6 = [T_FLAG, 0];
4360
+ handleTable6._createdReps = new Set();
4361
+
4362
+
4126
4363
  const captureTable6= new Map();
4127
- let captureCnt6 = 0;
4128
- handleTables[6] = handleTable6;
4364
+ let captureCnt6= 0;
4365
+
4366
+ HANDLE_TABLES[6] = handleTable6;
4129
4367
 
4130
4368
  const _trampoline12 = function(arg0, arg1) {
4131
4369
  var handle1 = arg0;
@@ -4148,11 +4386,11 @@ const _trampoline12 = function(arg0, arg1) {
4148
4386
 
4149
4387
  const createTask = () => {
4150
4388
  const results = createNewCurrentTask({
4151
- componentIdx: -1, // 0,
4389
+ componentIdx: -1,
4152
4390
  isAsync: false,
4153
4391
  entryFnName: 'getFlags',
4154
4392
  getCallbackFn: () => null,
4155
- callbackFnName: 'null',
4393
+ callbackFnName: null,
4156
4394
  errHandling: 'result-catch-handler',
4157
4395
  callingWasmExport: false,
4158
4396
  });
@@ -4160,7 +4398,11 @@ const _trampoline12 = function(arg0, arg1) {
4160
4398
  };
4161
4399
 
4162
4400
  taskCreation: {
4163
- parentTask = getCurrentTask(0)?.task;
4401
+ parentTask = getCurrentTask(
4402
+ 0,
4403
+ _getGlobalCurrentTaskMeta(0)?.taskID,
4404
+ )?.task;
4405
+
4164
4406
  if (!parentTask) {
4165
4407
  createTask();
4166
4408
  break taskCreation;
@@ -4184,7 +4426,7 @@ const _trampoline12 = function(arg0, arg1) {
4184
4426
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
4185
4427
  componentIdx: task.componentIdx(),
4186
4428
  taskID: task.id(),
4187
- fn: () => rsc0.getFlags()
4429
+ fn: () => rsc0.getFlags(),
4188
4430
  })
4189
4431
  };
4190
4432
  } catch (e) {
@@ -4413,11 +4655,11 @@ const _trampoline13 = function(arg0, arg1) {
4413
4655
 
4414
4656
  const createTask = () => {
4415
4657
  const results = createNewCurrentTask({
4416
- componentIdx: -1, // 0,
4658
+ componentIdx: -1,
4417
4659
  isAsync: false,
4418
4660
  entryFnName: 'getType',
4419
4661
  getCallbackFn: () => null,
4420
- callbackFnName: 'null',
4662
+ callbackFnName: null,
4421
4663
  errHandling: 'result-catch-handler',
4422
4664
  callingWasmExport: false,
4423
4665
  });
@@ -4425,7 +4667,11 @@ const _trampoline13 = function(arg0, arg1) {
4425
4667
  };
4426
4668
 
4427
4669
  taskCreation: {
4428
- parentTask = getCurrentTask(0)?.task;
4670
+ parentTask = getCurrentTask(
4671
+ 0,
4672
+ _getGlobalCurrentTaskMeta(0)?.taskID,
4673
+ )?.task;
4674
+
4429
4675
  if (!parentTask) {
4430
4676
  createTask();
4431
4677
  break taskCreation;
@@ -4449,7 +4695,7 @@ const _trampoline13 = function(arg0, arg1) {
4449
4695
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
4450
4696
  componentIdx: task.componentIdx(),
4451
4697
  taskID: task.id(),
4452
- fn: () => rsc0.getType()
4698
+ fn: () => rsc0.getType(),
4453
4699
  })
4454
4700
  };
4455
4701
  } catch (e) {
@@ -4715,11 +4961,11 @@ const _trampoline14 = function(arg0, arg1) {
4715
4961
 
4716
4962
  const createTask = () => {
4717
4963
  const results = createNewCurrentTask({
4718
- componentIdx: -1, // 0,
4964
+ componentIdx: -1,
4719
4965
  isAsync: false,
4720
4966
  entryFnName: 'metadataHash',
4721
4967
  getCallbackFn: () => null,
4722
- callbackFnName: 'null',
4968
+ callbackFnName: null,
4723
4969
  errHandling: 'result-catch-handler',
4724
4970
  callingWasmExport: false,
4725
4971
  });
@@ -4727,7 +4973,11 @@ const _trampoline14 = function(arg0, arg1) {
4727
4973
  };
4728
4974
 
4729
4975
  taskCreation: {
4730
- parentTask = getCurrentTask(0)?.task;
4976
+ parentTask = getCurrentTask(
4977
+ 0,
4978
+ _getGlobalCurrentTaskMeta(0)?.taskID,
4979
+ )?.task;
4980
+
4731
4981
  if (!parentTask) {
4732
4982
  createTask();
4733
4983
  break taskCreation;
@@ -4751,7 +5001,7 @@ const _trampoline14 = function(arg0, arg1) {
4751
5001
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
4752
5002
  componentIdx: task.componentIdx(),
4753
5003
  taskID: task.id(),
4754
- fn: () => rsc0.metadataHash()
5004
+ fn: () => rsc0.metadataHash(),
4755
5005
  })
4756
5006
  };
4757
5007
  } catch (e) {
@@ -4954,10 +5204,15 @@ task.resolve([ret]);
4954
5204
  task.exit();
4955
5205
  }
4956
5206
  _trampoline14.fnName = 'wasi:filesystem/types@0.2.3#metadataHash';
5207
+
4957
5208
  const handleTable0 = [T_FLAG, 0];
5209
+ handleTable0._createdReps = new Set();
5210
+
5211
+
4958
5212
  const captureTable0= new Map();
4959
- let captureCnt0 = 0;
4960
- handleTables[0] = handleTable0;
5213
+ let captureCnt0= 0;
5214
+
5215
+ HANDLE_TABLES[0] = handleTable0;
4961
5216
 
4962
5217
  const _trampoline15 = function(arg0, arg1) {
4963
5218
  var handle1 = arg0;
@@ -4980,11 +5235,11 @@ const _trampoline15 = function(arg0, arg1) {
4980
5235
 
4981
5236
  const createTask = () => {
4982
5237
  const results = createNewCurrentTask({
4983
- componentIdx: -1, // 0,
5238
+ componentIdx: -1,
4984
5239
  isAsync: false,
4985
5240
  entryFnName: 'filesystemErrorCode',
4986
5241
  getCallbackFn: () => null,
4987
- callbackFnName: 'null',
5242
+ callbackFnName: null,
4988
5243
  errHandling: 'none',
4989
5244
  callingWasmExport: false,
4990
5245
  });
@@ -4992,7 +5247,11 @@ const _trampoline15 = function(arg0, arg1) {
4992
5247
  };
4993
5248
 
4994
5249
  taskCreation: {
4995
- parentTask = getCurrentTask(0)?.task;
5250
+ parentTask = getCurrentTask(
5251
+ 0,
5252
+ _getGlobalCurrentTaskMeta(0)?.taskID,
5253
+ )?.task;
5254
+
4996
5255
  if (!parentTask) {
4997
5256
  createTask();
4998
5257
  break taskCreation;
@@ -5010,12 +5269,25 @@ const _trampoline15 = function(arg0, arg1) {
5010
5269
  }
5011
5270
 
5012
5271
  const started = task.enterSync();
5013
- let ret = _withGlobalCurrentTaskMeta({
5014
- componentIdx: task.componentIdx(),
5015
- taskID: task.id(),
5016
- fn: () => filesystemErrorCode(rsc0)
5017
- })
5018
- ;
5272
+
5273
+ let ret;
5274
+
5275
+ try {
5276
+ ret = _withGlobalCurrentTaskMeta({
5277
+ componentIdx: task.componentIdx(),
5278
+ taskID: task.id(),
5279
+ fn: () => filesystemErrorCode(rsc0),
5280
+ })
5281
+ ;
5282
+ } catch (err) {
5283
+
5284
+ task.setErrored(err);
5285
+ task.reject(err);
5286
+ task.exit();
5287
+ throw err;
5288
+
5289
+ }
5290
+
5019
5291
  for (const rsc of curResourceBorrows) {
5020
5292
  rsc[symbolRscHandle] = undefined;
5021
5293
  }
@@ -5228,11 +5500,11 @@ const _trampoline16 = function(arg0, arg1, arg2, arg3, arg4) {
5228
5500
 
5229
5501
  const createTask = () => {
5230
5502
  const results = createNewCurrentTask({
5231
- componentIdx: -1, // 0,
5503
+ componentIdx: -1,
5232
5504
  isAsync: false,
5233
5505
  entryFnName: 'metadataHashAt',
5234
5506
  getCallbackFn: () => null,
5235
- callbackFnName: 'null',
5507
+ callbackFnName: null,
5236
5508
  errHandling: 'result-catch-handler',
5237
5509
  callingWasmExport: false,
5238
5510
  });
@@ -5240,7 +5512,11 @@ const _trampoline16 = function(arg0, arg1, arg2, arg3, arg4) {
5240
5512
  };
5241
5513
 
5242
5514
  taskCreation: {
5243
- parentTask = getCurrentTask(0)?.task;
5515
+ parentTask = getCurrentTask(
5516
+ 0,
5517
+ _getGlobalCurrentTaskMeta(0)?.taskID,
5518
+ )?.task;
5519
+
5244
5520
  if (!parentTask) {
5245
5521
  createTask();
5246
5522
  break taskCreation;
@@ -5264,7 +5540,7 @@ const _trampoline16 = function(arg0, arg1, arg2, arg3, arg4) {
5264
5540
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
5265
5541
  componentIdx: task.componentIdx(),
5266
5542
  taskID: task.id(),
5267
- fn: () => rsc0.metadataHashAt(flags3, result4)
5543
+ fn: () => rsc0.metadataHashAt(flags3, result4),
5268
5544
  })
5269
5545
  };
5270
5546
  } catch (e) {
@@ -5489,11 +5765,11 @@ const _trampoline17 = function(arg0, arg1, arg2) {
5489
5765
 
5490
5766
  const createTask = () => {
5491
5767
  const results = createNewCurrentTask({
5492
- componentIdx: -1, // 0,
5768
+ componentIdx: -1,
5493
5769
  isAsync: false,
5494
5770
  entryFnName: 'readViaStream',
5495
5771
  getCallbackFn: () => null,
5496
- callbackFnName: 'null',
5772
+ callbackFnName: null,
5497
5773
  errHandling: 'result-catch-handler',
5498
5774
  callingWasmExport: false,
5499
5775
  });
@@ -5501,7 +5777,11 @@ const _trampoline17 = function(arg0, arg1, arg2) {
5501
5777
  };
5502
5778
 
5503
5779
  taskCreation: {
5504
- parentTask = getCurrentTask(0)?.task;
5780
+ parentTask = getCurrentTask(
5781
+ 0,
5782
+ _getGlobalCurrentTaskMeta(0)?.taskID,
5783
+ )?.task;
5784
+
5505
5785
  if (!parentTask) {
5506
5786
  createTask();
5507
5787
  break taskCreation;
@@ -5525,7 +5805,7 @@ const _trampoline17 = function(arg0, arg1, arg2) {
5525
5805
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
5526
5806
  componentIdx: task.componentIdx(),
5527
5807
  taskID: task.id(),
5528
- fn: () => rsc0.readViaStream(BigInt.asUintN(64, BigInt(arg1)))
5808
+ fn: () => rsc0.readViaStream(BigInt.asUintN(64, BigInt(arg1))),
5529
5809
  })
5530
5810
  };
5531
5811
  } catch (e) {
@@ -5759,11 +6039,11 @@ const _trampoline18 = function(arg0, arg1, arg2) {
5759
6039
 
5760
6040
  const createTask = () => {
5761
6041
  const results = createNewCurrentTask({
5762
- componentIdx: -1, // 0,
6042
+ componentIdx: -1,
5763
6043
  isAsync: false,
5764
6044
  entryFnName: 'writeViaStream',
5765
6045
  getCallbackFn: () => null,
5766
- callbackFnName: 'null',
6046
+ callbackFnName: null,
5767
6047
  errHandling: 'result-catch-handler',
5768
6048
  callingWasmExport: false,
5769
6049
  });
@@ -5771,7 +6051,11 @@ const _trampoline18 = function(arg0, arg1, arg2) {
5771
6051
  };
5772
6052
 
5773
6053
  taskCreation: {
5774
- parentTask = getCurrentTask(0)?.task;
6054
+ parentTask = getCurrentTask(
6055
+ 0,
6056
+ _getGlobalCurrentTaskMeta(0)?.taskID,
6057
+ )?.task;
6058
+
5775
6059
  if (!parentTask) {
5776
6060
  createTask();
5777
6061
  break taskCreation;
@@ -5795,7 +6079,7 @@ const _trampoline18 = function(arg0, arg1, arg2) {
5795
6079
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
5796
6080
  componentIdx: task.componentIdx(),
5797
6081
  taskID: task.id(),
5798
- fn: () => rsc0.writeViaStream(BigInt.asUintN(64, BigInt(arg1)))
6082
+ fn: () => rsc0.writeViaStream(BigInt.asUintN(64, BigInt(arg1))),
5799
6083
  })
5800
6084
  };
5801
6085
  } catch (e) {
@@ -6029,11 +6313,11 @@ const _trampoline19 = function(arg0, arg1) {
6029
6313
 
6030
6314
  const createTask = () => {
6031
6315
  const results = createNewCurrentTask({
6032
- componentIdx: -1, // 0,
6316
+ componentIdx: -1,
6033
6317
  isAsync: false,
6034
6318
  entryFnName: 'appendViaStream',
6035
6319
  getCallbackFn: () => null,
6036
- callbackFnName: 'null',
6320
+ callbackFnName: null,
6037
6321
  errHandling: 'result-catch-handler',
6038
6322
  callingWasmExport: false,
6039
6323
  });
@@ -6041,7 +6325,11 @@ const _trampoline19 = function(arg0, arg1) {
6041
6325
  };
6042
6326
 
6043
6327
  taskCreation: {
6044
- parentTask = getCurrentTask(0)?.task;
6328
+ parentTask = getCurrentTask(
6329
+ 0,
6330
+ _getGlobalCurrentTaskMeta(0)?.taskID,
6331
+ )?.task;
6332
+
6045
6333
  if (!parentTask) {
6046
6334
  createTask();
6047
6335
  break taskCreation;
@@ -6065,7 +6353,7 @@ const _trampoline19 = function(arg0, arg1) {
6065
6353
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
6066
6354
  componentIdx: task.componentIdx(),
6067
6355
  taskID: task.id(),
6068
- fn: () => rsc0.appendViaStream()
6356
+ fn: () => rsc0.appendViaStream(),
6069
6357
  })
6070
6358
  };
6071
6359
  } catch (e) {
@@ -6277,10 +6565,15 @@ task.resolve([ret]);
6277
6565
  task.exit();
6278
6566
  }
6279
6567
  _trampoline19.fnName = 'wasi:filesystem/types@0.2.3#appendViaStream';
6568
+
6280
6569
  const handleTable5 = [T_FLAG, 0];
6570
+ handleTable5._createdReps = new Set();
6571
+
6572
+
6281
6573
  const captureTable5= new Map();
6282
- let captureCnt5 = 0;
6283
- handleTables[5] = handleTable5;
6574
+ let captureCnt5= 0;
6575
+
6576
+ HANDLE_TABLES[5] = handleTable5;
6284
6577
 
6285
6578
  const _trampoline20 = function(arg0, arg1) {
6286
6579
  var handle1 = arg0;
@@ -6303,11 +6596,11 @@ const _trampoline20 = function(arg0, arg1) {
6303
6596
 
6304
6597
  const createTask = () => {
6305
6598
  const results = createNewCurrentTask({
6306
- componentIdx: -1, // 0,
6599
+ componentIdx: -1,
6307
6600
  isAsync: false,
6308
6601
  entryFnName: 'readDirectory',
6309
6602
  getCallbackFn: () => null,
6310
- callbackFnName: 'null',
6603
+ callbackFnName: null,
6311
6604
  errHandling: 'result-catch-handler',
6312
6605
  callingWasmExport: false,
6313
6606
  });
@@ -6315,7 +6608,11 @@ const _trampoline20 = function(arg0, arg1) {
6315
6608
  };
6316
6609
 
6317
6610
  taskCreation: {
6318
- parentTask = getCurrentTask(0)?.task;
6611
+ parentTask = getCurrentTask(
6612
+ 0,
6613
+ _getGlobalCurrentTaskMeta(0)?.taskID,
6614
+ )?.task;
6615
+
6319
6616
  if (!parentTask) {
6320
6617
  createTask();
6321
6618
  break taskCreation;
@@ -6339,7 +6636,7 @@ const _trampoline20 = function(arg0, arg1) {
6339
6636
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
6340
6637
  componentIdx: task.componentIdx(),
6341
6638
  taskID: task.id(),
6342
- fn: () => rsc0.readDirectory()
6639
+ fn: () => rsc0.readDirectory(),
6343
6640
  })
6344
6641
  };
6345
6642
  } catch (e) {
@@ -6573,11 +6870,11 @@ const _trampoline21 = function(arg0, arg1) {
6573
6870
 
6574
6871
  const createTask = () => {
6575
6872
  const results = createNewCurrentTask({
6576
- componentIdx: -1, // 0,
6873
+ componentIdx: -1,
6577
6874
  isAsync: false,
6578
6875
  entryFnName: 'stat',
6579
6876
  getCallbackFn: () => null,
6580
- callbackFnName: 'null',
6877
+ callbackFnName: null,
6581
6878
  errHandling: 'result-catch-handler',
6582
6879
  callingWasmExport: false,
6583
6880
  });
@@ -6585,7 +6882,11 @@ const _trampoline21 = function(arg0, arg1) {
6585
6882
  };
6586
6883
 
6587
6884
  taskCreation: {
6588
- parentTask = getCurrentTask(0)?.task;
6885
+ parentTask = getCurrentTask(
6886
+ 0,
6887
+ _getGlobalCurrentTaskMeta(0)?.taskID,
6888
+ )?.task;
6889
+
6589
6890
  if (!parentTask) {
6590
6891
  createTask();
6591
6892
  break taskCreation;
@@ -6609,7 +6910,7 @@ const _trampoline21 = function(arg0, arg1) {
6609
6910
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
6610
6911
  componentIdx: task.componentIdx(),
6611
6912
  taskID: task.id(),
6612
- fn: () => rsc0.stat()
6913
+ fn: () => rsc0.stat(),
6613
6914
  })
6614
6915
  };
6615
6916
  } catch (e) {
@@ -6917,11 +7218,11 @@ const _trampoline22 = function(arg0, arg1, arg2, arg3, arg4) {
6917
7218
 
6918
7219
  const createTask = () => {
6919
7220
  const results = createNewCurrentTask({
6920
- componentIdx: -1, // 0,
7221
+ componentIdx: -1,
6921
7222
  isAsync: false,
6922
7223
  entryFnName: 'statAt',
6923
7224
  getCallbackFn: () => null,
6924
- callbackFnName: 'null',
7225
+ callbackFnName: null,
6925
7226
  errHandling: 'result-catch-handler',
6926
7227
  callingWasmExport: false,
6927
7228
  });
@@ -6929,7 +7230,11 @@ const _trampoline22 = function(arg0, arg1, arg2, arg3, arg4) {
6929
7230
  };
6930
7231
 
6931
7232
  taskCreation: {
6932
- parentTask = getCurrentTask(0)?.task;
7233
+ parentTask = getCurrentTask(
7234
+ 0,
7235
+ _getGlobalCurrentTaskMeta(0)?.taskID,
7236
+ )?.task;
7237
+
6933
7238
  if (!parentTask) {
6934
7239
  createTask();
6935
7240
  break taskCreation;
@@ -6953,7 +7258,7 @@ const _trampoline22 = function(arg0, arg1, arg2, arg3, arg4) {
6953
7258
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
6954
7259
  componentIdx: task.componentIdx(),
6955
7260
  taskID: task.id(),
6956
- fn: () => rsc0.statAt(flags3, result4)
7261
+ fn: () => rsc0.statAt(flags3, result4),
6957
7262
  })
6958
7263
  };
6959
7264
  } catch (e) {
@@ -7281,11 +7586,11 @@ const _trampoline23 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
7281
7586
 
7282
7587
  const createTask = () => {
7283
7588
  const results = createNewCurrentTask({
7284
- componentIdx: -1, // 0,
7589
+ componentIdx: -1,
7285
7590
  isAsync: false,
7286
7591
  entryFnName: 'openAt',
7287
7592
  getCallbackFn: () => null,
7288
- callbackFnName: 'null',
7593
+ callbackFnName: null,
7289
7594
  errHandling: 'result-catch-handler',
7290
7595
  callingWasmExport: false,
7291
7596
  });
@@ -7293,7 +7598,11 @@ const _trampoline23 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
7293
7598
  };
7294
7599
 
7295
7600
  taskCreation: {
7296
- parentTask = getCurrentTask(0)?.task;
7601
+ parentTask = getCurrentTask(
7602
+ 0,
7603
+ _getGlobalCurrentTaskMeta(0)?.taskID,
7604
+ )?.task;
7605
+
7297
7606
  if (!parentTask) {
7298
7607
  createTask();
7299
7608
  break taskCreation;
@@ -7317,7 +7626,7 @@ const _trampoline23 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
7317
7626
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
7318
7627
  componentIdx: task.componentIdx(),
7319
7628
  taskID: task.id(),
7320
- fn: () => rsc0.openAt(flags3, result4, flags5, flags6)
7629
+ fn: () => rsc0.openAt(flags3, result4, flags5, flags6),
7321
7630
  })
7322
7631
  };
7323
7632
  } catch (e) {
@@ -7551,11 +7860,11 @@ const _trampoline24 = function(arg0, arg1) {
7551
7860
 
7552
7861
  const createTask = () => {
7553
7862
  const results = createNewCurrentTask({
7554
- componentIdx: -1, // 0,
7863
+ componentIdx: -1,
7555
7864
  isAsync: false,
7556
7865
  entryFnName: 'readDirectoryEntry',
7557
7866
  getCallbackFn: () => null,
7558
- callbackFnName: 'null',
7867
+ callbackFnName: null,
7559
7868
  errHandling: 'result-catch-handler',
7560
7869
  callingWasmExport: false,
7561
7870
  });
@@ -7563,7 +7872,11 @@ const _trampoline24 = function(arg0, arg1) {
7563
7872
  };
7564
7873
 
7565
7874
  taskCreation: {
7566
- parentTask = getCurrentTask(0)?.task;
7875
+ parentTask = getCurrentTask(
7876
+ 0,
7877
+ _getGlobalCurrentTaskMeta(0)?.taskID,
7878
+ )?.task;
7879
+
7567
7880
  if (!parentTask) {
7568
7881
  createTask();
7569
7882
  break taskCreation;
@@ -7587,7 +7900,7 @@ const _trampoline24 = function(arg0, arg1) {
7587
7900
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
7588
7901
  componentIdx: task.componentIdx(),
7589
7902
  taskID: task.id(),
7590
- fn: () => rsc0.readDirectoryEntry()
7903
+ fn: () => rsc0.readDirectoryEntry(),
7591
7904
  })
7592
7905
  };
7593
7906
  } catch (e) {
@@ -7868,11 +8181,11 @@ const _trampoline25 = function(arg0, arg1, arg2) {
7868
8181
 
7869
8182
  const createTask = () => {
7870
8183
  const results = createNewCurrentTask({
7871
- componentIdx: -1, // 0,
8184
+ componentIdx: -1,
7872
8185
  isAsync: false,
7873
8186
  entryFnName: 'read',
7874
8187
  getCallbackFn: () => null,
7875
- callbackFnName: 'null',
8188
+ callbackFnName: null,
7876
8189
  errHandling: 'result-catch-handler',
7877
8190
  callingWasmExport: false,
7878
8191
  });
@@ -7880,7 +8193,11 @@ const _trampoline25 = function(arg0, arg1, arg2) {
7880
8193
  };
7881
8194
 
7882
8195
  taskCreation: {
7883
- parentTask = getCurrentTask(0)?.task;
8196
+ parentTask = getCurrentTask(
8197
+ 0,
8198
+ _getGlobalCurrentTaskMeta(0)?.taskID,
8199
+ )?.task;
8200
+
7884
8201
  if (!parentTask) {
7885
8202
  createTask();
7886
8203
  break taskCreation;
@@ -7904,7 +8221,7 @@ const _trampoline25 = function(arg0, arg1, arg2) {
7904
8221
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
7905
8222
  componentIdx: task.componentIdx(),
7906
8223
  taskID: task.id(),
7907
- fn: () => rsc0.read(BigInt.asUintN(64, BigInt(arg1)))
8224
+ fn: () => rsc0.read(BigInt.asUintN(64, BigInt(arg1))),
7908
8225
  })
7909
8226
  };
7910
8227
  } catch (e) {
@@ -8017,11 +8334,11 @@ const _trampoline26 = function(arg0, arg1, arg2) {
8017
8334
 
8018
8335
  const createTask = () => {
8019
8336
  const results = createNewCurrentTask({
8020
- componentIdx: -1, // 0,
8337
+ componentIdx: -1,
8021
8338
  isAsync: false,
8022
8339
  entryFnName: 'blockingRead',
8023
8340
  getCallbackFn: () => null,
8024
- callbackFnName: 'null',
8341
+ callbackFnName: null,
8025
8342
  errHandling: 'result-catch-handler',
8026
8343
  callingWasmExport: false,
8027
8344
  });
@@ -8029,7 +8346,11 @@ const _trampoline26 = function(arg0, arg1, arg2) {
8029
8346
  };
8030
8347
 
8031
8348
  taskCreation: {
8032
- parentTask = getCurrentTask(0)?.task;
8349
+ parentTask = getCurrentTask(
8350
+ 0,
8351
+ _getGlobalCurrentTaskMeta(0)?.taskID,
8352
+ )?.task;
8353
+
8033
8354
  if (!parentTask) {
8034
8355
  createTask();
8035
8356
  break taskCreation;
@@ -8053,7 +8374,7 @@ const _trampoline26 = function(arg0, arg1, arg2) {
8053
8374
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
8054
8375
  componentIdx: task.componentIdx(),
8055
8376
  taskID: task.id(),
8056
- fn: () => rsc0.blockingRead(BigInt.asUintN(64, BigInt(arg1)))
8377
+ fn: () => rsc0.blockingRead(BigInt.asUintN(64, BigInt(arg1))),
8057
8378
  })
8058
8379
  };
8059
8380
  } catch (e) {
@@ -8166,11 +8487,11 @@ const _trampoline27 = function(arg0, arg1) {
8166
8487
 
8167
8488
  const createTask = () => {
8168
8489
  const results = createNewCurrentTask({
8169
- componentIdx: -1, // 0,
8490
+ componentIdx: -1,
8170
8491
  isAsync: false,
8171
8492
  entryFnName: 'checkWrite',
8172
8493
  getCallbackFn: () => null,
8173
- callbackFnName: 'null',
8494
+ callbackFnName: null,
8174
8495
  errHandling: 'result-catch-handler',
8175
8496
  callingWasmExport: false,
8176
8497
  });
@@ -8178,7 +8499,11 @@ const _trampoline27 = function(arg0, arg1) {
8178
8499
  };
8179
8500
 
8180
8501
  taskCreation: {
8181
- parentTask = getCurrentTask(0)?.task;
8502
+ parentTask = getCurrentTask(
8503
+ 0,
8504
+ _getGlobalCurrentTaskMeta(0)?.taskID,
8505
+ )?.task;
8506
+
8182
8507
  if (!parentTask) {
8183
8508
  createTask();
8184
8509
  break taskCreation;
@@ -8202,7 +8527,7 @@ const _trampoline27 = function(arg0, arg1) {
8202
8527
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
8203
8528
  componentIdx: task.componentIdx(),
8204
8529
  taskID: task.id(),
8205
- fn: () => rsc0.checkWrite()
8530
+ fn: () => rsc0.checkWrite(),
8206
8531
  })
8207
8532
  };
8208
8533
  } catch (e) {
@@ -8295,11 +8620,11 @@ const _trampoline28 = function(arg0, arg1, arg2, arg3) {
8295
8620
 
8296
8621
  const createTask = () => {
8297
8622
  const results = createNewCurrentTask({
8298
- componentIdx: -1, // 0,
8623
+ componentIdx: -1,
8299
8624
  isAsync: false,
8300
8625
  entryFnName: 'write',
8301
8626
  getCallbackFn: () => null,
8302
- callbackFnName: 'null',
8627
+ callbackFnName: null,
8303
8628
  errHandling: 'result-catch-handler',
8304
8629
  callingWasmExport: false,
8305
8630
  });
@@ -8307,7 +8632,11 @@ const _trampoline28 = function(arg0, arg1, arg2, arg3) {
8307
8632
  };
8308
8633
 
8309
8634
  taskCreation: {
8310
- parentTask = getCurrentTask(0)?.task;
8635
+ parentTask = getCurrentTask(
8636
+ 0,
8637
+ _getGlobalCurrentTaskMeta(0)?.taskID,
8638
+ )?.task;
8639
+
8311
8640
  if (!parentTask) {
8312
8641
  createTask();
8313
8642
  break taskCreation;
@@ -8331,7 +8660,7 @@ const _trampoline28 = function(arg0, arg1, arg2, arg3) {
8331
8660
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
8332
8661
  componentIdx: task.componentIdx(),
8333
8662
  taskID: task.id(),
8334
- fn: () => rsc0.write(result3)
8663
+ fn: () => rsc0.write(result3),
8335
8664
  })
8336
8665
  };
8337
8666
  } catch (e) {
@@ -8423,11 +8752,11 @@ const _trampoline29 = function(arg0, arg1, arg2, arg3) {
8423
8752
 
8424
8753
  const createTask = () => {
8425
8754
  const results = createNewCurrentTask({
8426
- componentIdx: -1, // 0,
8755
+ componentIdx: -1,
8427
8756
  isAsync: false,
8428
8757
  entryFnName: 'blockingWriteAndFlush',
8429
8758
  getCallbackFn: () => null,
8430
- callbackFnName: 'null',
8759
+ callbackFnName: null,
8431
8760
  errHandling: 'result-catch-handler',
8432
8761
  callingWasmExport: false,
8433
8762
  });
@@ -8435,7 +8764,11 @@ const _trampoline29 = function(arg0, arg1, arg2, arg3) {
8435
8764
  };
8436
8765
 
8437
8766
  taskCreation: {
8438
- parentTask = getCurrentTask(0)?.task;
8767
+ parentTask = getCurrentTask(
8768
+ 0,
8769
+ _getGlobalCurrentTaskMeta(0)?.taskID,
8770
+ )?.task;
8771
+
8439
8772
  if (!parentTask) {
8440
8773
  createTask();
8441
8774
  break taskCreation;
@@ -8459,7 +8792,7 @@ const _trampoline29 = function(arg0, arg1, arg2, arg3) {
8459
8792
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
8460
8793
  componentIdx: task.componentIdx(),
8461
8794
  taskID: task.id(),
8462
- fn: () => rsc0.blockingWriteAndFlush(result3)
8795
+ fn: () => rsc0.blockingWriteAndFlush(result3),
8463
8796
  })
8464
8797
  };
8465
8798
  } catch (e) {
@@ -8548,11 +8881,11 @@ const _trampoline30 = function(arg0, arg1) {
8548
8881
 
8549
8882
  const createTask = () => {
8550
8883
  const results = createNewCurrentTask({
8551
- componentIdx: -1, // 0,
8884
+ componentIdx: -1,
8552
8885
  isAsync: false,
8553
8886
  entryFnName: 'blockingFlush',
8554
8887
  getCallbackFn: () => null,
8555
- callbackFnName: 'null',
8888
+ callbackFnName: null,
8556
8889
  errHandling: 'result-catch-handler',
8557
8890
  callingWasmExport: false,
8558
8891
  });
@@ -8560,7 +8893,11 @@ const _trampoline30 = function(arg0, arg1) {
8560
8893
  };
8561
8894
 
8562
8895
  taskCreation: {
8563
- parentTask = getCurrentTask(0)?.task;
8896
+ parentTask = getCurrentTask(
8897
+ 0,
8898
+ _getGlobalCurrentTaskMeta(0)?.taskID,
8899
+ )?.task;
8900
+
8564
8901
  if (!parentTask) {
8565
8902
  createTask();
8566
8903
  break taskCreation;
@@ -8584,7 +8921,7 @@ const _trampoline30 = function(arg0, arg1) {
8584
8921
  ret = { tag: 'ok', val: _withGlobalCurrentTaskMeta({
8585
8922
  componentIdx: task.componentIdx(),
8586
8923
  taskID: task.id(),
8587
- fn: () => rsc0.blockingFlush()
8924
+ fn: () => rsc0.blockingFlush(),
8588
8925
  })
8589
8926
  };
8590
8927
  } catch (e) {
@@ -8662,11 +8999,11 @@ const _trampoline31 = function(arg0, arg1) {
8662
8999
 
8663
9000
  const createTask = () => {
8664
9001
  const results = createNewCurrentTask({
8665
- componentIdx: -1, // 0,
9002
+ componentIdx: -1,
8666
9003
  isAsync: false,
8667
9004
  entryFnName: 'getRandomBytes',
8668
9005
  getCallbackFn: () => null,
8669
- callbackFnName: 'null',
9006
+ callbackFnName: null,
8670
9007
  errHandling: 'none',
8671
9008
  callingWasmExport: false,
8672
9009
  });
@@ -8674,7 +9011,11 @@ const _trampoline31 = function(arg0, arg1) {
8674
9011
  };
8675
9012
 
8676
9013
  taskCreation: {
8677
- parentTask = getCurrentTask(0)?.task;
9014
+ parentTask = getCurrentTask(
9015
+ 0,
9016
+ _getGlobalCurrentTaskMeta(0)?.taskID,
9017
+ )?.task;
9018
+
8678
9019
  if (!parentTask) {
8679
9020
  createTask();
8680
9021
  break taskCreation;
@@ -8692,12 +9033,25 @@ const _trampoline31 = function(arg0, arg1) {
8692
9033
  }
8693
9034
 
8694
9035
  const started = task.enterSync();
8695
- let ret = _withGlobalCurrentTaskMeta({
8696
- componentIdx: task.componentIdx(),
8697
- taskID: task.id(),
8698
- fn: () => getRandomBytes(BigInt.asUintN(64, BigInt(arg0)))
8699
- })
8700
- ;
9036
+
9037
+ let ret;
9038
+
9039
+ try {
9040
+ ret = _withGlobalCurrentTaskMeta({
9041
+ componentIdx: task.componentIdx(),
9042
+ taskID: task.id(),
9043
+ fn: () => getRandomBytes(BigInt.asUintN(64, BigInt(arg0))),
9044
+ })
9045
+ ;
9046
+ } catch (err) {
9047
+
9048
+ task.setErrored(err);
9049
+ task.reject(err);
9050
+ task.exit();
9051
+ throw err;
9052
+
9053
+ }
9054
+
8701
9055
  var val0 = ret;
8702
9056
  var len0 = Array.isArray(val0) ? val0.length : val0.byteLength;
8703
9057
  var ptr0 = realloc0(0, 0, 1, len0 * 1);
@@ -8743,11 +9097,11 @@ const _trampoline32 = function(arg0) {
8743
9097
 
8744
9098
  const createTask = () => {
8745
9099
  const results = createNewCurrentTask({
8746
- componentIdx: -1, // 0,
9100
+ componentIdx: -1,
8747
9101
  isAsync: false,
8748
9102
  entryFnName: 'getDirectories',
8749
9103
  getCallbackFn: () => null,
8750
- callbackFnName: 'null',
9104
+ callbackFnName: null,
8751
9105
  errHandling: 'none',
8752
9106
  callingWasmExport: false,
8753
9107
  });
@@ -8755,7 +9109,11 @@ const _trampoline32 = function(arg0) {
8755
9109
  };
8756
9110
 
8757
9111
  taskCreation: {
8758
- parentTask = getCurrentTask(0)?.task;
9112
+ parentTask = getCurrentTask(
9113
+ 0,
9114
+ _getGlobalCurrentTaskMeta(0)?.taskID,
9115
+ )?.task;
9116
+
8759
9117
  if (!parentTask) {
8760
9118
  createTask();
8761
9119
  break taskCreation;
@@ -8773,12 +9131,25 @@ const _trampoline32 = function(arg0) {
8773
9131
  }
8774
9132
 
8775
9133
  const started = task.enterSync();
8776
- let ret = _withGlobalCurrentTaskMeta({
8777
- componentIdx: task.componentIdx(),
8778
- taskID: task.id(),
8779
- fn: () => getDirectories()
8780
- })
8781
- ;
9134
+
9135
+ let ret;
9136
+
9137
+ try {
9138
+ ret = _withGlobalCurrentTaskMeta({
9139
+ componentIdx: task.componentIdx(),
9140
+ taskID: task.id(),
9141
+ fn: () => getDirectories(),
9142
+ })
9143
+ ;
9144
+ } catch (err) {
9145
+
9146
+ task.setErrored(err);
9147
+ task.reject(err);
9148
+ task.exit();
9149
+ throw err;
9150
+
9151
+ }
9152
+
8782
9153
  var vec3 = ret;
8783
9154
  var len3 = vec3.length;
8784
9155
  var result3 = realloc0(0, 0, 4, len3 * 12);
@@ -8817,10 +9188,15 @@ const _trampoline32 = function(arg0) {
8817
9188
  task.exit();
8818
9189
  }
8819
9190
  _trampoline32.fnName = 'wasi:filesystem/preopens@0.2.3#getDirectories';
9191
+
8820
9192
  const handleTable3 = [T_FLAG, 0];
9193
+ handleTable3._createdReps = new Set();
9194
+
9195
+
8821
9196
  const captureTable3= new Map();
8822
- let captureCnt3 = 0;
8823
- handleTables[3] = handleTable3;
9197
+ let captureCnt3= 0;
9198
+
9199
+ HANDLE_TABLES[3] = handleTable3;
8824
9200
 
8825
9201
  const _trampoline33 = function(arg0) {
8826
9202
  _debugLog('[iface="wasi:cli/terminal-stdin@0.2.3", function="get-terminal-stdin"] [Instruction::CallInterface] (sync, @ enter)');
@@ -8832,11 +9208,11 @@ const _trampoline33 = function(arg0) {
8832
9208
 
8833
9209
  const createTask = () => {
8834
9210
  const results = createNewCurrentTask({
8835
- componentIdx: -1, // 0,
9211
+ componentIdx: -1,
8836
9212
  isAsync: false,
8837
9213
  entryFnName: 'getTerminalStdin',
8838
9214
  getCallbackFn: () => null,
8839
- callbackFnName: 'null',
9215
+ callbackFnName: null,
8840
9216
  errHandling: 'none',
8841
9217
  callingWasmExport: false,
8842
9218
  });
@@ -8844,7 +9220,11 @@ const _trampoline33 = function(arg0) {
8844
9220
  };
8845
9221
 
8846
9222
  taskCreation: {
8847
- parentTask = getCurrentTask(0)?.task;
9223
+ parentTask = getCurrentTask(
9224
+ 0,
9225
+ _getGlobalCurrentTaskMeta(0)?.taskID,
9226
+ )?.task;
9227
+
8848
9228
  if (!parentTask) {
8849
9229
  createTask();
8850
9230
  break taskCreation;
@@ -8862,12 +9242,25 @@ const _trampoline33 = function(arg0) {
8862
9242
  }
8863
9243
 
8864
9244
  const started = task.enterSync();
8865
- let ret = _withGlobalCurrentTaskMeta({
8866
- componentIdx: task.componentIdx(),
8867
- taskID: task.id(),
8868
- fn: () => getTerminalStdin()
8869
- })
8870
- ;
9245
+
9246
+ let ret;
9247
+
9248
+ try {
9249
+ ret = _withGlobalCurrentTaskMeta({
9250
+ componentIdx: task.componentIdx(),
9251
+ taskID: task.id(),
9252
+ fn: () => getTerminalStdin(),
9253
+ })
9254
+ ;
9255
+ } catch (err) {
9256
+
9257
+ task.setErrored(err);
9258
+ task.reject(err);
9259
+ task.exit();
9260
+ throw err;
9261
+
9262
+ }
9263
+
8871
9264
  var variant1 = ret;
8872
9265
  if (variant1 === null || variant1=== undefined) {
8873
9266
  dataView(memory0).setInt8(arg0 + 0, 0, true);
@@ -8897,10 +9290,15 @@ const _trampoline33 = function(arg0) {
8897
9290
  task.exit();
8898
9291
  }
8899
9292
  _trampoline33.fnName = 'wasi:cli/terminal-stdin@0.2.3#getTerminalStdin';
9293
+
8900
9294
  const handleTable4 = [T_FLAG, 0];
9295
+ handleTable4._createdReps = new Set();
9296
+
9297
+
8901
9298
  const captureTable4= new Map();
8902
- let captureCnt4 = 0;
8903
- handleTables[4] = handleTable4;
9299
+ let captureCnt4= 0;
9300
+
9301
+ HANDLE_TABLES[4] = handleTable4;
8904
9302
 
8905
9303
  const _trampoline34 = function(arg0) {
8906
9304
  _debugLog('[iface="wasi:cli/terminal-stdout@0.2.3", function="get-terminal-stdout"] [Instruction::CallInterface] (sync, @ enter)');
@@ -8912,11 +9310,11 @@ const _trampoline34 = function(arg0) {
8912
9310
 
8913
9311
  const createTask = () => {
8914
9312
  const results = createNewCurrentTask({
8915
- componentIdx: -1, // 0,
9313
+ componentIdx: -1,
8916
9314
  isAsync: false,
8917
9315
  entryFnName: 'getTerminalStdout',
8918
9316
  getCallbackFn: () => null,
8919
- callbackFnName: 'null',
9317
+ callbackFnName: null,
8920
9318
  errHandling: 'none',
8921
9319
  callingWasmExport: false,
8922
9320
  });
@@ -8924,7 +9322,11 @@ const _trampoline34 = function(arg0) {
8924
9322
  };
8925
9323
 
8926
9324
  taskCreation: {
8927
- parentTask = getCurrentTask(0)?.task;
9325
+ parentTask = getCurrentTask(
9326
+ 0,
9327
+ _getGlobalCurrentTaskMeta(0)?.taskID,
9328
+ )?.task;
9329
+
8928
9330
  if (!parentTask) {
8929
9331
  createTask();
8930
9332
  break taskCreation;
@@ -8942,12 +9344,25 @@ const _trampoline34 = function(arg0) {
8942
9344
  }
8943
9345
 
8944
9346
  const started = task.enterSync();
8945
- let ret = _withGlobalCurrentTaskMeta({
8946
- componentIdx: task.componentIdx(),
8947
- taskID: task.id(),
8948
- fn: () => getTerminalStdout()
8949
- })
8950
- ;
9347
+
9348
+ let ret;
9349
+
9350
+ try {
9351
+ ret = _withGlobalCurrentTaskMeta({
9352
+ componentIdx: task.componentIdx(),
9353
+ taskID: task.id(),
9354
+ fn: () => getTerminalStdout(),
9355
+ })
9356
+ ;
9357
+ } catch (err) {
9358
+
9359
+ task.setErrored(err);
9360
+ task.reject(err);
9361
+ task.exit();
9362
+ throw err;
9363
+
9364
+ }
9365
+
8951
9366
  var variant1 = ret;
8952
9367
  if (variant1 === null || variant1=== undefined) {
8953
9368
  dataView(memory0).setInt8(arg0 + 0, 0, true);
@@ -8988,11 +9403,11 @@ const _trampoline35 = function(arg0) {
8988
9403
 
8989
9404
  const createTask = () => {
8990
9405
  const results = createNewCurrentTask({
8991
- componentIdx: -1, // 0,
9406
+ componentIdx: -1,
8992
9407
  isAsync: false,
8993
9408
  entryFnName: 'getTerminalStderr',
8994
9409
  getCallbackFn: () => null,
8995
- callbackFnName: 'null',
9410
+ callbackFnName: null,
8996
9411
  errHandling: 'none',
8997
9412
  callingWasmExport: false,
8998
9413
  });
@@ -9000,7 +9415,11 @@ const _trampoline35 = function(arg0) {
9000
9415
  };
9001
9416
 
9002
9417
  taskCreation: {
9003
- parentTask = getCurrentTask(0)?.task;
9418
+ parentTask = getCurrentTask(
9419
+ 0,
9420
+ _getGlobalCurrentTaskMeta(0)?.taskID,
9421
+ )?.task;
9422
+
9004
9423
  if (!parentTask) {
9005
9424
  createTask();
9006
9425
  break taskCreation;
@@ -9018,12 +9437,25 @@ const _trampoline35 = function(arg0) {
9018
9437
  }
9019
9438
 
9020
9439
  const started = task.enterSync();
9021
- let ret = _withGlobalCurrentTaskMeta({
9022
- componentIdx: task.componentIdx(),
9023
- taskID: task.id(),
9024
- fn: () => getTerminalStderr()
9025
- })
9026
- ;
9440
+
9441
+ let ret;
9442
+
9443
+ try {
9444
+ ret = _withGlobalCurrentTaskMeta({
9445
+ componentIdx: task.componentIdx(),
9446
+ taskID: task.id(),
9447
+ fn: () => getTerminalStderr(),
9448
+ })
9449
+ ;
9450
+ } catch (err) {
9451
+
9452
+ task.setErrored(err);
9453
+ task.reject(err);
9454
+ task.exit();
9455
+ throw err;
9456
+
9457
+ }
9458
+
9027
9459
  var variant1 = ret;
9028
9460
  if (variant1 === null || variant1=== undefined) {
9029
9461
  dataView(memory0).setInt8(arg0 + 0, 0, true);
@@ -9085,19 +9517,35 @@ function parse(arg0) {
9085
9517
  isManualAsync: false,
9086
9518
  entryFnName: 'toolsParse',
9087
9519
  getCallbackFn: () => null,
9088
- callbackFnName: 'null',
9520
+ callbackFnName: null,
9089
9521
  errHandling: 'throw-result-err',
9090
9522
  callingWasmExport: true,
9091
9523
  });
9092
9524
 
9093
9525
  const started = task.enterSync();
9094
- task.setReturnMemoryIdx(0);
9095
- task.setReturnMemory(memory0);
9096
- let ret = _withGlobalCurrentTaskMeta({
9097
- taskID: task.id(),
9098
- componentIdx: task.componentIdx(),
9099
- fn: () => toolsParse(ptr0, len0),
9100
- });
9526
+
9527
+ if (0!== null) {
9528
+ task.setReturnMemoryIdx(0);
9529
+ task.setReturnMemory(() => memory0());
9530
+ }
9531
+
9532
+
9533
+ let ret;
9534
+
9535
+ try {
9536
+ ret = _withGlobalCurrentTaskMeta({
9537
+ taskID: task.id(),
9538
+ componentIdx: task.componentIdx(),
9539
+ fn: () => toolsParse(ptr0, len0),
9540
+ });
9541
+ } catch (err) {
9542
+
9543
+ task.setErrored(err);
9544
+ task.reject(err);
9545
+ task.exit();
9546
+ throw err;
9547
+
9548
+ }
9101
9549
 
9102
9550
  let variant3;
9103
9551
  switch (dataView(memory0).getUint8(ret + 0, true)) {
@@ -9188,19 +9636,35 @@ function print(arg0) {
9188
9636
  isManualAsync: false,
9189
9637
  entryFnName: 'toolsPrint',
9190
9638
  getCallbackFn: () => null,
9191
- callbackFnName: 'null',
9639
+ callbackFnName: null,
9192
9640
  errHandling: 'throw-result-err',
9193
9641
  callingWasmExport: true,
9194
9642
  });
9195
9643
 
9196
9644
  const started = task.enterSync();
9197
- task.setReturnMemoryIdx(0);
9198
- task.setReturnMemory(memory0);
9199
- let ret = _withGlobalCurrentTaskMeta({
9200
- taskID: task.id(),
9201
- componentIdx: task.componentIdx(),
9202
- fn: () => toolsPrint(ptr0, len0),
9203
- });
9645
+
9646
+ if (0!== null) {
9647
+ task.setReturnMemoryIdx(0);
9648
+ task.setReturnMemory(() => memory0());
9649
+ }
9650
+
9651
+
9652
+ let ret;
9653
+
9654
+ try {
9655
+ ret = _withGlobalCurrentTaskMeta({
9656
+ taskID: task.id(),
9657
+ componentIdx: task.componentIdx(),
9658
+ fn: () => toolsPrint(ptr0, len0),
9659
+ });
9660
+ } catch (err) {
9661
+
9662
+ task.setErrored(err);
9663
+ task.reject(err);
9664
+ task.exit();
9665
+ throw err;
9666
+
9667
+ }
9204
9668
 
9205
9669
  let variant3;
9206
9670
  switch (dataView(memory0).getUint8(ret + 0, true)) {
@@ -9343,19 +9807,35 @@ function componentNew(arg0, arg1) {
9343
9807
  isManualAsync: false,
9344
9808
  entryFnName: 'toolsComponentNew',
9345
9809
  getCallbackFn: () => null,
9346
- callbackFnName: 'null',
9810
+ callbackFnName: null,
9347
9811
  errHandling: 'throw-result-err',
9348
9812
  callingWasmExport: true,
9349
9813
  });
9350
9814
 
9351
9815
  const started = task.enterSync();
9352
- task.setReturnMemoryIdx(0);
9353
- task.setReturnMemory(memory0);
9354
- let ret = _withGlobalCurrentTaskMeta({
9355
- taskID: task.id(),
9356
- componentIdx: task.componentIdx(),
9357
- fn: () => toolsComponentNew(ptr0, len0, variant5_0, variant5_1, variant5_2),
9358
- });
9816
+
9817
+ if (0!== null) {
9818
+ task.setReturnMemoryIdx(0);
9819
+ task.setReturnMemory(() => memory0());
9820
+ }
9821
+
9822
+
9823
+ let ret;
9824
+
9825
+ try {
9826
+ ret = _withGlobalCurrentTaskMeta({
9827
+ taskID: task.id(),
9828
+ componentIdx: task.componentIdx(),
9829
+ fn: () => toolsComponentNew(ptr0, len0, variant5_0, variant5_1, variant5_2),
9830
+ });
9831
+ } catch (err) {
9832
+
9833
+ task.setErrored(err);
9834
+ task.reject(err);
9835
+ task.exit();
9836
+ throw err;
9837
+
9838
+ }
9359
9839
 
9360
9840
  let variant8;
9361
9841
  switch (dataView(memory0).getUint8(ret + 0, true)) {
@@ -9446,19 +9926,35 @@ function componentWit(arg0) {
9446
9926
  isManualAsync: false,
9447
9927
  entryFnName: 'toolsComponentWit',
9448
9928
  getCallbackFn: () => null,
9449
- callbackFnName: 'null',
9929
+ callbackFnName: null,
9450
9930
  errHandling: 'throw-result-err',
9451
9931
  callingWasmExport: true,
9452
9932
  });
9453
9933
 
9454
9934
  const started = task.enterSync();
9455
- task.setReturnMemoryIdx(0);
9456
- task.setReturnMemory(memory0);
9457
- let ret = _withGlobalCurrentTaskMeta({
9458
- taskID: task.id(),
9459
- componentIdx: task.componentIdx(),
9460
- fn: () => toolsComponentWit(ptr0, len0),
9461
- });
9935
+
9936
+ if (0!== null) {
9937
+ task.setReturnMemoryIdx(0);
9938
+ task.setReturnMemory(() => memory0());
9939
+ }
9940
+
9941
+
9942
+ let ret;
9943
+
9944
+ try {
9945
+ ret = _withGlobalCurrentTaskMeta({
9946
+ taskID: task.id(),
9947
+ componentIdx: task.componentIdx(),
9948
+ fn: () => toolsComponentWit(ptr0, len0),
9949
+ });
9950
+ } catch (err) {
9951
+
9952
+ task.setErrored(err);
9953
+ task.reject(err);
9954
+ task.exit();
9955
+ throw err;
9956
+
9957
+ }
9462
9958
 
9463
9959
  let variant3;
9464
9960
  switch (dataView(memory0).getUint8(ret + 0, true)) {
@@ -9579,19 +10075,35 @@ function componentWitMetadataForWorld(arg0, arg1) {
9579
10075
  isManualAsync: false,
9580
10076
  entryFnName: 'toolsComponentWitMetadataForWorld',
9581
10077
  getCallbackFn: () => null,
9582
- callbackFnName: 'null',
10078
+ callbackFnName: null,
9583
10079
  errHandling: 'throw-result-err',
9584
10080
  callingWasmExport: true,
9585
10081
  });
9586
10082
 
9587
10083
  const started = task.enterSync();
9588
- task.setReturnMemoryIdx(0);
9589
- task.setReturnMemory(memory0);
9590
- let ret = _withGlobalCurrentTaskMeta({
9591
- taskID: task.id(),
9592
- componentIdx: task.componentIdx(),
9593
- fn: () => toolsComponentWitMetadataForWorld(variant2_0, variant2_1, variant2_2, variant4_0, variant4_1, variant4_2),
9594
- });
10084
+
10085
+ if (0!== null) {
10086
+ task.setReturnMemoryIdx(0);
10087
+ task.setReturnMemory(() => memory0());
10088
+ }
10089
+
10090
+
10091
+ let ret;
10092
+
10093
+ try {
10094
+ ret = _withGlobalCurrentTaskMeta({
10095
+ taskID: task.id(),
10096
+ componentIdx: task.componentIdx(),
10097
+ fn: () => toolsComponentWitMetadataForWorld(variant2_0, variant2_1, variant2_2, variant4_0, variant4_1, variant4_2),
10098
+ });
10099
+ } catch (err) {
10100
+
10101
+ task.setErrored(err);
10102
+ task.reject(err);
10103
+ task.exit();
10104
+ throw err;
10105
+
10106
+ }
9595
10107
 
9596
10108
  let variant24;
9597
10109
  switch (dataView(memory0).getUint8(ret + 0, true)) {
@@ -10007,19 +10519,35 @@ function componentEmbed(arg0) {
10007
10519
  isManualAsync: false,
10008
10520
  entryFnName: 'toolsComponentEmbed',
10009
10521
  getCallbackFn: () => null,
10010
- callbackFnName: 'null',
10522
+ callbackFnName: null,
10011
10523
  errHandling: 'throw-result-err',
10012
10524
  callingWasmExport: true,
10013
10525
  });
10014
10526
 
10015
10527
  const started = task.enterSync();
10016
- task.setReturnMemoryIdx(0);
10017
- task.setReturnMemory(memory0);
10018
- let ret = _withGlobalCurrentTaskMeta({
10019
- taskID: task.id(),
10020
- componentIdx: task.componentIdx(),
10021
- fn: () => toolsComponentEmbed(ptr0),
10022
- });
10528
+
10529
+ if (0!== null) {
10530
+ task.setReturnMemoryIdx(0);
10531
+ task.setReturnMemory(() => memory0());
10532
+ }
10533
+
10534
+
10535
+ let ret;
10536
+
10537
+ try {
10538
+ ret = _withGlobalCurrentTaskMeta({
10539
+ taskID: task.id(),
10540
+ componentIdx: task.componentIdx(),
10541
+ fn: () => toolsComponentEmbed(ptr0),
10542
+ });
10543
+ } catch (err) {
10544
+
10545
+ task.setErrored(err);
10546
+ task.reject(err);
10547
+ task.exit();
10548
+ throw err;
10549
+
10550
+ }
10023
10551
 
10024
10552
  let variant27;
10025
10553
  switch (dataView(memory0).getUint8(ret + 0, true)) {
@@ -10110,19 +10638,35 @@ function metadataShow(arg0) {
10110
10638
  isManualAsync: false,
10111
10639
  entryFnName: 'toolsMetadataShow',
10112
10640
  getCallbackFn: () => null,
10113
- callbackFnName: 'null',
10641
+ callbackFnName: null,
10114
10642
  errHandling: 'throw-result-err',
10115
10643
  callingWasmExport: true,
10116
10644
  });
10117
10645
 
10118
10646
  const started = task.enterSync();
10119
- task.setReturnMemoryIdx(0);
10120
- task.setReturnMemory(memory0);
10121
- let ret = _withGlobalCurrentTaskMeta({
10122
- taskID: task.id(),
10123
- componentIdx: task.componentIdx(),
10124
- fn: () => toolsMetadataShow(ptr0, len0),
10125
- });
10647
+
10648
+ if (0!== null) {
10649
+ task.setReturnMemoryIdx(0);
10650
+ task.setReturnMemory(() => memory0());
10651
+ }
10652
+
10653
+
10654
+ let ret;
10655
+
10656
+ try {
10657
+ ret = _withGlobalCurrentTaskMeta({
10658
+ taskID: task.id(),
10659
+ componentIdx: task.componentIdx(),
10660
+ fn: () => toolsMetadataShow(ptr0, len0),
10661
+ });
10662
+ } catch (err) {
10663
+
10664
+ task.setErrored(err);
10665
+ task.reject(err);
10666
+ task.exit();
10667
+ throw err;
10668
+
10669
+ }
10126
10670
 
10127
10671
  let variant12;
10128
10672
  switch (dataView(memory0).getUint8(ret + 0, true)) {
@@ -10333,19 +10877,35 @@ function metadataAdd(arg0, arg1) {
10333
10877
  isManualAsync: false,
10334
10878
  entryFnName: 'toolsMetadataAdd',
10335
10879
  getCallbackFn: () => null,
10336
- callbackFnName: 'null',
10880
+ callbackFnName: null,
10337
10881
  errHandling: 'throw-result-err',
10338
10882
  callingWasmExport: true,
10339
10883
  });
10340
10884
 
10341
10885
  const started = task.enterSync();
10342
- task.setReturnMemoryIdx(0);
10343
- task.setReturnMemory(memory0);
10344
- let ret = _withGlobalCurrentTaskMeta({
10345
- taskID: task.id(),
10346
- componentIdx: task.componentIdx(),
10347
- fn: () => toolsMetadataAdd(ptr0, len0, result7, len7),
10348
- });
10886
+
10887
+ if (0!== null) {
10888
+ task.setReturnMemoryIdx(0);
10889
+ task.setReturnMemory(() => memory0());
10890
+ }
10891
+
10892
+
10893
+ let ret;
10894
+
10895
+ try {
10896
+ ret = _withGlobalCurrentTaskMeta({
10897
+ taskID: task.id(),
10898
+ componentIdx: task.componentIdx(),
10899
+ fn: () => toolsMetadataAdd(ptr0, len0, result7, len7),
10900
+ });
10901
+ } catch (err) {
10902
+
10903
+ task.setErrored(err);
10904
+ task.reject(err);
10905
+ task.exit();
10906
+ throw err;
10907
+
10908
+ }
10349
10909
 
10350
10910
  let variant10;
10351
10911
  switch (dataView(memory0).getUint8(ret + 0, true)) {
@@ -10471,8 +11031,22 @@ null,
10471
11031
  paramLiftFns: [],
10472
11032
  resultLowerFns: [_lowerFlatOwn({
10473
11033
  componentIdx: 0,
10474
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11034
+ lowerFn:
11035
+ function lowerImportedOwnedHost_OutputStream(obj) {
11036
+ if (!(obj instanceof OutputStream)) {
11037
+ throw new TypeError('Resource error: Not a valid \"OutputStream\" resource.');
11038
+ }
11039
+ let handle = obj[symbolRscHandle];
11040
+ if (!handle) {
11041
+ const rep = obj[symbolRscRep] || ++captureCnt2;
11042
+ captureTable2.set(rep, obj);
11043
+ handle = rscTableCreateOwn(handleTable2, rep);
11044
+ }
11045
+ return handle;
11046
+ }
11047
+ ,
10475
11048
  })],
11049
+ hasResultPointer: false,
10476
11050
  funcTypeIsAsync: false,
10477
11051
  getCallbackFn: () => null,
10478
11052
  getPostReturnFn: () => null,
@@ -10480,7 +11054,7 @@ null,
10480
11054
  memoryIdx: null,
10481
11055
  stringEncoding: 'utf8',
10482
11056
  getMemoryFn: () => null,
10483
- getReallocFn: () => null,
11057
+ getReallocFn: undefined,
10484
11058
  importFn: _trampoline5,
10485
11059
  },
10486
11060
  )) : _lowerImportBackwardsCompat.bind(
@@ -10493,8 +11067,22 @@ null,
10493
11067
  paramLiftFns: [],
10494
11068
  resultLowerFns: [_lowerFlatOwn({
10495
11069
  componentIdx: 0,
10496
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11070
+ lowerFn:
11071
+ function lowerImportedOwnedHost_OutputStream(obj) {
11072
+ if (!(obj instanceof OutputStream)) {
11073
+ throw new TypeError('Resource error: Not a valid \"OutputStream\" resource.');
11074
+ }
11075
+ let handle = obj[symbolRscHandle];
11076
+ if (!handle) {
11077
+ const rep = obj[symbolRscRep] || ++captureCnt2;
11078
+ captureTable2.set(rep, obj);
11079
+ handle = rscTableCreateOwn(handleTable2, rep);
11080
+ }
11081
+ return handle;
11082
+ }
11083
+ ,
10497
11084
  })],
11085
+ hasResultPointer: false,
10498
11086
  funcTypeIsAsync: false,
10499
11087
  getCallbackFn: () => null,
10500
11088
  getPostReturnFn: () => null,
@@ -10502,7 +11090,7 @@ null,
10502
11090
  memoryIdx: null,
10503
11091
  stringEncoding: 'utf8',
10504
11092
  getMemoryFn: () => null,
10505
- getReallocFn: () => null,
11093
+ getReallocFn: undefined,
10506
11094
  importFn: _trampoline5,
10507
11095
  },
10508
11096
  );
@@ -10542,8 +11130,22 @@ null,
10542
11130
  paramLiftFns: [],
10543
11131
  resultLowerFns: [_lowerFlatOwn({
10544
11132
  componentIdx: 0,
10545
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11133
+ lowerFn:
11134
+ function lowerImportedOwnedHost_InputStream(obj) {
11135
+ if (!(obj instanceof InputStream)) {
11136
+ throw new TypeError('Resource error: Not a valid \"InputStream\" resource.');
11137
+ }
11138
+ let handle = obj[symbolRscHandle];
11139
+ if (!handle) {
11140
+ const rep = obj[symbolRscRep] || ++captureCnt1;
11141
+ captureTable1.set(rep, obj);
11142
+ handle = rscTableCreateOwn(handleTable1, rep);
11143
+ }
11144
+ return handle;
11145
+ }
11146
+ ,
10546
11147
  })],
11148
+ hasResultPointer: false,
10547
11149
  funcTypeIsAsync: false,
10548
11150
  getCallbackFn: () => null,
10549
11151
  getPostReturnFn: () => null,
@@ -10551,7 +11153,7 @@ null,
10551
11153
  memoryIdx: null,
10552
11154
  stringEncoding: 'utf8',
10553
11155
  getMemoryFn: () => null,
10554
- getReallocFn: () => null,
11156
+ getReallocFn: undefined,
10555
11157
  importFn: _trampoline8,
10556
11158
  },
10557
11159
  )) : _lowerImportBackwardsCompat.bind(
@@ -10564,8 +11166,22 @@ null,
10564
11166
  paramLiftFns: [],
10565
11167
  resultLowerFns: [_lowerFlatOwn({
10566
11168
  componentIdx: 0,
10567
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11169
+ lowerFn:
11170
+ function lowerImportedOwnedHost_InputStream(obj) {
11171
+ if (!(obj instanceof InputStream)) {
11172
+ throw new TypeError('Resource error: Not a valid \"InputStream\" resource.');
11173
+ }
11174
+ let handle = obj[symbolRscHandle];
11175
+ if (!handle) {
11176
+ const rep = obj[symbolRscRep] || ++captureCnt1;
11177
+ captureTable1.set(rep, obj);
11178
+ handle = rscTableCreateOwn(handleTable1, rep);
11179
+ }
11180
+ return handle;
11181
+ }
11182
+ ,
10568
11183
  })],
11184
+ hasResultPointer: false,
10569
11185
  funcTypeIsAsync: false,
10570
11186
  getCallbackFn: () => null,
10571
11187
  getPostReturnFn: () => null,
@@ -10573,7 +11189,7 @@ null,
10573
11189
  memoryIdx: null,
10574
11190
  stringEncoding: 'utf8',
10575
11191
  getMemoryFn: () => null,
10576
- getReallocFn: () => null,
11192
+ getReallocFn: undefined,
10577
11193
  importFn: _trampoline8,
10578
11194
  },
10579
11195
  );
@@ -10587,8 +11203,22 @@ null,
10587
11203
  paramLiftFns: [],
10588
11204
  resultLowerFns: [_lowerFlatOwn({
10589
11205
  componentIdx: 0,
10590
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11206
+ lowerFn:
11207
+ function lowerImportedOwnedHost_OutputStream(obj) {
11208
+ if (!(obj instanceof OutputStream)) {
11209
+ throw new TypeError('Resource error: Not a valid \"OutputStream\" resource.');
11210
+ }
11211
+ let handle = obj[symbolRscHandle];
11212
+ if (!handle) {
11213
+ const rep = obj[symbolRscRep] || ++captureCnt2;
11214
+ captureTable2.set(rep, obj);
11215
+ handle = rscTableCreateOwn(handleTable2, rep);
11216
+ }
11217
+ return handle;
11218
+ }
11219
+ ,
10591
11220
  })],
11221
+ hasResultPointer: false,
10592
11222
  funcTypeIsAsync: false,
10593
11223
  getCallbackFn: () => null,
10594
11224
  getPostReturnFn: () => null,
@@ -10596,7 +11226,7 @@ null,
10596
11226
  memoryIdx: null,
10597
11227
  stringEncoding: 'utf8',
10598
11228
  getMemoryFn: () => null,
10599
- getReallocFn: () => null,
11229
+ getReallocFn: undefined,
10600
11230
  importFn: _trampoline9,
10601
11231
  },
10602
11232
  )) : _lowerImportBackwardsCompat.bind(
@@ -10609,8 +11239,22 @@ null,
10609
11239
  paramLiftFns: [],
10610
11240
  resultLowerFns: [_lowerFlatOwn({
10611
11241
  componentIdx: 0,
10612
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11242
+ lowerFn:
11243
+ function lowerImportedOwnedHost_OutputStream(obj) {
11244
+ if (!(obj instanceof OutputStream)) {
11245
+ throw new TypeError('Resource error: Not a valid \"OutputStream\" resource.');
11246
+ }
11247
+ let handle = obj[symbolRscHandle];
11248
+ if (!handle) {
11249
+ const rep = obj[symbolRscRep] || ++captureCnt2;
11250
+ captureTable2.set(rep, obj);
11251
+ handle = rscTableCreateOwn(handleTable2, rep);
11252
+ }
11253
+ return handle;
11254
+ }
11255
+ ,
10613
11256
  })],
11257
+ hasResultPointer: false,
10614
11258
  funcTypeIsAsync: false,
10615
11259
  getCallbackFn: () => null,
10616
11260
  getPostReturnFn: () => null,
@@ -10618,7 +11262,7 @@ null,
10618
11262
  memoryIdx: null,
10619
11263
  stringEncoding: 'utf8',
10620
11264
  getMemoryFn: () => null,
10621
- getReallocFn: () => null,
11265
+ getReallocFn: undefined,
10622
11266
  importFn: _trampoline9,
10623
11267
  },
10624
11268
  );
@@ -10629,8 +11273,9 @@ null,
10629
11273
  componentIdx: 0,
10630
11274
  isAsync: false,
10631
11275
  isManualAsync: _trampoline10.manuallyAsync,
10632
- paramLiftFns: [_liftFlatResult([['ok', null, 0, 0, 0],['err', null, 0, 0, 0],])],
11276
+ paramLiftFns: [_liftFlatResult([['ok', null, 1, 1, 1, 0, 1],['err', null, 1, 1, 1, 0, 1],])],
10633
11277
  resultLowerFns: [],
11278
+ hasResultPointer: false,
10634
11279
  funcTypeIsAsync: false,
10635
11280
  getCallbackFn: () => null,
10636
11281
  getPostReturnFn: () => null,
@@ -10638,7 +11283,7 @@ null,
10638
11283
  memoryIdx: null,
10639
11284
  stringEncoding: 'utf8',
10640
11285
  getMemoryFn: () => null,
10641
- getReallocFn: () => null,
11286
+ getReallocFn: undefined,
10642
11287
  importFn: _trampoline10,
10643
11288
  },
10644
11289
  )) : _lowerImportBackwardsCompat.bind(
@@ -10648,8 +11293,9 @@ null,
10648
11293
  componentIdx: 0,
10649
11294
  isAsync: false,
10650
11295
  isManualAsync: _trampoline10.manuallyAsync,
10651
- paramLiftFns: [_liftFlatResult([['ok', null, 0, 0, 0],['err', null, 0, 0, 0],])],
11296
+ paramLiftFns: [_liftFlatResult([['ok', null, 1, 1, 1, 0, 1],['err', null, 1, 1, 1, 0, 1],])],
10652
11297
  resultLowerFns: [],
11298
+ hasResultPointer: false,
10653
11299
  funcTypeIsAsync: false,
10654
11300
  getCallbackFn: () => null,
10655
11301
  getPostReturnFn: () => null,
@@ -10657,7 +11303,7 @@ null,
10657
11303
  memoryIdx: null,
10658
11304
  stringEncoding: 'utf8',
10659
11305
  getMemoryFn: () => null,
10660
- getReallocFn: () => null,
11306
+ getReallocFn: undefined,
10661
11307
  importFn: _trampoline10,
10662
11308
  },
10663
11309
  );
@@ -10670,10 +11316,11 @@ null,
10670
11316
  isManualAsync: _trampoline11.manuallyAsync,
10671
11317
  paramLiftFns: [],
10672
11318
  resultLowerFns: [_lowerFlatList({
10673
- elemLowerFn: _lowerFlatTuple([[_lowerFlatStringAny, 16, 4],[_lowerFlatStringAny, 16, 4],]),
11319
+ elemLowerFn: _lowerFlatTuple({ elemLowerMetas: [[_lowerFlatStringAny, 8, 4],[_lowerFlatStringAny, 8, 4],], size32: 16, align32: 4 }),
10674
11320
  elemSize32: 16,
10675
11321
  elemAlign32: 4,
10676
11322
  })],
11323
+ hasResultPointer: true,
10677
11324
  funcTypeIsAsync: false,
10678
11325
  getCallbackFn: () => null,
10679
11326
  getPostReturnFn: () => null,
@@ -10693,10 +11340,11 @@ null,
10693
11340
  isManualAsync: _trampoline11.manuallyAsync,
10694
11341
  paramLiftFns: [],
10695
11342
  resultLowerFns: [_lowerFlatList({
10696
- elemLowerFn: _lowerFlatTuple([[_lowerFlatStringAny, 16, 4],[_lowerFlatStringAny, 16, 4],]),
11343
+ elemLowerFn: _lowerFlatTuple({ elemLowerMetas: [[_lowerFlatStringAny, 8, 4],[_lowerFlatStringAny, 8, 4],], size32: 16, align32: 4 }),
10697
11344
  elemSize32: 16,
10698
11345
  elemAlign32: 4,
10699
11346
  })],
11347
+ hasResultPointer: true,
10700
11348
  funcTypeIsAsync: false,
10701
11349
  getCallbackFn: () => null,
10702
11350
  getPostReturnFn: () => null,
@@ -10717,10 +11365,11 @@ null,
10717
11365
  isManualAsync: _trampoline12.manuallyAsync,
10718
11366
  paramLiftFns: [_liftFlatBorrow.bind(null, 6)],
10719
11367
  resultLowerFns: [_lowerFlatResult([
10720
- [ 'ok', _lowerFlatFlags({ names: ['read','write','file-integrity-sync','data-integrity-sync','requested-write-sync','mutate-directory'], size32: 1, align32: 1, intSizeBytes: 1 }), 2, 1, 1 ],
11368
+ [ 'ok', _lowerFlatFlags({ names: ['read','write','fileIntegritySync','dataIntegritySync','requestedWriteSync','mutateDirectory'], size32: 1, align32: 1, intSizeBytes: 1 }), 2, 1, 1 ],
10721
11369
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 2, 1, 1 ],
10722
11370
  ])
10723
11371
  ],
11372
+ hasResultPointer: true,
10724
11373
  funcTypeIsAsync: false,
10725
11374
  getCallbackFn: () => null,
10726
11375
  getPostReturnFn: () => null,
@@ -10728,7 +11377,7 @@ null,
10728
11377
  memoryIdx: 0,
10729
11378
  stringEncoding: 'utf8',
10730
11379
  getMemoryFn: () => memory0,
10731
- getReallocFn: () => null,
11380
+ getReallocFn: undefined,
10732
11381
  importFn: _trampoline12,
10733
11382
  },
10734
11383
  )) : _lowerImportBackwardsCompat.bind(
@@ -10740,10 +11389,11 @@ null,
10740
11389
  isManualAsync: _trampoline12.manuallyAsync,
10741
11390
  paramLiftFns: [_liftFlatBorrow.bind(null, 6)],
10742
11391
  resultLowerFns: [_lowerFlatResult([
10743
- [ 'ok', _lowerFlatFlags({ names: ['read','write','file-integrity-sync','data-integrity-sync','requested-write-sync','mutate-directory'], size32: 1, align32: 1, intSizeBytes: 1 }), 2, 1, 1 ],
11392
+ [ 'ok', _lowerFlatFlags({ names: ['read','write','fileIntegritySync','dataIntegritySync','requestedWriteSync','mutateDirectory'], size32: 1, align32: 1, intSizeBytes: 1 }), 2, 1, 1 ],
10744
11393
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 2, 1, 1 ],
10745
11394
  ])
10746
11395
  ],
11396
+ hasResultPointer: true,
10747
11397
  funcTypeIsAsync: false,
10748
11398
  getCallbackFn: () => null,
10749
11399
  getPostReturnFn: () => null,
@@ -10751,7 +11401,7 @@ null,
10751
11401
  memoryIdx: 0,
10752
11402
  stringEncoding: 'utf8',
10753
11403
  getMemoryFn: () => memory0,
10754
- getReallocFn: () => null,
11404
+ getReallocFn: undefined,
10755
11405
  importFn: _trampoline12,
10756
11406
  },
10757
11407
  );
@@ -10768,6 +11418,7 @@ null,
10768
11418
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 2, 1, 1 ],
10769
11419
  ])
10770
11420
  ],
11421
+ hasResultPointer: true,
10771
11422
  funcTypeIsAsync: false,
10772
11423
  getCallbackFn: () => null,
10773
11424
  getPostReturnFn: () => null,
@@ -10775,7 +11426,7 @@ null,
10775
11426
  memoryIdx: 0,
10776
11427
  stringEncoding: 'utf8',
10777
11428
  getMemoryFn: () => memory0,
10778
- getReallocFn: () => null,
11429
+ getReallocFn: undefined,
10779
11430
  importFn: _trampoline13,
10780
11431
  },
10781
11432
  )) : _lowerImportBackwardsCompat.bind(
@@ -10791,6 +11442,7 @@ null,
10791
11442
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 2, 1, 1 ],
10792
11443
  ])
10793
11444
  ],
11445
+ hasResultPointer: true,
10794
11446
  funcTypeIsAsync: false,
10795
11447
  getCallbackFn: () => null,
10796
11448
  getPostReturnFn: () => null,
@@ -10798,7 +11450,7 @@ null,
10798
11450
  memoryIdx: 0,
10799
11451
  stringEncoding: 'utf8',
10800
11452
  getMemoryFn: () => memory0,
10801
- getReallocFn: () => null,
11453
+ getReallocFn: undefined,
10802
11454
  importFn: _trampoline13,
10803
11455
  },
10804
11456
  );
@@ -10811,10 +11463,11 @@ null,
10811
11463
  isManualAsync: _trampoline14.manuallyAsync,
10812
11464
  paramLiftFns: [_liftFlatBorrow.bind(null, 6)],
10813
11465
  resultLowerFns: [_lowerFlatResult([
10814
- [ 'ok', _lowerFlatRecord([['lower', _lowerFlatU64, 16, 8 ],['upper', _lowerFlatU64, 16, 8 ],]), 24, 8, 8 ],
11466
+ [ 'ok', _lowerFlatRecord({ fieldMetas: [['lower', _lowerFlatU64, 8, 8 ],['upper', _lowerFlatU64, 8, 8 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
10815
11467
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 24, 8, 8 ],
10816
11468
  ])
10817
11469
  ],
11470
+ hasResultPointer: true,
10818
11471
  funcTypeIsAsync: false,
10819
11472
  getCallbackFn: () => null,
10820
11473
  getPostReturnFn: () => null,
@@ -10822,7 +11475,7 @@ null,
10822
11475
  memoryIdx: 0,
10823
11476
  stringEncoding: 'utf8',
10824
11477
  getMemoryFn: () => memory0,
10825
- getReallocFn: () => null,
11478
+ getReallocFn: undefined,
10826
11479
  importFn: _trampoline14,
10827
11480
  },
10828
11481
  )) : _lowerImportBackwardsCompat.bind(
@@ -10834,10 +11487,11 @@ null,
10834
11487
  isManualAsync: _trampoline14.manuallyAsync,
10835
11488
  paramLiftFns: [_liftFlatBorrow.bind(null, 6)],
10836
11489
  resultLowerFns: [_lowerFlatResult([
10837
- [ 'ok', _lowerFlatRecord([['lower', _lowerFlatU64, 16, 8 ],['upper', _lowerFlatU64, 16, 8 ],]), 24, 8, 8 ],
11490
+ [ 'ok', _lowerFlatRecord({ fieldMetas: [['lower', _lowerFlatU64, 8, 8 ],['upper', _lowerFlatU64, 8, 8 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
10838
11491
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 24, 8, 8 ],
10839
11492
  ])
10840
11493
  ],
11494
+ hasResultPointer: true,
10841
11495
  funcTypeIsAsync: false,
10842
11496
  getCallbackFn: () => null,
10843
11497
  getPostReturnFn: () => null,
@@ -10845,7 +11499,7 @@ null,
10845
11499
  memoryIdx: 0,
10846
11500
  stringEncoding: 'utf8',
10847
11501
  getMemoryFn: () => memory0,
10848
- getReallocFn: () => null,
11502
+ getReallocFn: undefined,
10849
11503
  importFn: _trampoline14,
10850
11504
  },
10851
11505
  );
@@ -10862,6 +11516,7 @@ null,
10862
11516
  [ 'some', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 2, 1, 1 ],
10863
11517
  ])
10864
11518
  ],
11519
+ hasResultPointer: true,
10865
11520
  funcTypeIsAsync: false,
10866
11521
  getCallbackFn: () => null,
10867
11522
  getPostReturnFn: () => null,
@@ -10869,7 +11524,7 @@ null,
10869
11524
  memoryIdx: 0,
10870
11525
  stringEncoding: 'utf8',
10871
11526
  getMemoryFn: () => memory0,
10872
- getReallocFn: () => null,
11527
+ getReallocFn: undefined,
10873
11528
  importFn: _trampoline15,
10874
11529
  },
10875
11530
  )) : _lowerImportBackwardsCompat.bind(
@@ -10885,6 +11540,7 @@ null,
10885
11540
  [ 'some', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 2, 1, 1 ],
10886
11541
  ])
10887
11542
  ],
11543
+ hasResultPointer: true,
10888
11544
  funcTypeIsAsync: false,
10889
11545
  getCallbackFn: () => null,
10890
11546
  getPostReturnFn: () => null,
@@ -10892,7 +11548,7 @@ null,
10892
11548
  memoryIdx: 0,
10893
11549
  stringEncoding: 'utf8',
10894
11550
  getMemoryFn: () => memory0,
10895
- getReallocFn: () => null,
11551
+ getReallocFn: undefined,
10896
11552
  importFn: _trampoline15,
10897
11553
  },
10898
11554
  );
@@ -10903,12 +11559,13 @@ null,
10903
11559
  componentIdx: 0,
10904
11560
  isAsync: false,
10905
11561
  isManualAsync: _trampoline16.manuallyAsync,
10906
- paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlink-follow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny],
11562
+ paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlinkFollow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny],
10907
11563
  resultLowerFns: [_lowerFlatResult([
10908
- [ 'ok', _lowerFlatRecord([['lower', _lowerFlatU64, 16, 8 ],['upper', _lowerFlatU64, 16, 8 ],]), 24, 8, 8 ],
11564
+ [ 'ok', _lowerFlatRecord({ fieldMetas: [['lower', _lowerFlatU64, 8, 8 ],['upper', _lowerFlatU64, 8, 8 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
10909
11565
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 24, 8, 8 ],
10910
11566
  ])
10911
11567
  ],
11568
+ hasResultPointer: true,
10912
11569
  funcTypeIsAsync: false,
10913
11570
  getCallbackFn: () => null,
10914
11571
  getPostReturnFn: () => null,
@@ -10916,7 +11573,7 @@ null,
10916
11573
  memoryIdx: 0,
10917
11574
  stringEncoding: 'utf8',
10918
11575
  getMemoryFn: () => memory0,
10919
- getReallocFn: () => null,
11576
+ getReallocFn: undefined,
10920
11577
  importFn: _trampoline16,
10921
11578
  },
10922
11579
  )) : _lowerImportBackwardsCompat.bind(
@@ -10926,12 +11583,13 @@ null,
10926
11583
  componentIdx: 0,
10927
11584
  isAsync: false,
10928
11585
  isManualAsync: _trampoline16.manuallyAsync,
10929
- paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlink-follow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny],
11586
+ paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlinkFollow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny],
10930
11587
  resultLowerFns: [_lowerFlatResult([
10931
- [ 'ok', _lowerFlatRecord([['lower', _lowerFlatU64, 16, 8 ],['upper', _lowerFlatU64, 16, 8 ],]), 24, 8, 8 ],
11588
+ [ 'ok', _lowerFlatRecord({ fieldMetas: [['lower', _lowerFlatU64, 8, 8 ],['upper', _lowerFlatU64, 8, 8 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
10932
11589
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 24, 8, 8 ],
10933
11590
  ])
10934
11591
  ],
11592
+ hasResultPointer: true,
10935
11593
  funcTypeIsAsync: false,
10936
11594
  getCallbackFn: () => null,
10937
11595
  getPostReturnFn: () => null,
@@ -10939,7 +11597,7 @@ null,
10939
11597
  memoryIdx: 0,
10940
11598
  stringEncoding: 'utf8',
10941
11599
  getMemoryFn: () => memory0,
10942
- getReallocFn: () => null,
11600
+ getReallocFn: undefined,
10943
11601
  importFn: _trampoline16,
10944
11602
  },
10945
11603
  );
@@ -10954,11 +11612,25 @@ null,
10954
11612
  resultLowerFns: [_lowerFlatResult([
10955
11613
  [ 'ok', _lowerFlatOwn({
10956
11614
  componentIdx: 0,
10957
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11615
+ lowerFn:
11616
+ function lowerImportedOwnedHost_InputStream(obj) {
11617
+ if (!(obj instanceof InputStream)) {
11618
+ throw new TypeError('Resource error: Not a valid \"InputStream\" resource.');
11619
+ }
11620
+ let handle = obj[symbolRscHandle];
11621
+ if (!handle) {
11622
+ const rep = obj[symbolRscRep] || ++captureCnt1;
11623
+ captureTable1.set(rep, obj);
11624
+ handle = rscTableCreateOwn(handleTable1, rep);
11625
+ }
11626
+ return handle;
11627
+ }
11628
+ ,
10958
11629
  }), 8, 4, 4 ],
10959
11630
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 8, 4, 4 ],
10960
11631
  ])
10961
11632
  ],
11633
+ hasResultPointer: true,
10962
11634
  funcTypeIsAsync: false,
10963
11635
  getCallbackFn: () => null,
10964
11636
  getPostReturnFn: () => null,
@@ -10966,7 +11638,7 @@ null,
10966
11638
  memoryIdx: 0,
10967
11639
  stringEncoding: 'utf8',
10968
11640
  getMemoryFn: () => memory0,
10969
- getReallocFn: () => null,
11641
+ getReallocFn: undefined,
10970
11642
  importFn: _trampoline17,
10971
11643
  },
10972
11644
  )) : _lowerImportBackwardsCompat.bind(
@@ -10980,11 +11652,25 @@ null,
10980
11652
  resultLowerFns: [_lowerFlatResult([
10981
11653
  [ 'ok', _lowerFlatOwn({
10982
11654
  componentIdx: 0,
10983
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11655
+ lowerFn:
11656
+ function lowerImportedOwnedHost_InputStream(obj) {
11657
+ if (!(obj instanceof InputStream)) {
11658
+ throw new TypeError('Resource error: Not a valid \"InputStream\" resource.');
11659
+ }
11660
+ let handle = obj[symbolRscHandle];
11661
+ if (!handle) {
11662
+ const rep = obj[symbolRscRep] || ++captureCnt1;
11663
+ captureTable1.set(rep, obj);
11664
+ handle = rscTableCreateOwn(handleTable1, rep);
11665
+ }
11666
+ return handle;
11667
+ }
11668
+ ,
10984
11669
  }), 8, 4, 4 ],
10985
11670
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 8, 4, 4 ],
10986
11671
  ])
10987
11672
  ],
11673
+ hasResultPointer: true,
10988
11674
  funcTypeIsAsync: false,
10989
11675
  getCallbackFn: () => null,
10990
11676
  getPostReturnFn: () => null,
@@ -10992,7 +11678,7 @@ null,
10992
11678
  memoryIdx: 0,
10993
11679
  stringEncoding: 'utf8',
10994
11680
  getMemoryFn: () => memory0,
10995
- getReallocFn: () => null,
11681
+ getReallocFn: undefined,
10996
11682
  importFn: _trampoline17,
10997
11683
  },
10998
11684
  );
@@ -11007,11 +11693,25 @@ null,
11007
11693
  resultLowerFns: [_lowerFlatResult([
11008
11694
  [ 'ok', _lowerFlatOwn({
11009
11695
  componentIdx: 0,
11010
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11696
+ lowerFn:
11697
+ function lowerImportedOwnedHost_OutputStream(obj) {
11698
+ if (!(obj instanceof OutputStream)) {
11699
+ throw new TypeError('Resource error: Not a valid \"OutputStream\" resource.');
11700
+ }
11701
+ let handle = obj[symbolRscHandle];
11702
+ if (!handle) {
11703
+ const rep = obj[symbolRscRep] || ++captureCnt2;
11704
+ captureTable2.set(rep, obj);
11705
+ handle = rscTableCreateOwn(handleTable2, rep);
11706
+ }
11707
+ return handle;
11708
+ }
11709
+ ,
11011
11710
  }), 8, 4, 4 ],
11012
11711
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 8, 4, 4 ],
11013
11712
  ])
11014
11713
  ],
11714
+ hasResultPointer: true,
11015
11715
  funcTypeIsAsync: false,
11016
11716
  getCallbackFn: () => null,
11017
11717
  getPostReturnFn: () => null,
@@ -11019,7 +11719,7 @@ null,
11019
11719
  memoryIdx: 0,
11020
11720
  stringEncoding: 'utf8',
11021
11721
  getMemoryFn: () => memory0,
11022
- getReallocFn: () => null,
11722
+ getReallocFn: undefined,
11023
11723
  importFn: _trampoline18,
11024
11724
  },
11025
11725
  )) : _lowerImportBackwardsCompat.bind(
@@ -11033,11 +11733,25 @@ null,
11033
11733
  resultLowerFns: [_lowerFlatResult([
11034
11734
  [ 'ok', _lowerFlatOwn({
11035
11735
  componentIdx: 0,
11036
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11736
+ lowerFn:
11737
+ function lowerImportedOwnedHost_OutputStream(obj) {
11738
+ if (!(obj instanceof OutputStream)) {
11739
+ throw new TypeError('Resource error: Not a valid \"OutputStream\" resource.');
11740
+ }
11741
+ let handle = obj[symbolRscHandle];
11742
+ if (!handle) {
11743
+ const rep = obj[symbolRscRep] || ++captureCnt2;
11744
+ captureTable2.set(rep, obj);
11745
+ handle = rscTableCreateOwn(handleTable2, rep);
11746
+ }
11747
+ return handle;
11748
+ }
11749
+ ,
11037
11750
  }), 8, 4, 4 ],
11038
11751
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 8, 4, 4 ],
11039
11752
  ])
11040
11753
  ],
11754
+ hasResultPointer: true,
11041
11755
  funcTypeIsAsync: false,
11042
11756
  getCallbackFn: () => null,
11043
11757
  getPostReturnFn: () => null,
@@ -11045,7 +11759,7 @@ null,
11045
11759
  memoryIdx: 0,
11046
11760
  stringEncoding: 'utf8',
11047
11761
  getMemoryFn: () => memory0,
11048
- getReallocFn: () => null,
11762
+ getReallocFn: undefined,
11049
11763
  importFn: _trampoline18,
11050
11764
  },
11051
11765
  );
@@ -11060,11 +11774,25 @@ null,
11060
11774
  resultLowerFns: [_lowerFlatResult([
11061
11775
  [ 'ok', _lowerFlatOwn({
11062
11776
  componentIdx: 0,
11063
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11777
+ lowerFn:
11778
+ function lowerImportedOwnedHost_OutputStream(obj) {
11779
+ if (!(obj instanceof OutputStream)) {
11780
+ throw new TypeError('Resource error: Not a valid \"OutputStream\" resource.');
11781
+ }
11782
+ let handle = obj[symbolRscHandle];
11783
+ if (!handle) {
11784
+ const rep = obj[symbolRscRep] || ++captureCnt2;
11785
+ captureTable2.set(rep, obj);
11786
+ handle = rscTableCreateOwn(handleTable2, rep);
11787
+ }
11788
+ return handle;
11789
+ }
11790
+ ,
11064
11791
  }), 8, 4, 4 ],
11065
11792
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 8, 4, 4 ],
11066
11793
  ])
11067
11794
  ],
11795
+ hasResultPointer: true,
11068
11796
  funcTypeIsAsync: false,
11069
11797
  getCallbackFn: () => null,
11070
11798
  getPostReturnFn: () => null,
@@ -11072,7 +11800,7 @@ null,
11072
11800
  memoryIdx: 0,
11073
11801
  stringEncoding: 'utf8',
11074
11802
  getMemoryFn: () => memory0,
11075
- getReallocFn: () => null,
11803
+ getReallocFn: undefined,
11076
11804
  importFn: _trampoline19,
11077
11805
  },
11078
11806
  )) : _lowerImportBackwardsCompat.bind(
@@ -11086,11 +11814,25 @@ null,
11086
11814
  resultLowerFns: [_lowerFlatResult([
11087
11815
  [ 'ok', _lowerFlatOwn({
11088
11816
  componentIdx: 0,
11089
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11817
+ lowerFn:
11818
+ function lowerImportedOwnedHost_OutputStream(obj) {
11819
+ if (!(obj instanceof OutputStream)) {
11820
+ throw new TypeError('Resource error: Not a valid \"OutputStream\" resource.');
11821
+ }
11822
+ let handle = obj[symbolRscHandle];
11823
+ if (!handle) {
11824
+ const rep = obj[symbolRscRep] || ++captureCnt2;
11825
+ captureTable2.set(rep, obj);
11826
+ handle = rscTableCreateOwn(handleTable2, rep);
11827
+ }
11828
+ return handle;
11829
+ }
11830
+ ,
11090
11831
  }), 8, 4, 4 ],
11091
11832
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 8, 4, 4 ],
11092
11833
  ])
11093
11834
  ],
11835
+ hasResultPointer: true,
11094
11836
  funcTypeIsAsync: false,
11095
11837
  getCallbackFn: () => null,
11096
11838
  getPostReturnFn: () => null,
@@ -11098,7 +11840,7 @@ null,
11098
11840
  memoryIdx: 0,
11099
11841
  stringEncoding: 'utf8',
11100
11842
  getMemoryFn: () => memory0,
11101
- getReallocFn: () => null,
11843
+ getReallocFn: undefined,
11102
11844
  importFn: _trampoline19,
11103
11845
  },
11104
11846
  );
@@ -11113,11 +11855,25 @@ null,
11113
11855
  resultLowerFns: [_lowerFlatResult([
11114
11856
  [ 'ok', _lowerFlatOwn({
11115
11857
  componentIdx: 0,
11116
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11858
+ lowerFn:
11859
+ function lowerImportedOwnedHost_DirectoryEntryStream(obj) {
11860
+ if (!(obj instanceof DirectoryEntryStream)) {
11861
+ throw new TypeError('Resource error: Not a valid \"DirectoryEntryStream\" resource.');
11862
+ }
11863
+ let handle = obj[symbolRscHandle];
11864
+ if (!handle) {
11865
+ const rep = obj[symbolRscRep] || ++captureCnt5;
11866
+ captureTable5.set(rep, obj);
11867
+ handle = rscTableCreateOwn(handleTable5, rep);
11868
+ }
11869
+ return handle;
11870
+ }
11871
+ ,
11117
11872
  }), 8, 4, 4 ],
11118
11873
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 8, 4, 4 ],
11119
11874
  ])
11120
11875
  ],
11876
+ hasResultPointer: true,
11121
11877
  funcTypeIsAsync: false,
11122
11878
  getCallbackFn: () => null,
11123
11879
  getPostReturnFn: () => null,
@@ -11125,7 +11881,7 @@ null,
11125
11881
  memoryIdx: 0,
11126
11882
  stringEncoding: 'utf8',
11127
11883
  getMemoryFn: () => memory0,
11128
- getReallocFn: () => null,
11884
+ getReallocFn: undefined,
11129
11885
  importFn: _trampoline20,
11130
11886
  },
11131
11887
  )) : _lowerImportBackwardsCompat.bind(
@@ -11139,11 +11895,25 @@ null,
11139
11895
  resultLowerFns: [_lowerFlatResult([
11140
11896
  [ 'ok', _lowerFlatOwn({
11141
11897
  componentIdx: 0,
11142
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11898
+ lowerFn:
11899
+ function lowerImportedOwnedHost_DirectoryEntryStream(obj) {
11900
+ if (!(obj instanceof DirectoryEntryStream)) {
11901
+ throw new TypeError('Resource error: Not a valid \"DirectoryEntryStream\" resource.');
11902
+ }
11903
+ let handle = obj[symbolRscHandle];
11904
+ if (!handle) {
11905
+ const rep = obj[symbolRscRep] || ++captureCnt5;
11906
+ captureTable5.set(rep, obj);
11907
+ handle = rscTableCreateOwn(handleTable5, rep);
11908
+ }
11909
+ return handle;
11910
+ }
11911
+ ,
11143
11912
  }), 8, 4, 4 ],
11144
11913
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 8, 4, 4 ],
11145
11914
  ])
11146
11915
  ],
11916
+ hasResultPointer: true,
11147
11917
  funcTypeIsAsync: false,
11148
11918
  getCallbackFn: () => null,
11149
11919
  getPostReturnFn: () => null,
@@ -11151,7 +11921,7 @@ null,
11151
11921
  memoryIdx: 0,
11152
11922
  stringEncoding: 'utf8',
11153
11923
  getMemoryFn: () => memory0,
11154
- getReallocFn: () => null,
11924
+ getReallocFn: undefined,
11155
11925
  importFn: _trampoline20,
11156
11926
  },
11157
11927
  );
@@ -11164,22 +11934,23 @@ null,
11164
11934
  isManualAsync: _trampoline21.manuallyAsync,
11165
11935
  paramLiftFns: [_liftFlatBorrow.bind(null, 6)],
11166
11936
  resultLowerFns: [_lowerFlatResult([
11167
- [ 'ok', _lowerFlatRecord([['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 96, 8 ],['linkCount', _lowerFlatU64, 96, 8 ],['size', _lowerFlatU64, 96, 8 ],['dataAccessTimestamp', _lowerFlatOption([
11937
+ [ 'ok', _lowerFlatRecord({ fieldMetas: [['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 1, 1 ],['linkCount', _lowerFlatU64, 8, 8 ],['size', _lowerFlatU64, 8, 8 ],['dataAccessTimestamp', _lowerFlatOption([
11168
11938
  [ 'none', null, 24, 8, 8 ],
11169
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
11939
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11170
11940
  ])
11171
- , 96, 8 ],['dataModificationTimestamp', _lowerFlatOption([
11941
+ , 24, 8 ],['dataModificationTimestamp', _lowerFlatOption([
11172
11942
  [ 'none', null, 24, 8, 8 ],
11173
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
11943
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11174
11944
  ])
11175
- , 96, 8 ],['statusChangeTimestamp', _lowerFlatOption([
11945
+ , 24, 8 ],['statusChangeTimestamp', _lowerFlatOption([
11176
11946
  [ 'none', null, 24, 8, 8 ],
11177
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
11947
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11178
11948
  ])
11179
- , 96, 8 ],]), 104, 8, 8 ],
11949
+ , 24, 8 ],], size32: 96, align32: 8 }), 104, 8, 8 ],
11180
11950
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 104, 8, 8 ],
11181
11951
  ])
11182
11952
  ],
11953
+ hasResultPointer: true,
11183
11954
  funcTypeIsAsync: false,
11184
11955
  getCallbackFn: () => null,
11185
11956
  getPostReturnFn: () => null,
@@ -11187,7 +11958,7 @@ null,
11187
11958
  memoryIdx: 0,
11188
11959
  stringEncoding: 'utf8',
11189
11960
  getMemoryFn: () => memory0,
11190
- getReallocFn: () => null,
11961
+ getReallocFn: undefined,
11191
11962
  importFn: _trampoline21,
11192
11963
  },
11193
11964
  )) : _lowerImportBackwardsCompat.bind(
@@ -11199,22 +11970,23 @@ null,
11199
11970
  isManualAsync: _trampoline21.manuallyAsync,
11200
11971
  paramLiftFns: [_liftFlatBorrow.bind(null, 6)],
11201
11972
  resultLowerFns: [_lowerFlatResult([
11202
- [ 'ok', _lowerFlatRecord([['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 96, 8 ],['linkCount', _lowerFlatU64, 96, 8 ],['size', _lowerFlatU64, 96, 8 ],['dataAccessTimestamp', _lowerFlatOption([
11973
+ [ 'ok', _lowerFlatRecord({ fieldMetas: [['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 1, 1 ],['linkCount', _lowerFlatU64, 8, 8 ],['size', _lowerFlatU64, 8, 8 ],['dataAccessTimestamp', _lowerFlatOption([
11203
11974
  [ 'none', null, 24, 8, 8 ],
11204
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
11975
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11205
11976
  ])
11206
- , 96, 8 ],['dataModificationTimestamp', _lowerFlatOption([
11977
+ , 24, 8 ],['dataModificationTimestamp', _lowerFlatOption([
11207
11978
  [ 'none', null, 24, 8, 8 ],
11208
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
11979
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11209
11980
  ])
11210
- , 96, 8 ],['statusChangeTimestamp', _lowerFlatOption([
11981
+ , 24, 8 ],['statusChangeTimestamp', _lowerFlatOption([
11211
11982
  [ 'none', null, 24, 8, 8 ],
11212
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
11983
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11213
11984
  ])
11214
- , 96, 8 ],]), 104, 8, 8 ],
11985
+ , 24, 8 ],], size32: 96, align32: 8 }), 104, 8, 8 ],
11215
11986
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 104, 8, 8 ],
11216
11987
  ])
11217
11988
  ],
11989
+ hasResultPointer: true,
11218
11990
  funcTypeIsAsync: false,
11219
11991
  getCallbackFn: () => null,
11220
11992
  getPostReturnFn: () => null,
@@ -11222,7 +11994,7 @@ null,
11222
11994
  memoryIdx: 0,
11223
11995
  stringEncoding: 'utf8',
11224
11996
  getMemoryFn: () => memory0,
11225
- getReallocFn: () => null,
11997
+ getReallocFn: undefined,
11226
11998
  importFn: _trampoline21,
11227
11999
  },
11228
12000
  );
@@ -11233,24 +12005,25 @@ null,
11233
12005
  componentIdx: 0,
11234
12006
  isAsync: false,
11235
12007
  isManualAsync: _trampoline22.manuallyAsync,
11236
- paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlink-follow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny],
12008
+ paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlinkFollow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny],
11237
12009
  resultLowerFns: [_lowerFlatResult([
11238
- [ 'ok', _lowerFlatRecord([['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 96, 8 ],['linkCount', _lowerFlatU64, 96, 8 ],['size', _lowerFlatU64, 96, 8 ],['dataAccessTimestamp', _lowerFlatOption([
12010
+ [ 'ok', _lowerFlatRecord({ fieldMetas: [['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 1, 1 ],['linkCount', _lowerFlatU64, 8, 8 ],['size', _lowerFlatU64, 8, 8 ],['dataAccessTimestamp', _lowerFlatOption([
11239
12011
  [ 'none', null, 24, 8, 8 ],
11240
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
12012
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11241
12013
  ])
11242
- , 96, 8 ],['dataModificationTimestamp', _lowerFlatOption([
12014
+ , 24, 8 ],['dataModificationTimestamp', _lowerFlatOption([
11243
12015
  [ 'none', null, 24, 8, 8 ],
11244
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
12016
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11245
12017
  ])
11246
- , 96, 8 ],['statusChangeTimestamp', _lowerFlatOption([
12018
+ , 24, 8 ],['statusChangeTimestamp', _lowerFlatOption([
11247
12019
  [ 'none', null, 24, 8, 8 ],
11248
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
12020
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11249
12021
  ])
11250
- , 96, 8 ],]), 104, 8, 8 ],
12022
+ , 24, 8 ],], size32: 96, align32: 8 }), 104, 8, 8 ],
11251
12023
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 104, 8, 8 ],
11252
12024
  ])
11253
12025
  ],
12026
+ hasResultPointer: true,
11254
12027
  funcTypeIsAsync: false,
11255
12028
  getCallbackFn: () => null,
11256
12029
  getPostReturnFn: () => null,
@@ -11258,7 +12031,7 @@ null,
11258
12031
  memoryIdx: 0,
11259
12032
  stringEncoding: 'utf8',
11260
12033
  getMemoryFn: () => memory0,
11261
- getReallocFn: () => null,
12034
+ getReallocFn: undefined,
11262
12035
  importFn: _trampoline22,
11263
12036
  },
11264
12037
  )) : _lowerImportBackwardsCompat.bind(
@@ -11268,24 +12041,25 @@ null,
11268
12041
  componentIdx: 0,
11269
12042
  isAsync: false,
11270
12043
  isManualAsync: _trampoline22.manuallyAsync,
11271
- paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlink-follow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny],
12044
+ paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlinkFollow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny],
11272
12045
  resultLowerFns: [_lowerFlatResult([
11273
- [ 'ok', _lowerFlatRecord([['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 96, 8 ],['linkCount', _lowerFlatU64, 96, 8 ],['size', _lowerFlatU64, 96, 8 ],['dataAccessTimestamp', _lowerFlatOption([
12046
+ [ 'ok', _lowerFlatRecord({ fieldMetas: [['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 1, 1 ],['linkCount', _lowerFlatU64, 8, 8 ],['size', _lowerFlatU64, 8, 8 ],['dataAccessTimestamp', _lowerFlatOption([
11274
12047
  [ 'none', null, 24, 8, 8 ],
11275
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
12048
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11276
12049
  ])
11277
- , 96, 8 ],['dataModificationTimestamp', _lowerFlatOption([
12050
+ , 24, 8 ],['dataModificationTimestamp', _lowerFlatOption([
11278
12051
  [ 'none', null, 24, 8, 8 ],
11279
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
12052
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11280
12053
  ])
11281
- , 96, 8 ],['statusChangeTimestamp', _lowerFlatOption([
12054
+ , 24, 8 ],['statusChangeTimestamp', _lowerFlatOption([
11282
12055
  [ 'none', null, 24, 8, 8 ],
11283
- [ 'some', _lowerFlatRecord([['seconds', _lowerFlatU64, 16, 8 ],['nanoseconds', _lowerFlatU32, 16, 8 ],]), 24, 8, 8 ],
12056
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['seconds', _lowerFlatU64, 8, 8 ],['nanoseconds', _lowerFlatU32, 4, 4 ],], size32: 16, align32: 8 }), 24, 8, 8 ],
11284
12057
  ])
11285
- , 96, 8 ],]), 104, 8, 8 ],
12058
+ , 24, 8 ],], size32: 96, align32: 8 }), 104, 8, 8 ],
11286
12059
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 104, 8, 8 ],
11287
12060
  ])
11288
12061
  ],
12062
+ hasResultPointer: true,
11289
12063
  funcTypeIsAsync: false,
11290
12064
  getCallbackFn: () => null,
11291
12065
  getPostReturnFn: () => null,
@@ -11293,7 +12067,7 @@ null,
11293
12067
  memoryIdx: 0,
11294
12068
  stringEncoding: 'utf8',
11295
12069
  getMemoryFn: () => memory0,
11296
- getReallocFn: () => null,
12070
+ getReallocFn: undefined,
11297
12071
  importFn: _trampoline22,
11298
12072
  },
11299
12073
  );
@@ -11304,15 +12078,29 @@ null,
11304
12078
  componentIdx: 0,
11305
12079
  isAsync: false,
11306
12080
  isManualAsync: _trampoline23.manuallyAsync,
11307
- paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlink-follow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny,_liftFlatFlags({ names: ['create','directory','exclusive','truncate'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatFlags({ names: ['read','write','file-integrity-sync','data-integrity-sync','requested-write-sync','mutate-directory'], size32: 1, align32: 1, intSizeBytes: 1 })],
12081
+ paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlinkFollow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny,_liftFlatFlags({ names: ['create','directory','exclusive','truncate'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatFlags({ names: ['read','write','fileIntegritySync','dataIntegritySync','requestedWriteSync','mutateDirectory'], size32: 1, align32: 1, intSizeBytes: 1 })],
11308
12082
  resultLowerFns: [_lowerFlatResult([
11309
12083
  [ 'ok', _lowerFlatOwn({
11310
12084
  componentIdx: 0,
11311
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12085
+ lowerFn:
12086
+ function lowerImportedOwnedHost_Descriptor(obj) {
12087
+ if (!(obj instanceof Descriptor)) {
12088
+ throw new TypeError('Resource error: Not a valid \"Descriptor\" resource.');
12089
+ }
12090
+ let handle = obj[symbolRscHandle];
12091
+ if (!handle) {
12092
+ const rep = obj[symbolRscRep] || ++captureCnt6;
12093
+ captureTable6.set(rep, obj);
12094
+ handle = rscTableCreateOwn(handleTable6, rep);
12095
+ }
12096
+ return handle;
12097
+ }
12098
+ ,
11312
12099
  }), 8, 4, 4 ],
11313
12100
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 8, 4, 4 ],
11314
12101
  ])
11315
12102
  ],
12103
+ hasResultPointer: true,
11316
12104
  funcTypeIsAsync: false,
11317
12105
  getCallbackFn: () => null,
11318
12106
  getPostReturnFn: () => null,
@@ -11320,7 +12108,7 @@ null,
11320
12108
  memoryIdx: 0,
11321
12109
  stringEncoding: 'utf8',
11322
12110
  getMemoryFn: () => memory0,
11323
- getReallocFn: () => null,
12111
+ getReallocFn: undefined,
11324
12112
  importFn: _trampoline23,
11325
12113
  },
11326
12114
  )) : _lowerImportBackwardsCompat.bind(
@@ -11330,15 +12118,29 @@ null,
11330
12118
  componentIdx: 0,
11331
12119
  isAsync: false,
11332
12120
  isManualAsync: _trampoline23.manuallyAsync,
11333
- paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlink-follow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny,_liftFlatFlags({ names: ['create','directory','exclusive','truncate'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatFlags({ names: ['read','write','file-integrity-sync','data-integrity-sync','requested-write-sync','mutate-directory'], size32: 1, align32: 1, intSizeBytes: 1 })],
12121
+ paramLiftFns: [_liftFlatBorrow.bind(null, 6),_liftFlatFlags({ names: ['symlinkFollow'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatStringAny,_liftFlatFlags({ names: ['create','directory','exclusive','truncate'], size32: 1, align32: 1, intSizeBytes: 1 }),_liftFlatFlags({ names: ['read','write','fileIntegritySync','dataIntegritySync','requestedWriteSync','mutateDirectory'], size32: 1, align32: 1, intSizeBytes: 1 })],
11334
12122
  resultLowerFns: [_lowerFlatResult([
11335
12123
  [ 'ok', _lowerFlatOwn({
11336
12124
  componentIdx: 0,
11337
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12125
+ lowerFn:
12126
+ function lowerImportedOwnedHost_Descriptor(obj) {
12127
+ if (!(obj instanceof Descriptor)) {
12128
+ throw new TypeError('Resource error: Not a valid \"Descriptor\" resource.');
12129
+ }
12130
+ let handle = obj[symbolRscHandle];
12131
+ if (!handle) {
12132
+ const rep = obj[symbolRscRep] || ++captureCnt6;
12133
+ captureTable6.set(rep, obj);
12134
+ handle = rscTableCreateOwn(handleTable6, rep);
12135
+ }
12136
+ return handle;
12137
+ }
12138
+ ,
11338
12139
  }), 8, 4, 4 ],
11339
12140
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 8, 4, 4 ],
11340
12141
  ])
11341
12142
  ],
12143
+ hasResultPointer: true,
11342
12144
  funcTypeIsAsync: false,
11343
12145
  getCallbackFn: () => null,
11344
12146
  getPostReturnFn: () => null,
@@ -11346,7 +12148,7 @@ null,
11346
12148
  memoryIdx: 0,
11347
12149
  stringEncoding: 'utf8',
11348
12150
  getMemoryFn: () => memory0,
11349
- getReallocFn: () => null,
12151
+ getReallocFn: undefined,
11350
12152
  importFn: _trampoline23,
11351
12153
  },
11352
12154
  );
@@ -11361,12 +12163,13 @@ null,
11361
12163
  resultLowerFns: [_lowerFlatResult([
11362
12164
  [ 'ok', _lowerFlatOption([
11363
12165
  [ 'none', null, 16, 4, 4 ],
11364
- [ 'some', _lowerFlatRecord([['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 12, 4 ],['name', _lowerFlatStringAny, 12, 4 ],]), 16, 4, 4 ],
12166
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 1, 1 ],['name', _lowerFlatStringAny, 8, 4 ],], size32: 12, align32: 4 }), 16, 4, 4 ],
11365
12167
  ])
11366
12168
  , 20, 4, 4 ],
11367
12169
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 20, 4, 4 ],
11368
12170
  ])
11369
12171
  ],
12172
+ hasResultPointer: true,
11370
12173
  funcTypeIsAsync: false,
11371
12174
  getCallbackFn: () => null,
11372
12175
  getPostReturnFn: () => null,
@@ -11388,12 +12191,13 @@ null,
11388
12191
  resultLowerFns: [_lowerFlatResult([
11389
12192
  [ 'ok', _lowerFlatOption([
11390
12193
  [ 'none', null, 16, 4, 4 ],
11391
- [ 'some', _lowerFlatRecord([['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 12, 4 ],['name', _lowerFlatStringAny, 12, 4 ],]), 16, 4, 4 ],
12194
+ [ 'some', _lowerFlatRecord({ fieldMetas: [['type', _lowerFlatEnum([['unknown', null, 1, 1, 1],['block-device', null, 1, 1, 1],['character-device', null, 1, 1, 1],['directory', null, 1, 1, 1],['fifo', null, 1, 1, 1],['symbolic-link', null, 1, 1, 1],['regular-file', null, 1, 1, 1],['socket', null, 1, 1, 1],]), 1, 1 ],['name', _lowerFlatStringAny, 8, 4 ],], size32: 12, align32: 4 }), 16, 4, 4 ],
11392
12195
  ])
11393
12196
  , 20, 4, 4 ],
11394
12197
  [ 'err', _lowerFlatEnum([['access', null, 1, 1, 1],['would-block', null, 1, 1, 1],['already', null, 1, 1, 1],['bad-descriptor', null, 1, 1, 1],['busy', null, 1, 1, 1],['deadlock', null, 1, 1, 1],['quota', null, 1, 1, 1],['exist', null, 1, 1, 1],['file-too-large', null, 1, 1, 1],['illegal-byte-sequence', null, 1, 1, 1],['in-progress', null, 1, 1, 1],['interrupted', null, 1, 1, 1],['invalid', null, 1, 1, 1],['io', null, 1, 1, 1],['is-directory', null, 1, 1, 1],['loop', null, 1, 1, 1],['too-many-links', null, 1, 1, 1],['message-size', null, 1, 1, 1],['name-too-long', null, 1, 1, 1],['no-device', null, 1, 1, 1],['no-entry', null, 1, 1, 1],['no-lock', null, 1, 1, 1],['insufficient-memory', null, 1, 1, 1],['insufficient-space', null, 1, 1, 1],['not-directory', null, 1, 1, 1],['not-empty', null, 1, 1, 1],['not-recoverable', null, 1, 1, 1],['unsupported', null, 1, 1, 1],['no-tty', null, 1, 1, 1],['no-such-device', null, 1, 1, 1],['overflow', null, 1, 1, 1],['not-permitted', null, 1, 1, 1],['pipe', null, 1, 1, 1],['read-only', null, 1, 1, 1],['invalid-seek', null, 1, 1, 1],['text-file-busy', null, 1, 1, 1],['cross-device', null, 1, 1, 1],]), 20, 4, 4 ],
11395
12198
  ])
11396
12199
  ],
12200
+ hasResultPointer: true,
11397
12201
  funcTypeIsAsync: false,
11398
12202
  getCallbackFn: () => null,
11399
12203
  getPostReturnFn: () => null,
@@ -11421,10 +12225,24 @@ null,
11421
12225
  }), 12, 4, 4 ],
11422
12226
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11423
12227
  componentIdx: 0,
11424
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12228
+ lowerFn:
12229
+ function lowerImportedOwnedHost_Error$1(obj) {
12230
+ if (!(obj instanceof Error$1)) {
12231
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12232
+ }
12233
+ let handle = obj[symbolRscHandle];
12234
+ if (!handle) {
12235
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12236
+ captureTable0.set(rep, obj);
12237
+ handle = rscTableCreateOwn(handleTable0, rep);
12238
+ }
12239
+ return handle;
12240
+ }
12241
+ ,
11425
12242
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 12, 4, 4 ],
11426
12243
  ])
11427
12244
  ],
12245
+ hasResultPointer: true,
11428
12246
  funcTypeIsAsync: false,
11429
12247
  getCallbackFn: () => null,
11430
12248
  getPostReturnFn: () => null,
@@ -11451,10 +12269,24 @@ null,
11451
12269
  }), 12, 4, 4 ],
11452
12270
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11453
12271
  componentIdx: 0,
11454
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12272
+ lowerFn:
12273
+ function lowerImportedOwnedHost_Error$1(obj) {
12274
+ if (!(obj instanceof Error$1)) {
12275
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12276
+ }
12277
+ let handle = obj[symbolRscHandle];
12278
+ if (!handle) {
12279
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12280
+ captureTable0.set(rep, obj);
12281
+ handle = rscTableCreateOwn(handleTable0, rep);
12282
+ }
12283
+ return handle;
12284
+ }
12285
+ ,
11455
12286
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 12, 4, 4 ],
11456
12287
  ])
11457
12288
  ],
12289
+ hasResultPointer: true,
11458
12290
  funcTypeIsAsync: false,
11459
12291
  getCallbackFn: () => null,
11460
12292
  getPostReturnFn: () => null,
@@ -11482,10 +12314,24 @@ null,
11482
12314
  }), 12, 4, 4 ],
11483
12315
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11484
12316
  componentIdx: 0,
11485
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12317
+ lowerFn:
12318
+ function lowerImportedOwnedHost_Error$1(obj) {
12319
+ if (!(obj instanceof Error$1)) {
12320
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12321
+ }
12322
+ let handle = obj[symbolRscHandle];
12323
+ if (!handle) {
12324
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12325
+ captureTable0.set(rep, obj);
12326
+ handle = rscTableCreateOwn(handleTable0, rep);
12327
+ }
12328
+ return handle;
12329
+ }
12330
+ ,
11486
12331
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 12, 4, 4 ],
11487
12332
  ])
11488
12333
  ],
12334
+ hasResultPointer: true,
11489
12335
  funcTypeIsAsync: false,
11490
12336
  getCallbackFn: () => null,
11491
12337
  getPostReturnFn: () => null,
@@ -11512,10 +12358,24 @@ null,
11512
12358
  }), 12, 4, 4 ],
11513
12359
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11514
12360
  componentIdx: 0,
11515
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12361
+ lowerFn:
12362
+ function lowerImportedOwnedHost_Error$1(obj) {
12363
+ if (!(obj instanceof Error$1)) {
12364
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12365
+ }
12366
+ let handle = obj[symbolRscHandle];
12367
+ if (!handle) {
12368
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12369
+ captureTable0.set(rep, obj);
12370
+ handle = rscTableCreateOwn(handleTable0, rep);
12371
+ }
12372
+ return handle;
12373
+ }
12374
+ ,
11516
12375
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 12, 4, 4 ],
11517
12376
  ])
11518
12377
  ],
12378
+ hasResultPointer: true,
11519
12379
  funcTypeIsAsync: false,
11520
12380
  getCallbackFn: () => null,
11521
12381
  getPostReturnFn: () => null,
@@ -11539,10 +12399,24 @@ null,
11539
12399
  [ 'ok', _lowerFlatU64, 16, 8, 8 ],
11540
12400
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11541
12401
  componentIdx: 0,
11542
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12402
+ lowerFn:
12403
+ function lowerImportedOwnedHost_Error$1(obj) {
12404
+ if (!(obj instanceof Error$1)) {
12405
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12406
+ }
12407
+ let handle = obj[symbolRscHandle];
12408
+ if (!handle) {
12409
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12410
+ captureTable0.set(rep, obj);
12411
+ handle = rscTableCreateOwn(handleTable0, rep);
12412
+ }
12413
+ return handle;
12414
+ }
12415
+ ,
11543
12416
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 16, 8, 8 ],
11544
12417
  ])
11545
12418
  ],
12419
+ hasResultPointer: true,
11546
12420
  funcTypeIsAsync: false,
11547
12421
  getCallbackFn: () => null,
11548
12422
  getPostReturnFn: () => null,
@@ -11550,7 +12424,7 @@ null,
11550
12424
  memoryIdx: 0,
11551
12425
  stringEncoding: 'utf8',
11552
12426
  getMemoryFn: () => memory0,
11553
- getReallocFn: () => null,
12427
+ getReallocFn: undefined,
11554
12428
  importFn: _trampoline27,
11555
12429
  },
11556
12430
  )) : _lowerImportBackwardsCompat.bind(
@@ -11565,10 +12439,24 @@ null,
11565
12439
  [ 'ok', _lowerFlatU64, 16, 8, 8 ],
11566
12440
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11567
12441
  componentIdx: 0,
11568
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12442
+ lowerFn:
12443
+ function lowerImportedOwnedHost_Error$1(obj) {
12444
+ if (!(obj instanceof Error$1)) {
12445
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12446
+ }
12447
+ let handle = obj[symbolRscHandle];
12448
+ if (!handle) {
12449
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12450
+ captureTable0.set(rep, obj);
12451
+ handle = rscTableCreateOwn(handleTable0, rep);
12452
+ }
12453
+ return handle;
12454
+ }
12455
+ ,
11569
12456
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 16, 8, 8 ],
11570
12457
  ])
11571
12458
  ],
12459
+ hasResultPointer: true,
11572
12460
  funcTypeIsAsync: false,
11573
12461
  getCallbackFn: () => null,
11574
12462
  getPostReturnFn: () => null,
@@ -11576,7 +12464,7 @@ null,
11576
12464
  memoryIdx: 0,
11577
12465
  stringEncoding: 'utf8',
11578
12466
  getMemoryFn: () => memory0,
11579
- getReallocFn: () => null,
12467
+ getReallocFn: undefined,
11580
12468
  importFn: _trampoline27,
11581
12469
  },
11582
12470
  );
@@ -11591,15 +12479,30 @@ null,
11591
12479
  elemLiftFn: _liftFlatU8,
11592
12480
  elemAlign32: 1,
11593
12481
  elemSize32: 1,
12482
+ typedArray: Uint8Array,
11594
12483
  })],
11595
12484
  resultLowerFns: [_lowerFlatResult([
11596
12485
  [ 'ok', null, 12, 4, 4 ],
11597
12486
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11598
12487
  componentIdx: 0,
11599
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12488
+ lowerFn:
12489
+ function lowerImportedOwnedHost_Error$1(obj) {
12490
+ if (!(obj instanceof Error$1)) {
12491
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12492
+ }
12493
+ let handle = obj[symbolRscHandle];
12494
+ if (!handle) {
12495
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12496
+ captureTable0.set(rep, obj);
12497
+ handle = rscTableCreateOwn(handleTable0, rep);
12498
+ }
12499
+ return handle;
12500
+ }
12501
+ ,
11600
12502
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 12, 4, 4 ],
11601
12503
  ])
11602
12504
  ],
12505
+ hasResultPointer: true,
11603
12506
  funcTypeIsAsync: false,
11604
12507
  getCallbackFn: () => null,
11605
12508
  getPostReturnFn: () => null,
@@ -11607,7 +12510,7 @@ null,
11607
12510
  memoryIdx: 0,
11608
12511
  stringEncoding: 'utf8',
11609
12512
  getMemoryFn: () => memory0,
11610
- getReallocFn: () => null,
12513
+ getReallocFn: undefined,
11611
12514
  importFn: _trampoline28,
11612
12515
  },
11613
12516
  )) : _lowerImportBackwardsCompat.bind(
@@ -11621,15 +12524,30 @@ null,
11621
12524
  elemLiftFn: _liftFlatU8,
11622
12525
  elemAlign32: 1,
11623
12526
  elemSize32: 1,
12527
+ typedArray: Uint8Array,
11624
12528
  })],
11625
12529
  resultLowerFns: [_lowerFlatResult([
11626
12530
  [ 'ok', null, 12, 4, 4 ],
11627
12531
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11628
12532
  componentIdx: 0,
11629
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12533
+ lowerFn:
12534
+ function lowerImportedOwnedHost_Error$1(obj) {
12535
+ if (!(obj instanceof Error$1)) {
12536
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12537
+ }
12538
+ let handle = obj[symbolRscHandle];
12539
+ if (!handle) {
12540
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12541
+ captureTable0.set(rep, obj);
12542
+ handle = rscTableCreateOwn(handleTable0, rep);
12543
+ }
12544
+ return handle;
12545
+ }
12546
+ ,
11630
12547
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 12, 4, 4 ],
11631
12548
  ])
11632
12549
  ],
12550
+ hasResultPointer: true,
11633
12551
  funcTypeIsAsync: false,
11634
12552
  getCallbackFn: () => null,
11635
12553
  getPostReturnFn: () => null,
@@ -11637,7 +12555,7 @@ null,
11637
12555
  memoryIdx: 0,
11638
12556
  stringEncoding: 'utf8',
11639
12557
  getMemoryFn: () => memory0,
11640
- getReallocFn: () => null,
12558
+ getReallocFn: undefined,
11641
12559
  importFn: _trampoline28,
11642
12560
  },
11643
12561
  );
@@ -11652,15 +12570,30 @@ null,
11652
12570
  elemLiftFn: _liftFlatU8,
11653
12571
  elemAlign32: 1,
11654
12572
  elemSize32: 1,
12573
+ typedArray: Uint8Array,
11655
12574
  })],
11656
12575
  resultLowerFns: [_lowerFlatResult([
11657
12576
  [ 'ok', null, 12, 4, 4 ],
11658
12577
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11659
12578
  componentIdx: 0,
11660
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12579
+ lowerFn:
12580
+ function lowerImportedOwnedHost_Error$1(obj) {
12581
+ if (!(obj instanceof Error$1)) {
12582
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12583
+ }
12584
+ let handle = obj[symbolRscHandle];
12585
+ if (!handle) {
12586
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12587
+ captureTable0.set(rep, obj);
12588
+ handle = rscTableCreateOwn(handleTable0, rep);
12589
+ }
12590
+ return handle;
12591
+ }
12592
+ ,
11661
12593
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 12, 4, 4 ],
11662
12594
  ])
11663
12595
  ],
12596
+ hasResultPointer: true,
11664
12597
  funcTypeIsAsync: false,
11665
12598
  getCallbackFn: () => null,
11666
12599
  getPostReturnFn: () => null,
@@ -11668,7 +12601,7 @@ null,
11668
12601
  memoryIdx: 0,
11669
12602
  stringEncoding: 'utf8',
11670
12603
  getMemoryFn: () => memory0,
11671
- getReallocFn: () => null,
12604
+ getReallocFn: undefined,
11672
12605
  importFn: _trampoline29,
11673
12606
  },
11674
12607
  )) : _lowerImportBackwardsCompat.bind(
@@ -11682,15 +12615,30 @@ null,
11682
12615
  elemLiftFn: _liftFlatU8,
11683
12616
  elemAlign32: 1,
11684
12617
  elemSize32: 1,
12618
+ typedArray: Uint8Array,
11685
12619
  })],
11686
12620
  resultLowerFns: [_lowerFlatResult([
11687
12621
  [ 'ok', null, 12, 4, 4 ],
11688
12622
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11689
12623
  componentIdx: 0,
11690
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12624
+ lowerFn:
12625
+ function lowerImportedOwnedHost_Error$1(obj) {
12626
+ if (!(obj instanceof Error$1)) {
12627
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12628
+ }
12629
+ let handle = obj[symbolRscHandle];
12630
+ if (!handle) {
12631
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12632
+ captureTable0.set(rep, obj);
12633
+ handle = rscTableCreateOwn(handleTable0, rep);
12634
+ }
12635
+ return handle;
12636
+ }
12637
+ ,
11691
12638
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 12, 4, 4 ],
11692
12639
  ])
11693
12640
  ],
12641
+ hasResultPointer: true,
11694
12642
  funcTypeIsAsync: false,
11695
12643
  getCallbackFn: () => null,
11696
12644
  getPostReturnFn: () => null,
@@ -11698,7 +12646,7 @@ null,
11698
12646
  memoryIdx: 0,
11699
12647
  stringEncoding: 'utf8',
11700
12648
  getMemoryFn: () => memory0,
11701
- getReallocFn: () => null,
12649
+ getReallocFn: undefined,
11702
12650
  importFn: _trampoline29,
11703
12651
  },
11704
12652
  );
@@ -11714,10 +12662,24 @@ null,
11714
12662
  [ 'ok', null, 12, 4, 4 ],
11715
12663
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11716
12664
  componentIdx: 0,
11717
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12665
+ lowerFn:
12666
+ function lowerImportedOwnedHost_Error$1(obj) {
12667
+ if (!(obj instanceof Error$1)) {
12668
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12669
+ }
12670
+ let handle = obj[symbolRscHandle];
12671
+ if (!handle) {
12672
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12673
+ captureTable0.set(rep, obj);
12674
+ handle = rscTableCreateOwn(handleTable0, rep);
12675
+ }
12676
+ return handle;
12677
+ }
12678
+ ,
11718
12679
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 12, 4, 4 ],
11719
12680
  ])
11720
12681
  ],
12682
+ hasResultPointer: true,
11721
12683
  funcTypeIsAsync: false,
11722
12684
  getCallbackFn: () => null,
11723
12685
  getPostReturnFn: () => null,
@@ -11725,7 +12687,7 @@ null,
11725
12687
  memoryIdx: 0,
11726
12688
  stringEncoding: 'utf8',
11727
12689
  getMemoryFn: () => memory0,
11728
- getReallocFn: () => null,
12690
+ getReallocFn: undefined,
11729
12691
  importFn: _trampoline30,
11730
12692
  },
11731
12693
  )) : _lowerImportBackwardsCompat.bind(
@@ -11740,10 +12702,24 @@ null,
11740
12702
  [ 'ok', null, 12, 4, 4 ],
11741
12703
  [ 'err', _lowerFlatVariant([[ 'last-operation-failed', _lowerFlatOwn({
11742
12704
  componentIdx: 0,
11743
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12705
+ lowerFn:
12706
+ function lowerImportedOwnedHost_Error$1(obj) {
12707
+ if (!(obj instanceof Error$1)) {
12708
+ throw new TypeError('Resource error: Not a valid \"Error$1\" resource.');
12709
+ }
12710
+ let handle = obj[symbolRscHandle];
12711
+ if (!handle) {
12712
+ const rep = obj[symbolRscRep] || ++captureCnt0;
12713
+ captureTable0.set(rep, obj);
12714
+ handle = rscTableCreateOwn(handleTable0, rep);
12715
+ }
12716
+ return handle;
12717
+ }
12718
+ ,
11744
12719
  }), 8, 4, 4 ],[ 'closed', null, 8, 4, 4 ],]), 12, 4, 4 ],
11745
12720
  ])
11746
12721
  ],
12722
+ hasResultPointer: true,
11747
12723
  funcTypeIsAsync: false,
11748
12724
  getCallbackFn: () => null,
11749
12725
  getPostReturnFn: () => null,
@@ -11751,7 +12727,7 @@ null,
11751
12727
  memoryIdx: 0,
11752
12728
  stringEncoding: 'utf8',
11753
12729
  getMemoryFn: () => memory0,
11754
- getReallocFn: () => null,
12730
+ getReallocFn: undefined,
11755
12731
  importFn: _trampoline30,
11756
12732
  },
11757
12733
  );
@@ -11768,6 +12744,7 @@ null,
11768
12744
  elemSize32: 1,
11769
12745
  elemAlign32: 1,
11770
12746
  })],
12747
+ hasResultPointer: true,
11771
12748
  funcTypeIsAsync: false,
11772
12749
  getCallbackFn: () => null,
11773
12750
  getPostReturnFn: () => null,
@@ -11791,6 +12768,7 @@ null,
11791
12768
  elemSize32: 1,
11792
12769
  elemAlign32: 1,
11793
12770
  })],
12771
+ hasResultPointer: true,
11794
12772
  funcTypeIsAsync: false,
11795
12773
  getCallbackFn: () => null,
11796
12774
  getPostReturnFn: () => null,
@@ -11811,13 +12789,27 @@ null,
11811
12789
  isManualAsync: _trampoline32.manuallyAsync,
11812
12790
  paramLiftFns: [],
11813
12791
  resultLowerFns: [_lowerFlatList({
11814
- elemLowerFn: _lowerFlatTuple([[_lowerFlatOwn({
12792
+ elemLowerFn: _lowerFlatTuple({ elemLowerMetas: [[_lowerFlatOwn({
11815
12793
  componentIdx: 0,
11816
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11817
- }), 12, 4],[_lowerFlatStringAny, 12, 4],]),
12794
+ lowerFn:
12795
+ function lowerImportedOwnedHost_Descriptor(obj) {
12796
+ if (!(obj instanceof Descriptor)) {
12797
+ throw new TypeError('Resource error: Not a valid \"Descriptor\" resource.');
12798
+ }
12799
+ let handle = obj[symbolRscHandle];
12800
+ if (!handle) {
12801
+ const rep = obj[symbolRscRep] || ++captureCnt6;
12802
+ captureTable6.set(rep, obj);
12803
+ handle = rscTableCreateOwn(handleTable6, rep);
12804
+ }
12805
+ return handle;
12806
+ }
12807
+ ,
12808
+ }), 4, 4],[_lowerFlatStringAny, 8, 4],], size32: 12, align32: 4 }),
11818
12809
  elemSize32: 12,
11819
12810
  elemAlign32: 4,
11820
12811
  })],
12812
+ hasResultPointer: true,
11821
12813
  funcTypeIsAsync: false,
11822
12814
  getCallbackFn: () => null,
11823
12815
  getPostReturnFn: () => null,
@@ -11837,13 +12829,27 @@ null,
11837
12829
  isManualAsync: _trampoline32.manuallyAsync,
11838
12830
  paramLiftFns: [],
11839
12831
  resultLowerFns: [_lowerFlatList({
11840
- elemLowerFn: _lowerFlatTuple([[_lowerFlatOwn({
12832
+ elemLowerFn: _lowerFlatTuple({ elemLowerMetas: [[_lowerFlatOwn({
11841
12833
  componentIdx: 0,
11842
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
11843
- }), 12, 4],[_lowerFlatStringAny, 12, 4],]),
12834
+ lowerFn:
12835
+ function lowerImportedOwnedHost_Descriptor(obj) {
12836
+ if (!(obj instanceof Descriptor)) {
12837
+ throw new TypeError('Resource error: Not a valid \"Descriptor\" resource.');
12838
+ }
12839
+ let handle = obj[symbolRscHandle];
12840
+ if (!handle) {
12841
+ const rep = obj[symbolRscRep] || ++captureCnt6;
12842
+ captureTable6.set(rep, obj);
12843
+ handle = rscTableCreateOwn(handleTable6, rep);
12844
+ }
12845
+ return handle;
12846
+ }
12847
+ ,
12848
+ }), 4, 4],[_lowerFlatStringAny, 8, 4],], size32: 12, align32: 4 }),
11844
12849
  elemSize32: 12,
11845
12850
  elemAlign32: 4,
11846
12851
  })],
12852
+ hasResultPointer: true,
11847
12853
  funcTypeIsAsync: false,
11848
12854
  getCallbackFn: () => null,
11849
12855
  getPostReturnFn: () => null,
@@ -11867,10 +12873,24 @@ null,
11867
12873
  [ 'none', null, 8, 4, 4 ],
11868
12874
  [ 'some', _lowerFlatOwn({
11869
12875
  componentIdx: 0,
11870
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12876
+ lowerFn:
12877
+ function lowerImportedOwnedHost_TerminalInput(obj) {
12878
+ if (!(obj instanceof TerminalInput)) {
12879
+ throw new TypeError('Resource error: Not a valid \"TerminalInput\" resource.');
12880
+ }
12881
+ let handle = obj[symbolRscHandle];
12882
+ if (!handle) {
12883
+ const rep = obj[symbolRscRep] || ++captureCnt3;
12884
+ captureTable3.set(rep, obj);
12885
+ handle = rscTableCreateOwn(handleTable3, rep);
12886
+ }
12887
+ return handle;
12888
+ }
12889
+ ,
11871
12890
  }), 8, 4, 4 ],
11872
12891
  ])
11873
12892
  ],
12893
+ hasResultPointer: true,
11874
12894
  funcTypeIsAsync: false,
11875
12895
  getCallbackFn: () => null,
11876
12896
  getPostReturnFn: () => null,
@@ -11878,7 +12898,7 @@ null,
11878
12898
  memoryIdx: 0,
11879
12899
  stringEncoding: 'utf8',
11880
12900
  getMemoryFn: () => memory0,
11881
- getReallocFn: () => null,
12901
+ getReallocFn: undefined,
11882
12902
  importFn: _trampoline33,
11883
12903
  },
11884
12904
  )) : _lowerImportBackwardsCompat.bind(
@@ -11893,10 +12913,24 @@ null,
11893
12913
  [ 'none', null, 8, 4, 4 ],
11894
12914
  [ 'some', _lowerFlatOwn({
11895
12915
  componentIdx: 0,
11896
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12916
+ lowerFn:
12917
+ function lowerImportedOwnedHost_TerminalInput(obj) {
12918
+ if (!(obj instanceof TerminalInput)) {
12919
+ throw new TypeError('Resource error: Not a valid \"TerminalInput\" resource.');
12920
+ }
12921
+ let handle = obj[symbolRscHandle];
12922
+ if (!handle) {
12923
+ const rep = obj[symbolRscRep] || ++captureCnt3;
12924
+ captureTable3.set(rep, obj);
12925
+ handle = rscTableCreateOwn(handleTable3, rep);
12926
+ }
12927
+ return handle;
12928
+ }
12929
+ ,
11897
12930
  }), 8, 4, 4 ],
11898
12931
  ])
11899
12932
  ],
12933
+ hasResultPointer: true,
11900
12934
  funcTypeIsAsync: false,
11901
12935
  getCallbackFn: () => null,
11902
12936
  getPostReturnFn: () => null,
@@ -11904,7 +12938,7 @@ null,
11904
12938
  memoryIdx: 0,
11905
12939
  stringEncoding: 'utf8',
11906
12940
  getMemoryFn: () => memory0,
11907
- getReallocFn: () => null,
12941
+ getReallocFn: undefined,
11908
12942
  importFn: _trampoline33,
11909
12943
  },
11910
12944
  );
@@ -11920,10 +12954,24 @@ null,
11920
12954
  [ 'none', null, 8, 4, 4 ],
11921
12955
  [ 'some', _lowerFlatOwn({
11922
12956
  componentIdx: 0,
11923
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12957
+ lowerFn:
12958
+ function lowerImportedOwnedHost_TerminalOutput(obj) {
12959
+ if (!(obj instanceof TerminalOutput)) {
12960
+ throw new TypeError('Resource error: Not a valid \"TerminalOutput\" resource.');
12961
+ }
12962
+ let handle = obj[symbolRscHandle];
12963
+ if (!handle) {
12964
+ const rep = obj[symbolRscRep] || ++captureCnt4;
12965
+ captureTable4.set(rep, obj);
12966
+ handle = rscTableCreateOwn(handleTable4, rep);
12967
+ }
12968
+ return handle;
12969
+ }
12970
+ ,
11924
12971
  }), 8, 4, 4 ],
11925
12972
  ])
11926
12973
  ],
12974
+ hasResultPointer: true,
11927
12975
  funcTypeIsAsync: false,
11928
12976
  getCallbackFn: () => null,
11929
12977
  getPostReturnFn: () => null,
@@ -11931,7 +12979,7 @@ null,
11931
12979
  memoryIdx: 0,
11932
12980
  stringEncoding: 'utf8',
11933
12981
  getMemoryFn: () => memory0,
11934
- getReallocFn: () => null,
12982
+ getReallocFn: undefined,
11935
12983
  importFn: _trampoline34,
11936
12984
  },
11937
12985
  )) : _lowerImportBackwardsCompat.bind(
@@ -11946,10 +12994,24 @@ null,
11946
12994
  [ 'none', null, 8, 4, 4 ],
11947
12995
  [ 'some', _lowerFlatOwn({
11948
12996
  componentIdx: 0,
11949
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
12997
+ lowerFn:
12998
+ function lowerImportedOwnedHost_TerminalOutput(obj) {
12999
+ if (!(obj instanceof TerminalOutput)) {
13000
+ throw new TypeError('Resource error: Not a valid \"TerminalOutput\" resource.');
13001
+ }
13002
+ let handle = obj[symbolRscHandle];
13003
+ if (!handle) {
13004
+ const rep = obj[symbolRscRep] || ++captureCnt4;
13005
+ captureTable4.set(rep, obj);
13006
+ handle = rscTableCreateOwn(handleTable4, rep);
13007
+ }
13008
+ return handle;
13009
+ }
13010
+ ,
11950
13011
  }), 8, 4, 4 ],
11951
13012
  ])
11952
13013
  ],
13014
+ hasResultPointer: true,
11953
13015
  funcTypeIsAsync: false,
11954
13016
  getCallbackFn: () => null,
11955
13017
  getPostReturnFn: () => null,
@@ -11957,7 +13019,7 @@ null,
11957
13019
  memoryIdx: 0,
11958
13020
  stringEncoding: 'utf8',
11959
13021
  getMemoryFn: () => memory0,
11960
- getReallocFn: () => null,
13022
+ getReallocFn: undefined,
11961
13023
  importFn: _trampoline34,
11962
13024
  },
11963
13025
  );
@@ -11973,10 +13035,24 @@ null,
11973
13035
  [ 'none', null, 8, 4, 4 ],
11974
13036
  [ 'some', _lowerFlatOwn({
11975
13037
  componentIdx: 0,
11976
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
13038
+ lowerFn:
13039
+ function lowerImportedOwnedHost_TerminalOutput(obj) {
13040
+ if (!(obj instanceof TerminalOutput)) {
13041
+ throw new TypeError('Resource error: Not a valid \"TerminalOutput\" resource.');
13042
+ }
13043
+ let handle = obj[symbolRscHandle];
13044
+ if (!handle) {
13045
+ const rep = obj[symbolRscRep] || ++captureCnt4;
13046
+ captureTable4.set(rep, obj);
13047
+ handle = rscTableCreateOwn(handleTable4, rep);
13048
+ }
13049
+ return handle;
13050
+ }
13051
+ ,
11977
13052
  }), 8, 4, 4 ],
11978
13053
  ])
11979
13054
  ],
13055
+ hasResultPointer: true,
11980
13056
  funcTypeIsAsync: false,
11981
13057
  getCallbackFn: () => null,
11982
13058
  getPostReturnFn: () => null,
@@ -11984,7 +13060,7 @@ null,
11984
13060
  memoryIdx: 0,
11985
13061
  stringEncoding: 'utf8',
11986
13062
  getMemoryFn: () => memory0,
11987
- getReallocFn: () => null,
13063
+ getReallocFn: undefined,
11988
13064
  importFn: _trampoline35,
11989
13065
  },
11990
13066
  )) : _lowerImportBackwardsCompat.bind(
@@ -11999,10 +13075,24 @@ null,
11999
13075
  [ 'none', null, 8, 4, 4 ],
12000
13076
  [ 'some', _lowerFlatOwn({
12001
13077
  componentIdx: 0,
12002
- lowerFn: () => { throw new Error('missing/invalid resource metadata'); }
13078
+ lowerFn:
13079
+ function lowerImportedOwnedHost_TerminalOutput(obj) {
13080
+ if (!(obj instanceof TerminalOutput)) {
13081
+ throw new TypeError('Resource error: Not a valid \"TerminalOutput\" resource.');
13082
+ }
13083
+ let handle = obj[symbolRscHandle];
13084
+ if (!handle) {
13085
+ const rep = obj[symbolRscRep] || ++captureCnt4;
13086
+ captureTable4.set(rep, obj);
13087
+ handle = rscTableCreateOwn(handleTable4, rep);
13088
+ }
13089
+ return handle;
13090
+ }
13091
+ ,
12003
13092
  }), 8, 4, 4 ],
12004
13093
  ])
12005
13094
  ],
13095
+ hasResultPointer: true,
12006
13096
  funcTypeIsAsync: false,
12007
13097
  getCallbackFn: () => null,
12008
13098
  getPostReturnFn: () => null,
@@ -12010,7 +13100,7 @@ null,
12010
13100
  memoryIdx: 0,
12011
13101
  stringEncoding: 'utf8',
12012
13102
  getMemoryFn: () => memory0,
12013
- getReallocFn: () => null,
13103
+ getReallocFn: undefined,
12014
13104
  importFn: _trampoline35,
12015
13105
  },
12016
13106
  );