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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/golden/array_element/expected/schema_ruby.rb +1 -1
- data/golden/array_index/expected/schema_ruby.rb +1 -1
- data/golden/array_operations/expected/schema_ruby.rb +1 -1
- data/golden/cascade_logic/expected/lir_02_inlined.txt +8 -8
- data/golden/cascade_logic/expected/schema_ruby.rb +1 -1
- data/golden/chained_fusion/expected/lir_02_inlined.txt +36 -36
- data/golden/chained_fusion/expected/lir_03_cse.txt +23 -23
- data/golden/chained_fusion/expected/lir_04_1_loop_fusion.txt +25 -25
- data/golden/chained_fusion/expected/lir_04_loop_invcm.txt +23 -23
- data/golden/chained_fusion/expected/lir_06_const_prop.txt +23 -23
- data/golden/chained_fusion/expected/schema_javascript.mjs +23 -23
- data/golden/chained_fusion/expected/schema_ruby.rb +28 -28
- data/golden/element_arrays/expected/schema_ruby.rb +1 -1
- data/golden/empty_and_null_inputs/expected/lir_02_inlined.txt +18 -18
- data/golden/empty_and_null_inputs/expected/lir_03_cse.txt +17 -17
- data/golden/empty_and_null_inputs/expected/lir_04_1_loop_fusion.txt +17 -17
- data/golden/empty_and_null_inputs/expected/lir_04_loop_invcm.txt +17 -17
- data/golden/empty_and_null_inputs/expected/lir_06_const_prop.txt +17 -17
- data/golden/empty_and_null_inputs/expected/schema_javascript.mjs +13 -13
- data/golden/empty_and_null_inputs/expected/schema_ruby.rb +18 -18
- data/golden/game_of_life/expected/lir_02_inlined.txt +1291 -1291
- data/golden/game_of_life/expected/lir_03_cse.txt +396 -396
- data/golden/game_of_life/expected/lir_04_1_loop_fusion.txt +396 -396
- data/golden/game_of_life/expected/lir_04_loop_invcm.txt +396 -396
- data/golden/game_of_life/expected/lir_06_const_prop.txt +396 -396
- data/golden/game_of_life/expected/schema_javascript.mjs +85 -85
- data/golden/game_of_life/expected/schema_ruby.rb +86 -86
- data/golden/hash_keys/expected/schema_ruby.rb +1 -1
- data/golden/hash_value/expected/schema_ruby.rb +1 -1
- data/golden/hierarchical_complex/expected/lir_02_inlined.txt +15 -15
- data/golden/hierarchical_complex/expected/lir_03_cse.txt +1 -1
- data/golden/hierarchical_complex/expected/lir_04_1_loop_fusion.txt +1 -1
- data/golden/hierarchical_complex/expected/lir_04_loop_invcm.txt +1 -1
- data/golden/hierarchical_complex/expected/lir_06_const_prop.txt +1 -1
- data/golden/hierarchical_complex/expected/schema_javascript.mjs +1 -1
- data/golden/hierarchical_complex/expected/schema_ruby.rb +2 -2
- data/golden/inline_rename_scope_leak/expected/schema_ruby.rb +1 -1
- data/golden/input_reference/expected/schema_ruby.rb +1 -1
- data/golden/interleaved_fusion/expected/lir_02_inlined.txt +35 -35
- data/golden/interleaved_fusion/expected/lir_03_cse.txt +26 -26
- data/golden/interleaved_fusion/expected/lir_04_1_loop_fusion.txt +27 -26
- data/golden/interleaved_fusion/expected/lir_04_loop_invcm.txt +26 -26
- data/golden/interleaved_fusion/expected/lir_06_const_prop.txt +26 -26
- data/golden/interleaved_fusion/expected/schema_javascript.mjs +23 -23
- data/golden/interleaved_fusion/expected/schema_ruby.rb +29 -29
- data/golden/let_inline/expected/schema_ruby.rb +1 -1
- data/golden/loop_fusion/expected/lir_02_inlined.txt +17 -17
- data/golden/loop_fusion/expected/lir_03_cse.txt +14 -14
- data/golden/loop_fusion/expected/lir_04_1_loop_fusion.txt +14 -14
- data/golden/loop_fusion/expected/lir_04_loop_invcm.txt +14 -14
- data/golden/loop_fusion/expected/lir_06_const_prop.txt +14 -14
- data/golden/loop_fusion/expected/schema_javascript.mjs +12 -12
- data/golden/loop_fusion/expected/schema_ruby.rb +16 -16
- data/golden/min_reduce_scope/expected/schema_ruby.rb +1 -1
- data/golden/mixed_dimensions/expected/lir_02_inlined.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_03_cse.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_04_1_loop_fusion.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_04_loop_invcm.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_06_const_prop.txt +5 -5
- data/golden/mixed_dimensions/expected/schema_javascript.mjs +3 -3
- data/golden/mixed_dimensions/expected/schema_ruby.rb +6 -6
- data/golden/multirank_hoisting/expected/lir_02_inlined.txt +48 -48
- data/golden/multirank_hoisting/expected/lir_03_cse.txt +35 -35
- data/golden/multirank_hoisting/expected/lir_04_1_loop_fusion.txt +35 -35
- data/golden/multirank_hoisting/expected/lir_04_loop_invcm.txt +35 -35
- data/golden/multirank_hoisting/expected/lir_06_const_prop.txt +35 -35
- data/golden/multirank_hoisting/expected/schema_javascript.mjs +34 -34
- data/golden/multirank_hoisting/expected/schema_ruby.rb +36 -36
- data/golden/nested_hash/expected/schema_ruby.rb +1 -1
- data/golden/reduction_broadcast/expected/lir_02_inlined.txt +30 -30
- data/golden/reduction_broadcast/expected/lir_03_cse.txt +22 -22
- data/golden/reduction_broadcast/expected/lir_04_1_loop_fusion.txt +22 -22
- data/golden/reduction_broadcast/expected/lir_04_loop_invcm.txt +22 -22
- data/golden/reduction_broadcast/expected/lir_06_const_prop.txt +22 -22
- data/golden/reduction_broadcast/expected/schema_javascript.mjs +18 -18
- data/golden/reduction_broadcast/expected/schema_ruby.rb +23 -23
- data/golden/roll/expected/schema_ruby.rb +1 -1
- data/golden/shift/expected/schema_ruby.rb +1 -1
- data/golden/shift_2d/expected/schema_ruby.rb +1 -1
- data/golden/simple_math/expected/schema_ruby.rb +1 -1
- data/golden/streaming_basics/expected/lir_02_inlined.txt +25 -25
- data/golden/streaming_basics/expected/lir_03_cse.txt +13 -13
- data/golden/streaming_basics/expected/lir_04_1_loop_fusion.txt +13 -13
- data/golden/streaming_basics/expected/lir_04_loop_invcm.txt +13 -13
- data/golden/streaming_basics/expected/lir_06_const_prop.txt +13 -13
- data/golden/streaming_basics/expected/schema_javascript.mjs +13 -13
- data/golden/streaming_basics/expected/schema_ruby.rb +14 -14
- data/golden/tuples/expected/schema_ruby.rb +1 -1
- data/golden/tuples_and_arrays/expected/lir_02_inlined.txt +16 -16
- data/golden/tuples_and_arrays/expected/lir_03_cse.txt +13 -13
- data/golden/tuples_and_arrays/expected/lir_04_1_loop_fusion.txt +13 -13
- data/golden/tuples_and_arrays/expected/lir_04_loop_invcm.txt +13 -13
- data/golden/tuples_and_arrays/expected/lir_06_const_prop.txt +13 -13
- data/golden/tuples_and_arrays/expected/schema_javascript.mjs +13 -13
- data/golden/tuples_and_arrays/expected/schema_ruby.rb +14 -14
- data/golden/us_tax_2024/expected/lir_02_inlined.txt +524 -524
- data/golden/us_tax_2024/expected/lir_03_cse.txt +283 -283
- data/golden/us_tax_2024/expected/lir_04_1_loop_fusion.txt +283 -283
- data/golden/us_tax_2024/expected/lir_04_loop_invcm.txt +320 -260
- data/golden/us_tax_2024/expected/lir_06_const_prop.txt +320 -260
- data/golden/us_tax_2024/expected/schema_javascript.mjs +24 -24
- data/golden/us_tax_2024/expected/schema_ruby.rb +25 -25
- data/golden/with_constants/expected/schema_ruby.rb +1 -1
- data/lib/kumi/core/analyzer/passes/lir/inline_declarations_pass.rb +118 -74
- data/lib/kumi/version.rb +1 -1
- metadata +1 -1
@@ -67,10 +67,10 @@ export function _cart_total(input) {
|
|
67
67
|
let acc_36 = 0.0;
|
68
68
|
let t37 = input["items"];
|
69
69
|
t37.forEach((items_el_38, items_i_39) => {
|
70
|
-
let
|
71
|
-
let
|
72
|
-
let
|
73
|
-
acc_36 +=
|
70
|
+
let t61 = items_el_38["price"];
|
71
|
+
let t62 = items_el_38["qty"];
|
72
|
+
let t63 = t61 * t62;
|
73
|
+
acc_36 += t63;
|
74
74
|
});
|
75
75
|
return acc_36;
|
76
76
|
}
|
@@ -78,16 +78,16 @@ export function _cart_total(input) {
|
|
78
78
|
export function _cart_total_effective(input) {
|
79
79
|
let acc_42 = 0.0;
|
80
80
|
let t43 = input["items"];
|
81
|
-
const
|
82
|
-
const
|
81
|
+
const t73 = 100.0;
|
82
|
+
const t67 = 0.9;
|
83
83
|
t43.forEach((items_el_44, items_i_45) => {
|
84
|
-
let
|
85
|
-
let
|
86
|
-
let
|
87
|
-
let
|
88
|
-
let
|
89
|
-
let
|
90
|
-
acc_42 +=
|
84
|
+
let t72 = items_el_44["price"];
|
85
|
+
let t77 = items_el_44["qty"];
|
86
|
+
let t74 = t72 > t73;
|
87
|
+
let t78 = t72 * t77;
|
88
|
+
let t68 = t78 * t67;
|
89
|
+
let t70 = t74 ? t68 : t78;
|
90
|
+
acc_42 += t70;
|
91
91
|
});
|
92
92
|
return acc_42;
|
93
93
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_e64045903bee1b6a265ef34019b7aa91333ec110e041bb47e8350de13c0fa435
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -100,10 +100,10 @@ module Kumi::Compiled::KUMI_9876b5b41b48be4393b4b7656e731d87a59d3f650e68d8d6602f
|
|
100
100
|
acc_36 = 0.0
|
101
101
|
t37 = input["items"] || input[:items]
|
102
102
|
t37.each_with_index do |items_el_38, items_i_39|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
acc_36 +=
|
103
|
+
t61 = items_el_38["price"] || items_el_38[:price]
|
104
|
+
t62 = items_el_38["qty"] || items_el_38[:qty]
|
105
|
+
t63 = t61 * t62
|
106
|
+
acc_36 += t63
|
107
107
|
end
|
108
108
|
acc_36
|
109
109
|
end
|
@@ -111,16 +111,16 @@ module Kumi::Compiled::KUMI_9876b5b41b48be4393b4b7656e731d87a59d3f650e68d8d6602f
|
|
111
111
|
def _cart_total_effective(input = @input)
|
112
112
|
acc_42 = 0.0
|
113
113
|
t43 = input["items"] || input[:items]
|
114
|
-
|
115
|
-
|
114
|
+
t73 = 100.0
|
115
|
+
t67 = 0.9
|
116
116
|
t43.each_with_index do |items_el_44, items_i_45|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
acc_42 +=
|
117
|
+
t72 = items_el_44["price"] || items_el_44[:price]
|
118
|
+
t77 = items_el_44["qty"] || items_el_44[:qty]
|
119
|
+
t74 = t72 > t73
|
120
|
+
t78 = t72 * t77
|
121
|
+
t68 = t78 * t67
|
122
|
+
t70 = t74 ? t68 : t78
|
123
|
+
acc_42 += t70
|
124
124
|
end
|
125
125
|
acc_42
|
126
126
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_ea94769e386dc74203e07fe5a857c0465ed724f1d4e8aa6db6aa39e801a8fcd9
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -25,13 +25,13 @@
|
|
25
25
|
%t14 = load_input "points" :: array
|
26
26
|
loop points id=L3 in %t14 as el=%points_el_15, idx=%points_i_16
|
27
27
|
%t31 = load_input "points" :: array
|
28
|
-
%
|
29
|
-
%
|
30
|
-
%
|
31
|
-
%
|
28
|
+
%t36 = load_input "points" :: array
|
29
|
+
%t37 = load_field points_el_15["x"] :: integer
|
30
|
+
%t38 = const 100 :: integer
|
31
|
+
%t39 = call core.gt(%t37, %t38) :: boolean
|
32
32
|
%t33 = load_field points_el_15["x"] :: integer
|
33
33
|
%t34 = load_field points_el_15["y"] :: integer
|
34
|
-
%t35 = select %
|
34
|
+
%t35 = select %t39, %t33, %t34 :: integer
|
35
35
|
%t18 = load_field points_el_15["x"] :: integer
|
36
36
|
%t19 = make_tuple(%t35, %t18) :: tuple<integer>
|
37
37
|
%t20 = fold %t19 fn="agg.max" :: integer
|
@@ -42,19 +42,19 @@
|
|
42
42
|
%acc_21 = decl_acc :: integer
|
43
43
|
%t22 = load_input "points" :: array
|
44
44
|
loop points id=L4 in %t22 as el=%points_el_23, idx=%points_i_24
|
45
|
-
%
|
45
|
+
%t40 = load_input "points" :: array
|
46
46
|
%t45 = load_input "points" :: array
|
47
|
-
%
|
47
|
+
%t50 = load_input "points" :: array
|
48
|
+
%t51 = load_field points_el_23["x"] :: integer
|
49
|
+
%t52 = const 100 :: integer
|
50
|
+
%t53 = call core.gt(%t51, %t52) :: boolean
|
48
51
|
%t47 = load_field points_el_23["x"] :: integer
|
49
|
-
%t48 =
|
50
|
-
%t49 =
|
51
|
-
%
|
52
|
-
%
|
53
|
-
%
|
54
|
-
%
|
55
|
-
%t39 = make_tuple(%t52, %t38) :: tuple<integer>
|
56
|
-
%t40 = fold %t39 fn="agg.max" :: integer
|
57
|
-
%acc_21 = acc_add agg.sum(%acc_21, %t40) :: integer
|
52
|
+
%t48 = load_field points_el_23["y"] :: integer
|
53
|
+
%t49 = select %t53, %t47, %t48 :: integer
|
54
|
+
%t42 = load_field points_el_23["x"] :: integer
|
55
|
+
%t43 = make_tuple(%t49, %t42) :: tuple<integer>
|
56
|
+
%t44 = fold %t43 fn="agg.max" :: integer
|
57
|
+
%acc_21 = acc_add agg.sum(%acc_21, %t44) :: integer
|
58
58
|
end_loop
|
59
59
|
%t26 = acc_load %acc_21 :: integer
|
60
60
|
yield %t26
|
@@ -22,12 +22,12 @@
|
|
22
22
|
(Declaration final_value_per_point
|
23
23
|
%t14 = load_input "points" :: array
|
24
24
|
loop points id=L3 in %t14 as el=%points_el_15, idx=%points_i_16
|
25
|
-
%
|
26
|
-
%
|
25
|
+
%t37 = load_field points_el_15["x"] :: integer
|
26
|
+
%t38 = const 100 :: integer
|
27
27
|
%t34 = load_field points_el_15["y"] :: integer
|
28
|
-
%
|
29
|
-
%t35 = select %
|
30
|
-
%t19 = make_tuple(%t35, %
|
28
|
+
%t39 = call core.gt(%t37, %t38) :: boolean
|
29
|
+
%t35 = select %t39, %t37, %t34 :: integer
|
30
|
+
%t19 = make_tuple(%t35, %t37) :: tuple<integer>
|
31
31
|
%t20 = fold %t19 fn="agg.max" :: integer
|
32
32
|
yield %t20
|
33
33
|
end_loop
|
@@ -36,14 +36,14 @@
|
|
36
36
|
%acc_21 = decl_acc :: integer
|
37
37
|
%t22 = load_input "points" :: array
|
38
38
|
loop points id=L4 in %t22 as el=%points_el_23, idx=%points_i_24
|
39
|
-
%
|
40
|
-
%
|
41
|
-
%
|
42
|
-
%
|
43
|
-
%
|
44
|
-
%
|
45
|
-
%
|
46
|
-
%acc_21 = acc_add agg.sum(%acc_21, %
|
39
|
+
%t51 = load_field points_el_23["x"] :: integer
|
40
|
+
%t52 = const 100 :: integer
|
41
|
+
%t48 = load_field points_el_23["y"] :: integer
|
42
|
+
%t53 = call core.gt(%t51, %t52) :: boolean
|
43
|
+
%t49 = select %t53, %t51, %t48 :: integer
|
44
|
+
%t43 = make_tuple(%t49, %t51) :: tuple<integer>
|
45
|
+
%t44 = fold %t43 fn="agg.max" :: integer
|
46
|
+
%acc_21 = acc_add agg.sum(%acc_21, %t44) :: integer
|
47
47
|
end_loop
|
48
48
|
%t26 = acc_load %acc_21 :: integer
|
49
49
|
yield %t26
|
@@ -22,12 +22,12 @@
|
|
22
22
|
(Declaration final_value_per_point
|
23
23
|
%t14 = load_input "points" :: array
|
24
24
|
loop points id=L3 in %t14 as el=%points_el_15, idx=%points_i_16
|
25
|
-
%
|
26
|
-
%
|
25
|
+
%t37 = load_field points_el_15["x"] :: integer
|
26
|
+
%t38 = const 100 :: integer
|
27
27
|
%t34 = load_field points_el_15["y"] :: integer
|
28
|
-
%
|
29
|
-
%t35 = select %
|
30
|
-
%t19 = make_tuple(%t35, %
|
28
|
+
%t39 = call core.gt(%t37, %t38) :: boolean
|
29
|
+
%t35 = select %t39, %t37, %t34 :: integer
|
30
|
+
%t19 = make_tuple(%t35, %t37) :: tuple<integer>
|
31
31
|
%t20 = fold %t19 fn="agg.max" :: integer
|
32
32
|
yield %t20
|
33
33
|
end_loop
|
@@ -36,14 +36,14 @@
|
|
36
36
|
%acc_21 = decl_acc :: integer
|
37
37
|
%t22 = load_input "points" :: array
|
38
38
|
loop points id=L4 in %t22 as el=%points_el_23, idx=%points_i_24
|
39
|
-
%
|
40
|
-
%
|
41
|
-
%
|
42
|
-
%
|
43
|
-
%
|
44
|
-
%
|
45
|
-
%
|
46
|
-
%acc_21 = acc_add agg.sum(%acc_21, %
|
39
|
+
%t51 = load_field points_el_23["x"] :: integer
|
40
|
+
%t52 = const 100 :: integer
|
41
|
+
%t48 = load_field points_el_23["y"] :: integer
|
42
|
+
%t53 = call core.gt(%t51, %t52) :: boolean
|
43
|
+
%t49 = select %t53, %t51, %t48 :: integer
|
44
|
+
%t43 = make_tuple(%t49, %t51) :: tuple<integer>
|
45
|
+
%t44 = fold %t43 fn="agg.max" :: integer
|
46
|
+
%acc_21 = acc_add agg.sum(%acc_21, %t44) :: integer
|
47
47
|
end_loop
|
48
48
|
%t26 = acc_load %acc_21 :: integer
|
49
49
|
yield %t26
|
@@ -21,13 +21,13 @@
|
|
21
21
|
)
|
22
22
|
(Declaration final_value_per_point
|
23
23
|
%t14 = load_input "points" :: array
|
24
|
-
%
|
24
|
+
%t38 = const 100 :: integer
|
25
25
|
loop points id=L3 in %t14 as el=%points_el_15, idx=%points_i_16
|
26
|
-
%
|
26
|
+
%t37 = load_field points_el_15["x"] :: integer
|
27
27
|
%t34 = load_field points_el_15["y"] :: integer
|
28
|
-
%
|
29
|
-
%t35 = select %
|
30
|
-
%t19 = make_tuple(%t35, %
|
28
|
+
%t39 = call core.gt(%t37, %t38) :: boolean
|
29
|
+
%t35 = select %t39, %t37, %t34 :: integer
|
30
|
+
%t19 = make_tuple(%t35, %t37) :: tuple<integer>
|
31
31
|
%t20 = fold %t19 fn="agg.max" :: integer
|
32
32
|
yield %t20
|
33
33
|
end_loop
|
@@ -35,15 +35,15 @@
|
|
35
35
|
(Declaration grand_total
|
36
36
|
%acc_21 = decl_acc :: integer
|
37
37
|
%t22 = load_input "points" :: array
|
38
|
-
%
|
38
|
+
%t52 = const 100 :: integer
|
39
39
|
loop points id=L4 in %t22 as el=%points_el_23, idx=%points_i_24
|
40
|
-
%
|
41
|
-
%
|
42
|
-
%
|
43
|
-
%
|
44
|
-
%
|
45
|
-
%
|
46
|
-
%acc_21 = acc_add agg.sum(%acc_21, %
|
40
|
+
%t51 = load_field points_el_23["x"] :: integer
|
41
|
+
%t48 = load_field points_el_23["y"] :: integer
|
42
|
+
%t53 = call core.gt(%t51, %t52) :: boolean
|
43
|
+
%t49 = select %t53, %t51, %t48 :: integer
|
44
|
+
%t43 = make_tuple(%t49, %t51) :: tuple<integer>
|
45
|
+
%t44 = fold %t43 fn="agg.max" :: integer
|
46
|
+
%acc_21 = acc_add agg.sum(%acc_21, %t44) :: integer
|
47
47
|
end_loop
|
48
48
|
%t26 = acc_load %acc_21 :: integer
|
49
49
|
yield %t26
|
@@ -21,13 +21,13 @@
|
|
21
21
|
)
|
22
22
|
(Declaration final_value_per_point
|
23
23
|
%t14 = load_input "points" :: array
|
24
|
-
%
|
24
|
+
%t38 = const 100 :: integer
|
25
25
|
loop points id=L3 in %t14 as el=%points_el_15, idx=%points_i_16
|
26
|
-
%
|
26
|
+
%t37 = load_field points_el_15["x"] :: integer
|
27
27
|
%t34 = load_field points_el_15["y"] :: integer
|
28
|
-
%
|
29
|
-
%t35 = select %
|
30
|
-
%t19 = make_tuple(%t35, %
|
28
|
+
%t39 = call core.gt(%t37, %t38) :: boolean
|
29
|
+
%t35 = select %t39, %t37, %t34 :: integer
|
30
|
+
%t19 = make_tuple(%t35, %t37) :: tuple<integer>
|
31
31
|
%t20 = fold %t19 fn="agg.max" :: integer
|
32
32
|
yield %t20
|
33
33
|
end_loop
|
@@ -35,15 +35,15 @@
|
|
35
35
|
(Declaration grand_total
|
36
36
|
%acc_21 = decl_acc :: integer
|
37
37
|
%t22 = load_input "points" :: array
|
38
|
-
%
|
38
|
+
%t52 = const 100 :: integer
|
39
39
|
loop points id=L4 in %t22 as el=%points_el_23, idx=%points_i_24
|
40
|
-
%
|
41
|
-
%
|
42
|
-
%
|
43
|
-
%
|
44
|
-
%
|
45
|
-
%
|
46
|
-
%acc_21 = acc_add agg.sum(%acc_21, %
|
40
|
+
%t51 = load_field points_el_23["x"] :: integer
|
41
|
+
%t48 = load_field points_el_23["y"] :: integer
|
42
|
+
%t53 = call core.gt(%t51, %t52) :: boolean
|
43
|
+
%t49 = select %t53, %t51, %t48 :: integer
|
44
|
+
%t43 = make_tuple(%t49, %t51) :: tuple<integer>
|
45
|
+
%t44 = fold %t43 fn="agg.max" :: integer
|
46
|
+
%acc_21 = acc_add agg.sum(%acc_21, %t44) :: integer
|
47
47
|
end_loop
|
48
48
|
%t26 = acc_load %acc_21 :: integer
|
49
49
|
yield %t26
|
@@ -27,13 +27,13 @@ export function _selected_value(input) {
|
|
27
27
|
export function _final_value_per_point(input) {
|
28
28
|
let out = [];
|
29
29
|
let t14 = input["points"];
|
30
|
-
const
|
30
|
+
const t38 = 100;
|
31
31
|
t14.forEach((points_el_15, points_i_16) => {
|
32
|
-
let
|
32
|
+
let t37 = points_el_15["x"];
|
33
33
|
let t34 = points_el_15["y"];
|
34
|
-
let
|
35
|
-
let t35 =
|
36
|
-
let t19 = [t35,
|
34
|
+
let t39 = t37 > t38;
|
35
|
+
let t35 = t39 ? t37 : t34;
|
36
|
+
let t19 = [t35, t37];
|
37
37
|
let t20 = Math.max(...t19);
|
38
38
|
out.push(t20);
|
39
39
|
});
|
@@ -43,15 +43,15 @@ export function _final_value_per_point(input) {
|
|
43
43
|
export function _grand_total(input) {
|
44
44
|
let acc_21 = 0;
|
45
45
|
let t22 = input["points"];
|
46
|
-
const
|
46
|
+
const t52 = 100;
|
47
47
|
t22.forEach((points_el_23, points_i_24) => {
|
48
|
-
let
|
49
|
-
let
|
50
|
-
let
|
51
|
-
let
|
52
|
-
let
|
53
|
-
let
|
54
|
-
acc_21 +=
|
48
|
+
let t51 = points_el_23["x"];
|
49
|
+
let t48 = points_el_23["y"];
|
50
|
+
let t53 = t51 > t52;
|
51
|
+
let t49 = t53 ? t51 : t48;
|
52
|
+
let t43 = [t49, t51];
|
53
|
+
let t44 = Math.max(...t43);
|
54
|
+
acc_21 += t44;
|
55
55
|
});
|
56
56
|
return acc_21;
|
57
57
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_1c841aefa943ccbd3b89bd507f1dd9fcea9c3504ba5f4692de88de403a644386
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -57,13 +57,13 @@ module Kumi::Compiled::KUMI_837c6583df076b499ca19d645e0ea31df896a685151233a35705
|
|
57
57
|
def _final_value_per_point(input = @input)
|
58
58
|
out = []
|
59
59
|
t14 = input["points"] || input[:points]
|
60
|
-
|
60
|
+
t38 = 100
|
61
61
|
t14.each_with_index do |points_el_15, points_i_16|
|
62
|
-
|
62
|
+
t37 = points_el_15["x"] || points_el_15[:x]
|
63
63
|
t34 = points_el_15["y"] || points_el_15[:y]
|
64
|
-
|
65
|
-
t35 =
|
66
|
-
t19 = [t35,
|
64
|
+
t39 = t37 > t38
|
65
|
+
t35 = t39 ? t37 : t34
|
66
|
+
t19 = [t35, t37]
|
67
67
|
t20 = t19.max
|
68
68
|
out << t20
|
69
69
|
end
|
@@ -73,15 +73,15 @@ module Kumi::Compiled::KUMI_837c6583df076b499ca19d645e0ea31df896a685151233a35705
|
|
73
73
|
def _grand_total(input = @input)
|
74
74
|
acc_21 = 0
|
75
75
|
t22 = input["points"] || input[:points]
|
76
|
-
|
76
|
+
t52 = 100
|
77
77
|
t22.each_with_index do |points_el_23, points_i_24|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
acc_21 +=
|
78
|
+
t51 = points_el_23["x"] || points_el_23[:x]
|
79
|
+
t48 = points_el_23["y"] || points_el_23[:y]
|
80
|
+
t53 = t51 > t52
|
81
|
+
t49 = t53 ? t51 : t48
|
82
|
+
t43 = [t49, t51]
|
83
|
+
t44 = t43.max
|
84
|
+
acc_21 += t44
|
85
85
|
end
|
86
86
|
acc_21
|
87
87
|
end
|