kumi 0.0.24 → 0.0.25

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.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/golden/array_element/expected/schema_ruby.rb +1 -1
  4. data/golden/array_index/expected/schema_ruby.rb +1 -1
  5. data/golden/array_operations/expected/schema_ruby.rb +1 -1
  6. data/golden/cascade_logic/expected/lir_02_inlined.txt +8 -8
  7. data/golden/cascade_logic/expected/schema_ruby.rb +1 -1
  8. data/golden/chained_fusion/expected/lir_02_inlined.txt +36 -36
  9. data/golden/chained_fusion/expected/lir_03_cse.txt +23 -23
  10. data/golden/chained_fusion/expected/lir_04_1_loop_fusion.txt +25 -25
  11. data/golden/chained_fusion/expected/lir_04_loop_invcm.txt +23 -23
  12. data/golden/chained_fusion/expected/lir_06_const_prop.txt +23 -23
  13. data/golden/chained_fusion/expected/schema_javascript.mjs +23 -23
  14. data/golden/chained_fusion/expected/schema_ruby.rb +28 -28
  15. data/golden/element_arrays/expected/schema_ruby.rb +1 -1
  16. data/golden/empty_and_null_inputs/expected/lir_02_inlined.txt +18 -18
  17. data/golden/empty_and_null_inputs/expected/lir_03_cse.txt +17 -17
  18. data/golden/empty_and_null_inputs/expected/lir_04_1_loop_fusion.txt +17 -17
  19. data/golden/empty_and_null_inputs/expected/lir_04_loop_invcm.txt +17 -17
  20. data/golden/empty_and_null_inputs/expected/lir_06_const_prop.txt +17 -17
  21. data/golden/empty_and_null_inputs/expected/schema_javascript.mjs +13 -13
  22. data/golden/empty_and_null_inputs/expected/schema_ruby.rb +18 -18
  23. data/golden/game_of_life/expected/lir_02_inlined.txt +1291 -1291
  24. data/golden/game_of_life/expected/lir_03_cse.txt +396 -396
  25. data/golden/game_of_life/expected/lir_04_1_loop_fusion.txt +396 -396
  26. data/golden/game_of_life/expected/lir_04_loop_invcm.txt +396 -396
  27. data/golden/game_of_life/expected/lir_06_const_prop.txt +396 -396
  28. data/golden/game_of_life/expected/schema_javascript.mjs +85 -85
  29. data/golden/game_of_life/expected/schema_ruby.rb +86 -86
  30. data/golden/hash_keys/expected/schema_ruby.rb +1 -1
  31. data/golden/hash_value/expected/schema_ruby.rb +1 -1
  32. data/golden/hierarchical_complex/expected/lir_02_inlined.txt +15 -15
  33. data/golden/hierarchical_complex/expected/lir_03_cse.txt +1 -1
  34. data/golden/hierarchical_complex/expected/lir_04_1_loop_fusion.txt +1 -1
  35. data/golden/hierarchical_complex/expected/lir_04_loop_invcm.txt +1 -1
  36. data/golden/hierarchical_complex/expected/lir_06_const_prop.txt +1 -1
  37. data/golden/hierarchical_complex/expected/schema_javascript.mjs +1 -1
  38. data/golden/hierarchical_complex/expected/schema_ruby.rb +2 -2
  39. data/golden/inline_rename_scope_leak/expected/schema_ruby.rb +1 -1
  40. data/golden/input_reference/expected/schema_ruby.rb +1 -1
  41. data/golden/interleaved_fusion/expected/lir_02_inlined.txt +35 -35
  42. data/golden/interleaved_fusion/expected/lir_03_cse.txt +26 -26
  43. data/golden/interleaved_fusion/expected/lir_04_1_loop_fusion.txt +27 -26
  44. data/golden/interleaved_fusion/expected/lir_04_loop_invcm.txt +26 -26
  45. data/golden/interleaved_fusion/expected/lir_06_const_prop.txt +26 -26
  46. data/golden/interleaved_fusion/expected/schema_javascript.mjs +23 -23
  47. data/golden/interleaved_fusion/expected/schema_ruby.rb +29 -29
  48. data/golden/let_inline/expected/schema_ruby.rb +1 -1
  49. data/golden/loop_fusion/expected/lir_02_inlined.txt +17 -17
  50. data/golden/loop_fusion/expected/lir_03_cse.txt +14 -14
  51. data/golden/loop_fusion/expected/lir_04_1_loop_fusion.txt +14 -14
  52. data/golden/loop_fusion/expected/lir_04_loop_invcm.txt +14 -14
  53. data/golden/loop_fusion/expected/lir_06_const_prop.txt +14 -14
  54. data/golden/loop_fusion/expected/schema_javascript.mjs +12 -12
  55. data/golden/loop_fusion/expected/schema_ruby.rb +16 -16
  56. data/golden/min_reduce_scope/expected/schema_ruby.rb +1 -1
  57. data/golden/mixed_dimensions/expected/lir_02_inlined.txt +5 -5
  58. data/golden/mixed_dimensions/expected/lir_03_cse.txt +5 -5
  59. data/golden/mixed_dimensions/expected/lir_04_1_loop_fusion.txt +5 -5
  60. data/golden/mixed_dimensions/expected/lir_04_loop_invcm.txt +5 -5
  61. data/golden/mixed_dimensions/expected/lir_06_const_prop.txt +5 -5
  62. data/golden/mixed_dimensions/expected/schema_javascript.mjs +3 -3
  63. data/golden/mixed_dimensions/expected/schema_ruby.rb +6 -6
  64. data/golden/multirank_hoisting/expected/lir_02_inlined.txt +48 -48
  65. data/golden/multirank_hoisting/expected/lir_03_cse.txt +35 -35
  66. data/golden/multirank_hoisting/expected/lir_04_1_loop_fusion.txt +35 -35
  67. data/golden/multirank_hoisting/expected/lir_04_loop_invcm.txt +35 -35
  68. data/golden/multirank_hoisting/expected/lir_06_const_prop.txt +35 -35
  69. data/golden/multirank_hoisting/expected/schema_javascript.mjs +34 -34
  70. data/golden/multirank_hoisting/expected/schema_ruby.rb +36 -36
  71. data/golden/nested_hash/expected/schema_ruby.rb +1 -1
  72. data/golden/reduction_broadcast/expected/lir_02_inlined.txt +30 -30
  73. data/golden/reduction_broadcast/expected/lir_03_cse.txt +22 -22
  74. data/golden/reduction_broadcast/expected/lir_04_1_loop_fusion.txt +22 -22
  75. data/golden/reduction_broadcast/expected/lir_04_loop_invcm.txt +22 -22
  76. data/golden/reduction_broadcast/expected/lir_06_const_prop.txt +22 -22
  77. data/golden/reduction_broadcast/expected/schema_javascript.mjs +18 -18
  78. data/golden/reduction_broadcast/expected/schema_ruby.rb +23 -23
  79. data/golden/roll/expected/schema_ruby.rb +1 -1
  80. data/golden/shift/expected/schema_ruby.rb +1 -1
  81. data/golden/shift_2d/expected/schema_ruby.rb +1 -1
  82. data/golden/simple_math/expected/schema_ruby.rb +1 -1
  83. data/golden/streaming_basics/expected/lir_02_inlined.txt +25 -25
  84. data/golden/streaming_basics/expected/lir_03_cse.txt +13 -13
  85. data/golden/streaming_basics/expected/lir_04_1_loop_fusion.txt +13 -13
  86. data/golden/streaming_basics/expected/lir_04_loop_invcm.txt +13 -13
  87. data/golden/streaming_basics/expected/lir_06_const_prop.txt +13 -13
  88. data/golden/streaming_basics/expected/schema_javascript.mjs +13 -13
  89. data/golden/streaming_basics/expected/schema_ruby.rb +14 -14
  90. data/golden/tuples/expected/schema_ruby.rb +1 -1
  91. data/golden/tuples_and_arrays/expected/lir_02_inlined.txt +16 -16
  92. data/golden/tuples_and_arrays/expected/lir_03_cse.txt +13 -13
  93. data/golden/tuples_and_arrays/expected/lir_04_1_loop_fusion.txt +13 -13
  94. data/golden/tuples_and_arrays/expected/lir_04_loop_invcm.txt +13 -13
  95. data/golden/tuples_and_arrays/expected/lir_06_const_prop.txt +13 -13
  96. data/golden/tuples_and_arrays/expected/schema_javascript.mjs +13 -13
  97. data/golden/tuples_and_arrays/expected/schema_ruby.rb +14 -14
  98. data/golden/us_tax_2024/expected/lir_02_inlined.txt +524 -524
  99. data/golden/us_tax_2024/expected/lir_03_cse.txt +283 -283
  100. data/golden/us_tax_2024/expected/lir_04_1_loop_fusion.txt +283 -283
  101. data/golden/us_tax_2024/expected/lir_04_loop_invcm.txt +320 -260
  102. data/golden/us_tax_2024/expected/lir_06_const_prop.txt +320 -260
  103. data/golden/us_tax_2024/expected/schema_javascript.mjs +24 -24
  104. data/golden/us_tax_2024/expected/schema_ruby.rb +25 -25
  105. data/golden/with_constants/expected/schema_ruby.rb +1 -1
  106. data/lib/kumi/core/analyzer/passes/lir/inline_declarations_pass.rb +118 -74
  107. data/lib/kumi/version.rb +1 -1
  108. metadata +1 -1
@@ -1,94 +1,94 @@
1
1
  export function _next_state(input) {
2
2
  let out = [];
3
3
  let t285 = input["rows"];
4
- let t1539 = t285.length;
5
- const t1540 = -1;
6
- const t1542 = 0;
7
- const t1546 = 1;
8
- const t1334 = 3;
9
- const t1339 = 2;
10
- let t1547 = t1539 - t1546;
4
+ let t1548 = t285.length;
5
+ const t1549 = -1;
6
+ const t1551 = 0;
7
+ const t1555 = 1;
8
+ const t1534 = 3;
9
+ const t1745 = 2;
10
+ let t1556 = t1548 - t1555;
11
11
  t285.forEach((rows_el_286, rows_i_287) => {
12
12
  let out_1 = [];
13
- let t1541 = rows_i_287 - t1540;
14
- let t1561 = rows_i_287 - t1546;
15
- let t1580 = ((rows_i_287 % t1539) + t1539) % t1539;
16
- let t1543 = t1541 >= t1542;
17
- let t1544 = t1541 < t1539;
18
- let t1549 = Math.min(Math.max(t1541, t1542), t1547);
19
- let t1563 = t1561 >= t1542;
20
- let t1564 = t1561 < t1539;
21
- let t1569 = Math.min(Math.max(t1561, t1542), t1547);
22
- let t1581 = t1580 + t1539;
23
- let t1545 = t1543 && t1544;
24
- let t1550 = t285[t1549];
25
- let t1565 = t1563 && t1564;
26
- let t1570 = t285[t1569];
27
- let t1582 = ((t1581 % t1539) + t1539) % t1539;
28
- let t1551 = t1550.length;
29
- let t1571 = t1570.length;
30
- let t1583 = t285[t1582];
31
- let t1584 = t1583.length;
32
- let t1640 = t1551 - t1546;
33
- let t1696 = t1571 - t1546;
34
- let t1592 = t1584 - t1546;
13
+ let t1550 = rows_i_287 - t1549;
14
+ let t1570 = rows_i_287 - t1555;
15
+ let t1589 = ((rows_i_287 % t1548) + t1548) % t1548;
16
+ let t1552 = t1550 >= t1551;
17
+ let t1553 = t1550 < t1548;
18
+ let t1558 = Math.min(Math.max(t1550, t1551), t1556);
19
+ let t1572 = t1570 >= t1551;
20
+ let t1573 = t1570 < t1548;
21
+ let t1578 = Math.min(Math.max(t1570, t1551), t1556);
22
+ let t1590 = t1589 + t1548;
23
+ let t1554 = t1552 && t1553;
24
+ let t1559 = t285[t1558];
25
+ let t1574 = t1572 && t1573;
26
+ let t1579 = t285[t1578];
27
+ let t1591 = ((t1590 % t1548) + t1548) % t1548;
28
+ let t1560 = t1559.length;
29
+ let t1580 = t1579.length;
30
+ let t1592 = t285[t1591];
31
+ let t1593 = t1592.length;
32
+ let t1649 = t1560 - t1555;
33
+ let t1705 = t1580 - t1555;
34
+ let t1601 = t1593 - t1555;
35
35
  rows_el_286.forEach((col_el_288, col_i_289) => {
36
- let t1552 = ((col_i_289 % t1551) + t1551) % t1551;
37
- let t1553 = t1552 + t1551;
38
- let t1554 = ((t1553 % t1551) + t1551) % t1551;
39
- let t1555 = t1550[t1554];
40
- let t1557 = t1545 ? t1555 : t1542;
41
- let t1572 = ((col_i_289 % t1571) + t1571) % t1571;
42
- let t1573 = t1572 + t1571;
43
- let t1574 = ((t1573 % t1571) + t1571) % t1571;
44
- let t1575 = t1570[t1574];
45
- let t1577 = t1565 ? t1575 : t1542;
46
- let t1586 = col_i_289 - t1540;
47
- let t1588 = t1586 >= t1542;
48
- let t1589 = t1586 < t1584;
49
- let t1590 = t1588 && t1589;
50
- let t1594 = Math.min(Math.max(t1586, t1542), t1592);
51
- let t1595 = t1583[t1594];
52
- let t1597 = t1590 ? t1595 : t1542;
53
- let t1606 = col_i_289 - t1546;
54
- let t1608 = t1606 >= t1542;
55
- let t1609 = t1606 < t1584;
56
- let t1610 = t1608 && t1609;
57
- let t1614 = Math.min(Math.max(t1606, t1542), t1592);
58
- let t1615 = t1583[t1614];
59
- let t1617 = t1610 ? t1615 : t1542;
60
- let t1636 = t1586 < t1551;
61
- let t1637 = t1588 && t1636;
62
- let t1638 = t1545 && t1637;
63
- let t1642 = Math.min(Math.max(t1586, t1542), t1640);
64
- let t1643 = t1550[t1642];
65
- let t1645 = t1638 ? t1643 : t1542;
66
- let t1664 = t1606 < t1551;
67
- let t1665 = t1608 && t1664;
68
- let t1666 = t1545 && t1665;
69
- let t1670 = Math.min(Math.max(t1606, t1542), t1640);
70
- let t1671 = t1550[t1670];
71
- let t1673 = t1666 ? t1671 : t1542;
72
- let t1692 = t1586 < t1571;
73
- let t1693 = t1588 && t1692;
74
- let t1694 = t1565 && t1693;
75
- let t1698 = Math.min(Math.max(t1586, t1542), t1696);
76
- let t1699 = t1570[t1698];
77
- let t1701 = t1694 ? t1699 : t1542;
78
- let t1720 = t1606 < t1571;
79
- let t1721 = t1608 && t1720;
80
- let t1722 = t1565 && t1721;
81
- let t1726 = Math.min(Math.max(t1606, t1542), t1696);
82
- let t1727 = t1570[t1726];
83
- let t1729 = t1722 ? t1727 : t1542;
84
- let t1332 = [t1557, t1577, t1597, t1617, t1645, t1673, t1701, t1729];
85
- let t1333 = t1332.reduce((a, b) => a + b, 0);
86
- let t1335 = t1333 == t1334;
87
- let t1340 = t1333 == t1339;
88
- let t1344 = col_el_288 > t1542;
89
- let t1345 = t1340 && t1344;
90
- let t528 = t1335 || t1345;
91
- let t293 = t528 ? t1546 : t1542;
36
+ let t1561 = ((col_i_289 % t1560) + t1560) % t1560;
37
+ let t1562 = t1561 + t1560;
38
+ let t1563 = ((t1562 % t1560) + t1560) % t1560;
39
+ let t1564 = t1559[t1563];
40
+ let t1566 = t1554 ? t1564 : t1551;
41
+ let t1581 = ((col_i_289 % t1580) + t1580) % t1580;
42
+ let t1582 = t1581 + t1580;
43
+ let t1583 = ((t1582 % t1580) + t1580) % t1580;
44
+ let t1584 = t1579[t1583];
45
+ let t1586 = t1574 ? t1584 : t1551;
46
+ let t1595 = col_i_289 - t1549;
47
+ let t1597 = t1595 >= t1551;
48
+ let t1598 = t1595 < t1593;
49
+ let t1599 = t1597 && t1598;
50
+ let t1603 = Math.min(Math.max(t1595, t1551), t1601);
51
+ let t1604 = t1592[t1603];
52
+ let t1606 = t1599 ? t1604 : t1551;
53
+ let t1615 = col_i_289 - t1555;
54
+ let t1617 = t1615 >= t1551;
55
+ let t1618 = t1615 < t1593;
56
+ let t1619 = t1617 && t1618;
57
+ let t1623 = Math.min(Math.max(t1615, t1551), t1601);
58
+ let t1624 = t1592[t1623];
59
+ let t1626 = t1619 ? t1624 : t1551;
60
+ let t1645 = t1595 < t1560;
61
+ let t1646 = t1597 && t1645;
62
+ let t1647 = t1554 && t1646;
63
+ let t1651 = Math.min(Math.max(t1595, t1551), t1649);
64
+ let t1652 = t1559[t1651];
65
+ let t1654 = t1647 ? t1652 : t1551;
66
+ let t1673 = t1615 < t1560;
67
+ let t1674 = t1617 && t1673;
68
+ let t1675 = t1554 && t1674;
69
+ let t1679 = Math.min(Math.max(t1615, t1551), t1649);
70
+ let t1680 = t1559[t1679];
71
+ let t1682 = t1675 ? t1680 : t1551;
72
+ let t1701 = t1595 < t1580;
73
+ let t1702 = t1597 && t1701;
74
+ let t1703 = t1574 && t1702;
75
+ let t1707 = Math.min(Math.max(t1595, t1551), t1705);
76
+ let t1708 = t1579[t1707];
77
+ let t1710 = t1703 ? t1708 : t1551;
78
+ let t1729 = t1615 < t1580;
79
+ let t1730 = t1617 && t1729;
80
+ let t1731 = t1574 && t1730;
81
+ let t1735 = Math.min(Math.max(t1615, t1551), t1705);
82
+ let t1736 = t1579[t1735];
83
+ let t1738 = t1731 ? t1736 : t1551;
84
+ let t1545 = [t1566, t1586, t1606, t1626, t1654, t1682, t1710, t1738];
85
+ let t1546 = t1545.reduce((a, b) => a + b, 0);
86
+ let t1535 = t1546 == t1534;
87
+ let t1746 = t1546 == t1745;
88
+ let t1953 = col_el_288 > t1551;
89
+ let t1742 = t1746 && t1953;
90
+ let t1531 = t1535 || t1742;
91
+ let t293 = t1531 ? t1555 : t1551;
92
92
  out_1.push(t293);
93
93
  });
94
94
  out.push(out_1);
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_7f8da9f72da44456b53831adb45862195177b23a6de44ddaeb2f4548d3a03763
2
+ module Kumi::Compiled::KUMI_5e0a149820fd6b1804439359780ed5e142afe31fbc67b4cde25ee818fa412c12
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -28,94 +28,94 @@ module Kumi::Compiled::KUMI_7f8da9f72da44456b53831adb45862195177b23a6de44ddaeb2f
28
28
  def _next_state(input = @input)
29
29
  out = []
30
30
  t285 = input["rows"] || input[:rows]
31
- t1539 = t285.length
32
- t1540 = -1
33
- t1542 = 0
34
- t1546 = 1
35
- t1334 = 3
36
- t1339 = 2
37
- t1547 = t1539 - t1546
31
+ t1548 = t285.length
32
+ t1549 = -1
33
+ t1551 = 0
34
+ t1555 = 1
35
+ t1534 = 3
36
+ t1745 = 2
37
+ t1556 = t1548 - t1555
38
38
  t285.each_with_index do |rows_el_286, rows_i_287|
39
39
  out_1 = []
40
- t1541 = rows_i_287 - t1540
41
- t1561 = rows_i_287 - t1546
42
- t1580 = rows_i_287 % t1539
43
- t1543 = t1541 >= t1542
44
- t1544 = t1541 < t1539
45
- t1549 = [[ t1541, t1542 ].max, t1547 ].min
46
- t1563 = t1561 >= t1542
47
- t1564 = t1561 < t1539
48
- t1569 = [[ t1561, t1542 ].max, t1547 ].min
49
- t1581 = t1580 + t1539
50
- t1545 = t1543 && t1544
51
- t1550 = t285[t1549]
52
- t1565 = t1563 && t1564
53
- t1570 = t285[t1569]
54
- t1582 = t1581 % t1539
55
- t1551 = t1550.length
56
- t1571 = t1570.length
57
- t1583 = t285[t1582]
58
- t1584 = t1583.length
59
- t1640 = t1551 - t1546
60
- t1696 = t1571 - t1546
61
- t1592 = t1584 - t1546
40
+ t1550 = rows_i_287 - t1549
41
+ t1570 = rows_i_287 - t1555
42
+ t1589 = rows_i_287 % t1548
43
+ t1552 = t1550 >= t1551
44
+ t1553 = t1550 < t1548
45
+ t1558 = [[ t1550, t1551 ].max, t1556 ].min
46
+ t1572 = t1570 >= t1551
47
+ t1573 = t1570 < t1548
48
+ t1578 = [[ t1570, t1551 ].max, t1556 ].min
49
+ t1590 = t1589 + t1548
50
+ t1554 = t1552 && t1553
51
+ t1559 = t285[t1558]
52
+ t1574 = t1572 && t1573
53
+ t1579 = t285[t1578]
54
+ t1591 = t1590 % t1548
55
+ t1560 = t1559.length
56
+ t1580 = t1579.length
57
+ t1592 = t285[t1591]
58
+ t1593 = t1592.length
59
+ t1649 = t1560 - t1555
60
+ t1705 = t1580 - t1555
61
+ t1601 = t1593 - t1555
62
62
  rows_el_286.each_with_index do |col_el_288, col_i_289|
63
- t1552 = col_i_289 % t1551
64
- t1553 = t1552 + t1551
65
- t1554 = t1553 % t1551
66
- t1555 = t1550[t1554]
67
- t1557 = t1545 ? t1555 : t1542
68
- t1572 = col_i_289 % t1571
69
- t1573 = t1572 + t1571
70
- t1574 = t1573 % t1571
71
- t1575 = t1570[t1574]
72
- t1577 = t1565 ? t1575 : t1542
73
- t1586 = col_i_289 - t1540
74
- t1588 = t1586 >= t1542
75
- t1589 = t1586 < t1584
76
- t1590 = t1588 && t1589
77
- t1594 = [[ t1586, t1542 ].max, t1592 ].min
78
- t1595 = t1583[t1594]
79
- t1597 = t1590 ? t1595 : t1542
80
- t1606 = col_i_289 - t1546
81
- t1608 = t1606 >= t1542
82
- t1609 = t1606 < t1584
83
- t1610 = t1608 && t1609
84
- t1614 = [[ t1606, t1542 ].max, t1592 ].min
85
- t1615 = t1583[t1614]
86
- t1617 = t1610 ? t1615 : t1542
87
- t1636 = t1586 < t1551
88
- t1637 = t1588 && t1636
89
- t1638 = t1545 && t1637
90
- t1642 = [[ t1586, t1542 ].max, t1640 ].min
91
- t1643 = t1550[t1642]
92
- t1645 = t1638 ? t1643 : t1542
93
- t1664 = t1606 < t1551
94
- t1665 = t1608 && t1664
95
- t1666 = t1545 && t1665
96
- t1670 = [[ t1606, t1542 ].max, t1640 ].min
97
- t1671 = t1550[t1670]
98
- t1673 = t1666 ? t1671 : t1542
99
- t1692 = t1586 < t1571
100
- t1693 = t1588 && t1692
101
- t1694 = t1565 && t1693
102
- t1698 = [[ t1586, t1542 ].max, t1696 ].min
103
- t1699 = t1570[t1698]
104
- t1701 = t1694 ? t1699 : t1542
105
- t1720 = t1606 < t1571
106
- t1721 = t1608 && t1720
107
- t1722 = t1565 && t1721
108
- t1726 = [[ t1606, t1542 ].max, t1696 ].min
109
- t1727 = t1570[t1726]
110
- t1729 = t1722 ? t1727 : t1542
111
- t1332 = [t1557, t1577, t1597, t1617, t1645, t1673, t1701, t1729]
112
- t1333 = t1332.sum
113
- t1335 = t1333 == t1334
114
- t1340 = t1333 == t1339
115
- t1344 = col_el_288 > t1542
116
- t1345 = t1340 && t1344
117
- t528 = t1335 || t1345
118
- t293 = t528 ? t1546 : t1542
63
+ t1561 = col_i_289 % t1560
64
+ t1562 = t1561 + t1560
65
+ t1563 = t1562 % t1560
66
+ t1564 = t1559[t1563]
67
+ t1566 = t1554 ? t1564 : t1551
68
+ t1581 = col_i_289 % t1580
69
+ t1582 = t1581 + t1580
70
+ t1583 = t1582 % t1580
71
+ t1584 = t1579[t1583]
72
+ t1586 = t1574 ? t1584 : t1551
73
+ t1595 = col_i_289 - t1549
74
+ t1597 = t1595 >= t1551
75
+ t1598 = t1595 < t1593
76
+ t1599 = t1597 && t1598
77
+ t1603 = [[ t1595, t1551 ].max, t1601 ].min
78
+ t1604 = t1592[t1603]
79
+ t1606 = t1599 ? t1604 : t1551
80
+ t1615 = col_i_289 - t1555
81
+ t1617 = t1615 >= t1551
82
+ t1618 = t1615 < t1593
83
+ t1619 = t1617 && t1618
84
+ t1623 = [[ t1615, t1551 ].max, t1601 ].min
85
+ t1624 = t1592[t1623]
86
+ t1626 = t1619 ? t1624 : t1551
87
+ t1645 = t1595 < t1560
88
+ t1646 = t1597 && t1645
89
+ t1647 = t1554 && t1646
90
+ t1651 = [[ t1595, t1551 ].max, t1649 ].min
91
+ t1652 = t1559[t1651]
92
+ t1654 = t1647 ? t1652 : t1551
93
+ t1673 = t1615 < t1560
94
+ t1674 = t1617 && t1673
95
+ t1675 = t1554 && t1674
96
+ t1679 = [[ t1615, t1551 ].max, t1649 ].min
97
+ t1680 = t1559[t1679]
98
+ t1682 = t1675 ? t1680 : t1551
99
+ t1701 = t1595 < t1580
100
+ t1702 = t1597 && t1701
101
+ t1703 = t1574 && t1702
102
+ t1707 = [[ t1595, t1551 ].max, t1705 ].min
103
+ t1708 = t1579[t1707]
104
+ t1710 = t1703 ? t1708 : t1551
105
+ t1729 = t1615 < t1580
106
+ t1730 = t1617 && t1729
107
+ t1731 = t1574 && t1730
108
+ t1735 = [[ t1615, t1551 ].max, t1705 ].min
109
+ t1736 = t1579[t1735]
110
+ t1738 = t1731 ? t1736 : t1551
111
+ t1545 = [t1566, t1586, t1606, t1626, t1654, t1682, t1710, t1738]
112
+ t1546 = t1545.sum
113
+ t1535 = t1546 == t1534
114
+ t1746 = t1546 == t1745
115
+ t1953 = col_el_288 > t1551
116
+ t1742 = t1746 && t1953
117
+ t1531 = t1535 || t1742
118
+ t293 = t1531 ? t1555 : t1551
119
119
  out_1 << t293
120
120
  end
121
121
  out << out_1
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_6bf7bc7a8b5aa3100171c0cfb98b3fbd85a8044bd3561af65115d0ed6c7d7656
2
+ module Kumi::Compiled::KUMI_4e4f9566d9352274f495237eba94db9f3e1adbd90a662adbf7fe95ea0f69a167
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_c643326a905412f8383dfdf5434a76da6946aa8f7d89002f06aa830abb137d5e
2
+ module Kumi::Compiled::KUMI_fd932eb31ef5d8b70116040cd0486f4121722e78554059fd6a300f28ee18b30d
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -57,19 +57,19 @@
57
57
  loop offices id=L13 in %t46 as el=%offices_el_47, idx=%offices_i_48
58
58
  %t49 = load_field offices_el_47["teams"] :: any
59
59
  loop teams id=L14 in %t49 as el=%teams_el_50, idx=%teams_i_51
60
- %t52 = load_field teams_el_50["employees"] :: any
61
- %t88 = load_input "regions" :: array
62
- %t89 = load_field regions_el_44["offices"] :: any
63
- %t90 = load_field offices_el_47["teams"] :: any
64
- %t91 = load_field teams_el_50["performance_score"] :: float
65
- %t92 = const 0.9 :: float
66
- %t93 = call core.gte(%t91, %t92) :: boolean
67
60
  %t88 = load_input "regions" :: array
68
61
  %t89 = load_field regions_el_44["offices"] :: any
69
62
  %t90 = load_field offices_el_47["teams"] :: any
70
63
  %t91 = load_field teams_el_50["performance_score"] :: float
71
64
  %t92 = const 0.9 :: float
72
65
  %t93 = call core.gte(%t91, %t92) :: boolean
66
+ %t101 = load_input "regions" :: array
67
+ %t102 = load_field regions_el_44["offices"] :: any
68
+ %t103 = load_field offices_el_47["teams"] :: any
69
+ %t104 = load_field teams_el_50["performance_score"] :: float
70
+ %t105 = const 0.9 :: float
71
+ %t106 = call core.gte(%t104, %t105) :: boolean
72
+ %t52 = load_field teams_el_50["employees"] :: any
73
73
  loop employees id=L15 in %t52 as el=%employees_el_53, idx=%employees_i_54
74
74
  %t74 = load_input "regions" :: array
75
75
  %t75 = load_field regions_el_44["offices"] :: any
@@ -90,14 +90,14 @@
90
90
  %t60 = load_field employees_el_53["salary"] :: float
91
91
  %t61 = const 0.3 :: float
92
92
  %t62 = call core.mul(%t60, %t61) :: float
93
- %t74 = load_input "regions" :: array
94
- %t75 = load_field regions_el_44["offices"] :: any
95
- %t76 = load_field offices_el_47["teams"] :: any
96
- %t77 = load_field teams_el_50["employees"] :: any
97
- %t78 = load_field employees_el_53["rating"] :: float
98
- %t79 = const 4.5 :: float
99
- %t80 = call core.gte(%t78, %t79) :: boolean
100
- %t65 = call core.and(%t80, %t93) :: boolean
93
+ %t94 = load_input "regions" :: array
94
+ %t95 = load_field regions_el_44["offices"] :: any
95
+ %t96 = load_field offices_el_47["teams"] :: any
96
+ %t97 = load_field teams_el_50["employees"] :: any
97
+ %t98 = load_field employees_el_53["rating"] :: float
98
+ %t99 = const 4.5 :: float
99
+ %t100 = call core.gte(%t98, %t99) :: boolean
100
+ %t65 = call core.and(%t100, %t106) :: boolean
101
101
  %t66 = load_field employees_el_53["salary"] :: float
102
102
  %t67 = const 0.2 :: float
103
103
  %t68 = call core.mul(%t66, %t67) :: float
@@ -57,10 +57,10 @@
57
57
  loop offices id=L13 in %t46 as el=%offices_el_47, idx=%offices_i_48
58
58
  %t49 = load_field offices_el_47["teams"] :: any
59
59
  loop teams id=L14 in %t49 as el=%teams_el_50, idx=%teams_i_51
60
- %t52 = load_field teams_el_50["employees"] :: any
61
60
  %t91 = load_field teams_el_50["performance_score"] :: float
62
61
  %t92 = const 0.9 :: float
63
62
  %t93 = call core.gte(%t91, %t92) :: boolean
63
+ %t52 = load_field teams_el_50["employees"] :: any
64
64
  loop employees id=L15 in %t52 as el=%employees_el_53, idx=%employees_i_54
65
65
  %t78 = load_field employees_el_53["rating"] :: float
66
66
  %t79 = const 4.5 :: float
@@ -57,10 +57,10 @@
57
57
  loop offices id=L13 in %t46 as el=%offices_el_47, idx=%offices_i_48
58
58
  %t49 = load_field offices_el_47["teams"] :: any
59
59
  loop teams id=L14 in %t49 as el=%teams_el_50, idx=%teams_i_51
60
- %t52 = load_field teams_el_50["employees"] :: any
61
60
  %t91 = load_field teams_el_50["performance_score"] :: float
62
61
  %t92 = const 0.9 :: float
63
62
  %t93 = call core.gte(%t91, %t92) :: boolean
63
+ %t52 = load_field teams_el_50["employees"] :: any
64
64
  loop employees id=L15 in %t52 as el=%employees_el_53, idx=%employees_i_54
65
65
  %t78 = load_field employees_el_53["rating"] :: float
66
66
  %t79 = const 4.5 :: float
@@ -63,9 +63,9 @@
63
63
  loop offices id=L13 in %t46 as el=%offices_el_47, idx=%offices_i_48
64
64
  %t49 = load_field offices_el_47["teams"] :: any
65
65
  loop teams id=L14 in %t49 as el=%teams_el_50, idx=%teams_i_51
66
- %t52 = load_field teams_el_50["employees"] :: any
67
66
  %t91 = load_field teams_el_50["performance_score"] :: float
68
67
  %t93 = call core.gte(%t91, %t92) :: boolean
68
+ %t52 = load_field teams_el_50["employees"] :: any
69
69
  loop employees id=L15 in %t52 as el=%employees_el_53, idx=%employees_i_54
70
70
  %t78 = load_field employees_el_53["rating"] :: float
71
71
  %t80 = call core.gte(%t78, %t79) :: boolean
@@ -63,9 +63,9 @@
63
63
  loop offices id=L13 in %t46 as el=%offices_el_47, idx=%offices_i_48
64
64
  %t49 = load_field offices_el_47["teams"] :: any
65
65
  loop teams id=L14 in %t49 as el=%teams_el_50, idx=%teams_i_51
66
- %t52 = load_field teams_el_50["employees"] :: any
67
66
  %t91 = load_field teams_el_50["performance_score"] :: float
68
67
  %t93 = call core.gte(%t91, %t92) :: boolean
68
+ %t52 = load_field teams_el_50["employees"] :: any
69
69
  loop employees id=L15 in %t52 as el=%employees_el_53, idx=%employees_i_54
70
70
  %t78 = load_field employees_el_53["rating"] :: float
71
71
  %t80 = call core.gte(%t78, %t79) :: boolean
@@ -91,9 +91,9 @@ export function _employee_bonus(input) {
91
91
  let t49 = offices_el_47["teams"];
92
92
  t49.forEach((teams_el_50, teams_i_51) => {
93
93
  let out_3 = [];
94
- let t52 = teams_el_50["employees"];
95
94
  let t91 = teams_el_50["performance_score"];
96
95
  let t93 = t91 >= t92;
96
+ let t52 = teams_el_50["employees"];
97
97
  t52.forEach((employees_el_53, employees_i_54) => {
98
98
  let t78 = employees_el_53["rating"];
99
99
  let t80 = t78 >= t79;
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_c432011fb1d3ae36f896bdc610664fb1e3aed88af214541fcb7fd8eff10c6df8
2
+ module Kumi::Compiled::KUMI_296703f629e169ee9916ee2652186a615448b14fbf3dd810f07f800ec23e2706
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -121,9 +121,9 @@ module Kumi::Compiled::KUMI_c432011fb1d3ae36f896bdc610664fb1e3aed88af214541fcb7f
121
121
  t49 = offices_el_47["teams"] || offices_el_47[:teams]
122
122
  t49.each_with_index do |teams_el_50, teams_i_51|
123
123
  out_3 = []
124
- t52 = teams_el_50["employees"] || teams_el_50[:employees]
125
124
  t91 = teams_el_50["performance_score"] || teams_el_50[:performance_score]
126
125
  t93 = t91 >= t92
126
+ t52 = teams_el_50["employees"] || teams_el_50[:employees]
127
127
  t52.each_with_index do |employees_el_53, employees_i_54|
128
128
  t78 = employees_el_53["rating"] || employees_el_53[:rating]
129
129
  t80 = t78 >= t79
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_9a60dec6b5eb1f59d7068a0904801dc4a6fd6ec93ba01d65f442c70b60be09b2
2
+ module Kumi::Compiled::KUMI_db7971b324407d0f809565d983315fed4dc8a3f06f0530f13c577a5491ec479e
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -1,5 +1,5 @@
1
1
  # Autogenerated by Kumi Codegen
2
- module Kumi::Compiled::KUMI_18db5064becd4a4342d6c7c48a3f0f9be709904986f6c53a0fd9ead2270302fc
2
+ module Kumi::Compiled::KUMI_bf8dc5780a3c569c78320ccfb3817762c3aca5afe7bdec14afc2720b6ca6940e
3
3
  def self.from(input_data = nil)
4
4
  instance = Object.new
5
5
  instance.extend(self)
@@ -18,13 +18,13 @@
18
18
  %t38 = load_input "departments" :: array
19
19
  %acc40 = decl_acc :: integer
20
20
  %t41 = load_field departments_el_11["employees"] :: any
21
- loop employees id=L7 in %t41 as el=%employees_el_6, idx=%employees_i_7
22
- %t42 = load_field employees_el_6["salary"] :: integer
23
- %acc40 = acc_add agg.sum(%acc40, %t42) :: integer
21
+ loop employees id=L7 in %t41 as el=%t42, idx=%t43
22
+ %t44 = load_field t42["salary"] :: integer
23
+ %acc40 = acc_add agg.sum(%acc40, %t44) :: integer
24
24
  end_loop
25
- %t43 = acc_load %acc40 :: integer
25
+ %t45 = acc_load %acc40 :: integer
26
26
  %t14 = const 0.15 :: float
27
- %t15 = call core.mul(%t43, %t14) :: float
27
+ %t15 = call core.mul(%t45, %t14) :: float
28
28
  yield %t15
29
29
  end_loop
30
30
  )
@@ -50,39 +50,39 @@
50
50
  %t30 = load_input "departments" :: array
51
51
  loop departments id=L6 in %t30 as el=%departments_el_31, idx=%departments_i_32
52
52
  %t33 = load_field departments_el_31["name"] :: string
53
- %t44 = load_input "departments" :: array
54
- %acc46 = decl_acc :: integer
55
- %t47 = load_field departments_el_31["employees"] :: any
56
- loop employees id=L8 in %t47 as el=%employees_el_6, idx=%employees_i_7
57
- %t48 = load_field employees_el_6["salary"] :: integer
58
- %acc46 = acc_add agg.sum(%acc46, %t48) :: integer
53
+ %t46 = load_input "departments" :: array
54
+ %acc48 = decl_acc :: integer
55
+ %t49 = load_field departments_el_31["employees"] :: any
56
+ loop employees id=L8 in %t49 as el=%t50, idx=%t51
57
+ %t52 = load_field t50["salary"] :: integer
58
+ %acc48 = acc_add agg.sum(%acc48, %t52) :: integer
59
59
  end_loop
60
- %t49 = acc_load %acc46 :: integer
61
- %t50 = load_input "departments" :: array
62
- %t65 = load_input "departments" :: array
63
- %acc67 = decl_acc :: integer
64
- %t68 = load_field departments_el_31["employees"] :: any
65
- loop employees id=L10 in %t68 as el=%employees_el_6, idx=%employees_i_7
66
- %t69 = load_field employees_el_6["salary"] :: integer
67
- %acc67 = acc_add agg.sum(%acc67, %t69) :: integer
68
- end_loop
69
- %t70 = acc_load %acc67 :: integer
70
- %t52 = const 0.15 :: float
71
- %t53 = call core.mul(%t70, %t52) :: float
60
+ %t53 = acc_load %acc48 :: integer
72
61
  %t54 = load_input "departments" :: array
73
- %acc56 = decl_acc :: integer
74
- %t57 = load_field departments_el_31["employees"] :: any
75
- loop employees id=L9 in %t57 as el=%employees_el_21, idx=%employees_i_22
76
- %t58 = load_field employees_el_21["role"] :: string
77
- %t59 = const "manager" :: string
78
- %t60 = call core.eq(%t58, %t59) :: boolean
79
- %t61 = const 1 :: integer
80
- %t62 = const 0 :: integer
81
- %t63 = select %t60, %t61, %t62 :: integer
82
- %acc56 = acc_add agg.sum(%acc56, %t63) :: integer
62
+ %t58 = load_input "departments" :: array
63
+ %acc60 = decl_acc :: integer
64
+ %t61 = load_field departments_el_31["employees"] :: any
65
+ loop employees id=L9 in %t61 as el=%t62, idx=%t63
66
+ %t64 = load_field t62["salary"] :: integer
67
+ %acc60 = acc_add agg.sum(%acc60, %t64) :: integer
68
+ end_loop
69
+ %t65 = acc_load %acc60 :: integer
70
+ %t56 = const 0.15 :: float
71
+ %t57 = call core.mul(%t65, %t56) :: float
72
+ %t66 = load_input "departments" :: array
73
+ %acc68 = decl_acc :: integer
74
+ %t69 = load_field departments_el_31["employees"] :: any
75
+ loop employees id=L10 in %t69 as el=%t70, idx=%t71
76
+ %t72 = load_field t70["role"] :: string
77
+ %t73 = const "manager" :: string
78
+ %t74 = call core.eq(%t72, %t73) :: boolean
79
+ %t75 = const 1 :: integer
80
+ %t76 = const 0 :: integer
81
+ %t77 = select %t74, %t75, %t76 :: integer
82
+ %acc68 = acc_add agg.sum(%acc68, %t77) :: integer
83
83
  end_loop
84
- %t64 = acc_load %acc56 :: integer
85
- %t37 = make_object{name: %t33, payroll: %t49, tax: %t53, managers: %t64} :: object
84
+ %t78 = acc_load %acc68 :: integer
85
+ %t37 = make_object{name: %t33, payroll: %t53, tax: %t57, managers: %t78} :: object
86
86
  yield %t37
87
87
  end_loop
88
88
  )