porffor 0.2.0-aea77ff → 0.2.0-b9abe0d
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/.vscode/launch.json +18 -0
- package/LICENSE +20 -20
- package/README.md +124 -83
- package/asur/README.md +2 -0
- package/asur/index.js +1262 -0
- package/byg/index.js +237 -0
- package/compiler/2c.js +317 -72
- package/compiler/{sections.js → assemble.js} +63 -15
- package/compiler/builtins/annexb_string.js +72 -0
- package/compiler/builtins/annexb_string.ts +19 -0
- package/compiler/builtins/array.ts +145 -0
- package/compiler/builtins/base64.ts +151 -0
- package/compiler/builtins/crypto.ts +120 -0
- package/compiler/builtins/date.ts +9 -0
- package/compiler/builtins/escape.ts +141 -0
- package/compiler/builtins/int.ts +147 -0
- package/compiler/builtins/number.ts +527 -0
- package/compiler/builtins/porffor.d.ts +42 -0
- package/compiler/builtins/string.ts +1055 -0
- package/compiler/builtins/tostring.ts +45 -0
- package/compiler/builtins.js +479 -262
- package/compiler/{codeGen.js → codegen.js} +1049 -394
- package/compiler/embedding.js +22 -22
- package/compiler/encoding.js +108 -10
- package/compiler/generated_builtins.js +722 -0
- package/compiler/index.js +36 -34
- package/compiler/log.js +6 -3
- package/compiler/opt.js +51 -36
- package/compiler/parse.js +35 -27
- package/compiler/precompile.js +123 -0
- package/compiler/prefs.js +26 -0
- package/compiler/prototype.js +177 -37
- package/compiler/types.js +37 -0
- package/compiler/wasmSpec.js +29 -7
- package/compiler/wrap.js +52 -39
- package/package.json +9 -5
- package/porf +4 -0
- package/rhemyn/compile.js +5 -3
- package/rhemyn/parse.js +323 -320
- package/rhemyn/test/parse.js +58 -58
- package/runner/compare.js +34 -34
- package/runner/debug.js +122 -0
- package/runner/index.js +49 -10
- package/runner/profiler.js +102 -0
- package/runner/repl.js +40 -7
- package/runner/sizes.js +37 -37
- package/test262_changes_from_1afe9b87d2_to_04-09.md +270 -0
- package/compiler/builtins/base64.js +0 -92
- package/runner/info.js +0 -89
- package/runner/profile.js +0 -46
- package/runner/results.json +0 -1
- package/runner/transform.js +0 -15
- package/util/enum.js +0 -20
@@ -0,0 +1,270 @@
|
|
1
|
+
## new wasm errors
|
2
|
+
intl402/supportedLocalesOf-throws-if-element-not-string-or-object.js
|
3
|
+
built-ins/Boolean/S15.6.1.1_A1_T2.js
|
4
|
+
built-ins/Boolean/S15.6.1.1_A1_T3.js
|
5
|
+
built-ins/Boolean/S15.6.1.1_A1_T4.js
|
6
|
+
built-ins/Boolean/S15.6.1.1_A1_T5.js
|
7
|
+
built-ins/Boolean/S15.6.1.1_A2.js
|
8
|
+
built-ins/Boolean/S9.2_A1_T1.js
|
9
|
+
built-ins/Boolean/S9.2_A2_T1.js
|
10
|
+
built-ins/Boolean/S9.2_A3_T1.js
|
11
|
+
built-ins/Boolean/S9.2_A4_T1.js
|
12
|
+
built-ins/Boolean/S9.2_A4_T3.js
|
13
|
+
built-ins/Boolean/S9.2_A5_T1.js
|
14
|
+
built-ins/Boolean/S9.2_A5_T3.js
|
15
|
+
built-ins/Boolean/S9.2_A6_T1.js
|
16
|
+
built-ins/Number/MAX_SAFE_INTEGER.js
|
17
|
+
built-ins/Number/MIN_SAFE_INTEGER.js
|
18
|
+
language/function-code/10.4.3-1-103.js
|
19
|
+
language/function-code/10.4.3-1-105.js
|
20
|
+
annexB/language/global-code/block-decl-global-init.js
|
21
|
+
annexB/language/global-code/if-decl-else-decl-a-global-init.js
|
22
|
+
annexB/language/global-code/if-decl-else-decl-b-global-init.js
|
23
|
+
annexB/language/global-code/if-decl-else-stmt-global-init.js
|
24
|
+
annexB/language/global-code/if-decl-no-else-global-init.js
|
25
|
+
annexB/language/global-code/if-stmt-else-decl-global-init.js
|
26
|
+
built-ins/Array/Symbol.species/symbol-species.js
|
27
|
+
built-ins/ArrayBuffer/Symbol.species/symbol-species.js
|
28
|
+
built-ins/Map/Symbol.species/symbol-species.js
|
29
|
+
built-ins/Object/defineProperties/15.2.3.7-6-a-249.js
|
30
|
+
built-ins/Object/defineProperty/15.2.3.6-4-260.js
|
31
|
+
built-ins/Promise/Symbol.species/prop-desc.js
|
32
|
+
built-ins/RegExp/Symbol.species/symbol-species.js
|
33
|
+
built-ins/Set/Symbol.species/symbol-species.js
|
34
|
+
built-ins/TypedArray/Symbol.species/prop-desc.js
|
35
|
+
language/eval-code/direct/var-env-var-init-global-new.js
|
36
|
+
language/expressions/arrow-function/prototype-rules.js
|
37
|
+
language/expressions/coalesce/chainable-if-parenthesis-covered-logical-or.js
|
38
|
+
language/expressions/instanceof/S15.3.5.3_A1_T2.js
|
39
|
+
language/expressions/logical-assignment/lgcl-and-assignment-operator-unresolved-rhs-put.js
|
40
|
+
language/expressions/logical-assignment/lgcl-and-assignment-operator-unresolved-rhs.js
|
41
|
+
language/expressions/logical-assignment/lgcl-and-whitespace.js
|
42
|
+
language/expressions/logical-assignment/lgcl-nullish-assignment-operator-unresolved-rhs-put.js
|
43
|
+
language/expressions/logical-assignment/lgcl-nullish-assignment-operator-unresolved-rhs.js
|
44
|
+
language/expressions/logical-assignment/lgcl-nullish-whitespace.js
|
45
|
+
language/expressions/logical-assignment/lgcl-or-assignment-operator-unresolved-rhs-put.js
|
46
|
+
language/expressions/logical-assignment/lgcl-or-assignment-operator-unresolved-rhs.js
|
47
|
+
language/expressions/logical-assignment/lgcl-or-whitespace.js
|
48
|
+
language/literals/boolean/S7.8.2_A1_T1.js
|
49
|
+
language/literals/boolean/S7.8.2_A1_T2.js
|
50
|
+
annexB/language/expressions/logical-assignment/emulates-undefined-and.js
|
51
|
+
annexB/language/expressions/logical-assignment/emulates-undefined-coalesce.js
|
52
|
+
annexB/language/expressions/logical-assignment/emulates-undefined-or.js
|
53
|
+
built-ins/Array/prototype/sort/precise-comparefn-throws.js
|
54
|
+
built-ins/Array/prototype/sort/precise-getter-appends-elements.js
|
55
|
+
built-ins/Array/prototype/sort/precise-getter-decreases-length.js
|
56
|
+
built-ins/Array/prototype/sort/precise-getter-deletes-predecessor.js
|
57
|
+
built-ins/Array/prototype/sort/precise-getter-deletes-successor.js
|
58
|
+
built-ins/Array/prototype/sort/precise-getter-increases-length.js
|
59
|
+
built-ins/Array/prototype/sort/precise-getter-pops-elements.js
|
60
|
+
built-ins/Array/prototype/sort/precise-getter-sets-predecessor.js
|
61
|
+
built-ins/Array/prototype/sort/precise-getter-sets-successor.js
|
62
|
+
built-ins/Array/prototype/sort/precise-prototype-accessors.js
|
63
|
+
built-ins/Array/prototype/sort/precise-prototype-element.js
|
64
|
+
built-ins/Array/prototype/sort/precise-setter-appends-elements.js
|
65
|
+
built-ins/Array/prototype/sort/precise-setter-deletes-predecessor.js
|
66
|
+
built-ins/Array/prototype/sort/precise-setter-deletes-successor.js
|
67
|
+
built-ins/Array/prototype/sort/precise-setter-increases-length.js
|
68
|
+
built-ins/Array/prototype/sort/precise-setter-sets-predecessor.js
|
69
|
+
built-ins/Array/prototype/sort/precise-setter-sets-successor.js
|
70
|
+
built-ins/ArrayBuffer/prototype/byteLength/prop-desc.js
|
71
|
+
built-ins/ArrayBuffer/prototype/detached/prop-desc.js
|
72
|
+
built-ins/ArrayBuffer/prototype/maxByteLength/prop-desc.js
|
73
|
+
built-ins/ArrayBuffer/prototype/resizable/prop-desc.js
|
74
|
+
built-ins/DataView/prototype/buffer/prop-desc.js
|
75
|
+
built-ins/DataView/prototype/byteLength/prop-desc.js
|
76
|
+
built-ins/DataView/prototype/byteOffset/prop-desc.js
|
77
|
+
built-ins/Object/prototype/__proto__/prop-desc.js
|
78
|
+
built-ins/RegExp/prototype/Symbol.matchAll/species-constructor-is-undefined.js
|
79
|
+
built-ins/RegExp/prototype/dotAll/prop-desc.js
|
80
|
+
built-ins/RegExp/prototype/flags/prop-desc.js
|
81
|
+
built-ins/RegExp/prototype/hasIndices/prop-desc.js
|
82
|
+
built-ins/RegExp/prototype/source/prop-desc.js
|
83
|
+
built-ins/RegExp/prototype/unicodeSets/prop-desc.js
|
84
|
+
built-ins/SharedArrayBuffer/prototype/byteLength/prop-desc.js
|
85
|
+
built-ins/SharedArrayBuffer/prototype/growable/prop-desc.js
|
86
|
+
built-ins/SharedArrayBuffer/prototype/maxByteLength/prop-desc.js
|
87
|
+
built-ins/Symbol/prototype/description/descriptor.js
|
88
|
+
built-ins/TypedArray/prototype/Symbol.toStringTag/invoked-as-accessor.js
|
89
|
+
built-ins/TypedArray/prototype/Symbol.toStringTag/prop-desc.js
|
90
|
+
built-ins/TypedArray/prototype/buffer/prop-desc.js
|
91
|
+
built-ins/TypedArray/prototype/byteLength/prop-desc.js
|
92
|
+
built-ins/TypedArray/prototype/byteOffset/prop-desc.js
|
93
|
+
built-ins/TypedArray/prototype/length/prop-desc.js
|
94
|
+
built-ins/TypedArrayConstructors/ctors/length-arg/toindex-length.js
|
95
|
+
built-ins/TypedArrayConstructors/ctors-bigint/length-arg/toindex-length.js
|
96
|
+
intl402/Collator/prototype/compare/prop-desc.js
|
97
|
+
intl402/DateTimeFormat/prototype/format/prop-desc.js
|
98
|
+
intl402/Locale/prototype/baseName/prop-desc.js
|
99
|
+
intl402/Locale/prototype/calendar/prop-desc.js
|
100
|
+
intl402/Locale/prototype/caseFirst/prop-desc.js
|
101
|
+
intl402/Locale/prototype/collation/prop-desc.js
|
102
|
+
intl402/Locale/prototype/firstDayOfWeek/prop-desc.js
|
103
|
+
intl402/Locale/prototype/hourCycle/prop-desc.js
|
104
|
+
intl402/Locale/prototype/language/prop-desc.js
|
105
|
+
intl402/Locale/prototype/numberingSystem/prop-desc.js
|
106
|
+
intl402/Locale/prototype/numeric/prop-desc.js
|
107
|
+
intl402/Locale/prototype/region/prop-desc.js
|
108
|
+
intl402/Locale/prototype/script/prop-desc.js
|
109
|
+
intl402/NumberFormat/prototype/format/prop-desc.js
|
110
|
+
language/expressions/arrow-function/dstr/dflt-obj-ptrn-rest-getter.js
|
111
|
+
language/expressions/arrow-function/dstr/dflt-obj-ptrn-rest-val-obj.js
|
112
|
+
language/expressions/function/dstr/dflt-obj-ptrn-rest-getter.js
|
113
|
+
language/expressions/function/dstr/dflt-obj-ptrn-rest-val-obj.js
|
114
|
+
language/statements/function/dstr/dflt-obj-ptrn-rest-getter.js
|
115
|
+
language/statements/function/dstr/dflt-obj-ptrn-rest-val-obj.js
|
116
|
+
language/statements/try/dstr/obj-ptrn-rest-val-obj.js
|
117
|
+
annexB/built-ins/RegExp/legacy-accessors/lastMatch/prop-desc.js
|
118
|
+
annexB/built-ins/RegExp/legacy-accessors/lastParen/prop-desc.js
|
119
|
+
annexB/built-ins/RegExp/legacy-accessors/leftContext/prop-desc.js
|
120
|
+
annexB/built-ins/RegExp/legacy-accessors/rightContext/prop-desc.js
|
121
|
+
built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/invoked-as-accessor.js
|
122
|
+
built-ins/TypedArray/prototype/Symbol.toStringTag/BigInt/prop-desc.js
|
123
|
+
|
124
|
+
|
125
|
+
## new passes
|
126
|
+
built-ins/RegExp/S15.10.2.6_A3_T3.js
|
127
|
+
language/expressions/in/S11.8.7_A2.1_T3.js
|
128
|
+
language/expressions/in/S11.8.7_A3.js
|
129
|
+
language/types/reference/S8.7_A2.js
|
130
|
+
built-ins/RegExp/prototype/test/y-fail-return.js
|
131
|
+
|
132
|
+
|
133
|
+
## new fails
|
134
|
+
built-ins/Boolean/S15.6.1.1_A1_T1.js
|
135
|
+
built-ins/Boolean/S15.6.1.1_A1_T3.js
|
136
|
+
built-ins/Boolean/S15.6.1.1_A1_T5.js
|
137
|
+
built-ins/Boolean/S15.6.1.1_A2.js
|
138
|
+
built-ins/Boolean/S9.2_A1_T1.js
|
139
|
+
built-ins/Boolean/S9.2_A2_T1.js
|
140
|
+
built-ins/Boolean/S9.2_A3_T1.js
|
141
|
+
built-ins/Boolean/S9.2_A4_T3.js
|
142
|
+
built-ins/Boolean/S9.2_A5_T1.js
|
143
|
+
annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js
|
144
|
+
language/expressions/addition/S11.6.1_A3.1_T1.1.js
|
145
|
+
language/expressions/addition/S11.6.1_A3.1_T2.1.js
|
146
|
+
language/expressions/addition/S11.6.1_A3.1_T2.5.js
|
147
|
+
language/expressions/bitwise-and/S11.10.1_A3_T1.1.js
|
148
|
+
language/expressions/bitwise-and/S11.10.1_A3_T2.1.js
|
149
|
+
language/expressions/bitwise-and/S11.10.1_A3_T2.8.js
|
150
|
+
language/expressions/bitwise-and/S11.10.1_A3_T2.9.js
|
151
|
+
language/expressions/bitwise-not/S11.4.8_A3_T1.js
|
152
|
+
language/expressions/bitwise-or/S11.10.3_A3_T1.1.js
|
153
|
+
language/expressions/bitwise-or/S11.10.3_A3_T2.1.js
|
154
|
+
language/expressions/bitwise-or/S11.10.3_A3_T2.8.js
|
155
|
+
language/expressions/bitwise-or/S11.10.3_A3_T2.9.js
|
156
|
+
language/expressions/bitwise-xor/S11.10.2_A3_T1.1.js
|
157
|
+
language/expressions/bitwise-xor/S11.10.2_A3_T2.1.js
|
158
|
+
language/expressions/bitwise-xor/S11.10.2_A3_T2.8.js
|
159
|
+
language/expressions/bitwise-xor/S11.10.2_A3_T2.9.js
|
160
|
+
language/expressions/coalesce/chainable-if-parenthesis-covered-logical-or.js
|
161
|
+
language/expressions/compound-assignment/S11.13.2_A4.10_T1.1.js
|
162
|
+
language/expressions/compound-assignment/S11.13.2_A4.10_T2.1.js
|
163
|
+
language/expressions/compound-assignment/S11.13.2_A4.10_T2.8.js
|
164
|
+
language/expressions/compound-assignment/S11.13.2_A4.10_T2.9.js
|
165
|
+
language/expressions/compound-assignment/S11.13.2_A4.11_T1.1.js
|
166
|
+
language/expressions/compound-assignment/S11.13.2_A4.11_T2.1.js
|
167
|
+
language/expressions/compound-assignment/S11.13.2_A4.11_T2.8.js
|
168
|
+
language/expressions/compound-assignment/S11.13.2_A4.11_T2.9.js
|
169
|
+
language/expressions/compound-assignment/S11.13.2_A4.1_T1.1.js
|
170
|
+
language/expressions/compound-assignment/S11.13.2_A4.1_T2.1.js
|
171
|
+
language/expressions/compound-assignment/S11.13.2_A4.1_T2.9.js
|
172
|
+
language/expressions/compound-assignment/S11.13.2_A4.2_T1.1.js
|
173
|
+
language/expressions/compound-assignment/S11.13.2_A4.2_T2.1.js
|
174
|
+
language/expressions/compound-assignment/S11.13.2_A4.2_T2.9.js
|
175
|
+
language/expressions/compound-assignment/S11.13.2_A4.3_T1.1.js
|
176
|
+
language/expressions/compound-assignment/S11.13.2_A4.3_T2.1.js
|
177
|
+
language/expressions/compound-assignment/S11.13.2_A4.3_T2.9.js
|
178
|
+
language/expressions/compound-assignment/S11.13.2_A4.4_T1.1.js
|
179
|
+
language/expressions/compound-assignment/S11.13.2_A4.4_T2.1.js
|
180
|
+
language/expressions/compound-assignment/S11.13.2_A4.4_T2.5.js
|
181
|
+
language/expressions/compound-assignment/S11.13.2_A4.5_T1.1.js
|
182
|
+
language/expressions/compound-assignment/S11.13.2_A4.5_T2.1.js
|
183
|
+
language/expressions/compound-assignment/S11.13.2_A4.5_T2.9.js
|
184
|
+
language/expressions/compound-assignment/S11.13.2_A4.6_T1.1.js
|
185
|
+
language/expressions/compound-assignment/S11.13.2_A4.6_T2.1.js
|
186
|
+
language/expressions/compound-assignment/S11.13.2_A4.6_T2.8.js
|
187
|
+
language/expressions/compound-assignment/S11.13.2_A4.6_T2.9.js
|
188
|
+
language/expressions/compound-assignment/S11.13.2_A4.7_T1.1.js
|
189
|
+
language/expressions/compound-assignment/S11.13.2_A4.7_T2.1.js
|
190
|
+
language/expressions/compound-assignment/S11.13.2_A4.7_T2.8.js
|
191
|
+
language/expressions/compound-assignment/S11.13.2_A4.7_T2.9.js
|
192
|
+
language/expressions/compound-assignment/S11.13.2_A4.8_T1.1.js
|
193
|
+
language/expressions/compound-assignment/S11.13.2_A4.8_T2.1.js
|
194
|
+
language/expressions/compound-assignment/S11.13.2_A4.8_T2.8.js
|
195
|
+
language/expressions/compound-assignment/S11.13.2_A4.8_T2.9.js
|
196
|
+
language/expressions/compound-assignment/S11.13.2_A4.9_T1.1.js
|
197
|
+
language/expressions/compound-assignment/S11.13.2_A4.9_T2.1.js
|
198
|
+
language/expressions/compound-assignment/S11.13.2_A4.9_T2.8.js
|
199
|
+
language/expressions/compound-assignment/S11.13.2_A4.9_T2.9.js
|
200
|
+
language/expressions/conditional/S11.12_A2.1_T1.js
|
201
|
+
language/expressions/conditional/S11.12_A3_T1.js
|
202
|
+
language/expressions/division/S11.5.2_A3_T1.1.js
|
203
|
+
language/expressions/division/S11.5.2_A3_T2.1.js
|
204
|
+
language/expressions/division/S11.5.2_A3_T2.9.js
|
205
|
+
language/expressions/does-not-equals/S11.9.2_A4.1_T1.js
|
206
|
+
language/expressions/does-not-equals/S11.9.2_A4.1_T2.js
|
207
|
+
language/expressions/equals/S11.9.1_A4.1_T1.js
|
208
|
+
language/expressions/equals/S11.9.1_A4.1_T2.js
|
209
|
+
language/expressions/greater-than/S11.8.2_A3.1_T1.1.js
|
210
|
+
language/expressions/greater-than/S11.8.2_A3.1_T2.1.js
|
211
|
+
language/expressions/greater-than/S11.8.2_A3.1_T2.9.js
|
212
|
+
language/expressions/greater-than/S11.8.2_A4.10.js
|
213
|
+
language/expressions/greater-than-or-equal/S11.8.4_A3.1_T1.1.js
|
214
|
+
language/expressions/greater-than-or-equal/S11.8.4_A3.1_T2.1.js
|
215
|
+
language/expressions/greater-than-or-equal/S11.8.4_A3.1_T2.9.js
|
216
|
+
language/expressions/grouping/S11.1.6_A3_T1.js
|
217
|
+
language/expressions/left-shift/S11.7.1_A3_T1.1.js
|
218
|
+
language/expressions/left-shift/S11.7.1_A3_T2.1.js
|
219
|
+
language/expressions/left-shift/S11.7.1_A3_T2.8.js
|
220
|
+
language/expressions/left-shift/S11.7.1_A3_T2.9.js
|
221
|
+
language/expressions/left-shift/S9.5_A3.1_T1.js
|
222
|
+
language/expressions/less-than/S11.8.1_A3.1_T1.1.js
|
223
|
+
language/expressions/less-than/S11.8.1_A3.1_T2.1.js
|
224
|
+
language/expressions/less-than/S11.8.1_A3.1_T2.9.js
|
225
|
+
language/expressions/less-than-or-equal/S11.8.3_A3.1_T1.1.js
|
226
|
+
language/expressions/less-than-or-equal/S11.8.3_A3.1_T2.1.js
|
227
|
+
language/expressions/less-than-or-equal/S11.8.3_A3.1_T2.9.js
|
228
|
+
language/expressions/logical-and/S11.11.1_A2.1_T1.js
|
229
|
+
language/expressions/logical-and/S11.11.1_A3_T1.js
|
230
|
+
language/expressions/logical-assignment/lgcl-and-assignment-operator-unresolved-rhs-put.js
|
231
|
+
language/expressions/logical-assignment/lgcl-and-whitespace.js
|
232
|
+
language/expressions/logical-assignment/lgcl-nullish-assignment-operator-unresolved-rhs-put.js
|
233
|
+
language/expressions/logical-assignment/lgcl-nullish-whitespace.js
|
234
|
+
language/expressions/logical-assignment/lgcl-or-assignment-operator-unresolved-rhs-put.js
|
235
|
+
language/expressions/logical-assignment/lgcl-or-whitespace.js
|
236
|
+
language/expressions/logical-or/S11.11.2_A3_T1.js
|
237
|
+
language/expressions/modulus/S11.5.3_A3_T1.1.js
|
238
|
+
language/expressions/modulus/S11.5.3_A3_T2.1.js
|
239
|
+
language/expressions/modulus/S11.5.3_A3_T2.9.js
|
240
|
+
language/expressions/multiplication/S11.5.1_A3_T1.1.js
|
241
|
+
language/expressions/multiplication/S11.5.1_A3_T2.1.js
|
242
|
+
language/expressions/multiplication/S11.5.1_A3_T2.9.js
|
243
|
+
language/expressions/prefix-decrement/S11.4.5_A4_T1.js
|
244
|
+
language/expressions/prefix-increment/S11.4.4_A4_T1.js
|
245
|
+
language/expressions/right-shift/S11.7.2_A3_T1.1.js
|
246
|
+
language/expressions/right-shift/S11.7.2_A3_T2.1.js
|
247
|
+
language/expressions/right-shift/S11.7.2_A3_T2.8.js
|
248
|
+
language/expressions/right-shift/S11.7.2_A3_T2.9.js
|
249
|
+
language/expressions/strict-does-not-equals/S11.9.5_A4.1_T1.js
|
250
|
+
language/expressions/strict-does-not-equals/S11.9.5_A4.1_T2.js
|
251
|
+
language/expressions/strict-equals/S11.9.4_A4.1_T1.js
|
252
|
+
language/expressions/strict-equals/S11.9.4_A4.1_T2.js
|
253
|
+
language/expressions/subtraction/S11.6.2_A3_T1.1.js
|
254
|
+
language/expressions/subtraction/S11.6.2_A3_T2.1.js
|
255
|
+
language/expressions/subtraction/S11.6.2_A3_T2.9.js
|
256
|
+
language/expressions/unary-plus/S11.4.6_A3_T1.js
|
257
|
+
language/expressions/unsigned-right-shift/S11.7.3_A3_T1.1.js
|
258
|
+
language/expressions/unsigned-right-shift/S11.7.3_A3_T2.1.js
|
259
|
+
language/expressions/unsigned-right-shift/S11.7.3_A3_T2.8.js
|
260
|
+
language/expressions/unsigned-right-shift/S11.7.3_A3_T2.9.js
|
261
|
+
language/expressions/unsigned-right-shift/S9.6_A3.1_T1.js
|
262
|
+
language/expressions/void/S11.4.2_A4_T1.js
|
263
|
+
language/literals/boolean/S7.8.2_A1_T1.js
|
264
|
+
language/literals/boolean/S7.8.2_A1_T2.js
|
265
|
+
language/statements/for-of/string-astral-truncated.js
|
266
|
+
language/statements/function/S13.2.1_A6_T1.js
|
267
|
+
language/statements/function/S13.2.1_A6_T2.js
|
268
|
+
language/statements/function/S13.2.1_A6_T3.js
|
269
|
+
language/statements/function/S13.2.1_A6_T4.js
|
270
|
+
built-ins/String/prototype/at/returns-code-unit.js
|
@@ -1,92 +0,0 @@
|
|
1
|
-
var btoa_a = str => {
|
2
|
-
// todo: throw invalid character for unicode
|
3
|
-
|
4
|
-
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
5
|
-
const mask = (1 << 6) - 1;
|
6
|
-
|
7
|
-
let out = '';
|
8
|
-
let bits = 0, buffer = 0;
|
9
|
-
for (let i = 0; i < str.length; i++) {
|
10
|
-
buffer = (buffer << 8) | (0xff & str.charCodeAt(i));
|
11
|
-
bits += 8;
|
12
|
-
|
13
|
-
while (bits > 6) {
|
14
|
-
bits -= 6;
|
15
|
-
out += chars[mask & (buffer >> bits)];
|
16
|
-
}
|
17
|
-
}
|
18
|
-
|
19
|
-
if (bits) {
|
20
|
-
out += chars[mask & (buffer << (6 - bits))]
|
21
|
-
}
|
22
|
-
|
23
|
-
while ((out.length * 6) & 7) {
|
24
|
-
out += '=';
|
25
|
-
}
|
26
|
-
|
27
|
-
return out;
|
28
|
-
};
|
29
|
-
|
30
|
-
var btoa = function (input) {
|
31
|
-
// todo: throw invalid character for unicode
|
32
|
-
const keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
33
|
-
|
34
|
-
let output = "";
|
35
|
-
let chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
36
|
-
let i = 0;
|
37
|
-
|
38
|
-
while (i < input.length) {
|
39
|
-
chr1 = input.charCodeAt(i++);
|
40
|
-
chr2 = input.charCodeAt(i++);
|
41
|
-
chr3 = input.charCodeAt(i++);
|
42
|
-
|
43
|
-
enc1 = chr1 >> 2;
|
44
|
-
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
45
|
-
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
46
|
-
enc4 = chr3 & 63;
|
47
|
-
|
48
|
-
if (isNaN(chr2)) {
|
49
|
-
enc3 = enc4 = 64;
|
50
|
-
} else if (isNaN(chr3)) {
|
51
|
-
enc4 = 64;
|
52
|
-
}
|
53
|
-
|
54
|
-
output += keyStr.charAt(enc1);
|
55
|
-
output += keyStr.charAt(enc2);
|
56
|
-
output += keyStr.charAt(enc3);
|
57
|
-
output += keyStr.charAt(enc4);
|
58
|
-
}
|
59
|
-
|
60
|
-
return output;
|
61
|
-
};
|
62
|
-
|
63
|
-
var atob_b = function (input) {
|
64
|
-
const keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
65
|
-
|
66
|
-
let output = "";
|
67
|
-
let chr1, chr2, chr3;
|
68
|
-
let enc1, enc2, enc3, enc4;
|
69
|
-
let i = 0;
|
70
|
-
|
71
|
-
while (i < input.length) {
|
72
|
-
enc1 = keyStr.indexOf(input.charAt(i++));
|
73
|
-
enc2 = keyStr.indexOf(input.charAt(i++));
|
74
|
-
enc3 = keyStr.indexOf(input.charAt(i++));
|
75
|
-
enc4 = keyStr.indexOf(input.charAt(i++));
|
76
|
-
|
77
|
-
chr1 = (enc1 << 2) | (enc2 >> 4);
|
78
|
-
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
79
|
-
chr3 = ((enc3 & 3) << 6) | enc4;
|
80
|
-
|
81
|
-
output += String.fromCharCode(chr1);
|
82
|
-
|
83
|
-
if (enc3 != 64) {
|
84
|
-
output += String.fromCharCode(chr2);
|
85
|
-
}
|
86
|
-
if (enc4 != 64) {
|
87
|
-
output += String.fromCharCode(chr3);
|
88
|
-
}
|
89
|
-
}
|
90
|
-
|
91
|
-
return output;
|
92
|
-
};
|
package/runner/info.js
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
import compile from '../compiler/wrap.js';
|
2
|
-
import fs from 'node:fs';
|
3
|
-
|
4
|
-
/* if (globalThis.process) {
|
5
|
-
const v8 = await import('node:v8');
|
6
|
-
v8.setFlagsFromString('--experimental-wasm-gc');
|
7
|
-
} */
|
8
|
-
|
9
|
-
const raw = process.argv.includes('-raw');
|
10
|
-
|
11
|
-
const file = process.argv.slice(2).find(x => x[0] !== '-');
|
12
|
-
if (!file) {
|
13
|
-
// run repl if no file given
|
14
|
-
await import('./repl.js');
|
15
|
-
|
16
|
-
// do nothing for the rest of this file
|
17
|
-
await new Promise(() => {});
|
18
|
-
}
|
19
|
-
|
20
|
-
const source = fs.readFileSync(file, 'utf8');
|
21
|
-
|
22
|
-
const underline = x => `\u001b[4m\u001b[1m${x}\u001b[0m`;
|
23
|
-
const bold = x => `\u001b[1m${x}\u001b[0m`;
|
24
|
-
|
25
|
-
if (!raw) console.log(`\n${underline('source')}\n` + source);
|
26
|
-
if (!raw) console.log(`\n\n${underline('processing')}`);
|
27
|
-
|
28
|
-
let cache = '';
|
29
|
-
const print = str => {
|
30
|
-
cache += str;
|
31
|
-
|
32
|
-
if (str === '\n') {
|
33
|
-
process.stdout.write(cache);
|
34
|
-
cache = '';
|
35
|
-
}
|
36
|
-
};
|
37
|
-
|
38
|
-
const t0 = performance.now();
|
39
|
-
const { wasm, exports, pages } = await compile(source, raw ? [ 'module' ] : [ 'module', 'info' ], {}, print);
|
40
|
-
|
41
|
-
if (!raw && typeof Deno === 'undefined') fs.writeFileSync('out.wasm', Buffer.from(wasm));
|
42
|
-
|
43
|
-
if (!process.argv.includes('-no-run')) {
|
44
|
-
console.log(`\n\n${underline('output')}`);
|
45
|
-
const t2 = performance.now();
|
46
|
-
|
47
|
-
exports.main();
|
48
|
-
print('\n');
|
49
|
-
|
50
|
-
if (!raw) console.log(bold(`\n\nexecuted in ${(performance.now() - t2).toFixed(2)}ms`));
|
51
|
-
}
|
52
|
-
|
53
|
-
if (!raw) console.log(bold(`wasm binary is ${wasm.byteLength} bytes`));
|
54
|
-
if (!raw) console.log(`total: ${(performance.now() - t0).toFixed(2)}ms`);
|
55
|
-
|
56
|
-
if (!raw && process.argv.includes('-mem') && exports.$) {
|
57
|
-
console.log();
|
58
|
-
|
59
|
-
let lastMemory, lastPages;
|
60
|
-
const PageSize = 65536;
|
61
|
-
const memoryToString = mem => {
|
62
|
-
let out = '';
|
63
|
-
const pages = lastPages.length;
|
64
|
-
const wasmPages = mem.buffer.byteLength / PageSize;
|
65
|
-
|
66
|
-
out += `\x1B[1mallocated ${mem.buffer.byteLength / 1024}KiB\x1B[0m for ${pages} things using ${wasmPages} Wasm page${wasmPages === 1 ? '' : 's'}\n`;
|
67
|
-
|
68
|
-
const buf = new Uint8Array(mem.buffer);
|
69
|
-
|
70
|
-
for (let i = 0; i < pages; i++) {
|
71
|
-
out += `\x1B[36m${lastPages[i]}\x1B[2m | \x1B[0m`;
|
72
|
-
|
73
|
-
for (let j = 0; j < 50; j++) {
|
74
|
-
const val = buf[i * pageSize + j];
|
75
|
-
if (val === 0) out += '\x1B[2m';
|
76
|
-
out += val.toString(16).padStart(2, '0');
|
77
|
-
if (val === 0) out += '\x1B[0m';
|
78
|
-
out += ' ';
|
79
|
-
}
|
80
|
-
out += '\n';
|
81
|
-
}
|
82
|
-
|
83
|
-
return out;
|
84
|
-
};
|
85
|
-
|
86
|
-
lastPages = [...pages.keys()];
|
87
|
-
lastMemory = exports.$;
|
88
|
-
console.log(memoryToString(lastMemory));
|
89
|
-
}
|
package/runner/profile.js
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
import compile from '../compiler/index.js';
|
2
|
-
import fs from 'node:fs';
|
3
|
-
|
4
|
-
let csv = `phase,time\n`;
|
5
|
-
|
6
|
-
csv += `node,${performance.now()}\n`;
|
7
|
-
|
8
|
-
const t0 = performance.now();
|
9
|
-
const file = process.argv.slice(2).find(x => x[0] !== '-');
|
10
|
-
const source = fs.readFileSync(file, 'utf8');
|
11
|
-
csv += `read,${performance.now() - t0}\n`;
|
12
|
-
|
13
|
-
console.log = x => {
|
14
|
-
if (x.includes(' in ')) {
|
15
|
-
csv += [ 'parse', 'codegen', 'opt', 'sections' ][parseInt(x[0]) - 1] + ',' + x.split(' in ')[1].slice(0, -2) + '\n';
|
16
|
-
}
|
17
|
-
};
|
18
|
-
|
19
|
-
const wasm = compile(source, [ 'info' ]);
|
20
|
-
|
21
|
-
let cache = '';
|
22
|
-
const print = str => {
|
23
|
-
cache += str;
|
24
|
-
|
25
|
-
if (str === '\n') {
|
26
|
-
process.stdout.write(cache);
|
27
|
-
cache = '';
|
28
|
-
}
|
29
|
-
};
|
30
|
-
|
31
|
-
const t1 = performance.now();
|
32
|
-
const { instance } = await WebAssembly.instantiate(wasm, {
|
33
|
-
'': {
|
34
|
-
p: i => print(Number(i).toString()),
|
35
|
-
c: i => print(String.fromCharCode(Number(i)))
|
36
|
-
}
|
37
|
-
});
|
38
|
-
csv += `inst,${performance.now() - t1}\n`;
|
39
|
-
|
40
|
-
const t2 = performance.now();
|
41
|
-
instance.exports.m();
|
42
|
-
print('\n');
|
43
|
-
|
44
|
-
csv += `exec,${performance.now() - t2}`;
|
45
|
-
|
46
|
-
fs.writeFileSync(`profile.csv`, csv);
|