porffor 0.18.2 → 0.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -5
- package/bf +0 -0
- package/compiler/2c.js +97 -14
- package/compiler/builtins/array.ts +32 -0
- package/compiler/builtins/porffor.d.ts +2 -0
- package/compiler/codegen.js +2 -2
- package/compiler/cyclone.js +36 -0
- package/compiler/decompile.js +2 -2
- package/compiler/generated_builtins.js +90 -0
- package/compiler/index.js +1 -0
- package/compiler/opt.js +0 -5
- package/package.json +1 -1
- package/runner/index.js +1 -1
package/README.md
CHANGED
|
@@ -175,16 +175,15 @@ These include some early (stage 1/0) and/or dead (last commit years ago) proposa
|
|
|
175
175
|
### Custom
|
|
176
176
|
|
|
177
177
|
- Supports i32, i64, and f64 for valtypes
|
|
178
|
-
- Start of a SIMD api (docs needed)
|
|
179
178
|
- Intrinsic functions (see below)
|
|
180
179
|
- Inlining wasm via ``asm`...``\` "macro"
|
|
181
180
|
|
|
182
181
|
## Versioning
|
|
183
|
-
Porffor uses a unique versioning system, here's an example: `0.
|
|
182
|
+
Porffor uses a unique versioning system, here's an example: `0.18.2+2aa3f0589`. Let's break it down:
|
|
184
183
|
1. `0` - major, always `0` as Porffor is not ready yet
|
|
185
|
-
2. `
|
|
186
|
-
3. `
|
|
187
|
-
4. `
|
|
184
|
+
2. `18` - minor, total Test262 pass percentage (floored to nearest int)
|
|
185
|
+
3. `2` - micro, build number for that minor (incremented each publish/git push)
|
|
186
|
+
4. `2aa3f0589` - commit hash
|
|
188
187
|
|
|
189
188
|
## Performance
|
|
190
189
|
*For the features it supports most of the time*, Porffor is *blazingly fast* compared to most interpreters and common engines running without JIT. For those with JIT, it is usually slower by default, but can catch up with compiler arguments and typed input, even more so when compiling to native binaries.
|
package/bf
ADDED
|
Binary file
|
package/compiler/2c.js
CHANGED
|
@@ -171,9 +171,6 @@ const removeBrackets = str => {
|
|
|
171
171
|
};
|
|
172
172
|
|
|
173
173
|
export default ({ funcs, globals, tags, data, exceptions, pages }) => {
|
|
174
|
-
// fix declaring order for c
|
|
175
|
-
funcs.reverse();
|
|
176
|
-
|
|
177
174
|
const invOperatorOpcode = Object.values(operatorOpcode).reduce((acc, x) => {
|
|
178
175
|
for (const k in x) {
|
|
179
176
|
acc[x[k]] = k;
|
|
@@ -201,7 +198,7 @@ export default ({ funcs, globals, tags, data, exceptions, pages }) => {
|
|
|
201
198
|
|
|
202
199
|
includes.set('stdint.h', true);
|
|
203
200
|
|
|
204
|
-
|
|
201
|
+
globalThis.out = ``;
|
|
205
202
|
|
|
206
203
|
for (const x in globals) {
|
|
207
204
|
const g = globals[x];
|
|
@@ -231,15 +228,12 @@ export default ({ funcs, globals, tags, data, exceptions, pages }) => {
|
|
|
231
228
|
|
|
232
229
|
if (out) out += '\n';
|
|
233
230
|
|
|
234
|
-
|
|
235
|
-
let brDepth = 0;
|
|
236
|
-
const line = (str, semi = true) => out += `${' '.repeat((depth + brDepth) * 2)}${str}${semi ? ';' : ''}\n`;
|
|
231
|
+
const line = (str, semi = true) => out += `${str}${semi ? ';' : ''}\n`;
|
|
237
232
|
const lines = lines => {
|
|
238
233
|
for (const x of lines) {
|
|
239
|
-
out +=
|
|
234
|
+
out += x + '\n';
|
|
240
235
|
}
|
|
241
236
|
};
|
|
242
|
-
|
|
243
237
|
const platformSpecific = (win, unix, add = true) => {
|
|
244
238
|
let tmp = '';
|
|
245
239
|
|
|
@@ -268,11 +262,46 @@ export default ({ funcs, globals, tags, data, exceptions, pages }) => {
|
|
|
268
262
|
|
|
269
263
|
let brId = 0;
|
|
270
264
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
265
|
+
const cified = new Set();
|
|
266
|
+
const cify = f => {
|
|
267
|
+
let out = '';
|
|
268
|
+
|
|
269
|
+
let depth = 1;
|
|
270
|
+
let brDepth = 0;
|
|
271
|
+
const line = (str, semi = true) => out += `${' '.repeat((depth + brDepth) * 2)}${str}${semi ? ';' : ''}\n`;
|
|
272
|
+
const lines = lines => {
|
|
273
|
+
for (const x of lines) {
|
|
274
|
+
out += `${' '.repeat((depth + brDepth) * 2)}${x}\n`;
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
const platformSpecific = (win, unix, add = true) => {
|
|
278
|
+
let tmp = '';
|
|
279
|
+
|
|
280
|
+
if (win) {
|
|
281
|
+
if (add) out += '#ifdef _WIN32\n';
|
|
282
|
+
else tmp += '#ifdef _WIN32\n';
|
|
283
|
+
|
|
284
|
+
if (add) lines(win.split('\n'));
|
|
285
|
+
else tmp += win + (win.endsWith('\n') ? '' : '\n');
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (unix) {
|
|
289
|
+
if (add) out += (win ? '#else' : '#ifndef _WIN32') + '\n';
|
|
290
|
+
else tmp += (win ? '#else' : '#ifndef _WIN32') + '\n';
|
|
291
|
+
|
|
292
|
+
if (add) lines(unix.split('\n'));
|
|
293
|
+
else tmp += unix + (unix.endsWith('\n') ? '' : '\n');
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (win || unix)
|
|
297
|
+
if (add) out += '#endif\n';
|
|
298
|
+
else tmp += '#endif\n';
|
|
299
|
+
|
|
300
|
+
return tmp;
|
|
301
|
+
};
|
|
274
302
|
|
|
275
303
|
let retTmpId = 0;
|
|
304
|
+
let tmpId = 0;
|
|
276
305
|
|
|
277
306
|
const invLocals = inv(f.locals, x => x.idx);
|
|
278
307
|
|
|
@@ -598,6 +627,11 @@ _time_out = _time.tv_nsec / 1000000. + _time.tv_sec * 1000.;`);
|
|
|
598
627
|
break;
|
|
599
628
|
}
|
|
600
629
|
|
|
630
|
+
if (!cified.has(func.name) && func.name !== f.name) {
|
|
631
|
+
cify(func);
|
|
632
|
+
cified.add(func.name);
|
|
633
|
+
}
|
|
634
|
+
|
|
601
635
|
let args = [];
|
|
602
636
|
for (let j = 0; j < func.params.length; j++) args.unshift(removeBrackets(vals.pop()));
|
|
603
637
|
|
|
@@ -663,6 +697,53 @@ _time_out = _time.tv_nsec / 1000000. + _time.tv_sec * 1000.;`);
|
|
|
663
697
|
break;
|
|
664
698
|
}
|
|
665
699
|
|
|
700
|
+
case Opcodes.f64_abs: {
|
|
701
|
+
break;
|
|
702
|
+
}
|
|
703
|
+
case Opcodes.f64_neg: {
|
|
704
|
+
break;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
case Opcodes.f64_ceil: {
|
|
708
|
+
break;
|
|
709
|
+
}
|
|
710
|
+
case Opcodes.f64_floor: {
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
case Opcodes.f64_trunc: {
|
|
714
|
+
break;
|
|
715
|
+
}
|
|
716
|
+
case Opcodes.f64_nearest: {
|
|
717
|
+
break;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
case Opcodes.f64_sqrt: {
|
|
721
|
+
break;
|
|
722
|
+
}
|
|
723
|
+
case Opcodes.f64_min: {
|
|
724
|
+
const b = vals.pop();
|
|
725
|
+
const a = vals.pop();
|
|
726
|
+
|
|
727
|
+
const id = tmpId++;
|
|
728
|
+
line(`const f64 _tmp${id}a = ${a}`);
|
|
729
|
+
line(`const f64 _tmp${id}b = ${b}`);
|
|
730
|
+
vals.push(`(_tmp${id}a > _tmp${id}b ? _tmp${id}b : _tmp${id}a)`);
|
|
731
|
+
break;
|
|
732
|
+
}
|
|
733
|
+
case Opcodes.f64_max: {
|
|
734
|
+
const b = vals.pop();
|
|
735
|
+
const a = vals.pop();
|
|
736
|
+
|
|
737
|
+
const id = tmpId++;
|
|
738
|
+
line(`const f64 _tmp${id}a = ${a}`);
|
|
739
|
+
line(`const f64 _tmp${id}b = ${b}`);
|
|
740
|
+
vals.push(`(_tmp${id}a > _tmp${id}b ? _tmp${id}a : _tmp${id}b)`);
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
743
|
+
case Opcodes.f64_copysign: {
|
|
744
|
+
break;
|
|
745
|
+
}
|
|
746
|
+
|
|
666
747
|
default:
|
|
667
748
|
if (CMemFuncs[i[0]]) {
|
|
668
749
|
const name = invOpcodes[i[0]];
|
|
@@ -698,9 +779,11 @@ _time_out = _time.tv_nsec / 1000000. + _time.tv_sec * 1000.;`);
|
|
|
698
779
|
}
|
|
699
780
|
|
|
700
781
|
out += '}\n\n';
|
|
701
|
-
}
|
|
702
782
|
|
|
703
|
-
|
|
783
|
+
globalThis.out = globalThis.out + out;
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
cify(funcs.find(x => x.name === 'main'));
|
|
704
787
|
|
|
705
788
|
const makeIncludes = includes => [...includes.keys()].map(x => `#include <${x}>\n`).join('');
|
|
706
789
|
out = platformSpecific(makeIncludes(winIncludes), makeIncludes(unixIncludes), false) + '\n' + makeIncludes(includes) + '\n' + alwaysPreface + [...prepend.values()].join('\n') + '\n\n' + out;
|
|
@@ -142,6 +142,38 @@ export const __Array_prototype_with = (_this: any[], index: number, value: any)
|
|
|
142
142
|
return out;
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
+
// @porf-typed-array
|
|
146
|
+
export const __Array_prototype_copyWithin = (_this: any[], target: number, start: number, end: any) => {
|
|
147
|
+
const len: i32 = _this.length;
|
|
148
|
+
if (target < 0) {
|
|
149
|
+
target = len + target;
|
|
150
|
+
if (target < 0) target = 0;
|
|
151
|
+
}
|
|
152
|
+
if (target > len) target = len;
|
|
153
|
+
|
|
154
|
+
if (start < 0) {
|
|
155
|
+
start = len + start;
|
|
156
|
+
if (start < 0) start = 0;
|
|
157
|
+
}
|
|
158
|
+
if (start > len) start = len;
|
|
159
|
+
|
|
160
|
+
if (Porffor.rawType(end) == Porffor.TYPES.undefined) {
|
|
161
|
+
end = len;
|
|
162
|
+
} else {
|
|
163
|
+
if (end < 0) {
|
|
164
|
+
end = len + end;
|
|
165
|
+
if (end < 0) end = 0;
|
|
166
|
+
}
|
|
167
|
+
if (end > len) end = len;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
while (start < end) {
|
|
171
|
+
_this[target++] = _this[start++];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return _this;
|
|
175
|
+
};
|
|
176
|
+
|
|
145
177
|
// @porf-typed-array
|
|
146
178
|
export const __Array_prototype_reverse = (_this: any[]) => {
|
|
147
179
|
const len: i32 = _this.length;
|
package/compiler/codegen.js
CHANGED
|
@@ -2092,7 +2092,7 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {
|
|
|
2092
2092
|
if (func && func.hasRestArgument) {
|
|
2093
2093
|
if (args.length < paramCount) {
|
|
2094
2094
|
args = args.concat(new Array(paramCount - 1 - args.length).fill(DEFAULT_VALUE));
|
|
2095
|
-
}
|
|
2095
|
+
}
|
|
2096
2096
|
const restArgs = args.slice(paramCount - 1);
|
|
2097
2097
|
args = args.slice(0, paramCount - 1);
|
|
2098
2098
|
args.push({
|
|
@@ -4402,7 +4402,7 @@ const generateFunc = (scope, decl) => {
|
|
|
4402
4402
|
defaultValues[name] = x.right;
|
|
4403
4403
|
break;
|
|
4404
4404
|
}
|
|
4405
|
-
|
|
4405
|
+
|
|
4406
4406
|
case 'RestElement': {
|
|
4407
4407
|
name = x.argument.name;
|
|
4408
4408
|
func.hasRestArgument = true;
|
package/compiler/cyclone.js
CHANGED
|
@@ -66,6 +66,42 @@ export default wasm => {
|
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
switch (opcode) {
|
|
69
|
+
case Opcodes.if: {
|
|
70
|
+
if (stack.length < 1) { empty(); break; }
|
|
71
|
+
const cond = bool(pop());
|
|
72
|
+
|
|
73
|
+
// find else split and end
|
|
74
|
+
let j = i + 1;
|
|
75
|
+
let depth = 0, elseStart = 0;
|
|
76
|
+
for (; j < wasm.length; j++) {
|
|
77
|
+
const op = wasm[j][0];
|
|
78
|
+
if (op === Opcodes.if || op === Opcodes.block || op === Opcodes.loop || op === Opcodes.try) depth++;
|
|
79
|
+
if (op === Opcodes.else && depth === 0) elseStart = j;
|
|
80
|
+
if (op === Opcodes.end) {
|
|
81
|
+
depth--;
|
|
82
|
+
if (depth < 0) break;
|
|
83
|
+
}
|
|
84
|
+
if (op === Opcodes.br || op === Opcodes.br_if) wasm[j][1] -= 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (cond) {
|
|
88
|
+
// remove else if it exists, or just remove end
|
|
89
|
+
if (elseStart) wasm.splice(elseStart, j - elseStart + 1);
|
|
90
|
+
else wasm.splice(j, 1);
|
|
91
|
+
} else {
|
|
92
|
+
// remove truthy conseq and keep else if it exists, or just remove entire thing
|
|
93
|
+
if (elseStart) {
|
|
94
|
+
wasm.splice(j, 1); // remove end
|
|
95
|
+
wasm.splice(i + 1, elseStart - i + 1); // remove truthy conseq
|
|
96
|
+
} else wasm.splice(i + 1, j - i + 0); // no else, remove entire if
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// remove this if op
|
|
100
|
+
wasm.splice(i, 1);
|
|
101
|
+
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
|
|
69
105
|
case Opcodes.i32_const: {
|
|
70
106
|
const n = read_signedLEB128(op.slice(1));
|
|
71
107
|
push(n);
|
package/compiler/decompile.js
CHANGED
|
@@ -70,7 +70,7 @@ export default (wasm, name = '', ind = 0, locals = {}, params = [], returns = []
|
|
|
70
70
|
} else if (inst[0] === Opcodes.i32_load || inst[0] === Opcodes.i64_load || inst[0] === Opcodes.f64_load || inst[0] === Opcodes.i32_store || inst[0] === Opcodes.i64_store || inst[0] === Opcodes.f64_store || inst[0] === Opcodes.i32_store16 || inst[0] === Opcodes.i32_load16_u) {
|
|
71
71
|
out += ` ${inst[1]} ${read_unsignedLEB128(inst.slice(2))}`;
|
|
72
72
|
} else for (const operand of inst.slice(1)) {
|
|
73
|
-
if (inst[0] === Opcodes.if || inst[0] === Opcodes.loop || inst[0] === Opcodes.block) {
|
|
73
|
+
if (inst[0] === Opcodes.if || inst[0] === Opcodes.loop || inst[0] === Opcodes.block || inst[0] === Opcodes.try) {
|
|
74
74
|
if (operand === Blocktype.void) continue;
|
|
75
75
|
out += ` ${invValtype[operand]}`;
|
|
76
76
|
} else {
|
|
@@ -80,7 +80,7 @@ export default (wasm, name = '', ind = 0, locals = {}, params = [], returns = []
|
|
|
80
80
|
|
|
81
81
|
if (comments.length > 0) out += ` ;; ${comments.join(' ')}`;
|
|
82
82
|
|
|
83
|
-
if (inst[0] === Opcodes.if || inst[0] === Opcodes.loop || inst[0] === Opcodes.block || inst[0] === Opcodes.else) {
|
|
83
|
+
if (inst[0] === Opcodes.if || inst[0] === Opcodes.loop || inst[0] === Opcodes.block || inst[0] === Opcodes.else || inst[0] === Opcodes.try || inst[0] === Opcodes.catch_all) {
|
|
84
84
|
out += ` ;; label @${depth}`;
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -281,6 +281,15 @@ export const BuiltinFuncs = function() {
|
|
|
281
281
|
locals: [124,124,127,124,127],
|
|
282
282
|
localNames: ["_this","_this#type","index","index#type","value","value#type","len","out","#last_type","#member_setter_val_tmp","#member_setter_ptr_tmp"],
|
|
283
283
|
};
|
|
284
|
+
this.__Array_prototype_copyWithin = {
|
|
285
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,8],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,4],[11],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[5],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[32,6],[160],[34,6],[65,0],[33,7],[26],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[34,6],[65,0],[33,7],[26],[11],[11],[32,6],[32,8],[100],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[11],[11],[3,64],[32,4],[32,6],[99],[4,64],[32,0],[252,3],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,3],[65,9],[108],[106],[34,10],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,11],[43,0,4],[32,11],[45,0,12],[33,12],[34,9],[57,0,4],[32,10],[32,12],[58,0,12],[12,1],[11],[11],[32,0],[65,208,0],[15]],
|
|
286
|
+
params: [124,127,124,127,124,127,124,127],
|
|
287
|
+
typedParams: true,
|
|
288
|
+
returns: [124,127],
|
|
289
|
+
typedReturns: true,
|
|
290
|
+
locals: [124,124,127,127,127],
|
|
291
|
+
localNames: ["_this","_this#type","target","target#type","start","start#type","end","end#type","len","#member_setter_val_tmp","#member_setter_ptr_tmp","#loadArray_offset","#last_type"],
|
|
292
|
+
};
|
|
284
293
|
this.__Array_prototype_reverse = {
|
|
285
294
|
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],[33,7],[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],[34,9],[32,4],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,6],[43,0,4],[32,6],[45,0,12],[33,7],[34,8],[57,0,4],[32,9],[32,7],[58,0,12],[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],[34,9],[32,5],[34,8],[57,0,4],[32,9],[65,0],[58,0,12],[12,1],[11],[11],[32,0],[65,208,0],[15]],
|
|
286
295
|
params: [124,127],
|
|
@@ -2208,6 +2217,15 @@ export const BuiltinFuncs = function() {
|
|
|
2208
2217
|
locals: [124,124,127,124,127],
|
|
2209
2218
|
localNames: ["_this","_this#type","index","index#type","value","value#type","len","out","#last_type","#member_setter_val_tmp","#member_setter_ptr_tmp"],
|
|
2210
2219
|
};
|
|
2220
|
+
this.__Uint8Array_prototype_copyWithin = {
|
|
2221
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,8],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,4],[11],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[5],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[32,6],[160],[34,6],[65,0],[33,7],[26],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[34,6],[65,0],[33,7],[26],[11],[11],[32,6],[32,8],[100],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[11],[11],[3,64],[32,4],[32,6],[99],[4,64],[32,0],[252,3],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,3],[106],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,3],[106],[45,0,4],[184],[65,0],[33,12],[34,9],[252,3],[58,0,4],[65,0],[33,12],[12,1],[11],[11],[32,0],[65,213,0],[15]],
|
|
2222
|
+
params: [124,127,124,127,124,127,124,127],
|
|
2223
|
+
typedParams: true,
|
|
2224
|
+
returns: [124,127],
|
|
2225
|
+
typedReturns: true,
|
|
2226
|
+
locals: [124,124,127,127,127],
|
|
2227
|
+
localNames: ["_this","_this#type","target","target#type","start","start#type","end","end#type","len","#member_setter_val_tmp","#member_setter_ptr_tmp","#loadArray_offset","#last_type"],
|
|
2228
|
+
};
|
|
2211
2229
|
this.__Uint8Array_prototype_reverse = {
|
|
2212
2230
|
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,0],[252,3],[32,3],[252,3],[106],[45,0,4],[184],[65,0],[33,7],[33,5],[32,0],[252,3],[32,3],[32,3],[68,0,0,0,0,0,0,240,63],[160],[33,3],[252,3],[106],[32,0],[252,3],[32,4],[252,3],[106],[45,0,4],[184],[65,0],[33,7],[34,8],[252,3],[58,0,4],[65,0],[33,7],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[161],[33,4],[252,3],[106],[32,5],[34,8],[252,3],[58,0,4],[65,0],[33,7],[12,1],[11],[11],[32,0],[65,213,0],[15]],
|
|
2213
2231
|
params: [124,127],
|
|
@@ -2456,6 +2474,15 @@ export const BuiltinFuncs = function() {
|
|
|
2456
2474
|
locals: [124,124,127,124,127],
|
|
2457
2475
|
localNames: ["_this","_this#type","index","index#type","value","value#type","len","out","#last_type","#member_setter_val_tmp","#member_setter_ptr_tmp"],
|
|
2458
2476
|
};
|
|
2477
|
+
this.__Int8Array_prototype_copyWithin = {
|
|
2478
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,8],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,4],[11],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[5],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[32,6],[160],[34,6],[65,0],[33,7],[26],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[34,6],[65,0],[33,7],[26],[11],[11],[32,6],[32,8],[100],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[11],[11],[3,64],[32,4],[32,6],[99],[4,64],[32,0],[252,3],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,3],[106],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,3],[106],[44,0,4],[183],[65,0],[33,12],[34,9],[252,2],[58,0,4],[65,0],[33,12],[12,1],[11],[11],[32,0],[65,214,0],[15]],
|
|
2479
|
+
params: [124,127,124,127,124,127,124,127],
|
|
2480
|
+
typedParams: true,
|
|
2481
|
+
returns: [124,127],
|
|
2482
|
+
typedReturns: true,
|
|
2483
|
+
locals: [124,124,127,127,127],
|
|
2484
|
+
localNames: ["_this","_this#type","target","target#type","start","start#type","end","end#type","len","#member_setter_val_tmp","#member_setter_ptr_tmp","#loadArray_offset","#last_type"],
|
|
2485
|
+
};
|
|
2459
2486
|
this.__Int8Array_prototype_reverse = {
|
|
2460
2487
|
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,0],[252,3],[32,3],[252,3],[106],[44,0,4],[183],[65,0],[33,7],[33,5],[32,0],[252,3],[32,3],[32,3],[68,0,0,0,0,0,0,240,63],[160],[33,3],[252,3],[106],[32,0],[252,3],[32,4],[252,3],[106],[44,0,4],[183],[65,0],[33,7],[34,8],[252,2],[58,0,4],[65,0],[33,7],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[161],[33,4],[252,3],[106],[32,5],[34,8],[252,2],[58,0,4],[65,0],[33,7],[12,1],[11],[11],[32,0],[65,214,0],[15]],
|
|
2461
2488
|
params: [124,127],
|
|
@@ -2704,6 +2731,15 @@ export const BuiltinFuncs = function() {
|
|
|
2704
2731
|
locals: [124,124,127,124,127],
|
|
2705
2732
|
localNames: ["_this","_this#type","index","index#type","value","value#type","len","out","#last_type","#member_setter_val_tmp","#member_setter_ptr_tmp"],
|
|
2706
2733
|
};
|
|
2734
|
+
this.__Uint8ClampedArray_prototype_copyWithin = {
|
|
2735
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,8],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,4],[11],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[5],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[32,6],[160],[34,6],[65,0],[33,7],[26],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[34,6],[65,0],[33,7],[26],[11],[11],[32,6],[32,8],[100],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[11],[11],[3,64],[32,4],[32,6],[99],[4,64],[32,0],[252,3],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,3],[106],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,3],[106],[45,0,4],[184],[65,0],[33,12],[34,9],[68,0,0,0,0,0,0,0,0],[165],[68,0,0,0,0,0,224,111,64],[164],[252,3],[58,0,4],[65,0],[33,12],[12,1],[11],[11],[32,0],[65,215,0],[15]],
|
|
2736
|
+
params: [124,127,124,127,124,127,124,127],
|
|
2737
|
+
typedParams: true,
|
|
2738
|
+
returns: [124,127],
|
|
2739
|
+
typedReturns: true,
|
|
2740
|
+
locals: [124,124,127,127,127],
|
|
2741
|
+
localNames: ["_this","_this#type","target","target#type","start","start#type","end","end#type","len","#member_setter_val_tmp","#member_setter_ptr_tmp","#loadArray_offset","#last_type"],
|
|
2742
|
+
};
|
|
2707
2743
|
this.__Uint8ClampedArray_prototype_reverse = {
|
|
2708
2744
|
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,0],[252,3],[32,3],[252,3],[106],[45,0,4],[184],[65,0],[33,7],[33,5],[32,0],[252,3],[32,3],[32,3],[68,0,0,0,0,0,0,240,63],[160],[33,3],[252,3],[106],[32,0],[252,3],[32,4],[252,3],[106],[45,0,4],[184],[65,0],[33,7],[34,8],[68,0,0,0,0,0,0,0,0],[165],[68,0,0,0,0,0,224,111,64],[164],[252,3],[58,0,4],[65,0],[33,7],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[161],[33,4],[252,3],[106],[32,5],[34,8],[68,0,0,0,0,0,0,0,0],[165],[68,0,0,0,0,0,224,111,64],[164],[252,3],[58,0,4],[65,0],[33,7],[12,1],[11],[11],[32,0],[65,215,0],[15]],
|
|
2709
2745
|
params: [124,127],
|
|
@@ -2952,6 +2988,15 @@ export const BuiltinFuncs = function() {
|
|
|
2952
2988
|
locals: [124,124,127,124,127],
|
|
2953
2989
|
localNames: ["_this","_this#type","index","index#type","value","value#type","len","out","#last_type","#member_setter_val_tmp","#member_setter_ptr_tmp"],
|
|
2954
2990
|
};
|
|
2991
|
+
this.__Uint16Array_prototype_copyWithin = {
|
|
2992
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,8],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,4],[11],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[5],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[32,6],[160],[34,6],[65,0],[33,7],[26],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[34,6],[65,0],[33,7],[26],[11],[11],[32,6],[32,8],[100],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[11],[11],[3,64],[32,4],[32,6],[99],[4,64],[32,0],[252,3],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,3],[65,2],[108],[106],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,0],[33,12],[34,9],[252,3],[59,0,4],[65,0],[33,12],[12,1],[11],[11],[32,0],[65,216,0],[15]],
|
|
2993
|
+
params: [124,127,124,127,124,127,124,127],
|
|
2994
|
+
typedParams: true,
|
|
2995
|
+
returns: [124,127],
|
|
2996
|
+
typedReturns: true,
|
|
2997
|
+
locals: [124,124,127,127,127],
|
|
2998
|
+
localNames: ["_this","_this#type","target","target#type","start","start#type","end","end#type","len","#member_setter_val_tmp","#member_setter_ptr_tmp","#loadArray_offset","#last_type"],
|
|
2999
|
+
};
|
|
2955
3000
|
this.__Uint16Array_prototype_reverse = {
|
|
2956
3001
|
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,0],[252,3],[32,3],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,0],[33,7],[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,2],[108],[106],[32,0],[252,3],[32,4],[252,3],[65,2],[108],[106],[47,0,4],[184],[65,0],[33,7],[34,8],[252,3],[59,0,4],[65,0],[33,7],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[161],[33,4],[252,3],[65,2],[108],[106],[32,5],[34,8],[252,3],[59,0,4],[65,0],[33,7],[12,1],[11],[11],[32,0],[65,216,0],[15]],
|
|
2957
3002
|
params: [124,127],
|
|
@@ -3200,6 +3245,15 @@ export const BuiltinFuncs = function() {
|
|
|
3200
3245
|
locals: [124,124,127,124,127],
|
|
3201
3246
|
localNames: ["_this","_this#type","index","index#type","value","value#type","len","out","#last_type","#member_setter_val_tmp","#member_setter_ptr_tmp"],
|
|
3202
3247
|
};
|
|
3248
|
+
this.__Int16Array_prototype_copyWithin = {
|
|
3249
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,8],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,4],[11],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[5],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[32,6],[160],[34,6],[65,0],[33,7],[26],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[34,6],[65,0],[33,7],[26],[11],[11],[32,6],[32,8],[100],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[11],[11],[3,64],[32,4],[32,6],[99],[4,64],[32,0],[252,3],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,3],[65,2],[108],[106],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,0],[33,12],[34,9],[252,2],[59,0,4],[65,0],[33,12],[12,1],[11],[11],[32,0],[65,217,0],[15]],
|
|
3250
|
+
params: [124,127,124,127,124,127,124,127],
|
|
3251
|
+
typedParams: true,
|
|
3252
|
+
returns: [124,127],
|
|
3253
|
+
typedReturns: true,
|
|
3254
|
+
locals: [124,124,127,127,127],
|
|
3255
|
+
localNames: ["_this","_this#type","target","target#type","start","start#type","end","end#type","len","#member_setter_val_tmp","#member_setter_ptr_tmp","#loadArray_offset","#last_type"],
|
|
3256
|
+
};
|
|
3203
3257
|
this.__Int16Array_prototype_reverse = {
|
|
3204
3258
|
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,0],[252,3],[32,3],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,0],[33,7],[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,2],[108],[106],[32,0],[252,3],[32,4],[252,3],[65,2],[108],[106],[46,0,4],[183],[65,0],[33,7],[34,8],[252,2],[59,0,4],[65,0],[33,7],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[161],[33,4],[252,3],[65,2],[108],[106],[32,5],[34,8],[252,2],[59,0,4],[65,0],[33,7],[12,1],[11],[11],[32,0],[65,217,0],[15]],
|
|
3205
3259
|
params: [124,127],
|
|
@@ -3448,6 +3502,15 @@ export const BuiltinFuncs = function() {
|
|
|
3448
3502
|
locals: [124,124,127,124,127],
|
|
3449
3503
|
localNames: ["_this","_this#type","index","index#type","value","value#type","len","out","#last_type","#member_setter_val_tmp","#member_setter_ptr_tmp"],
|
|
3450
3504
|
};
|
|
3505
|
+
this.__Uint32Array_prototype_copyWithin = {
|
|
3506
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,8],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,4],[11],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[5],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[32,6],[160],[34,6],[65,0],[33,7],[26],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[34,6],[65,0],[33,7],[26],[11],[11],[32,6],[32,8],[100],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[11],[11],[3,64],[32,4],[32,6],[99],[4,64],[32,0],[252,3],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,3],[65,4],[108],[106],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,0],[33,12],[34,9],[252,3],[54,0,4],[65,0],[33,12],[12,1],[11],[11],[32,0],[65,218,0],[15]],
|
|
3507
|
+
params: [124,127,124,127,124,127,124,127],
|
|
3508
|
+
typedParams: true,
|
|
3509
|
+
returns: [124,127],
|
|
3510
|
+
typedReturns: true,
|
|
3511
|
+
locals: [124,124,127,127,127],
|
|
3512
|
+
localNames: ["_this","_this#type","target","target#type","start","start#type","end","end#type","len","#member_setter_val_tmp","#member_setter_ptr_tmp","#loadArray_offset","#last_type"],
|
|
3513
|
+
};
|
|
3451
3514
|
this.__Uint32Array_prototype_reverse = {
|
|
3452
3515
|
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,0],[252,3],[32,3],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,0],[33,7],[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,4],[108],[106],[32,0],[252,3],[32,4],[252,3],[65,4],[108],[106],[40,0,4],[184],[65,0],[33,7],[34,8],[252,3],[54,0,4],[65,0],[33,7],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[161],[33,4],[252,3],[65,4],[108],[106],[32,5],[34,8],[252,3],[54,0,4],[65,0],[33,7],[12,1],[11],[11],[32,0],[65,218,0],[15]],
|
|
3453
3516
|
params: [124,127],
|
|
@@ -3696,6 +3759,15 @@ export const BuiltinFuncs = function() {
|
|
|
3696
3759
|
locals: [124,124,127,124,127],
|
|
3697
3760
|
localNames: ["_this","_this#type","index","index#type","value","value#type","len","out","#last_type","#member_setter_val_tmp","#member_setter_ptr_tmp"],
|
|
3698
3761
|
};
|
|
3762
|
+
this.__Int32Array_prototype_copyWithin = {
|
|
3763
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,8],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,4],[11],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[5],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[32,6],[160],[34,6],[65,0],[33,7],[26],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[34,6],[65,0],[33,7],[26],[11],[11],[32,6],[32,8],[100],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[11],[11],[3,64],[32,4],[32,6],[99],[4,64],[32,0],[252,3],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,3],[65,4],[108],[106],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,0],[33,12],[34,9],[252,2],[54,0,4],[65,0],[33,12],[12,1],[11],[11],[32,0],[65,219,0],[15]],
|
|
3764
|
+
params: [124,127,124,127,124,127,124,127],
|
|
3765
|
+
typedParams: true,
|
|
3766
|
+
returns: [124,127],
|
|
3767
|
+
typedReturns: true,
|
|
3768
|
+
locals: [124,124,127,127,127],
|
|
3769
|
+
localNames: ["_this","_this#type","target","target#type","start","start#type","end","end#type","len","#member_setter_val_tmp","#member_setter_ptr_tmp","#loadArray_offset","#last_type"],
|
|
3770
|
+
};
|
|
3699
3771
|
this.__Int32Array_prototype_reverse = {
|
|
3700
3772
|
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,0],[252,3],[32,3],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,0],[33,7],[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,4],[108],[106],[32,0],[252,3],[32,4],[252,3],[65,4],[108],[106],[40,0,4],[183],[65,0],[33,7],[34,8],[252,2],[54,0,4],[65,0],[33,7],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[161],[33,4],[252,3],[65,4],[108],[106],[32,5],[34,8],[252,2],[54,0,4],[65,0],[33,7],[12,1],[11],[11],[32,0],[65,219,0],[15]],
|
|
3701
3773
|
params: [124,127],
|
|
@@ -3944,6 +4016,15 @@ export const BuiltinFuncs = function() {
|
|
|
3944
4016
|
locals: [124,124,127,124,127],
|
|
3945
4017
|
localNames: ["_this","_this#type","index","index#type","value","value#type","len","out","#last_type","#member_setter_val_tmp","#member_setter_ptr_tmp"],
|
|
3946
4018
|
};
|
|
4019
|
+
this.__Float32Array_prototype_copyWithin = {
|
|
4020
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,8],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,4],[11],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[5],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[32,6],[160],[34,6],[65,0],[33,7],[26],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[34,6],[65,0],[33,7],[26],[11],[11],[32,6],[32,8],[100],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[11],[11],[3,64],[32,4],[32,6],[99],[4,64],[32,0],[252,3],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,3],[65,4],[108],[106],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,0],[33,12],[34,9],[182],[56,0,4],[65,0],[33,12],[12,1],[11],[11],[32,0],[65,220,0],[15]],
|
|
4021
|
+
params: [124,127,124,127,124,127,124,127],
|
|
4022
|
+
typedParams: true,
|
|
4023
|
+
returns: [124,127],
|
|
4024
|
+
typedReturns: true,
|
|
4025
|
+
locals: [124,124,127,127,127],
|
|
4026
|
+
localNames: ["_this","_this#type","target","target#type","start","start#type","end","end#type","len","#member_setter_val_tmp","#member_setter_ptr_tmp","#loadArray_offset","#last_type"],
|
|
4027
|
+
};
|
|
3947
4028
|
this.__Float32Array_prototype_reverse = {
|
|
3948
4029
|
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,0],[252,3],[32,3],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,0],[33,7],[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,4],[108],[106],[32,0],[252,3],[32,4],[252,3],[65,4],[108],[106],[42,0,4],[187],[65,0],[33,7],[34,8],[182],[56,0,4],[65,0],[33,7],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[161],[33,4],[252,3],[65,4],[108],[106],[32,5],[34,8],[182],[56,0,4],[65,0],[33,7],[12,1],[11],[11],[32,0],[65,220,0],[15]],
|
|
3949
4030
|
params: [124,127],
|
|
@@ -4192,6 +4273,15 @@ export const BuiltinFuncs = function() {
|
|
|
4192
4273
|
locals: [124,124,127,124,127],
|
|
4193
4274
|
localNames: ["_this","_this#type","index","index#type","value","value#type","len","out","#last_type","#member_setter_val_tmp","#member_setter_ptr_tmp"],
|
|
4194
4275
|
};
|
|
4276
|
+
this.__Float64Array_prototype_copyWithin = {
|
|
4277
|
+
wasm: (scope, {builtin,}) => [[32,0],[252,3],[40,1,0],[184],[33,8],[32,2],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,2],[11],[32,4],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[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,8],[100],[4,64],[32,8],[33,4],[11],[32,6],[32,7],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,8,64],[97],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[5],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[32,8],[32,6],[160],[34,6],[65,0],[33,7],[26],[32,6],[68,0,0,0,0,0,0,0,0],[99],[4,64],[68,0,0,0,0,0,0,0,0],[34,6],[65,0],[33,7],[26],[11],[11],[32,6],[32,8],[100],[4,64],[32,8],[34,6],[65,0],[33,7],[26],[11],[11],[3,64],[32,4],[32,6],[99],[4,64],[32,0],[252,3],[32,2],[32,2],[68,0,0,0,0,0,0,240,63],[160],[33,2],[252,3],[65,8],[108],[106],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[160],[33,4],[252,3],[65,8],[108],[106],[43,0,4],[65,0],[33,12],[34,9],[57,0,4],[65,0],[33,12],[12,1],[11],[11],[32,0],[65,221,0],[15]],
|
|
4278
|
+
params: [124,127,124,127,124,127,124,127],
|
|
4279
|
+
typedParams: true,
|
|
4280
|
+
returns: [124,127],
|
|
4281
|
+
typedReturns: true,
|
|
4282
|
+
locals: [124,124,127,127,127],
|
|
4283
|
+
localNames: ["_this","_this#type","target","target#type","start","start#type","end","end#type","len","#member_setter_val_tmp","#member_setter_ptr_tmp","#loadArray_offset","#last_type"],
|
|
4284
|
+
};
|
|
4195
4285
|
this.__Float64Array_prototype_reverse = {
|
|
4196
4286
|
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,0],[252,3],[32,3],[252,3],[65,8],[108],[106],[43,0,4],[65,0],[33,7],[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,8],[108],[106],[32,0],[252,3],[32,4],[252,3],[65,8],[108],[106],[43,0,4],[65,0],[33,7],[34,8],[57,0,4],[65,0],[33,7],[32,0],[252,3],[32,4],[32,4],[68,0,0,0,0,0,0,240,63],[161],[33,4],[252,3],[65,8],[108],[106],[32,5],[34,8],[57,0,4],[65,0],[33,7],[12,1],[11],[11],[32,0],[65,221,0],[15]],
|
|
4197
4287
|
params: [124,127],
|
package/compiler/index.js
CHANGED
package/compiler/opt.js
CHANGED
|
@@ -114,8 +114,6 @@ export default (funcs, globals, pages, tags, exceptions) => {
|
|
|
114
114
|
while (runs > 0) {
|
|
115
115
|
runs--;
|
|
116
116
|
|
|
117
|
-
let depth = [];
|
|
118
|
-
|
|
119
117
|
let getCount = {}, setCount = {};
|
|
120
118
|
for (const x in f.locals) {
|
|
121
119
|
getCount[f.locals[x].idx] = 0;
|
|
@@ -128,9 +126,6 @@ export default (funcs, globals, pages, tags, exceptions) => {
|
|
|
128
126
|
inst = [ ...inst ];
|
|
129
127
|
wasm[i] = inst;
|
|
130
128
|
|
|
131
|
-
if (inst[0] === Opcodes.if || inst[0] === Opcodes.loop || inst[0] === Opcodes.block) depth.push(inst[0]);
|
|
132
|
-
if (inst[0] === Opcodes.end) depth.pop();
|
|
133
|
-
|
|
134
129
|
if (inst[0] === Opcodes.local_get) getCount[inst[1]]++;
|
|
135
130
|
if (inst[0] === Opcodes.local_set || inst[0] === Opcodes.local_tee) setCount[inst[1]]++;
|
|
136
131
|
|
package/package.json
CHANGED