porffor 0.14.0-3c0ba31cd → 0.14.0-41dbb00ce
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/decompile.js +1 -1
- package/compiler/prefs.js +1 -5
- package/package.json +1 -1
package/compiler/decompile.js
CHANGED
@@ -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|
|
122
|
+
.replace(/(return_call|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
|
-
|
9
|
+
return cache[p] = (() => {
|
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,10 +19,6 @@ 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;
|
26
22
|
}
|
27
23
|
});
|
28
24
|
|
package/package.json
CHANGED