porffor 0.57.14 → 0.57.15

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.
@@ -657,7 +657,7 @@ locals:[],localNames:["_this","_this#type","newLength","newLength#type"],
657
657
  usesTag:1,
658
658
  }
659
659
  this.__Atomics_isLockFree = {
660
- wasm:()=>[[32,0],[33,2],[65,1],[33,3],[2,64],[2,64],[2,64],[2,64],[2,64],[32,2],[68,1],[97],[13,0],[32,2],[68,2],[97],[13,1],[32,2],[68,4],[97],[13,2],[32,2],[68,8],[97],[13,3],[11],[11],[11],[11],[68,1],[15],[26],[11],[68,0],[15]],
660
+ wasm:()=>[[32,0],[33,2],[65,1],[33,3],[2,64],[2,64],[2,64],[2,64],[2,64],[2,64],[32,2],[68,1],[97],[13,0],[32,2],[68,2],[97],[13,1],[32,2],[68,4],[97],[13,2],[32,2],[68,8],[97],[13,3],[12,4],[11],[11],[11],[11],[68,1],[15],[26],[11],[11],[68,0],[15]],
661
661
  params:[124,127],typedParams:1,returns:[124],returnType:2,
662
662
  locals:[124,127],localNames:["x","x#type","#switch_82","#switch_82#type"],
663
663
  }
@@ -5157,6 +5157,9 @@ const generateSwitch = (scope, decl) => {
5157
5157
  if (defaultCase != -1) {
5158
5158
  // move default case to last
5159
5159
  cases.push(cases.splice(defaultCase, 1)[0]);
5160
+ } else {
5161
+ // make empty default case
5162
+ cases.push({ test: null, consequent: [] });
5160
5163
  }
5161
5164
 
5162
5165
  for (let i = 0; i < cases.length; i++) {
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.57.14",
4
+ "version": "0.57.15",
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.57.14';
3
+ globalThis.version = '0.57.15';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {
package/foo.js DELETED
@@ -1,10 +0,0 @@
1
- const wow = x => {
2
- switch (x) {
3
- case 1:
4
- return true;
5
- }
6
-
7
- return false;
8
- };
9
-
10
- console.log(wow(1337));