porffor 0.60.25 → 0.60.26

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.
@@ -2393,7 +2393,10 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {
2393
2393
 
2394
2394
  protoBC.default = decl.optional ?
2395
2395
  withType(scope, [ number(UNDEFINED) ], TYPES.undefined) :
2396
- internalThrow(scope, 'TypeError', `'${protoName}' proto func tried to be called on a type without an impl`, true);
2396
+ generate(scope, {
2397
+ ...decl,
2398
+ _protoInternalCall: true
2399
+ });
2397
2400
 
2398
2401
  // fallback to object prototype impl as a basic prototype chain hack
2399
2402
  if (protoBC[TYPES.object]) {
@@ -91,7 +91,7 @@ export default ({ name, wasm, locals: _locals, params }, _globals) => {
91
91
  // if (Prefs.f === name) console.log(invOpcodes[opcode], stack);
92
92
  switch (opcode) {
93
93
  case Opcodes.if: {
94
- if (stack.length < 1) { empty(); break; }
94
+ if (stack.length < 1) { reset(); break; }
95
95
  const cond = bool(pop());
96
96
 
97
97
  // find else split and end
@@ -598,7 +598,6 @@ export default ({ name, wasm, locals: _locals, params }, _globals) => {
598
598
  case Opcodes.block:
599
599
  case Opcodes.loop:
600
600
  case Opcodes.try:
601
- case Opcodes.if:
602
601
  case Opcodes.else:
603
602
  case Opcodes.catch:
604
603
  case Opcodes.end: {
package/jsr.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@honk/porffor",
3
- "version": "0.60.25",
3
+ "version": "0.60.26",
4
4
  "exports": "./compiler/wrap.js",
5
5
  "publish": {
6
6
  "exclude": [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "An ahead-of-time JavaScript compiler",
4
- "version": "0.60.25",
4
+ "version": "0.60.26",
5
5
  "author": "Oliver Medhurst <honk@goose.icu>",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runtime/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.60.25';
3
+ globalThis.version = '0.60.26';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {