porffor 0.37.7 → 0.37.9

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/README.md CHANGED
@@ -64,8 +64,7 @@ Expect nothing to work! Only very limited JS is currently supported. See files i
64
64
  - `--valtype=i32|i64|f64` (default: `f64`) to set valtype
65
65
  - `-O0` to disable opt
66
66
  - `-O1` (default) to enable basic opt (simplify insts, treeshake wasm imports)
67
- - `-O2` to enable advanced opt (inlining). unstable!
68
- - `-O3` to enable advanceder opt (precompute const math). unstable!
67
+ - `-O2` to enable advanced opt (partial evaluation). unstable!
69
68
 
70
69
  ## Current limitations
71
70
  - Limited async support
@@ -58,7 +58,7 @@ export default (funcs, globals, tags, pages, data, flags, noTreeshake = false) =
58
58
  const getType = (params, returns) => {
59
59
  const hash = `${params.join(',')}_${returns.join(',')}`;
60
60
  if (Prefs.optLog) log('assemble', `getType(${JSON.stringify(params)}, ${JSON.stringify(returns)}) -> ${hash} | cache: ${typeCache[hash]}`);
61
- if (optLevel >= 1 && typeCache[hash] !== undefined) return typeCache[hash];
61
+ if (typeCache[hash] !== undefined) return typeCache[hash];
62
62
 
63
63
  const type = [ FuncType, ...encodeVector(params), ...encodeVector(returns) ];
64
64
  const idx = types.length;
@@ -233,7 +233,6 @@ export default (funcs, globals, tags, pages, data, flags, noTreeshake = false) =
233
233
  time('global section');
234
234
 
235
235
  if (Prefs.alwaysMemory && pages.size === 0) pages.set('--always-memory', 0);
236
- if (optLevel === 0) pages.set('O0 precaution', 0);
237
236
 
238
237
  const usesMemory = pages.size > 0;
239
238
  const memorySection = !usesMemory ? [] : createSection(