porffor 0.28.12 → 0.28.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/builtins/console.ts +11 -12
- package/compiler/builtins_precompiled.js +121 -121
- package/compiler/codegen.js +321 -273
- package/compiler/opt.js +3 -0
- package/package.json +1 -1
- package/runner/index.js +1 -1
@@ -150,16 +150,16 @@ export const __Porffor_print = (arg: any, colors: boolean = true) => {
|
|
150
150
|
if (arg) {
|
151
151
|
Porffor.printStatic('{\n');
|
152
152
|
|
153
|
-
const keys = Object.keys(arg);
|
154
|
-
const len = keys.length - 1;
|
153
|
+
const keys: any[] = Object.keys(arg);
|
154
|
+
const len: i32 = keys.length - 1;
|
155
155
|
for (let i: i32 = 0; i <= len; i++) {
|
156
|
-
const x = keys[i];
|
156
|
+
const x: any = keys[i];
|
157
157
|
|
158
158
|
Porffor.printStatic(' ');
|
159
159
|
__Porffor_printString(x);
|
160
160
|
|
161
161
|
Porffor.printStatic(': ');
|
162
|
-
__Porffor_print(arg
|
162
|
+
__Porffor_print(Porffor.object.get(arg, ecma262.ToPropertyKey(x)));
|
163
163
|
|
164
164
|
if (i != len) Porffor.printStatic(',\n');
|
165
165
|
}
|
@@ -174,9 +174,8 @@ export const __Porffor_print = (arg: any, colors: boolean = true) => {
|
|
174
174
|
return;
|
175
175
|
|
176
176
|
case Porffor.TYPES.function:
|
177
|
-
// todo: this actually doesn't work because we don't have function name information at runtime
|
178
177
|
Porffor.printStatic('[Function ');
|
179
|
-
__Porffor_printString(arg
|
178
|
+
__Porffor_printString(__Porffor_funcLut_name(arg));
|
180
179
|
Porffor.printStatic(']');
|
181
180
|
return;
|
182
181
|
|
@@ -271,11 +270,11 @@ export const __Porffor_print = (arg: any, colors: boolean = true) => {
|
|
271
270
|
case Porffor.TYPES.dataview:
|
272
271
|
Porffor.printStatic('DataView {\n');
|
273
272
|
Porffor.printStatic(' byteLength: ');
|
274
|
-
__Porffor_print(arg
|
273
|
+
__Porffor_print(__DataView_prototype_byteLength$get(arg), colors);
|
275
274
|
Porffor.printStatic(',\n byteOffset: ');
|
276
|
-
__Porffor_print(arg
|
275
|
+
__Porffor_print(__DataView_prototype_byteOffset$get(arg), colors);
|
277
276
|
Porffor.printStatic(',\n buffer: ');
|
278
|
-
__Porffor_print(arg
|
277
|
+
__Porffor_print(__DataView_prototype_buffer$get(arg), colors);
|
279
278
|
Porffor.printStatic('\n}');
|
280
279
|
return;
|
281
280
|
|
@@ -285,13 +284,13 @@ export const __Porffor_print = (arg: any, colors: boolean = true) => {
|
|
285
284
|
else Porffor.printStatic('Map');
|
286
285
|
Porffor.printStatic('(');
|
287
286
|
|
288
|
-
const map = __Map_prototype_keys(arg);
|
287
|
+
const map: any[] = __Map_prototype_keys(arg);
|
289
288
|
const mapLen: i32 = map.length - 1;
|
290
289
|
print(mapLen + 1);
|
291
290
|
Porffor.printStatic(') { ');
|
292
291
|
|
293
292
|
for (let i: i32 = 0; i < mapLen; i++) {
|
294
|
-
const key = map[i];
|
293
|
+
const key: any = map[i];
|
295
294
|
__Porffor_print(key);
|
296
295
|
Porffor.printStatic(' => ');
|
297
296
|
__Porffor_print(__Map_prototype_get(arg, key), colors);
|
@@ -307,7 +306,7 @@ export const __Porffor_print = (arg: any, colors: boolean = true) => {
|
|
307
306
|
else Porffor.printStatic('Set');
|
308
307
|
Porffor.printStatic('(');
|
309
308
|
|
310
|
-
const set = __Set_prototype_values(arg);
|
309
|
+
const set: any[] = __Set_prototype_values(arg);
|
311
310
|
const setLen: i32 = set.length - 1;
|
312
311
|
print(setLen + 1);
|
313
312
|
Porffor.printStatic(') { ');
|