porffor 0.0.0-e6047ea → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # porffor
2
2
  a basic experimental wip *aot* optimizing js -> wasm/c engine/compiler/runtime in js. not serious/intended for (real) use. (this is a straight forward, honest readme)<br>
3
- age: ~1 month
3
+ age: ~2 months
4
4
 
5
5
  ## design
6
6
  porffor is a very unique js engine, due a very different approach. it is seriously limited, but what it can do, it does pretty well. key differences:
@@ -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)