porffor 0.57.25 → 0.57.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.
@@ -3584,7 +3584,6 @@ const memberTmpNames = scope => {
3584
3584
  };
3585
3585
 
3586
3586
  const ctHash = prop => {
3587
- const _ = prop;
3588
3587
  if (!Prefs.ctHash || !prop ||
3589
3588
  prop.computed || prop.optional ||
3590
3589
  prop.property.type === 'PrivateIdentifier'
@@ -3601,13 +3600,10 @@ const ctHash = prop => {
3601
3600
  const read = () => (prop.charCodeAt(i + 3) << 24 | prop.charCodeAt(i + 2) << 16 | prop.charCodeAt(i + 1) << 8 | prop.charCodeAt(i));
3602
3601
 
3603
3602
  // hash in chunks of i32 (4 bytes)
3604
- for (; i <= len - 4; i += 4) {
3603
+ for (; i <= len; i += 4) {
3605
3604
  hash = Math.imul(rotl(hash + Math.imul(read(), 3266489917), 17), 668265263);
3606
3605
  }
3607
3606
 
3608
- // hash final bytes up to 4 via shift depending on bytes remaining
3609
- hash = Math.imul(rotl(hash + Math.imul(read(), 3266489917), 17), 668265263);
3610
-
3611
3607
  // final avalanche
3612
3608
  hash = Math.imul(hash ^ (hash >>> 15), 2246822519);
3613
3609
  hash = Math.imul(hash ^ (hash >>> 13), 3266489917);
package/compiler/prefs.js CHANGED
@@ -2,9 +2,8 @@ const onByDefault = [ 'treeshakeWasmImports', 'alwaysMemory', 'indirectCalls', '
2
2
 
3
3
  const nameToKey = x => x.replace(/[a-z]\-[a-z]/g, y => `${y[0]}${y[2].toUpperCase()}`);
4
4
 
5
- let prefs = {};
6
5
  const getPrefs = () => {
7
- prefs = {};
6
+ const prefs = globalThis.Prefs = {};
8
7
  for (const x of onByDefault) prefs[x] = true;
9
8
 
10
9
  for (const x of process.argv) {
@@ -18,12 +17,8 @@ const getPrefs = () => {
18
17
  prefs[nameToKey(name)] = value ?? true;
19
18
  }
20
19
  }
21
-
22
- globalThis.Prefs = prefs;
23
20
  };
24
21
  getPrefs();
25
22
 
26
- // export default prefs;
27
-
28
23
  export const uncache = () => getPrefs();
29
24
  globalThis.argvChanged = uncache;
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.25",
4
+ "version": "0.57.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.57.25';
3
+ globalThis.version = '0.57.26';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {