niti, nitg & rta: use lookup_first_definition
[nit.git] / c_src / standard___collection___range._sep.c
1 /* This C file is generated by NIT to compile module standard___collection___range. */
2 #include "standard___collection___range._sep.h"
3 val_t standard___collection___range___Range___first(val_t p0){
4 struct {struct stack_frame_t me;} fra;
5 val_t REGB0;
6 val_t tmp;
7 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
8 fra.me.file = LOCATE_standard___collection___range;
9 fra.me.line = 22;
10 fra.me.meth = LOCATE_standard___collection___range___Range___first;
11 fra.me.has_broke = 0;
12 fra.me.REG_size = 1;
13 fra.me.nitni_local_ref_head = NULL;
14 fra.me.REG[0] = NIT_NULL;
15 fra.me.REG[0] = p0;
16 /* ../lib/standard/collection/range.nit:22 */
17 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____first(fra.me.REG[0])!=NIT_NULL);
18 if (UNTAG_Bool(REGB0)) {
19 } else {
20 nit_abort("Uninitialized attribute %s", "_first", LOCATE_standard___collection___range, 22);
21 }
22 fra.me.REG[0] = ATTR_standard___collection___range___Range____first(fra.me.REG[0]);
23 stack_frame_head = fra.me.prev;
24 return fra.me.REG[0];
25 }
26 val_t standard___collection___range___Range___last(val_t p0){
27 struct {struct stack_frame_t me;} fra;
28 val_t REGB0;
29 val_t tmp;
30 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
31 fra.me.file = LOCATE_standard___collection___range;
32 fra.me.line = 24;
33 fra.me.meth = LOCATE_standard___collection___range___Range___last;
34 fra.me.has_broke = 0;
35 fra.me.REG_size = 1;
36 fra.me.nitni_local_ref_head = NULL;
37 fra.me.REG[0] = NIT_NULL;
38 fra.me.REG[0] = p0;
39 /* ../lib/standard/collection/range.nit:24 */
40 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____last(fra.me.REG[0])!=NIT_NULL);
41 if (UNTAG_Bool(REGB0)) {
42 } else {
43 nit_abort("Uninitialized attribute %s", "_last", LOCATE_standard___collection___range, 24);
44 }
45 fra.me.REG[0] = ATTR_standard___collection___range___Range____last(fra.me.REG[0]);
46 stack_frame_head = fra.me.prev;
47 return fra.me.REG[0];
48 }
49 val_t standard___collection___range___Range___after(val_t p0){
50 struct {struct stack_frame_t me;} fra;
51 val_t REGB0;
52 val_t tmp;
53 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
54 fra.me.file = LOCATE_standard___collection___range;
55 fra.me.line = 27;
56 fra.me.meth = LOCATE_standard___collection___range___Range___after;
57 fra.me.has_broke = 0;
58 fra.me.REG_size = 1;
59 fra.me.nitni_local_ref_head = NULL;
60 fra.me.REG[0] = NIT_NULL;
61 fra.me.REG[0] = p0;
62 /* ../lib/standard/collection/range.nit:27 */
63 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____after(fra.me.REG[0])!=NIT_NULL);
64 if (UNTAG_Bool(REGB0)) {
65 } else {
66 nit_abort("Uninitialized attribute %s", "_after", LOCATE_standard___collection___range, 27);
67 }
68 fra.me.REG[0] = ATTR_standard___collection___range___Range____after(fra.me.REG[0]);
69 stack_frame_head = fra.me.prev;
70 return fra.me.REG[0];
71 }
72 val_t standard___collection___range___Range___has(val_t p0, val_t p1){
73 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
74 val_t REGB0;
75 val_t REGB1;
76 val_t tmp;
77 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
78 fra.me.file = LOCATE_standard___collection___range;
79 fra.me.line = 30;
80 fra.me.meth = LOCATE_standard___collection___range___Range___has;
81 fra.me.has_broke = 0;
82 fra.me.REG_size = 3;
83 fra.me.nitni_local_ref_head = NULL;
84 fra.me.REG[0] = NIT_NULL;
85 fra.me.REG[1] = NIT_NULL;
86 fra.me.REG[2] = NIT_NULL;
87 fra.me.REG[0] = p0;
88 fra.me.REG[1] = p1;
89 /* ../lib/standard/collection/range.nit:30 */
90 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____first(fra.me.REG[0])!=NIT_NULL);
91 if (UNTAG_Bool(REGB0)) {
92 } else {
93 nit_abort("Uninitialized attribute %s", "_first", LOCATE_standard___collection___range, 30);
94 }
95 fra.me.REG[2] = ATTR_standard___collection___range___Range____first(fra.me.REG[0]);
96 REGB0 = CALL_standard___kernel___Comparable_____geq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
97 if (UNTAG_Bool(REGB0)) {
98 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____last(fra.me.REG[0])!=NIT_NULL);
99 if (UNTAG_Bool(REGB0)) {
100 } else {
101 nit_abort("Uninitialized attribute %s", "_last", LOCATE_standard___collection___range, 30);
102 }
103 fra.me.REG[0] = ATTR_standard___collection___range___Range____last(fra.me.REG[0]);
104 REGB0 = CALL_standard___kernel___Comparable_____leq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
105 } else {
106 REGB1 = TAG_Bool(false);
107 REGB0 = REGB1;
108 }
109 goto label1;
110 label1: while(0);
111 stack_frame_head = fra.me.prev;
112 return REGB0;
113 }
114 val_t standard___collection___range___Range___has_only(val_t p0, val_t p1){
115 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
116 val_t REGB0;
117 val_t REGB1;
118 val_t tmp;
119 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
120 fra.me.file = LOCATE_standard___collection___range;
121 fra.me.line = 32;
122 fra.me.meth = LOCATE_standard___collection___range___Range___has_only;
123 fra.me.has_broke = 0;
124 fra.me.REG_size = 3;
125 fra.me.nitni_local_ref_head = NULL;
126 fra.me.REG[0] = NIT_NULL;
127 fra.me.REG[1] = NIT_NULL;
128 fra.me.REG[2] = NIT_NULL;
129 fra.me.REG[0] = p0;
130 fra.me.REG[1] = p1;
131 /* ../lib/standard/collection/range.nit:32 */
132 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____first(fra.me.REG[0])!=NIT_NULL);
133 if (UNTAG_Bool(REGB0)) {
134 } else {
135 nit_abort("Uninitialized attribute %s", "_first", LOCATE_standard___collection___range, 32);
136 }
137 fra.me.REG[2] = ATTR_standard___collection___range___Range____first(fra.me.REG[0]);
138 REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[2],fra.me.REG[1]));
139 if (UNTAG_Bool(REGB0)) {
140 } else {
141 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
142 REGB0 = REGB1;
143 }
144 if (UNTAG_Bool(REGB0)) {
145 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____last(fra.me.REG[0])!=NIT_NULL);
146 if (UNTAG_Bool(REGB0)) {
147 } else {
148 nit_abort("Uninitialized attribute %s", "_last", LOCATE_standard___collection___range, 32);
149 }
150 fra.me.REG[0] = ATTR_standard___collection___range___Range____last(fra.me.REG[0]);
151 REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[1],fra.me.REG[0]));
152 if (UNTAG_Bool(REGB0)) {
153 } else {
154 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
155 REGB0 = REGB1;
156 }
157 } else {
158 REGB1 = TAG_Bool(false);
159 REGB0 = REGB1;
160 }
161 goto label1;
162 label1: while(0);
163 stack_frame_head = fra.me.prev;
164 return REGB0;
165 }
166 val_t standard___collection___range___Range___count(val_t p0, val_t p1){
167 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
168 val_t REGB0;
169 val_t REGB1;
170 val_t tmp;
171 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
172 fra.me.file = LOCATE_standard___collection___range;
173 fra.me.line = 34;
174 fra.me.meth = LOCATE_standard___collection___range___Range___count;
175 fra.me.has_broke = 0;
176 fra.me.REG_size = 2;
177 fra.me.nitni_local_ref_head = NULL;
178 fra.me.REG[0] = NIT_NULL;
179 fra.me.REG[1] = NIT_NULL;
180 fra.me.REG[0] = p0;
181 fra.me.REG[1] = p1;
182 /* ../lib/standard/collection/range.nit:36 */
183 REGB0 = CALL_standard___collection___abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
184 if (UNTAG_Bool(REGB0)) {
185 /* ../lib/standard/collection/range.nit:37 */
186 REGB0 = TAG_Int(1);
187 goto label1;
188 } else {
189 /* ../lib/standard/collection/range.nit:39 */
190 REGB1 = TAG_Int(0);
191 REGB0 = REGB1;
192 goto label1;
193 }
194 label1: while(0);
195 stack_frame_head = fra.me.prev;
196 return REGB0;
197 }
198 val_t standard___collection___range___Range___iterator(val_t p0){
199 struct {struct stack_frame_t me;} fra;
200 val_t tmp;
201 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
202 fra.me.file = LOCATE_standard___collection___range;
203 fra.me.line = 43;
204 fra.me.meth = LOCATE_standard___collection___range___Range___iterator;
205 fra.me.has_broke = 0;
206 fra.me.REG_size = 1;
207 fra.me.nitni_local_ref_head = NULL;
208 fra.me.REG[0] = NIT_NULL;
209 fra.me.REG[0] = p0;
210 /* ../lib/standard/collection/range.nit:43 */
211 fra.me.REG[0] = NEW_IteratorRange_standard___collection___range___IteratorRange___init(fra.me.REG[0]);
212 goto label1;
213 label1: while(0);
214 stack_frame_head = fra.me.prev;
215 return fra.me.REG[0];
216 }
217 void standard___collection___range___Range___iterate(val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
218 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
219 val_t REGB0;
220 fun_t CREG[1];
221 val_t tmp;
222 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
223 fra.me.file = LOCATE_standard___collection___range;
224 fra.me.line = 45;
225 fra.me.meth = LOCATE_standard___collection___range___Range___iterate;
226 fra.me.has_broke = 0;
227 fra.me.REG_size = 3;
228 fra.me.nitni_local_ref_head = NULL;
229 fra.me.REG[0] = NIT_NULL;
230 fra.me.REG[1] = NIT_NULL;
231 fra.me.REG[2] = NIT_NULL;
232 fra.me.closure_ctx = closctx_param;
233 fra.me.closure_funs = CREG;
234 fra.me.REG[0] = p0;
235 CREG[0] = clos_fun0;
236 /* ../lib/standard/collection/range.nit:48 */
237 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____first(fra.me.REG[0])!=NIT_NULL);
238 if (UNTAG_Bool(REGB0)) {
239 } else {
240 nit_abort("Uninitialized attribute %s", "_first", LOCATE_standard___collection___range, 48);
241 }
242 fra.me.REG[1] = ATTR_standard___collection___range___Range____first(fra.me.REG[0]);
243 /* ../lib/standard/collection/range.nit:49 */
244 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____last(fra.me.REG[0])!=NIT_NULL);
245 if (UNTAG_Bool(REGB0)) {
246 } else {
247 nit_abort("Uninitialized attribute %s", "_last", LOCATE_standard___collection___range, 49);
248 }
249 fra.me.REG[0] = ATTR_standard___collection___range___Range____last(fra.me.REG[0]);
250 /* ../lib/standard/collection/range.nit:50 */
251 while(1) {
252 REGB0 = CALL_standard___kernel___Comparable_____leq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
253 if (UNTAG_Bool(REGB0)) {
254 /* ../lib/standard/collection/range.nit:51 */
255 ((void (*)(struct stack_frame_t *, val_t))(CREG[0]))(closctx_param, fra.me.REG[1]);
256 if (closctx_param->has_broke) {
257 goto label1;
258 }
259 /* ../lib/standard/collection/range.nit:52 */
260 fra.me.REG[2] = CALL_standard___kernel___Discrete___succ(fra.me.REG[1])(fra.me.REG[1]);
261 fra.me.REG[1] = fra.me.REG[2];
262 } else {
263 /* ../lib/standard/collection/range.nit:50 */
264 goto label2;
265 }
266 }
267 label2: while(0);
268 label1: while(0);
269 stack_frame_head = fra.me.prev;
270 return;
271 }
272 val_t standard___collection___range___Range___length(val_t p0){
273 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
274 val_t REGB0;
275 val_t REGB1;
276 val_t REGB2;
277 val_t tmp;
278 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
279 fra.me.file = LOCATE_standard___collection___range;
280 fra.me.line = 56;
281 fra.me.meth = LOCATE_standard___collection___range___Range___length;
282 fra.me.has_broke = 0;
283 fra.me.REG_size = 2;
284 fra.me.nitni_local_ref_head = NULL;
285 fra.me.REG[0] = NIT_NULL;
286 fra.me.REG[1] = NIT_NULL;
287 fra.me.REG[0] = p0;
288 /* ../lib/standard/collection/range.nit:58 */
289 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____first(fra.me.REG[0])!=NIT_NULL);
290 if (UNTAG_Bool(REGB0)) {
291 } else {
292 nit_abort("Uninitialized attribute %s", "_first", LOCATE_standard___collection___range, 58);
293 }
294 fra.me.REG[1] = ATTR_standard___collection___range___Range____first(fra.me.REG[0]);
295 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____after(fra.me.REG[0])!=NIT_NULL);
296 if (UNTAG_Bool(REGB0)) {
297 } else {
298 nit_abort("Uninitialized attribute %s", "_after", LOCATE_standard___collection___range, 58);
299 }
300 fra.me.REG[0] = ATTR_standard___collection___range___Range____after(fra.me.REG[0]);
301 REGB0 = CALL_standard___kernel___Discrete___distance(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
302 /* ../lib/standard/collection/range.nit:59 */
303 REGB1 = TAG_Int(0);
304 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
305 if (UNTAG_Bool(REGB2)) {
306 } else {
307 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
308 }
309 /* ../lib/standard/kernel.nit:234 */
310 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
311 /* ../lib/standard/collection/range.nit:59 */
312 if (UNTAG_Bool(REGB1)) {
313 /* ../lib/standard/collection/range.nit:60 */
314 goto label1;
315 } else {
316 /* ../lib/standard/collection/range.nit:62 */
317 REGB1 = TAG_Int(0);
318 REGB0 = REGB1;
319 goto label1;
320 }
321 label1: while(0);
322 stack_frame_head = fra.me.prev;
323 return REGB0;
324 }
325 val_t standard___collection___range___Range___is_empty(val_t p0){
326 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
327 val_t REGB0;
328 val_t tmp;
329 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
330 fra.me.file = LOCATE_standard___collection___range;
331 fra.me.line = 66;
332 fra.me.meth = LOCATE_standard___collection___range___Range___is_empty;
333 fra.me.has_broke = 0;
334 fra.me.REG_size = 2;
335 fra.me.nitni_local_ref_head = NULL;
336 fra.me.REG[0] = NIT_NULL;
337 fra.me.REG[1] = NIT_NULL;
338 fra.me.REG[0] = p0;
339 /* ../lib/standard/collection/range.nit:66 */
340 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____first(fra.me.REG[0])!=NIT_NULL);
341 if (UNTAG_Bool(REGB0)) {
342 } else {
343 nit_abort("Uninitialized attribute %s", "_first", LOCATE_standard___collection___range, 66);
344 }
345 fra.me.REG[1] = ATTR_standard___collection___range___Range____first(fra.me.REG[0]);
346 REGB0 = TAG_Bool(ATTR_standard___collection___range___Range____after(fra.me.REG[0])!=NIT_NULL);
347 if (UNTAG_Bool(REGB0)) {
348 } else {
349 nit_abort("Uninitialized attribute %s", "_after", LOCATE_standard___collection___range, 66);
350 }
351 fra.me.REG[0] = ATTR_standard___collection___range___Range____after(fra.me.REG[0]);
352 REGB0 = CALL_standard___kernel___Comparable_____geq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
353 goto label1;
354 label1: while(0);
355 stack_frame_head = fra.me.prev;
356 return REGB0;
357 }
358 void standard___collection___range___Range___init(val_t p0, val_t p1, val_t p2, int* init_table){
359 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___collection___range___Range].i;
360 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
361 val_t tmp;
362 if (init_table[itpos0]) return;
363 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
364 fra.me.file = LOCATE_standard___collection___range;
365 fra.me.line = 68;
366 fra.me.meth = LOCATE_standard___collection___range___Range___init;
367 fra.me.has_broke = 0;
368 fra.me.REG_size = 3;
369 fra.me.nitni_local_ref_head = NULL;
370 fra.me.REG[0] = NIT_NULL;
371 fra.me.REG[1] = NIT_NULL;
372 fra.me.REG[2] = NIT_NULL;
373 fra.me.REG[0] = p0;
374 fra.me.REG[1] = p1;
375 fra.me.REG[2] = p2;
376 /* ../lib/standard/collection/range.nit:72 */
377 ATTR_standard___collection___range___Range____first(fra.me.REG[0]) = fra.me.REG[1];
378 /* ../lib/standard/collection/range.nit:73 */
379 ATTR_standard___collection___range___Range____last(fra.me.REG[0]) = fra.me.REG[2];
380 /* ../lib/standard/collection/range.nit:74 */
381 fra.me.REG[2] = CALL_standard___kernel___Discrete___succ(fra.me.REG[2])(fra.me.REG[2]);
382 ATTR_standard___collection___range___Range____after(fra.me.REG[0]) = fra.me.REG[2];
383 stack_frame_head = fra.me.prev;
384 init_table[itpos0] = 1;
385 return;
386 }
387 void standard___collection___range___Range___without_last(val_t p0, val_t p1, val_t p2, int* init_table){
388 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___collection___range___Range].i;
389 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
390 val_t tmp;
391 if (init_table[itpos1]) return;
392 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
393 fra.me.file = LOCATE_standard___collection___range;
394 fra.me.line = 77;
395 fra.me.meth = LOCATE_standard___collection___range___Range___without_last;
396 fra.me.has_broke = 0;
397 fra.me.REG_size = 3;
398 fra.me.nitni_local_ref_head = NULL;
399 fra.me.REG[0] = NIT_NULL;
400 fra.me.REG[1] = NIT_NULL;
401 fra.me.REG[2] = NIT_NULL;
402 fra.me.REG[0] = p0;
403 fra.me.REG[1] = p1;
404 fra.me.REG[2] = p2;
405 /* ../lib/standard/collection/range.nit:81 */
406 ATTR_standard___collection___range___Range____first(fra.me.REG[0]) = fra.me.REG[1];
407 /* ../lib/standard/collection/range.nit:82 */
408 fra.me.REG[1] = CALL_standard___kernel___Discrete___prec(fra.me.REG[2])(fra.me.REG[2]);
409 ATTR_standard___collection___range___Range____last(fra.me.REG[0]) = fra.me.REG[1];
410 /* ../lib/standard/collection/range.nit:83 */
411 ATTR_standard___collection___range___Range____after(fra.me.REG[0]) = fra.me.REG[2];
412 stack_frame_head = fra.me.prev;
413 init_table[itpos1] = 1;
414 return;
415 }
416 val_t standard___collection___range___IteratorRange___item(val_t p0){
417 struct {struct stack_frame_t me;} fra;
418 val_t REGB0;
419 val_t tmp;
420 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
421 fra.me.file = LOCATE_standard___collection___range;
422 fra.me.line = 91;
423 fra.me.meth = LOCATE_standard___collection___range___IteratorRange___item;
424 fra.me.has_broke = 0;
425 fra.me.REG_size = 1;
426 fra.me.nitni_local_ref_head = NULL;
427 fra.me.REG[0] = NIT_NULL;
428 fra.me.REG[0] = p0;
429 /* ../lib/standard/collection/range.nit:91 */
430 REGB0 = TAG_Bool(ATTR_standard___collection___range___IteratorRange____item(fra.me.REG[0])!=NIT_NULL);
431 if (UNTAG_Bool(REGB0)) {
432 } else {
433 nit_abort("Uninitialized attribute %s", "_item", LOCATE_standard___collection___range, 91);
434 }
435 fra.me.REG[0] = ATTR_standard___collection___range___IteratorRange____item(fra.me.REG[0]);
436 stack_frame_head = fra.me.prev;
437 return fra.me.REG[0];
438 }
439 val_t standard___collection___range___IteratorRange___is_ok(val_t p0){
440 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
441 val_t REGB0;
442 val_t tmp;
443 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
444 fra.me.file = LOCATE_standard___collection___range;
445 fra.me.line = 93;
446 fra.me.meth = LOCATE_standard___collection___range___IteratorRange___is_ok;
447 fra.me.has_broke = 0;
448 fra.me.REG_size = 2;
449 fra.me.nitni_local_ref_head = NULL;
450 fra.me.REG[0] = NIT_NULL;
451 fra.me.REG[1] = NIT_NULL;
452 fra.me.REG[0] = p0;
453 /* ../lib/standard/collection/range.nit:93 */
454 REGB0 = TAG_Bool(ATTR_standard___collection___range___IteratorRange____item(fra.me.REG[0])!=NIT_NULL);
455 if (UNTAG_Bool(REGB0)) {
456 } else {
457 nit_abort("Uninitialized attribute %s", "_item", LOCATE_standard___collection___range, 93);
458 }
459 fra.me.REG[1] = ATTR_standard___collection___range___IteratorRange____item(fra.me.REG[0]);
460 REGB0 = TAG_Bool(ATTR_standard___collection___range___IteratorRange____range(fra.me.REG[0])!=NIT_NULL);
461 if (UNTAG_Bool(REGB0)) {
462 } else {
463 nit_abort("Uninitialized attribute %s", "_range", LOCATE_standard___collection___range, 93);
464 }
465 fra.me.REG[0] = ATTR_standard___collection___range___IteratorRange____range(fra.me.REG[0]);
466 fra.me.REG[0] = CALL_standard___collection___range___Range___after(fra.me.REG[0])(fra.me.REG[0]);
467 REGB0 = CALL_standard___kernel___Comparable_____l(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
468 goto label1;
469 label1: while(0);
470 stack_frame_head = fra.me.prev;
471 return REGB0;
472 }
473 void standard___collection___range___IteratorRange___next(val_t p0){
474 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
475 val_t REGB0;
476 val_t tmp;
477 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
478 fra.me.file = LOCATE_standard___collection___range;
479 fra.me.line = 95;
480 fra.me.meth = LOCATE_standard___collection___range___IteratorRange___next;
481 fra.me.has_broke = 0;
482 fra.me.REG_size = 2;
483 fra.me.nitni_local_ref_head = NULL;
484 fra.me.REG[0] = NIT_NULL;
485 fra.me.REG[1] = NIT_NULL;
486 fra.me.REG[0] = p0;
487 /* ../lib/standard/collection/range.nit:95 */
488 REGB0 = TAG_Bool(ATTR_standard___collection___range___IteratorRange____item(fra.me.REG[0])!=NIT_NULL);
489 if (UNTAG_Bool(REGB0)) {
490 } else {
491 nit_abort("Uninitialized attribute %s", "_item", LOCATE_standard___collection___range, 95);
492 }
493 fra.me.REG[1] = ATTR_standard___collection___range___IteratorRange____item(fra.me.REG[0]);
494 fra.me.REG[1] = CALL_standard___kernel___Discrete___succ(fra.me.REG[1])(fra.me.REG[1]);
495 ATTR_standard___collection___range___IteratorRange____item(fra.me.REG[0]) = fra.me.REG[1];
496 stack_frame_head = fra.me.prev;
497 return;
498 }
499 void standard___collection___range___IteratorRange___init(val_t p0, val_t p1, int* init_table){
500 int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___collection___range___IteratorRange].i;
501 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
502 val_t tmp;
503 if (init_table[itpos2]) return;
504 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
505 fra.me.file = LOCATE_standard___collection___range;
506 fra.me.line = 97;
507 fra.me.meth = LOCATE_standard___collection___range___IteratorRange___init;
508 fra.me.has_broke = 0;
509 fra.me.REG_size = 2;
510 fra.me.nitni_local_ref_head = NULL;
511 fra.me.REG[0] = NIT_NULL;
512 fra.me.REG[1] = NIT_NULL;
513 fra.me.REG[0] = p0;
514 fra.me.REG[1] = p1;
515 /* ../lib/standard/collection/range.nit:99 */
516 ATTR_standard___collection___range___IteratorRange____range(fra.me.REG[0]) = fra.me.REG[1];
517 /* ../lib/standard/collection/range.nit:100 */
518 fra.me.REG[1] = CALL_standard___collection___abstract_collection___Collection___first(fra.me.REG[1])(fra.me.REG[1]);
519 ATTR_standard___collection___range___IteratorRange____item(fra.me.REG[0]) = fra.me.REG[1];
520 stack_frame_head = fra.me.prev;
521 init_table[itpos2] = 1;
522 return;
523 }