porffor 0.57.1 → 0.57.2

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.
@@ -1,5 +1,5 @@
1
1
  // cyclone: wasm partial constant evaluator (it is fast and dangerous hence "cyclone")
2
- import { number, signedLEB128, ieee754_binary64, read_ieee754_binary64, read_signedLEB128 } from './encoding.js';
2
+ import { number, read_signedLEB128 } from './encoding.js';
3
3
  import { Opcodes, Valtype } from './wasmSpec.js';
4
4
  import './prefs.js';
5
5
 
@@ -1,4 +1,5 @@
1
1
  import { Opcodes, Valtype } from './wasmSpec.js';
2
+
2
3
  export const number = (n, valtype = valtypeBinary) => {
3
4
  if (valtype === Valtype.f64) return [ Opcodes.f64_const, n ];
4
5
 
package/compiler/log.js CHANGED
@@ -12,7 +12,5 @@ const areaColors = {
12
12
  wrap: [ 250, 100, 20 ]
13
13
  };
14
14
 
15
- // for (const x in areaColors) console.log(rgb(areaColors[x][0], areaColors[x][1], areaColors[x][2], x));
16
-
17
15
  export const log = (area, ...args) => console.log(`\u001b[90m[\u001b[0m${rgb(...areaColors[area], area)}\u001b[90m]\u001b[0m`, ...args);
18
16
  log.warning = (area, ...args) => log(area, '\u001b[93m' + args[0], ...args.slice(1), '\u001b[0m');
package/compiler/opt.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Opcodes, Valtype } from './wasmSpec.js';
2
- import { number, read_signedLEB128, read_ieee754_binary64 } from './encoding.js';
2
+ import { number, read_signedLEB128 } from './encoding.js';
3
3
  import { log } from './log.js';
4
4
  import './prefs.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Opcodes, Valtype } from './wasmSpec.js';
2
- import { read_signedLEB128, read_unsignedLEB128 } from './encoding.js';
2
+ import { read_signedLEB128 } from './encoding.js';
3
3
  import { TYPES, TYPE_NAMES } from './types.js';
4
4
  import { log } from './log.js';
5
5
 
package/compiler/wrap.js CHANGED
@@ -3,7 +3,6 @@ import { importedFuncs } from './builtins.js';
3
3
  import compile from './index.js';
4
4
  import disassemble from './disassemble.js';
5
5
  import { TYPES, TYPE_NAMES } from './types.js';
6
- import { log } from './log.js';
7
6
  import './prefs.js';
8
7
 
9
8
  const fs = (typeof process?.version !== 'undefined' ? (await import('node:fs')) : undefined);
package/foo.ts ADDED
@@ -0,0 +1,5 @@
1
+ namespace wasm {
2
+ export declare function imported_wasm_func(a: number): void;
3
+ }
4
+
5
+ wasm.imported_wasm_func(1337);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "An ahead-of-time JavaScript compiler",
4
- "version": "0.57.1",
4
+ "version": "0.57.2",
5
5
  "author": "Oliver Medhurst <honk@goose.icu>",
6
6
  "license": "MIT",
7
7
  "scripts": {},
@@ -15,7 +15,7 @@
15
15
  "meriyah": "^4.3.9"
16
16
  },
17
17
  "bin": {
18
- "porf": "./runner/index.js"
18
+ "porf": "./runtime/index.js"
19
19
  },
20
20
  "main": "./compiler/wrap.js",
21
21
  "type": "module",
package/porf CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/bin/sh
2
- node "$(dirname "$0")/runner/index.js" "$@"
3
- # deno run -A runner/index.js "$@"
4
- # bun runner/index.js "$@"
2
+ node "$(dirname "$0")/runtime/index.js" "$@"
3
+ # deno run -A runtime/index.js "$@"
4
+ # bun runtime/index.js "$@"
package/porf.cmd CHANGED
@@ -1,2 +1,2 @@
1
1
  @echo off
2
- node runner %*
2
+ node runtime %*
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.57.1';
3
+ globalThis.version = '0.57.2';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {
File without changes
File without changes
File without changes
File without changes