porffor 0.49.3 → 0.49.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/wrap.js +4 -9
- package/package.json +1 -1
- package/runner/index.js +1 -1
package/compiler/wrap.js
CHANGED
@@ -384,7 +384,7 @@ export default (source, module = undefined, customImports = {}, print = str => p
|
|
384
384
|
|
385
385
|
const backtrace = (funcInd, blobOffset) => {
|
386
386
|
if (funcInd == null || blobOffset == null ||
|
387
|
-
Number.isNaN(funcInd) || Number.isNaN(blobOffset)) return false;
|
387
|
+
Number.isNaN(funcInd) || Number.isNaN(blobOffset) || Prefs.backtrace === false) return false;
|
388
388
|
|
389
389
|
// convert blob offset -> function wasm offset
|
390
390
|
const func = funcs.find(x => x.asmIndex === funcInd);
|
@@ -500,15 +500,10 @@ export default (source, module = undefined, customImports = {}, print = str => p
|
|
500
500
|
continue;
|
501
501
|
}
|
502
502
|
|
503
|
-
const
|
504
|
-
|
505
|
-
|
506
|
-
const exp = instance.exports[x];
|
507
|
-
exports[func.name] = exp;
|
508
|
-
|
509
|
-
exports[func.name] = function() {
|
503
|
+
const wasm = instance.exports[x];
|
504
|
+
exports[x === 'm' ? 'main' : x] = function() {
|
510
505
|
try {
|
511
|
-
const ret =
|
506
|
+
const ret = wasm.apply(this, arguments);
|
512
507
|
if (ret == null) return undefined;
|
513
508
|
|
514
509
|
if (rawValues) return { value: ret[0], type: ret[1], js: porfToJSValue({ memory, funcs, pages }, ret[0], ret[1]) };
|
package/package.json
CHANGED