porffor 0.14.0-41dbb00ce → 0.14.0-5f9719f2a

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.
@@ -119,7 +119,7 @@ export const highlightAsm = asm => asm
119
119
  .replace(/(local|global|memory)\.[^\s]*/g, _ => `\x1B[31m${_}\x1B[0m`)
120
120
  .replace(/(i(8|16|32|64)x[0-9]+|v128)(\.[^\s]*)?/g, _ => `\x1B[34m${_}\x1B[0m`)
121
121
  .replace(/(i32|i64|f32|f64|drop)(\.[^\s]*)?/g, _ => `\x1B[36m${_}\x1B[0m`)
122
- .replace(/(return_call|call|br_if|br|return|rethrow|throw)/g, _ => `\x1B[35m${_}\x1B[0m`)
122
+ .replace(/(return_call|call_indirect|call|br_if|br|return|rethrow|throw)/g, _ => `\x1B[35m${_}\x1B[0m`)
123
123
  .replace(/(block|loop|if|end|else|try|catch_all|catch|delegate)/g, _ => `\x1B[95m${_}\x1B[0m`)
124
124
  .replace(/unreachable/g, _ => `\x1B[91m${_}\x1B[0m`)
125
125
  .replace(/ \-?[0-9\.]+/g, _ => ` \x1B[33m${_.slice(1)}\x1B[0m`)
package/compiler/prefs.js CHANGED
@@ -6,7 +6,7 @@ const obj = new Proxy({}, {
6
6
  // intentionally misses with undefined values cached
7
7
  if (cache[p]) return cache[p];
8
8
 
9
- return cache[p] = (() => {
9
+ const ret = (() => {
10
10
  // fooBar -> foo-bar
11
11
  const name = p[0] === '_' ? p : p.replace(/[A-Z]/g, c => `-${c.toLowerCase()}`);
12
12
  const prefix = name.length === 1 ? '-' : '--';
@@ -19,6 +19,10 @@ const obj = new Proxy({}, {
19
19
  if (onByDefault.includes(p)) return true;
20
20
  return undefined;
21
21
  })();
22
+
23
+ // do not cache in web demo as args are changed live
24
+ if (!globalThis.document) cache[p] = ret;
25
+ return ret;
22
26
  }
23
27
  });
24
28
 
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.14.0-41dbb00ce",
4
+ "version": "0.14.0-5f9719f2a",
5
5
  "author": "CanadaHonk",
6
6
  "license": "MIT",
7
7
  "scripts": {