porffor 0.55.2 → 0.55.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.fails.cjs CHANGED
@@ -1,13 +1,20 @@
1
1
  const all = require('./all.json').map(x => x.slice(21));
2
2
  const { passes } = require('./test262/results.json');
3
3
  const fails = all.filter(x => !passes.includes(x));
4
+ {
5
+ const dirs = Object.groupBy(fails, x => x.split('/').slice(0, 2).join('/'));
6
+ const top = Object.keys(dirs).sort((a, b) => dirs[b].length - dirs[a].length);
7
+ console.log(top.slice(0, 20).map(x => `${x}: ${dirs[x].length} (${((dirs[x].length / all.length) * 100).toFixed(2)}%)`).join('\n'));
8
+ }
9
+ console.log()
4
10
  {
5
11
  const dirs = Object.groupBy(fails, x => x.split('/').slice(0, 3).join('/'));
6
12
  const top = Object.keys(dirs).sort((a, b) => dirs[b].length - dirs[a].length);
7
- console.log(top.slice(0, 40).map(x => `${x}: ${dirs[x].length} (${((dirs[x].length / all.length) * 100).toFixed(2)}%)`).join('\n'));
13
+ console.log(top.slice(0, 20).map(x => `${x}: ${dirs[x].length} (${((dirs[x].length / all.length) * 100).toFixed(2)}%)`).join('\n'));
8
14
  }
15
+ console.log()
9
16
  {
10
17
  const dirs = Object.groupBy(fails, x => x.split('/').slice(0, 4).join('/'));
11
18
  const top = Object.keys(dirs).sort((a, b) => dirs[b].length - dirs[a].length);
12
- console.log(top.slice(0, 40).map(x => `${x}: ${dirs[x].length} (${((dirs[x].length / all.length) * 100).toFixed(2)}%)`).join('\n'));
19
+ console.log(top.slice(0, 20).map(x => `${x}: ${dirs[x].length} (${((dirs[x].length / all.length) * 100).toFixed(2)}%)`).join('\n'));
13
20
  }
@@ -306,6 +306,7 @@ export const __Porffor_object_writeKey = (ptr: i32, key: any): void => {
306
306
  Porffor.wasm.i32.store(ptr, keyEnc, 0, 0);
307
307
  };
308
308
 
309
+ // todo: check prototype for setters
309
310
  export const __Porffor_object_set = (obj: any, key: any, value: any): any => {
310
311
  if (Porffor.wasm`local.get ${obj+1}` != Porffor.TYPES.object) {
311
312
  obj = __Porffor_object_underlying(obj);
@@ -12,9 +12,17 @@ export const __Porffor_Generator_yield = (vals: any[], value: any): void => {
12
12
  vals.length = len + 1;
13
13
  };
14
14
 
15
+ export const __Porffor_Generator_return = (vals: any[], value: any): __Porffor_Generator => {
16
+ vals.length = 1;
17
+ vals[0] = value;
18
+
19
+ const gen: __Porffor_Generator = vals;
20
+ return gen;
21
+ };
22
+
15
23
  export const __Porffor_Generator_prototype_next = (vals: any[]): object => {
16
24
  const obj: object = {};
17
- obj.next = vals.shift();
25
+ obj.value = vals.shift();
18
26
  obj.done = vals.length == 0;
19
27
 
20
28
  return obj;
@@ -45,9 +53,17 @@ export const __Porffor_AsyncGenerator_yield = (vals: any[], value: any): void =>
45
53
  vals.length = len + 1;
46
54
  };
47
55
 
56
+ export const __Porffor_AsyncGenerator_return = (vals: any[], value: any): __Porffor_AsyncGenerator => {
57
+ vals.length = 1;
58
+ vals[0] = value;
59
+
60
+ const gen: __Porffor_AsyncGenerator = vals;
61
+ return gen;
62
+ };
63
+
48
64
  export const __Porffor_AsyncGenerator_prototype_next = async (vals: any[]): object => {
49
65
  const obj: object = {};
50
- obj.next = await vals.shift();
66
+ obj.value = await vals.shift();
51
67
  obj.done = vals.length == 0;
52
68
 
53
69
  return obj;