porffor 0.0.0-d650361 → 0.0.0-e975d7a
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 +4 -3
- package/compiler/2c.js +349 -349
- package/compiler/codeGen.js +180 -47
- package/compiler/embedding.js +9 -5
- package/compiler/index.js +3 -3
- package/compiler/opt.js +14 -18
- package/compiler/prototype.js +83 -4
- package/compiler/sections.js +19 -4
- package/package.json +1 -1
- package/runner/info.js +37 -2
package/README.md
CHANGED
@@ -84,7 +84,8 @@ these include some early (stage 1/0) and/or dead (last commit years ago) proposa
|
|
84
84
|
- string comparison (eg `'a' == 'a'`, `'a' != 'b'`)
|
85
85
|
- nullish coalescing operator (`??`)
|
86
86
|
- `for...of` (arrays and strings)
|
87
|
-
- array member setting (`arr[0] = 2`)
|
87
|
+
- array member setting (`arr[0] = 2`, `arr[0] += 2`, etc)
|
88
|
+
- array constructor (`Array(5)`, `new Array(1, 2, 3)`)
|
88
89
|
|
89
90
|
### built-ins
|
90
91
|
|
@@ -97,7 +98,7 @@ these include some early (stage 1/0) and/or dead (last commit years ago) proposa
|
|
97
98
|
- basic `eval` (literals only)
|
98
99
|
- `Math.random()` using self-made xorshift128+ PRNG
|
99
100
|
- some of `performance` (`now()`)
|
100
|
-
- some of `Array.prototype` (`at`, `push`, `pop`, `shift`)
|
101
|
+
- some of `Array.prototype` (`at`, `push`, `pop`, `shift`, `fill`)
|
101
102
|
- some of `String.prototype` (`at`, `charAt`, `charCodeAt`)
|
102
103
|
|
103
104
|
### custom
|
@@ -132,7 +133,6 @@ no particular order and no guarentees, just what could happen soon™
|
|
132
133
|
- rewrite local indexes per func for smallest local header and remove unused idxs
|
133
134
|
- smarter inline selection (snapshots?)
|
134
135
|
- remove const ifs (`if (true)`, etc)
|
135
|
-
- use data segments for initing arrays
|
136
136
|
|
137
137
|
## porfformance
|
138
138
|
*for the things it supports most of the time*, porffor is blazingly fast compared to most interpreters, and common engines running without JIT. for those with JIT, it is not that much slower like a traditional interpreter would be; mostly the same or a bit faster/slower depending on what.
|
@@ -158,6 +158,7 @@ mostly for reducing size. do not really care about compiler perf/time as long as
|
|
158
158
|
- remove unneeded single just used vars
|
159
159
|
- remove unneeded blocks (no `br`s inside)
|
160
160
|
- remove unused imports
|
161
|
+
- use data segments for initing arrays/strings
|
161
162
|
|
162
163
|
### wasm module
|
163
164
|
- type cache/index (no repeated types)
|