porffor 0.0.0-05f898f → 0.0.0-151f80e

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:
@@ -83,6 +83,9 @@ these include some early (stage 1/0) and/or dead (last commit years ago) proposa
83
83
  - truthy/falsy (eg `!'' == true`)
84
84
  - string comparison (eg `'a' == 'a'`, `'a' != 'b'`)
85
85
  - nullish coalescing operator (`??`)
86
+ - `for...of` (arrays and strings)
87
+ - array member setting (`arr[0] = 2`, `arr[0] += 2`, etc)
88
+ - array constructor (`Array(5)`, `new Array(1, 2, 3)`)
86
89
 
87
90
  ### built-ins
88
91
 
@@ -95,7 +98,7 @@ these include some early (stage 1/0) and/or dead (last commit years ago) proposa
95
98
  - basic `eval` (literals only)
96
99
  - `Math.random()` using self-made xorshift128+ PRNG
97
100
  - some of `performance` (`now()`)
98
- - some of `Array.prototype` (`at`, `push`, `pop`, `shift`)
101
+ - some of `Array.prototype` (`at`, `push`, `pop`, `shift`, `fill`)
99
102
  - some of `String.prototype` (`at`, `charAt`, `charCodeAt`)
100
103
 
101
104
  ### custom
@@ -110,11 +113,9 @@ these include some early (stage 1/0) and/or dead (last commit years ago) proposa
110
113
  no particular order and no guarentees, just what could happen soon™
111
114
 
112
115
  - arrays
113
- - member setting (`arr[0] = 2`)
114
116
  - more of `Array` prototype
115
117
  - arrays/strings inside arrays
116
118
  - destructuring
117
- - for .. of
118
119
  - strings
119
120
  - member setting
120
121
  - objects
@@ -132,10 +133,9 @@ 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
- *for the things it supports*, porffor is blazingly faster compared to most interpreters, and engines running without JIT. for those with JIT, it is not that much slower like a traditional interpreter would be.
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.
139
139
 
140
140
  ![Screenshot of comparison chart](https://github.com/CanadaHonk/porffor/assets/19228318/76c75264-cc68-4be1-8891-c06dc389d97a)
141
141
 
@@ -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)