porffor 0.35.1 → 0.35.2

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.
@@ -1,59 +1,14 @@
1
1
  export default () => {
2
- let out = `// @porf --funsafe-no-unlikely-proto-checks --valtype=i32
3
- `;
4
-
2
+ let out = ``;
5
3
  const noArgs = (a0, a1) => out += `
6
- export const __String_prototype_${a0} = (_this: string) => {
7
- let out: string = Porffor.s\`<${a1}>\`;
8
-
9
- let outPtr: i32 = Porffor.wasm\`local.get \${out}\` + ${(2 + a1.length) * 2};
10
- let thisPtr: i32 = Porffor.wasm\`local.get \${_this}\`;
11
- let thisLen: i32 = _this.length;
12
- let endPtr: i32 = thisPtr + thisLen * 2;
13
-
14
- while (thisPtr < endPtr) {
15
- let chr: i32 = Porffor.wasm.i32.load16_u(thisPtr, 0, 4);
16
- Porffor.wasm.i32.store16(outPtr, chr, 0, 4);
17
-
18
- thisPtr += 2;
19
- outPtr += 2;
20
- }
21
-
22
- Porffor.wasm.i32.store16(outPtr, 60, 0, 4); // <
23
- Porffor.wasm.i32.store16(outPtr, 47, 0, 6); // /
24
-
25
- ${[...a1].map((x, i) => ` Porffor.wasm.i32.store16(outPtr, ${x.charCodeAt(0)}, 0, ${8 + i * 2}); // ${x}`).join('\n')}
26
-
27
- Porffor.wasm.i32.store16(outPtr, 62, 0, ${8 + a1.length * 2}); // >
28
-
29
- out.length = thisLen + ${a1.length * 2 + 2 + 3};
30
-
31
- return out;
32
- };
33
- export const __ByteString_prototype_${a0} = (_this: bytestring) => {
34
- let out: bytestring = Porffor.bs\`<${a1}>\`;
35
-
36
- let outPtr: i32 = Porffor.wasm\`local.get \${out}\` + ${2 + a1.length};
37
- let thisPtr: i32 = Porffor.wasm\`local.get \${_this}\`;
38
- let thisLen: i32 = _this.length;
39
- let endPtr: i32 = thisPtr + thisLen;
40
-
41
- while (thisPtr < endPtr) {
42
- let chr: i32 = Porffor.wasm.i32.load8_u(thisPtr++, 0, 4);
43
- Porffor.wasm.i32.store8(outPtr++, chr, 0, 4);
44
- }
45
-
46
- Porffor.wasm.i32.store8(outPtr, 60, 0, 4); // <
47
- Porffor.wasm.i32.store8(outPtr, 47, 0, 5); // /
48
-
49
- ${[...a1].map((x, i) => ` Porffor.wasm.i32.store8(outPtr, ${x.charCodeAt(0)}, 0, ${6 + i}); // ${x}`).join('\n')}
50
-
51
- Porffor.wasm.i32.store8(outPtr, 62, 0, ${6 + a1.length}); // >
4
+ export const __String_prototype_${a0} = (_this: any) => {
5
+ const pre: bytestring = '<${a1}>';
6
+ const post: bytestring = '</${a1}>';
52
7
 
53
- out.length = thisLen + ${a1.length * 2 + 2 + 3};
54
-
55
- return out;
8
+ return Porffor.concatStrings(Porffor.concatStrings(pre, _this), post);
56
9
  };
10
+ export const __ByteString_prototype_${a0} = (_this: any) =>
11
+ __String_prototype_${a0}(_this);
57
12
  `;
58
13
 
59
14
  noArgs('big', 'big');
@@ -67,69 +22,15 @@ ${[...a1].map((x, i) => ` Porffor.wasm.i32.store8(outPtr, ${x.charCodeAt(0)}, 0
67
22
  noArgs('sup', 'sup');
68
23
 
69
24
  const arg = (name, s1, s2) => out += `
70
- export const __String_prototype_${name} = (_this: string, arg: any) => {
71
- let out: string = Porffor.s\`${`<${s1} ${s2}="`}\`;
72
- out += arg;
73
-
74
- let outPtr: i32 = Porffor.wasm\`local.get \${out}\` + ${(`<${s1} ${s2}="`.length + 2) * 2} + arg.length * 2;
75
-
76
- Porffor.wasm.i32.store16(outPtr, 34, 0, 0); // "
77
- Porffor.wasm.i32.store16(outPtr, 62, 0, 2); // >
78
-
79
- let thisPtr: i32 = Porffor.wasm\`local.get \${_this}\`;
80
- let thisLen: i32 = _this.length;
81
- let endPtr: i32 = thisPtr + thisLen * 2;
25
+ export const __String_prototype_${name} = (_this: any, arg: any) => {
26
+ const pre1: bytestring = '<${s1} ${s2}="';
27
+ const pre2: bytestring = '">';
28
+ const post: bytestring = '</${s1}>';
82
29
 
83
- while (thisPtr < endPtr) {
84
- let chr: i32 = Porffor.wasm.i32.load16_u(thisPtr, 0, 4);
85
- Porffor.wasm.i32.store16(outPtr, chr, 0, 4);
86
-
87
- thisPtr += 2;
88
- outPtr += 2;
89
- }
90
-
91
- Porffor.wasm.i32.store16(outPtr, 60, 0, 4); // <
92
- Porffor.wasm.i32.store16(outPtr, 47, 0, 6); // /
93
-
94
- ${[...s1].map((x, i) => ` Porffor.wasm.i32.store16(outPtr, ${x.charCodeAt(0)}, 0, ${8 + i * 2}); // ${x}`).join('\n')}
95
-
96
- Porffor.wasm.i32.store16(outPtr, 62, 0, ${8 + s1.length * 2}); // >
97
-
98
- out.length = thisLen + arg.length + ${`<${s1} ${s2}="`.length + s1.length + 5};
99
-
100
- return out;
101
- };
102
- export const __ByteString_prototype_${name} = (_this: bytestring, arg: any) => {
103
- let out: string = Porffor.s\`${`<${s1} ${s2}="`}\`;
104
- out += arg;
105
-
106
- let outPtr: i32 = Porffor.wasm\`local.get \${out}\` + ${(`<${s1} ${s2}="`.length + 2) * 2} + arg.length * 2;
107
-
108
- Porffor.wasm.i32.store16(outPtr, 34, 0, 0); // "
109
- Porffor.wasm.i32.store16(outPtr, 62, 0, 2); // >
110
-
111
- let thisPtr: i32 = Porffor.wasm\`local.get \${_this}\`;
112
- let thisLen: i32 = _this.length;
113
- let endPtr: i32 = thisPtr + thisLen;
114
-
115
- while (thisPtr < endPtr) {
116
- let chr: i32 = Porffor.wasm.i32.load8_u(thisPtr++, 0, 4);
117
- Porffor.wasm.i32.store16(outPtr, chr, 0, 4);
118
-
119
- outPtr += 2;
120
- }
121
-
122
- Porffor.wasm.i32.store16(outPtr, 60, 0, 4); // <
123
- Porffor.wasm.i32.store16(outPtr, 47, 0, 6); // /
124
-
125
- ${[...s1].map((x, i) => ` Porffor.wasm.i32.store16(outPtr, ${x.charCodeAt(0)}, 0, ${8 + i * 2}); // ${x}`).join('\n')}
126
-
127
- Porffor.wasm.i32.store16(outPtr, 62, 0, ${8 + s1.length * 2}); // >
128
-
129
- out.length = thisLen + arg.length + ${`<${s1} ${s2}="`.length + s1.length + 5};
130
-
131
- return out;
30
+ return Porffor.concatStrings(Porffor.concatStrings(Porffor.concatStrings(Porffor.concatStrings(pre1, arg), pre2), _this), post);
132
31
  };
32
+ export const __ByteString_prototype_${name} = (_this: any, arg: any) =>
33
+ __String_prototype_${name}(_this, arg);
133
34
  `;
134
35
 
135
36
  arg('fontcolor', 'font', 'color');
@@ -137,12 +38,10 @@ ${[...s1].map((x, i) => ` Porffor.wasm.i32.store16(outPtr, ${x.charCodeAt(0)},
137
38
  arg('anchor', 'a', 'name');
138
39
  arg('link', 'a', 'href');
139
40
 
140
- const prototypeAlias = (regular, annex) => `export const __String_prototype_${annex} = (_this: string) => {
141
- return __String_prototype_${regular}(_this);
142
- };
143
- export const __ByteString_prototype_${annex} = (_this: bytestring) => {
144
- return __ByteString_prototype_${regular}(_this);
145
- };
41
+ const prototypeAlias = (regular, annex) => `export const __String_prototype_${annex} = (_this: any) =>
42
+ __String_prototype_${regular}(_this);
43
+ export const __ByteString_prototype_${annex} = (_this: any) =>
44
+ __ByteString_prototype_${regular}(_this);
146
45
  `;
147
46
 
148
47
  prototypeAlias('trimStart', 'trimLeft');
@@ -160,19 +160,19 @@ export const BuiltinFuncs = function() {
160
160
  // add bitwise ops by converting operands to i32 first
161
161
  for (const [ char, op ] of [ ['&', Opcodes.i32_and], ['|', Opcodes.i32_or], ['^', Opcodes.i32_xor], ['<<', Opcodes.i32_shl], ['>>', Opcodes.i32_shr_s], ['>>>', Opcodes.i32_shr_u] ]) {
162
162
  this[`f64_${char}`] = {
163
- params: [ valtypeBinary, valtypeBinary ],
163
+ params: [ Valtype.f64, Valtype.f64 ],
164
164
  locals: [],
165
- returns: [ valtypeBinary ],
165
+ returns: [ Valtype.f64 ],
166
166
  returnType: TYPES.number,
167
167
  wasm: [
168
168
  [ Opcodes.local_get, 0 ],
169
- Opcodes.i32_to,
169
+ Opcodes.i32_trunc_sat_f64_s,
170
170
 
171
171
  [ Opcodes.local_get, 1 ],
172
- Opcodes.i32_to,
172
+ Opcodes.i32_trunc_sat_f64_s,
173
173
 
174
174
  [ op ],
175
- Opcodes.i32_from
175
+ [ Opcodes.f64_convert_i32_s ]
176
176
  ]
177
177
  };
178
178
  }
@@ -136,160 +136,147 @@ params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
136
136
  locals:[124,124,127],localNames:["a","a#type","b","b#type","at","bt","#last_type"],
137
137
  };
138
138
  this.__String_prototype_big = {
139
- wasm:(_,{allocPage})=>[...number(allocPage(_,'string: __String_prototype_big/out','i16'),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,226,0],[59,0,8],[32,3],[65,233,0],[59,0,10],[32,3],[65,231,0],[59,0,12],[32,3],[65,62],[59,0,14],[32,2],[34,9],[32,5],[65,11],[106],[34,8],[54,1,0],[32,2],[65,195,0],[15]],
140
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
141
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
142
- data:{"string: __String_prototype_big/out":[5,0,0,0,60,0,98,0,105,0,103,0,62,0]},
139
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_big/pre','i8'),124),[33,2],...number(allocPage(_,'bytestring: __String_prototype_big/post','i8'),124),[33,3],[32,2],[65,195,1],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,4],[32,3],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,4],[15]],
140
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
141
+ locals:[124,124,127],localNames:["_this","_this#type","pre","post","#last_type"],
142
+ data:{"bytestring: __String_prototype_big/pre":[5,0,0,0,60,98,105,103,62],"bytestring: __String_prototype_big/post":[6,0,0,0,60,47,98,105,103,62]},
143
143
  };
144
144
  this.__ByteString_prototype_big = {
145
- wasm:(_,{allocPage})=>[...number(allocPage(_,'bytestring: __ByteString_prototype_big/out','i8'),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],[34,9],[32,5],[65,11],[106],[34,8],[54,1,0],[32,2],[65,195,1],[15]],
146
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
147
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
148
- data:{"bytestring: __ByteString_prototype_big/out":[5,0,0,0,60,98,105,103,62]},
145
+ wasm:(_,{builtin})=>[[32,0],[32,1],[16,builtin('__String_prototype_big')],[34,2],[15]],
146
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
147
+ locals:[127],localNames:["_this","_this#type","#last_type"],
149
148
  };
150
149
  this.__String_prototype_blink = {
151
- wasm:(_,{allocPage})=>[...number(allocPage(_,'string: __String_prototype_blink/out','i16'),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],[34,9],[32,5],[65,15],[106],[34,8],[54,1,0],[32,2],[65,195,0],[15]],
152
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
153
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
154
- data:{"string: __String_prototype_blink/out":[7,0,0,0,60,0,98,0,108,0,105,0,110,0,107,0,62,0]},
150
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_blink/pre','i8'),124),[33,2],...number(allocPage(_,'bytestring: __String_prototype_blink/post','i8'),124),[33,3],[32,2],[65,195,1],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,4],[32,3],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,4],[15]],
151
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
152
+ locals:[124,124,127],localNames:["_this","_this#type","pre","post","#last_type"],
153
+ data:{"bytestring: __String_prototype_blink/pre":[7,0,0,0,60,98,108,105,110,107,62],"bytestring: __String_prototype_blink/post":[8,0,0,0,60,47,98,108,105,110,107,62]},
155
154
  };
156
155
  this.__ByteString_prototype_blink = {
157
- wasm:(_,{allocPage})=>[...number(allocPage(_,'bytestring: __ByteString_prototype_blink/out','i8'),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],[34,9],[32,5],[65,15],[106],[34,8],[54,1,0],[32,2],[65,195,1],[15]],
158
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
159
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
160
- data:{"bytestring: __ByteString_prototype_blink/out":[7,0,0,0,60,98,108,105,110,107,62]},
156
+ wasm:(_,{builtin})=>[[32,0],[32,1],[16,builtin('__String_prototype_blink')],[34,2],[15]],
157
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
158
+ locals:[127],localNames:["_this","_this#type","#last_type"],
161
159
  };
162
160
  this.__String_prototype_bold = {
163
- wasm:(_,{allocPage})=>[...number(allocPage(_,'string: __String_prototype_bold/out','i16'),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],[34,9],[32,5],[65,7],[106],[34,8],[54,1,0],[32,2],[65,195,0],[15]],
164
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
165
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
166
- data:{"string: __String_prototype_bold/out":[3,0,0,0,60,0,98,0,62,0]},
161
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_bold/pre','i8'),124),[33,2],...number(allocPage(_,'bytestring: __String_prototype_bold/post','i8'),124),[33,3],[32,2],[65,195,1],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,4],[32,3],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,4],[15]],
162
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
163
+ locals:[124,124,127],localNames:["_this","_this#type","pre","post","#last_type"],
164
+ data:{"bytestring: __String_prototype_bold/pre":[3,0,0,0,60,98,62],"bytestring: __String_prototype_bold/post":[4,0,0,0,60,47,98,62]},
167
165
  };
168
166
  this.__ByteString_prototype_bold = {
169
- wasm:(_,{allocPage})=>[...number(allocPage(_,'bytestring: __ByteString_prototype_bold/out','i8'),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],[34,9],[32,5],[65,7],[106],[34,8],[54,1,0],[32,2],[65,195,1],[15]],
170
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
171
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
172
- data:{"bytestring: __ByteString_prototype_bold/out":[3,0,0,0,60,98,62]},
167
+ wasm:(_,{builtin})=>[[32,0],[32,1],[16,builtin('__String_prototype_bold')],[34,2],[15]],
168
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
169
+ locals:[127],localNames:["_this","_this#type","#last_type"],
173
170
  };
174
171
  this.__String_prototype_fixed = {
175
- wasm:(_,{allocPage})=>[...number(allocPage(_,'string: __String_prototype_fixed/out','i16'),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],[34,9],[32,5],[65,9],[106],[34,8],[54,1,0],[32,2],[65,195,0],[15]],
176
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
177
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
178
- data:{"string: __String_prototype_fixed/out":[4,0,0,0,60,0,116,0,116,0,62,0]},
172
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_fixed/pre','i8'),124),[33,2],...number(allocPage(_,'bytestring: __String_prototype_fixed/post','i8'),124),[33,3],[32,2],[65,195,1],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,4],[32,3],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,4],[15]],
173
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
174
+ locals:[124,124,127],localNames:["_this","_this#type","pre","post","#last_type"],
175
+ data:{"bytestring: __String_prototype_fixed/pre":[4,0,0,0,60,116,116,62],"bytestring: __String_prototype_fixed/post":[5,0,0,0,60,47,116,116,62]},
179
176
  };
180
177
  this.__ByteString_prototype_fixed = {
181
- wasm:(_,{allocPage})=>[...number(allocPage(_,'bytestring: __ByteString_prototype_fixed/out','i8'),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],[34,9],[32,5],[65,9],[106],[34,8],[54,1,0],[32,2],[65,195,1],[15]],
182
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
183
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
184
- data:{"bytestring: __ByteString_prototype_fixed/out":[4,0,0,0,60,116,116,62]},
178
+ wasm:(_,{builtin})=>[[32,0],[32,1],[16,builtin('__String_prototype_fixed')],[34,2],[15]],
179
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
180
+ locals:[127],localNames:["_this","_this#type","#last_type"],
185
181
  };
186
182
  this.__String_prototype_italics = {
187
- wasm:(_,{allocPage})=>[...number(allocPage(_,'string: __String_prototype_italics/out','i16'),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],[34,9],[32,5],[65,7],[106],[34,8],[54,1,0],[32,2],[65,195,0],[15]],
188
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
189
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
190
- data:{"string: __String_prototype_italics/out":[3,0,0,0,60,0,105,0,62,0]},
183
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_italics/pre','i8'),124),[33,2],...number(allocPage(_,'bytestring: __String_prototype_italics/post','i8'),124),[33,3],[32,2],[65,195,1],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,4],[32,3],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,4],[15]],
184
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
185
+ locals:[124,124,127],localNames:["_this","_this#type","pre","post","#last_type"],
186
+ data:{"bytestring: __String_prototype_italics/pre":[3,0,0,0,60,105,62],"bytestring: __String_prototype_italics/post":[4,0,0,0,60,47,105,62]},
191
187
  };
192
188
  this.__ByteString_prototype_italics = {
193
- wasm:(_,{allocPage})=>[...number(allocPage(_,'bytestring: __ByteString_prototype_italics/out','i8'),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],[34,9],[32,5],[65,7],[106],[34,8],[54,1,0],[32,2],[65,195,1],[15]],
194
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
195
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
196
- data:{"bytestring: __ByteString_prototype_italics/out":[3,0,0,0,60,105,62]},
189
+ wasm:(_,{builtin})=>[[32,0],[32,1],[16,builtin('__String_prototype_italics')],[34,2],[15]],
190
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
191
+ locals:[127],localNames:["_this","_this#type","#last_type"],
197
192
  };
198
193
  this.__String_prototype_small = {
199
- wasm:(_,{allocPage})=>[...number(allocPage(_,'string: __String_prototype_small/out','i16'),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],[34,9],[32,5],[65,15],[106],[34,8],[54,1,0],[32,2],[65,195,0],[15]],
200
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
201
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
202
- data:{"string: __String_prototype_small/out":[7,0,0,0,60,0,115,0,109,0,97,0,108,0,108,0,62,0]},
194
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_small/pre','i8'),124),[33,2],...number(allocPage(_,'bytestring: __String_prototype_small/post','i8'),124),[33,3],[32,2],[65,195,1],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,4],[32,3],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,4],[15]],
195
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
196
+ locals:[124,124,127],localNames:["_this","_this#type","pre","post","#last_type"],
197
+ data:{"bytestring: __String_prototype_small/pre":[7,0,0,0,60,115,109,97,108,108,62],"bytestring: __String_prototype_small/post":[8,0,0,0,60,47,115,109,97,108,108,62]},
203
198
  };
204
199
  this.__ByteString_prototype_small = {
205
- wasm:(_,{allocPage})=>[...number(allocPage(_,'bytestring: __ByteString_prototype_small/out','i8'),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],[34,9],[32,5],[65,15],[106],[34,8],[54,1,0],[32,2],[65,195,1],[15]],
206
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
207
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
208
- data:{"bytestring: __ByteString_prototype_small/out":[7,0,0,0,60,115,109,97,108,108,62]},
200
+ wasm:(_,{builtin})=>[[32,0],[32,1],[16,builtin('__String_prototype_small')],[34,2],[15]],
201
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
202
+ locals:[127],localNames:["_this","_this#type","#last_type"],
209
203
  };
210
204
  this.__String_prototype_strike = {
211
- wasm:(_,{allocPage})=>[...number(allocPage(_,'string: __String_prototype_strike/out','i16'),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],[34,9],[32,5],[65,17],[106],[34,8],[54,1,0],[32,2],[65,195,0],[15]],
212
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
213
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
214
- data:{"string: __String_prototype_strike/out":[8,0,0,0,60,0,115,0,116,0,114,0,105,0,107,0,101,0,62,0]},
205
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_strike/pre','i8'),124),[33,2],...number(allocPage(_,'bytestring: __String_prototype_strike/post','i8'),124),[33,3],[32,2],[65,195,1],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,4],[32,3],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,4],[15]],
206
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
207
+ locals:[124,124,127],localNames:["_this","_this#type","pre","post","#last_type"],
208
+ data:{"bytestring: __String_prototype_strike/pre":[8,0,0,0,60,115,116,114,105,107,101,62],"bytestring: __String_prototype_strike/post":[9,0,0,0,60,47,115,116,114,105,107,101,62]},
215
209
  };
216
210
  this.__ByteString_prototype_strike = {
217
- wasm:(_,{allocPage})=>[...number(allocPage(_,'bytestring: __ByteString_prototype_strike/out','i8'),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],[34,9],[32,5],[65,17],[106],[34,8],[54,1,0],[32,2],[65,195,1],[15]],
218
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
219
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
220
- data:{"bytestring: __ByteString_prototype_strike/out":[8,0,0,0,60,115,116,114,105,107,101,62]},
211
+ wasm:(_,{builtin})=>[[32,0],[32,1],[16,builtin('__String_prototype_strike')],[34,2],[15]],
212
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
213
+ locals:[127],localNames:["_this","_this#type","#last_type"],
221
214
  };
222
215
  this.__String_prototype_sub = {
223
- wasm:(_,{allocPage})=>[...number(allocPage(_,'string: __String_prototype_sub/out','i16'),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],[34,9],[32,5],[65,11],[106],[34,8],[54,1,0],[32,2],[65,195,0],[15]],
224
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
225
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
226
- data:{"string: __String_prototype_sub/out":[5,0,0,0,60,0,115,0,117,0,98,0,62,0]},
216
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_sub/pre','i8'),124),[33,2],...number(allocPage(_,'bytestring: __String_prototype_sub/post','i8'),124),[33,3],[32,2],[65,195,1],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,4],[32,3],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,4],[15]],
217
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
218
+ locals:[124,124,127],localNames:["_this","_this#type","pre","post","#last_type"],
219
+ data:{"bytestring: __String_prototype_sub/pre":[5,0,0,0,60,115,117,98,62],"bytestring: __String_prototype_sub/post":[6,0,0,0,60,47,115,117,98,62]},
227
220
  };
228
221
  this.__ByteString_prototype_sub = {
229
- wasm:(_,{allocPage})=>[...number(allocPage(_,'bytestring: __ByteString_prototype_sub/out','i8'),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],[34,9],[32,5],[65,11],[106],[34,8],[54,1,0],[32,2],[65,195,1],[15]],
230
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
231
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
232
- data:{"bytestring: __ByteString_prototype_sub/out":[5,0,0,0,60,115,117,98,62]},
222
+ wasm:(_,{builtin})=>[[32,0],[32,1],[16,builtin('__String_prototype_sub')],[34,2],[15]],
223
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
224
+ locals:[127],localNames:["_this","_this#type","#last_type"],
233
225
  };
234
226
  this.__String_prototype_sup = {
235
- wasm:(_,{allocPage})=>[...number(allocPage(_,'string: __String_prototype_sup/out','i16'),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],[34,9],[32,5],[65,11],[106],[34,8],[54,1,0],[32,2],[65,195,0],[15]],
236
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
237
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
238
- data:{"string: __String_prototype_sup/out":[5,0,0,0,60,0,115,0,117,0,112,0,62,0]},
227
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_sup/pre','i8'),124),[33,2],...number(allocPage(_,'bytestring: __String_prototype_sup/post','i8'),124),[33,3],[32,2],[65,195,1],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,4],[32,3],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,4],[15]],
228
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
229
+ locals:[124,124,127],localNames:["_this","_this#type","pre","post","#last_type"],
230
+ data:{"bytestring: __String_prototype_sup/pre":[5,0,0,0,60,115,117,112,62],"bytestring: __String_prototype_sup/post":[6,0,0,0,60,47,115,117,112,62]},
239
231
  };
240
232
  this.__ByteString_prototype_sup = {
241
- wasm:(_,{allocPage})=>[...number(allocPage(_,'bytestring: __ByteString_prototype_sup/out','i8'),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],[34,9],[32,5],[65,11],[106],[34,8],[54,1,0],[32,2],[65,195,1],[15]],
242
- params:[127,127],typedParams:1,returns:[127,127],typedReturns:1,
243
- locals:[127,127,127,127,127,127,127,127],localNames:["_this","_this#type","out","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
244
- data:{"bytestring: __ByteString_prototype_sup/out":[5,0,0,0,60,115,117,112,62]},
233
+ wasm:(_,{builtin})=>[[32,0],[32,1],[16,builtin('__String_prototype_sup')],[34,2],[15]],
234
+ params:[124,127],typedParams:1,returns:[124,127],typedReturns:1,
235
+ locals:[127],localNames:["_this","_this#type","#last_type"],
245
236
  };
246
237
  this.__String_prototype_fontcolor = {
247
- wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'string: __String_prototype_fontcolor/out','i16'),127),[34,4],[183],[65,195,0],[32,2],[183],[32,3],[16,builtin('__Porffor_concatStrings')],[33,5],[252,3],[34,4],[65,30],[106],[32,2],[40,1,0],[65,2],[108],[106],[34,6],[65,34],[59,0,0],[32,6],[65,62],[59,0,2],[32,0],[33,7],[32,0],[40,1,0],[33,8],[32,7],[32,8],[65,2],[108],[106],[33,9],[3,64],[32,7],[32,9],[72],[4,64],[32,7],[47,0,4],[33,10],[32,6],[32,10],[59,0,4],[32,7],[65,2],[106],[33,7],[32,6],[65,2],[106],[33,6],[12,1],[11],[11],[32,6],[65,60],[59,0,4],[32,6],[65,47],[59,0,6],[32,6],[65,230,0],[59,0,8],[32,6],[65,239,0],[59,0,10],[32,6],[65,238,0],[59,0,12],[32,6],[65,244,0],[59,0,14],[32,6],[65,62],[59,0,16],[32,4],[34,12],[32,8],[32,2],[40,1,0],[106],[65,22],[106],[34,11],[54,1,0],[32,4],[65,195,0],[15]],
248
- params:[127,127,127,127],typedParams:1,returns:[127,127],typedReturns:1,
249
- locals:[127,127,127,127,127,127,127,127,127],localNames:["_this","_this#type","arg","arg#type","out","#last_type","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
250
- data:{"string: __String_prototype_fontcolor/out":[13,0,0,0,60,0,102,0,111,0,110,0,116,0,32,0,99,0,111,0,108,0,111,0,114,0,61,0,34,0]},
238
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_fontcolor/pre1','i8'),124),[33,4],...number(allocPage(_,'bytestring: __String_prototype_fontcolor/pre2','i8'),124),[33,5],...number(allocPage(_,'bytestring: __String_prototype_fontcolor/post','i8'),124),[33,6],[32,4],[65,195,1],[32,2],[32,3],[16,builtin('__Porffor_concatStrings')],[34,7],[32,5],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,7],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,7],[32,6],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,7],[15]],
239
+ params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
240
+ locals:[124,124,124,127],localNames:["_this","_this#type","arg","arg#type","pre1","pre2","post","#last_type"],
241
+ data:{"bytestring: __String_prototype_fontcolor/pre1":[13,0,0,0,60,102,111,110,116,32,99,111,108,111,114,61,34],"bytestring: __String_prototype_fontcolor/pre2":[2,0,0,0,34,62],"bytestring: __String_prototype_fontcolor/post":[7,0,0,0,60,47,102,111,110,116,62]},
251
242
  };
252
243
  this.__ByteString_prototype_fontcolor = {
253
- wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'string: __ByteString_prototype_fontcolor/out','i16'),127),[34,4],[183],[65,195,0],[32,2],[183],[32,3],[16,builtin('__Porffor_concatStrings')],[33,5],[252,3],[34,4],[65,30],[106],[32,2],[40,1,0],[65,2],[108],[106],[34,6],[65,34],[59,0,0],[32,6],[65,62],[59,0,2],[32,0],[33,7],[32,0],[40,1,0],[33,8],[32,7],[32,8],[106],[33,9],[3,64],[32,7],[32,9],[72],[4,64],[32,7],[32,7],[65,1],[106],[33,7],[45,0,4],[33,10],[32,6],[32,10],[59,0,4],[32,6],[65,2],[106],[33,6],[12,1],[11],[11],[32,6],[65,60],[59,0,4],[32,6],[65,47],[59,0,6],[32,6],[65,230,0],[59,0,8],[32,6],[65,239,0],[59,0,10],[32,6],[65,238,0],[59,0,12],[32,6],[65,244,0],[59,0,14],[32,6],[65,62],[59,0,16],[32,4],[34,12],[32,8],[32,2],[40,1,0],[106],[65,22],[106],[34,11],[54,1,0],[32,4],[65,195,0],[15]],
254
- params:[127,127,127,127],typedParams:1,returns:[127,127],typedReturns:1,
255
- locals:[127,127,127,127,127,127,127,127,127],localNames:["_this","_this#type","arg","arg#type","out","#last_type","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
256
- data:{"string: __ByteString_prototype_fontcolor/out":[13,0,0,0,60,0,102,0,111,0,110,0,116,0,32,0,99,0,111,0,108,0,111,0,114,0,61,0,34,0]},
244
+ wasm:(_,{builtin})=>[[32,0],[32,1],[32,2],[32,3],[16,builtin('__String_prototype_fontcolor')],[34,4],[15]],
245
+ params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
246
+ locals:[127],localNames:["_this","_this#type","arg","arg#type","#last_type"],
257
247
  };
258
248
  this.__String_prototype_fontsize = {
259
- wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'string: __String_prototype_fontsize/out','i16'),127),[34,4],[183],[65,195,0],[32,2],[183],[32,3],[16,builtin('__Porffor_concatStrings')],[33,5],[252,3],[34,4],[65,28],[106],[32,2],[40,1,0],[65,2],[108],[106],[34,6],[65,34],[59,0,0],[32,6],[65,62],[59,0,2],[32,0],[33,7],[32,0],[40,1,0],[33,8],[32,7],[32,8],[65,2],[108],[106],[33,9],[3,64],[32,7],[32,9],[72],[4,64],[32,7],[47,0,4],[33,10],[32,6],[32,10],[59,0,4],[32,7],[65,2],[106],[33,7],[32,6],[65,2],[106],[33,6],[12,1],[11],[11],[32,6],[65,60],[59,0,4],[32,6],[65,47],[59,0,6],[32,6],[65,230,0],[59,0,8],[32,6],[65,239,0],[59,0,10],[32,6],[65,238,0],[59,0,12],[32,6],[65,244,0],[59,0,14],[32,6],[65,62],[59,0,16],[32,4],[34,12],[32,8],[32,2],[40,1,0],[106],[65,21],[106],[34,11],[54,1,0],[32,4],[65,195,0],[15]],
260
- params:[127,127,127,127],typedParams:1,returns:[127,127],typedReturns:1,
261
- locals:[127,127,127,127,127,127,127,127,127],localNames:["_this","_this#type","arg","arg#type","out","#last_type","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
262
- data:{"string: __String_prototype_fontsize/out":[12,0,0,0,60,0,102,0,111,0,110,0,116,0,32,0,115,0,105,0,122,0,101,0,61,0,34,0]},
249
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_fontsize/pre1','i8'),124),[33,4],...number(allocPage(_,'bytestring: __String_prototype_fontsize/pre2','i8'),124),[33,5],...number(allocPage(_,'bytestring: __String_prototype_fontsize/post','i8'),124),[33,6],[32,4],[65,195,1],[32,2],[32,3],[16,builtin('__Porffor_concatStrings')],[34,7],[32,5],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,7],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,7],[32,6],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,7],[15]],
250
+ params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
251
+ locals:[124,124,124,127],localNames:["_this","_this#type","arg","arg#type","pre1","pre2","post","#last_type"],
252
+ data:{"bytestring: __String_prototype_fontsize/pre1":[12,0,0,0,60,102,111,110,116,32,115,105,122,101,61,34],"bytestring: __String_prototype_fontsize/pre2":[2,0,0,0,34,62],"bytestring: __String_prototype_fontsize/post":[7,0,0,0,60,47,102,111,110,116,62]},
263
253
  };
264
254
  this.__ByteString_prototype_fontsize = {
265
- wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'string: __ByteString_prototype_fontsize/out','i16'),127),[34,4],[183],[65,195,0],[32,2],[183],[32,3],[16,builtin('__Porffor_concatStrings')],[33,5],[252,3],[34,4],[65,28],[106],[32,2],[40,1,0],[65,2],[108],[106],[34,6],[65,34],[59,0,0],[32,6],[65,62],[59,0,2],[32,0],[33,7],[32,0],[40,1,0],[33,8],[32,7],[32,8],[106],[33,9],[3,64],[32,7],[32,9],[72],[4,64],[32,7],[32,7],[65,1],[106],[33,7],[45,0,4],[33,10],[32,6],[32,10],[59,0,4],[32,6],[65,2],[106],[33,6],[12,1],[11],[11],[32,6],[65,60],[59,0,4],[32,6],[65,47],[59,0,6],[32,6],[65,230,0],[59,0,8],[32,6],[65,239,0],[59,0,10],[32,6],[65,238,0],[59,0,12],[32,6],[65,244,0],[59,0,14],[32,6],[65,62],[59,0,16],[32,4],[34,12],[32,8],[32,2],[40,1,0],[106],[65,21],[106],[34,11],[54,1,0],[32,4],[65,195,0],[15]],
266
- params:[127,127,127,127],typedParams:1,returns:[127,127],typedReturns:1,
267
- locals:[127,127,127,127,127,127,127,127,127],localNames:["_this","_this#type","arg","arg#type","out","#last_type","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
268
- data:{"string: __ByteString_prototype_fontsize/out":[12,0,0,0,60,0,102,0,111,0,110,0,116,0,32,0,115,0,105,0,122,0,101,0,61,0,34,0]},
255
+ wasm:(_,{builtin})=>[[32,0],[32,1],[32,2],[32,3],[16,builtin('__String_prototype_fontsize')],[34,4],[15]],
256
+ params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
257
+ locals:[127],localNames:["_this","_this#type","arg","arg#type","#last_type"],
269
258
  };
270
259
  this.__String_prototype_anchor = {
271
- wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'string: __String_prototype_anchor/out','i16'),127),[34,4],[183],[65,195,0],[32,2],[183],[32,3],[16,builtin('__Porffor_concatStrings')],[33,5],[252,3],[34,4],[65,22],[106],[32,2],[40,1,0],[65,2],[108],[106],[34,6],[65,34],[59,0,0],[32,6],[65,62],[59,0,2],[32,0],[33,7],[32,0],[40,1,0],[33,8],[32,7],[32,8],[65,2],[108],[106],[33,9],[3,64],[32,7],[32,9],[72],[4,64],[32,7],[47,0,4],[33,10],[32,6],[32,10],[59,0,4],[32,7],[65,2],[106],[33,7],[32,6],[65,2],[106],[33,6],[12,1],[11],[11],[32,6],[65,60],[59,0,4],[32,6],[65,47],[59,0,6],[32,6],[65,225,0],[59,0,8],[32,6],[65,62],[59,0,10],[32,4],[34,12],[32,8],[32,2],[40,1,0],[106],[65,15],[106],[34,11],[54,1,0],[32,4],[65,195,0],[15]],
272
- params:[127,127,127,127],typedParams:1,returns:[127,127],typedReturns:1,
273
- locals:[127,127,127,127,127,127,127,127,127],localNames:["_this","_this#type","arg","arg#type","out","#last_type","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
274
- data:{"string: __String_prototype_anchor/out":[9,0,0,0,60,0,97,0,32,0,110,0,97,0,109,0,101,0,61,0,34,0]},
260
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_anchor/pre1','i8'),124),[33,4],...number(allocPage(_,'bytestring: __String_prototype_anchor/pre2','i8'),124),[33,5],...number(allocPage(_,'bytestring: __String_prototype_anchor/post','i8'),124),[33,6],[32,4],[65,195,1],[32,2],[32,3],[16,builtin('__Porffor_concatStrings')],[34,7],[32,5],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,7],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,7],[32,6],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,7],[15]],
261
+ params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
262
+ locals:[124,124,124,127],localNames:["_this","_this#type","arg","arg#type","pre1","pre2","post","#last_type"],
263
+ data:{"bytestring: __String_prototype_anchor/pre1":[9,0,0,0,60,97,32,110,97,109,101,61,34],"bytestring: __String_prototype_anchor/pre2":[2,0,0,0,34,62],"bytestring: __String_prototype_anchor/post":[4,0,0,0,60,47,97,62]},
275
264
  };
276
265
  this.__ByteString_prototype_anchor = {
277
- wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'string: __ByteString_prototype_anchor/out','i16'),127),[34,4],[183],[65,195,0],[32,2],[183],[32,3],[16,builtin('__Porffor_concatStrings')],[33,5],[252,3],[34,4],[65,22],[106],[32,2],[40,1,0],[65,2],[108],[106],[34,6],[65,34],[59,0,0],[32,6],[65,62],[59,0,2],[32,0],[33,7],[32,0],[40,1,0],[33,8],[32,7],[32,8],[106],[33,9],[3,64],[32,7],[32,9],[72],[4,64],[32,7],[32,7],[65,1],[106],[33,7],[45,0,4],[33,10],[32,6],[32,10],[59,0,4],[32,6],[65,2],[106],[33,6],[12,1],[11],[11],[32,6],[65,60],[59,0,4],[32,6],[65,47],[59,0,6],[32,6],[65,225,0],[59,0,8],[32,6],[65,62],[59,0,10],[32,4],[34,12],[32,8],[32,2],[40,1,0],[106],[65,15],[106],[34,11],[54,1,0],[32,4],[65,195,0],[15]],
278
- params:[127,127,127,127],typedParams:1,returns:[127,127],typedReturns:1,
279
- locals:[127,127,127,127,127,127,127,127,127],localNames:["_this","_this#type","arg","arg#type","out","#last_type","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
280
- data:{"string: __ByteString_prototype_anchor/out":[9,0,0,0,60,0,97,0,32,0,110,0,97,0,109,0,101,0,61,0,34,0]},
266
+ wasm:(_,{builtin})=>[[32,0],[32,1],[32,2],[32,3],[16,builtin('__String_prototype_anchor')],[34,4],[15]],
267
+ params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
268
+ locals:[127],localNames:["_this","_this#type","arg","arg#type","#last_type"],
281
269
  };
282
270
  this.__String_prototype_link = {
283
- wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'string: __String_prototype_link/out','i16'),127),[34,4],[183],[65,195,0],[32,2],[183],[32,3],[16,builtin('__Porffor_concatStrings')],[33,5],[252,3],[34,4],[65,22],[106],[32,2],[40,1,0],[65,2],[108],[106],[34,6],[65,34],[59,0,0],[32,6],[65,62],[59,0,2],[32,0],[33,7],[32,0],[40,1,0],[33,8],[32,7],[32,8],[65,2],[108],[106],[33,9],[3,64],[32,7],[32,9],[72],[4,64],[32,7],[47,0,4],[33,10],[32,6],[32,10],[59,0,4],[32,7],[65,2],[106],[33,7],[32,6],[65,2],[106],[33,6],[12,1],[11],[11],[32,6],[65,60],[59,0,4],[32,6],[65,47],[59,0,6],[32,6],[65,225,0],[59,0,8],[32,6],[65,62],[59,0,10],[32,4],[34,12],[32,8],[32,2],[40,1,0],[106],[65,15],[106],[34,11],[54,1,0],[32,4],[65,195,0],[15]],
284
- params:[127,127,127,127],typedParams:1,returns:[127,127],typedReturns:1,
285
- locals:[127,127,127,127,127,127,127,127,127],localNames:["_this","_this#type","arg","arg#type","out","#last_type","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
286
- data:{"string: __String_prototype_link/out":[9,0,0,0,60,0,97,0,32,0,104,0,114,0,101,0,102,0,61,0,34,0]},
271
+ wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'bytestring: __String_prototype_link/pre1','i8'),124),[33,4],...number(allocPage(_,'bytestring: __String_prototype_link/pre2','i8'),124),[33,5],...number(allocPage(_,'bytestring: __String_prototype_link/post','i8'),124),[33,6],[32,4],[65,195,1],[32,2],[32,3],[16,builtin('__Porffor_concatStrings')],[34,7],[32,5],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,7],[32,0],[32,1],[16,builtin('__Porffor_concatStrings')],[34,7],[32,6],[65,195,1],[16,builtin('__Porffor_concatStrings')],[34,7],[15]],
272
+ params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
273
+ locals:[124,124,124,127],localNames:["_this","_this#type","arg","arg#type","pre1","pre2","post","#last_type"],
274
+ data:{"bytestring: __String_prototype_link/pre1":[9,0,0,0,60,97,32,104,114,101,102,61,34],"bytestring: __String_prototype_link/pre2":[2,0,0,0,34,62],"bytestring: __String_prototype_link/post":[4,0,0,0,60,47,97,62]},
287
275
  };
288
276
  this.__ByteString_prototype_link = {
289
- wasm:(_,{allocPage,builtin})=>[...number(allocPage(_,'string: __ByteString_prototype_link/out','i16'),127),[34,4],[183],[65,195,0],[32,2],[183],[32,3],[16,builtin('__Porffor_concatStrings')],[33,5],[252,3],[34,4],[65,22],[106],[32,2],[40,1,0],[65,2],[108],[106],[34,6],[65,34],[59,0,0],[32,6],[65,62],[59,0,2],[32,0],[33,7],[32,0],[40,1,0],[33,8],[32,7],[32,8],[106],[33,9],[3,64],[32,7],[32,9],[72],[4,64],[32,7],[32,7],[65,1],[106],[33,7],[45,0,4],[33,10],[32,6],[32,10],[59,0,4],[32,6],[65,2],[106],[33,6],[12,1],[11],[11],[32,6],[65,60],[59,0,4],[32,6],[65,47],[59,0,6],[32,6],[65,225,0],[59,0,8],[32,6],[65,62],[59,0,10],[32,4],[34,12],[32,8],[32,2],[40,1,0],[106],[65,15],[106],[34,11],[54,1,0],[32,4],[65,195,0],[15]],
290
- params:[127,127,127,127],typedParams:1,returns:[127,127],typedReturns:1,
291
- locals:[127,127,127,127,127,127,127,127,127],localNames:["_this","_this#type","arg","arg#type","out","#last_type","outPtr","thisPtr","thisLen","endPtr","chr","__length_setter_tmp","__member_setter_ptr_tmp"],
292
- data:{"string: __ByteString_prototype_link/out":[9,0,0,0,60,0,97,0,32,0,104,0,114,0,101,0,102,0,61,0,34,0]},
277
+ wasm:(_,{builtin})=>[[32,0],[32,1],[32,2],[32,3],[16,builtin('__String_prototype_link')],[34,4],[15]],
278
+ params:[124,127,124,127],typedParams:1,returns:[124,127],typedReturns:1,
279
+ locals:[127],localNames:["_this","_this#type","arg","arg#type","#last_type"],
293
280
  };
294
281
  this.__Array_isArray = {
295
282
  wasm:()=>[[32,1],[184],[68,80],[97],[184],[65,2],[15]],
@@ -183,6 +183,9 @@ const generate = (scope, decl, global = false, name = undefined, valueUnused = f
183
183
  case 'AwaitExpression':
184
184
  return cacheAst(decl, generateAwait(scope, decl));
185
185
 
186
+ case 'TemplateLiteral':
187
+ return cacheAst(decl, generateTemplate(scope, decl));
188
+
186
189
  case 'ExportNamedDeclaration':
187
190
  if (!decl.declaration) return todo(scope, 'unsupported export declaration');
188
191
 
@@ -722,8 +725,8 @@ const performOp = (scope, op, left, right, leftType, rightType, _global = false,
722
725
  return performLogicOp(scope, op, left, right, leftType, rightType);
723
726
  }
724
727
 
725
- const knownLeft = knownType(scope, leftType);
726
- const knownRight = knownType(scope, rightType);
728
+ const knownLeft = knownTypeWithGuess(scope, leftType);
729
+ const knownRight = knownTypeWithGuess(scope, rightType);
727
730
 
728
731
  const eqOp = ['==', '===', '!=', '!==', '>', '>=', '<', '<='].includes(op);
729
732
  const strictOp = op === '===' || op === '!==';
@@ -1213,6 +1216,7 @@ const setLastType = (scope, type = []) => [
1213
1216
  ];
1214
1217
 
1215
1218
  const getNodeType = (scope, node) => {
1219
+ let guess = null;
1216
1220
  const ret = (() => {
1217
1221
  if (node._type) return node._type;
1218
1222
  if (node.type === 'Literal') {
@@ -1338,17 +1342,20 @@ const getNodeType = (scope, node) => {
1338
1342
 
1339
1343
  const leftType = getNodeType(scope, node.left);
1340
1344
  const rightType = getNodeType(scope, node.right);
1341
- const knownLeft = knownType(scope, leftType);
1342
- const knownRight = knownType(scope, rightType);
1345
+ const knownLeft = knownTypeWithGuess(scope, leftType);
1346
+ const knownRight = knownTypeWithGuess(scope, rightType);
1343
1347
 
1344
1348
  if ((knownLeft != null || knownRight != null) && !(
1345
1349
  (knownLeft === TYPES.string || knownRight === TYPES.string) ||
1346
1350
  (knownLeft === TYPES.bytestring || knownRight === TYPES.bytestring)
1347
1351
  )) return TYPES.number;
1348
1352
 
1349
- // if (knownLeft === TYPES.string || knownRight === TYPES.string) return TYPES.string;
1350
- // if (knownLeft === TYPES.bytestring && knownRight === TYPES.bytestring) return TYPES.bytestring;
1351
- // if (knownLeft === TYPES.bytestring || knownRight === TYPES.bytestring) return TYPES.string;
1353
+ if (knownLeft === TYPES.string || knownRight === TYPES.string)
1354
+ return TYPES.string;
1355
+
1356
+ // guess bytestring, could really be bytestring or string
1357
+ if (knownLeft === TYPES.bytestring || knownRight === TYPES.bytestring)
1358
+ guess = TYPES.bytestring;
1352
1359
 
1353
1360
  if (scope.locals['#last_type']) return getLastType(scope);
1354
1361
 
@@ -1426,8 +1433,10 @@ const getNodeType = (scope, node) => {
1426
1433
  return TYPES.number;
1427
1434
  })();
1428
1435
 
1429
- if (typeof ret === 'number') return number(ret, Valtype.i32);
1430
- return ret;
1436
+ const out = typeof ret === 'number' ? number(ret, Valtype.i32) : ret;
1437
+ if (guess != null) out.guess = typeof guess === 'number' ? number(guess, Valtype.i32) : guess;
1438
+
1439
+ return out;
1431
1440
  };
1432
1441
 
1433
1442
  const generateLiteral = (scope, decl, global, name) => {
@@ -2557,6 +2566,13 @@ const knownType = (scope, type) => {
2557
2566
 
2558
2567
  return null;
2559
2568
  };
2569
+ const knownTypeWithGuess = (scope, type) => {
2570
+ let known = knownType(scope, type);
2571
+ if (known != null) return known;
2572
+
2573
+ if (type.guess != null) return knownType(scope, type.guess);
2574
+ return known;
2575
+ };
2560
2576
 
2561
2577
  const brTable = (input, bc, returns) => {
2562
2578
  const out = [];
@@ -5663,6 +5679,38 @@ const generateClass = (scope, decl) => {
5663
5679
  return out;
5664
5680
  };
5665
5681
 
5682
+ export const generateTemplate = (scope, decl) => {
5683
+ let current = null;
5684
+ const append = val => {
5685
+ // console.log(val);
5686
+ if (!current) {
5687
+ current = val;
5688
+ return;
5689
+ }
5690
+
5691
+ current = {
5692
+ type: 'BinaryExpression',
5693
+ operator: '+',
5694
+ left: current,
5695
+ right: val
5696
+ };
5697
+ };
5698
+
5699
+ const { expressions, quasis } = decl;
5700
+ for (let i = 0; i < quasis.length; i++) {
5701
+ append({
5702
+ type: 'Literal',
5703
+ value: quasis[i].value.cooked
5704
+ });
5705
+
5706
+ if (i < expressions.length) {
5707
+ append(expressions[i]);
5708
+ }
5709
+ }
5710
+
5711
+ return generate(scope, current);
5712
+ };
5713
+
5666
5714
  globalThis._uniqId = 0;
5667
5715
  const uniqId = () => '_' + globalThis._uniqId++;
5668
5716
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "a basic experimental wip aot optimizing js -> wasm engine/compiler/runtime in js",
4
- "version": "0.35.1+160a05475",
4
+ "version": "0.35.2+e15887a34",
5
5
  "author": "CanadaHonk",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runner/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.35.1+160a05475';
3
+ globalThis.version = '0.35.2+e15887a34';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {
package/runner/repl.js CHANGED
@@ -61,7 +61,10 @@ const memoryToString = mem => {
61
61
  out += ` \x1B[34m${name}${' '.repeat(longestName - name.length)} \x1B[90m│\x1B[0m \x1B[36m${type}${' '.repeat(longestType - type.length)} \x1B[90m│\x1B[0m `;
62
62
  }
63
63
 
64
- for (let j = 0; j < 40; j++) {
64
+ let j = 0;
65
+ if (i === 0) j = 16;
66
+ const end = j + 40;
67
+ for (; j < end; j++) {
65
68
  const val = buf[i * pageSize + j];
66
69
  // if (val === 0) out += '\x1B[2m';
67
70
  if (val === 0) out += '\x1B[90m';