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.
- package/compiler/codegen.js +1 -5
- package/compiler/prefs.js +1 -6
- package/package.json +1 -1
- package/runtime/index.js +1 -1
package/compiler/codegen.js
CHANGED
@@ -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
|
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