porffor 0.16.0-688a50c13 → 0.16.0-8107e135a
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/bf +0 -0
- package/compiler/allocators/grow.js +0 -1
- package/compiler/assemble.js +7 -1
- package/compiler/codegen.js +57 -27
- package/compiler/generated_builtins.js +28 -28
- package/compiler/precompile.js +1 -1
- package/compiler/wasmSpec.js +2 -2
- package/compiler/wrap.js +16 -15
- package/package.json +1 -1
- package/a.txt +0 -457
- package/b.txt +0 -457
- package/no_pgo.txt +0 -923
- package/pgo.txt +0 -916
package/bf
ADDED
Binary file
|
package/compiler/assemble.js
CHANGED
@@ -240,7 +240,13 @@ export default (funcs, globals, tags, pages, data, flags, noTreeshake = false) =
|
|
240
240
|
|
241
241
|
const dataSection = data.length === 0 ? [] : createSection(
|
242
242
|
Section.data,
|
243
|
-
encodeVector(data.map(x =>
|
243
|
+
encodeVector(data.map(x => {
|
244
|
+
// type: active
|
245
|
+
if (x.offset != null) return [ 0x00, Opcodes.i32_const, ...signedLEB128(x.offset), Opcodes.end, ...encodeVector(x.bytes) ];
|
246
|
+
|
247
|
+
// type: passive
|
248
|
+
return [ 0x01, ...encodeVector(x.bytes) ];
|
249
|
+
}))
|
244
250
|
);
|
245
251
|
|
246
252
|
const dataCountSection = data.length === 0 ? [] : createSection(
|
package/compiler/codegen.js
CHANGED
@@ -431,7 +431,7 @@ const concatStrings = (scope, left, right, global, name, assign = false, bytestr
|
|
431
431
|
const leftPointer = localTmp(scope, 'concat_left_pointer', Valtype.i32);
|
432
432
|
|
433
433
|
// alloc/assign array
|
434
|
-
const [ , pointer ] = makeArray(scope, {
|
434
|
+
const [ out, pointer ] = makeArray(scope, {
|
435
435
|
rawElements: new Array(0)
|
436
436
|
}, global, name, true, 'i16', true);
|
437
437
|
|
@@ -447,7 +447,7 @@ const concatStrings = (scope, left, right, global, name, assign = false, bytestr
|
|
447
447
|
[ Opcodes.local_set, rightPointer ],
|
448
448
|
|
449
449
|
// calculate length
|
450
|
-
...
|
450
|
+
...out,
|
451
451
|
|
452
452
|
[ Opcodes.local_get, leftPointer ],
|
453
453
|
[ Opcodes.i32_load, 0, ...unsignedLEB128(0) ],
|
@@ -1017,7 +1017,7 @@ const asmFunc = (name, { wasm, params, locals: localTypes, globals: globalTypes
|
|
1017
1017
|
|
1018
1018
|
for (const x of _data) {
|
1019
1019
|
const copy = { ...x };
|
1020
|
-
copy.offset += pages.size * pageSize;
|
1020
|
+
if (copy.offset != null) copy.offset += pages.size * pageSize;
|
1021
1021
|
data.push(copy);
|
1022
1022
|
}
|
1023
1023
|
|
@@ -1403,10 +1403,10 @@ const countLeftover = wasm => {
|
|
1403
1403
|
|
1404
1404
|
if (depth === 0)
|
1405
1405
|
if ([Opcodes.throw, Opcodes.drop, Opcodes.local_set, Opcodes.global_set].includes(inst[0])) count--;
|
1406
|
-
else if ([null, Opcodes.i32_eqz, Opcodes.i64_eqz, Opcodes.f64_ceil, Opcodes.f64_floor, Opcodes.f64_trunc, Opcodes.f64_nearest, Opcodes.f64_sqrt, Opcodes.local_tee, Opcodes.i32_wrap_i64, Opcodes.i64_extend_i32_s, Opcodes.i64_extend_i32_u, Opcodes.f32_demote_f64, Opcodes.f64_promote_f32, Opcodes.f64_convert_i32_s, Opcodes.f64_convert_i32_u, Opcodes.i32_clz, Opcodes.i32_ctz, Opcodes.i32_popcnt, Opcodes.f64_neg, Opcodes.end, Opcodes.i32_trunc_sat_f64_s[0], Opcodes.i32x4_extract_lane, Opcodes.i16x8_extract_lane, Opcodes.i32_load, Opcodes.i64_load, Opcodes.f64_load, Opcodes.v128_load, Opcodes.i32_load16_u, Opcodes.i32_load16_s, Opcodes.i32_load8_u, Opcodes.i32_load8_s, Opcodes.memory_grow].includes(inst[0]) && (inst[0] !== 0xfc || inst[1] <
|
1406
|
+
else if ([null, Opcodes.i32_eqz, Opcodes.i64_eqz, Opcodes.f64_ceil, Opcodes.f64_floor, Opcodes.f64_trunc, Opcodes.f64_nearest, Opcodes.f64_sqrt, Opcodes.local_tee, Opcodes.i32_wrap_i64, Opcodes.i64_extend_i32_s, Opcodes.i64_extend_i32_u, Opcodes.f32_demote_f64, Opcodes.f64_promote_f32, Opcodes.f64_convert_i32_s, Opcodes.f64_convert_i32_u, Opcodes.i32_clz, Opcodes.i32_ctz, Opcodes.i32_popcnt, Opcodes.f64_neg, Opcodes.end, Opcodes.i32_trunc_sat_f64_s[0], Opcodes.i32x4_extract_lane, Opcodes.i16x8_extract_lane, Opcodes.i32_load, Opcodes.i64_load, Opcodes.f64_load, Opcodes.v128_load, Opcodes.i32_load16_u, Opcodes.i32_load16_s, Opcodes.i32_load8_u, Opcodes.i32_load8_s, Opcodes.memory_grow].includes(inst[0]) && (inst[0] !== 0xfc || inst[1] < 0x04)) {}
|
1407
1407
|
else if ([Opcodes.local_get, Opcodes.global_get, Opcodes.f64_const, Opcodes.i32_const, Opcodes.i64_const, Opcodes.v128_const, Opcodes.memory_size].includes(inst[0])) count++;
|
1408
1408
|
else if ([Opcodes.i32_store, Opcodes.i64_store, Opcodes.f64_store, Opcodes.i32_store16, Opcodes.i32_store8].includes(inst[0])) count -= 2;
|
1409
|
-
else if (Opcodes.memory_copy[0]
|
1409
|
+
else if (inst[0] === Opcodes.memory_copy[0] && (inst[1] === Opcodes.memory_copy[1] || inst[1] === Opcodes.memory_init[1])) count -= 3;
|
1410
1410
|
else if (inst[0] === Opcodes.return) count = 0;
|
1411
1411
|
else if (inst[0] === Opcodes.call) {
|
1412
1412
|
let func = funcs.find(x => x.index === inst[1]);
|
@@ -3156,6 +3156,31 @@ const compileBytes = (val, itemType) => {
|
|
3156
3156
|
}
|
3157
3157
|
};
|
3158
3158
|
|
3159
|
+
const makeData = (scope, elements, offset = null, itemType, initEmpty) => {
|
3160
|
+
const length = elements.length;
|
3161
|
+
|
3162
|
+
// if length is 0 memory/data will just be 0000... anyway
|
3163
|
+
if (length === 0) return false;
|
3164
|
+
|
3165
|
+
let bytes = compileBytes(length, 'i32');
|
3166
|
+
|
3167
|
+
if (!initEmpty) for (let i = 0; i < length; i++) {
|
3168
|
+
if (elements[i] == null) continue;
|
3169
|
+
|
3170
|
+
bytes.push(...compileBytes(elements[i], itemType));
|
3171
|
+
}
|
3172
|
+
|
3173
|
+
const obj = { bytes };
|
3174
|
+
if (offset != null) obj.offset = offset;
|
3175
|
+
|
3176
|
+
const idx = data.push(obj) - 1;
|
3177
|
+
|
3178
|
+
scope.data ??= [];
|
3179
|
+
scope.data.push(idx);
|
3180
|
+
|
3181
|
+
return { idx, size: bytes.length };
|
3182
|
+
};
|
3183
|
+
|
3159
3184
|
const makeArray = (scope, decl, global = false, name = '$undeclared', initEmpty = false, itemType = valtype, intOut = false, typed = false) => {
|
3160
3185
|
if (itemType !== 'i16' && itemType !== 'i8') {
|
3161
3186
|
pages.hasArray = true;
|
@@ -3179,13 +3204,35 @@ const makeArray = (scope, decl, global = false, name = '$undeclared', initEmpty
|
|
3179
3204
|
|
3180
3205
|
let pointer = allocated;
|
3181
3206
|
if (allocator.constructor.name !== 'StaticAllocator') {
|
3182
|
-
const tmp = localTmp(scope, '#makearray_pointer' + uniqueName, Valtype.i32);
|
3207
|
+
// const tmp = localTmp(scope, '#makearray_pointer' + uniqueName, Valtype.i32);
|
3208
|
+
const tmp = localTmp(scope, '#makearray_pointer' + name, Valtype.i32);
|
3183
3209
|
out.push(
|
3184
3210
|
...allocated,
|
3185
3211
|
[ Opcodes.local_set, tmp ]
|
3186
3212
|
);
|
3187
3213
|
|
3188
3214
|
pointer = [ [ Opcodes.local_get, tmp ] ];
|
3215
|
+
|
3216
|
+
if (Prefs.data && useRawElements) {
|
3217
|
+
const data = makeData(scope, elements, null, itemType, initEmpty);
|
3218
|
+
if (data) {
|
3219
|
+
// init data
|
3220
|
+
out.push(
|
3221
|
+
...pointer,
|
3222
|
+
...number(0, Valtype.i32),
|
3223
|
+
...number(data.size, Valtype.i32),
|
3224
|
+
[ ...Opcodes.memory_init, ...unsignedLEB128(data.idx), 0 ]
|
3225
|
+
);
|
3226
|
+
}
|
3227
|
+
|
3228
|
+
// return pointer in out
|
3229
|
+
out.push(
|
3230
|
+
...pointer,
|
3231
|
+
...(!intOut ? [ Opcodes.i32_from_u ] : [])
|
3232
|
+
);
|
3233
|
+
|
3234
|
+
return [ out, pointer ];
|
3235
|
+
}
|
3189
3236
|
} else {
|
3190
3237
|
const rawPtr = read_signedLEB128(pointer[0].slice(1));
|
3191
3238
|
|
@@ -3194,24 +3241,7 @@ const makeArray = (scope, decl, global = false, name = '$undeclared', initEmpty
|
|
3194
3241
|
if (firstAssign) scope.arrays.set(uniqueName, rawPtr);
|
3195
3242
|
|
3196
3243
|
if (Prefs.data && firstAssign && useRawElements) {
|
3197
|
-
|
3198
|
-
if (length !== 0) {
|
3199
|
-
let bytes = compileBytes(length, 'i32');
|
3200
|
-
|
3201
|
-
if (!initEmpty) for (let i = 0; i < length; i++) {
|
3202
|
-
if (elements[i] == null) continue;
|
3203
|
-
|
3204
|
-
bytes.push(...compileBytes(elements[i], itemType));
|
3205
|
-
}
|
3206
|
-
|
3207
|
-
const ind = data.push({
|
3208
|
-
offset: rawPtr,
|
3209
|
-
bytes
|
3210
|
-
}) - 1;
|
3211
|
-
|
3212
|
-
scope.data ??= [];
|
3213
|
-
scope.data.push(ind);
|
3214
|
-
}
|
3244
|
+
makeData(scope, elements, rawPtr, itemType, initEmpty);
|
3215
3245
|
|
3216
3246
|
// local value as pointer
|
3217
3247
|
return [ number(rawPtr, intOut ? Valtype.i32 : valtypeBinary), pointer ];
|
@@ -3694,9 +3724,9 @@ const internalConstrs = {
|
|
3694
3724
|
|
3695
3725
|
// new Array(n)
|
3696
3726
|
|
3697
|
-
const [ , pointer ] = makeArray(scope, {
|
3727
|
+
const [ out, pointer ] = makeArray(scope, {
|
3698
3728
|
rawElements: new Array(0)
|
3699
|
-
}, global, name, true);
|
3729
|
+
}, global, name, true, undefined, true);
|
3700
3730
|
|
3701
3731
|
const arg = decl.arguments[0] ?? DEFAULT_VALUE;
|
3702
3732
|
|
@@ -3705,7 +3735,7 @@ const internalConstrs = {
|
|
3705
3735
|
if (literalValue < 0 || !Number.isFinite(literalValue) || literalValue > 4294967295) return internalThrow(scope, 'RangeThrow', 'Invalid array length', true);
|
3706
3736
|
|
3707
3737
|
return [
|
3708
|
-
...
|
3738
|
+
...out,
|
3709
3739
|
...generate(scope, arg, global, name),
|
3710
3740
|
Opcodes.i32_to_u,
|
3711
3741
|
[ Opcodes.i32_store, Math.log2(ValtypeSize.i32) - 1, 0 ],
|
@@ -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: [{"
|
13
|
+
data: [{"bytes":[5,0,0,0,60,0,98,0,105,0,103,0,62,0],"offset":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: [{"
|
23
|
+
data: [{"bytes":[5,0,0,0,60,98,105,103,62],"offset":0}],
|
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: [{"
|
33
|
+
data: [{"bytes":[7,0,0,0,60,0,98,0,108,0,105,0,110,0,107,0,62,0],"offset":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: [{"
|
43
|
+
data: [{"bytes":[7,0,0,0,60,98,108,105,110,107,62],"offset":0}],
|
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: [{"
|
53
|
+
data: [{"bytes":[3,0,0,0,60,0,98,0,62,0],"offset":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: [{"
|
63
|
+
data: [{"bytes":[3,0,0,0,60,98,62],"offset":0}],
|
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: [{"
|
73
|
+
data: [{"bytes":[4,0,0,0,60,0,116,0,116,0,62,0],"offset":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: [{"
|
83
|
+
data: [{"bytes":[4,0,0,0,60,116,116,62],"offset":0}],
|
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: [{"
|
93
|
+
data: [{"bytes":[3,0,0,0,60,0,105,0,62,0],"offset":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: [{"
|
103
|
+
data: [{"bytes":[3,0,0,0,60,105,62],"offset":0}],
|
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: [{"
|
113
|
+
data: [{"bytes":[7,0,0,0,60,0,115,0,109,0,97,0,108,0,108,0,62,0],"offset":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: [{"
|
123
|
+
data: [{"bytes":[7,0,0,0,60,115,109,97,108,108,62],"offset":0}],
|
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: [{"
|
133
|
+
data: [{"bytes":[8,0,0,0,60,0,115,0,116,0,114,0,105,0,107,0,101,0,62,0],"offset":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: [{"
|
143
|
+
data: [{"bytes":[8,0,0,0,60,115,116,114,105,107,101,62],"offset":0}],
|
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: [{"
|
153
|
+
data: [{"bytes":[5,0,0,0,60,0,115,0,117,0,98,0,62,0],"offset":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: [{"
|
163
|
+
data: [{"bytes":[5,0,0,0,60,115,117,98,62],"offset":0}],
|
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: [{"
|
173
|
+
data: [{"bytes":[5,0,0,0,60,0,115,0,117,0,112,0,62,0],"offset":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: [{"
|
183
|
+
data: [{"bytes":[5,0,0,0,60,115,117,112,62],"offset":0}],
|
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]],
|
@@ -387,7 +387,7 @@ export const BuiltinFuncs = function() {
|
|
387
387
|
returnType: 18,
|
388
388
|
locals: [127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127],
|
389
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"],
|
390
|
-
data: [{"
|
390
|
+
data: [{"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],"offset":0}],
|
391
391
|
};
|
392
392
|
this.__Boolean_prototype_toString = {
|
393
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]],
|
@@ -415,7 +415,7 @@ export const BuiltinFuncs = function() {
|
|
415
415
|
typedReturns: true,
|
416
416
|
locals: [124],
|
417
417
|
localNames: ["clear"],
|
418
|
-
data: [{"
|
418
|
+
data: [{"bytes":[9,0,0,0,27,91,49,59,49,72,27,91,74],"offset":0}],
|
419
419
|
};
|
420
420
|
this.__crypto_randomUUID = {
|
421
421
|
wasm: (scope, {allocPage,builtin,}) => [...number(allocPage(scope, 'bytestring: __crypto_randomUUID/bytes', 'i8') * pageSize, 127),[34,0],[34,1],[34,2],[65,16],[106],[33,3],[3,64],[32,2],[32,3],[72],[4,64],[32,2],[32,2],[65,1],[106],[33,2],[16, builtin('__Porffor_randomByte')],[58,0,4],[12,1],[11],[11],[32,1],[32,1],[45,0,10],[65,15],[113],[65,192,0],[114],[58,0,10],[32,1],[32,1],[45,0,12],[65,63],[113],[65,128,1],[114],[58,0,12],...number(allocPage(scope, 'bytestring: __crypto_randomUUID/output', 'i8') * pageSize, 127),[34,4],[33,5],[32,1],[33,6],[32,5],[65,8],[106],[33,7],[3,64],[32,5],[32,7],[72],[4,64],[32,6],[32,6],[65,1],[106],[33,6],[45,0,4],[34,8],[65,15],[113],[65,48],[106],[34,9],[65,57],[74],[4,64],[32,9],[65,39],[106],[33,9],[11],[32,8],[65,4],[117],[65,48],[106],[34,10],[65,57],[74],[4,64],[32,10],[65,39],[106],[33,10],[11],[32,5],[32,5],[65,1],[106],[33,5],[32,10],[58,0,4],[32,5],[32,5],[65,1],[106],[33,5],[32,9],[58,0,4],[12,1],[11],[11],[32,5],[65,1],[106],[34,5],[65,4],[106],[33,7],[3,64],[32,5],[32,7],[72],[4,64],[32,6],[32,6],[65,1],[106],[33,6],[45,0,4],[34,8],[65,15],[113],[65,48],[106],[34,9],[65,57],[74],[4,64],[32,9],[65,39],[106],[33,9],[11],[32,8],[65,4],[117],[65,48],[106],[34,10],[65,57],[74],[4,64],[32,10],[65,39],[106],[33,10],[11],[32,5],[32,5],[65,1],[106],[33,5],[32,10],[58,0,4],[32,5],[32,5],[65,1],[106],[33,5],[32,9],[58,0,4],[12,1],[11],[11],[32,5],[65,1],[106],[34,5],[65,4],[106],[33,7],[3,64],[32,5],[32,7],[72],[4,64],[32,6],[32,6],[65,1],[106],[33,6],[45,0,4],[34,8],[65,15],[113],[65,48],[106],[34,9],[65,57],[74],[4,64],[32,9],[65,39],[106],[33,9],[11],[32,8],[65,4],[117],[65,48],[106],[34,10],[65,57],[74],[4,64],[32,10],[65,39],[106],[33,10],[11],[32,5],[32,5],[65,1],[106],[33,5],[32,10],[58,0,4],[32,5],[32,5],[65,1],[106],[33,5],[32,9],[58,0,4],[12,1],[11],[11],[32,5],[65,1],[106],[34,5],[65,4],[106],[33,7],[3,64],[32,5],[32,7],[72],[4,64],[32,6],[32,6],[65,1],[106],[33,6],[45,0,4],[34,8],[65,15],[113],[65,48],[106],[34,9],[65,57],[74],[4,64],[32,9],[65,39],[106],[33,9],[11],[32,8],[65,4],[117],[65,48],[106],[34,10],[65,57],[74],[4,64],[32,10],[65,39],[106],[33,10],[11],[32,5],[32,5],[65,1],[106],[33,5],[32,10],[58,0,4],[32,5],[32,5],[65,1],[106],[33,5],[32,9],[58,0,4],[12,1],[11],[11],[32,5],[65,1],[106],[34,5],[65,12],[106],[33,7],[3,64],[32,5],[32,7],[72],[4,64],[32,6],[32,6],[65,1],[106],[33,6],[45,0,4],[34,8],[65,15],[113],[65,48],[106],[34,9],[65,57],[74],[4,64],[32,9],[65,39],[106],[33,9],[11],[32,8],[65,4],[117],[65,48],[106],[34,10],[65,57],[74],[4,64],[32,10],[65,39],[106],[33,10],[11],[32,5],[32,5],[65,1],[106],[33,5],[32,10],[58,0,4],[32,5],[32,5],[65,1],[106],[33,5],[32,9],[58,0,4],[12,1],[11],[11],[32,5],[65,1],[106],[33,5],[32,4],[15]],
|
@@ -425,7 +425,7 @@ export const BuiltinFuncs = function() {
|
|
425
425
|
returnType: 18,
|
426
426
|
locals: [127,127,127,127,127,127,127,127,127,127,127],
|
427
427
|
localNames: ["bytes","bytesPtr","a","aEndPtr","output","i","j","endPtr","byte","lower","upper"],
|
428
|
-
data: [{"
|
428
|
+
data: [{"bytes":[16,0,0,0,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46],"offset":0},{"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],"offset":65536}],
|
429
429
|
};
|
430
430
|
this.__ecma262_Day = {
|
431
431
|
wasm: (scope, {builtin,}) => [[32,0],[68,0,0,0,0,112,153,148,65],[163],[16, builtin('__Math_floor')],[15]],
|
@@ -660,7 +660,7 @@ export const BuiltinFuncs = function() {
|
|
660
660
|
returnType: 18,
|
661
661
|
locals: [124,124,124,124,124,124],
|
662
662
|
localNames: ["tv","tv#type","weekday","lut","out","__length_setter_tmp","outPtr","lutPtr"],
|
663
|
-
data: [{"
|
663
|
+
data: [{"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],"offset":0}],
|
664
664
|
};
|
665
665
|
this.__ecma262_MonthName = {
|
666
666
|
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]],
|
@@ -670,7 +670,7 @@ export const BuiltinFuncs = function() {
|
|
670
670
|
returnType: 18,
|
671
671
|
locals: [124,124,124,124,124,124],
|
672
672
|
localNames: ["tv","tv#type","month","lut","out","__length_setter_tmp","outPtr","lutPtr"],
|
673
|
-
data: [{"
|
673
|
+
data: [{"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],"offset":0}],
|
674
674
|
};
|
675
675
|
this.__ecma262_ParseMonthName = {
|
676
676
|
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]],
|
@@ -1121,7 +1121,7 @@ export const BuiltinFuncs = function() {
|
|
1121
1121
|
typedReturns: true,
|
1122
1122
|
locals: [124],
|
1123
1123
|
localNames: ["tv","tv#type","out"],
|
1124
|
-
data: [{"
|
1124
|
+
data: [{"bytes":[11,0,0,0,43,48,48,48,48,32,40,85,84,67,41],"offset":0}],
|
1125
1125
|
};
|
1126
1126
|
this.__ecma262_ToDateString = {
|
1127
1127
|
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]],
|
@@ -1365,7 +1365,7 @@ export const BuiltinFuncs = function() {
|
|
1365
1365
|
returnType: 18,
|
1366
1366
|
locals: [127,127,127,127,127,127,127,127,127,127,127,127,127],
|
1367
1367
|
localNames: ["input","input#type","lut","len","outLength","i","endPtr","chr","output","__length_setter_tmp","j","lower","upper","#makearray_pointer_tmp","nibble"],
|
1368
|
-
data: [{"
|
1368
|
+
data: [{"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],"offset":0}],
|
1369
1369
|
};
|
1370
1370
|
this.__Function_prototype_toString = {
|
1371
1371
|
wasm: (scope, {allocPage,}) => [...number(allocPage(scope, 'bytestring: __Function_prototype_toString/out', 'i8') * pageSize, 124),[34,2],[65,18],[15]],
|
@@ -1375,7 +1375,7 @@ export const BuiltinFuncs = function() {
|
|
1375
1375
|
typedReturns: true,
|
1376
1376
|
locals: [124],
|
1377
1377
|
localNames: ["_this","_this#type","out"],
|
1378
|
-
data: [{"
|
1378
|
+
data: [{"bytes":[14,0,0,0,102,117,110,99,116,105,111,110,32,40,41,32,123,125],"offset":0}],
|
1379
1379
|
};
|
1380
1380
|
this.parseInt = {
|
1381
1381
|
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],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[68,0,0,0,0,0,0,248,127],[15],[11],[68,0,0,0,0,0,0,77,64],[33,8],[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,8],[11],[68,0,0,0,0,0,0,248,127],[33,9],[32,0],[34,10],[252,2],[40,0,0],[183],[33,11],[32,10],[33,12],[68,0,0,0,0,0,0,0,0],[33,13],[32,0],[32,1],[16, builtin('__Porffor_rawType')],[68,0,0,0,0,0,0,50,64],[97],[4,64],[32,12],[32,11],[160],[33,14],[32,12],[252,2],[45,0,4],[183],[34,15],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,12],[68,0,0,0,0,0,0,240,63],[160],[33,12],[11],[32,15],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,13],[32,12],[68,0,0,0,0,0,0,240,63],[160],[33,12],[11],[32,15],[68,0,0,0,0,0,0,72,64],[97],[4,64],[32,12],[68,0,0,0,0,0,0,240,63],[160],[252,2],[45,0,4],[183],[34,16],[68,0,0,0,0,0,0,94,64],[97],[34,4],[69],[4,127],[32,16],[68,0,0,0,0,0,0,86,64],[97],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,12],[68,0,0,0,0,0,0,0,64],[160],[33,12],[68,0,0,0,0,0,0,48,64],[33,2],[11],[11],[3,64],[32,12],[32,14],[99],[4,64],[32,12],[32,12],[68,0,0,0,0,0,0,240,63],[160],[33,12],[252,2],[45,0,4],[183],[34,17],[68,0,0,0,0,0,0,72,64],[102],[34,4],[4,127],[32,17],[32,8],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,0,72,64],[161],[160],[33,9],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,17],[68,0,0,0,0,0,64,88,64],[102],[34,4],[4,127],[32,17],[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],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,192,85,64],[161],[160],[33,9],[5],[32,17],[68,0,0,0,0,0,64,80,64],[102],[34,4],[4,127],[32,17],[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],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,128,75,64],[161],[160],[33,9],[5],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15],[11],[11],[5],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15],[11],[11],[12,1],[11],[11],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15],[11],[32,12],[32,11],[68,0,0,0,0,0,0,0,64],[162],[160],[33,14],[32,12],[252,2],[47,0,4],[183],[34,15],[68,0,0,0,0,0,128,69,64],[97],[4,64],[32,12],[68,0,0,0,0,0,0,0,64],[160],[33,12],[11],[32,15],[68,0,0,0,0,0,128,70,64],[97],[4,64],[68,0,0,0,0,0,0,240,63],[33,13],[32,12],[68,0,0,0,0,0,0,0,64],[160],[33,12],[11],[32,15],[68,0,0,0,0,0,0,72,64],[97],[4,64],[32,12],[68,0,0,0,0,0,0,0,64],[160],[252,2],[47,0,4],[183],[34,16],[68,0,0,0,0,0,0,94,64],[97],[34,4],[69],[4,127],[32,16],[68,0,0,0,0,0,0,86,64],[97],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,12],[68,0,0,0,0,0,0,16,64],[160],[33,12],[68,0,0,0,0,0,0,48,64],[33,2],[11],[11],[3,64],[32,12],[32,14],[99],[4,64],[32,12],[252,2],[47,0,4],[183],[33,17],[32,12],[68,0,0,0,0,0,0,0,64],[160],[33,12],[32,17],[68,0,0,0,0,0,0,72,64],[102],[34,4],[4,127],[32,17],[32,8],[99],[65,1],[33,5],[5],[32,4],[65,1],[33,5],[11],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,0,72,64],[161],[160],[33,9],[5],[32,2],[68,0,0,0,0,0,0,36,64],[100],[4,64],[32,17],[68,0,0,0,0,0,64,88,64],[102],[34,4],[4,127],[32,17],[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],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,192,85,64],[161],[160],[33,9],[5],[32,17],[68,0,0,0,0,0,64,80,64],[102],[34,4],[4,127],[32,17],[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],[183],[33,6],[32,5],[33,7],[2,127],[32,7],[65,2],[70],[4,64,"TYPESWITCH|String"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,7],[65,18],[70],[4,64,"TYPESWITCH|ByteString"],[32,6],[252,3],[40,1,0],[12,1],[11],[32,6],[252,3],[11,"TYPESWITCH_end"],[4,64],[32,9],[16, builtin('__Number_isNaN')],[252,3],[4,64],[68,0,0,0,0,0,0,0,0],[33,9],[11],[32,9],[32,2],[162],[34,9],[32,17],[68,0,0,0,0,0,128,75,64],[161],[160],[33,9],[5],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15],[11],[11],[5],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15],[11],[11],[12,1],[11],[11],[32,13],[252,3],[4,64],[32,9],[154],[15],[11],[32,9],[15]],
|
@@ -1637,7 +1637,7 @@ export const BuiltinFuncs = function() {
|
|
1637
1637
|
typedReturns: true,
|
1638
1638
|
locals: [124],
|
1639
1639
|
localNames: ["_this","_this#type","out"],
|
1640
|
-
data: [{"
|
1640
|
+
data: [{"bytes":[15,0,0,0,91,111,98,106,101,99,116,32,79,98,106,101,99,116,93],"offset":0}],
|
1641
1641
|
};
|
1642
1642
|
this.__Porffor_allocate = {
|
1643
1643
|
wasm: (scope, {}) => [[63,0],[65,1],[64,0],[26],[65,128,128,4],[108],[184],[15]],
|
@@ -1764,7 +1764,7 @@ export const BuiltinFuncs = function() {
|
|
1764
1764
|
typedReturns: true,
|
1765
1765
|
locals: [127,127],
|
1766
1766
|
localNames: ["code","code#type","out","#makearray_pointer_tmp"],
|
1767
|
-
data: [{"
|
1767
|
+
data: [{"bytes":[1,0,0,0,46],"offset":0}],
|
1768
1768
|
};
|
1769
1769
|
this.__String_prototype_toUpperCase = {
|
1770
1770
|
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
@@ -35,7 +35,7 @@ const compile = async (file, [ _funcs, _globals ]) => {
|
|
35
35
|
if (x.data) {
|
36
36
|
x.data = x.data.map(x => data[x]);
|
37
37
|
for (const y in x.data) {
|
38
|
-
x.data[y].offset -= x.data[0].offset;
|
38
|
+
if (x.data[y].offset != null) x.data[y].offset -= x.data[0].offset;
|
39
39
|
}
|
40
40
|
}
|
41
41
|
|
package/compiler/wasmSpec.js
CHANGED
@@ -191,6 +191,8 @@ export const Opcodes = {
|
|
191
191
|
i32_trunc_sat_f64_s: [ 0xfc, 0x02 ],
|
192
192
|
i32_trunc_sat_f64_u: [ 0xfc, 0x03 ],
|
193
193
|
|
194
|
+
memory_init: [ 0xfc, 0x08 ],
|
195
|
+
data_drop: [ 0xfc, 0x09 ],
|
194
196
|
memory_copy: [ 0xfc, 0x0a ],
|
195
197
|
|
196
198
|
// simd insts are 0xFD simdop: varuint32
|
@@ -209,8 +211,6 @@ export const Opcodes = {
|
|
209
211
|
i32x4_add: [ 0xfd, 0xae, 0x01 ],
|
210
212
|
i32x4_sub: [ 0xfd, 0xb1, 0x01 ],
|
211
213
|
i32x4_mul: [ 0xfd, 0xb5, 0x01 ],
|
212
|
-
|
213
|
-
i32x4_dot_i16x8_s: [ 0xfd, 0xba, 0x01 ],
|
214
214
|
};
|
215
215
|
|
216
216
|
export const FuncType = 0x60;
|
package/compiler/wrap.js
CHANGED
@@ -11,13 +11,13 @@ const fs = (typeof process?.version !== 'undefined' ? (await import('node:fs'))
|
|
11
11
|
const bold = x => `\u001b[1m${x}\u001b[0m`;
|
12
12
|
|
13
13
|
export const readByteStr = (memory, ptr) => {
|
14
|
-
const length = (new Int32Array(memory.buffer
|
14
|
+
const length = (new Int32Array(memory.buffer, ptr, 1))[0];
|
15
15
|
return Array.from(new Uint8Array(memory.buffer, ptr + 4, length)).map(x => String.fromCharCode(x)).join('');
|
16
16
|
};
|
17
17
|
|
18
18
|
export const writeByteStr = (memory, ptr, str) => {
|
19
19
|
const length = str.length;
|
20
|
-
(new Int32Array(memory.buffer
|
20
|
+
(new Int32Array(memory.buffer, ptr, 1))[0] = length;
|
21
21
|
|
22
22
|
const arr = new Uint8Array(memory.buffer, ptr + 4, length);
|
23
23
|
for (let i = 0; i < length; i++) {
|
@@ -46,17 +46,17 @@ const porfToJSValue = ({ memory, funcs, pages }, value, type) => {
|
|
46
46
|
}
|
47
47
|
|
48
48
|
case TYPES.string: {
|
49
|
-
const length = (new Int32Array(memory.buffer
|
49
|
+
const length = (new Int32Array(memory.buffer, value, 1))[0];
|
50
50
|
return Array.from(new Uint16Array(memory.buffer, value + 4, length)).map(x => String.fromCharCode(x)).join('');
|
51
51
|
}
|
52
52
|
|
53
53
|
case TYPES.bytestring: {
|
54
|
-
const length = (new Int32Array(memory.buffer
|
54
|
+
const length = (new Int32Array(memory.buffer, value, 1))[0];
|
55
55
|
return Array.from(new Uint8Array(memory.buffer, value + 4, length)).map(x => String.fromCharCode(x)).join('');
|
56
56
|
}
|
57
57
|
|
58
58
|
case TYPES.array: {
|
59
|
-
const length = (new Int32Array(memory.buffer
|
59
|
+
const length = (new Int32Array(memory.buffer, value, 1))[0];
|
60
60
|
|
61
61
|
const out = [];
|
62
62
|
for (let i = 0; i < length; i++) {
|
@@ -77,12 +77,12 @@ const porfToJSValue = ({ memory, funcs, pages }, value, type) => {
|
|
77
77
|
}
|
78
78
|
|
79
79
|
case TYPES.date: {
|
80
|
-
const t = (new Float64Array(memory.buffer
|
80
|
+
const t = (new Float64Array(memory.buffer, value, 1))[0];
|
81
81
|
return new Date(t);
|
82
82
|
}
|
83
83
|
|
84
84
|
case TYPES.set: {
|
85
|
-
const size = (new Int32Array(memory.buffer
|
85
|
+
const size = (new Int32Array(memory.buffer, value, 1))[0];
|
86
86
|
|
87
87
|
const out = new Set();
|
88
88
|
for (let i = 0; i < size; i++) {
|
@@ -102,17 +102,18 @@ const porfToJSValue = ({ memory, funcs, pages }, value, type) => {
|
|
102
102
|
return out;
|
103
103
|
}
|
104
104
|
|
105
|
-
|
106
|
-
|
107
|
-
|
105
|
+
case TYPES.symbol: {
|
106
|
+
const descStore = pages.get('bytestring: __Porffor_symbol_descStore/ptr').ind * pageSize;
|
107
|
+
if (!descStore) return Symbol();
|
108
108
|
|
109
|
-
|
110
|
-
// const t = (new Uint8Array(memory.buffer, offset + 8, 1))[0];
|
109
|
+
const offset = descStore + 4 + ((value - 1) * 9);
|
111
110
|
|
112
|
-
|
111
|
+
const v = (new Float64Array(memory.buffer.slice(offset, offset + 8), 0, 1))[0];
|
112
|
+
const t = (new Uint8Array(memory.buffer, offset + 8, 1))[0];
|
113
113
|
|
114
|
-
|
115
|
-
|
114
|
+
const desc = porfToJSValue({ memory, funcs, pages }, v, t);
|
115
|
+
return Symbol(desc);
|
116
|
+
}
|
116
117
|
|
117
118
|
default: return value;
|
118
119
|
}
|
package/package.json
CHANGED