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.
- package/CONTRIBUTING.md +1 -1
- package/README.md +1 -1
- package/compiler/2c.js +1 -1
- package/compiler/builtins/string.ts +97 -8
- package/compiler/builtins_precompiled.js +105 -105
- package/compiler/cyclone.js +1 -1
- package/compiler/encoding.js +1 -0
- package/compiler/log.js +0 -2
- package/compiler/opt.js +1 -1
- package/compiler/precompile.js +1 -1
- package/compiler/wrap.js +0 -1
- package/foo.ts +5 -0
- package/package.json +2 -2
- package/porf +3 -3
- package/porf.cmd +1 -1
- package/{runner → runtime}/index.js +1 -1
- /package/{runner → runtime}/debug.js +0 -0
- /package/{runner → runtime}/flamegraph.js +0 -0
- /package/{runner → runtime}/hotlines.js +0 -0
- /package/{runner → runtime}/repl.js +0 -0
package/compiler/cyclone.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
// cyclone: wasm partial constant evaluator (it is fast and dangerous hence "cyclone")
|
2
|
-
import { number,
|
2
|
+
import { number, read_signedLEB128 } from './encoding.js';
|
3
3
|
import { Opcodes, Valtype } from './wasmSpec.js';
|
4
4
|
import './prefs.js';
|
5
5
|
|
package/compiler/encoding.js
CHANGED
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
package/compiler/precompile.js
CHANGED
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
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.
|
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": "./
|
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")/
|
3
|
-
# deno run -A
|
4
|
-
# bun
|
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
|
2
|
+
node runtime %*
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|