porffor 0.14.0-3ba07b862 → 0.14.0-3fa90b5d2
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/compiler/builtins/array.ts +6 -4
- package/compiler/builtins/set.ts +5 -6
- package/compiler/builtins/symbol.ts +1 -1
- package/compiler/builtins.js +9 -4
- package/compiler/codegen.js +266 -126
- package/compiler/generated_builtins.js +32 -32
- package/compiler/precompile.js +1 -1
- package/compiler/prefs.js +1 -1
- package/compiler/prototype.js +180 -157
- package/compiler/wrap.js +66 -37
- package/package.json +1 -1
- package/runner/index.js +1 -1
- package/runner/repl.js +18 -2
@@ -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]],
|
@@ -1225,7 +1225,7 @@ export const BuiltinFuncs = function() {
|
|
1225
1225
|
locals: [127],
|
1226
1226
|
localNames: ["_this","_this#type","index","index#type","value","value#type","offset"],
|
1227
1227
|
};
|
1228
|
-
this.__Set_prototype_size = {
|
1228
|
+
this.__Set_prototype_size$get = {
|
1229
1229
|
wasm: (scope, {}) => [[32,0],[252,2],[40,0,0],[183],[65,0],[15]],
|
1230
1230
|
params: [124,127],
|
1231
1231
|
typedParams: true,
|
@@ -1235,13 +1235,13 @@ export const BuiltinFuncs = function() {
|
|
1235
1235
|
localNames: ["_this","_this#type"],
|
1236
1236
|
};
|
1237
1237
|
this.__Set_prototype_values = {
|
1238
|
-
wasm: (scope, {builtin,}) => [[32,0],[
|
1238
|
+
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
1239
|
params: [124,127],
|
1240
1240
|
typedParams: true,
|
1241
1241
|
returns: [124,127],
|
1242
1242
|
typedReturns: true,
|
1243
|
-
locals: [124,
|
1244
|
-
localNames: ["_this","_this#type","size","
|
1243
|
+
locals: [124,124,124,124,127,127,127,127,127],
|
1244
|
+
localNames: ["_this","_this#type","size","out","i","val","val#type","#last_type","__proto_length_cache","__proto_pointer_cache","__push_tmp"],
|
1245
1245
|
};
|
1246
1246
|
this.__Set_prototype_keys = {
|
1247
1247
|
wasm: (scope, {builtin,}) => [[32,0],[65,20],[16, builtin('__Set_prototype_values')],[34,2],[15]],
|
@@ -1253,31 +1253,31 @@ export const BuiltinFuncs = function() {
|
|
1253
1253
|
localNames: ["_this","_this#type","#last_type"],
|
1254
1254
|
};
|
1255
1255
|
this.__Set_prototype_has = {
|
1256
|
-
wasm: (scope, {builtin,}) => [[32,0],[
|
1256
|
+
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
1257
|
params: [124,127,124,127],
|
1258
1258
|
typedParams: true,
|
1259
1259
|
returns: [124,127],
|
1260
1260
|
typedReturns: true,
|
1261
|
-
locals: [124,127,124],
|
1262
|
-
localNames: ["_this","_this#type","value","value#type","size","#last_type","
|
1261
|
+
locals: [124,124,127,124,124,127,127,127,127,127],
|
1262
|
+
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
1263
|
};
|
1264
1264
|
this.__Set_prototype_add = {
|
1265
|
-
wasm: (scope, {builtin,}) => [[32,0],[
|
1265
|
+
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
1266
|
params: [124,127,124,127],
|
1267
1267
|
typedParams: true,
|
1268
1268
|
returns: [124,127],
|
1269
1269
|
typedReturns: true,
|
1270
|
-
locals: [124,127,124],
|
1271
|
-
localNames: ["_this","_this#type","value","value#type","size","#last_type","
|
1270
|
+
locals: [124,124,127,124,124,127,127,127,127,127],
|
1271
|
+
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
1272
|
};
|
1273
1273
|
this.__Set_prototype_delete = {
|
1274
|
-
wasm: (scope, {builtin,}) => [[32,0],[
|
1274
|
+
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
1275
|
params: [124,127,124,127],
|
1276
1276
|
typedParams: true,
|
1277
1277
|
returns: [124,127],
|
1278
1278
|
typedReturns: true,
|
1279
|
-
locals: [124,127,124,127],
|
1280
|
-
localNames: ["_this","_this#type","value","value#type","size","#last_type","
|
1279
|
+
locals: [124,124,127,124,124,127,127,127,127,127,127],
|
1280
|
+
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
1281
|
};
|
1282
1282
|
this.__Set_prototype_clear = {
|
1283
1283
|
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 +1298,7 @@ export const BuiltinFuncs = function() {
|
|
1298
1298
|
localNames: [],
|
1299
1299
|
};
|
1300
1300
|
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"],[
|
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"],[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
1302
|
params: [124,127],
|
1303
1303
|
typedParams: true,
|
1304
1304
|
returns: [124],
|
@@ -1640,7 +1640,7 @@ export const BuiltinFuncs = function() {
|
|
1640
1640
|
locals: [127],
|
1641
1641
|
localNames: ["description","description#type","#last_type"],
|
1642
1642
|
};
|
1643
|
-
this.__Symbol_prototype_description = {
|
1643
|
+
this.__Symbol_prototype_description$get = {
|
1644
1644
|
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]],
|
1645
1645
|
params: [124,127],
|
1646
1646
|
typedParams: true,
|
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