porffor 0.37.9 → 0.37.11

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
@@ -273,7 +273,7 @@ Currently, Porffor is seriously limited in features and functionality, however i
273
273
  - More in future probably?
274
274
 
275
275
  ## Todo
276
- No particular order and no guarentees, just what could happen soon™
276
+ No particular order and no guarantees, just what could happen soon™
277
277
 
278
278
  - Asur
279
279
  - Support memory
@@ -327,7 +327,7 @@ Porffor intentionally does not use Wasm proposals which are not commonly impleme
327
327
  ### 2. Why at all?
328
328
  Yes!
329
329
 
330
- ## 3. Isn't this the same as AssemblyScript/other Wasm langs?
330
+ ### 3. Isn't this the same as AssemblyScript/other Wasm langs?
331
331
  No. they are not alike at all internally and have very different goals/ideals:
332
332
  - Porffor is made as a generic JS engine, not for Wasm stuff specifically
333
333
  - Porffor primarily consumes JS
package/compiler/2c.js CHANGED
@@ -473,9 +473,9 @@ export default ({ funcs, globals, tags, data, exceptions, pages }) => {
473
473
  if (lastCond) {
474
474
  vals.push(`!(${removeBrackets(vals.pop())})`);
475
475
  } else {
476
- let cond = '(' + removeBrackets(vals.pop());
477
- if (cond.startsWith(`(i32)`)) cond = `${cond.slice(5)} == 0e+0`;
478
- else cond += ') == 0';
476
+ let cond = '((' + removeBrackets(vals.pop());
477
+ if (cond.startsWith(`((i32)`)) cond = `${cond.slice(5)}) == 0e+0)`;
478
+ else cond += ') == 0)';
479
479
  vals.push(cond);
480
480
  }
481
481
  lastCond = true;
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.37.9+d615adde9",
4
+ "version": "0.37.11+bdcfb20cf",
5
5
  "author": "CanadaHonk",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runner/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.37.9+d615adde9';
3
+ globalThis.version = '0.37.11+bdcfb20cf';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {