@@ -18,60 +18,108 @@ def float_to_int(i):
1818def initializeArray(v, size):
1919 return [v for _ in range(size)]
2020
21+ class ConstSpecialization_accumulate_type:
22+ __slots__ = ['sum']
23+ def __init__(self, sum=0.0):
24+ self.sum = sum
25+
26+ class ConstSpecialization_accumulate_real_2_type:
27+ __slots__ = ['sum']
28+ def __init__(self, sum=0.0):
29+ self.sum = sum
30+
31+ class ConstSpecialization_test_accumulate_spec_type:
32+ __slots__ = ['inst_10ec4']
33+ def __init__(self, inst_10ec4=ConstSpecialization_accumulate_real_2_type()):
34+ self.inst_10ec4 = inst_10ec4
35+
36+ class ConstSpecialization_test_accumulate_nonspec_type:
37+ __slots__ = ['inst_17a3f']
38+ def __init__(self, inst_17a3f=ConstSpecialization_accumulate_type()):
39+ self.inst_17a3f = inst_17a3f
40+
41+ class ConstSpecialization_scale_typed_real_2_type:
42+ __slots__ = ['last']
43+ def __init__(self, last=0.0):
44+ self.last = last
45+
46+ class ConstSpecialization_scale_typed_int_2_type:
47+ __slots__ = ['last']
48+ def __init__(self, last=0):
49+ self.last = last
50+
51+ class ConstSpecialization_test_typed_int_type:
52+ __slots__ = ['inst_1c235']
53+ def __init__(self, inst_1c235=ConstSpecialization_scale_typed_int_2_type()):
54+ self.inst_1c235 = inst_1c235
55+
56+ class ConstSpecialization_test_typed_real_type:
57+ __slots__ = ['inst_15f7d']
58+ def __init__(self, inst_15f7d=ConstSpecialization_scale_typed_real_2_type()):
59+ self.inst_15f7d = inst_15f7d
60+
61+ class ConstSpecialization_main_type:
62+ __slots__ = ['inst_13dfa', 'inst_201fa', 'inst_3e2fa', 'inst_477fa']
63+ def __init__(self, inst_13dfa=ConstSpecialization_test_accumulate_spec_type(), inst_201fa=ConstSpecialization_test_accumulate_nonspec_type(), inst_3e2fa=ConstSpecialization_test_typed_int_type(), inst_477fa=ConstSpecialization_test_typed_real_type()):
64+ self.inst_13dfa = inst_13dfa
65+ self.inst_201fa = inst_201fa
66+ self.inst_3e2fa = inst_3e2fa
67+ self.inst_477fa = inst_477fa
68+
2169def ConstSpecialization_accumulate_type_alloc():
22- _ctx = {}
23- _ctx[" sum"] = 0.0
70+ _ctx = ConstSpecialization_accumulate_type()
71+ _ctx. sum = 0.0
2472 return _ctx
2573
2674
2775def ConstSpecialization_accumulate_real_2_type_alloc():
28- _ctx = {}
29- _ctx[" sum"] = 0.0
76+ _ctx = ConstSpecialization_accumulate_real_2_type()
77+ _ctx. sum = 0.0
3078 return _ctx
3179
3280
3381def ConstSpecialization_test_accumulate_spec_type_alloc():
34- _ctx = {}
35- _ctx[" inst_10ec4"] = ConstSpecialization_accumulate_real_2_type_alloc()
82+ _ctx = ConstSpecialization_test_accumulate_spec_type()
83+ _ctx. inst_10ec4 = ConstSpecialization_accumulate_real_2_type_alloc()
3684 return _ctx
3785
3886
3987def ConstSpecialization_test_accumulate_nonspec_type_alloc():
40- _ctx = {}
41- _ctx[" inst_17a3f"] = ConstSpecialization_accumulate_type_alloc()
88+ _ctx = ConstSpecialization_test_accumulate_nonspec_type()
89+ _ctx. inst_17a3f = ConstSpecialization_accumulate_type_alloc()
4290 return _ctx
4391
4492
4593def ConstSpecialization_scale_typed_real_2_type_alloc():
46- _ctx = {}
47- _ctx[" last"] = 0.0
94+ _ctx = ConstSpecialization_scale_typed_real_2_type()
95+ _ctx. last = 0.0
4896 return _ctx
4997
5098
5199def ConstSpecialization_scale_typed_int_2_type_alloc():
52- _ctx = {}
53- _ctx[" last"] = 0
100+ _ctx = ConstSpecialization_scale_typed_int_2_type()
101+ _ctx. last = 0
54102 return _ctx
55103
56104
57105def ConstSpecialization_test_typed_int_type_alloc():
58- _ctx = {}
59- _ctx[" inst_1c235"] = ConstSpecialization_scale_typed_int_2_type_alloc()
106+ _ctx = ConstSpecialization_test_typed_int_type()
107+ _ctx. inst_1c235 = ConstSpecialization_scale_typed_int_2_type_alloc()
60108 return _ctx
61109
62110
63111def ConstSpecialization_test_typed_real_type_alloc():
64- _ctx = {}
65- _ctx[" inst_15f7d"] = ConstSpecialization_scale_typed_real_2_type_alloc()
112+ _ctx = ConstSpecialization_test_typed_real_type()
113+ _ctx. inst_15f7d = ConstSpecialization_scale_typed_real_2_type_alloc()
66114 return _ctx
67115
68116
69117def ConstSpecialization_main_type_alloc():
70- _ctx = {}
71- _ctx[" inst_13dfa"] = ConstSpecialization_test_accumulate_spec_type_alloc()
72- _ctx[" inst_201fa"] = ConstSpecialization_test_accumulate_nonspec_type_alloc()
73- _ctx[" inst_3e2fa"] = ConstSpecialization_test_typed_int_type_alloc()
74- _ctx[" inst_477fa"] = ConstSpecialization_test_typed_real_type_alloc()
118+ _ctx = ConstSpecialization_main_type()
119+ _ctx. inst_13dfa = ConstSpecialization_test_accumulate_spec_type_alloc()
120+ _ctx. inst_201fa = ConstSpecialization_test_accumulate_nonspec_type_alloc()
121+ _ctx. inst_3e2fa = ConstSpecialization_test_typed_int_type_alloc()
122+ _ctx. inst_477fa = ConstSpecialization_test_typed_real_type_alloc()
75123 return _ctx
76124
77125
@@ -118,36 +166,36 @@ def ConstSpecialization_test_interleaved_nonspec(a):
118166 return ConstSpecialization_interleaved(5.0, a, 4.0, 3.0)
119167
120168def ConstSpecialization_accumulate_real_2(_ctx, x):
121- _ctx[" sum"] = ((2.0 * x) + _ctx[" sum"] )
122- return _ctx[" sum"]
169+ _ctx. sum = ((2.0 * x) + _ctx. sum)
170+ return _ctx. sum
123171
124172
125173def ConstSpecialization_accumulate(_ctx, scale, x):
126- _ctx[" sum"] = ((scale * x) + _ctx[" sum"] )
127- return _ctx[" sum"]
174+ _ctx. sum = ((scale * x) + _ctx. sum)
175+ return _ctx. sum
128176
129177
130178def ConstSpecialization_test_accumulate_spec(_ctx):
131- return ConstSpecialization_accumulate_real_2(_ctx[" inst_10ec4"] , 5.0)
179+ return ConstSpecialization_accumulate_real_2(_ctx. inst_10ec4, 5.0)
132180
133181def ConstSpecialization_test_accumulate_nonspec(_ctx, s, x):
134- return ConstSpecialization_accumulate(_ctx[" inst_17a3f"] , s, x)
182+ return ConstSpecialization_accumulate(_ctx. inst_17a3f, s, x)
135183
136184def ConstSpecialization_scale_typed_int_2(_ctx, x):
137- _ctx[" last"] = x
185+ _ctx. last = x
138186 return x
139187
140188
141189def ConstSpecialization_scale_typed_real_2(_ctx, x):
142- _ctx[" last"] = x
190+ _ctx. last = x
143191 return x
144192
145193
146194def ConstSpecialization_test_typed_int(_ctx):
147- return ConstSpecialization_scale_typed_int_2(_ctx[" inst_1c235"] , 42)
195+ return ConstSpecialization_scale_typed_int_2(_ctx. inst_1c235, 42)
148196
149197def ConstSpecialization_test_typed_real(_ctx):
150- return ConstSpecialization_scale_typed_real_2(_ctx[" inst_15f7d"] , 3.14)
198+ return ConstSpecialization_scale_typed_real_2(_ctx. inst_15f7d, 3.14)
151199
152200def ConstSpecialization_setArrayElement_array_of_real_size_4_real_1(m, value):
153201 m[1] = value
@@ -198,10 +246,10 @@ def ConstSpecialization_main(_ctx):
198246 r5 = ConstSpecialization_test_weighted_nonspec(0.5)
199247 r6 = ConstSpecialization_test_interleaved_spec()
200248 r7 = ConstSpecialization_test_interleaved_nonspec(1.5)
201- r8 = ConstSpecialization_test_accumulate_spec(_ctx[" inst_13dfa"] )
202- r9 = ConstSpecialization_test_accumulate_nonspec(_ctx[" inst_201fa"] , 3.0, 4.0)
203- r10 = ConstSpecialization_test_typed_int(_ctx[" inst_3e2fa"] )
204- r11 = ConstSpecialization_test_typed_real(_ctx[" inst_477fa"] )
249+ r8 = ConstSpecialization_test_accumulate_spec(_ctx. inst_13dfa)
250+ r9 = ConstSpecialization_test_accumulate_nonspec(_ctx. inst_201fa, 3.0, 4.0)
251+ r10 = ConstSpecialization_test_typed_int(_ctx. inst_3e2fa)
252+ r11 = ConstSpecialization_test_typed_real(_ctx. inst_477fa)
205253 inputs = initializeArray(0.0, 2)
206254 inputs[0] = 1.0
207255 inputs[1] = 2.0
0 commit comments