porffor 0.18.34 → 0.18.35

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.
@@ -46,7 +46,6 @@ export const __ByteString_prototype_toUpperCase = (_this: bytestring) => {
46
46
  return out;
47
47
  };
48
48
 
49
-
50
49
  export const __String_prototype_toLowerCase = (_this: string) => {
51
50
  // todo: unicode not just ascii
52
51
  const len: i32 = _this.length;
@@ -92,6 +91,11 @@ export const __ByteString_prototype_toLowerCase = (_this: bytestring) => {
92
91
  return out;
93
92
  };
94
93
 
94
+ export const __String_prototype_toLocaleUpperCase = (_this: string) => __String_prototype_toUpperCase(_this);
95
+ export const __ByteString_prototype_toLocaleUpperCase = (_this: bytestring) => __ByteString_prototype_toLowerCase(_this);
96
+ export const __String_prototype_toLocaleLowerCase = (_this: string) => __String_prototype_toUpperCase(_this);
97
+ export const __ByteString_prototype_toLocaleLowerCase = (_this: bytestring) => __ByteString_prototype_toLowerCase(_this);
98
+
95
99
 
96
100
  export const __String_prototype_startsWith = (_this: string, searchString: string, position: number) => {
97
101
  // todo: handle bytestring searchString
@@ -1177,6 +1181,245 @@ memory.copy 0 0`;
1177
1181
  };
1178
1182
 
1179
1183
 
1184
+ export const __String_prototype_split = (_this: string, separator: any, limit: any) => {
1185
+ let out: any[] = Porffor.allocate(), outLen: i32 = 0;
1186
+ const sType: i32 = Porffor.TYPES.string;
1187
+
1188
+ if (Porffor.wasm`local.get ${limit+1}` == Porffor.TYPES.undefined) limit = Number.MAX_SAFE_INTEGER;
1189
+ limit |= 0;
1190
+ if (limit < 0) limit = Number.MAX_SAFE_INTEGER;
1191
+
1192
+ let tmp: string = Porffor.allocate(), tmpLen: i32 = 0;
1193
+ const thisLen: i32 = _this.length * 2, sepLen: i32 = separator.length;
1194
+ if (sepLen == 1) {
1195
+ // fast path: single char separator
1196
+ const sepChar: i32 = separator.charCodeAt(0);
1197
+ for (let i: i32 = 0; i < thisLen; i += 2) {
1198
+ const x: i32 = Porffor.wasm.i32.load16_u(Porffor.wasm`local.get ${_this}` + i, 0, 4);
1199
+
1200
+ if (x == sepChar) {
1201
+ if (outLen >= limit) {
1202
+ out.length = outLen;
1203
+ return out;
1204
+ }
1205
+
1206
+ tmp.length = tmpLen;
1207
+ Porffor.wasm`
1208
+ local.get ${out}
1209
+ local.get ${outLen}
1210
+ i32.const 9
1211
+ i32.mul
1212
+ i32.add
1213
+ local.get ${tmp}
1214
+ f64.convert_i32_u
1215
+ f64.store 0 4
1216
+
1217
+ local.get ${out}
1218
+ local.get ${outLen}
1219
+ i32.const 9
1220
+ i32.mul
1221
+ i32.add
1222
+ local.get ${sType}
1223
+ i32.store8 0 12`;
1224
+ outLen++;
1225
+
1226
+ tmp = Porffor.allocate();
1227
+ tmpLen = 0;
1228
+ continue;
1229
+ }
1230
+
1231
+ Porffor.wasm.i32.store16(Porffor.wasm`local.get ${tmp}` + tmpLen * 2, x, 0, 4);
1232
+ tmpLen++;
1233
+ }
1234
+ } else {
1235
+ let sepInd: i32 = 0;
1236
+ for (let i: i32 = 0; i < thisLen; i += 2) {
1237
+ const x: i32 = Porffor.wasm.i32.load16_u(Porffor.wasm`local.get ${_this}` + i, 0, 4);
1238
+
1239
+ if (x == separator.charCodeAt(sepInd)) {
1240
+ if (++sepInd == sepLen) {
1241
+ if (outLen >= limit) {
1242
+ out.length = outLen;
1243
+ return out;
1244
+ }
1245
+
1246
+ tmp.length = tmpLen - (sepLen - 1);
1247
+ Porffor.wasm`
1248
+ local.get ${out}
1249
+ local.get ${outLen}
1250
+ i32.const 9
1251
+ i32.mul
1252
+ i32.add
1253
+ local.get ${tmp}
1254
+ f64.convert_i32_u
1255
+ f64.store 0 4
1256
+
1257
+ local.get ${out}
1258
+ local.get ${outLen}
1259
+ i32.const 9
1260
+ i32.mul
1261
+ i32.add
1262
+ local.get ${sType}
1263
+ i32.store8 0 12`;
1264
+ outLen++;
1265
+
1266
+ tmp = Porffor.allocate();
1267
+ tmpLen = 0;
1268
+ continue;
1269
+ }
1270
+ } else sepInd = 0;
1271
+
1272
+ Porffor.wasm.i32.store16(Porffor.wasm`local.get ${tmp}` + tmpLen, x, 0, 4);
1273
+ tmpLen++;
1274
+ }
1275
+ }
1276
+
1277
+ if (tmpLen > 0 && outLen < limit) {
1278
+ tmp.length = tmpLen;
1279
+ Porffor.wasm`
1280
+ local.get ${out}
1281
+ local.get ${outLen}
1282
+ i32.const 9
1283
+ i32.mul
1284
+ i32.add
1285
+ local.get ${tmp}
1286
+ f64.convert_i32_u
1287
+ f64.store 0 4
1288
+
1289
+ local.get ${out}
1290
+ local.get ${outLen}
1291
+ i32.const 9
1292
+ i32.mul
1293
+ i32.add
1294
+ local.get ${sType}
1295
+ i32.store8 0 12`;
1296
+ outLen++;
1297
+ }
1298
+
1299
+ out.length = outLen;
1300
+ return out;
1301
+ };
1302
+
1303
+ export const __ByteString_prototype_split = (_this: bytestring, separator: any, limit: any) => {
1304
+ let out: any[] = Porffor.allocate(), outLen: i32 = 0;
1305
+ const bsType: i32 = Porffor.TYPES.bytestring;
1306
+
1307
+ if (Porffor.wasm`local.get ${limit+1}` == Porffor.TYPES.undefined) limit = Number.MAX_SAFE_INTEGER;
1308
+ limit |= 0;
1309
+ if (limit < 0) limit = Number.MAX_SAFE_INTEGER;
1310
+
1311
+ let tmp: bytestring = Porffor.allocate(), tmpLen: i32 = 0;
1312
+ const thisLen: i32 = _this.length, sepLen: i32 = separator.length;
1313
+ if (sepLen == 1) {
1314
+ // fast path: single char separator
1315
+ const sepChar: i32 = separator.charCodeAt(0);
1316
+ for (let i: i32 = 0; i < thisLen; i++) {
1317
+ const x: i32 = Porffor.wasm.i32.load8_u(Porffor.wasm`local.get ${_this}` + i, 0, 4);
1318
+
1319
+ if (x == sepChar) {
1320
+ if (outLen >= limit) {
1321
+ out.length = outLen;
1322
+ return out;
1323
+ }
1324
+
1325
+ tmp.length = tmpLen;
1326
+ Porffor.wasm`
1327
+ local.get ${out}
1328
+ local.get ${outLen}
1329
+ i32.const 9
1330
+ i32.mul
1331
+ i32.add
1332
+ local.get ${tmp}
1333
+ f64.convert_i32_u
1334
+ f64.store 0 4
1335
+
1336
+ local.get ${out}
1337
+ local.get ${outLen}
1338
+ i32.const 9
1339
+ i32.mul
1340
+ i32.add
1341
+ local.get ${bsType}
1342
+ i32.store8 0 12`;
1343
+ outLen++;
1344
+
1345
+ tmp = Porffor.allocate();
1346
+ tmpLen = 0;
1347
+ continue;
1348
+ }
1349
+
1350
+ Porffor.wasm.i32.store8(Porffor.wasm`local.get ${tmp}` + tmpLen, x, 0, 4);
1351
+ tmpLen++;
1352
+ }
1353
+ } else {
1354
+ let sepInd: i32 = 0;
1355
+ for (let i: i32 = 0; i < thisLen; i++) {
1356
+ const x: i32 = Porffor.wasm.i32.load8_u(Porffor.wasm`local.get ${_this}` + i, 0, 4);
1357
+
1358
+ if (x == separator.charCodeAt(sepInd)) {
1359
+ if (++sepInd == sepLen) {
1360
+ if (outLen >= limit) {
1361
+ out.length = outLen;
1362
+ return out;
1363
+ }
1364
+
1365
+ tmp.length = tmpLen - (sepLen - 1);
1366
+ Porffor.wasm`
1367
+ local.get ${out}
1368
+ local.get ${outLen}
1369
+ i32.const 9
1370
+ i32.mul
1371
+ i32.add
1372
+ local.get ${tmp}
1373
+ f64.convert_i32_u
1374
+ f64.store 0 4
1375
+
1376
+ local.get ${out}
1377
+ local.get ${outLen}
1378
+ i32.const 9
1379
+ i32.mul
1380
+ i32.add
1381
+ local.get ${bsType}
1382
+ i32.store8 0 12`;
1383
+ outLen++;
1384
+
1385
+ tmp = Porffor.allocate();
1386
+ tmpLen = 0;
1387
+ continue;
1388
+ }
1389
+ } else sepInd = 0;
1390
+
1391
+ Porffor.wasm.i32.store8(Porffor.wasm`local.get ${tmp}` + tmpLen, x, 0, 4);
1392
+ tmpLen++;
1393
+ }
1394
+ }
1395
+
1396
+ if (tmpLen > 0 && outLen < limit) {
1397
+ tmp.length = tmpLen;
1398
+ Porffor.wasm`
1399
+ local.get ${out}
1400
+ local.get ${outLen}
1401
+ i32.const 9
1402
+ i32.mul
1403
+ i32.add
1404
+ local.get ${tmp}
1405
+ f64.convert_i32_u
1406
+ f64.store 0 4
1407
+
1408
+ local.get ${out}
1409
+ local.get ${outLen}
1410
+ i32.const 9
1411
+ i32.mul
1412
+ i32.add
1413
+ local.get ${bsType}
1414
+ i32.store8 0 12`;
1415
+ outLen++;
1416
+ }
1417
+
1418
+ out.length = outLen;
1419
+ return out;
1420
+ };
1421
+
1422
+
1180
1423
  // 22.1.3.29 String.prototype.toString ()
1181
1424
  // https://tc39.es/ecma262/#sec-string.prototype.tostring
1182
1425
  export const __String_prototype_toString = (_this: string) => {
@@ -1506,6 +1506,30 @@ export const BuiltinFuncs = function() {
1506
1506
  returns: [127,127], typedReturns: 1,
1507
1507
  locals: [127,127,127,127,127,127,127], localNames: ["_this","_this#type","len","out","#last_type","i","j","endPtr","chr"],
1508
1508
  };
1509
+ this.__String_prototype_toLocaleUpperCase = {
1510
+ wasm: (scope, {builtin}) => [[32,0],[65,194,0],[16, builtin('__String_prototype_toUpperCase')],[34,2],[15]],
1511
+ params: [127,127], typedParams: 1,
1512
+ returns: [127,127], typedReturns: 1,
1513
+ locals: [127], localNames: ["_this","_this#type","#last_type"],
1514
+ };
1515
+ this.__ByteString_prototype_toLocaleUpperCase = {
1516
+ wasm: (scope, {builtin}) => [[32,0],[65,194,1],[16, builtin('__ByteString_prototype_toLowerCase')],[34,2],[15]],
1517
+ params: [127,127], typedParams: 1,
1518
+ returns: [127,127], typedReturns: 1,
1519
+ locals: [127], localNames: ["_this","_this#type","#last_type"],
1520
+ };
1521
+ this.__String_prototype_toLocaleLowerCase = {
1522
+ wasm: (scope, {builtin}) => [[32,0],[65,194,0],[16, builtin('__String_prototype_toUpperCase')],[34,2],[15]],
1523
+ params: [127,127], typedParams: 1,
1524
+ returns: [127,127], typedReturns: 1,
1525
+ locals: [127], localNames: ["_this","_this#type","#last_type"],
1526
+ };
1527
+ this.__ByteString_prototype_toLocaleLowerCase = {
1528
+ wasm: (scope, {builtin}) => [[32,0],[65,194,1],[16, builtin('__ByteString_prototype_toLowerCase')],[34,2],[15]],
1529
+ params: [127,127], typedParams: 1,
1530
+ returns: [127,127], typedReturns: 1,
1531
+ locals: [127], localNames: ["_this","_this#type","#last_type"],
1532
+ };
1509
1533
  this.__String_prototype_startsWith = {
1510
1534
  wasm: (scope, {}) => [[32,0],[33,6],[32,2],[33,7],[32,0],[40,1,0],[33,8],[32,4],[65,0],[74],[4,64],[32,4],[32,8],[74],[4,64],[32,8],[33,4],[5],[32,4],[65,0],[114],[33,4],[11],[5],[65,0],[33,4],[11],[32,6],[32,4],[65,2],[108],[106],[33,6],[32,2],[40,1,0],[65,2],[108],[33,9],[65,0],[33,10],[3,64],[32,10],[32,9],[72],[4,64],[32,6],[32,10],[106],[47,0,4],[33,11],[32,7],[32,10],[106],[47,0,4],[33,12],[32,11],[32,12],[71],[4,64],[65,0],[65,1],[15],[11],[32,10],[65,2],[106],[34,10],[12,1],[11],[11],[65,1],[65,1],[15]],
1511
1535
  params: [127,127,127,127,127,127], typedParams: 1,
@@ -1688,6 +1712,18 @@ export const BuiltinFuncs = function() {
1688
1712
  returns: [127,127], typedReturns: 1,
1689
1713
  locals: [127,127,127,127], localNames: ["_this","_this#type","count","count#type","out","#last_type","thisLen","i"],
1690
1714
  };
1715
+ this.__String_prototype_split = {
1716
+ wasm: (scope, {builtin,internalThrow}) => [[16, builtin('__Porffor_allocate')],[33,7],[252,2],[33,6],[65,0],[33,8],[65,194,0],[33,9],[32,5],[65,3],[70],[4,64],[65,255,255,255,255,7],[34,4],[65,0],[33,5],[26],[11],[32,4],[65,0],[114],[34,4],[65,0],[33,5],[26],[32,4],[65,0],[72],[4,64],[65,255,255,255,255,7],[34,4],[65,0],[33,5],[26],[11],[16, builtin('__Porffor_allocate')],[33,7],[252,2],[33,10],[65,0],[33,11],[32,0],[40,1,0],[65,2],[108],[33,12],[32,2],[40,1,0],[34,13],[65,1],[70],[4,64],[32,2],[34,16],[40,1,0],[33,15],[32,3],[33,18],[2,127],[32,18],[65,194,0],[70],[4,64,"TYPESWITCH|String"],[2,127],[65,0],[34,17],[32,15],[78],[4,64],[65,127],[12,1],[11],[32,17],[65,2],[108],[32,16],[106],[47,0,4],[65,0],[33,7],[11],[12,1],[11],[32,18],[65,194,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,127],[65,0],[34,17],[32,15],[78],[4,64],[65,127],[12,1],[11],[32,17],[32,16],[106],[45,0,4],[65,0],[33,7],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[33,14],[65,0],[33,19],[3,64],[32,19],[32,12],[72],[4,64],[2,64],[32,0],[32,19],[106],[47,0,4],[34,20],[32,14],[70],[4,64],[32,8],[32,4],[78],[4,64],[32,6],[32,8],[34,21],[54,1,0],[32,6],[65,208,0],[15],[11],[32,10],[32,11],[34,21],[54,1,0],[32,6],[32,8],[65,9],[108],[106],[32,10],[184],[57,0,4],[32,6],[32,8],[65,9],[108],[106],[32,9],[58,0,12],[32,8],[65,1],[106],[33,8],[16, builtin('__Porffor_allocate')],[33,7],[252,2],[33,10],[65,0],[33,11],[12,1],[11],[32,10],[32,11],[65,2],[108],[106],[32,20],[59,0,4],[32,11],[65,1],[106],[33,11],[11],[32,19],[65,2],[106],[34,19],[12,1],[11],[11],[5],[65,0],[33,22],[65,0],[33,19],[3,64],[32,19],[32,12],[72],[4,64],[2,64],[32,0],[32,19],[106],[47,0,4],[34,20],[32,2],[34,16],[40,1,0],[33,15],[32,3],[33,18],[2,127],[32,18],[65,194,0],[70],[4,64,"TYPESWITCH|String"],[2,127],[32,22],[34,17],[32,15],[78],[4,64],[65,127],[12,1],[11],[32,17],[65,2],[108],[32,16],[106],[47,0,4],[65,0],[33,7],[11],[12,1],[11],[32,18],[65,194,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,127],[32,22],[34,17],[32,15],[78],[4,64],[65,127],[12,1],[11],[32,17],[32,16],[106],[45,0,4],[65,0],[33,7],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[70],[4,64],[32,22],[65,1],[106],[34,22],[32,13],[70],[4,64],[32,8],[32,4],[78],[4,64],[32,6],[32,8],[34,21],[54,1,0],[32,6],[65,208,0],[15],[11],[32,10],[32,11],[32,13],[65,1],[107],[107],[34,21],[54,1,0],[32,6],[32,8],[65,9],[108],[106],[32,10],[184],[57,0,4],[32,6],[32,8],[65,9],[108],[106],[32,9],[58,0,12],[32,8],[65,1],[106],[33,8],[16, builtin('__Porffor_allocate')],[33,7],[252,2],[33,10],[65,0],[33,11],[12,2],[11],[5],[65,0],[33,22],[11],[32,10],[32,11],[106],[32,20],[59,0,4],[32,11],[65,1],[106],[33,11],[11],[32,19],[65,2],[106],[34,19],[12,1],[11],[11],[11],[32,11],[65,0],[74],[34,23],[4,127],[32,8],[32,4],[72],[65,1],[33,7],[5],[32,23],[65,1],[33,7],[11],[33,24],[32,7],[33,18],[2,127],[32,18],[65,194,0],[70],[4,64,"TYPESWITCH|String"],[32,24],[40,1,0],[12,1],[11],[32,18],[65,194,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,24],[40,1,0],[12,1],[11],[32,24],[11,"TYPESWITCH_end"],[4,64],[32,10],[32,11],[34,21],[54,1,0],[32,6],[32,8],[65,9],[108],[106],[32,10],[184],[57,0,4],[32,6],[32,8],[65,9],[108],[106],[32,9],[58,0,12],[32,8],[65,1],[106],[33,8],[11],[32,6],[32,8],[34,21],[54,1,0],[32,6],[65,208,0],[15]],
1717
+ params: [127,127,127,127,127,127], typedParams: 1,
1718
+ returns: [127,127], typedReturns: 1,
1719
+ locals: [127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127], localNames: ["_this","_this#type","separator","separator#type","limit","limit#type","out","#last_type","outLen","sType","tmp","tmpLen","thisLen","sepLen","sepChar","__proto_length_cache","__proto_pointer_cache","__charCodeAt_tmp","#typeswitch_tmp","i","x","__length_setter_tmp","sepInd","logictmp","#logicinner_tmp"],
1720
+ };
1721
+ this.__ByteString_prototype_split = {
1722
+ wasm: (scope, {builtin,internalThrow}) => [[16, builtin('__Porffor_allocate')],[33,7],[252,2],[33,6],[65,0],[33,8],[65,194,1],[33,9],[32,5],[65,3],[70],[4,64],[65,255,255,255,255,7],[34,4],[65,0],[33,5],[26],[11],[32,4],[65,0],[114],[34,4],[65,0],[33,5],[26],[32,4],[65,0],[72],[4,64],[65,255,255,255,255,7],[34,4],[65,0],[33,5],[26],[11],[16, builtin('__Porffor_allocate')],[33,7],[252,2],[33,10],[65,0],[33,11],[32,0],[40,1,0],[33,12],[32,2],[40,1,0],[34,13],[65,1],[70],[4,64],[32,2],[34,16],[40,1,0],[33,15],[32,3],[33,18],[2,127],[32,18],[65,194,0],[70],[4,64,"TYPESWITCH|String"],[2,127],[65,0],[34,17],[32,15],[78],[4,64],[65,127],[12,1],[11],[32,17],[65,2],[108],[32,16],[106],[47,0,4],[65,0],[33,7],[11],[12,1],[11],[32,18],[65,194,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,127],[65,0],[34,17],[32,15],[78],[4,64],[65,127],[12,1],[11],[32,17],[32,16],[106],[45,0,4],[65,0],[33,7],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[33,14],[65,0],[33,19],[3,64],[32,19],[32,12],[72],[4,64],[2,64],[32,0],[32,19],[106],[45,0,4],[34,20],[32,14],[70],[4,64],[32,8],[32,4],[78],[4,64],[32,6],[32,8],[34,21],[54,1,0],[32,6],[65,208,0],[15],[11],[32,10],[32,11],[34,21],[54,1,0],[32,6],[32,8],[65,9],[108],[106],[32,10],[184],[57,0,4],[32,6],[32,8],[65,9],[108],[106],[32,9],[58,0,12],[32,8],[65,1],[106],[33,8],[16, builtin('__Porffor_allocate')],[33,7],[252,2],[33,10],[65,0],[33,11],[12,1],[11],[32,10],[32,11],[106],[32,20],[58,0,4],[32,11],[65,1],[106],[33,11],[11],[32,19],[65,1],[106],[33,19],[12,1],[11],[11],[5],[65,0],[33,22],[65,0],[33,19],[3,64],[32,19],[32,12],[72],[4,64],[2,64],[32,0],[32,19],[106],[45,0,4],[34,20],[32,2],[34,16],[40,1,0],[33,15],[32,3],[33,18],[2,127],[32,18],[65,194,0],[70],[4,64,"TYPESWITCH|String"],[2,127],[32,22],[34,17],[32,15],[78],[4,64],[65,127],[12,1],[11],[32,17],[65,2],[108],[32,16],[106],[47,0,4],[65,0],[33,7],[11],[12,1],[11],[32,18],[65,194,1],[70],[4,64,"TYPESWITCH|ByteString"],[2,127],[32,22],[34,17],[32,15],[78],[4,64],[65,127],[12,1],[11],[32,17],[32,16],[106],[45,0,4],[65,0],[33,7],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `'charCodeAt' proto func tried to be called on a type without an impl`),[11,"TYPESWITCH_end"],[70],[4,64],[32,22],[65,1],[106],[34,22],[32,13],[70],[4,64],[32,8],[32,4],[78],[4,64],[32,6],[32,8],[34,21],[54,1,0],[32,6],[65,208,0],[15],[11],[32,10],[32,11],[32,13],[65,1],[107],[107],[34,21],[54,1,0],[32,6],[32,8],[65,9],[108],[106],[32,10],[184],[57,0,4],[32,6],[32,8],[65,9],[108],[106],[32,9],[58,0,12],[32,8],[65,1],[106],[33,8],[16, builtin('__Porffor_allocate')],[33,7],[252,2],[33,10],[65,0],[33,11],[12,2],[11],[5],[65,0],[33,22],[11],[32,10],[32,11],[106],[32,20],[58,0,4],[32,11],[65,1],[106],[33,11],[11],[32,19],[65,1],[106],[33,19],[12,1],[11],[11],[11],[32,11],[65,0],[74],[34,23],[4,127],[32,8],[32,4],[72],[65,1],[33,7],[5],[32,23],[65,1],[33,7],[11],[33,24],[32,7],[33,18],[2,127],[32,18],[65,194,0],[70],[4,64,"TYPESWITCH|String"],[32,24],[40,1,0],[12,1],[11],[32,18],[65,194,1],[70],[4,64,"TYPESWITCH|ByteString"],[32,24],[40,1,0],[12,1],[11],[32,24],[11,"TYPESWITCH_end"],[4,64],[32,10],[32,11],[34,21],[54,1,0],[32,6],[32,8],[65,9],[108],[106],[32,10],[184],[57,0,4],[32,6],[32,8],[65,9],[108],[106],[32,9],[58,0,12],[32,8],[65,1],[106],[33,8],[11],[32,6],[32,8],[34,21],[54,1,0],[32,6],[65,208,0],[15]],
1723
+ params: [127,127,127,127,127,127], typedParams: 1,
1724
+ returns: [127,127], typedReturns: 1,
1725
+ locals: [127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127], localNames: ["_this","_this#type","separator","separator#type","limit","limit#type","out","#last_type","outLen","bsType","tmp","tmpLen","thisLen","sepLen","sepChar","__proto_length_cache","__proto_pointer_cache","__charCodeAt_tmp","#typeswitch_tmp","i","x","__length_setter_tmp","sepInd","logictmp","#logicinner_tmp"],
1726
+ };
1691
1727
  this.__String_prototype_toString = {
1692
1728
  wasm: (scope, {}) => [[32,0],[65,194,0],[15]],
1693
1729
  params: [127,127], typedParams: 1,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "a basic experimental wip aot optimizing js -> wasm engine/compiler/runtime in js",
4
- "version": "0.18.34+c83c8ab39",
4
+ "version": "0.18.35+19f387463",
5
5
  "author": "CanadaHonk",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runner/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.18.34+c83c8ab39';
3
+ globalThis.version = '0.18.35+19f387463';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {