unwasm 0.3.9 → 0.3.10
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/README.md +6 -3
- package/dist/plugin.cjs +101 -70
- package/dist/plugin.d.cts +5 -2
- package/dist/plugin.d.mts +3 -2
- package/dist/plugin.d.ts +5 -2
- package/dist/plugin.mjs +101 -70
- package/dist/tools.cjs +358 -334
- package/dist/tools.d.cts +2 -1
- package/dist/tools.d.mts +2 -1
- package/dist/tools.d.ts +2 -1
- package/dist/tools.mjs +358 -334
- package/package.json +33 -33
package/dist/tools.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
// webassemblyjs (MIT) - Copyright (c) 2018 Sven Sauleau <sven@sauleau.com>
|
|
4
|
-
|
|
5
3
|
var __create = Object.create;
|
|
6
4
|
var __defProp = Object.defineProperty;
|
|
7
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -24,13 +22,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
22
|
// file that has been converted to a CommonJS file using a Babel-
|
|
25
23
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
24
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
|
|
25
|
+
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
28
26
|
mod
|
|
29
27
|
));
|
|
30
|
-
|
|
31
|
-
// node_modules/.pnpm/@webassemblyjs+helper-api-error@1.11.6/node_modules/@webassemblyjs/helper-api-error/lib/index.js
|
|
32
28
|
var require_lib = __commonJS({
|
|
33
|
-
"node_modules/.pnpm/@webassemblyjs+helper-api-error@1.
|
|
29
|
+
"node_modules/.pnpm/@webassemblyjs+helper-api-error@1.13.2/node_modules/@webassemblyjs/helper-api-error/lib/index.js"(exports) {
|
|
34
30
|
function _typeof(obj) {
|
|
35
31
|
"@babel/helpers - typeof";
|
|
36
32
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
@@ -58,8 +54,7 @@ var require_lib = __commonJS({
|
|
|
58
54
|
throw new TypeError("Super expression must either be null or a function");
|
|
59
55
|
}
|
|
60
56
|
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
61
|
-
if (superClass)
|
|
62
|
-
_setPrototypeOf(subClass, superClass);
|
|
57
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
63
58
|
}
|
|
64
59
|
function _createSuper(Derived) {
|
|
65
60
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
@@ -91,14 +86,12 @@ var require_lib = __commonJS({
|
|
|
91
86
|
function _wrapNativeSuper(Class) {
|
|
92
87
|
var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
93
88
|
_wrapNativeSuper = function _wrapNativeSuper2(Class2) {
|
|
94
|
-
if (Class2 === null || !_isNativeFunction(Class2))
|
|
95
|
-
return Class2;
|
|
89
|
+
if (Class2 === null || !_isNativeFunction(Class2)) return Class2;
|
|
96
90
|
if (typeof Class2 !== "function") {
|
|
97
91
|
throw new TypeError("Super expression must either be null or a function");
|
|
98
92
|
}
|
|
99
93
|
if (typeof _cache !== "undefined") {
|
|
100
|
-
if (_cache.has(Class2))
|
|
101
|
-
return _cache.get(Class2);
|
|
94
|
+
if (_cache.has(Class2)) return _cache.get(Class2);
|
|
102
95
|
_cache.set(Class2, Wrapper);
|
|
103
96
|
}
|
|
104
97
|
function Wrapper() {
|
|
@@ -118,20 +111,16 @@ var require_lib = __commonJS({
|
|
|
118
111
|
a.push.apply(a, args2);
|
|
119
112
|
var Constructor = Function.bind.apply(Parent2, a);
|
|
120
113
|
var instance = new Constructor();
|
|
121
|
-
if (Class2)
|
|
122
|
-
_setPrototypeOf(instance, Class2.prototype);
|
|
114
|
+
if (Class2) _setPrototypeOf(instance, Class2.prototype);
|
|
123
115
|
return instance;
|
|
124
116
|
};
|
|
125
117
|
}
|
|
126
118
|
return _construct.apply(null, arguments);
|
|
127
119
|
}
|
|
128
120
|
function _isNativeReflectConstruct() {
|
|
129
|
-
if (typeof Reflect === "undefined" || !Reflect.construct)
|
|
130
|
-
|
|
131
|
-
if (
|
|
132
|
-
return false;
|
|
133
|
-
if (typeof Proxy === "function")
|
|
134
|
-
return true;
|
|
121
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
122
|
+
if (Reflect.construct.sham) return false;
|
|
123
|
+
if (typeof Proxy === "function") return true;
|
|
135
124
|
try {
|
|
136
125
|
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
137
126
|
}));
|
|
@@ -156,7 +145,7 @@ var require_lib = __commonJS({
|
|
|
156
145
|
};
|
|
157
146
|
return _getPrototypeOf(o);
|
|
158
147
|
}
|
|
159
|
-
var RuntimeError = /* @__PURE__ */ function(_Error) {
|
|
148
|
+
var RuntimeError = /* @__PURE__ */ (function(_Error) {
|
|
160
149
|
_inherits(RuntimeError2, _Error);
|
|
161
150
|
var _super = _createSuper(RuntimeError2);
|
|
162
151
|
function RuntimeError2() {
|
|
@@ -164,9 +153,9 @@ var require_lib = __commonJS({
|
|
|
164
153
|
return _super.apply(this, arguments);
|
|
165
154
|
}
|
|
166
155
|
return RuntimeError2;
|
|
167
|
-
}(/* @__PURE__ */ _wrapNativeSuper(Error));
|
|
156
|
+
})(/* @__PURE__ */ _wrapNativeSuper(Error));
|
|
168
157
|
exports.RuntimeError = RuntimeError;
|
|
169
|
-
var CompileError = /* @__PURE__ */ function(_Error2) {
|
|
158
|
+
var CompileError = /* @__PURE__ */ (function(_Error2) {
|
|
170
159
|
_inherits(CompileError2, _Error2);
|
|
171
160
|
var _super2 = _createSuper(CompileError2);
|
|
172
161
|
function CompileError2() {
|
|
@@ -174,9 +163,9 @@ var require_lib = __commonJS({
|
|
|
174
163
|
return _super2.apply(this, arguments);
|
|
175
164
|
}
|
|
176
165
|
return CompileError2;
|
|
177
|
-
}(/* @__PURE__ */ _wrapNativeSuper(Error));
|
|
166
|
+
})(/* @__PURE__ */ _wrapNativeSuper(Error));
|
|
178
167
|
exports.CompileError = CompileError;
|
|
179
|
-
var LinkError = /* @__PURE__ */ function(_Error3) {
|
|
168
|
+
var LinkError = /* @__PURE__ */ (function(_Error3) {
|
|
180
169
|
_inherits(LinkError2, _Error3);
|
|
181
170
|
var _super3 = _createSuper(LinkError2);
|
|
182
171
|
function LinkError2() {
|
|
@@ -184,12 +173,10 @@ var require_lib = __commonJS({
|
|
|
184
173
|
return _super3.apply(this, arguments);
|
|
185
174
|
}
|
|
186
175
|
return LinkError2;
|
|
187
|
-
}(/* @__PURE__ */ _wrapNativeSuper(Error));
|
|
176
|
+
})(/* @__PURE__ */ _wrapNativeSuper(Error));
|
|
188
177
|
exports.LinkError = LinkError;
|
|
189
178
|
}
|
|
190
179
|
});
|
|
191
|
-
|
|
192
|
-
// node_modules/.pnpm/@xtuc+ieee754@1.2.0/node_modules/@xtuc/ieee754/dist/index.cjs.js
|
|
193
180
|
var require_index_cjs = __commonJS({
|
|
194
181
|
"node_modules/.pnpm/@xtuc+ieee754@1.2.0/node_modules/@xtuc/ieee754/dist/index.cjs.js"(exports) {
|
|
195
182
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -276,10 +263,8 @@ var require_index_cjs = __commonJS({
|
|
|
276
263
|
}
|
|
277
264
|
}
|
|
278
265
|
});
|
|
279
|
-
|
|
280
|
-
// node_modules/.pnpm/@webassemblyjs+ieee754@1.12.1/node_modules/@webassemblyjs/ieee754/lib/index.js
|
|
281
266
|
var require_lib2 = __commonJS({
|
|
282
|
-
"node_modules/.pnpm/@webassemblyjs+ieee754@1.
|
|
267
|
+
"node_modules/.pnpm/@webassemblyjs+ieee754@1.14.1/node_modules/@webassemblyjs/ieee754/lib/index.js"(exports) {
|
|
283
268
|
Object.defineProperty(exports, "__esModule", {
|
|
284
269
|
value: true
|
|
285
270
|
});
|
|
@@ -317,10 +302,8 @@ var require_lib2 = __commonJS({
|
|
|
317
302
|
}
|
|
318
303
|
}
|
|
319
304
|
});
|
|
320
|
-
|
|
321
|
-
// node_modules/.pnpm/@webassemblyjs+utf8@1.12.1/node_modules/@webassemblyjs/utf8/lib/decoder.js
|
|
322
305
|
var require_decoder = __commonJS({
|
|
323
|
-
"node_modules/.pnpm/@webassemblyjs+utf8@1.
|
|
306
|
+
"node_modules/.pnpm/@webassemblyjs+utf8@1.14.1/node_modules/@webassemblyjs/utf8/lib/decoder.js"(exports) {
|
|
324
307
|
Object.defineProperty(exports, "__esModule", {
|
|
325
308
|
value: true
|
|
326
309
|
});
|
|
@@ -380,10 +363,8 @@ var require_decoder = __commonJS({
|
|
|
380
363
|
}
|
|
381
364
|
}
|
|
382
365
|
});
|
|
383
|
-
|
|
384
|
-
// node_modules/.pnpm/@webassemblyjs+utf8@1.12.1/node_modules/@webassemblyjs/utf8/lib/encoder.js
|
|
385
366
|
var require_encoder = __commonJS({
|
|
386
|
-
"node_modules/.pnpm/@webassemblyjs+utf8@1.
|
|
367
|
+
"node_modules/.pnpm/@webassemblyjs+utf8@1.14.1/node_modules/@webassemblyjs/utf8/lib/encoder.js"(exports) {
|
|
387
368
|
Object.defineProperty(exports, "__esModule", {
|
|
388
369
|
value: true
|
|
389
370
|
});
|
|
@@ -395,8 +376,7 @@ var require_encoder = __commonJS({
|
|
|
395
376
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
396
377
|
}
|
|
397
378
|
function _arrayWithoutHoles(arr) {
|
|
398
|
-
if (Array.isArray(arr))
|
|
399
|
-
return _arrayLikeToArray(arr);
|
|
379
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
400
380
|
}
|
|
401
381
|
function _toArray(arr) {
|
|
402
382
|
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
@@ -405,33 +385,25 @@ var require_encoder = __commonJS({
|
|
|
405
385
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
406
386
|
}
|
|
407
387
|
function _unsupportedIterableToArray(o, minLen) {
|
|
408
|
-
if (!o)
|
|
409
|
-
|
|
410
|
-
if (typeof o === "string")
|
|
411
|
-
return _arrayLikeToArray(o, minLen);
|
|
388
|
+
if (!o) return;
|
|
389
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
412
390
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
413
|
-
if (n === "Object" && o.constructor)
|
|
414
|
-
|
|
415
|
-
if (n === "
|
|
416
|
-
return Array.from(o);
|
|
417
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
418
|
-
return _arrayLikeToArray(o, minLen);
|
|
391
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
392
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
393
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
419
394
|
}
|
|
420
395
|
function _arrayLikeToArray(arr, len) {
|
|
421
|
-
if (len == null || len > arr.length)
|
|
422
|
-
len = arr.length;
|
|
396
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
423
397
|
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
424
398
|
arr2[i] = arr[i];
|
|
425
399
|
}
|
|
426
400
|
return arr2;
|
|
427
401
|
}
|
|
428
402
|
function _iterableToArray(iter) {
|
|
429
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
430
|
-
return Array.from(iter);
|
|
403
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
431
404
|
}
|
|
432
405
|
function _arrayWithHoles(arr) {
|
|
433
|
-
if (Array.isArray(arr))
|
|
434
|
-
return arr;
|
|
406
|
+
if (Array.isArray(arr)) return arr;
|
|
435
407
|
}
|
|
436
408
|
function con(n) {
|
|
437
409
|
return 128 | n & 63;
|
|
@@ -466,10 +438,8 @@ var require_encoder = __commonJS({
|
|
|
466
438
|
}
|
|
467
439
|
}
|
|
468
440
|
});
|
|
469
|
-
|
|
470
|
-
// node_modules/.pnpm/@webassemblyjs+utf8@1.12.1/node_modules/@webassemblyjs/utf8/lib/index.js
|
|
471
441
|
var require_lib3 = __commonJS({
|
|
472
|
-
"node_modules/.pnpm/@webassemblyjs+utf8@1.
|
|
442
|
+
"node_modules/.pnpm/@webassemblyjs+utf8@1.14.1/node_modules/@webassemblyjs/utf8/lib/index.js"(exports) {
|
|
473
443
|
Object.defineProperty(exports, "__esModule", {
|
|
474
444
|
value: true
|
|
475
445
|
});
|
|
@@ -489,10 +459,8 @@ var require_lib3 = __commonJS({
|
|
|
489
459
|
var _encoder = require_encoder();
|
|
490
460
|
}
|
|
491
461
|
});
|
|
492
|
-
|
|
493
|
-
// node_modules/.pnpm/@webassemblyjs+ast@1.12.1/node_modules/@webassemblyjs/ast/lib/nodes.js
|
|
494
462
|
var require_nodes = __commonJS({
|
|
495
|
-
"node_modules/.pnpm/@webassemblyjs+ast@1.
|
|
463
|
+
"node_modules/.pnpm/@webassemblyjs+ast@1.14.1/node_modules/@webassemblyjs/ast/lib/nodes.js"(exports) {
|
|
496
464
|
Object.defineProperty(exports, "__esModule", {
|
|
497
465
|
value: true
|
|
498
466
|
});
|
|
@@ -565,11 +533,11 @@ var require_nodes = __commonJS({
|
|
|
565
533
|
}
|
|
566
534
|
function assertTypeOf(t) {
|
|
567
535
|
return function(n) {
|
|
568
|
-
return function() {
|
|
536
|
+
return (function() {
|
|
569
537
|
if (!(n.type === t)) {
|
|
570
538
|
throw new Error("n.type === t error: unknown");
|
|
571
539
|
}
|
|
572
|
-
}();
|
|
540
|
+
})();
|
|
573
541
|
};
|
|
574
542
|
}
|
|
575
543
|
function _module(id, fields, metadata) {
|
|
@@ -1491,8 +1459,6 @@ var require_nodes = __commonJS({
|
|
|
1491
1459
|
exports.nodeAndUnionTypes = nodeAndUnionTypes;
|
|
1492
1460
|
}
|
|
1493
1461
|
});
|
|
1494
|
-
|
|
1495
|
-
// node_modules/.pnpm/@xtuc+long@4.2.2/node_modules/@xtuc/long/src/long.js
|
|
1496
1462
|
var require_long = __commonJS({
|
|
1497
1463
|
"node_modules/.pnpm/@xtuc+long@4.2.2/node_modules/@xtuc/long/src/long.js"(exports, module) {
|
|
1498
1464
|
module.exports = Long;
|
|
@@ -2278,26 +2244,19 @@ var require_long = __commonJS({
|
|
|
2278
2244
|
};
|
|
2279
2245
|
LongPrototype.shr = LongPrototype.shiftRight;
|
|
2280
2246
|
LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
|
|
2281
|
-
if (isLong(numBits))
|
|
2282
|
-
|
|
2283
|
-
if (
|
|
2284
|
-
|
|
2285
|
-
if (numBits < 32)
|
|
2286
|
-
return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >>> numBits, this.unsigned);
|
|
2287
|
-
if (numBits === 32)
|
|
2288
|
-
return fromBits(this.high, 0, this.unsigned);
|
|
2247
|
+
if (isLong(numBits)) numBits = numBits.toInt();
|
|
2248
|
+
if ((numBits &= 63) === 0) return this;
|
|
2249
|
+
if (numBits < 32) return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >>> numBits, this.unsigned);
|
|
2250
|
+
if (numBits === 32) return fromBits(this.high, 0, this.unsigned);
|
|
2289
2251
|
return fromBits(this.high >>> numBits - 32, 0, this.unsigned);
|
|
2290
2252
|
};
|
|
2291
2253
|
LongPrototype.shru = LongPrototype.shiftRightUnsigned;
|
|
2292
2254
|
LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
|
|
2293
2255
|
LongPrototype.rotateLeft = function rotateLeft(numBits) {
|
|
2294
2256
|
var b;
|
|
2295
|
-
if (isLong(numBits))
|
|
2296
|
-
|
|
2297
|
-
if (
|
|
2298
|
-
return this;
|
|
2299
|
-
if (numBits === 32)
|
|
2300
|
-
return fromBits(this.high, this.low, this.unsigned);
|
|
2257
|
+
if (isLong(numBits)) numBits = numBits.toInt();
|
|
2258
|
+
if ((numBits &= 63) === 0) return this;
|
|
2259
|
+
if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
|
|
2301
2260
|
if (numBits < 32) {
|
|
2302
2261
|
b = 32 - numBits;
|
|
2303
2262
|
return fromBits(this.low << numBits | this.high >>> b, this.high << numBits | this.low >>> b, this.unsigned);
|
|
@@ -2309,12 +2268,9 @@ var require_long = __commonJS({
|
|
|
2309
2268
|
LongPrototype.rotl = LongPrototype.rotateLeft;
|
|
2310
2269
|
LongPrototype.rotateRight = function rotateRight(numBits) {
|
|
2311
2270
|
var b;
|
|
2312
|
-
if (isLong(numBits))
|
|
2313
|
-
|
|
2314
|
-
if (
|
|
2315
|
-
return this;
|
|
2316
|
-
if (numBits === 32)
|
|
2317
|
-
return fromBits(this.high, this.low, this.unsigned);
|
|
2271
|
+
if (isLong(numBits)) numBits = numBits.toInt();
|
|
2272
|
+
if ((numBits &= 63) === 0) return this;
|
|
2273
|
+
if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
|
|
2318
2274
|
if (numBits < 32) {
|
|
2319
2275
|
b = 32 - numBits;
|
|
2320
2276
|
return fromBits(this.high << b | this.low >>> numBits, this.low << b | this.high >>> numBits, this.unsigned);
|
|
@@ -2382,10 +2338,8 @@ var require_long = __commonJS({
|
|
|
2382
2338
|
};
|
|
2383
2339
|
}
|
|
2384
2340
|
});
|
|
2385
|
-
|
|
2386
|
-
// node_modules/.pnpm/@webassemblyjs+floating-point-hex-parser@1.11.6/node_modules/@webassemblyjs/floating-point-hex-parser/lib/index.js
|
|
2387
2341
|
var require_lib4 = __commonJS({
|
|
2388
|
-
"node_modules/.pnpm/@webassemblyjs+floating-point-hex-parser@1.
|
|
2342
|
+
"node_modules/.pnpm/@webassemblyjs+floating-point-hex-parser@1.13.2/node_modules/@webassemblyjs/floating-point-hex-parser/lib/index.js"(exports) {
|
|
2389
2343
|
Object.defineProperty(exports, "__esModule", {
|
|
2390
2344
|
value: true
|
|
2391
2345
|
});
|
|
@@ -2429,10 +2383,8 @@ var require_lib4 = __commonJS({
|
|
|
2429
2383
|
}
|
|
2430
2384
|
}
|
|
2431
2385
|
});
|
|
2432
|
-
|
|
2433
|
-
// node_modules/.pnpm/@webassemblyjs+helper-numbers@1.11.6/node_modules/@webassemblyjs/helper-numbers/lib/index.js
|
|
2434
2386
|
var require_lib5 = __commonJS({
|
|
2435
|
-
"node_modules/.pnpm/@webassemblyjs+helper-numbers@1.
|
|
2387
|
+
"node_modules/.pnpm/@webassemblyjs+helper-numbers@1.13.2/node_modules/@webassemblyjs/helper-numbers/lib/index.js"(exports) {
|
|
2436
2388
|
Object.defineProperty(exports, "__esModule", {
|
|
2437
2389
|
value: true
|
|
2438
2390
|
});
|
|
@@ -2524,10 +2476,8 @@ var require_lib5 = __commonJS({
|
|
|
2524
2476
|
}
|
|
2525
2477
|
}
|
|
2526
2478
|
});
|
|
2527
|
-
|
|
2528
|
-
// node_modules/.pnpm/@webassemblyjs+ast@1.12.1/node_modules/@webassemblyjs/ast/lib/node-helpers.js
|
|
2529
2479
|
var require_node_helpers = __commonJS({
|
|
2530
|
-
"node_modules/.pnpm/@webassemblyjs+ast@1.
|
|
2480
|
+
"node_modules/.pnpm/@webassemblyjs+ast@1.14.1/node_modules/@webassemblyjs/ast/lib/node-helpers.js"(exports) {
|
|
2531
2481
|
Object.defineProperty(exports, "__esModule", {
|
|
2532
2482
|
value: true
|
|
2533
2483
|
});
|
|
@@ -2563,6 +2513,7 @@ var require_node_helpers = __commonJS({
|
|
|
2563
2513
|
case "f32": {
|
|
2564
2514
|
return (0, _nodes.floatLiteral)((0, _helperNumbers.parse32F)(rawValue), (0, _helperNumbers.isNanLiteral)(rawValue), (0, _helperNumbers.isInfLiteral)(rawValue), String(original));
|
|
2565
2515
|
}
|
|
2516
|
+
// f64
|
|
2566
2517
|
default: {
|
|
2567
2518
|
return (0, _nodes.floatLiteral)((0, _helperNumbers.parse64F)(rawValue), (0, _helperNumbers.isNanLiteral)(rawValue), (0, _helperNumbers.isInfLiteral)(rawValue), String(original));
|
|
2568
2519
|
}
|
|
@@ -2607,10 +2558,8 @@ var require_node_helpers = __commonJS({
|
|
|
2607
2558
|
}
|
|
2608
2559
|
}
|
|
2609
2560
|
});
|
|
2610
|
-
|
|
2611
|
-
// node_modules/.pnpm/@webassemblyjs+ast@1.12.1/node_modules/@webassemblyjs/ast/lib/node-path.js
|
|
2612
2561
|
var require_node_path = __commonJS({
|
|
2613
|
-
"node_modules/.pnpm/@webassemblyjs+ast@1.
|
|
2562
|
+
"node_modules/.pnpm/@webassemblyjs+ast@1.14.1/node_modules/@webassemblyjs/ast/lib/node-path.js"(exports) {
|
|
2614
2563
|
Object.defineProperty(exports, "__esModule", {
|
|
2615
2564
|
value: true
|
|
2616
2565
|
});
|
|
@@ -2746,10 +2695,8 @@ var require_node_path = __commonJS({
|
|
|
2746
2695
|
}
|
|
2747
2696
|
}
|
|
2748
2697
|
});
|
|
2749
|
-
|
|
2750
|
-
// node_modules/.pnpm/@webassemblyjs+ast@1.12.1/node_modules/@webassemblyjs/ast/lib/traverse.js
|
|
2751
2698
|
var require_traverse = __commonJS({
|
|
2752
|
-
"node_modules/.pnpm/@webassemblyjs+ast@1.
|
|
2699
|
+
"node_modules/.pnpm/@webassemblyjs+ast@1.14.1/node_modules/@webassemblyjs/ast/lib/traverse.js"(exports) {
|
|
2753
2700
|
Object.defineProperty(exports, "__esModule", {
|
|
2754
2701
|
value: true
|
|
2755
2702
|
});
|
|
@@ -2836,10 +2783,8 @@ var require_traverse = __commonJS({
|
|
|
2836
2783
|
}
|
|
2837
2784
|
}
|
|
2838
2785
|
});
|
|
2839
|
-
|
|
2840
|
-
// node_modules/.pnpm/@webassemblyjs+ast@1.12.1/node_modules/@webassemblyjs/ast/lib/signatures.js
|
|
2841
2786
|
var require_signatures = __commonJS({
|
|
2842
|
-
"node_modules/.pnpm/@webassemblyjs+ast@1.
|
|
2787
|
+
"node_modules/.pnpm/@webassemblyjs+ast@1.14.1/node_modules/@webassemblyjs/ast/lib/signatures.js"(exports) {
|
|
2843
2788
|
Object.defineProperty(exports, "__esModule", {
|
|
2844
2789
|
value: true
|
|
2845
2790
|
});
|
|
@@ -3042,10 +2987,8 @@ var require_signatures = __commonJS({
|
|
|
3042
2987
|
exports.signatures = signatures;
|
|
3043
2988
|
}
|
|
3044
2989
|
});
|
|
3045
|
-
|
|
3046
|
-
// node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.12.1/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/section.js
|
|
3047
2990
|
var require_section = __commonJS({
|
|
3048
|
-
"node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.
|
|
2991
|
+
"node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.14.1/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/section.js"(exports) {
|
|
3049
2992
|
Object.defineProperty(exports, "__esModule", {
|
|
3050
2993
|
value: true
|
|
3051
2994
|
});
|
|
@@ -3069,16 +3012,15 @@ var require_section = __commonJS({
|
|
|
3069
3012
|
return "func";
|
|
3070
3013
|
case "Global":
|
|
3071
3014
|
return "global";
|
|
3015
|
+
// No section
|
|
3072
3016
|
default:
|
|
3073
3017
|
return;
|
|
3074
3018
|
}
|
|
3075
3019
|
}
|
|
3076
3020
|
}
|
|
3077
3021
|
});
|
|
3078
|
-
|
|
3079
|
-
// node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.12.1/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/index.js
|
|
3080
3022
|
var require_lib6 = __commonJS({
|
|
3081
|
-
"node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.
|
|
3023
|
+
"node_modules/.pnpm/@webassemblyjs+helper-wasm-bytecode@1.14.1/node_modules/@webassemblyjs/helper-wasm-bytecode/lib/index.js"(exports) {
|
|
3082
3024
|
Object.defineProperty(exports, "__esModule", {
|
|
3083
3025
|
value: true
|
|
3084
3026
|
});
|
|
@@ -3131,15 +3073,21 @@ var require_lib6 = __commonJS({
|
|
|
3131
3073
|
};
|
|
3132
3074
|
var exportTypesByName = invertMap(exportTypes);
|
|
3133
3075
|
var valtypes = {
|
|
3076
|
+
// numtype
|
|
3134
3077
|
127: "i32",
|
|
3135
3078
|
126: "i64",
|
|
3136
3079
|
125: "f32",
|
|
3137
3080
|
124: "f64",
|
|
3138
|
-
|
|
3081
|
+
// vectype
|
|
3082
|
+
123: "v128",
|
|
3083
|
+
// reftype
|
|
3084
|
+
112: "anyfunc",
|
|
3085
|
+
111: "externref"
|
|
3139
3086
|
};
|
|
3140
3087
|
var valtypesByString = invertMap(valtypes);
|
|
3141
3088
|
var tableTypes = {
|
|
3142
|
-
112: "anyfunc"
|
|
3089
|
+
112: "anyfunc",
|
|
3090
|
+
111: "externref"
|
|
3143
3091
|
};
|
|
3144
3092
|
var blockTypes = Object.assign({}, valtypes, {
|
|
3145
3093
|
// https://webassembly.github.io/spec/core/binary/types.html#binary-blocktype
|
|
@@ -3213,8 +3161,8 @@ var require_lib6 = __commonJS({
|
|
|
3213
3161
|
34: createSymbol("tee_local", 1),
|
|
3214
3162
|
35: createSymbol("get_global", 1),
|
|
3215
3163
|
36: createSymbol("set_global", 1),
|
|
3216
|
-
37:
|
|
3217
|
-
38:
|
|
3164
|
+
37: createSymbol("table.get", 1),
|
|
3165
|
+
38: createSymbol("table.set", 1),
|
|
3218
3166
|
39: illegalop,
|
|
3219
3167
|
40: createSymbolObject("load", "u32", 1),
|
|
3220
3168
|
41: createSymbolObject("load", "u64", 1),
|
|
@@ -3373,6 +3321,19 @@ var require_lib6 = __commonJS({
|
|
|
3373
3321
|
194: createSymbolObject("extend8_s", "i64"),
|
|
3374
3322
|
195: createSymbolObject("extend16_s", "i64"),
|
|
3375
3323
|
196: createSymbolObject("extend32_s", "i64"),
|
|
3324
|
+
208: createSymbol("ref.null"),
|
|
3325
|
+
209: createSymbol("ref.is_null"),
|
|
3326
|
+
210: createSymbol("ref.func", 1),
|
|
3327
|
+
64522: createSymbol("memory.copy"),
|
|
3328
|
+
64523: createSymbol("memory.fill"),
|
|
3329
|
+
// Table instructions
|
|
3330
|
+
// https://webassembly.github.io/spec/core/binary/instructions.html#table-instructions
|
|
3331
|
+
64524: createSymbol("table.init", 2),
|
|
3332
|
+
64525: createSymbol("elem.drop", 1),
|
|
3333
|
+
64526: createSymbol("table.copy", 2),
|
|
3334
|
+
64527: createSymbol("table.grow", 1),
|
|
3335
|
+
64528: createSymbol("table.size", 1),
|
|
3336
|
+
64529: createSymbol("table.fill", 1),
|
|
3376
3337
|
// Atomic Memory Instructions
|
|
3377
3338
|
65024: createSymbol("memory.atomic.notify", 1),
|
|
3378
3339
|
65025: createSymbol("memory.atomic.wait32", 1),
|
|
@@ -3467,10 +3428,8 @@ var require_lib6 = __commonJS({
|
|
|
3467
3428
|
exports["default"] = _default;
|
|
3468
3429
|
}
|
|
3469
3430
|
});
|
|
3470
|
-
|
|
3471
|
-
// node_modules/.pnpm/@webassemblyjs+ast@1.12.1/node_modules/@webassemblyjs/ast/lib/utils.js
|
|
3472
3431
|
var require_utils = __commonJS({
|
|
3473
|
-
"node_modules/.pnpm/@webassemblyjs+ast@1.
|
|
3432
|
+
"node_modules/.pnpm/@webassemblyjs+ast@1.14.1/node_modules/@webassemblyjs/ast/lib/utils.js"(exports) {
|
|
3474
3433
|
Object.defineProperty(exports, "__esModule", {
|
|
3475
3434
|
value: true
|
|
3476
3435
|
});
|
|
@@ -3494,8 +3453,7 @@ var require_utils = __commonJS({
|
|
|
3494
3453
|
var _traverse = require_traverse();
|
|
3495
3454
|
var _helperWasmBytecode = _interopRequireWildcard(require_lib6());
|
|
3496
3455
|
function _getRequireWildcardCache(nodeInterop) {
|
|
3497
|
-
if (typeof WeakMap !== "function")
|
|
3498
|
-
return null;
|
|
3456
|
+
if (typeof WeakMap !== "function") return null;
|
|
3499
3457
|
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
3500
3458
|
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
3501
3459
|
return (_getRequireWildcardCache = function _getRequireWildcardCache2(nodeInterop2) {
|
|
@@ -3503,7 +3461,7 @@ var require_utils = __commonJS({
|
|
|
3503
3461
|
})(nodeInterop);
|
|
3504
3462
|
}
|
|
3505
3463
|
function _interopRequireWildcard(obj, nodeInterop) {
|
|
3506
|
-
if (
|
|
3464
|
+
if (obj && obj.__esModule) {
|
|
3507
3465
|
return obj;
|
|
3508
3466
|
}
|
|
3509
3467
|
if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
|
|
@@ -3538,21 +3496,15 @@ var require_utils = __commonJS({
|
|
|
3538
3496
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3539
3497
|
}
|
|
3540
3498
|
function _unsupportedIterableToArray(o, minLen) {
|
|
3541
|
-
if (!o)
|
|
3542
|
-
|
|
3543
|
-
if (typeof o === "string")
|
|
3544
|
-
return _arrayLikeToArray(o, minLen);
|
|
3499
|
+
if (!o) return;
|
|
3500
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
3545
3501
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3546
|
-
if (n === "Object" && o.constructor)
|
|
3547
|
-
|
|
3548
|
-
if (n === "
|
|
3549
|
-
return Array.from(o);
|
|
3550
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
3551
|
-
return _arrayLikeToArray(o, minLen);
|
|
3502
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3503
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
3504
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
3552
3505
|
}
|
|
3553
3506
|
function _arrayLikeToArray(arr, len) {
|
|
3554
|
-
if (len == null || len > arr.length)
|
|
3555
|
-
len = arr.length;
|
|
3507
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
3556
3508
|
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
3557
3509
|
arr2[i] = arr[i];
|
|
3558
3510
|
}
|
|
@@ -3560,8 +3512,7 @@ var require_utils = __commonJS({
|
|
|
3560
3512
|
}
|
|
3561
3513
|
function _iterableToArrayLimit(arr, i) {
|
|
3562
3514
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3563
|
-
if (_i == null)
|
|
3564
|
-
return;
|
|
3515
|
+
if (_i == null) return;
|
|
3565
3516
|
var _arr = [];
|
|
3566
3517
|
var _n = true;
|
|
3567
3518
|
var _d = false;
|
|
@@ -3569,26 +3520,22 @@ var require_utils = __commonJS({
|
|
|
3569
3520
|
try {
|
|
3570
3521
|
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
3571
3522
|
_arr.push(_s.value);
|
|
3572
|
-
if (i && _arr.length === i)
|
|
3573
|
-
break;
|
|
3523
|
+
if (i && _arr.length === i) break;
|
|
3574
3524
|
}
|
|
3575
3525
|
} catch (err) {
|
|
3576
3526
|
_d = true;
|
|
3577
3527
|
_e = err;
|
|
3578
3528
|
} finally {
|
|
3579
3529
|
try {
|
|
3580
|
-
if (!_n && _i["return"] != null)
|
|
3581
|
-
_i["return"]();
|
|
3530
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
3582
3531
|
} finally {
|
|
3583
|
-
if (_d)
|
|
3584
|
-
throw _e;
|
|
3532
|
+
if (_d) throw _e;
|
|
3585
3533
|
}
|
|
3586
3534
|
}
|
|
3587
3535
|
return _arr;
|
|
3588
3536
|
}
|
|
3589
3537
|
function _arrayWithHoles(arr) {
|
|
3590
|
-
if (Array.isArray(arr))
|
|
3591
|
-
return arr;
|
|
3538
|
+
if (Array.isArray(arr)) return arr;
|
|
3592
3539
|
}
|
|
3593
3540
|
function _typeof(obj) {
|
|
3594
3541
|
"@babel/helpers - typeof";
|
|
@@ -3609,7 +3556,7 @@ var require_utils = __commonJS({
|
|
|
3609
3556
|
function getSectionMetadata(ast, name) {
|
|
3610
3557
|
var section;
|
|
3611
3558
|
(0, _traverse.traverse)(ast, {
|
|
3612
|
-
SectionMetadata: function(_SectionMetadata) {
|
|
3559
|
+
SectionMetadata: (function(_SectionMetadata) {
|
|
3613
3560
|
function SectionMetadata(_x) {
|
|
3614
3561
|
return _SectionMetadata.apply(this, arguments);
|
|
3615
3562
|
}
|
|
@@ -3617,7 +3564,7 @@ var require_utils = __commonJS({
|
|
|
3617
3564
|
return _SectionMetadata.toString();
|
|
3618
3565
|
};
|
|
3619
3566
|
return SectionMetadata;
|
|
3620
|
-
}(function(_ref) {
|
|
3567
|
+
})(function(_ref) {
|
|
3621
3568
|
var node = _ref.node;
|
|
3622
3569
|
if (node.section === name) {
|
|
3623
3570
|
section = node;
|
|
@@ -3629,7 +3576,7 @@ var require_utils = __commonJS({
|
|
|
3629
3576
|
function getSectionMetadatas(ast, name) {
|
|
3630
3577
|
var sections = [];
|
|
3631
3578
|
(0, _traverse.traverse)(ast, {
|
|
3632
|
-
SectionMetadata: function(_SectionMetadata2) {
|
|
3579
|
+
SectionMetadata: (function(_SectionMetadata2) {
|
|
3633
3580
|
function SectionMetadata(_x2) {
|
|
3634
3581
|
return _SectionMetadata2.apply(this, arguments);
|
|
3635
3582
|
}
|
|
@@ -3637,7 +3584,7 @@ var require_utils = __commonJS({
|
|
|
3637
3584
|
return _SectionMetadata2.toString();
|
|
3638
3585
|
};
|
|
3639
3586
|
return SectionMetadata;
|
|
3640
|
-
}(function(_ref2) {
|
|
3587
|
+
})(function(_ref2) {
|
|
3641
3588
|
var node = _ref2.node;
|
|
3642
3589
|
if (node.section === name) {
|
|
3643
3590
|
sections.push(node);
|
|
@@ -3799,10 +3746,8 @@ var require_utils = __commonJS({
|
|
|
3799
3746
|
}
|
|
3800
3747
|
}
|
|
3801
3748
|
});
|
|
3802
|
-
|
|
3803
|
-
// node_modules/.pnpm/@webassemblyjs+ast@1.12.1/node_modules/@webassemblyjs/ast/lib/clone.js
|
|
3804
3749
|
var require_clone = __commonJS({
|
|
3805
|
-
"node_modules/.pnpm/@webassemblyjs+ast@1.
|
|
3750
|
+
"node_modules/.pnpm/@webassemblyjs+ast@1.14.1/node_modules/@webassemblyjs/ast/lib/clone.js"(exports) {
|
|
3806
3751
|
Object.defineProperty(exports, "__esModule", {
|
|
3807
3752
|
value: true
|
|
3808
3753
|
});
|
|
@@ -3812,10 +3757,8 @@ var require_clone = __commonJS({
|
|
|
3812
3757
|
}
|
|
3813
3758
|
}
|
|
3814
3759
|
});
|
|
3815
|
-
|
|
3816
|
-
// node_modules/.pnpm/@webassemblyjs+ast@1.12.1/node_modules/@webassemblyjs/ast/lib/transform/ast-module-to-module-context/index.js
|
|
3817
3760
|
var require_ast_module_to_module_context = __commonJS({
|
|
3818
|
-
"node_modules/.pnpm/@webassemblyjs+ast@1.
|
|
3761
|
+
"node_modules/.pnpm/@webassemblyjs+ast@1.14.1/node_modules/@webassemblyjs/ast/lib/transform/ast-module-to-module-context/index.js"(exports) {
|
|
3819
3762
|
Object.defineProperty(exports, "__esModule", {
|
|
3820
3763
|
value: true
|
|
3821
3764
|
});
|
|
@@ -3832,16 +3775,12 @@ var require_ast_module_to_module_context = __commonJS({
|
|
|
3832
3775
|
var descriptor = props[i];
|
|
3833
3776
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
3834
3777
|
descriptor.configurable = true;
|
|
3835
|
-
if ("value" in descriptor)
|
|
3836
|
-
descriptor.writable = true;
|
|
3778
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
3837
3779
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
3838
3780
|
}
|
|
3839
3781
|
}
|
|
3840
3782
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
3841
|
-
if (protoProps)
|
|
3842
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
3843
|
-
if (staticProps)
|
|
3844
|
-
_defineProperties(Constructor, staticProps);
|
|
3783
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
3845
3784
|
return Constructor;
|
|
3846
3785
|
}
|
|
3847
3786
|
function moduleContextFromModuleAST(m) {
|
|
@@ -3897,7 +3836,7 @@ var require_ast_module_to_module_context = __commonJS({
|
|
|
3897
3836
|
});
|
|
3898
3837
|
return moduleContext;
|
|
3899
3838
|
}
|
|
3900
|
-
var ModuleContext = /* @__PURE__ */ function() {
|
|
3839
|
+
var ModuleContext = /* @__PURE__ */ (function() {
|
|
3901
3840
|
function ModuleContext2() {
|
|
3902
3841
|
_classCallCheck(this, ModuleContext2);
|
|
3903
3842
|
this.funcs = [];
|
|
@@ -4144,14 +4083,12 @@ var require_ast_module_to_module_context = __commonJS({
|
|
|
4144
4083
|
}
|
|
4145
4084
|
}]);
|
|
4146
4085
|
return ModuleContext2;
|
|
4147
|
-
}();
|
|
4086
|
+
})();
|
|
4148
4087
|
exports.ModuleContext = ModuleContext;
|
|
4149
4088
|
}
|
|
4150
4089
|
});
|
|
4151
|
-
|
|
4152
|
-
// node_modules/.pnpm/@webassemblyjs+ast@1.12.1/node_modules/@webassemblyjs/ast/lib/index.js
|
|
4153
4090
|
var require_lib7 = __commonJS({
|
|
4154
|
-
"node_modules/.pnpm/@webassemblyjs+ast@1.
|
|
4091
|
+
"node_modules/.pnpm/@webassemblyjs+ast@1.14.1/node_modules/@webassemblyjs/ast/lib/index.js"(exports) {
|
|
4155
4092
|
Object.defineProperty(exports, "__esModule", {
|
|
4156
4093
|
value: true
|
|
4157
4094
|
});
|
|
@@ -4243,12 +4180,9 @@ var require_lib7 = __commonJS({
|
|
|
4243
4180
|
});
|
|
4244
4181
|
var _nodes = require_nodes();
|
|
4245
4182
|
Object.keys(_nodes).forEach(function(key) {
|
|
4246
|
-
if (key === "default" || key === "__esModule")
|
|
4247
|
-
|
|
4248
|
-
if (
|
|
4249
|
-
return;
|
|
4250
|
-
if (key in exports && exports[key] === _nodes[key])
|
|
4251
|
-
return;
|
|
4183
|
+
if (key === "default" || key === "__esModule") return;
|
|
4184
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
4185
|
+
if (key in exports && exports[key] === _nodes[key]) return;
|
|
4252
4186
|
Object.defineProperty(exports, key, {
|
|
4253
4187
|
enumerable: true,
|
|
4254
4188
|
get: function get() {
|
|
@@ -4261,12 +4195,9 @@ var require_lib7 = __commonJS({
|
|
|
4261
4195
|
var _signatures = require_signatures();
|
|
4262
4196
|
var _utils = require_utils();
|
|
4263
4197
|
Object.keys(_utils).forEach(function(key) {
|
|
4264
|
-
if (key === "default" || key === "__esModule")
|
|
4265
|
-
|
|
4266
|
-
if (
|
|
4267
|
-
return;
|
|
4268
|
-
if (key in exports && exports[key] === _utils[key])
|
|
4269
|
-
return;
|
|
4198
|
+
if (key === "default" || key === "__esModule") return;
|
|
4199
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
4200
|
+
if (key in exports && exports[key] === _utils[key]) return;
|
|
4270
4201
|
Object.defineProperty(exports, key, {
|
|
4271
4202
|
enumerable: true,
|
|
4272
4203
|
get: function get() {
|
|
@@ -4278,10 +4209,8 @@ var require_lib7 = __commonJS({
|
|
|
4278
4209
|
var _astModuleToModuleContext = require_ast_module_to_module_context();
|
|
4279
4210
|
}
|
|
4280
4211
|
});
|
|
4281
|
-
|
|
4282
|
-
// node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/bits.js
|
|
4283
4212
|
var require_bits = __commonJS({
|
|
4284
|
-
"node_modules/.pnpm/@webassemblyjs+leb128@1.
|
|
4213
|
+
"node_modules/.pnpm/@webassemblyjs+leb128@1.14.1/node_modules/@webassemblyjs/leb128/lib/bits.js"(exports) {
|
|
4285
4214
|
Object.defineProperty(exports, "__esModule", {
|
|
4286
4215
|
value: true
|
|
4287
4216
|
});
|
|
@@ -4367,10 +4296,8 @@ var require_bits = __commonJS({
|
|
|
4367
4296
|
}
|
|
4368
4297
|
}
|
|
4369
4298
|
});
|
|
4370
|
-
|
|
4371
|
-
// node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/bufs.js
|
|
4372
4299
|
var require_bufs = __commonJS({
|
|
4373
|
-
"node_modules/.pnpm/@webassemblyjs+leb128@1.
|
|
4300
|
+
"node_modules/.pnpm/@webassemblyjs+leb128@1.14.1/node_modules/@webassemblyjs/leb128/lib/bufs.js"(exports) {
|
|
4374
4301
|
Object.defineProperty(exports, "__esModule", {
|
|
4375
4302
|
value: true
|
|
4376
4303
|
});
|
|
@@ -4505,10 +4432,8 @@ var require_bufs = __commonJS({
|
|
|
4505
4432
|
}
|
|
4506
4433
|
}
|
|
4507
4434
|
});
|
|
4508
|
-
|
|
4509
|
-
// node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/leb.js
|
|
4510
4435
|
var require_leb = __commonJS({
|
|
4511
|
-
"node_modules/.pnpm/@webassemblyjs+leb128@1.
|
|
4436
|
+
"node_modules/.pnpm/@webassemblyjs+leb128@1.14.1/node_modules/@webassemblyjs/leb128/lib/leb.js"(exports) {
|
|
4512
4437
|
function _typeof(obj) {
|
|
4513
4438
|
"@babel/helpers - typeof";
|
|
4514
4439
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
@@ -4530,8 +4455,7 @@ var require_leb = __commonJS({
|
|
|
4530
4455
|
var bits = _interopRequireWildcard(require_bits());
|
|
4531
4456
|
var bufs = _interopRequireWildcard(require_bufs());
|
|
4532
4457
|
function _getRequireWildcardCache(nodeInterop) {
|
|
4533
|
-
if (typeof WeakMap !== "function")
|
|
4534
|
-
return null;
|
|
4458
|
+
if (typeof WeakMap !== "function") return null;
|
|
4535
4459
|
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
4536
4460
|
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
4537
4461
|
return (_getRequireWildcardCache = function _getRequireWildcardCache2(nodeInterop2) {
|
|
@@ -4539,7 +4463,7 @@ var require_leb = __commonJS({
|
|
|
4539
4463
|
})(nodeInterop);
|
|
4540
4464
|
}
|
|
4541
4465
|
function _interopRequireWildcard(obj, nodeInterop) {
|
|
4542
|
-
if (
|
|
4466
|
+
if (obj && obj.__esModule) {
|
|
4543
4467
|
return obj;
|
|
4544
4468
|
}
|
|
4545
4469
|
if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
|
|
@@ -4757,10 +4681,8 @@ var require_leb = __commonJS({
|
|
|
4757
4681
|
exports["default"] = _default;
|
|
4758
4682
|
}
|
|
4759
4683
|
});
|
|
4760
|
-
|
|
4761
|
-
// node_modules/.pnpm/@webassemblyjs+leb128@1.12.1/node_modules/@webassemblyjs/leb128/lib/index.js
|
|
4762
4684
|
var require_lib8 = __commonJS({
|
|
4763
|
-
"node_modules/.pnpm/@webassemblyjs+leb128@1.
|
|
4685
|
+
"node_modules/.pnpm/@webassemblyjs+leb128@1.14.1/node_modules/@webassemblyjs/leb128/lib/index.js"(exports) {
|
|
4764
4686
|
Object.defineProperty(exports, "__esModule", {
|
|
4765
4687
|
value: true
|
|
4766
4688
|
});
|
|
@@ -4803,10 +4725,8 @@ var require_lib8 = __commonJS({
|
|
|
4803
4725
|
}
|
|
4804
4726
|
}
|
|
4805
4727
|
});
|
|
4806
|
-
|
|
4807
|
-
// node_modules/.pnpm/@webassemblyjs+wasm-parser@1.12.1/node_modules/@webassemblyjs/wasm-parser/lib/decoder.js
|
|
4808
4728
|
var require_decoder2 = __commonJS({
|
|
4809
|
-
"node_modules/.pnpm/@webassemblyjs+wasm-parser@1.
|
|
4729
|
+
"node_modules/.pnpm/@webassemblyjs+wasm-parser@1.14.1/node_modules/@webassemblyjs/wasm-parser/lib/decoder.js"(exports) {
|
|
4810
4730
|
function _typeof(obj) {
|
|
4811
4731
|
"@babel/helpers - typeof";
|
|
4812
4732
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
@@ -4834,8 +4754,7 @@ var require_decoder2 = __commonJS({
|
|
|
4834
4754
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
4835
4755
|
}
|
|
4836
4756
|
function _getRequireWildcardCache(nodeInterop) {
|
|
4837
|
-
if (typeof WeakMap !== "function")
|
|
4838
|
-
return null;
|
|
4757
|
+
if (typeof WeakMap !== "function") return null;
|
|
4839
4758
|
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
4840
4759
|
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
4841
4760
|
return (_getRequireWildcardCache = function _getRequireWildcardCache2(nodeInterop2) {
|
|
@@ -4843,7 +4762,7 @@ var require_decoder2 = __commonJS({
|
|
|
4843
4762
|
})(nodeInterop);
|
|
4844
4763
|
}
|
|
4845
4764
|
function _interopRequireWildcard(obj, nodeInterop) {
|
|
4846
|
-
if (
|
|
4765
|
+
if (obj && obj.__esModule) {
|
|
4847
4766
|
return obj;
|
|
4848
4767
|
}
|
|
4849
4768
|
if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
|
|
@@ -4878,29 +4797,21 @@ var require_decoder2 = __commonJS({
|
|
|
4878
4797
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4879
4798
|
}
|
|
4880
4799
|
function _unsupportedIterableToArray(o, minLen) {
|
|
4881
|
-
if (!o)
|
|
4882
|
-
|
|
4883
|
-
if (typeof o === "string")
|
|
4884
|
-
return _arrayLikeToArray(o, minLen);
|
|
4800
|
+
if (!o) return;
|
|
4801
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
4885
4802
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
4886
|
-
if (n === "Object" && o.constructor)
|
|
4887
|
-
|
|
4888
|
-
if (n === "
|
|
4889
|
-
return Array.from(o);
|
|
4890
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
4891
|
-
return _arrayLikeToArray(o, minLen);
|
|
4803
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
4804
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
4805
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
4892
4806
|
}
|
|
4893
4807
|
function _iterableToArray(iter) {
|
|
4894
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
4895
|
-
return Array.from(iter);
|
|
4808
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
4896
4809
|
}
|
|
4897
4810
|
function _arrayWithoutHoles(arr) {
|
|
4898
|
-
if (Array.isArray(arr))
|
|
4899
|
-
return _arrayLikeToArray(arr);
|
|
4811
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
4900
4812
|
}
|
|
4901
4813
|
function _arrayLikeToArray(arr, len) {
|
|
4902
|
-
if (len == null || len > arr.length)
|
|
4903
|
-
len = arr.length;
|
|
4814
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4904
4815
|
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
4905
4816
|
arr2[i] = arr[i];
|
|
4906
4817
|
}
|
|
@@ -4931,8 +4842,7 @@ var require_decoder2 = __commonJS({
|
|
|
4931
4842
|
};
|
|
4932
4843
|
}
|
|
4933
4844
|
function dump(b, msg) {
|
|
4934
|
-
if (opts.dump === false)
|
|
4935
|
-
return;
|
|
4845
|
+
if (opts.dump === false) return;
|
|
4936
4846
|
var pad = " ";
|
|
4937
4847
|
var str = "";
|
|
4938
4848
|
if (b.length < 5) {
|
|
@@ -4943,12 +4853,10 @@ var require_decoder2 = __commonJS({
|
|
|
4943
4853
|
console.log(toHex(offset) + ": ", str, pad, ";", msg);
|
|
4944
4854
|
}
|
|
4945
4855
|
function dumpSep(msg) {
|
|
4946
|
-
if (opts.dump === false)
|
|
4947
|
-
return;
|
|
4856
|
+
if (opts.dump === false) return;
|
|
4948
4857
|
console.log(";", msg);
|
|
4949
4858
|
}
|
|
4950
4859
|
var state = {
|
|
4951
|
-
elementsInFuncSection: [],
|
|
4952
4860
|
elementsInExportSection: [],
|
|
4953
4861
|
elementsInCodeSection: [],
|
|
4954
4862
|
/**
|
|
@@ -5148,7 +5056,11 @@ var require_decoder2 = __commonJS({
|
|
|
5148
5056
|
if (type == _helperWasmBytecode["default"].types.func) {
|
|
5149
5057
|
dump([type], "func");
|
|
5150
5058
|
var paramValtypes = parseVec(function(b) {
|
|
5151
|
-
|
|
5059
|
+
var valtype = _helperWasmBytecode["default"].valtypes[b];
|
|
5060
|
+
if (valtype === void 0) {
|
|
5061
|
+
throw new Error("unexpected value type ".concat(b));
|
|
5062
|
+
}
|
|
5063
|
+
return valtype;
|
|
5152
5064
|
});
|
|
5153
5065
|
var params = paramValtypes.map(function(v) {
|
|
5154
5066
|
return t.funcParam(
|
|
@@ -5159,10 +5071,10 @@ var require_decoder2 = __commonJS({
|
|
|
5159
5071
|
var result = parseVec(function(b) {
|
|
5160
5072
|
return _helperWasmBytecode["default"].valtypes[b];
|
|
5161
5073
|
});
|
|
5162
|
-
typeInstructionNodes.push(function() {
|
|
5074
|
+
typeInstructionNodes.push((function() {
|
|
5163
5075
|
var endLoc = getPosition();
|
|
5164
5076
|
return t.withLoc(t.typeInstruction(void 0, t.signature(params, result)), endLoc, _startLoc);
|
|
5165
|
-
}());
|
|
5077
|
+
})());
|
|
5166
5078
|
state.typesInModule.push({
|
|
5167
5079
|
params,
|
|
5168
5080
|
result
|
|
@@ -5221,10 +5133,10 @@ var require_decoder2 = __commonJS({
|
|
|
5221
5133
|
} else {
|
|
5222
5134
|
throw new _helperApiError.CompileError("Unsupported import of type: " + descrType);
|
|
5223
5135
|
}
|
|
5224
|
-
imports.push(function() {
|
|
5136
|
+
imports.push((function() {
|
|
5225
5137
|
var endLoc = getPosition();
|
|
5226
5138
|
return t.withLoc(t.moduleImport(moduleName.value, name.value, importDescr), endLoc, _startLoc2);
|
|
5227
|
-
}());
|
|
5139
|
+
})());
|
|
5228
5140
|
}
|
|
5229
5141
|
return imports;
|
|
5230
5142
|
}
|
|
@@ -5333,10 +5245,10 @@ var require_decoder2 = __commonJS({
|
|
|
5333
5245
|
for (var _i2 = 0; _i2 < localCount; _i2++) {
|
|
5334
5246
|
args.push(t.valtypeLiteral(type));
|
|
5335
5247
|
}
|
|
5336
|
-
var localNode = function() {
|
|
5248
|
+
var localNode = (function() {
|
|
5337
5249
|
var endLoc2 = getPosition();
|
|
5338
5250
|
return t.withLoc(t.instruction("local", args), endLoc2, _startLoc5);
|
|
5339
|
-
}();
|
|
5251
|
+
})();
|
|
5340
5252
|
locals.push(localNode);
|
|
5341
5253
|
dump([valtypeByte], type);
|
|
5342
5254
|
if (typeof type === "undefined") {
|
|
@@ -5365,20 +5277,27 @@ var require_decoder2 = __commonJS({
|
|
|
5365
5277
|
instructionByte = 65024 + readByte();
|
|
5366
5278
|
eatBytes(1);
|
|
5367
5279
|
}
|
|
5280
|
+
if (instructionByte === 252) {
|
|
5281
|
+
instructionByte = 64512 + readByte();
|
|
5282
|
+
eatBytes(1);
|
|
5283
|
+
}
|
|
5368
5284
|
var instruction = _helperWasmBytecode["default"].symbolsByByte[instructionByte];
|
|
5369
5285
|
if (typeof instruction === "undefined") {
|
|
5370
5286
|
throw new _helperApiError.CompileError("Unexpected instruction: " + toHex(instructionByte));
|
|
5371
5287
|
}
|
|
5288
|
+
if (instruction === "illegal") {
|
|
5289
|
+
throw new Error("tried to decode an illegal bytecode: ".concat(toHex(instructionByte)));
|
|
5290
|
+
}
|
|
5372
5291
|
if (typeof instruction.object === "string") {
|
|
5373
5292
|
dump([instructionByte], "".concat(instruction.object, ".").concat(instruction.name));
|
|
5374
5293
|
} else {
|
|
5375
5294
|
dump([instructionByte], instruction.name);
|
|
5376
5295
|
}
|
|
5377
5296
|
if (instruction.name === "end") {
|
|
5378
|
-
var node = function() {
|
|
5297
|
+
var node = (function() {
|
|
5379
5298
|
var endLoc = getPosition();
|
|
5380
5299
|
return t.withLoc(t.instruction(instruction.name), endLoc, _startLoc6);
|
|
5381
|
-
}();
|
|
5300
|
+
})();
|
|
5382
5301
|
code.push(node);
|
|
5383
5302
|
break;
|
|
5384
5303
|
}
|
|
@@ -5386,31 +5305,19 @@ var require_decoder2 = __commonJS({
|
|
|
5386
5305
|
var namedArgs = void 0;
|
|
5387
5306
|
if (instruction.name === "loop") {
|
|
5388
5307
|
var _startLoc7 = getPosition();
|
|
5389
|
-
var
|
|
5390
|
-
eatBytes(1);
|
|
5391
|
-
var blocktype = _helperWasmBytecode["default"].blockTypes[blocktypeByte];
|
|
5392
|
-
dump([blocktypeByte], "blocktype");
|
|
5393
|
-
if (typeof blocktype === "undefined") {
|
|
5394
|
-
throw new _helperApiError.CompileError("Unexpected blocktype: " + toHex(blocktypeByte));
|
|
5395
|
-
}
|
|
5308
|
+
var blocktype = parseBlockType();
|
|
5396
5309
|
var instr = [];
|
|
5397
5310
|
parseInstructionBlock(instr);
|
|
5398
5311
|
var label = t.withRaw(t.identifier(getUniqueName("loop")), "");
|
|
5399
|
-
var loopNode = function() {
|
|
5312
|
+
var loopNode = (function() {
|
|
5400
5313
|
var endLoc = getPosition();
|
|
5401
5314
|
return t.withLoc(t.loopInstruction(label, blocktype, instr), endLoc, _startLoc7);
|
|
5402
|
-
}();
|
|
5315
|
+
})();
|
|
5403
5316
|
code.push(loopNode);
|
|
5404
5317
|
instructionAlreadyCreated = true;
|
|
5405
5318
|
} else if (instruction.name === "if") {
|
|
5406
5319
|
var _startLoc8 = getPosition();
|
|
5407
|
-
var
|
|
5408
|
-
eatBytes(1);
|
|
5409
|
-
var _blocktype = _helperWasmBytecode["default"].blockTypes[_blocktypeByte];
|
|
5410
|
-
dump([_blocktypeByte], "blocktype");
|
|
5411
|
-
if (typeof _blocktype === "undefined") {
|
|
5412
|
-
throw new _helperApiError.CompileError("Unexpected blocktype: " + toHex(_blocktypeByte));
|
|
5413
|
-
}
|
|
5320
|
+
var _blocktype = parseBlockType();
|
|
5414
5321
|
var testIndex = t.withRaw(t.identifier(getUniqueName("if")), "");
|
|
5415
5322
|
var ifBody = [];
|
|
5416
5323
|
parseInstructionBlock(ifBody);
|
|
@@ -5424,28 +5331,22 @@ var require_decoder2 = __commonJS({
|
|
|
5424
5331
|
var consequentInstr = ifBody.slice(0, elseIndex);
|
|
5425
5332
|
var alternate = ifBody.slice(elseIndex + 1);
|
|
5426
5333
|
var testInstrs = [];
|
|
5427
|
-
var ifNode = function() {
|
|
5334
|
+
var ifNode = (function() {
|
|
5428
5335
|
var endLoc = getPosition();
|
|
5429
5336
|
return t.withLoc(t.ifInstruction(testIndex, testInstrs, _blocktype, consequentInstr, alternate), endLoc, _startLoc8);
|
|
5430
|
-
}();
|
|
5337
|
+
})();
|
|
5431
5338
|
code.push(ifNode);
|
|
5432
5339
|
instructionAlreadyCreated = true;
|
|
5433
5340
|
} else if (instruction.name === "block") {
|
|
5434
5341
|
var _startLoc9 = getPosition();
|
|
5435
|
-
var
|
|
5436
|
-
eatBytes(1);
|
|
5437
|
-
var _blocktype2 = _helperWasmBytecode["default"].blockTypes[_blocktypeByte2];
|
|
5438
|
-
dump([_blocktypeByte2], "blocktype");
|
|
5439
|
-
if (typeof _blocktype2 === "undefined") {
|
|
5440
|
-
throw new _helperApiError.CompileError("Unexpected blocktype: " + toHex(_blocktypeByte2));
|
|
5441
|
-
}
|
|
5342
|
+
var _blocktype2 = parseBlockType();
|
|
5442
5343
|
var _instr2 = [];
|
|
5443
5344
|
parseInstructionBlock(_instr2);
|
|
5444
5345
|
var _label = t.withRaw(t.identifier(getUniqueName("block")), "");
|
|
5445
|
-
var blockNode = function() {
|
|
5346
|
+
var blockNode = (function() {
|
|
5446
5347
|
var endLoc = getPosition();
|
|
5447
5348
|
return t.withLoc(t.blockInstruction(_label, _instr2, _blocktype2), endLoc, _startLoc9);
|
|
5448
|
-
}();
|
|
5349
|
+
})();
|
|
5449
5350
|
code.push(blockNode);
|
|
5450
5351
|
instructionAlreadyCreated = true;
|
|
5451
5352
|
} else if (instruction.name === "call") {
|
|
@@ -5453,10 +5354,10 @@ var require_decoder2 = __commonJS({
|
|
|
5453
5354
|
var index = indexu32.value;
|
|
5454
5355
|
eatBytes(indexu32.nextIndex);
|
|
5455
5356
|
dump([index], "index");
|
|
5456
|
-
var callNode = function() {
|
|
5357
|
+
var callNode = (function() {
|
|
5457
5358
|
var endLoc = getPosition();
|
|
5458
5359
|
return t.withLoc(t.callInstruction(t.indexLiteral(index)), endLoc, _startLoc6);
|
|
5459
|
-
}();
|
|
5360
|
+
})();
|
|
5460
5361
|
code.push(callNode);
|
|
5461
5362
|
instructionAlreadyCreated = true;
|
|
5462
5363
|
} else if (instruction.name === "call_indirect") {
|
|
@@ -5476,10 +5377,10 @@ var require_decoder2 = __commonJS({
|
|
|
5476
5377
|
if (flag !== 0) {
|
|
5477
5378
|
throw new _helperApiError.CompileError("zero flag expected");
|
|
5478
5379
|
}
|
|
5479
|
-
code.push(function() {
|
|
5380
|
+
code.push((function() {
|
|
5480
5381
|
var endLoc = getPosition();
|
|
5481
5382
|
return t.withLoc(_callNode, endLoc, _startLoc10);
|
|
5482
|
-
}());
|
|
5383
|
+
})());
|
|
5483
5384
|
instructionAlreadyCreated = true;
|
|
5484
5385
|
} else if (instruction.name === "br_table") {
|
|
5485
5386
|
var indicesu32 = readU32();
|
|
@@ -5511,8 +5412,7 @@ var require_decoder2 = __commonJS({
|
|
|
5511
5412
|
var _offset2 = offsetu32.value;
|
|
5512
5413
|
eatBytes(offsetu32.nextIndex);
|
|
5513
5414
|
dump([_offset2], "offset");
|
|
5514
|
-
if (namedArgs === void 0)
|
|
5515
|
-
namedArgs = {};
|
|
5415
|
+
if (namedArgs === void 0) namedArgs = {};
|
|
5516
5416
|
namedArgs.offset = t.numberLiteralFromRaw(_offset2);
|
|
5517
5417
|
}
|
|
5518
5418
|
} else if (instructionByte >= 65 && instructionByte <= 68) {
|
|
@@ -5599,16 +5499,16 @@ var require_decoder2 = __commonJS({
|
|
|
5599
5499
|
}
|
|
5600
5500
|
if (instructionAlreadyCreated === false) {
|
|
5601
5501
|
if (typeof instruction.object === "string") {
|
|
5602
|
-
var _node3 = function() {
|
|
5502
|
+
var _node3 = (function() {
|
|
5603
5503
|
var endLoc = getPosition();
|
|
5604
5504
|
return t.withLoc(t.objectInstruction(instruction.name, instruction.object, args, namedArgs), endLoc, _startLoc6);
|
|
5605
|
-
}();
|
|
5505
|
+
})();
|
|
5606
5506
|
code.push(_node3);
|
|
5607
5507
|
} else {
|
|
5608
|
-
var _node4 = function() {
|
|
5508
|
+
var _node4 = (function() {
|
|
5609
5509
|
var endLoc = getPosition();
|
|
5610
5510
|
return t.withLoc(t.instruction(instruction.name, args, namedArgs), endLoc, _startLoc6);
|
|
5611
|
-
}();
|
|
5511
|
+
})();
|
|
5612
5512
|
code.push(_node4);
|
|
5613
5513
|
}
|
|
5614
5514
|
}
|
|
@@ -5645,7 +5545,7 @@ var require_decoder2 = __commonJS({
|
|
|
5645
5545
|
dump([elementTypeByte], "element type");
|
|
5646
5546
|
var elementType = _helperWasmBytecode["default"].tableTypes[elementTypeByte];
|
|
5647
5547
|
if (typeof elementType === "undefined") {
|
|
5648
|
-
throw new _helperApiError.CompileError("Unknown element type in table: " + toHex(
|
|
5548
|
+
throw new _helperApiError.CompileError("Unknown element type in table: " + toHex(elementTypeByte));
|
|
5649
5549
|
}
|
|
5650
5550
|
var limits = parseLimits();
|
|
5651
5551
|
return t.table(elementType, limits, name);
|
|
@@ -5714,6 +5614,16 @@ var require_decoder2 = __commonJS({
|
|
|
5714
5614
|
var subSectionSizeInBytesu32 = readVaruint32();
|
|
5715
5615
|
eatBytes(subSectionSizeInBytesu32.nextIndex);
|
|
5716
5616
|
switch (sectionTypeByte.value) {
|
|
5617
|
+
// case 0: {
|
|
5618
|
+
// TODO(sven): re-enable that
|
|
5619
|
+
// Current status: it seems that when we decode the module's name
|
|
5620
|
+
// no name_payload_len is used.
|
|
5621
|
+
//
|
|
5622
|
+
// See https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#name-section
|
|
5623
|
+
//
|
|
5624
|
+
// nameMetadata.push(...parseNameModule());
|
|
5625
|
+
// break;
|
|
5626
|
+
// }
|
|
5717
5627
|
case 1: {
|
|
5718
5628
|
nameMetadata.push.apply(nameMetadata, _toConsumableArray(parseNameSectionFunctions()));
|
|
5719
5629
|
break;
|
|
@@ -5763,10 +5673,10 @@ var require_decoder2 = __commonJS({
|
|
|
5763
5673
|
var globalType = parseGlobalType();
|
|
5764
5674
|
var init = [];
|
|
5765
5675
|
parseInstructionBlock(init);
|
|
5766
|
-
var node = function() {
|
|
5676
|
+
var node = (function() {
|
|
5767
5677
|
var endLoc = getPosition();
|
|
5768
5678
|
return t.withLoc(t.global(globalType, init), endLoc, _startLoc11);
|
|
5769
|
-
}();
|
|
5679
|
+
})();
|
|
5770
5680
|
globals.push(node);
|
|
5771
5681
|
state.globalsInModule.push(node);
|
|
5772
5682
|
}
|
|
@@ -5778,28 +5688,130 @@ var require_decoder2 = __commonJS({
|
|
|
5778
5688
|
for (var i = 0; i < numberOfElements; i++) {
|
|
5779
5689
|
var _startLoc12 = getPosition();
|
|
5780
5690
|
var tableindexu32 = readU32();
|
|
5781
|
-
var
|
|
5691
|
+
var bitfield = tableindexu32.value;
|
|
5782
5692
|
eatBytes(tableindexu32.nextIndex);
|
|
5783
|
-
dump([
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
var
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5693
|
+
dump([bitfield], "bitfield");
|
|
5694
|
+
if (bitfield === 0) {
|
|
5695
|
+
var instr = [];
|
|
5696
|
+
parseInstructionBlock(instr);
|
|
5697
|
+
var indicesu32 = readU32();
|
|
5698
|
+
var indices = indicesu32.value;
|
|
5699
|
+
eatBytes(indicesu32.nextIndex);
|
|
5700
|
+
dump([indices], "num indices");
|
|
5701
|
+
var indexValues = [];
|
|
5702
|
+
for (var _i5 = 0; _i5 < indices; _i5++) {
|
|
5703
|
+
var indexu32 = readU32();
|
|
5704
|
+
var index = indexu32.value;
|
|
5705
|
+
eatBytes(indexu32.nextIndex);
|
|
5706
|
+
dump([index], "index");
|
|
5707
|
+
indexValues.push(t.indexLiteral(index));
|
|
5708
|
+
}
|
|
5709
|
+
var elemNode = (function() {
|
|
5710
|
+
var endLoc = getPosition();
|
|
5711
|
+
return t.withLoc(t.elem(t.indexLiteral(bitfield), instr, indexValues), endLoc, _startLoc12);
|
|
5712
|
+
})();
|
|
5713
|
+
elems.push(elemNode);
|
|
5714
|
+
} else if (bitfield === 1) {
|
|
5715
|
+
var elemKind = readByte();
|
|
5716
|
+
eatBytes(1);
|
|
5717
|
+
if (elemKind !== 0) {
|
|
5718
|
+
throw new Error("unexpected Elem kind: ".concat(toHex(elemKind)));
|
|
5719
|
+
}
|
|
5720
|
+
var _indicesu = readU32();
|
|
5721
|
+
var _indices = _indicesu.value;
|
|
5722
|
+
eatBytes(_indicesu.nextIndex);
|
|
5723
|
+
dump([_indices], "num indices");
|
|
5724
|
+
var _indexValues = [];
|
|
5725
|
+
for (var _i6 = 0; _i6 < _indices; _i6++) {
|
|
5726
|
+
var _indexu2 = readU32();
|
|
5727
|
+
var _index3 = _indexu2.value;
|
|
5728
|
+
eatBytes(_indexu2.nextIndex);
|
|
5729
|
+
dump([_index3], "index");
|
|
5730
|
+
_indexValues.push(t.indexLiteral(_index3));
|
|
5731
|
+
}
|
|
5732
|
+
} else if (bitfield === 2) {
|
|
5733
|
+
var u32 = readU32();
|
|
5734
|
+
var tableidx = u32.value;
|
|
5735
|
+
eatBytes(u32.nextIndex);
|
|
5736
|
+
dump([tableidx], "tableidx");
|
|
5737
|
+
var _instr3 = [];
|
|
5738
|
+
parseInstructionBlock(_instr3);
|
|
5739
|
+
var _elemKind = readByte();
|
|
5740
|
+
eatBytes(1);
|
|
5741
|
+
if (_elemKind !== 0) {
|
|
5742
|
+
throw new Error("unexpected Elem kind: ".concat(toHex(_elemKind)));
|
|
5743
|
+
}
|
|
5744
|
+
var _indicesu2 = readU32();
|
|
5745
|
+
var _indices2 = _indicesu2.value;
|
|
5746
|
+
eatBytes(_indicesu2.nextIndex);
|
|
5747
|
+
dump([_indices2], "num indices");
|
|
5748
|
+
var _indexValues2 = [];
|
|
5749
|
+
for (var _i7 = 0; _i7 < _indices2; _i7++) {
|
|
5750
|
+
var _indexu3 = readU32();
|
|
5751
|
+
var _index4 = _indexu3.value;
|
|
5752
|
+
eatBytes(_indexu3.nextIndex);
|
|
5753
|
+
dump([_index4], "index");
|
|
5754
|
+
_indexValues2.push(t.indexLiteral(_index4));
|
|
5755
|
+
}
|
|
5756
|
+
var _elemNode = (function() {
|
|
5757
|
+
var endLoc = getPosition();
|
|
5758
|
+
return t.withLoc(t.elem(t.indexLiteral(bitfield), _instr3, _indexValues2), endLoc, _startLoc12);
|
|
5759
|
+
})();
|
|
5760
|
+
elems.push(_elemNode);
|
|
5761
|
+
} else if (bitfield === 3) {
|
|
5762
|
+
var _elemKind2 = readByte();
|
|
5763
|
+
eatBytes(1);
|
|
5764
|
+
if (_elemKind2 !== 0) {
|
|
5765
|
+
throw new Error("unexpected Elem kind: ".concat(toHex(_elemKind2)));
|
|
5766
|
+
}
|
|
5767
|
+
var countU32 = readU32();
|
|
5768
|
+
var count = countU32.value;
|
|
5769
|
+
eatBytes(countU32.nextIndex);
|
|
5770
|
+
dump([count], "count");
|
|
5771
|
+
for (var _i8 = 0; _i8 < count; _i8++) {
|
|
5772
|
+
var _indexu4 = readU32();
|
|
5773
|
+
var _index5 = _indexu4.value;
|
|
5774
|
+
eatBytes(_indexu4.nextIndex);
|
|
5775
|
+
dump([_index5], "index");
|
|
5776
|
+
}
|
|
5777
|
+
} else if (bitfield === 4) {
|
|
5778
|
+
var expr = [];
|
|
5779
|
+
parseInstructionBlock(expr);
|
|
5780
|
+
var _countU = readU32();
|
|
5781
|
+
var _count = _countU.value;
|
|
5782
|
+
eatBytes(_countU.nextIndex);
|
|
5783
|
+
dump([_count], "count");
|
|
5784
|
+
for (var _i9 = 0; _i9 < _count; _i9++) {
|
|
5785
|
+
var code = [];
|
|
5786
|
+
parseInstructionBlock(code);
|
|
5787
|
+
}
|
|
5788
|
+
} else if (bitfield === 5) {
|
|
5789
|
+
var reftype = readByte();
|
|
5790
|
+
eatBytes(1);
|
|
5791
|
+
dump([reftype], "reftype");
|
|
5792
|
+
var _countU2 = readU32();
|
|
5793
|
+
var _count2 = _countU2.value;
|
|
5794
|
+
eatBytes(_countU2.nextIndex);
|
|
5795
|
+
dump([_count2], "count");
|
|
5796
|
+
for (var _i10 = 0; _i10 < _count2; _i10++) {
|
|
5797
|
+
var _code = [];
|
|
5798
|
+
parseInstructionBlock(_code);
|
|
5799
|
+
}
|
|
5800
|
+
} else if (bitfield === 7) {
|
|
5801
|
+
var _reftype = readByte();
|
|
5802
|
+
eatBytes(1);
|
|
5803
|
+
dump([_reftype], "reftype");
|
|
5804
|
+
var _countU3 = readU32();
|
|
5805
|
+
var _count3 = _countU3.value;
|
|
5806
|
+
eatBytes(_countU3.nextIndex);
|
|
5807
|
+
dump([_count3], "count");
|
|
5808
|
+
for (var _i11 = 0; _i11 < _count3; _i11++) {
|
|
5809
|
+
var _code2 = [];
|
|
5810
|
+
parseInstructionBlock(_code2);
|
|
5811
|
+
}
|
|
5812
|
+
} else {
|
|
5813
|
+
throw new Error("unexpected Elem with bitfield ".concat(toHex(bitfield)));
|
|
5797
5814
|
}
|
|
5798
|
-
var elemNode = function() {
|
|
5799
|
-
var endLoc = getPosition();
|
|
5800
|
-
return t.withLoc(t.elem(t.indexLiteral(tableindex), instr, indexValues), endLoc, _startLoc12);
|
|
5801
|
-
}();
|
|
5802
|
-
elems.push(elemNode);
|
|
5803
5815
|
}
|
|
5804
5816
|
return elems;
|
|
5805
5817
|
}
|
|
@@ -5833,10 +5845,10 @@ var require_decoder2 = __commonJS({
|
|
|
5833
5845
|
var startFuncIndex = u32.value;
|
|
5834
5846
|
eatBytes(u32.nextIndex);
|
|
5835
5847
|
dump([startFuncIndex], "index");
|
|
5836
|
-
return function() {
|
|
5848
|
+
return (function() {
|
|
5837
5849
|
var endLoc = getPosition();
|
|
5838
5850
|
return t.withLoc(t.start(t.indexLiteral(startFuncIndex)), endLoc, startLoc);
|
|
5839
|
-
}();
|
|
5851
|
+
})();
|
|
5840
5852
|
}
|
|
5841
5853
|
function parseDataSection(numberOfElements) {
|
|
5842
5854
|
var dataEntries = [];
|
|
@@ -5868,8 +5880,7 @@ var require_decoder2 = __commonJS({
|
|
|
5868
5880
|
if (sectionId >= sectionIndex2 || sectionIndex2 === _helperWasmBytecode["default"].sections.custom) {
|
|
5869
5881
|
sectionIndex2 = sectionId + 1;
|
|
5870
5882
|
} else {
|
|
5871
|
-
if (sectionId !== _helperWasmBytecode["default"].sections.custom)
|
|
5872
|
-
throw new _helperApiError.CompileError("Unexpected section: " + toHex(sectionId));
|
|
5883
|
+
if (sectionId !== _helperWasmBytecode["default"].sections.custom) throw new _helperApiError.CompileError("Unexpected section: " + toHex(sectionId));
|
|
5873
5884
|
}
|
|
5874
5885
|
var nextSectionIndex2 = sectionIndex2;
|
|
5875
5886
|
var startOffset = offset;
|
|
@@ -5877,10 +5888,10 @@ var require_decoder2 = __commonJS({
|
|
|
5877
5888
|
var u32 = readU32();
|
|
5878
5889
|
var sectionSizeInBytes = u32.value;
|
|
5879
5890
|
eatBytes(u32.nextIndex);
|
|
5880
|
-
var sectionSizeInBytesNode = function() {
|
|
5891
|
+
var sectionSizeInBytesNode = (function() {
|
|
5881
5892
|
var endLoc = getPosition();
|
|
5882
5893
|
return t.withLoc(t.numberLiteralFromRaw(sectionSizeInBytes), endLoc, startLoc);
|
|
5883
|
-
}();
|
|
5894
|
+
})();
|
|
5884
5895
|
switch (sectionId) {
|
|
5885
5896
|
case _helperWasmBytecode["default"].sections.type: {
|
|
5886
5897
|
dumpSep("section Type");
|
|
@@ -5890,10 +5901,10 @@ var require_decoder2 = __commonJS({
|
|
|
5890
5901
|
var _u = readU32();
|
|
5891
5902
|
var numberOfTypes = _u.value;
|
|
5892
5903
|
eatBytes(_u.nextIndex);
|
|
5893
|
-
var metadata2 = t.sectionMetadata("type", startOffset, sectionSizeInBytesNode, function() {
|
|
5904
|
+
var metadata2 = t.sectionMetadata("type", startOffset, sectionSizeInBytesNode, (function() {
|
|
5894
5905
|
var endLoc = getPosition();
|
|
5895
5906
|
return t.withLoc(t.numberLiteralFromRaw(numberOfTypes), endLoc, _startLoc13);
|
|
5896
|
-
}());
|
|
5907
|
+
})());
|
|
5897
5908
|
var nodes2 = parseTypeSection(numberOfTypes);
|
|
5898
5909
|
return {
|
|
5899
5910
|
nodes: nodes2,
|
|
@@ -5910,10 +5921,10 @@ var require_decoder2 = __commonJS({
|
|
|
5910
5921
|
var numberOfTable = _u2.value;
|
|
5911
5922
|
eatBytes(_u2.nextIndex);
|
|
5912
5923
|
dump([numberOfTable], "num tables");
|
|
5913
|
-
var _metadata = t.sectionMetadata("table", startOffset, sectionSizeInBytesNode, function() {
|
|
5924
|
+
var _metadata = t.sectionMetadata("table", startOffset, sectionSizeInBytesNode, (function() {
|
|
5914
5925
|
var endLoc = getPosition();
|
|
5915
5926
|
return t.withLoc(t.numberLiteralFromRaw(numberOfTable), endLoc, _startLoc14);
|
|
5916
|
-
}());
|
|
5927
|
+
})());
|
|
5917
5928
|
var _nodes = parseTableSection(numberOfTable);
|
|
5918
5929
|
return {
|
|
5919
5930
|
nodes: _nodes,
|
|
@@ -5930,10 +5941,10 @@ var require_decoder2 = __commonJS({
|
|
|
5930
5941
|
var numberOfImports = numberOfImportsu32.value;
|
|
5931
5942
|
eatBytes(numberOfImportsu32.nextIndex);
|
|
5932
5943
|
dump([numberOfImports], "number of imports");
|
|
5933
|
-
var _metadata2 = t.sectionMetadata("import", startOffset, sectionSizeInBytesNode, function() {
|
|
5944
|
+
var _metadata2 = t.sectionMetadata("import", startOffset, sectionSizeInBytesNode, (function() {
|
|
5934
5945
|
var endLoc = getPosition();
|
|
5935
5946
|
return t.withLoc(t.numberLiteralFromRaw(numberOfImports), endLoc, _startLoc15);
|
|
5936
|
-
}());
|
|
5947
|
+
})());
|
|
5937
5948
|
var _nodes2 = parseImportSection(numberOfImports);
|
|
5938
5949
|
return {
|
|
5939
5950
|
nodes: _nodes2,
|
|
@@ -5949,10 +5960,10 @@ var require_decoder2 = __commonJS({
|
|
|
5949
5960
|
var numberOfFunctionsu32 = readU32();
|
|
5950
5961
|
var numberOfFunctions = numberOfFunctionsu32.value;
|
|
5951
5962
|
eatBytes(numberOfFunctionsu32.nextIndex);
|
|
5952
|
-
var _metadata3 = t.sectionMetadata("func", startOffset, sectionSizeInBytesNode, function() {
|
|
5963
|
+
var _metadata3 = t.sectionMetadata("func", startOffset, sectionSizeInBytesNode, (function() {
|
|
5953
5964
|
var endLoc = getPosition();
|
|
5954
5965
|
return t.withLoc(t.numberLiteralFromRaw(numberOfFunctions), endLoc, _startLoc16);
|
|
5955
|
-
}());
|
|
5966
|
+
})());
|
|
5956
5967
|
parseFuncSection(numberOfFunctions);
|
|
5957
5968
|
var _nodes3 = [];
|
|
5958
5969
|
return {
|
|
@@ -5969,10 +5980,10 @@ var require_decoder2 = __commonJS({
|
|
|
5969
5980
|
var _u3 = readU32();
|
|
5970
5981
|
var numberOfExport = _u3.value;
|
|
5971
5982
|
eatBytes(_u3.nextIndex);
|
|
5972
|
-
var _metadata4 = t.sectionMetadata("export", startOffset, sectionSizeInBytesNode, function() {
|
|
5983
|
+
var _metadata4 = t.sectionMetadata("export", startOffset, sectionSizeInBytesNode, (function() {
|
|
5973
5984
|
var endLoc = getPosition();
|
|
5974
5985
|
return t.withLoc(t.numberLiteralFromRaw(numberOfExport), endLoc, _startLoc17);
|
|
5975
|
-
}());
|
|
5986
|
+
})());
|
|
5976
5987
|
parseExportSection(numberOfExport);
|
|
5977
5988
|
var _nodes4 = [];
|
|
5978
5989
|
return {
|
|
@@ -5989,10 +6000,10 @@ var require_decoder2 = __commonJS({
|
|
|
5989
6000
|
var _u4 = readU32();
|
|
5990
6001
|
var numberOfFuncs = _u4.value;
|
|
5991
6002
|
eatBytes(_u4.nextIndex);
|
|
5992
|
-
var _metadata5 = t.sectionMetadata("code", startOffset, sectionSizeInBytesNode, function() {
|
|
6003
|
+
var _metadata5 = t.sectionMetadata("code", startOffset, sectionSizeInBytesNode, (function() {
|
|
5993
6004
|
var endLoc = getPosition();
|
|
5994
6005
|
return t.withLoc(t.numberLiteralFromRaw(numberOfFuncs), endLoc, _startLoc18);
|
|
5995
|
-
}());
|
|
6006
|
+
})());
|
|
5996
6007
|
if (opts.ignoreCodeSection === true) {
|
|
5997
6008
|
var remainingBytes = sectionSizeInBytes - _u4.nextIndex;
|
|
5998
6009
|
eatBytes(remainingBytes);
|
|
@@ -6026,10 +6037,10 @@ var require_decoder2 = __commonJS({
|
|
|
6026
6037
|
var numberOfElementsu32 = readU32();
|
|
6027
6038
|
var numberOfElements = numberOfElementsu32.value;
|
|
6028
6039
|
eatBytes(numberOfElementsu32.nextIndex);
|
|
6029
|
-
var _metadata7 = t.sectionMetadata("element", startOffset, sectionSizeInBytesNode, function() {
|
|
6040
|
+
var _metadata7 = t.sectionMetadata("element", startOffset, sectionSizeInBytesNode, (function() {
|
|
6030
6041
|
var endLoc = getPosition();
|
|
6031
6042
|
return t.withLoc(t.numberLiteralFromRaw(numberOfElements), endLoc, _startLoc19);
|
|
6032
|
-
}());
|
|
6043
|
+
})());
|
|
6033
6044
|
var _nodes7 = parseElemSection(numberOfElements);
|
|
6034
6045
|
return {
|
|
6035
6046
|
nodes: _nodes7,
|
|
@@ -6045,10 +6056,10 @@ var require_decoder2 = __commonJS({
|
|
|
6045
6056
|
var numberOfGlobalsu32 = readU32();
|
|
6046
6057
|
var numberOfGlobals = numberOfGlobalsu32.value;
|
|
6047
6058
|
eatBytes(numberOfGlobalsu32.nextIndex);
|
|
6048
|
-
var _metadata8 = t.sectionMetadata("global", startOffset, sectionSizeInBytesNode, function() {
|
|
6059
|
+
var _metadata8 = t.sectionMetadata("global", startOffset, sectionSizeInBytesNode, (function() {
|
|
6049
6060
|
var endLoc = getPosition();
|
|
6050
6061
|
return t.withLoc(t.numberLiteralFromRaw(numberOfGlobals), endLoc, _startLoc20);
|
|
6051
|
-
}());
|
|
6062
|
+
})());
|
|
6052
6063
|
var _nodes8 = parseGlobalSection(numberOfGlobals);
|
|
6053
6064
|
return {
|
|
6054
6065
|
nodes: _nodes8,
|
|
@@ -6064,10 +6075,10 @@ var require_decoder2 = __commonJS({
|
|
|
6064
6075
|
var _numberOfElementsu = readU32();
|
|
6065
6076
|
var _numberOfElements = _numberOfElementsu.value;
|
|
6066
6077
|
eatBytes(_numberOfElementsu.nextIndex);
|
|
6067
|
-
var _metadata9 = t.sectionMetadata("memory", startOffset, sectionSizeInBytesNode, function() {
|
|
6078
|
+
var _metadata9 = t.sectionMetadata("memory", startOffset, sectionSizeInBytesNode, (function() {
|
|
6068
6079
|
var endLoc = getPosition();
|
|
6069
6080
|
return t.withLoc(t.numberLiteralFromRaw(_numberOfElements), endLoc, _startLoc21);
|
|
6070
|
-
}());
|
|
6081
|
+
})());
|
|
6071
6082
|
var _nodes9 = parseMemorySection(_numberOfElements);
|
|
6072
6083
|
return {
|
|
6073
6084
|
nodes: _nodes9,
|
|
@@ -6084,10 +6095,10 @@ var require_decoder2 = __commonJS({
|
|
|
6084
6095
|
var _numberOfElementsu2 = readU32();
|
|
6085
6096
|
var _numberOfElements2 = _numberOfElementsu2.value;
|
|
6086
6097
|
eatBytes(_numberOfElementsu2.nextIndex);
|
|
6087
|
-
_metadata10.vectorOfSize = function() {
|
|
6098
|
+
_metadata10.vectorOfSize = (function() {
|
|
6088
6099
|
var endLoc = getPosition();
|
|
6089
6100
|
return t.withLoc(t.numberLiteralFromRaw(_numberOfElements2), endLoc, _startLoc22);
|
|
6090
|
-
}();
|
|
6101
|
+
})();
|
|
6091
6102
|
if (opts.ignoreDataSection === true) {
|
|
6092
6103
|
var _remainingBytes = sectionSizeInBytes - _numberOfElementsu2.nextIndex;
|
|
6093
6104
|
eatBytes(_remainingBytes);
|
|
@@ -6157,6 +6168,24 @@ var require_decoder2 = __commonJS({
|
|
|
6157
6168
|
};
|
|
6158
6169
|
}
|
|
6159
6170
|
}
|
|
6171
|
+
function parseBlockType() {
|
|
6172
|
+
var blocktypeByte = readByte();
|
|
6173
|
+
var blocktype = _helperWasmBytecode["default"].blockTypes[blocktypeByte];
|
|
6174
|
+
if (typeof blocktype !== "undefined") {
|
|
6175
|
+
eatBytes(1);
|
|
6176
|
+
dump([blocktypeByte], "blocktype");
|
|
6177
|
+
return blocktype;
|
|
6178
|
+
} else {
|
|
6179
|
+
var u32 = readU32();
|
|
6180
|
+
eatBytes(u32.nextIndex);
|
|
6181
|
+
var signature = state.typesInModule[u32.value];
|
|
6182
|
+
console.log({
|
|
6183
|
+
signature
|
|
6184
|
+
});
|
|
6185
|
+
dump([u32.value], "typeidx");
|
|
6186
|
+
return u32.value;
|
|
6187
|
+
}
|
|
6188
|
+
}
|
|
6160
6189
|
parseModuleHeader();
|
|
6161
6190
|
parseVersion();
|
|
6162
6191
|
var moduleFields = [];
|
|
@@ -6226,10 +6255,8 @@ var require_decoder2 = __commonJS({
|
|
|
6226
6255
|
}
|
|
6227
6256
|
}
|
|
6228
6257
|
});
|
|
6229
|
-
|
|
6230
|
-
// node_modules/.pnpm/@webassemblyjs+wasm-parser@1.12.1/node_modules/@webassemblyjs/wasm-parser/lib/index.js
|
|
6231
6258
|
var require_lib9 = __commonJS({
|
|
6232
|
-
"node_modules/.pnpm/@webassemblyjs+wasm-parser@1.
|
|
6259
|
+
"node_modules/.pnpm/@webassemblyjs+wasm-parser@1.14.1/node_modules/@webassemblyjs/wasm-parser/lib/index.js"(exports) {
|
|
6233
6260
|
function _typeof(obj) {
|
|
6234
6261
|
"@babel/helpers - typeof";
|
|
6235
6262
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
@@ -6250,8 +6277,7 @@ var require_lib9 = __commonJS({
|
|
|
6250
6277
|
var decoder = _interopRequireWildcard(require_decoder2());
|
|
6251
6278
|
var t = _interopRequireWildcard(require_lib7());
|
|
6252
6279
|
function _getRequireWildcardCache(nodeInterop) {
|
|
6253
|
-
if (typeof WeakMap !== "function")
|
|
6254
|
-
return null;
|
|
6280
|
+
if (typeof WeakMap !== "function") return null;
|
|
6255
6281
|
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
6256
6282
|
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
6257
6283
|
return (_getRequireWildcardCache = function _getRequireWildcardCache2(nodeInterop2) {
|
|
@@ -6259,7 +6285,7 @@ var require_lib9 = __commonJS({
|
|
|
6259
6285
|
})(nodeInterop);
|
|
6260
6286
|
}
|
|
6261
6287
|
function _interopRequireWildcard(obj, nodeInterop) {
|
|
6262
|
-
if (
|
|
6288
|
+
if (obj && obj.__esModule) {
|
|
6263
6289
|
return obj;
|
|
6264
6290
|
}
|
|
6265
6291
|
if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
|
|
@@ -6308,7 +6334,7 @@ var require_lib9 = __commonJS({
|
|
|
6308
6334
|
return;
|
|
6309
6335
|
}
|
|
6310
6336
|
t.traverse(ast, {
|
|
6311
|
-
Func: function(_Func) {
|
|
6337
|
+
Func: (function(_Func) {
|
|
6312
6338
|
function Func(_x) {
|
|
6313
6339
|
return _Func.apply(this, arguments);
|
|
6314
6340
|
}
|
|
@@ -6316,7 +6342,7 @@ var require_lib9 = __commonJS({
|
|
|
6316
6342
|
return _Func.toString();
|
|
6317
6343
|
};
|
|
6318
6344
|
return Func;
|
|
6319
|
-
}(function(_ref2) {
|
|
6345
|
+
})(function(_ref2) {
|
|
6320
6346
|
var node = _ref2.node;
|
|
6321
6347
|
var nodeName = node.name;
|
|
6322
6348
|
var indexBasedFunctionName = nodeName.value;
|
|
@@ -6332,7 +6358,7 @@ var require_lib9 = __commonJS({
|
|
|
6332
6358
|
}
|
|
6333
6359
|
}),
|
|
6334
6360
|
// Also update the reference in the export
|
|
6335
|
-
ModuleExport: function(_ModuleExport) {
|
|
6361
|
+
ModuleExport: (function(_ModuleExport) {
|
|
6336
6362
|
function ModuleExport(_x2) {
|
|
6337
6363
|
return _ModuleExport.apply(this, arguments);
|
|
6338
6364
|
}
|
|
@@ -6340,7 +6366,7 @@ var require_lib9 = __commonJS({
|
|
|
6340
6366
|
return _ModuleExport.toString();
|
|
6341
6367
|
};
|
|
6342
6368
|
return ModuleExport;
|
|
6343
|
-
}(function(_ref3) {
|
|
6369
|
+
})(function(_ref3) {
|
|
6344
6370
|
var node = _ref3.node;
|
|
6345
6371
|
if (node.descr.exportType === "Func") {
|
|
6346
6372
|
var nodeName = node.descr.id;
|
|
@@ -6353,7 +6379,7 @@ var require_lib9 = __commonJS({
|
|
|
6353
6379
|
}
|
|
6354
6380
|
}
|
|
6355
6381
|
}),
|
|
6356
|
-
ModuleImport: function(_ModuleImport) {
|
|
6382
|
+
ModuleImport: (function(_ModuleImport) {
|
|
6357
6383
|
function ModuleImport(_x3) {
|
|
6358
6384
|
return _ModuleImport.apply(this, arguments);
|
|
6359
6385
|
}
|
|
@@ -6361,7 +6387,7 @@ var require_lib9 = __commonJS({
|
|
|
6361
6387
|
return _ModuleImport.toString();
|
|
6362
6388
|
};
|
|
6363
6389
|
return ModuleImport;
|
|
6364
|
-
}(function(_ref4) {
|
|
6390
|
+
})(function(_ref4) {
|
|
6365
6391
|
var node = _ref4.node;
|
|
6366
6392
|
if (node.descr.type === "FuncImportDescr") {
|
|
6367
6393
|
var indexBasedFunctionName = node.descr.id;
|
|
@@ -6374,7 +6400,7 @@ var require_lib9 = __commonJS({
|
|
|
6374
6400
|
}
|
|
6375
6401
|
}
|
|
6376
6402
|
}),
|
|
6377
|
-
CallInstruction: function(_CallInstruction) {
|
|
6403
|
+
CallInstruction: (function(_CallInstruction) {
|
|
6378
6404
|
function CallInstruction(_x4) {
|
|
6379
6405
|
return _CallInstruction.apply(this, arguments);
|
|
6380
6406
|
}
|
|
@@ -6382,7 +6408,7 @@ var require_lib9 = __commonJS({
|
|
|
6382
6408
|
return _CallInstruction.toString();
|
|
6383
6409
|
};
|
|
6384
6410
|
return CallInstruction;
|
|
6385
|
-
}(function(nodePath) {
|
|
6411
|
+
})(function(nodePath) {
|
|
6386
6412
|
var node = nodePath.node;
|
|
6387
6413
|
var index = node.index.value;
|
|
6388
6414
|
var functionName = functionNames.find(function(f) {
|
|
@@ -6413,7 +6439,7 @@ var require_lib9 = __commonJS({
|
|
|
6413
6439
|
return;
|
|
6414
6440
|
}
|
|
6415
6441
|
t.traverse(ast, {
|
|
6416
|
-
Func: function(_Func2) {
|
|
6442
|
+
Func: (function(_Func2) {
|
|
6417
6443
|
function Func(_x5) {
|
|
6418
6444
|
return _Func2.apply(this, arguments);
|
|
6419
6445
|
}
|
|
@@ -6421,7 +6447,7 @@ var require_lib9 = __commonJS({
|
|
|
6421
6447
|
return _Func2.toString();
|
|
6422
6448
|
};
|
|
6423
6449
|
return Func;
|
|
6424
|
-
}(function(_ref6) {
|
|
6450
|
+
})(function(_ref6) {
|
|
6425
6451
|
var node = _ref6.node;
|
|
6426
6452
|
var signature = node.signature;
|
|
6427
6453
|
if (signature.type !== "Signature") {
|
|
@@ -6443,7 +6469,7 @@ var require_lib9 = __commonJS({
|
|
|
6443
6469
|
}
|
|
6444
6470
|
function restoreModuleName(ast) {
|
|
6445
6471
|
t.traverse(ast, {
|
|
6446
|
-
ModuleNameMetadata: function(_ModuleNameMetadata) {
|
|
6472
|
+
ModuleNameMetadata: (function(_ModuleNameMetadata) {
|
|
6447
6473
|
function ModuleNameMetadata(_x6) {
|
|
6448
6474
|
return _ModuleNameMetadata.apply(this, arguments);
|
|
6449
6475
|
}
|
|
@@ -6451,9 +6477,9 @@ var require_lib9 = __commonJS({
|
|
|
6451
6477
|
return _ModuleNameMetadata.toString();
|
|
6452
6478
|
};
|
|
6453
6479
|
return ModuleNameMetadata;
|
|
6454
|
-
}(function(moduleNameMetadataPath) {
|
|
6480
|
+
})(function(moduleNameMetadataPath) {
|
|
6455
6481
|
t.traverse(ast, {
|
|
6456
|
-
Module: function(_Module) {
|
|
6482
|
+
Module: (function(_Module) {
|
|
6457
6483
|
function Module(_x7) {
|
|
6458
6484
|
return _Module.apply(this, arguments);
|
|
6459
6485
|
}
|
|
@@ -6461,7 +6487,7 @@ var require_lib9 = __commonJS({
|
|
|
6461
6487
|
return _Module.toString();
|
|
6462
6488
|
};
|
|
6463
6489
|
return Module;
|
|
6464
|
-
}(function(_ref7) {
|
|
6490
|
+
})(function(_ref7) {
|
|
6465
6491
|
var node = _ref7.node;
|
|
6466
6492
|
var name = moduleNameMetadataPath.node.value;
|
|
6467
6493
|
if (name === "") {
|
|
@@ -6485,9 +6511,7 @@ var require_lib9 = __commonJS({
|
|
|
6485
6511
|
}
|
|
6486
6512
|
}
|
|
6487
6513
|
});
|
|
6488
|
-
|
|
6489
|
-
// lib/wasm-parser.in.mjs
|
|
6490
|
-
var import_wasm_parser = __toESM(require_lib9(), 1);
|
|
6514
|
+
var import_wasm_parser = __toESM(require_lib9());
|
|
6491
6515
|
var export_decode = import_wasm_parser.decode;
|
|
6492
6516
|
|
|
6493
6517
|
function parseWasm(source, opts = {}) {
|