porffor 0.14.0-b481bfc5f → 0.14.0-b5a80d8e3
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/assemble.js +14 -0
- package/compiler/builtins/array.ts +76 -0
- package/compiler/codegen.js +127 -20
- package/compiler/generated_builtins.js +107 -27
- package/compiler/precompile.js +4 -3
- package/package.json +1 -1
package/compiler/assemble.js
CHANGED
@@ -116,6 +116,20 @@ export default (funcs, globals, tags, pages, data, flags) => {
|
|
116
116
|
] ])
|
117
117
|
);
|
118
118
|
|
119
|
+
if (pages.has('func argc lut')) {
|
120
|
+
// generate func argc lut data
|
121
|
+
const bytes = [];
|
122
|
+
for (let i = 0; i < funcs.length; i++) {
|
123
|
+
const argc = Math.floor(funcs[i].params.length / 2);
|
124
|
+
bytes.push(argc % 256, (argc / 256 | 0) % 256);
|
125
|
+
}
|
126
|
+
|
127
|
+
data.push({
|
128
|
+
offset: pages.get('func argc lut').ind * pageSize,
|
129
|
+
bytes
|
130
|
+
});
|
131
|
+
}
|
132
|
+
|
119
133
|
// const t0 = performance.now();
|
120
134
|
|
121
135
|
// specially optimized assembly for globals as this version is much (>5x) faster than traditional createSection()
|
@@ -144,4 +144,80 @@ export const __Array_prototype_toReversed = (_this: any[]) => {
|
|
144
144
|
|
145
145
|
export const __Array_prototype_valueOf = (_this: any[]) => {
|
146
146
|
return _this;
|
147
|
+
};
|
148
|
+
|
149
|
+
|
150
|
+
export const __Array_prototype_forEach = (_this: any[], callbackFn: any) => {
|
151
|
+
const len: i32 = _this.length;
|
152
|
+
let i: i32 = 0;
|
153
|
+
while (i < len) {
|
154
|
+
callbackFn(_this[i], i++, _this);
|
155
|
+
}
|
156
|
+
};
|
157
|
+
|
158
|
+
export const __Array_prototype_filter = (_this: any[], callbackFn: any) => {
|
159
|
+
const out: any[] = [];
|
160
|
+
|
161
|
+
const len: i32 = _this.length;
|
162
|
+
let i: i32 = 0;
|
163
|
+
while (i < len) {
|
164
|
+
const el: any = _this[i];
|
165
|
+
if (callbackFn(el, i++, _this)) out.push(el);
|
166
|
+
}
|
167
|
+
|
168
|
+
return out;
|
169
|
+
};
|
170
|
+
|
171
|
+
export const __Array_prototype_map = (_this: any[], callbackFn: any) => {
|
172
|
+
const out: any[] = [];
|
173
|
+
|
174
|
+
const len: i32 = _this.length;
|
175
|
+
let i: i32 = 0;
|
176
|
+
while (i < len) {
|
177
|
+
out.push(callbackFn(_this[i], i++, _this));
|
178
|
+
}
|
179
|
+
|
180
|
+
return out;
|
181
|
+
};
|
182
|
+
|
183
|
+
export const __Array_prototype_find = (_this: any[], callbackFn: any) => {
|
184
|
+
const len: i32 = _this.length;
|
185
|
+
let i: i32 = 0;
|
186
|
+
while (i < len) {
|
187
|
+
const el: any = _this[i];
|
188
|
+
if (callbackFn(el, i++, _this)) return el;
|
189
|
+
}
|
190
|
+
};
|
191
|
+
|
192
|
+
export const __Array_prototype_findLast = (_this: any[], callbackFn: any) => {
|
193
|
+
let i: i32 = _this.length;
|
194
|
+
while (i > 0) {
|
195
|
+
const el: any = _this[--i];
|
196
|
+
if (callbackFn(el, i, _this)) return el;
|
197
|
+
}
|
198
|
+
};
|
199
|
+
|
200
|
+
export const __Array_prototype_findIndex = (_this: any[], callbackFn: any) => {
|
201
|
+
const len: i32 = _this.length;
|
202
|
+
let i: i32 = 0;
|
203
|
+
while (i < len) {
|
204
|
+
if (callbackFn(_this[i], i++, _this)) return i;
|
205
|
+
}
|
206
|
+
};
|
207
|
+
|
208
|
+
export const __Array_prototype_findLastIndex = (_this: any[], callbackFn: any) => {
|
209
|
+
let i: i32 = _this.length;
|
210
|
+
while (i > 0) {
|
211
|
+
if (callbackFn(_this[--i], i, _this)) return i;
|
212
|
+
}
|
213
|
+
};
|
214
|
+
|
215
|
+
export const __Array_prototype_every = (_this: any[], callbackFn: any) => {
|
216
|
+
const len: i32 = _this.length;
|
217
|
+
let i: i32 = 0;
|
218
|
+
while (i < len) {
|
219
|
+
if (!callbackFn(_this[i], i++, _this)) return false;
|
220
|
+
}
|
221
|
+
|
222
|
+
return true;
|
147
223
|
};
|
package/compiler/codegen.js
CHANGED
@@ -1063,7 +1063,7 @@ const asmFuncToAsm = (func, { name = '#unknown_asm_func', params = [], locals =
|
|
1063
1063
|
});
|
1064
1064
|
};
|
1065
1065
|
|
1066
|
-
const asmFunc = (name, { wasm, params, locals: localTypes, globals: globalTypes = [], globalInits, returns, returnType, localNames = [], globalNames = [], data: _data = [], callsSelf = false }) => {
|
1066
|
+
const asmFunc = (name, { wasm, params, locals: localTypes, globals: globalTypes = [], globalInits, returns, returnType, localNames = [], globalNames = [], data: _data = [], table = false, callsSelf = false }) => {
|
1067
1067
|
const existing = funcs.find(x => x.name === name);
|
1068
1068
|
if (existing) return existing;
|
1069
1069
|
|
@@ -1117,9 +1117,18 @@ const asmFunc = (name, { wasm, params, locals: localTypes, globals: globalTypes
|
|
1117
1117
|
}
|
1118
1118
|
}
|
1119
1119
|
|
1120
|
+
if (table) for (const inst of wasm) {
|
1121
|
+
if (inst[0] === Opcodes.i32_load16_u && inst.at(-1) === 'read_argc') {
|
1122
|
+
inst.splice(2, 99);
|
1123
|
+
inst.push(...unsignedLEB128(allocPage({}, 'func argc lut') * pageSize));
|
1124
|
+
}
|
1125
|
+
}
|
1126
|
+
|
1120
1127
|
funcs.push(func);
|
1121
1128
|
funcIndex[name] = func.index;
|
1122
1129
|
|
1130
|
+
if (table) funcs.table = true;
|
1131
|
+
|
1123
1132
|
return func;
|
1124
1133
|
};
|
1125
1134
|
|
@@ -1859,36 +1868,128 @@ const generateCall = (scope, decl, _global, _name, unusedValue = false) => {
|
|
1859
1868
|
const [ local, global ] = lookupName(scope, name);
|
1860
1869
|
if (!Prefs.indirectCalls || local == null) return internalThrow(scope, 'TypeError', `${unhackName(name)} is not a function`, true);
|
1861
1870
|
|
1862
|
-
// todo: only works when
|
1863
|
-
|
1864
|
-
|
1871
|
+
// todo: only works when function uses typedParams and typedReturns
|
1872
|
+
|
1873
|
+
const indirectMode = Prefs.indirectCallMode ?? 'vararg';
|
1874
|
+
// options: vararg, strict
|
1875
|
+
// - strict: simpler, smaller size usage, no func argc lut needed.
|
1876
|
+
// ONLY works when arg count of call == arg count of function being called
|
1877
|
+
// - vararg: large size usage, cursed.
|
1878
|
+
// works when arg count of call != arg count of function being called*
|
1879
|
+
// * most of the time, some edgecases
|
1865
1880
|
|
1866
1881
|
funcs.table = true;
|
1882
|
+
scope.table = true;
|
1867
1883
|
|
1868
1884
|
let args = decl.arguments;
|
1869
|
-
let
|
1885
|
+
let out = [];
|
1886
|
+
|
1887
|
+
let locals = [];
|
1888
|
+
|
1889
|
+
if (indirectMode === 'vararg') {
|
1890
|
+
const minArgc = Prefs.indirectCallMinArgc ?? 3;
|
1891
|
+
|
1892
|
+
if (args.length < minArgc) {
|
1893
|
+
args = args.concat(new Array(minArgc - args.length).fill(DEFAULT_VALUE));
|
1894
|
+
}
|
1895
|
+
}
|
1870
1896
|
|
1871
1897
|
for (let i = 0; i < args.length; i++) {
|
1872
1898
|
const arg = args[i];
|
1873
|
-
|
1899
|
+
out = out.concat(generate(scope, arg));
|
1874
1900
|
|
1875
1901
|
if (valtypeBinary !== Valtype.i32 && (
|
1876
1902
|
(builtinFuncs[name] && builtinFuncs[name].params[i * (typedParams ? 2 : 1)] === Valtype.i32) ||
|
1877
1903
|
(importedFuncs[name] && name.startsWith('profile'))
|
1878
1904
|
)) {
|
1879
|
-
|
1905
|
+
out.push(Opcodes.i32_to);
|
1906
|
+
}
|
1907
|
+
|
1908
|
+
out = out.concat(getNodeType(scope, arg));
|
1909
|
+
|
1910
|
+
if (indirectMode === 'vararg') {
|
1911
|
+
const typeLocal = localTmp(scope, `#indirect_arg${i}_type`, Valtype.i32);
|
1912
|
+
const valLocal = localTmp(scope, `#indirect_arg${i}_val`);
|
1913
|
+
|
1914
|
+
locals.push([valLocal, typeLocal]);
|
1915
|
+
|
1916
|
+
out.push(
|
1917
|
+
[ Opcodes.local_set, typeLocal ],
|
1918
|
+
[ Opcodes.local_set, valLocal ]
|
1919
|
+
);
|
1920
|
+
}
|
1921
|
+
}
|
1922
|
+
|
1923
|
+
if (indirectMode === 'strict') {
|
1924
|
+
return typeSwitch(scope, getNodeType(scope, decl.callee), {
|
1925
|
+
[TYPES.function]: [
|
1926
|
+
...argWasm,
|
1927
|
+
[ global ? Opcodes.global_get : Opcodes.local_get, local.idx ],
|
1928
|
+
Opcodes.i32_to_u,
|
1929
|
+
[ Opcodes.call_indirect, args.length, 0 ],
|
1930
|
+
...setLastType(scope)
|
1931
|
+
],
|
1932
|
+
default: internalThrow(scope, 'TypeError', `${unhackName(name)} is not a function`, true)
|
1933
|
+
});
|
1934
|
+
}
|
1935
|
+
|
1936
|
+
// hi, I will now explain how vararg mode works:
|
1937
|
+
// wasm's indirect_call instruction requires you know the func type at compile-time
|
1938
|
+
// since we have varargs (variable argument count), we do not know it.
|
1939
|
+
// we could just store args in memory and not use wasm func args,
|
1940
|
+
// but that is slow (probably) and breaks js exports.
|
1941
|
+
// instead, we generate every* possibility of argc and use different indirect_call
|
1942
|
+
// ops for each one, with type depending on argc for that branch.
|
1943
|
+
// then we load the argc for the wanted function from a memory lut,
|
1944
|
+
// and call the branch with the matching argc we require.
|
1945
|
+
// sorry, yes it is very cursed (and size inefficient), but indirect calls
|
1946
|
+
// are kind of rare anyway (mostly callbacks) so I am not concerned atm.
|
1947
|
+
// *for argc 0-3, in future (todo:) the max number should be
|
1948
|
+
// dynamically changed to the max argc of any func in the js file.
|
1949
|
+
|
1950
|
+
const funcLocal = localTmp(scope, `#indirect_func`, Valtype.i32);
|
1951
|
+
|
1952
|
+
const gen = argc => {
|
1953
|
+
const out = [];
|
1954
|
+
for (let i = 0; i < argc; i++) {
|
1955
|
+
out.push(
|
1956
|
+
[ Opcodes.local_get, locals[i][0] ],
|
1957
|
+
[ Opcodes.local_get, locals[i][1] ]
|
1958
|
+
);
|
1880
1959
|
}
|
1881
1960
|
|
1882
|
-
|
1961
|
+
out.push(
|
1962
|
+
[ Opcodes.local_get, funcLocal ],
|
1963
|
+
[ Opcodes.call_indirect, argc, 0 ],
|
1964
|
+
...setLastType(scope)
|
1965
|
+
)
|
1966
|
+
|
1967
|
+
return out;
|
1968
|
+
};
|
1969
|
+
|
1970
|
+
const tableBc = {};
|
1971
|
+
for (let i = 0; i <= args.length; i++) {
|
1972
|
+
tableBc[i] = gen(i);
|
1883
1973
|
}
|
1884
1974
|
|
1975
|
+
// todo/perf: check if we should use br_table here or just generate our own big if..elses
|
1976
|
+
|
1885
1977
|
return typeSwitch(scope, getNodeType(scope, decl.callee), {
|
1886
1978
|
[TYPES.function]: [
|
1887
|
-
...
|
1979
|
+
...out,
|
1980
|
+
|
1888
1981
|
[ global ? Opcodes.global_get : Opcodes.local_get, local.idx ],
|
1889
1982
|
Opcodes.i32_to_u,
|
1890
|
-
[ Opcodes.
|
1891
|
-
|
1983
|
+
[ Opcodes.local_set, funcLocal ],
|
1984
|
+
|
1985
|
+
...brTable([
|
1986
|
+
// get argc of func we are calling
|
1987
|
+
[ Opcodes.local_get, funcLocal ],
|
1988
|
+
...number(ValtypeSize.i16, Valtype.i32),
|
1989
|
+
[ Opcodes.i32_mul ],
|
1990
|
+
|
1991
|
+
[ Opcodes.i32_load16_u, 0, ...unsignedLEB128(allocPage(scope, 'func argc lut') * pageSize), 'read_argc' ]
|
1992
|
+
], tableBc, valtypeBinary)
|
1892
1993
|
],
|
1893
1994
|
default: internalThrow(scope, 'TypeError', `${unhackName(name)} is not a function`, true)
|
1894
1995
|
});
|
@@ -2046,16 +2147,17 @@ const brTable = (input, bc, returns) => {
|
|
2046
2147
|
}
|
2047
2148
|
|
2048
2149
|
for (let i = 0; i < count; i++) {
|
2049
|
-
if (i === 0) out.push([ Opcodes.block, returns, 'br table start' ]);
|
2150
|
+
// if (i === 0) out.push([ Opcodes.block, returns, 'br table start' ]);
|
2151
|
+
if (i === 0) out.push([ Opcodes.block, returns ]);
|
2050
2152
|
else out.push([ Opcodes.block, Blocktype.void ]);
|
2051
2153
|
}
|
2052
2154
|
|
2053
|
-
const nums = keys.filter(x => +x);
|
2155
|
+
const nums = keys.filter(x => +x >= 0);
|
2054
2156
|
const offset = Math.min(...nums);
|
2055
2157
|
const max = Math.max(...nums);
|
2056
2158
|
|
2057
2159
|
const table = [];
|
2058
|
-
let br =
|
2160
|
+
let br = 0;
|
2059
2161
|
|
2060
2162
|
for (let i = offset; i <= max; i++) {
|
2061
2163
|
// if branch for this num, go to that block
|
@@ -2095,10 +2197,9 @@ const brTable = (input, bc, returns) => {
|
|
2095
2197
|
br--;
|
2096
2198
|
}
|
2097
2199
|
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
];
|
2200
|
+
out.push([ Opcodes.end ]);
|
2201
|
+
|
2202
|
+
return out;
|
2102
2203
|
};
|
2103
2204
|
|
2104
2205
|
const typeSwitch = (scope, type, bc, returns = valtypeBinary) => {
|
@@ -3043,14 +3144,18 @@ const generateThrow = (scope, decl) => {
|
|
3043
3144
|
};
|
3044
3145
|
|
3045
3146
|
const generateTry = (scope, decl) => {
|
3046
|
-
|
3147
|
+
// todo: handle control-flow pre-exit for finally
|
3148
|
+
// "Immediately before a control-flow statement (return, throw, break, continue) is executed in the try block or catch block."
|
3047
3149
|
|
3048
3150
|
const out = [];
|
3049
3151
|
|
3152
|
+
const finalizer = decl.finalizer ? generate(scope, decl.finalizer) : [];
|
3153
|
+
|
3050
3154
|
out.push([ Opcodes.try, Blocktype.void ]);
|
3051
3155
|
depth.push('try');
|
3052
3156
|
|
3053
3157
|
out.push(...generate(scope, decl.block));
|
3158
|
+
out.push(...finalizer);
|
3054
3159
|
|
3055
3160
|
if (decl.handler) {
|
3056
3161
|
depth.pop();
|
@@ -3058,6 +3163,7 @@ const generateTry = (scope, decl) => {
|
|
3058
3163
|
|
3059
3164
|
out.push([ Opcodes.catch_all ]);
|
3060
3165
|
out.push(...generate(scope, decl.handler.body));
|
3166
|
+
out.push(...finalizer);
|
3061
3167
|
}
|
3062
3168
|
|
3063
3169
|
out.push([ Opcodes.end ]);
|
@@ -3605,7 +3711,8 @@ const generateFunc = (scope, decl) => {
|
|
3605
3711
|
|
3606
3712
|
if (typedInput && decl.returnType) {
|
3607
3713
|
const { type } = extractTypeAnnotation(decl.returnType);
|
3608
|
-
if (type != null && !Prefs.indirectCalls) {
|
3714
|
+
// if (type != null && !Prefs.indirectCalls) {
|
3715
|
+
if (type != null) {
|
3609
3716
|
innerScope.returnType = type;
|
3610
3717
|
innerScope.returns = [ valtypeBinary ];
|
3611
3718
|
}
|
@@ -10,7 +10,7 @@ export const BuiltinFuncs = function() {
|
|
10
10
|
typedReturns: true,
|
11
11
|
locals: [127,127,127,127,127,127,127],
|
12
12
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
13
|
-
data: [{"offset":0,"bytes":[5,0,0,0,60,0,98,0,105,0,103,0,62,0]}]
|
13
|
+
data: [{"offset":0,"bytes":[5,0,0,0,60,0,98,0,105,0,103,0,62,0]}],
|
14
14
|
};
|
15
15
|
this.__ByteString_prototype_big = {
|
16
16
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __ByteString_prototype_big/out', 'i8') * pageSize, 127),[34,2],[65,5],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[32,4],[65,1],[106],[33,4],[45,0,4],[33,7],[32,3],[32,3],[65,1],[106],[33,3],[32,7],[58,0,4],[12,1],[11],[11],[32,3],[65,60],[58,0,4],[32,3],[65,47],[58,0,5],[32,3],[65,226,0],[58,0,6],[32,3],[65,233,0],[58,0,7],[32,3],[65,231,0],[58,0,8],[32,3],[65,62],[58,0,9],[32,2],[32,5],[65,11],[106],[34,8],[54,1,0],[32,2],[65,18],[15]],
|
@@ -20,7 +20,7 @@ export const BuiltinFuncs = function() {
|
|
20
20
|
typedReturns: true,
|
21
21
|
locals: [127,127,127,127,127,127,127],
|
22
22
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
23
|
-
data: [{"offset":0,"bytes":[5,0,0,0,60,98,105,103,62]}]
|
23
|
+
data: [{"offset":0,"bytes":[5,0,0,0,60,98,105,103,62]}],
|
24
24
|
};
|
25
25
|
this.__String_prototype_blink = {
|
26
26
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'string: __String_prototype_blink/out', 'i16') * pageSize, 127),[34,2],[65,14],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[65,2],[108],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[47,0,4],[33,7],[32,3],[32,7],[59,0,4],[32,4],[65,2],[106],[33,4],[32,3],[65,2],[106],[33,3],[12,1],[11],[11],[32,3],[65,60],[59,0,4],[32,3],[65,47],[59,0,6],[32,3],[65,226,0],[59,0,8],[32,3],[65,236,0],[59,0,10],[32,3],[65,233,0],[59,0,12],[32,3],[65,238,0],[59,0,14],[32,3],[65,235,0],[59,0,16],[32,3],[65,62],[59,0,18],[32,2],[32,5],[65,15],[106],[34,8],[54,1,0],[32,2],[65,2],[15]],
|
@@ -30,7 +30,7 @@ export const BuiltinFuncs = function() {
|
|
30
30
|
typedReturns: true,
|
31
31
|
locals: [127,127,127,127,127,127,127],
|
32
32
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
33
|
-
data: [{"offset":0,"bytes":[7,0,0,0,60,0,98,0,108,0,105,0,110,0,107,0,62,0]}]
|
33
|
+
data: [{"offset":0,"bytes":[7,0,0,0,60,0,98,0,108,0,105,0,110,0,107,0,62,0]}],
|
34
34
|
};
|
35
35
|
this.__ByteString_prototype_blink = {
|
36
36
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __ByteString_prototype_blink/out', 'i8') * pageSize, 127),[34,2],[65,7],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[32,4],[65,1],[106],[33,4],[45,0,4],[33,7],[32,3],[32,3],[65,1],[106],[33,3],[32,7],[58,0,4],[12,1],[11],[11],[32,3],[65,60],[58,0,4],[32,3],[65,47],[58,0,5],[32,3],[65,226,0],[58,0,6],[32,3],[65,236,0],[58,0,7],[32,3],[65,233,0],[58,0,8],[32,3],[65,238,0],[58,0,9],[32,3],[65,235,0],[58,0,10],[32,3],[65,62],[58,0,11],[32,2],[32,5],[65,15],[106],[34,8],[54,1,0],[32,2],[65,18],[15]],
|
@@ -40,7 +40,7 @@ export const BuiltinFuncs = function() {
|
|
40
40
|
typedReturns: true,
|
41
41
|
locals: [127,127,127,127,127,127,127],
|
42
42
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
43
|
-
data: [{"offset":0,"bytes":[7,0,0,0,60,98,108,105,110,107,62]}]
|
43
|
+
data: [{"offset":0,"bytes":[7,0,0,0,60,98,108,105,110,107,62]}],
|
44
44
|
};
|
45
45
|
this.__String_prototype_bold = {
|
46
46
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'string: __String_prototype_bold/out', 'i16') * pageSize, 127),[34,2],[65,6],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[65,2],[108],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[47,0,4],[33,7],[32,3],[32,7],[59,0,4],[32,4],[65,2],[106],[33,4],[32,3],[65,2],[106],[33,3],[12,1],[11],[11],[32,3],[65,60],[59,0,4],[32,3],[65,47],[59,0,6],[32,3],[65,226,0],[59,0,8],[32,3],[65,62],[59,0,10],[32,2],[32,5],[65,7],[106],[34,8],[54,1,0],[32,2],[65,2],[15]],
|
@@ -50,7 +50,7 @@ export const BuiltinFuncs = function() {
|
|
50
50
|
typedReturns: true,
|
51
51
|
locals: [127,127,127,127,127,127,127],
|
52
52
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
53
|
-
data: [{"offset":0,"bytes":[3,0,0,0,60,0,98,0,62,0]}]
|
53
|
+
data: [{"offset":0,"bytes":[3,0,0,0,60,0,98,0,62,0]}],
|
54
54
|
};
|
55
55
|
this.__ByteString_prototype_bold = {
|
56
56
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __ByteString_prototype_bold/out', 'i8') * pageSize, 127),[34,2],[65,3],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[32,4],[65,1],[106],[33,4],[45,0,4],[33,7],[32,3],[32,3],[65,1],[106],[33,3],[32,7],[58,0,4],[12,1],[11],[11],[32,3],[65,60],[58,0,4],[32,3],[65,47],[58,0,5],[32,3],[65,226,0],[58,0,6],[32,3],[65,62],[58,0,7],[32,2],[32,5],[65,7],[106],[34,8],[54,1,0],[32,2],[65,18],[15]],
|
@@ -60,7 +60,7 @@ export const BuiltinFuncs = function() {
|
|
60
60
|
typedReturns: true,
|
61
61
|
locals: [127,127,127,127,127,127,127],
|
62
62
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
63
|
-
data: [{"offset":0,"bytes":[3,0,0,0,60,98,62]}]
|
63
|
+
data: [{"offset":0,"bytes":[3,0,0,0,60,98,62]}],
|
64
64
|
};
|
65
65
|
this.__String_prototype_fixed = {
|
66
66
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'string: __String_prototype_fixed/out', 'i16') * pageSize, 127),[34,2],[65,8],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[65,2],[108],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[47,0,4],[33,7],[32,3],[32,7],[59,0,4],[32,4],[65,2],[106],[33,4],[32,3],[65,2],[106],[33,3],[12,1],[11],[11],[32,3],[65,60],[59,0,4],[32,3],[65,47],[59,0,6],[32,3],[65,244,0],[59,0,8],[32,3],[65,244,0],[59,0,10],[32,3],[65,62],[59,0,12],[32,2],[32,5],[65,9],[106],[34,8],[54,1,0],[32,2],[65,2],[15]],
|
@@ -70,7 +70,7 @@ export const BuiltinFuncs = function() {
|
|
70
70
|
typedReturns: true,
|
71
71
|
locals: [127,127,127,127,127,127,127],
|
72
72
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
73
|
-
data: [{"offset":0,"bytes":[4,0,0,0,60,0,116,0,116,0,62,0]}]
|
73
|
+
data: [{"offset":0,"bytes":[4,0,0,0,60,0,116,0,116,0,62,0]}],
|
74
74
|
};
|
75
75
|
this.__ByteString_prototype_fixed = {
|
76
76
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __ByteString_prototype_fixed/out', 'i8') * pageSize, 127),[34,2],[65,4],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[32,4],[65,1],[106],[33,4],[45,0,4],[33,7],[32,3],[32,3],[65,1],[106],[33,3],[32,7],[58,0,4],[12,1],[11],[11],[32,3],[65,60],[58,0,4],[32,3],[65,47],[58,0,5],[32,3],[65,244,0],[58,0,6],[32,3],[65,244,0],[58,0,7],[32,3],[65,62],[58,0,8],[32,2],[32,5],[65,9],[106],[34,8],[54,1,0],[32,2],[65,18],[15]],
|
@@ -80,7 +80,7 @@ export const BuiltinFuncs = function() {
|
|
80
80
|
typedReturns: true,
|
81
81
|
locals: [127,127,127,127,127,127,127],
|
82
82
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
83
|
-
data: [{"offset":0,"bytes":[4,0,0,0,60,116,116,62]}]
|
83
|
+
data: [{"offset":0,"bytes":[4,0,0,0,60,116,116,62]}],
|
84
84
|
};
|
85
85
|
this.__String_prototype_italics = {
|
86
86
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'string: __String_prototype_italics/out', 'i16') * pageSize, 127),[34,2],[65,6],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[65,2],[108],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[47,0,4],[33,7],[32,3],[32,7],[59,0,4],[32,4],[65,2],[106],[33,4],[32,3],[65,2],[106],[33,3],[12,1],[11],[11],[32,3],[65,60],[59,0,4],[32,3],[65,47],[59,0,6],[32,3],[65,233,0],[59,0,8],[32,3],[65,62],[59,0,10],[32,2],[32,5],[65,7],[106],[34,8],[54,1,0],[32,2],[65,2],[15]],
|
@@ -90,7 +90,7 @@ export const BuiltinFuncs = function() {
|
|
90
90
|
typedReturns: true,
|
91
91
|
locals: [127,127,127,127,127,127,127],
|
92
92
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
93
|
-
data: [{"offset":0,"bytes":[3,0,0,0,60,0,105,0,62,0]}]
|
93
|
+
data: [{"offset":0,"bytes":[3,0,0,0,60,0,105,0,62,0]}],
|
94
94
|
};
|
95
95
|
this.__ByteString_prototype_italics = {
|
96
96
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __ByteString_prototype_italics/out', 'i8') * pageSize, 127),[34,2],[65,3],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[32,4],[65,1],[106],[33,4],[45,0,4],[33,7],[32,3],[32,3],[65,1],[106],[33,3],[32,7],[58,0,4],[12,1],[11],[11],[32,3],[65,60],[58,0,4],[32,3],[65,47],[58,0,5],[32,3],[65,233,0],[58,0,6],[32,3],[65,62],[58,0,7],[32,2],[32,5],[65,7],[106],[34,8],[54,1,0],[32,2],[65,18],[15]],
|
@@ -100,7 +100,7 @@ export const BuiltinFuncs = function() {
|
|
100
100
|
typedReturns: true,
|
101
101
|
locals: [127,127,127,127,127,127,127],
|
102
102
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
103
|
-
data: [{"offset":0,"bytes":[3,0,0,0,60,105,62]}]
|
103
|
+
data: [{"offset":0,"bytes":[3,0,0,0,60,105,62]}],
|
104
104
|
};
|
105
105
|
this.__String_prototype_small = {
|
106
106
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'string: __String_prototype_small/out', 'i16') * pageSize, 127),[34,2],[65,14],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[65,2],[108],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[47,0,4],[33,7],[32,3],[32,7],[59,0,4],[32,4],[65,2],[106],[33,4],[32,3],[65,2],[106],[33,3],[12,1],[11],[11],[32,3],[65,60],[59,0,4],[32,3],[65,47],[59,0,6],[32,3],[65,243,0],[59,0,8],[32,3],[65,237,0],[59,0,10],[32,3],[65,225,0],[59,0,12],[32,3],[65,236,0],[59,0,14],[32,3],[65,236,0],[59,0,16],[32,3],[65,62],[59,0,18],[32,2],[32,5],[65,15],[106],[34,8],[54,1,0],[32,2],[65,2],[15]],
|
@@ -110,7 +110,7 @@ export const BuiltinFuncs = function() {
|
|
110
110
|
typedReturns: true,
|
111
111
|
locals: [127,127,127,127,127,127,127],
|
112
112
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
113
|
-
data: [{"offset":0,"bytes":[7,0,0,0,60,0,115,0,109,0,97,0,108,0,108,0,62,0]}]
|
113
|
+
data: [{"offset":0,"bytes":[7,0,0,0,60,0,115,0,109,0,97,0,108,0,108,0,62,0]}],
|
114
114
|
};
|
115
115
|
this.__ByteString_prototype_small = {
|
116
116
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __ByteString_prototype_small/out', 'i8') * pageSize, 127),[34,2],[65,7],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[32,4],[65,1],[106],[33,4],[45,0,4],[33,7],[32,3],[32,3],[65,1],[106],[33,3],[32,7],[58,0,4],[12,1],[11],[11],[32,3],[65,60],[58,0,4],[32,3],[65,47],[58,0,5],[32,3],[65,243,0],[58,0,6],[32,3],[65,237,0],[58,0,7],[32,3],[65,225,0],[58,0,8],[32,3],[65,236,0],[58,0,9],[32,3],[65,236,0],[58,0,10],[32,3],[65,62],[58,0,11],[32,2],[32,5],[65,15],[106],[34,8],[54,1,0],[32,2],[65,18],[15]],
|
@@ -120,7 +120,7 @@ export const BuiltinFuncs = function() {
|
|
120
120
|
typedReturns: true,
|
121
121
|
locals: [127,127,127,127,127,127,127],
|
122
122
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
123
|
-
data: [{"offset":0,"bytes":[7,0,0,0,60,115,109,97,108,108,62]}]
|
123
|
+
data: [{"offset":0,"bytes":[7,0,0,0,60,115,109,97,108,108,62]}],
|
124
124
|
};
|
125
125
|
this.__String_prototype_strike = {
|
126
126
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'string: __String_prototype_strike/out', 'i16') * pageSize, 127),[34,2],[65,16],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[65,2],[108],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[47,0,4],[33,7],[32,3],[32,7],[59,0,4],[32,4],[65,2],[106],[33,4],[32,3],[65,2],[106],[33,3],[12,1],[11],[11],[32,3],[65,60],[59,0,4],[32,3],[65,47],[59,0,6],[32,3],[65,243,0],[59,0,8],[32,3],[65,244,0],[59,0,10],[32,3],[65,242,0],[59,0,12],[32,3],[65,233,0],[59,0,14],[32,3],[65,235,0],[59,0,16],[32,3],[65,229,0],[59,0,18],[32,3],[65,62],[59,0,20],[32,2],[32,5],[65,17],[106],[34,8],[54,1,0],[32,2],[65,2],[15]],
|
@@ -130,7 +130,7 @@ export const BuiltinFuncs = function() {
|
|
130
130
|
typedReturns: true,
|
131
131
|
locals: [127,127,127,127,127,127,127],
|
132
132
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
133
|
-
data: [{"offset":0,"bytes":[8,0,0,0,60,0,115,0,116,0,114,0,105,0,107,0,101,0,62,0]}]
|
133
|
+
data: [{"offset":0,"bytes":[8,0,0,0,60,0,115,0,116,0,114,0,105,0,107,0,101,0,62,0]}],
|
134
134
|
};
|
135
135
|
this.__ByteString_prototype_strike = {
|
136
136
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __ByteString_prototype_strike/out', 'i8') * pageSize, 127),[34,2],[65,8],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[32,4],[65,1],[106],[33,4],[45,0,4],[33,7],[32,3],[32,3],[65,1],[106],[33,3],[32,7],[58,0,4],[12,1],[11],[11],[32,3],[65,60],[58,0,4],[32,3],[65,47],[58,0,5],[32,3],[65,243,0],[58,0,6],[32,3],[65,244,0],[58,0,7],[32,3],[65,242,0],[58,0,8],[32,3],[65,233,0],[58,0,9],[32,3],[65,235,0],[58,0,10],[32,3],[65,229,0],[58,0,11],[32,3],[65,62],[58,0,12],[32,2],[32,5],[65,17],[106],[34,8],[54,1,0],[32,2],[65,18],[15]],
|
@@ -140,7 +140,7 @@ export const BuiltinFuncs = function() {
|
|
140
140
|
typedReturns: true,
|
141
141
|
locals: [127,127,127,127,127,127,127],
|
142
142
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
143
|
-
data: [{"offset":0,"bytes":[8,0,0,0,60,115,116,114,105,107,101,62]}]
|
143
|
+
data: [{"offset":0,"bytes":[8,0,0,0,60,115,116,114,105,107,101,62]}],
|
144
144
|
};
|
145
145
|
this.__String_prototype_sub = {
|
146
146
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'string: __String_prototype_sub/out', 'i16') * pageSize, 127),[34,2],[65,10],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[65,2],[108],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[47,0,4],[33,7],[32,3],[32,7],[59,0,4],[32,4],[65,2],[106],[33,4],[32,3],[65,2],[106],[33,3],[12,1],[11],[11],[32,3],[65,60],[59,0,4],[32,3],[65,47],[59,0,6],[32,3],[65,243,0],[59,0,8],[32,3],[65,245,0],[59,0,10],[32,3],[65,226,0],[59,0,12],[32,3],[65,62],[59,0,14],[32,2],[32,5],[65,11],[106],[34,8],[54,1,0],[32,2],[65,2],[15]],
|
@@ -150,7 +150,7 @@ export const BuiltinFuncs = function() {
|
|
150
150
|
typedReturns: true,
|
151
151
|
locals: [127,127,127,127,127,127,127],
|
152
152
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
153
|
-
data: [{"offset":0,"bytes":[5,0,0,0,60,0,115,0,117,0,98,0,62,0]}]
|
153
|
+
data: [{"offset":0,"bytes":[5,0,0,0,60,0,115,0,117,0,98,0,62,0]}],
|
154
154
|
};
|
155
155
|
this.__ByteString_prototype_sub = {
|
156
156
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __ByteString_prototype_sub/out', 'i8') * pageSize, 127),[34,2],[65,5],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[32,4],[65,1],[106],[33,4],[45,0,4],[33,7],[32,3],[32,3],[65,1],[106],[33,3],[32,7],[58,0,4],[12,1],[11],[11],[32,3],[65,60],[58,0,4],[32,3],[65,47],[58,0,5],[32,3],[65,243,0],[58,0,6],[32,3],[65,245,0],[58,0,7],[32,3],[65,226,0],[58,0,8],[32,3],[65,62],[58,0,9],[32,2],[32,5],[65,11],[106],[34,8],[54,1,0],[32,2],[65,18],[15]],
|
@@ -160,7 +160,7 @@ export const BuiltinFuncs = function() {
|
|
160
160
|
typedReturns: true,
|
161
161
|
locals: [127,127,127,127,127,127,127],
|
162
162
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
163
|
-
data: [{"offset":0,"bytes":[5,0,0,0,60,115,117,98,62]}]
|
163
|
+
data: [{"offset":0,"bytes":[5,0,0,0,60,115,117,98,62]}],
|
164
164
|
};
|
165
165
|
this.__String_prototype_sup = {
|
166
166
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'string: __String_prototype_sup/out', 'i16') * pageSize, 127),[34,2],[65,10],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[65,2],[108],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[47,0,4],[33,7],[32,3],[32,7],[59,0,4],[32,4],[65,2],[106],[33,4],[32,3],[65,2],[106],[33,3],[12,1],[11],[11],[32,3],[65,60],[59,0,4],[32,3],[65,47],[59,0,6],[32,3],[65,243,0],[59,0,8],[32,3],[65,245,0],[59,0,10],[32,3],[65,240,0],[59,0,12],[32,3],[65,62],[59,0,14],[32,2],[32,5],[65,11],[106],[34,8],[54,1,0],[32,2],[65,2],[15]],
|
@@ -170,7 +170,7 @@ export const BuiltinFuncs = function() {
|
|
170
170
|
typedReturns: true,
|
171
171
|
locals: [127,127,127,127,127,127,127],
|
172
172
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
173
|
-
data: [{"offset":0,"bytes":[5,0,0,0,60,0,115,0,117,0,112,0,62,0]}]
|
173
|
+
data: [{"offset":0,"bytes":[5,0,0,0,60,0,115,0,117,0,112,0,62,0]}],
|
174
174
|
};
|
175
175
|
this.__ByteString_prototype_sup = {
|
176
176
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __ByteString_prototype_sup/out', 'i8') * pageSize, 127),[34,2],[65,5],[106],[33,3],[32,0],[33,4],[32,0],[40,1,0],[33,5],[32,4],[32,5],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[32,4],[65,1],[106],[33,4],[45,0,4],[33,7],[32,3],[32,3],[65,1],[106],[33,3],[32,7],[58,0,4],[12,1],[11],[11],[32,3],[65,60],[58,0,4],[32,3],[65,47],[58,0,5],[32,3],[65,243,0],[58,0,6],[32,3],[65,245,0],[58,0,7],[32,3],[65,240,0],[58,0,8],[32,3],[65,62],[58,0,9],[32,2],[32,5],[65,11],[106],[34,8],[54,1,0],[32,2],[65,18],[15]],
|
@@ -180,7 +180,7 @@ export const BuiltinFuncs = function() {
|
|
180
180
|
typedReturns: true,
|
181
181
|
locals: [127,127,127,127,127,127,127],
|
182
182
|
localNames: ["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp"],
|
183
|
-
data: [{"offset":0,"bytes":[5,0,0,0,60,115,117,112,62]}]
|
183
|
+
data: [{"offset":0,"bytes":[5,0,0,0,60,115,117,112,62]}],
|
184
184
|
};
|
185
185
|
this.__String_prototype_trimLeft = {
|
186
186
|
wasm: (scope, {builtin,}) => [[32,0],[65,2],[16, builtin('__String_prototype_trimStart')],[34,2],[15]],
|
@@ -299,6 +299,86 @@ export const BuiltinFuncs = function() {
|
|
299
299
|
locals: [],
|
300
300
|
localNames: ["_this","_this#type"],
|
301
301
|
};
|
302
|
+
this.__Array_prototype_forEach = {
|
303
|
+
wasm: (scope, {internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,3],[33,15],[2,124],[32,15],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,5],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,6],[43,0,4],[32,6],[45,0,12],[33,7],[65,0],[33,8],[33,9],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[32,7],[33,10],[33,11],[32,0],[65,16],[33,12],[33,13],[32,2],[252,3],[33,14],[2,124],[2,64],[2,64],[2,64],[2,64],[32,14],[65,2],[108],[47,0,128,128,12,"read_argc"],[14,4,0,1,2,3,0],[11],[32,14],[17,0,0],[33,7],[12,3],[11],[32,9],[32,8],[32,14],[17,1,0],[33,7],[12,2],[11],[32,9],[32,8],[32,11],[32,10],[32,14],[17,2,0],[33,7],[12,1],[11],[32,9],[32,8],[32,11],[32,10],[32,13],[32,12],[32,14],[17,3,0],[33,7],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[26],[12,1],[11],[11],[68,0,0,0,0,0,0,0,0],[65,3],[15]],
|
304
|
+
params: [124,127,124,127],
|
305
|
+
typedParams: true,
|
306
|
+
returns: [124,127],
|
307
|
+
typedReturns: true,
|
308
|
+
locals: [124,124,127,127,127,124,127,124,127,124,127,127],
|
309
|
+
localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","#loadArray_offset","#last_type","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#typeswitch_tmp"],
|
310
|
+
table: true
|
311
|
+
};
|
312
|
+
this.__Array_prototype_filter = {
|
313
|
+
wasm: (scope, {allocPage,internalThrow,}) => [...number(allocPage(scope, 'array: __Array_prototype_filter/out', 'f64') * pageSize, 124),[34,4],[252,3],[34,5],[65,0],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,6],[68,0,0,0,0,0,0,0,0],[33,7],[3,64],[32,7],[32,6],[99],[4,64],[32,7],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,10],[43,0,4],[32,10],[45,0,12],[33,11],[33,8],[65,0],[33,9],[32,3],[33,19],[2,124],[32,19],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,8],[32,9],[33,12],[33,13],[32,7],[32,7],[68,0,0,0,0,0,0,240,63],[160],[33,7],[32,11],[33,14],[33,15],[32,0],[65,16],[33,16],[33,17],[32,2],[252,3],[33,18],[2,124],[2,64],[2,64],[2,64],[2,64],[32,18],[65,2],[108],[47,0,128,128,12,"read_argc"],[14,4,0,1,2,3,0],[11],[32,18],[17,0,0],[33,11],[12,3],[11],[32,13],[32,12],[32,18],[17,1,0],[33,11],[12,2],[11],[32,13],[32,12],[32,15],[32,14],[32,18],[17,2,0],[33,11],[12,1],[11],[32,13],[32,12],[32,15],[32,14],[32,17],[32,16],[32,18],[17,3,0],[33,11],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,20],[32,11],[33,19],[2,127],[32,19],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,20],[252,3],[40,1,0],[12,1],[11],[32,19],[65,16],[70],[4,64,"TYPESWITCH|Array"],[65,1],[12,1],[11],[32,19],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,20],[252,3],[40,1,0],[12,1],[11],[32,20],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,4],[252,3],[34,22],[40,1,0],[34,21],[65,9],[108],[32,22],[106],[34,23],[32,8],[57,0,4],[32,23],[32,9],[58,0,12],[32,22],[32,21],[65,1],[106],[54,1,0],[11],[12,1],[11],[11],[32,4],[65,16],[15]],
|
314
|
+
params: [124,127,124,127],
|
315
|
+
typedParams: true,
|
316
|
+
returns: [124,127],
|
317
|
+
typedReturns: true,
|
318
|
+
locals: [124,127,124,124,124,127,127,127,127,124,127,124,127,124,127,127,124,127,127,127],
|
319
|
+
localNames: ["_this","_this#type","callbackFn","callbackFn#type","out","#makearray_pointer_tmp","len","i","el","el#type","#loadArray_offset","#last_type","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#typeswitch_tmp","#logicinner_tmp","__proto_length_cache","__proto_pointer_cache","__push_tmp"],
|
320
|
+
table: true
|
321
|
+
};
|
322
|
+
this.__Array_prototype_map = {
|
323
|
+
wasm: (scope, {allocPage,internalThrow,}) => [...number(allocPage(scope, 'array: __Array_prototype_map/out', 'f64') * pageSize, 124),[34,4],[252,3],[34,5],[65,0],[54,1,0],[32,0],[252,3],[40,1,0],[184],[33,6],[68,0,0,0,0,0,0,0,0],[33,7],[3,64],[32,7],[32,6],[99],[4,64],[32,4],[252,3],[34,9],[40,1,0],[33,8],[2,64],[32,8],[65,9],[108],[32,9],[106],[34,10],[32,3],[33,20],[2,124],[32,20],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,7],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,11],[43,0,4],[32,11],[45,0,12],[33,12],[65,0],[33,13],[33,14],[32,7],[32,7],[68,0,0,0,0,0,0,240,63],[160],[33,7],[32,12],[33,15],[33,16],[32,0],[65,16],[33,17],[33,18],[32,2],[252,3],[33,19],[2,124],[2,64],[2,64],[2,64],[2,64],[32,19],[65,2],[108],[47,0,128,128,12,"read_argc"],[14,4,0,1,2,3,0],[11],[32,19],[17,0,0],[33,12],[12,3],[11],[32,14],[32,13],[32,19],[17,1,0],[33,12],[12,2],[11],[32,14],[32,13],[32,16],[32,15],[32,19],[17,2,0],[33,12],[12,1],[11],[32,14],[32,13],[32,16],[32,15],[32,18],[32,17],[32,19],[17,3,0],[33,12],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[57,0,4],[32,10],[32,12],[58,0,12],[32,9],[32,8],[65,1],[106],[54,1,0],[11],[12,1],[11],[11],[32,4],[65,16],[15]],
|
324
|
+
params: [124,127,124,127],
|
325
|
+
typedParams: true,
|
326
|
+
returns: [124,127],
|
327
|
+
typedReturns: true,
|
328
|
+
locals: [124,127,124,124,127,127,127,127,127,127,124,127,124,127,124,127,127],
|
329
|
+
localNames: ["_this","_this#type","callbackFn","callbackFn#type","out","#makearray_pointer_tmp","len","i","__proto_length_cache","__proto_pointer_cache","__push_tmp","#loadArray_offset","#last_type","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#typeswitch_tmp"],
|
330
|
+
table: true
|
331
|
+
};
|
332
|
+
this.__Array_prototype_find = {
|
333
|
+
wasm: (scope, {internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,5],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,8],[43,0,4],[32,8],[45,0,12],[33,9],[33,6],[65,0],[33,7],[32,3],[33,17],[2,124],[32,17],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,6],[32,7],[33,10],[33,11],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[32,9],[33,12],[33,13],[32,0],[65,16],[33,14],[33,15],[32,2],[252,3],[33,16],[2,124],[2,64],[2,64],[2,64],[2,64],[32,16],[65,2],[108],[47,0,128,128,12,"read_argc"],[14,4,0,1,2,3,0],[11],[32,16],[17,0,0],[33,9],[12,3],[11],[32,11],[32,10],[32,16],[17,1,0],[33,9],[12,2],[11],[32,11],[32,10],[32,13],[32,12],[32,16],[17,2,0],[33,9],[12,1],[11],[32,11],[32,10],[32,13],[32,12],[32,15],[32,14],[32,16],[17,3,0],[33,9],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,18],[32,9],[33,17],[2,127],[32,17],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,18],[252,3],[40,1,0],[12,1],[11],[32,17],[65,16],[70],[4,64,"TYPESWITCH|Array"],[65,1],[12,1],[11],[32,17],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,18],[252,3],[40,1,0],[12,1],[11],[32,18],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,6],[32,7],[15],[11],[12,1],[11],[11],[68,0,0,0,0,0,0,0,0],[65,3],[15]],
|
334
|
+
params: [124,127,124,127],
|
335
|
+
typedParams: true,
|
336
|
+
returns: [124,127],
|
337
|
+
typedReturns: true,
|
338
|
+
locals: [124,124,124,127,127,127,127,124,127,124,127,124,127,127,124],
|
339
|
+
localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","el","el#type","#loadArray_offset","#last_type","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#typeswitch_tmp","#logicinner_tmp"],
|
340
|
+
table: true
|
341
|
+
};
|
342
|
+
this.__Array_prototype_findLast = {
|
343
|
+
wasm: (scope, {internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[3,64],[32,4],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,4],[68,0,0,0,0,0,0,240,63],[161],[34,4],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,7],[43,0,4],[32,7],[45,0,12],[33,8],[33,5],[65,0],[33,6],[32,3],[33,16],[2,124],[32,16],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,5],[32,6],[33,9],[33,10],[32,4],[65,0],[33,11],[33,12],[32,0],[65,16],[33,13],[33,14],[32,2],[252,3],[33,15],[2,124],[2,64],[2,64],[2,64],[2,64],[32,15],[65,2],[108],[47,0,128,128,12,"read_argc"],[14,4,0,1,2,3,0],[11],[32,15],[17,0,0],[33,8],[12,3],[11],[32,10],[32,9],[32,15],[17,1,0],[33,8],[12,2],[11],[32,10],[32,9],[32,12],[32,11],[32,15],[17,2,0],[33,8],[12,1],[11],[32,10],[32,9],[32,12],[32,11],[32,14],[32,13],[32,15],[17,3,0],[33,8],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,17],[32,8],[33,16],[2,127],[32,16],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,17],[252,3],[40,1,0],[12,1],[11],[32,16],[65,16],[70],[4,64,"TYPESWITCH|Array"],[65,1],[12,1],[11],[32,16],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,17],[252,3],[40,1,0],[12,1],[11],[32,17],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,5],[32,6],[15],[11],[12,1],[11],[11],[68,0,0,0,0,0,0,0,0],[65,3],[15]],
|
344
|
+
params: [124,127,124,127],
|
345
|
+
typedParams: true,
|
346
|
+
returns: [124,127],
|
347
|
+
typedReturns: true,
|
348
|
+
locals: [124,124,127,127,127,127,124,127,124,127,124,127,127,124],
|
349
|
+
localNames: ["_this","_this#type","callbackFn","callbackFn#type","i","el","el#type","#loadArray_offset","#last_type","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#typeswitch_tmp","#logicinner_tmp"],
|
350
|
+
table: true
|
351
|
+
};
|
352
|
+
this.__Array_prototype_findIndex = {
|
353
|
+
wasm: (scope, {internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,3],[33,15],[2,124],[32,15],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,5],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,6],[43,0,4],[32,6],[45,0,12],[33,7],[65,0],[33,8],[33,9],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[32,7],[33,10],[33,11],[32,0],[65,16],[33,12],[33,13],[32,2],[252,3],[33,14],[2,124],[2,64],[2,64],[2,64],[2,64],[32,14],[65,2],[108],[47,0,128,128,12,"read_argc"],[14,4,0,1,2,3,0],[11],[32,14],[17,0,0],[33,7],[12,3],[11],[32,9],[32,8],[32,14],[17,1,0],[33,7],[12,2],[11],[32,9],[32,8],[32,11],[32,10],[32,14],[17,2,0],[33,7],[12,1],[11],[32,9],[32,8],[32,11],[32,10],[32,13],[32,12],[32,14],[17,3,0],[33,7],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,16],[32,7],[33,15],[2,127],[32,15],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,16],[252,3],[40,1,0],[12,1],[11],[32,15],[65,16],[70],[4,64,"TYPESWITCH|Array"],[65,1],[12,1],[11],[32,15],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,16],[252,3],[40,1,0],[12,1],[11],[32,16],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,5],[65,0],[15],[11],[12,1],[11],[11],[68,0,0,0,0,0,0,0,0],[65,3],[15]],
|
354
|
+
params: [124,127,124,127],
|
355
|
+
typedParams: true,
|
356
|
+
returns: [124,127],
|
357
|
+
typedReturns: true,
|
358
|
+
locals: [124,124,127,127,127,124,127,124,127,124,127,127,124],
|
359
|
+
localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","#loadArray_offset","#last_type","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#typeswitch_tmp","#logicinner_tmp"],
|
360
|
+
table: true
|
361
|
+
};
|
362
|
+
this.__Array_prototype_findLastIndex = {
|
363
|
+
wasm: (scope, {internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[3,64],[32,4],[68,0,0,0,0,0,0,0,0],[100],[4,64],[32,3],[33,14],[2,124],[32,14],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,4],[68,0,0,0,0,0,0,240,63],[161],[34,4],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,5],[43,0,4],[32,5],[45,0,12],[33,6],[65,0],[33,7],[33,8],[32,4],[65,0],[33,9],[33,10],[32,0],[65,16],[33,11],[33,12],[32,2],[252,3],[33,13],[2,124],[2,64],[2,64],[2,64],[2,64],[32,13],[65,2],[108],[47,0,128,128,12,"read_argc"],[14,4,0,1,2,3,0],[11],[32,13],[17,0,0],[33,6],[12,3],[11],[32,8],[32,7],[32,13],[17,1,0],[33,6],[12,2],[11],[32,8],[32,7],[32,10],[32,9],[32,13],[17,2,0],[33,6],[12,1],[11],[32,8],[32,7],[32,10],[32,9],[32,12],[32,11],[32,13],[17,3,0],[33,6],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,15],[32,6],[33,14],[2,127],[32,14],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,15],[252,3],[40,1,0],[12,1],[11],[32,14],[65,16],[70],[4,64,"TYPESWITCH|Array"],[65,1],[12,1],[11],[32,14],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,15],[252,3],[40,1,0],[12,1],[11],[32,15],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,4],[65,0],[15],[11],[12,1],[11],[11],[68,0,0,0,0,0,0,0,0],[65,3],[15]],
|
364
|
+
params: [124,127,124,127],
|
365
|
+
typedParams: true,
|
366
|
+
returns: [124,127],
|
367
|
+
typedReturns: true,
|
368
|
+
locals: [124,127,127,127,124,127,124,127,124,127,127,124],
|
369
|
+
localNames: ["_this","_this#type","callbackFn","callbackFn#type","i","#loadArray_offset","#last_type","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#typeswitch_tmp","#logicinner_tmp"],
|
370
|
+
table: true
|
371
|
+
};
|
372
|
+
this.__Array_prototype_every = {
|
373
|
+
wasm: (scope, {internalThrow,}) => [[32,0],[252,3],[40,1,0],[184],[33,4],[68,0,0,0,0,0,0,0,0],[33,5],[3,64],[32,5],[32,4],[99],[4,64],[32,3],[33,15],[2,124],[32,15],[65,5],[70],[4,64,"TYPESWITCH|Function"],[32,5],[252,3],[65,9],[108],[32,0],[252,3],[106],[34,6],[43,0,4],[32,6],[45,0,12],[33,7],[65,0],[33,8],[33,9],[32,5],[32,5],[68,0,0,0,0,0,0,240,63],[160],[33,5],[32,7],[33,10],[33,11],[32,0],[65,16],[33,12],[33,13],[32,2],[252,3],[33,14],[2,124],[2,64],[2,64],[2,64],[2,64],[32,14],[65,2],[108],[47,0,128,128,12,"read_argc"],[14,4,0,1,2,3,0],[11],[32,14],[17,0,0],[33,7],[12,3],[11],[32,9],[32,8],[32,14],[17,1,0],[33,7],[12,2],[11],[32,9],[32,8],[32,11],[32,10],[32,14],[17,2,0],[33,7],[12,1],[11],[32,9],[32,8],[32,11],[32,10],[32,13],[32,12],[32,14],[17,3,0],[33,7],[11],[12,1],[11],...internalThrow(scope, 'TypeError', `callbackFn is not a function`),[68,0,0,0,0,0,0,0,0],[11,"TYPESWITCH_end"],[33,16],[32,7],[33,15],[2,124],[32,15],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,16],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,15],[65,16],[70],[4,64,"TYPESWITCH|Array"],[68,0,0,0,0,0,0,0,0],[12,1],[11],[32,15],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,16],[252,3],[40,1,0],[69],[184],[12,1],[11],[32,16],[68,0,0,0,0,0,0,0,0],[97],[184],[11,"TYPESWITCH_end"],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[65,1],[15],[11],[12,1],[11],[11],[68,0,0,0,0,0,0,240,63],[65,1],[15]],
|
374
|
+
params: [124,127,124,127],
|
375
|
+
typedParams: true,
|
376
|
+
returns: [124,127],
|
377
|
+
typedReturns: true,
|
378
|
+
locals: [124,124,127,127,127,124,127,124,127,124,127,127,124],
|
379
|
+
localNames: ["_this","_this#type","callbackFn","callbackFn#type","len","i","#loadArray_offset","#last_type","#indirect_arg0_type","#indirect_arg0_val","#indirect_arg1_type","#indirect_arg1_val","#indirect_arg2_type","#indirect_arg2_val","#indirect_func","#typeswitch_tmp","#logicinner_tmp"],
|
380
|
+
table: true
|
381
|
+
};
|
302
382
|
this.btoa = {
|
303
383
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: btoa/keyStr', 'i8') * pageSize, 127),[34,2],[33,3],[32,0],[40,1,0],[33,4],...number(allocPage(scope, 'bytestring: btoa/output', 'i8') * pageSize, 127),[34,5],[65,4],[32,4],[65,3],[109],[32,4],[65,3],[111],[69],[69],[106],[108],[34,6],[54,1,0],[32,0],[33,7],[32,5],[33,8],[32,7],[32,4],[106],[33,9],[65,0],[33,10],[3,64],[32,7],[32,9],[72],[4,64],[32,7],[32,7],[65,1],[106],[33,7],[45,0,4],[33,11],[32,7],[32,9],[72],[4,127],[32,7],[32,7],[65,1],[106],[33,7],[45,0,4],[65,0],[33,13],[5],[65,127],[65,0],[33,13],[11],[33,12],[32,7],[32,9],[72],[4,127],[32,7],[32,7],[65,1],[106],[33,7],[45,0,4],[65,0],[33,13],[5],[65,127],[65,0],[33,13],[11],[33,14],[32,11],[65,2],[117],[33,15],[32,11],[65,3],[113],[65,4],[116],[32,12],[65,127],[70],[4,127],[65,0],[65,0],[33,13],[5],[32,12],[65,4],[117],[65,0],[33,13],[11],[114],[33,16],[32,12],[65,15],[113],[65,2],[116],[32,14],[65,127],[70],[4,127],[65,0],[65,0],[33,13],[5],[32,14],[65,6],[117],[65,0],[33,13],[11],[114],[33,17],[32,14],[65,63],[113],[33,18],[32,12],[65,127],[70],[4,64],[65,192,0],[33,17],[65,192,0],[33,18],[5],[32,14],[65,127],[70],[4,64],[65,192,0],[33,18],[11],[11],[32,8],[32,8],[65,1],[106],[33,8],[32,3],[32,15],[106],[45,0,4],[58,0,4],[32,8],[32,8],[65,1],[106],[33,8],[32,3],[32,16],[106],[45,0,4],[58,0,4],[32,8],[32,8],[65,1],[106],[33,8],[32,3],[32,17],[106],[45,0,4],[58,0,4],[32,8],[32,8],[65,1],[106],[33,8],[32,3],[32,18],[106],[45,0,4],[58,0,4],[12,1],[11],[11],[32,5],[15]],
|
304
384
|
params: [127,127],
|
@@ -307,7 +387,7 @@ export const BuiltinFuncs = function() {
|
|
307
387
|
returnType: 18,
|
308
388
|
locals: [127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127],
|
309
389
|
localNames: ["input","input#type","keyStr","keyStrPtr","len","output","__length_setter_tmp","i","j","endPtr","endPtr#type","chr1","chr2","#last_type","chr3","enc1","enc2","enc3","enc4"],
|
310
|
-
data: [{"offset":0,"bytes":[65,0,0,0,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47,61]}]
|
390
|
+
data: [{"offset":0,"bytes":[65,0,0,0,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47,61]}],
|
311
391
|
};
|
312
392
|
this.__Boolean_prototype_toString = {
|
313
393
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __Boolean_prototype_toString/out', 'i8') * pageSize, 124),[33,2],[32,0],[252,3],[4,64],[32,2],[252,3],[34,3],[65,4],[54,1,0],[32,3],[65,244,0],[58,0,4],[32,3],[65,242,0],[58,0,5],[32,3],[65,245,0],[58,0,6],[32,3],[65,229,0],[58,0,7],[32,3],[184],[33,2],[5],[32,2],[252,3],[34,3],[65,5],[54,1,0],[32,3],[65,230,0],[58,0,4],[32,3],[65,225,0],[58,0,5],[32,3],[65,236,0],[58,0,6],[32,3],[65,243,0],[58,0,7],[32,3],[65,229,0],[58,0,8],[32,3],[184],[33,2],[11],[32,2],[65,18],[15]],
|
@@ -335,7 +415,7 @@ export const BuiltinFuncs = function() {
|
|
335
415
|
returnType: 18,
|
336
416
|
locals: [127,127,127,127,127,127,127,127,127,127,127],
|
337
417
|
localNames: ["bytes","bytesPtr","a","aEndPtr","output","i","j","endPtr","byte","lower","upper"],
|
338
|
-
data: [{"offset":0,"bytes":[16,0,0,0,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46]},{"offset":65536,"bytes":[36,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45]}]
|
418
|
+
data: [{"offset":0,"bytes":[16,0,0,0,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46]},{"offset":65536,"bytes":[36,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45]}],
|
339
419
|
};
|
340
420
|
this.__ecma262_Day = {
|
341
421
|
wasm: (scope, {builtin,}) => [[32,0],[68,0,0,0,0,112,153,148,65],[163],[16, builtin('__Math_floor')],[15]],
|
@@ -570,7 +650,7 @@ export const BuiltinFuncs = function() {
|
|
570
650
|
returnType: 18,
|
571
651
|
locals: [124,124,124,124,124,124],
|
572
652
|
localNames: ["tv","tv#type","weekday","lut","out","__length_setter_tmp","outPtr","lutPtr"],
|
573
|
-
data: [{"offset":0,"bytes":[21,0,0,0,83,117,110,77,111,110,84,117,101,87,101,100,84,104,117,70,114,105,83,97,116]}]
|
653
|
+
data: [{"offset":0,"bytes":[21,0,0,0,83,117,110,77,111,110,84,117,101,87,101,100,84,104,117,70,114,105,83,97,116]}],
|
574
654
|
};
|
575
655
|
this.__ecma262_MonthName = {
|
576
656
|
wasm: (scope, {allocPage,builtin,}) => [[32,0],[65,0],[16, builtin('__ecma262_MonthFromTime')],[33,2],...number(allocPage(scope, 'bytestring: __ecma262_MonthName/lut', 'i8') * pageSize, 124),[33,3],...number(allocPage(scope, 'bytestring: __ecma262_MonthName/out', 'i8') * pageSize, 124),[34,4],[252,3],[68,0,0,0,0,0,0,8,64],[34,5],[252,3],[54,1,0],[32,4],[33,6],[32,3],[32,2],[68,0,0,0,0,0,0,8,64],[162],[160],[33,7],[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],[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],[32,6],[252,2],[32,7],[252,2],[45,0,4],[58,0,4],[32,4],[15]],
|
@@ -580,7 +660,7 @@ export const BuiltinFuncs = function() {
|
|
580
660
|
returnType: 18,
|
581
661
|
locals: [124,124,124,124,124,124],
|
582
662
|
localNames: ["tv","tv#type","month","lut","out","__length_setter_tmp","outPtr","lutPtr"],
|
583
|
-
data: [{"offset":0,"bytes":[36,0,0,0,74,97,110,70,101,98,77,97,114,65,112,114,77,97,121,74,117,110,74,117,108,65,117,103,83,101,112,79,99,116,78,111,118,68,101,99]}]
|
663
|
+
data: [{"offset":0,"bytes":[36,0,0,0,74,97,110,70,101,98,77,97,114,65,112,114,77,97,121,74,117,110,74,117,108,65,117,103,83,101,112,79,99,116,78,111,118,68,101,99]}],
|
584
664
|
};
|
585
665
|
this.__ecma262_ParseMonthName = {
|
586
666
|
wasm: (scope, {}) => [[32,0],[252,2],[45,0,4],[183],[34,2],[68,0,0,0,0,0,128,82,64],[97],[4,64],[32,0],[252,2],[45,0,5],[183],[34,3],[68,0,0,0,0,0,64,88,64],[97],[4,64],[68,0,0,0,0,0,0,0,0],[15],[11],[32,3],[68,0,0,0,0,0,64,93,64],[97],[4,64],[32,0],[252,2],[45,0,6],[183],[34,4],[68,0,0,0,0,0,128,91,64],[97],[4,64],[68,0,0,0,0,0,0,20,64],[15],[11],[32,4],[68,0,0,0,0,0,0,91,64],[97],[4,64],[68,0,0,0,0,0,0,24,64],[15],[11],[11],[11],[32,2],[68,0,0,0,0,0,64,83,64],[97],[4,64],[32,0],[252,2],[45,0,5],[183],[34,3],[68,0,0,0,0,0,64,88,64],[97],[4,64],[32,0],[252,2],[45,0,6],[183],[34,4],[68,0,0,0,0,0,128,92,64],[97],[4,64],[68,0,0,0,0,0,0,0,64],[15],[11],[32,4],[68,0,0,0,0,0,64,94,64],[97],[4,64],[68,0,0,0,0,0,0,16,64],[15],[11],[11],[11],[32,2],[68,0,0,0,0,0,64,80,64],[97],[4,64],[32,0],[252,2],[45,0,5],[183],[34,3],[68,0,0,0,0,0,0,92,64],[97],[4,64],[68,0,0,0,0,0,0,8,64],[15],[11],[32,3],[68,0,0,0,0,0,64,93,64],[97],[4,64],[68,0,0,0,0,0,0,28,64],[15],[11],[11],[32,2],[68,0,0,0,0,0,128,81,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[15],[11],[32,2],[68,0,0,0,0,0,192,84,64],[97],[4,64],[68,0,0,0,0,0,0,32,64],[15],[11],[32,2],[68,0,0,0,0,0,192,83,64],[97],[4,64],[68,0,0,0,0,0,0,34,64],[15],[11],[32,2],[68,0,0,0,0,0,128,83,64],[97],[4,64],[68,0,0,0,0,0,0,36,64],[15],[11],[32,2],[68,0,0,0,0,0,0,81,64],[97],[4,64],[68,0,0,0,0,0,0,38,64],[15],[11],[68,0,0,0,0,0,0,240,191],[15]],
|
@@ -1031,7 +1111,7 @@ export const BuiltinFuncs = function() {
|
|
1031
1111
|
typedReturns: true,
|
1032
1112
|
locals: [124],
|
1033
1113
|
localNames: ["tv","tv#type","out"],
|
1034
|
-
data: [{"offset":0,"bytes":[11,0,0,0,43,48,48,48,48,32,40,85,84,67,41]}]
|
1114
|
+
data: [{"offset":0,"bytes":[11,0,0,0,43,48,48,48,48,32,40,85,84,67,41]}],
|
1035
1115
|
};
|
1036
1116
|
this.__ecma262_ToDateString = {
|
1037
1117
|
wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __ecma262_ToDateString/out', 'i8') * pageSize, 124),[34,2],[252,3],[68,0,0,0,0,0,0,0,0],[34,3],[252,3],[54,1,0],[32,0],[16, builtin('__Number_isNaN')],[252,3],[4,64],[32,2],[252,3],[34,4],[65,12],[54,1,0],[32,4],[65,201,0],[58,0,4],[32,4],[65,238,0],[58,0,5],[32,4],[65,246,0],[58,0,6],[32,4],[65,225,0],[58,0,7],[32,4],[65,236,0],[58,0,8],[32,4],[65,233,0],[58,0,9],[32,4],[65,228,0],[58,0,10],[32,4],[65,32],[58,0,11],[32,4],[65,196,0],[58,0,12],[32,4],[65,225,0],[58,0,13],[32,4],[65,244,0],[58,0,14],[32,4],[65,229,0],[58,0,15],[32,4],[184],[34,2],[65,18],[15],[11],[32,0],[65,0],[16, builtin('__ecma262_LocalTime')],[33,5],[32,2],[65,18],[32,5],[65,0],[16, builtin('__ecma262_DateString')],[65,18],[16, builtin('__Porffor_bytestring_appendStr')],[26],[32,2],[65,18],[68,0,0,0,0,0,0,64,64],[65,0],[16, builtin('__Porffor_bytestring_appendChar')],[26],[32,2],[65,18],[32,5],[65,0],[16, builtin('__ecma262_TimeString')],[65,18],[16, builtin('__Porffor_bytestring_appendStr')],[26],[32,2],[65,18],[32,0],[65,0],[16, builtin('__ecma262_TimeZoneString')],[34,6],[16, builtin('__Porffor_bytestring_appendStr')],[26],[32,2],[65,18],[15]],
|
@@ -1275,7 +1355,7 @@ export const BuiltinFuncs = function() {
|
|
1275
1355
|
returnType: 18,
|
1276
1356
|
locals: [127,127,127,127,127,127,127,127,127,127,127,127,127],
|
1277
1357
|
localNames: ["input","input#type","lut","len","outLength","i","endPtr","chr","output","__length_setter_tmp","j","lower","upper","#makearray_pointer_tmp","nibble"],
|
1278
|
-
data: [{"offset":0,"bytes":[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0]}]
|
1358
|
+
data: [{"offset":0,"bytes":[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0]}],
|
1279
1359
|
};
|
1280
1360
|
this.__Function_prototype_toString = {
|
1281
1361
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __Function_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[65,18],[15]],
|
@@ -1285,7 +1365,7 @@ export const BuiltinFuncs = function() {
|
|
1285
1365
|
typedReturns: true,
|
1286
1366
|
locals: [124],
|
1287
1367
|
localNames: ["_this","_this#type","out"],
|
1288
|
-
data: [{"offset":0,"bytes":[14,0,0,0,102,117,110,99,116,105,111,110,32,40,41,32,123,125]}]
|
1368
|
+
data: [{"offset":0,"bytes":[14,0,0,0,102,117,110,99,116,105,111,110,32,40,41,32,123,125]}],
|
1289
1369
|
};
|
1290
1370
|
this.parseInt = {
|
1291
1371
|
wasm: (scope, {builtin,}) => [[32,2],[65,0],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,0,0],[98],[4,64],[68,0,0,0,0,0,0,36,64],[33,2],[11],[32,2],[68,0,0,0,0,0,0,0,0],[97],[4,64],[68,0,0,0,0,0,0,36,64],[33,2],[11],[32,2],[68,0,0,0,0,0,0,0,64],[99],[34,4],[69],[4,127],[32,2],[68,0,0,0,0,0,0,66,64],[100],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[68,0,0,0,0,0,0,248,127],[15],[11],[68,0,0,0,0,0,0,77,64],[33,6],[32,2],[68,0,0,0,0,0,0,36,64],[99],[4,64],[68,0,0,0,0,0,0,72,64],[32,2],[160],[33,6],[11],[68,0,0,0,0,0,0,248,127],[33,7],[32,0],[34,8],[252,2],[40,0,0],[183],[33,9],[32,8],[33,10],[68,0,0,0,0,0,0,0,0],[33,11],[32,0],[32,1],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,50,64],[97],[4,64],[32,10],[32,9],[160],[33,12],[32,10],[252,2],[45,0,4],[183],[34,13],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,10],[68,0,0,0,0,0,0,240,63],[160],[33,10],[11],[32,13],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,11],[32,10],[68,0,0,0,0,0,0,240,63],[160],[33,10],[11],[32,13],[68,0,0,0,0,0,0,72,64],[97],[4,64],[32,10],[68,0,0,0,0,0,0,240,63],[160],[252,2],[45,0,4],[183],[34,14],[68,0,0,0,0,0,0,94,64],[97],[34,4],[69],[4,127],[32,14],[68,0,0,0,0,0,0,86,64],[97],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,10],[68,0,0,0,0,0,0,0,64],[160],[33,10],[68,0,0,0,0,0,0,48,64],[33,2],[11],[11],[3,64],[32,10],[32,12],[99],[4,64],[32,10],[32,10],[68,0,0,0,0,0,0,240,63],[160],[33,10],[252,2],[45,0,4],[183],[34,15],[68,0,0,0,0,0,0,72,64],[102],[34,4],[4,127],[32,15],[32,6],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,0,72,64],[161],[160],[33,7],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,15],[68,0,0,0,0,0,64,88,64],[102],[34,4],[4,127],[32,15],[68,0,0,0,0,0,192,85,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,192,85,64],[161],[160],[33,7],[5],[32,15],[68,0,0,0,0,0,64,80,64],[102],[34,4],[4,127],[32,15],[68,0,0,0,0,0,128,75,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,128,75,64],[161],[160],[33,7],[5],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15],[11],[11],[5],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15],[11],[11],[12,1],[11],[11],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15],[11],[32,10],[32,9],[68,0,0,0,0,0,0,0,64],[162],[160],[33,12],[32,10],[252,2],[47,0,4],[183],[34,13],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,10],[68,0,0,0,0,0,0,0,64],[160],[33,10],[11],[32,13],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,11],[32,10],[68,0,0,0,0,0,0,0,64],[160],[33,10],[11],[32,13],[68,0,0,0,0,0,0,72,64],[97],[4,64],[32,10],[68,0,0,0,0,0,0,0,64],[160],[252,2],[47,0,4],[183],[34,14],[68,0,0,0,0,0,0,94,64],[97],[34,4],[69],[4,127],[32,14],[68,0,0,0,0,0,0,86,64],[97],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,10],[68,0,0,0,0,0,0,16,64],[160],[33,10],[68,0,0,0,0,0,0,48,64],[33,2],[11],[11],[3,64],[32,10],[32,12],[99],[4,64],[32,10],[252,2],[47,0,4],[183],[33,15],[32,10],[68,0,0,0,0,0,0,0,64],[160],[33,10],[32,15],[68,0,0,0,0,0,0,72,64],[102],[34,4],[4,127],[32,15],[32,6],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,0,72,64],[161],[160],[33,7],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,15],[68,0,0,0,0,0,64,88,64],[102],[34,4],[4,127],[32,15],[68,0,0,0,0,0,192,85,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,192,85,64],[161],[160],[33,7],[5],[32,15],[68,0,0,0,0,0,64,80,64],[102],[34,4],[4,127],[32,15],[68,0,0,0,0,0,128,75,64],[32,2],[160],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[4,64],[32,7],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,7],[11],[32,7],[32,2],[162],[34,7],[32,15],[68,0,0,0,0,0,128,75,64],[161],[160],[33,7],[5],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15],[11],[11],[5],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15],[11],[11],[12,1],[11],[11],[32,11],[252,3],[4,64],[32,7],[154],[15],[11],[32,7],[15]],
|
@@ -1340,7 +1420,7 @@ export const BuiltinFuncs = function() {
|
|
1340
1420
|
typedReturns: true,
|
1341
1421
|
locals: [124],
|
1342
1422
|
localNames: ["_this","_this#type","out"],
|
1343
|
-
data: [{"offset":0,"bytes":[15,0,0,0,91,111,98,106,101,99,116,32,79,98,106,101,99,116,93]}]
|
1423
|
+
data: [{"offset":0,"bytes":[15,0,0,0,91,111,98,106,101,99,116,32,79,98,106,101,99,116,93]}],
|
1344
1424
|
};
|
1345
1425
|
this.__Porffor_allocate = {
|
1346
1426
|
wasm: (scope, {}) => [[65,1],[64,0],[26],[63,0],[65,1],[107],[65,128,128,4],[108],[184],[15]],
|
@@ -1458,7 +1538,7 @@ export const BuiltinFuncs = function() {
|
|
1458
1538
|
typedReturns: true,
|
1459
1539
|
locals: [127,127],
|
1460
1540
|
localNames: ["code","code#type","out","#makearray_pointer_tmp"],
|
1461
|
-
data: [{"offset":0,"bytes":[1,0,0,0,46]}]
|
1541
|
+
data: [{"offset":0,"bytes":[1,0,0,0,46]}],
|
1462
1542
|
};
|
1463
1543
|
this.__String_prototype_toUpperCase = {
|
1464
1544
|
wasm: (scope, {allocPage,}) => [[32,0],[40,1,0],[33,2],...number(allocPage(scope, 'string: __String_prototype_toUpperCase/out', 'i16') * pageSize, 127),[34,3],[32,2],[54,0,0],[32,0],[33,4],[32,3],[33,5],[32,4],[32,2],[65,2],[108],[106],[33,6],[3,64],[32,4],[32,6],[72],[4,64],[32,4],[47,0,4],[33,7],[32,4],[65,2],[106],[33,4],[32,7],[65,225,0],[78],[4,64],[32,7],[65,250,0],[76],[4,64],[32,7],[65,32],[107],[33,7],[11],[11],[32,5],[32,7],[59,0,4],[32,5],[65,2],[106],[33,5],[12,1],[11],[11],[32,3],[65,2],[15]],
|
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-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
|
}
|
@@ -111,8 +111,9 @@ ${funcs.map(x => {
|
|
111
111
|
${x.returnType != null ? `returnType: ${JSON.stringify(x.returnType)}` : 'typedReturns: true'},
|
112
112
|
locals: ${JSON.stringify(Object.values(x.locals).slice(x.params.length).map(x => x.type))},
|
113
113
|
localNames: ${JSON.stringify(Object.keys(x.locals))},
|
114
|
-
${x.data && x.data.length > 0 ? ` data: ${JSON.stringify(x.data)}
|
115
|
-
|
114
|
+
${x.data && x.data.length > 0 ? ` data: ${JSON.stringify(x.data)},` : ''}
|
115
|
+
${x.table ? ` table: true` : ''}
|
116
|
+
};`.replaceAll('\n\n', '\n').replaceAll('\n\n', '\n').replaceAll('\n\n', '\n');
|
116
117
|
}).join('\n')}
|
117
118
|
};`;
|
118
119
|
};
|
package/package.json
CHANGED