porffor 0.50.15 → 0.50.16

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 CHANGED
@@ -514,17 +514,15 @@ export default (source, module = undefined, customImports = {}, print = str => p
514
514
  const exceptionMode = Prefs.exceptionMode ?? 'stack';
515
515
  if (exceptionMode === 'lut') {
516
516
  const exceptId = e.getArg(exceptTag, 0);
517
- const exception = exceptions[exceptId];
518
-
519
- const constructorName = exception.constructor;
517
+ const { constructor, message } = exceptions[exceptId];
520
518
 
521
519
  // no constructor, just throw message
522
- if (!constructorName) throw exception.message;
520
+ if (!constructor) throw message;
523
521
 
524
- const err = new Error(obj.message);
525
- err.name = constructorName;
526
- err.stack = `${constructorName}: ${exception.message}`;
527
- throw new constructor(exception.message);
522
+ const err = new Error(message);
523
+ err.name = constructor;
524
+ err.stack = `${constructor}: ${message}`;
525
+ return err;
528
526
  }
529
527
 
530
528
  const value = e.getArg(exceptTag, 0);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "a basic experimental wip aot optimizing js -> wasm engine/compiler/runtime in js",
4
- "version": "0.50.15",
4
+ "version": "0.50.16",
5
5
  "author": "CanadaHonk",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runner/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.50.15';
3
+ globalThis.version = '0.50.16';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {