porffor 0.14.0-a24ac8cf2 → 0.14.0-af9ac5ad4
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 +5 -1
- package/asur/index.js +1 -1
- package/compiler/builtins/array.ts +6 -4
- package/compiler/builtins/boolean.ts +1 -1
- package/compiler/builtins/error.js +22 -0
- package/compiler/builtins/set.ts +5 -6
- package/compiler/builtins/symbol.ts +61 -0
- package/compiler/builtins.js +13 -6
- package/compiler/codegen.js +297 -126
- package/compiler/decompile.js +1 -1
- package/compiler/generated_builtins.js +220 -31
- package/compiler/precompile.js +1 -1
- package/compiler/prefs.js +6 -2
- package/compiler/prototype.js +180 -157
- package/compiler/wrap.js +82 -40
- package/package.json +1 -1
- package/runner/index.js +1 -1
- package/runner/repl.js +18 -2
package/compiler/decompile.js
CHANGED
@@ -119,7 +119,7 @@ export const highlightAsm = asm => asm
|
|
119
119
|
.replace(/(local|global|memory)\.[^\s]*/g, _ => `\x1B[31m${_}\x1B[0m`)
|
120
120
|
.replace(/(i(8|16|32|64)x[0-9]+|v128)(\.[^\s]*)?/g, _ => `\x1B[34m${_}\x1B[0m`)
|
121
121
|
.replace(/(i32|i64|f32|f64|drop)(\.[^\s]*)?/g, _ => `\x1B[36m${_}\x1B[0m`)
|
122
|
-
.replace(/(return_call|call|br_if|br|return|rethrow|throw)/g, _ => `\x1B[35m${_}\x1B[0m`)
|
122
|
+
.replace(/(return_call|call_indirect|call|br_if|br|return|rethrow|throw)/g, _ => `\x1B[35m${_}\x1B[0m`)
|
123
123
|
.replace(/(block|loop|if|end|else|try|catch_all|catch|delegate)/g, _ => `\x1B[95m${_}\x1B[0m`)
|
124
124
|
.replace(/unreachable/g, _ => `\x1B[91m${_}\x1B[0m`)
|
125
125
|
.replace(/ \-?[0-9\.]+/g, _ => ` \x1B[33m${_.slice(1)}\x1B[0m`)
|
@@ -228,7 +228,7 @@ export const BuiltinFuncs = function() {
|
|
228
228
|
localNames: ["x","x#type"],
|
229
229
|
};
|
230
230
|
this.__Array_prototype_slice = {
|
231
|
-
wasm: (scope, {allocPage,builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,6],[32,4],[65,0],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,6],[33,4],[11],[32,2],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[33,2],[32,4],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[33,4],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,6],[32,2],[160],[34,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[33,2],[11],[11],[32,2],[32,6],[100],[4,64],[32,6],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,6],[32,4],[160],[34,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[33,4],[11],[11],[32,4],[32,6],[100],[4,64],[32,6],[33,4],[11],...number(allocPage(scope, 'array: __Array_prototype_slice/out', 'f64') * pageSize, 124),[34,7],[252,3],[34,8],[65,0],[54,1,0],[32,2],[32,4],[100],[4,64],[32,7],[65,16],[15],[11],[32,7],[33,9],[32,0],[34,10],[32,4],[68,0,0,0,0,0,0,
|
231
|
+
wasm: (scope, {allocPage,builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,6],[32,4],[65,0],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,6],[33,4],[11],[32,2],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[33,2],[32,4],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[33,4],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,6],[32,2],[160],[34,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[33,2],[11],[11],[32,2],[32,6],[100],[4,64],[32,6],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,6],[32,4],[160],[34,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[33,4],[11],[11],[32,4],[32,6],[100],[4,64],[32,6],[33,4],[11],...number(allocPage(scope, 'array: __Array_prototype_slice/out', 'f64') * pageSize, 124),[34,7],[252,3],[34,8],[65,0],[54,1,0],[32,2],[32,4],[100],[4,64],[32,7],[65,16],[15],[11],[32,7],[33,9],[32,0],[34,10],[32,4],[68,0,0,0,0,0,0,34,64],[162],[160],[33,11],[32,10],[32,2],[68,0,0,0,0,0,0,34,64],[162],[160],[33,10],[3,64],[32,10],[32,11],[99],[4,64],[32,9],[252,2],[32,10],[252,2],[43,0,4],[57,0,4],[32,9],[68,0,0,0,0,0,0,32,64],[160],[252,2],[32,10],[68,0,0,0,0,0,0,32,64],[160],[252,2],[45,0,4],[58,0,4],[32,10],[68,0,0,0,0,0,0,34,64],[160],[33,10],[32,9],[68,0,0,0,0,0,0,34,64],[160],[33,9],[12,1],[11],[11],[32,7],[252,3],[32,4],[32,2],[161],[34,12],[252,3],[54,1,0],[32,7],[65,16],[15]],
|
232
232
|
params: [124,127,124,127,124,127],
|
233
233
|
typedParams: true,
|
234
234
|
returns: [124,127],
|
@@ -237,34 +237,34 @@ export const BuiltinFuncs = function() {
|
|
237
237
|
localNames: ["_this","_this#type","start","start#type","end","end#type","len","out","#makearray_pointer_tmp","outPtr","thisPtr","thisPtrEnd","__length_setter_tmp"],
|
238
238
|
};
|
239
239
|
this.__Array_prototype_indexOf = {
|
240
|
-
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,6],[32,4],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,4],[32,6],[100],[4,64],[32,6],[33,4],[5],[32,4],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[33,4],[11],[5],[68,0,0,0,0,0,0,0,0],[33,4],[11],[32,4],[33,7],[3,64],[32,7],[32,6],[99],[4,64],[32,7],[252,3],[65,
|
240
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,6],[32,4],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,4],[32,6],[100],[4,64],[32,6],[33,4],[5],[32,4],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[33,4],[11],[5],[68,0,0,0,0,0,0,0,0],[33,4],[11],[32,4],[33,7],[3,64],[32,7],[32,6],[99],[4,64],[32,7],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,8],[43,0,4],[32,8],[45,0,12],[26],[32,2],[97],[4,64],[32,7],[65,0],[15],[11],[32,7],[68,0,0,0,0,0,0,240,63],[160],[33,7],[12,1],[11],[11],[68,0,0,0,0,0,0,240,191],[65,0],[15]],
|
241
241
|
params: [124,127,124,127,124,127],
|
242
242
|
typedParams: true,
|
243
243
|
returns: [124,127],
|
244
244
|
typedReturns: true,
|
245
|
-
locals: [124,124,127],
|
246
|
-
localNames: ["_this","_this#type","searchElement","searchElement#type","position","position#type","len","i","#last_type"],
|
245
|
+
locals: [124,124,127,127],
|
246
|
+
localNames: ["_this","_this#type","searchElement","searchElement#type","position","position#type","len","i","#loadArray_offset","#last_type"],
|
247
247
|
};
|
248
248
|
this.__Array_prototype_lastIndexOf = {
|
249
|
-
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,6],[32,4],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,4],[32,6],[100],[4,64],[32,6],[33,4],[5],[32,4],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[33,4],[11],[5],[68,0,0,0,0,0,0,0,0],[33,4],[11],[32,6],[68,0,0,0,0,0,0,240,63],[161],[33,7],[3,64],[32,7],[32,4],[102],[4,64],[32,7],[252,3],[65,
|
249
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,6],[32,4],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,4],[32,6],[100],[4,64],[32,6],[33,4],[5],[32,4],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[33,4],[11],[5],[68,0,0,0,0,0,0,0,0],[33,4],[11],[32,6],[68,0,0,0,0,0,0,240,63],[161],[33,7],[3,64],[32,7],[32,4],[102],[4,64],[32,7],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,8],[43,0,4],[32,8],[45,0,12],[26],[32,2],[97],[4,64],[32,7],[65,0],[15],[11],[32,7],[68,0,0,0,0,0,0,240,63],[161],[33,7],[12,1],[11],[11],[68,0,0,0,0,0,0,240,191],[65,0],[15]],
|
250
250
|
params: [124,127,124,127,124,127],
|
251
251
|
typedParams: true,
|
252
252
|
returns: [124,127],
|
253
253
|
typedReturns: true,
|
254
|
-
locals: [124,124,127],
|
255
|
-
localNames: ["_this","_this#type","searchElement","searchElement#type","position","position#type","len","i","#last_type"],
|
254
|
+
locals: [124,124,127,127],
|
255
|
+
localNames: ["_this","_this#type","searchElement","searchElement#type","position","position#type","len","i","#loadArray_offset","#last_type"],
|
256
256
|
};
|
257
257
|
this.__Array_prototype_includes = {
|
258
|
-
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,6],[32,4],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,4],[32,6],[100],[4,64],[32,6],[33,4],[5],[32,4],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[33,4],[11],[5],[68,0,0,0,0,0,0,0,0],[33,4],[11],[32,4],[33,7],[3,64],[32,7],[32,6],[99],[4,64],[32,7],[252,3],[65,
|
258
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,6],[32,4],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,4],[32,6],[100],[4,64],[32,6],[33,4],[5],[32,4],[68,0,0,0,0,0,0,0,0],[16, builtin('f64_|')],[33,4],[11],[5],[68,0,0,0,0,0,0,0,0],[33,4],[11],[32,4],[33,7],[3,64],[32,7],[32,6],[99],[4,64],[32,7],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,8],[43,0,4],[32,8],[45,0,12],[26],[32,2],[97],[4,64],[68,0,0,0,0,0,0,240,63],[65,1],[15],[11],[32,7],[68,0,0,0,0,0,0,240,63],[160],[33,7],[12,1],[11],[11],[68,0,0,0,0,0,0,0,0],[65,1],[15]],
|
259
259
|
params: [124,127,124,127,124,127],
|
260
260
|
typedParams: true,
|
261
261
|
returns: [124,127],
|
262
262
|
typedReturns: true,
|
263
|
-
locals: [124,124,127],
|
264
|
-
localNames: ["_this","_this#type","searchElement","searchElement#type","position","position#type","len","i","#last_type"],
|
263
|
+
locals: [124,124,127,127],
|
264
|
+
localNames: ["_this","_this#type","searchElement","searchElement#type","position","position#type","len","i","#loadArray_offset","#last_type"],
|
265
265
|
};
|
266
266
|
this.__Array_prototype_with = {
|
267
|
-
wasm: (scope, {allocPage,builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,6],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,6],[32,2],[160],[34,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],...internalThrow(scope, 'RangeError', `Invalid index`),[11],[11],[32,2],[32,6],[100],[4,64],...internalThrow(scope, 'RangeError', `Invalid index`),[11],...number(allocPage(scope, 'array: __Array_prototype_with/out', 'f64') * pageSize, 124),[34,7],[252,3],[34,8],[65,0],[54,1,0],[32,0],[32,7],[16, builtin('__Porffor_clone')],[32,7],[252,3],[32,2],[252,3],[65,
|
267
|
+
wasm: (scope, {allocPage,builtin,internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,6],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,6],[32,2],[160],[34,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],...internalThrow(scope, 'RangeError', `Invalid index`),[11],[11],[32,2],[32,6],[100],[4,64],...internalThrow(scope, 'RangeError', `Invalid index`),[11],...number(allocPage(scope, 'array: __Array_prototype_with/out', 'f64') * pageSize, 124),[34,7],[252,3],[34,8],[65,0],[54,1,0],[32,0],[32,7],[16, builtin('__Porffor_clone')],[32,7],[252,3],[32,2],[252,3],[65,9],[108],[106],[32,4],[34,9],[57,0,4],[32,7],[65,16],[15]],
|
268
268
|
params: [124,127,124,127,124,127],
|
269
269
|
typedParams: true,
|
270
270
|
returns: [124,127],
|
@@ -273,22 +273,22 @@ export const BuiltinFuncs = function() {
|
|
273
273
|
localNames: ["_this","_this#type","index","index#type","value","value#type","len","out","#makearray_pointer_tmp","__member_setter_val_tmp"],
|
274
274
|
};
|
275
275
|
this.__Array_prototype_reverse = {
|
276
|
-
wasm: (scope, {}) => [[32,0],[252,3],[40,1,0],[184],[33,2],[68,0,0,0,0,0,0,0,0],[33,3],[32,2],[68,0,0,0,0,0,0,240,63],[161],[33,4],[3,64],[32,3],[32,4],[99],[4,64],[32,3],[252,3],[65,
|
276
|
+
wasm: (scope, {}) => [[32,0],[252,3],[40,1,0],[184],[33,2],[68,0,0,0,0,0,0,0,0],[33,3],[32,2],[68,0,0,0,0,0,0,240,63],[161],[33,4],[3,64],[32,3],[32,4],[99],[4,64],[32,3],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,6],[43,0,4],[32,6],[45,0,12],[26],[33,5],[32,0],[252,3],[32,3],[32,3],[68,0,0,0,0,0,0,240,63],[160],[33,3],[252,3],[65,9],[108],[106],[32,4],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,6],[43,0,4],[32,6],[45,0,12],[26],[34,8],[57,0,4],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[161],[33,4],[252,3],[65,9],[108],[106],[32,5],[34,8],[57,0,4],[12,1],[11],[11],[32,0],[65,16],[15]],
|
277
277
|
params: [124,127],
|
278
278
|
typedParams: true,
|
279
279
|
returns: [124,127],
|
280
280
|
typedReturns: true,
|
281
|
-
locals: [124,124,124,124,127,124],
|
282
|
-
localNames: ["_this","_this#type","len","start","end","tmp","#last_type","__member_setter_val_tmp"],
|
281
|
+
locals: [124,124,124,124,127,127,124],
|
282
|
+
localNames: ["_this","_this#type","len","start","end","tmp","#loadArray_offset","#last_type","__member_setter_val_tmp"],
|
283
283
|
};
|
284
284
|
this.__Array_prototype_toReversed = {
|
285
|
-
wasm: (scope, {allocPage,}) => [[32,0],[252,3],[40,1,0],[184],[33,2],[68,0,0,0,0,0,0,0,0],[33,3],[32,2],[68,0,0,0,0,0,0,240,63],[161],[33,4],...number(allocPage(scope, 'array: __Array_prototype_toReversed/out', 'f64') * pageSize, 124),[34,5],[252,3],[34,6],[65,0],[54,1,0],[32,5],[252,3],[32,2],[34,7],[252,3],[54,1,0],[3,64],[32,3],[32,4],[99],[4,64],[32,5],[252,3],[32,3],[252,3],[65,
|
285
|
+
wasm: (scope, {allocPage,}) => [[32,0],[252,3],[40,1,0],[184],[33,2],[68,0,0,0,0,0,0,0,0],[33,3],[32,2],[68,0,0,0,0,0,0,240,63],[161],[33,4],...number(allocPage(scope, 'array: __Array_prototype_toReversed/out', 'f64') * pageSize, 124),[34,5],[252,3],[34,6],[65,0],[54,1,0],[32,5],[252,3],[32,2],[34,7],[252,3],[54,1,0],[3,64],[32,3],[32,4],[99],[4,64],[32,5],[252,3],[32,3],[252,3],[65,9],[108],[106],[32,4],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,9],[43,0,4],[32,9],[45,0,12],[26],[34,8],[57,0,4],[32,5],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[161],[33,4],[252,3],[65,9],[108],[106],[32,3],[32,3],[68,0,0,0,0,0,0,240,63],[160],[33,3],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,9],[43,0,4],[32,9],[45,0,12],[26],[34,8],[57,0,4],[12,1],[11],[11],[32,5],[65,16],[15]],
|
286
286
|
params: [124,127],
|
287
287
|
typedParams: true,
|
288
288
|
returns: [124,127],
|
289
289
|
typedReturns: true,
|
290
|
-
locals: [124,124,124,124,127,124,124,127],
|
291
|
-
localNames: ["_this","_this#type","len","start","end","out","#makearray_pointer_tmp","__length_setter_tmp","__member_setter_val_tmp","#last_type"],
|
290
|
+
locals: [124,124,124,124,127,124,124,127,127],
|
291
|
+
localNames: ["_this","_this#type","len","start","end","out","#makearray_pointer_tmp","__length_setter_tmp","__member_setter_val_tmp","#loadArray_offset","#last_type"],
|
292
292
|
};
|
293
293
|
this.__Array_prototype_valueOf = {
|
294
294
|
wasm: (scope, {}) => [[32,0],[65,16],[15]],
|
@@ -1123,6 +1123,150 @@ export const BuiltinFuncs = function() {
|
|
1123
1123
|
locals: [127],
|
1124
1124
|
localNames: ["#last_type"],
|
1125
1125
|
};
|
1126
|
+
this.Error = {
|
1127
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1128
|
+
params: [124,127],
|
1129
|
+
typedParams: true,
|
1130
|
+
returns: [124,127],
|
1131
|
+
typedReturns: true,
|
1132
|
+
locals: [127],
|
1133
|
+
localNames: ["message","message#type","#last_type"],
|
1134
|
+
};
|
1135
|
+
this.Error$constructor = {
|
1136
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1137
|
+
params: [124,127],
|
1138
|
+
typedParams: true,
|
1139
|
+
returns: [124,127],
|
1140
|
+
typedReturns: true,
|
1141
|
+
locals: [127],
|
1142
|
+
localNames: ["message","message#type","#last_type"],
|
1143
|
+
};
|
1144
|
+
this.AggregateError = {
|
1145
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1146
|
+
params: [124,127],
|
1147
|
+
typedParams: true,
|
1148
|
+
returns: [124,127],
|
1149
|
+
typedReturns: true,
|
1150
|
+
locals: [127],
|
1151
|
+
localNames: ["message","message#type","#last_type"],
|
1152
|
+
};
|
1153
|
+
this.AggregateError$constructor = {
|
1154
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1155
|
+
params: [124,127],
|
1156
|
+
typedParams: true,
|
1157
|
+
returns: [124,127],
|
1158
|
+
typedReturns: true,
|
1159
|
+
locals: [127],
|
1160
|
+
localNames: ["message","message#type","#last_type"],
|
1161
|
+
};
|
1162
|
+
this.TypeError = {
|
1163
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1164
|
+
params: [124,127],
|
1165
|
+
typedParams: true,
|
1166
|
+
returns: [124,127],
|
1167
|
+
typedReturns: true,
|
1168
|
+
locals: [127],
|
1169
|
+
localNames: ["message","message#type","#last_type"],
|
1170
|
+
};
|
1171
|
+
this.TypeError$constructor = {
|
1172
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1173
|
+
params: [124,127],
|
1174
|
+
typedParams: true,
|
1175
|
+
returns: [124,127],
|
1176
|
+
typedReturns: true,
|
1177
|
+
locals: [127],
|
1178
|
+
localNames: ["message","message#type","#last_type"],
|
1179
|
+
};
|
1180
|
+
this.ReferenceError = {
|
1181
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1182
|
+
params: [124,127],
|
1183
|
+
typedParams: true,
|
1184
|
+
returns: [124,127],
|
1185
|
+
typedReturns: true,
|
1186
|
+
locals: [127],
|
1187
|
+
localNames: ["message","message#type","#last_type"],
|
1188
|
+
};
|
1189
|
+
this.ReferenceError$constructor = {
|
1190
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1191
|
+
params: [124,127],
|
1192
|
+
typedParams: true,
|
1193
|
+
returns: [124,127],
|
1194
|
+
typedReturns: true,
|
1195
|
+
locals: [127],
|
1196
|
+
localNames: ["message","message#type","#last_type"],
|
1197
|
+
};
|
1198
|
+
this.SyntaxError = {
|
1199
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1200
|
+
params: [124,127],
|
1201
|
+
typedParams: true,
|
1202
|
+
returns: [124,127],
|
1203
|
+
typedReturns: true,
|
1204
|
+
locals: [127],
|
1205
|
+
localNames: ["message","message#type","#last_type"],
|
1206
|
+
};
|
1207
|
+
this.SyntaxError$constructor = {
|
1208
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1209
|
+
params: [124,127],
|
1210
|
+
typedParams: true,
|
1211
|
+
returns: [124,127],
|
1212
|
+
typedReturns: true,
|
1213
|
+
locals: [127],
|
1214
|
+
localNames: ["message","message#type","#last_type"],
|
1215
|
+
};
|
1216
|
+
this.RangeError = {
|
1217
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1218
|
+
params: [124,127],
|
1219
|
+
typedParams: true,
|
1220
|
+
returns: [124,127],
|
1221
|
+
typedReturns: true,
|
1222
|
+
locals: [127],
|
1223
|
+
localNames: ["message","message#type","#last_type"],
|
1224
|
+
};
|
1225
|
+
this.RangeError$constructor = {
|
1226
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1227
|
+
params: [124,127],
|
1228
|
+
typedParams: true,
|
1229
|
+
returns: [124,127],
|
1230
|
+
typedReturns: true,
|
1231
|
+
locals: [127],
|
1232
|
+
localNames: ["message","message#type","#last_type"],
|
1233
|
+
};
|
1234
|
+
this.EvalError = {
|
1235
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1236
|
+
params: [124,127],
|
1237
|
+
typedParams: true,
|
1238
|
+
returns: [124,127],
|
1239
|
+
typedReturns: true,
|
1240
|
+
locals: [127],
|
1241
|
+
localNames: ["message","message#type","#last_type"],
|
1242
|
+
};
|
1243
|
+
this.EvalError$constructor = {
|
1244
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1245
|
+
params: [124,127],
|
1246
|
+
typedParams: true,
|
1247
|
+
returns: [124,127],
|
1248
|
+
typedReturns: true,
|
1249
|
+
locals: [127],
|
1250
|
+
localNames: ["message","message#type","#last_type"],
|
1251
|
+
};
|
1252
|
+
this.URIError = {
|
1253
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1254
|
+
params: [124,127],
|
1255
|
+
typedParams: true,
|
1256
|
+
returns: [124,127],
|
1257
|
+
typedReturns: true,
|
1258
|
+
locals: [127],
|
1259
|
+
localNames: ["message","message#type","#last_type"],
|
1260
|
+
};
|
1261
|
+
this.URIError$constructor = {
|
1262
|
+
wasm: (scope, {}) => [[68,0,0,0,0,0,0,240,63],[65,4],[34,2],[15]],
|
1263
|
+
params: [124,127],
|
1264
|
+
typedParams: true,
|
1265
|
+
returns: [124,127],
|
1266
|
+
typedReturns: true,
|
1267
|
+
locals: [127],
|
1268
|
+
localNames: ["message","message#type","#last_type"],
|
1269
|
+
};
|
1126
1270
|
this.escape = {
|
1127
1271
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: escape/lut', 'i8') * pageSize, 127),[33,2],[32,0],[40,1,0],[34,3],[33,4],[32,0],[33,5],[32,1],[65,18],[70],[4,64],[32,5],[32,3],[106],[33,6],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[32,5],[65,1],[106],[33,5],[45,0,4],[34,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[12,3],[11],[11],[32,4],[65,2],[106],[33,4],[12,1],[11],[11],[32,4],[32,3],[70],[4,64],[32,0],[15],[11],...number(allocPage(scope, 'bytestring: escape/output', 'i8') * pageSize, 127),[34,8],[32,4],[34,9],[54,1,0],[32,0],[33,5],[32,8],[33,10],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[32,5],[65,1],[106],[33,5],[45,0,4],[34,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[32,10],[32,10],[65,1],[106],[33,10],[32,7],[58,0,4],[12,3],[11],[11],[32,10],[32,10],[65,1],[106],[33,10],[65,37],[58,0,4],[32,7],[65,15],[113],[65,48],[106],[34,11],[65,57],[74],[4,64],[32,11],[65,7],[106],[33,11],[11],[32,7],[65,4],[117],[65,48],[106],[34,12],[65,57],[74],[4,64],[32,12],[65,7],[106],[33,12],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,12],[58,0,4],[32,10],[32,10],[65,1],[106],[33,10],[32,11],[58,0,4],[12,1],[11],[11],[32,8],[15],[11],[32,5],[32,3],[65,2],[108],[106],[33,6],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[47,0,4],[33,7],[32,5],[65,2],[106],[33,5],[32,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[12,3],[11],[11],[32,7],[65,128,2],[72],[4,64],[32,4],[65,2],[106],[33,4],[5],[32,4],[65,5],[106],[33,4],[11],[12,1],[11],[11],[32,4],[32,3],[70],[4,64],[32,0],[15],[11],[65,128,128,4],[34,8],[34,13],[65,0],[54,1,0],[32,8],[32,4],[34,9],[54,1,0],[32,0],[33,5],[32,8],[33,10],[3,64],[32,5],[32,6],[72],[4,64],[32,5],[47,0,4],[33,7],[32,5],[65,2],[106],[33,5],[32,7],[65,128,1],[72],[4,64],[32,2],[32,7],[106],[45,0,4],[4,64],[32,10],[32,10],[65,1],[106],[33,10],[32,7],[58,0,4],[12,3],[11],[11],[32,7],[65,128,2],[72],[4,64],[32,10],[32,10],[65,1],[106],[33,10],[65,37],[58,0,4],[32,7],[65,15],[113],[65,48],[106],[34,11],[65,57],[74],[4,64],[32,11],[65,7],[106],[33,11],[11],[32,7],[65,4],[117],[65,48],[106],[34,12],[65,57],[74],[4,64],[32,12],[65,7],[106],[33,12],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,12],[58,0,4],[32,10],[32,10],[65,1],[106],[33,10],[32,11],[58,0,4],[5],[32,10],[65,165,234,1],[59,0,4],[32,10],[65,2],[106],[33,10],[32,7],[65,12],[117],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[32,7],[65,8],[117],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[32,7],[65,4],[117],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[32,7],[65,15],[113],[65,48],[106],[34,14],[65,57],[74],[4,64],[32,14],[65,7],[106],[33,14],[11],[32,10],[32,10],[65,1],[106],[33,10],[32,14],[58,0,4],[11],[12,1],[11],[11],[32,8],[15]],
|
1128
1272
|
params: [127,127],
|
@@ -1225,7 +1369,7 @@ export const BuiltinFuncs = function() {
|
|
1225
1369
|
locals: [127],
|
1226
1370
|
localNames: ["_this","_this#type","index","index#type","value","value#type","offset"],
|
1227
1371
|
};
|
1228
|
-
this.__Set_prototype_size = {
|
1372
|
+
this.__Set_prototype_size$get = {
|
1229
1373
|
wasm: (scope, {}) => [[32,0],[252,2],[40,0,0],[183],[65,0],[15]],
|
1230
1374
|
params: [124,127],
|
1231
1375
|
typedParams: true,
|
@@ -1235,13 +1379,13 @@ export const BuiltinFuncs = function() {
|
|
1235
1379
|
localNames: ["_this","_this#type"],
|
1236
1380
|
};
|
1237
1381
|
this.__Set_prototype_values = {
|
1238
|
-
wasm: (scope, {builtin,}) => [[32,0],[
|
1382
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,2],[40,0,0],[183],[33,2],[16, builtin('__Porffor_allocate')],[33,3],[68,0,0,0,0,0,0,0,0],[33,4],[3,64],[32,4],[32,2],[99],[4,64],[32,0],[65,20],[32,4],[65,0],[16, builtin('__Porffor_set_read')],[33,7],[33,5],[32,7],[33,6],[32,3],[252,3],[34,9],[40,1,0],[34,8],[65,9],[108],[32,9],[106],[34,10],[32,5],[57,0,4],[32,10],[32,6],[58,0,12],[32,9],[32,8],[65,1],[106],[54,1,0],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[12,1],[11],[11],[32,3],[65,16],[15]],
|
1239
1383
|
params: [124,127],
|
1240
1384
|
typedParams: true,
|
1241
1385
|
returns: [124,127],
|
1242
1386
|
typedReturns: true,
|
1243
|
-
locals: [124,
|
1244
|
-
localNames: ["_this","_this#type","size","
|
1387
|
+
locals: [124,124,124,124,127,127,127,127,127],
|
1388
|
+
localNames: ["_this","_this#type","size","out","i","val","val#type","#last_type","__proto_length_cache","__proto_pointer_cache","__push_tmp"],
|
1245
1389
|
};
|
1246
1390
|
this.__Set_prototype_keys = {
|
1247
1391
|
wasm: (scope, {builtin,}) => [[32,0],[65,20],[16, builtin('__Set_prototype_values')],[34,2],[15]],
|
@@ -1253,31 +1397,31 @@ export const BuiltinFuncs = function() {
|
|
1253
1397
|
localNames: ["_this","_this#type","#last_type"],
|
1254
1398
|
};
|
1255
1399
|
this.__Set_prototype_has = {
|
1256
|
-
wasm: (scope, {builtin,}) => [[32,0],[
|
1400
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,2],[40,0,0],[183],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[2,127,"string_only"],[32,0],[65,20],[32,5],[65,0],[16, builtin('__Porffor_set_read')],[33,6],[34,7,"string_only"],[32,2],[34,8,"string_only"],[32,6,"string_only|start"],[65,2],[70],[32,3],[65,2],[70],[113],[4,64],[32,7],[252,3],[34,9],[32,8],[252,3],[34,11],[71],[4,127],[32,9],[40,0,0],[34,10],[32,11],[40,0,0],[71],[4,64],[65,0],[12,1],[11],[65,0],[33,12],[32,10],[65,2],[108],[33,13],[3,64],[32,12],[32,9],[106],[47,0,4],[32,12],[32,11],[106],[47,0,4],[71],[4,64],[65,0],[12,2],[11],[32,12],[65,2],[106],[34,12],[32,13],[71],[13,0],[11],[65,1],[5],[65,1],[11],[12,1],[11],[32,6],[65,18],[70],[32,3],[65,18],[70],[113],[4,64],[32,7],[252,3],[34,9],[32,8],[252,3],[34,11],[71],[4,127],[32,9],[40,0,0],[34,10],[32,11],[40,0,0],[71],[4,64],[65,0],[12,1],[11],[65,0],[33,12],[32,10],[33,13],[3,64],[32,12],[32,9],[106],[45,0,4],[32,12],[32,11],[106],[45,0,4],[71],[4,64],[65,0],[12,2],[11],[32,12],[65,1],[106],[34,12],[32,13],[71],[13,0],[11],[65,1],[5],[65,1],[11],[12,1],[11,"string_only|end"],[97],[11,"string_only"],[32,6],[32,3],[70],[113],[4,64],[68,0,0,0,0,0,0,240,63],[65,1],[15],[11],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[68,0,0,0,0,0,0,0,0],[65,1],[15]],
|
1257
1401
|
params: [124,127,124,127],
|
1258
1402
|
typedParams: true,
|
1259
1403
|
returns: [124,127],
|
1260
1404
|
typedReturns: true,
|
1261
|
-
locals: [124,127,124],
|
1262
|
-
localNames: ["_this","_this#type","value","value#type","size","#last_type","
|
1405
|
+
locals: [124,124,127,124,124,127,127,127,127,127],
|
1406
|
+
localNames: ["_this","_this#type","value","value#type","size","i","#last_type","__tmpop_left","__tmpop_right","compare_left_pointer","compare_left_length","compare_right_pointer","compare_index","compare_index_end"],
|
1263
1407
|
};
|
1264
1408
|
this.__Set_prototype_add = {
|
1265
|
-
wasm: (scope, {builtin,}) => [[32,0],[
|
1409
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,2],[40,0,0],[183],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[2,127,"string_only"],[32,0],[65,20],[32,5],[65,0],[16, builtin('__Porffor_set_read')],[33,6],[34,7,"string_only"],[32,2],[34,8,"string_only"],[32,6,"string_only|start"],[65,2],[70],[32,3],[65,2],[70],[113],[4,64],[32,7],[252,3],[34,9],[32,8],[252,3],[34,11],[71],[4,127],[32,9],[40,0,0],[34,10],[32,11],[40,0,0],[71],[4,64],[65,0],[12,1],[11],[65,0],[33,12],[32,10],[65,2],[108],[33,13],[3,64],[32,12],[32,9],[106],[47,0,4],[32,12],[32,11],[106],[47,0,4],[71],[4,64],[65,0],[12,2],[11],[32,12],[65,2],[106],[34,12],[32,13],[71],[13,0],[11],[65,1],[5],[65,1],[11],[12,1],[11],[32,6],[65,18],[70],[32,3],[65,18],[70],[113],[4,64],[32,7],[252,3],[34,9],[32,8],[252,3],[34,11],[71],[4,127],[32,9],[40,0,0],[34,10],[32,11],[40,0,0],[71],[4,64],[65,0],[12,1],[11],[65,0],[33,12],[32,10],[33,13],[3,64],[32,12],[32,9],[106],[45,0,4],[32,12],[32,11],[106],[45,0,4],[71],[4,64],[65,0],[12,2],[11],[32,12],[65,1],[106],[34,12],[32,13],[71],[13,0],[11],[65,1],[5],[65,1],[11],[12,1],[11,"string_only|end"],[97],[11,"string_only"],[32,6],[32,3],[70],[113],[4,64],[32,0],[65,20],[15],[11],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[32,0],[252,2],[32,4],[68,0,0,0,0,0,0,240,63],[160],[252,2],[54,0,0],[32,0],[65,20],[32,4],[65,0],[32,2],[32,3],[16, builtin('__Porffor_set_write')],[26],[32,0],[65,20],[15]],
|
1266
1410
|
params: [124,127,124,127],
|
1267
1411
|
typedParams: true,
|
1268
1412
|
returns: [124,127],
|
1269
1413
|
typedReturns: true,
|
1270
|
-
locals: [124,127,124],
|
1271
|
-
localNames: ["_this","_this#type","value","value#type","size","#last_type","
|
1414
|
+
locals: [124,124,127,124,124,127,127,127,127,127],
|
1415
|
+
localNames: ["_this","_this#type","value","value#type","size","i","#last_type","__tmpop_left","__tmpop_right","compare_left_pointer","compare_left_length","compare_right_pointer","compare_index","compare_index_end"],
|
1272
1416
|
};
|
1273
1417
|
this.__Set_prototype_delete = {
|
1274
|
-
wasm: (scope, {builtin,}) => [[32,0],[
|
1418
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,2],[40,0,0],[183],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[2,64],[2,127,"string_only"],[32,0],[65,20],[32,5],[65,0],[16, builtin('__Porffor_set_read')],[33,6],[34,7,"string_only"],[32,2],[34,8,"string_only"],[32,6,"string_only|start"],[65,2],[70],[32,3],[65,2],[70],[113],[4,64],[32,7],[252,3],[34,9],[32,8],[252,3],[34,11],[71],[4,127],[32,9],[40,0,0],[34,10],[32,11],[40,0,0],[71],[4,64],[65,0],[12,1],[11],[65,0],[33,12],[32,10],[65,2],[108],[33,13],[3,64],[32,12],[32,9],[106],[47,0,4],[32,12],[32,11],[106],[47,0,4],[71],[4,64],[65,0],[12,2],[11],[32,12],[65,2],[106],[34,12],[32,13],[71],[13,0],[11],[65,1],[5],[65,1],[11],[12,1],[11],[32,6],[65,18],[70],[32,3],[65,18],[70],[113],[4,64],[32,7],[252,3],[34,9],[32,8],[252,3],[34,11],[71],[4,127],[32,9],[40,0,0],[34,10],[32,11],[40,0,0],[71],[4,64],[65,0],[12,1],[11],[65,0],[33,12],[32,10],[33,13],[3,64],[32,12],[32,9],[106],[45,0,4],[32,12],[32,11],[106],[45,0,4],[71],[4,64],[65,0],[12,2],[11],[32,12],[65,1],[106],[34,12],[32,13],[71],[13,0],[11],[65,1],[5],[65,1],[11],[12,1],[11,"string_only|end"],[97],[11,"string_only"],[32,6],[32,3],[70],[113],[4,64],[32,0],[252,2],[32,4],[68,0,0,0,0,0,0,240,63],[161],[252,2],[54,0,0],[32,5],[252,3],[65,9],[108],[32,0],[252,3],[106],[65,4],[106],[34,14],[32,14],[65,9],[106],[32,4],[32,5],[161],[252,3],[65,1],[107],[65,9],[108],[252,10,0,0],[68,0,0,0,0,0,0,240,63],[65,1],[15],[11],[11],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[12,1],[11],[11],[68,0,0,0,0,0,0,0,0],[65,1],[15]],
|
1275
1419
|
params: [124,127,124,127],
|
1276
1420
|
typedParams: true,
|
1277
1421
|
returns: [124,127],
|
1278
1422
|
typedReturns: true,
|
1279
|
-
locals: [124,127,124,127],
|
1280
|
-
localNames: ["_this","_this#type","value","value#type","size","#last_type","
|
1423
|
+
locals: [124,124,127,124,124,127,127,127,127,127,127],
|
1424
|
+
localNames: ["_this","_this#type","value","value#type","size","i","#last_type","__tmpop_left","__tmpop_right","compare_left_pointer","compare_left_length","compare_right_pointer","compare_index","compare_index_end","offset"],
|
1281
1425
|
};
|
1282
1426
|
this.__Set_prototype_clear = {
|
1283
1427
|
wasm: (scope, {}) => [[32,0],[252,2],[65,0],[54,0,0],[68,0,0,0,0,0,0,0,0],[65,3],[15]],
|
@@ -1298,7 +1442,7 @@ export const BuiltinFuncs = function() {
|
|
1298
1442
|
localNames: [],
|
1299
1443
|
};
|
1300
1444
|
this.Set$constructor = {
|
1301
|
-
wasm: (scope, {builtin,internalThrow,}) => [[16, builtin('__Porffor_allocate')],[33,2],[32,0],[32,1],[16, builtin('__Porffor_rawType')],[34,3],[68,0,0,0,0,0,0,48,64],[97],[32,3],[68,0,0,0,0,0,0,0,64],[97],[114],[32,3],[68,0,0,0,0,0,0,50,64],[97],[114],[32,3],[68,0,0,0,0,0,0,52,64],[97],[114],[4,64],[32,0],[252,3],[33,4],[65,0],[33,6],[32,4],[40,1,0],[33,5],[32,1],[33,10],[2,64],[32,10],[65,2],[70],[4,64,"TYPESWITCH|String"],[65,2],[33,8],[3,64],[65,0],[32,4],[47,0,4],[59,0,3],[68,0,0,0,0,0,0,240,191],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,4],[65,2],[106],[33,4],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],[32,10],[65,16],[70],[4,64,"TYPESWITCH|Array"],[
|
1445
|
+
wasm: (scope, {builtin,internalThrow,}) => [[16, builtin('__Porffor_allocate')],[33,2],[32,0],[32,1],[16, builtin('__Porffor_rawType')],[34,3],[68,0,0,0,0,0,0,48,64],[97],[32,3],[68,0,0,0,0,0,0,0,64],[97],[114],[32,3],[68,0,0,0,0,0,0,50,64],[97],[114],[32,3],[68,0,0,0,0,0,0,52,64],[97],[114],[4,64],[32,0],[252,3],[33,4],[65,0],[33,6],[32,4],[40,1,0],[33,5],[32,1],[33,10],[2,64],[32,10],[65,2],[70],[4,64,"TYPESWITCH|String"],[65,2],[33,8],[3,64],[65,0],[32,4],[47,0,4],[59,0,3],[68,0,0,0,0,0,0,240,191],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,4],[65,2],[106],[33,4],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],[32,10],[65,16],[70],[4,64,"TYPESWITCH|Array"],[3,64],[32,4],[43,0,4],[32,4],[45,0,12],[33,8],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,4],[65,9],[106],[33,4],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],[32,10],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[65,18],[33,8],[3,64],[65,0],[32,4],[32,6],[106],[45,0,4],[58,0,3],[68,0,0,0,0,0,0,240,191],[33,7],[2,64],[32,2],[65,20],[32,7],[32,8],[16, builtin('__Set_prototype_add')],[26],[26],[32,6],[65,1],[106],[34,6],[32,5],[71],[13,1],[11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `Tried for..of on non-iterable type`),[11,"TYPESWITCH_end"],[11],[32,2],[15]],
|
1302
1446
|
params: [124,127],
|
1303
1447
|
typedParams: true,
|
1304
1448
|
returns: [124],
|
@@ -1622,4 +1766,49 @@ export const BuiltinFuncs = function() {
|
|
1622
1766
|
locals: [],
|
1623
1767
|
localNames: ["_this","_this#type"],
|
1624
1768
|
};
|
1769
|
+
this.__Porffor_symbol_descStore = {
|
1770
|
+
wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Porffor_symbol_descStore/ptr', 'i8') * pageSize, 124),[33,4],[32,0],[252,3],[4,64],[32,4],[252,2],[40,0,0],[183],[33,5],[32,4],[252,2],[32,5],[68,0,0,0,0,0,0,240,63],[160],[252,2],[54,0,0],[32,4],[65,18],[32,5],[65,0],[32,2],[32,3],[16, builtin('__Porffor_set_write')],[26],[32,5],[65,0],[15],[5],[32,4],[65,18],[32,2],[32,3],[16, builtin('__Porffor_set_read')],[34,6],[15],[11],[68,0,0,0,0,0,0,0,0],[65,3],[15]],
|
1771
|
+
params: [124,127,124,127],
|
1772
|
+
typedParams: true,
|
1773
|
+
returns: [124,127],
|
1774
|
+
typedReturns: true,
|
1775
|
+
locals: [124,124,127],
|
1776
|
+
localNames: ["op","op#type","value","value#type","ptr","size","#last_type"],
|
1777
|
+
};
|
1778
|
+
this.Symbol = {
|
1779
|
+
wasm: (scope, {builtin,}) => [[68,0,0,0,0,0,0,240,63],[65,1],[32,0],[32,1],[16, builtin('__Porffor_symbol_descStore')],[33,2],[68,0,0,0,0,0,0,240,63],[160],[15]],
|
1780
|
+
params: [124,127],
|
1781
|
+
typedParams: true,
|
1782
|
+
returns: [124],
|
1783
|
+
returnType: 6,
|
1784
|
+
locals: [127],
|
1785
|
+
localNames: ["description","description#type","#last_type"],
|
1786
|
+
};
|
1787
|
+
this.__Symbol_prototype_description$get = {
|
1788
|
+
wasm: (scope, {builtin,}) => [[68,0,0,0,0,0,0,0,0],[65,1],[32,0],[68,0,0,0,0,0,0,240,63],[161],[65,0],[16, builtin('__Porffor_symbol_descStore')],[33,3],[34,2],[65,18],[15]],
|
1789
|
+
params: [124,127],
|
1790
|
+
typedParams: true,
|
1791
|
+
returns: [124,127],
|
1792
|
+
typedReturns: true,
|
1793
|
+
locals: [124,127],
|
1794
|
+
localNames: ["_this","_this#type","description","#last_type"],
|
1795
|
+
};
|
1796
|
+
this.__Symbol_prototype_toString = {
|
1797
|
+
wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __Symbol_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[252,2],[65,211,0],[58,0,4],[32,2],[252,2],[65,249,0],[58,0,5],[32,2],[252,2],[65,237,0],[58,0,6],[32,2],[252,2],[65,226,0],[58,0,7],[32,2],[252,2],[65,239,0],[58,0,8],[32,2],[252,2],[65,236,0],[58,0,9],[32,2],[252,2],[65,40],[58,0,10],[68,0,0,0,0,0,0,0,0],[65,1],[32,0],[68,0,0,0,0,0,0,240,63],[161],[65,0],[16, builtin('__Porffor_symbol_descStore')],[33,4],[34,3],[252,3],[40,1,0],[184],[33,5],[32,2],[68,0,0,0,0,0,0,28,64],[160],[33,6],[32,3],[34,7],[32,5],[160],[33,8],[3,64],[32,7],[32,8],[99],[4,64],[32,6],[32,6],[68,0,0,0,0,0,0,240,63],[160],[33,6],[252,2],[32,7],[32,7],[68,0,0,0,0,0,0,240,63],[160],[33,7],[252,2],[45,0,4],[58,0,4],[12,1],[11],[11],[32,2],[32,5],[160],[252,2],[65,41],[58,0,11],[32,2],[252,3],[68,0,0,0,0,0,0,32,64],[32,5],[160],[34,9],[252,3],[54,1,0],[32,2],[65,18],[15]],
|
1798
|
+
params: [124,127],
|
1799
|
+
typedParams: true,
|
1800
|
+
returns: [124,127],
|
1801
|
+
typedReturns: true,
|
1802
|
+
locals: [124,124,127,124,124,124,124,124],
|
1803
|
+
localNames: ["_this","_this#type","out","description","#last_type","descLen","outPtr","descPtr","descPtrEnd","__length_setter_tmp"],
|
1804
|
+
};
|
1805
|
+
this.__Symbol_prototype_valueOf = {
|
1806
|
+
wasm: (scope, {}) => [[32,0],[65,6],[15]],
|
1807
|
+
params: [124,127],
|
1808
|
+
typedParams: true,
|
1809
|
+
returns: [124,127],
|
1810
|
+
typedReturns: true,
|
1811
|
+
locals: [],
|
1812
|
+
localNames: ["_this","_this#type"],
|
1813
|
+
};
|
1625
1814
|
};
|
package/compiler/precompile.js
CHANGED
@@ -18,7 +18,7 @@ const compile = async (file, [ _funcs, _globals ]) => {
|
|
18
18
|
first = source.slice(0, source.indexOf('\n'));
|
19
19
|
}
|
20
20
|
|
21
|
-
let args = ['--bytestring', '--todo-time=compile', '--no-
|
21
|
+
let args = ['--bytestring', '--todo-time=compile', '--no-indirect-calls', '--no-treeshake-wasm-imports', '--no-rm-unused-types', '--scoped-page-names', '--funsafe-no-unlikely-proto-checks', '--fast-length', '--parse-types', '--opt-types'];
|
22
22
|
if (first.startsWith('// @porf')) {
|
23
23
|
args = args.concat(first.slice('// @porf '.length).split(' '));
|
24
24
|
}
|
package/compiler/prefs.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const onByDefault = [ 'bytestring', '
|
1
|
+
const onByDefault = [ 'bytestring', 'treeshakeWasmImports', 'alwaysMemory', 'indirectCalls', 'optUnused' ];
|
2
2
|
|
3
3
|
let cache = {};
|
4
4
|
const obj = new Proxy({}, {
|
@@ -6,7 +6,7 @@ const obj = new Proxy({}, {
|
|
6
6
|
// intentionally misses with undefined values cached
|
7
7
|
if (cache[p]) return cache[p];
|
8
8
|
|
9
|
-
|
9
|
+
const ret = (() => {
|
10
10
|
// fooBar -> foo-bar
|
11
11
|
const name = p[0] === '_' ? p : p.replace(/[A-Z]/g, c => `-${c.toLowerCase()}`);
|
12
12
|
const prefix = name.length === 1 ? '-' : '--';
|
@@ -19,6 +19,10 @@ const obj = new Proxy({}, {
|
|
19
19
|
if (onByDefault.includes(p)) return true;
|
20
20
|
return undefined;
|
21
21
|
})();
|
22
|
+
|
23
|
+
// do not cache in web demo as args are changed live
|
24
|
+
if (!globalThis.document) cache[p] = ret;
|
25
|
+
return ret;
|
22
26
|
}
|
23
27
|
});
|
24
28
|
|