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