c_src: update to have intern args
[nit.git] / c_src / opts._sep.c
1 /* This C file is generated by NIT to compile module opts. */
2 #include "opts._sep.h"
3 static const char LOCATE_opts___Option___names[] = "opts::Option::names";
4 val_t opts___Option___names(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_opts;
10 fra.me.line = 19;
11 fra.me.meth = LOCATE_opts___Option___names;
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/opts.nit:19 */
18 REGB0 = TAG_Bool(ATTR_opts___Option____names(fra.me.REG[0])!=NIT_NULL);
19 if (UNTAG_Bool(REGB0)) {
20 } else {
21 nit_abort("Uninitialized attribute %s", "_names", LOCATE_opts, 19);
22 }
23 fra.me.REG[0] = ATTR_opts___Option____names(fra.me.REG[0]);
24 stack_frame_head = fra.me.prev;
25 return fra.me.REG[0];
26 }
27 static const char LOCATE_opts___Option___helptext[] = "opts::Option::helptext";
28 val_t opts___Option___helptext(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_opts;
34 fra.me.line = 25;
35 fra.me.meth = LOCATE_opts___Option___helptext;
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/opts.nit:25 */
42 REGB0 = TAG_Bool(ATTR_opts___Option____helptext(fra.me.REG[0])!=NIT_NULL);
43 if (UNTAG_Bool(REGB0)) {
44 } else {
45 nit_abort("Uninitialized attribute %s", "_helptext", LOCATE_opts, 25);
46 }
47 fra.me.REG[0] = ATTR_opts___Option____helptext(fra.me.REG[0]);
48 stack_frame_head = fra.me.prev;
49 return fra.me.REG[0];
50 }
51 static const char LOCATE_opts___Option___errors[] = "opts::Option::errors";
52 val_t opts___Option___errors(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_opts;
58 fra.me.line = 28;
59 fra.me.meth = LOCATE_opts___Option___errors;
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/opts.nit:28 */
66 REGB0 = TAG_Bool(ATTR_opts___Option____errors(fra.me.REG[0])!=NIT_NULL);
67 if (UNTAG_Bool(REGB0)) {
68 } else {
69 nit_abort("Uninitialized attribute %s", "_errors", LOCATE_opts, 28);
70 }
71 fra.me.REG[0] = ATTR_opts___Option____errors(fra.me.REG[0]);
72 stack_frame_head = fra.me.prev;
73 return fra.me.REG[0];
74 }
75 static const char LOCATE_opts___Option___mandatory[] = "opts::Option::mandatory";
76 val_t opts___Option___mandatory(val_t p0){
77 struct {struct stack_frame_t me;} fra;
78 val_t REGB0;
79 val_t tmp;
80 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
81 fra.me.file = LOCATE_opts;
82 fra.me.line = 31;
83 fra.me.meth = LOCATE_opts___Option___mandatory;
84 fra.me.has_broke = 0;
85 fra.me.REG_size = 1;
86 fra.me.nitni_local_ref_head = NULL;
87 fra.me.REG[0] = NIT_NULL;
88 fra.me.REG[0] = p0;
89 /* ../lib/opts.nit:31 */
90 REGB0 = TAG_Bool(ATTR_opts___Option____mandatory(fra.me.REG[0])!=NIT_NULL);
91 if (UNTAG_Bool(REGB0)) {
92 } else {
93 nit_abort("Uninitialized attribute %s", "_mandatory", LOCATE_opts, 31);
94 }
95 REGB0 = ATTR_opts___Option____mandatory(fra.me.REG[0]);
96 stack_frame_head = fra.me.prev;
97 return REGB0;
98 }
99 static const char LOCATE_opts___Option___mandatory__eq[] = "opts::Option::mandatory=";
100 void opts___Option___mandatory__eq(val_t p0, val_t p1){
101 struct {struct stack_frame_t me;} fra;
102 val_t REGB0;
103 val_t tmp;
104 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
105 fra.me.file = LOCATE_opts;
106 fra.me.line = 31;
107 fra.me.meth = LOCATE_opts___Option___mandatory__eq;
108 fra.me.has_broke = 0;
109 fra.me.REG_size = 1;
110 fra.me.nitni_local_ref_head = NULL;
111 fra.me.REG[0] = NIT_NULL;
112 fra.me.REG[0] = p0;
113 REGB0 = p1;
114 /* ../lib/opts.nit:31 */
115 ATTR_opts___Option____mandatory(fra.me.REG[0]) = REGB0;
116 stack_frame_head = fra.me.prev;
117 return;
118 }
119 static const char LOCATE_opts___Option___read[] = "opts::Option::read";
120 val_t opts___Option___read(val_t p0){
121 struct {struct stack_frame_t me;} fra;
122 val_t REGB0;
123 val_t tmp;
124 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
125 fra.me.file = LOCATE_opts;
126 fra.me.line = 34;
127 fra.me.meth = LOCATE_opts___Option___read;
128 fra.me.has_broke = 0;
129 fra.me.REG_size = 1;
130 fra.me.nitni_local_ref_head = NULL;
131 fra.me.REG[0] = NIT_NULL;
132 fra.me.REG[0] = p0;
133 /* ../lib/opts.nit:34 */
134 REGB0 = TAG_Bool(ATTR_opts___Option____read(fra.me.REG[0])!=NIT_NULL);
135 if (UNTAG_Bool(REGB0)) {
136 } else {
137 nit_abort("Uninitialized attribute %s", "_read", LOCATE_opts, 34);
138 }
139 REGB0 = ATTR_opts___Option____read(fra.me.REG[0]);
140 stack_frame_head = fra.me.prev;
141 return REGB0;
142 }
143 static const char LOCATE_opts___Option___value__eq[] = "opts::Option::value=";
144 void opts___Option___value__eq(val_t p0, val_t p1){
145 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
146 val_t tmp;
147 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
148 fra.me.file = LOCATE_opts;
149 fra.me.line = 37;
150 fra.me.meth = LOCATE_opts___Option___value__eq;
151 fra.me.has_broke = 0;
152 fra.me.REG_size = 2;
153 fra.me.nitni_local_ref_head = NULL;
154 fra.me.REG[0] = NIT_NULL;
155 fra.me.REG[1] = NIT_NULL;
156 fra.me.REG[0] = p0;
157 fra.me.REG[1] = p1;
158 /* ../lib/opts.nit:37 */
159 ATTR_opts___Option____value(fra.me.REG[0]) = fra.me.REG[1];
160 stack_frame_head = fra.me.prev;
161 return;
162 }
163 static const char LOCATE_opts___Option___value[] = "opts::Option::value";
164 val_t opts___Option___value(val_t p0){
165 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
166 val_t REGB0;
167 val_t tmp;
168 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
169 fra.me.file = LOCATE_opts;
170 fra.me.line = 40;
171 fra.me.meth = LOCATE_opts___Option___value;
172 fra.me.has_broke = 0;
173 fra.me.REG_size = 2;
174 fra.me.nitni_local_ref_head = NULL;
175 fra.me.REG[0] = NIT_NULL;
176 fra.me.REG[1] = NIT_NULL;
177 fra.me.REG[0] = p0;
178 /* ../lib/opts.nit:40 */
179 fra.me.REG[1] = fra.me.REG[0];
180 /* ../lib/opts.nit:41 */
181 fra.me.REG[1] = ATTR_opts___Option____value(fra.me.REG[1]);
182 REGB0 = TAG_Bool((fra.me.REG[1]==NIT_NULL) || VAL_ISA(fra.me.REG[1], VTCOLOR_opts___Option___VALUE(fra.me.REG[0]), VTID_opts___Option___VALUE(fra.me.REG[0]))) /*cast VALUE*/;
183 if (UNTAG_Bool(REGB0)) {
184 } else {
185 nit_abort("Cast failed", NULL, LOCATE_opts, 41);
186 }
187 goto label1;
188 label1: while(0);
189 stack_frame_head = fra.me.prev;
190 return fra.me.REG[1];
191 }
192 static const char LOCATE_opts___Option___default_value[] = "opts::Option::default_value";
193 val_t opts___Option___default_value(val_t p0){
194 struct {struct stack_frame_t me;} fra;
195 val_t tmp;
196 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
197 fra.me.file = LOCATE_opts;
198 fra.me.line = 43;
199 fra.me.meth = LOCATE_opts___Option___default_value;
200 fra.me.has_broke = 0;
201 fra.me.REG_size = 1;
202 fra.me.nitni_local_ref_head = NULL;
203 fra.me.REG[0] = NIT_NULL;
204 fra.me.REG[0] = p0;
205 /* ../lib/opts.nit:43 */
206 fra.me.REG[0] = ATTR_opts___Option____default_value(fra.me.REG[0]);
207 stack_frame_head = fra.me.prev;
208 return fra.me.REG[0];
209 }
210 static const char LOCATE_opts___Option___default_value__eq[] = "opts::Option::default_value=";
211 void opts___Option___default_value__eq(val_t p0, val_t p1){
212 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
213 val_t tmp;
214 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
215 fra.me.file = LOCATE_opts;
216 fra.me.line = 43;
217 fra.me.meth = LOCATE_opts___Option___default_value__eq;
218 fra.me.has_broke = 0;
219 fra.me.REG_size = 2;
220 fra.me.nitni_local_ref_head = NULL;
221 fra.me.REG[0] = NIT_NULL;
222 fra.me.REG[1] = NIT_NULL;
223 fra.me.REG[0] = p0;
224 fra.me.REG[1] = p1;
225 /* ../lib/opts.nit:43 */
226 ATTR_opts___Option____default_value(fra.me.REG[0]) = fra.me.REG[1];
227 stack_frame_head = fra.me.prev;
228 return;
229 }
230 static const char LOCATE_opts___Option___init_opt[] = "opts::Option::init_opt";
231 void opts___Option___init_opt(val_t p0, val_t p1, val_t p2, val_t p3, int* init_table){
232 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_opts___Option].i;
233 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
234 val_t REGB0;
235 val_t REGB1;
236 val_t tmp;
237 if (init_table[itpos0]) return;
238 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
239 fra.me.file = LOCATE_opts;
240 fra.me.line = 46;
241 fra.me.meth = LOCATE_opts___Option___init_opt;
242 fra.me.has_broke = 0;
243 fra.me.REG_size = 5;
244 fra.me.nitni_local_ref_head = NULL;
245 fra.me.REG[0] = NIT_NULL;
246 fra.me.REG[1] = NIT_NULL;
247 fra.me.REG[2] = NIT_NULL;
248 fra.me.REG[3] = NIT_NULL;
249 fra.me.REG[4] = NIT_NULL;
250 fra.me.REG[0] = p0;
251 fra.me.REG[1] = p1;
252 fra.me.REG[2] = p2;
253 fra.me.REG[3] = p3;
254 /* ../lib/opts.nit:49 */
255 REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
256 if (UNTAG_Bool(REGB0)) {
257 } else {
258 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
259 if (UNTAG_Bool(REGB1)) {
260 REGB1 = TAG_Bool(0);
261 REGB0 = REGB1;
262 } else {
263 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], NIT_NULL);
264 REGB0 = REGB1;
265 }
266 }
267 if (UNTAG_Bool(REGB0)) {
268 /* ../lib/opts.nit:50 */
269 fra.me.REG[4] = NEW_Array_standard___collection___array___Array___init();
270 ATTR_opts___Option____names(fra.me.REG[0]) = fra.me.REG[4];
271 } else {
272 /* ../lib/opts.nit:52 */
273 REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
274 if (UNTAG_Bool(REGB0)) {
275 nit_abort("Reciever is null", NULL, LOCATE_opts, 52);
276 }
277 fra.me.REG[3] = CALL_standard___collection___array___Collection___to_a(fra.me.REG[3])(fra.me.REG[3]);
278 ATTR_opts___Option____names(fra.me.REG[0]) = fra.me.REG[3];
279 }
280 /* ../lib/opts.nit:54 */
281 ATTR_opts___Option____helptext(fra.me.REG[0]) = fra.me.REG[1];
282 /* ../lib/opts.nit:55 */
283 REGB0 = TAG_Bool(0);
284 ATTR_opts___Option____mandatory(fra.me.REG[0]) = REGB0;
285 /* ../lib/opts.nit:56 */
286 REGB0 = TAG_Bool(0);
287 ATTR_opts___Option____read(fra.me.REG[0]) = REGB0;
288 /* ../lib/opts.nit:57 */
289 ATTR_opts___Option____default_value(fra.me.REG[0]) = fra.me.REG[2];
290 /* ../lib/opts.nit:58 */
291 ATTR_opts___Option____value(fra.me.REG[0]) = fra.me.REG[2];
292 /* ../lib/opts.nit:59 */
293 fra.me.REG[2] = NEW_Array_standard___collection___array___Array___init();
294 ATTR_opts___Option____errors(fra.me.REG[0]) = fra.me.REG[2];
295 stack_frame_head = fra.me.prev;
296 init_table[itpos0] = 1;
297 return;
298 }
299 static const char LOCATE_opts___Option___add_aliases[] = "opts::Option::add_aliases";
300 void opts___Option___add_aliases(val_t p0, val_t p1){
301 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
302 val_t REGB0;
303 val_t tmp;
304 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
305 fra.me.file = LOCATE_opts;
306 fra.me.line = 62;
307 fra.me.meth = LOCATE_opts___Option___add_aliases;
308 fra.me.has_broke = 0;
309 fra.me.REG_size = 3;
310 fra.me.nitni_local_ref_head = NULL;
311 fra.me.REG[0] = NIT_NULL;
312 fra.me.REG[1] = NIT_NULL;
313 fra.me.REG[2] = NIT_NULL;
314 fra.me.REG[0] = p0;
315 fra.me.REG[1] = p1;
316 /* ../lib/opts.nit:62 */
317 fra.me.REG[2] = fra.me.REG[0];
318 REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[1], COLOR_standard___collection___array___Array, ID_standard___collection___array___Array)) /*cast Array[String]*/;
319 if (UNTAG_Bool(REGB0)) {
320 } else {
321 nit_abort("Cast failed", NULL, LOCATE_opts, 62);
322 }
323 /* ../lib/opts.nit:63 */
324 REGB0 = TAG_Bool(ATTR_opts___Option____names(fra.me.REG[2])!=NIT_NULL);
325 if (UNTAG_Bool(REGB0)) {
326 } else {
327 nit_abort("Uninitialized attribute %s", "_names", LOCATE_opts, 63);
328 }
329 fra.me.REG[2] = ATTR_opts___Option____names(fra.me.REG[2]);
330 CALL_standard___collection___abstract_collection___SimpleCollection___add_all(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
331 stack_frame_head = fra.me.prev;
332 return;
333 }
334 static const char LOCATE_opts___Option___to_s[] = "opts::Option::(string::Object::to_s)";
335 val_t opts___Option___to_s(val_t p0){
336 struct {struct stack_frame_t me;} fra;
337 val_t REGB0;
338 val_t tmp;
339 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
340 fra.me.file = LOCATE_opts;
341 fra.me.line = 65;
342 fra.me.meth = LOCATE_opts___Option___to_s;
343 fra.me.has_broke = 0;
344 fra.me.REG_size = 1;
345 fra.me.nitni_local_ref_head = NULL;
346 fra.me.REG[0] = NIT_NULL;
347 fra.me.REG[0] = p0;
348 /* ../lib/opts.nit:66 */
349 REGB0 = TAG_Int(2);
350 fra.me.REG[0] = CALL_opts___Option___pretty(fra.me.REG[0])(fra.me.REG[0], REGB0);
351 goto label1;
352 label1: while(0);
353 stack_frame_head = fra.me.prev;
354 return fra.me.REG[0];
355 }
356 static const char LOCATE_opts___Option___pretty[] = "opts::Option::pretty";
357 val_t opts___Option___pretty(val_t p0, val_t p1){
358 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
359 val_t REGB0;
360 val_t REGB1;
361 val_t REGB2;
362 val_t tmp;
363 static val_t once_value_1; /* Once value */
364 static val_t once_value_2; /* Once value */
365 static val_t once_value_3; /* Once value */
366 static val_t once_value_4; /* Once value */
367 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
368 fra.me.file = LOCATE_opts;
369 fra.me.line = 68;
370 fra.me.meth = LOCATE_opts___Option___pretty;
371 fra.me.has_broke = 0;
372 fra.me.REG_size = 4;
373 fra.me.nitni_local_ref_head = NULL;
374 fra.me.REG[0] = NIT_NULL;
375 fra.me.REG[1] = NIT_NULL;
376 fra.me.REG[2] = NIT_NULL;
377 fra.me.REG[3] = NIT_NULL;
378 fra.me.REG[0] = p0;
379 REGB0 = p1;
380 /* ../lib/opts.nit:71 */
381 if (!once_value_1) {
382 fra.me.REG[1] = BOX_NativeString(" ");
383 REGB1 = TAG_Int(2);
384 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB1);
385 once_value_1 = fra.me.REG[1];
386 register_static_object(&once_value_1);
387 } else fra.me.REG[1] = once_value_1;
388 fra.me.REG[1] = fra.me.REG[1];
389 fra.me.REG[1] = NEW_Buffer_standard___string___Buffer___from(fra.me.REG[1]);
390 /* ../lib/opts.nit:72 */
391 REGB1 = TAG_Bool(ATTR_opts___Option____names(fra.me.REG[0])!=NIT_NULL);
392 if (UNTAG_Bool(REGB1)) {
393 } else {
394 nit_abort("Uninitialized attribute %s", "_names", LOCATE_opts, 72);
395 }
396 fra.me.REG[2] = ATTR_opts___Option____names(fra.me.REG[0]);
397 if (!once_value_2) {
398 fra.me.REG[3] = BOX_NativeString(", ");
399 REGB1 = TAG_Int(2);
400 fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB1);
401 once_value_2 = fra.me.REG[3];
402 register_static_object(&once_value_2);
403 } else fra.me.REG[3] = once_value_2;
404 fra.me.REG[3] = fra.me.REG[3];
405 fra.me.REG[3] = CALL_standard___string___Collection___join(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
406 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
407 /* ../lib/opts.nit:73 */
408 if (!once_value_3) {
409 fra.me.REG[3] = BOX_NativeString(" ");
410 REGB1 = TAG_Int(2);
411 fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB1);
412 once_value_3 = fra.me.REG[3];
413 register_static_object(&once_value_3);
414 } else fra.me.REG[3] = once_value_3;
415 fra.me.REG[3] = fra.me.REG[3];
416 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
417 /* ../lib/standard/collection/array.nit:24 */
418 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
419 if (UNTAG_Bool(REGB1)) {
420 } else {
421 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
422 }
423 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
424 /* ../lib/standard/kernel.nit:240 */
425 REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
426 /* ../lib/opts.nit:75 */
427 REGB0 = TAG_Int(0);
428 REGB2 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
429 if (UNTAG_Bool(REGB2)) {
430 } else {
431 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
432 }
433 /* ../lib/standard/kernel.nit:237 */
434 REGB0 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB0));
435 /* ../lib/opts.nit:75 */
436 if (UNTAG_Bool(REGB0)) {
437 if (!once_value_4) {
438 fra.me.REG[3] = BOX_NativeString(" ");
439 REGB0 = TAG_Int(1);
440 fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
441 once_value_4 = fra.me.REG[3];
442 register_static_object(&once_value_4);
443 } else fra.me.REG[3] = once_value_4;
444 fra.me.REG[3] = fra.me.REG[3];
445 fra.me.REG[3] = CALL_standard___string___String_____star(fra.me.REG[3])(fra.me.REG[3], REGB1);
446 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
447 }
448 /* ../lib/opts.nit:76 */
449 fra.me.REG[0] = CALL_opts___Option___helptext(fra.me.REG[0])(fra.me.REG[0]);
450 CALL_standard___collection___abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
451 /* ../lib/opts.nit:78 */
452 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
453 goto label5;
454 label5: while(0);
455 stack_frame_head = fra.me.prev;
456 return fra.me.REG[1];
457 }
458 static const char LOCATE_opts___Option___pretty_default[] = "opts::Option::pretty_default";
459 val_t opts___Option___pretty_default(val_t p0){
460 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
461 val_t REGB0;
462 val_t REGB1;
463 val_t tmp;
464 static val_t once_value_1; /* Once value */
465 static val_t once_value_2; /* Once value */
466 static val_t once_value_4; /* Once value */
467 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
468 fra.me.file = LOCATE_opts;
469 fra.me.line = 81;
470 fra.me.meth = LOCATE_opts___Option___pretty_default;
471 fra.me.has_broke = 0;
472 fra.me.REG_size = 3;
473 fra.me.nitni_local_ref_head = NULL;
474 fra.me.REG[0] = NIT_NULL;
475 fra.me.REG[1] = NIT_NULL;
476 fra.me.REG[2] = NIT_NULL;
477 fra.me.REG[0] = p0;
478 /* ../lib/opts.nit:83 */
479 fra.me.REG[0] = CALL_opts___Option___default_value(fra.me.REG[0])(fra.me.REG[0]);
480 /* ../lib/opts.nit:84 */
481 REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
482 if (UNTAG_Bool(REGB0)) {
483 } else {
484 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
485 if (UNTAG_Bool(REGB1)) {
486 REGB1 = TAG_Bool(0);
487 REGB0 = REGB1;
488 } else {
489 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
490 REGB0 = REGB1;
491 }
492 }
493 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
494 if (UNTAG_Bool(REGB0)) {
495 REGB0 = TAG_Int(3);
496 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
497 if (!once_value_1) {
498 fra.me.REG[2] = BOX_NativeString(" (");
499 REGB0 = TAG_Int(2);
500 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
501 once_value_1 = fra.me.REG[2];
502 register_static_object(&once_value_1);
503 } else fra.me.REG[2] = once_value_1;
504 fra.me.REG[2] = fra.me.REG[2];
505 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
506 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
507 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
508 if (!once_value_2) {
509 fra.me.REG[0] = BOX_NativeString(")");
510 REGB0 = TAG_Int(1);
511 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
512 once_value_2 = fra.me.REG[0];
513 register_static_object(&once_value_2);
514 } else fra.me.REG[0] = once_value_2;
515 fra.me.REG[0] = fra.me.REG[0];
516 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
517 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
518 goto label3;
519 }
520 /* ../lib/opts.nit:85 */
521 if (!once_value_4) {
522 fra.me.REG[0] = BOX_NativeString("");
523 REGB0 = TAG_Int(0);
524 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
525 once_value_4 = fra.me.REG[0];
526 register_static_object(&once_value_4);
527 } else fra.me.REG[0] = once_value_4;
528 fra.me.REG[0] = fra.me.REG[0];
529 fra.me.REG[1] = fra.me.REG[0];
530 goto label3;
531 label3: while(0);
532 stack_frame_head = fra.me.prev;
533 return fra.me.REG[1];
534 }
535 static const char LOCATE_opts___Option___read_param[] = "opts::Option::read_param";
536 void opts___Option___read_param(val_t p0, val_t p1){
537 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
538 val_t REGB0;
539 val_t tmp;
540 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
541 fra.me.file = LOCATE_opts;
542 fra.me.line = 88;
543 fra.me.meth = LOCATE_opts___Option___read_param;
544 fra.me.has_broke = 0;
545 fra.me.REG_size = 2;
546 fra.me.nitni_local_ref_head = NULL;
547 fra.me.REG[0] = NIT_NULL;
548 fra.me.REG[1] = NIT_NULL;
549 fra.me.REG[0] = p0;
550 fra.me.REG[1] = p1;
551 /* ../lib/opts.nit:91 */
552 REGB0 = TAG_Bool(1);
553 ATTR_opts___Option____read(fra.me.REG[0]) = REGB0;
554 stack_frame_head = fra.me.prev;
555 return;
556 }
557 static const char LOCATE_opts___OptionText___init[] = "opts::OptionText::init";
558 void opts___OptionText___init(val_t p0, val_t p1, int* init_table){
559 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_opts___OptionText].i;
560 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
561 val_t tmp;
562 if (init_table[itpos1]) return;
563 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
564 fra.me.file = LOCATE_opts;
565 fra.me.line = 97;
566 fra.me.meth = LOCATE_opts___OptionText___init;
567 fra.me.has_broke = 0;
568 fra.me.REG_size = 2;
569 fra.me.nitni_local_ref_head = NULL;
570 fra.me.REG[0] = NIT_NULL;
571 fra.me.REG[1] = NIT_NULL;
572 fra.me.REG[0] = p0;
573 fra.me.REG[1] = p1;
574 /* ../lib/opts.nit:97 */
575 CALL_opts___Option___init_opt(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], NIT_NULL, NIT_NULL, init_table);
576 stack_frame_head = fra.me.prev;
577 init_table[itpos1] = 1;
578 return;
579 }
580 static const char LOCATE_opts___OptionText___pretty[] = "opts::OptionText::(opts::Option::pretty)";
581 val_t opts___OptionText___pretty(val_t p0, val_t p1){
582 struct {struct stack_frame_t me;} fra;
583 val_t REGB0;
584 val_t tmp;
585 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
586 fra.me.file = LOCATE_opts;
587 fra.me.line = 99;
588 fra.me.meth = LOCATE_opts___OptionText___pretty;
589 fra.me.has_broke = 0;
590 fra.me.REG_size = 1;
591 fra.me.nitni_local_ref_head = NULL;
592 fra.me.REG[0] = NIT_NULL;
593 fra.me.REG[0] = p0;
594 REGB0 = p1;
595 /* ../lib/opts.nit:99 */
596 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
597 goto label1;
598 label1: while(0);
599 stack_frame_head = fra.me.prev;
600 return fra.me.REG[0];
601 }
602 static const char LOCATE_opts___OptionText___to_s[] = "opts::OptionText::(string::Object::to_s)";
603 val_t opts___OptionText___to_s(val_t p0){
604 struct {struct stack_frame_t me;} fra;
605 val_t tmp;
606 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
607 fra.me.file = LOCATE_opts;
608 fra.me.line = 101;
609 fra.me.meth = LOCATE_opts___OptionText___to_s;
610 fra.me.has_broke = 0;
611 fra.me.REG_size = 1;
612 fra.me.nitni_local_ref_head = NULL;
613 fra.me.REG[0] = NIT_NULL;
614 fra.me.REG[0] = p0;
615 /* ../lib/opts.nit:101 */
616 fra.me.REG[0] = CALL_opts___Option___helptext(fra.me.REG[0])(fra.me.REG[0]);
617 goto label1;
618 label1: while(0);
619 stack_frame_head = fra.me.prev;
620 return fra.me.REG[0];
621 }
622 static const char LOCATE_opts___OptionBool___init[] = "opts::OptionBool::init";
623 void opts___OptionBool___init(val_t p0, val_t p1, val_t p2, int* init_table){
624 int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_opts___OptionBool].i;
625 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
626 val_t REGB0;
627 val_t tmp;
628 if (init_table[itpos2]) return;
629 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
630 fra.me.file = LOCATE_opts;
631 fra.me.line = 108;
632 fra.me.meth = LOCATE_opts___OptionBool___init;
633 fra.me.has_broke = 0;
634 fra.me.REG_size = 4;
635 fra.me.nitni_local_ref_head = NULL;
636 fra.me.REG[0] = NIT_NULL;
637 fra.me.REG[1] = NIT_NULL;
638 fra.me.REG[2] = NIT_NULL;
639 fra.me.REG[3] = NIT_NULL;
640 fra.me.REG[0] = p0;
641 fra.me.REG[1] = p1;
642 fra.me.REG[2] = p2;
643 /* ../lib/opts.nit:108 */
644 fra.me.REG[3] = fra.me.REG[0];
645 REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[2], COLOR_standard___collection___array___Array, ID_standard___collection___array___Array)) /*cast Array[String]*/;
646 if (UNTAG_Bool(REGB0)) {
647 } else {
648 nit_abort("Cast failed", NULL, LOCATE_opts, 108);
649 }
650 REGB0 = TAG_Bool(0);
651 CALL_opts___Option___init_opt(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1], REGB0, fra.me.REG[2], init_table);
652 stack_frame_head = fra.me.prev;
653 init_table[itpos2] = 1;
654 return;
655 }
656 static const char LOCATE_opts___OptionBool___read_param[] = "opts::OptionBool::(opts::Option::read_param)";
657 void opts___OptionBool___read_param(val_t p0, val_t p1){
658 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
659 val_t REGB0;
660 val_t tmp;
661 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
662 fra.me.file = LOCATE_opts;
663 fra.me.line = 110;
664 fra.me.meth = LOCATE_opts___OptionBool___read_param;
665 fra.me.has_broke = 0;
666 fra.me.REG_size = 3;
667 fra.me.nitni_local_ref_head = NULL;
668 fra.me.REG[0] = NIT_NULL;
669 fra.me.REG[1] = NIT_NULL;
670 fra.me.REG[2] = NIT_NULL;
671 fra.me.REG[0] = p0;
672 fra.me.REG[1] = p1;
673 /* ../lib/opts.nit:110 */
674 fra.me.REG[2] = fra.me.REG[0];
675 /* ../lib/opts.nit:112 */
676 CALL_SUPER_opts___OptionBool___read_param(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
677 /* ../lib/opts.nit:113 */
678 REGB0 = TAG_Bool(1);
679 CALL_opts___Option___value__eq(fra.me.REG[2])(fra.me.REG[2], REGB0);
680 stack_frame_head = fra.me.prev;
681 return;
682 }
683 static const char LOCATE_opts___OptionCount___init[] = "opts::OptionCount::init";
684 void opts___OptionCount___init(val_t p0, val_t p1, val_t p2, int* init_table){
685 int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_opts___OptionCount].i;
686 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
687 val_t REGB0;
688 val_t tmp;
689 if (init_table[itpos3]) return;
690 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
691 fra.me.file = LOCATE_opts;
692 fra.me.line = 121;
693 fra.me.meth = LOCATE_opts___OptionCount___init;
694 fra.me.has_broke = 0;
695 fra.me.REG_size = 4;
696 fra.me.nitni_local_ref_head = NULL;
697 fra.me.REG[0] = NIT_NULL;
698 fra.me.REG[1] = NIT_NULL;
699 fra.me.REG[2] = NIT_NULL;
700 fra.me.REG[3] = NIT_NULL;
701 fra.me.REG[0] = p0;
702 fra.me.REG[1] = p1;
703 fra.me.REG[2] = p2;
704 /* ../lib/opts.nit:121 */
705 fra.me.REG[3] = fra.me.REG[0];
706 REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[2], COLOR_standard___collection___array___Array, ID_standard___collection___array___Array)) /*cast Array[String]*/;
707 if (UNTAG_Bool(REGB0)) {
708 } else {
709 nit_abort("Cast failed", NULL, LOCATE_opts, 121);
710 }
711 REGB0 = TAG_Int(0);
712 CALL_opts___Option___init_opt(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1], REGB0, fra.me.REG[2], init_table);
713 stack_frame_head = fra.me.prev;
714 init_table[itpos3] = 1;
715 return;
716 }
717 static const char LOCATE_opts___OptionCount___read_param[] = "opts::OptionCount::(opts::Option::read_param)";
718 void opts___OptionCount___read_param(val_t p0, val_t p1){
719 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
720 val_t REGB0;
721 val_t tmp;
722 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
723 fra.me.file = LOCATE_opts;
724 fra.me.line = 123;
725 fra.me.meth = LOCATE_opts___OptionCount___read_param;
726 fra.me.has_broke = 0;
727 fra.me.REG_size = 3;
728 fra.me.nitni_local_ref_head = NULL;
729 fra.me.REG[0] = NIT_NULL;
730 fra.me.REG[1] = NIT_NULL;
731 fra.me.REG[2] = NIT_NULL;
732 fra.me.REG[0] = p0;
733 fra.me.REG[1] = p1;
734 /* ../lib/opts.nit:123 */
735 fra.me.REG[2] = fra.me.REG[0];
736 /* ../lib/opts.nit:125 */
737 CALL_SUPER_opts___OptionCount___read_param(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
738 /* ../lib/opts.nit:126 */
739 fra.me.REG[1] = CALL_opts___Option___value(fra.me.REG[2])(fra.me.REG[2]);
740 REGB0 = TAG_Int(1);
741 /* ../lib/standard/kernel.nit:238 */
742 REGB0 = TAG_Int(UNTAG_Int(fra.me.REG[1])+UNTAG_Int(REGB0));
743 /* ../lib/opts.nit:126 */
744 CALL_opts___Option___value__eq(fra.me.REG[2])(fra.me.REG[2], REGB0);
745 stack_frame_head = fra.me.prev;
746 return;
747 }
748 static const char LOCATE_opts___OptionParameter___convert[] = "opts::OptionParameter::convert";
749 val_t opts___OptionParameter___convert(val_t p0, val_t p1){
750 struct {struct stack_frame_t me;} fra;
751 val_t tmp;
752 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
753 fra.me.file = LOCATE_opts;
754 fra.me.line = 133;
755 fra.me.meth = LOCATE_opts___OptionParameter___convert;
756 fra.me.has_broke = 0;
757 fra.me.REG_size = 0;
758 fra.me.nitni_local_ref_head = NULL;
759 /* ../lib/opts.nit:133 */
760 nit_abort("Deferred method called", NULL, LOCATE_opts, 133);
761 stack_frame_head = fra.me.prev;
762 return NIT_NULL;
763 }
764 static const char LOCATE_opts___OptionParameter___parameter_mandatory[] = "opts::OptionParameter::parameter_mandatory";
765 val_t opts___OptionParameter___parameter_mandatory(val_t p0){
766 struct {struct stack_frame_t me;} fra;
767 val_t REGB0;
768 val_t tmp;
769 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
770 fra.me.file = LOCATE_opts;
771 fra.me.line = 135;
772 fra.me.meth = LOCATE_opts___OptionParameter___parameter_mandatory;
773 fra.me.has_broke = 0;
774 fra.me.REG_size = 1;
775 fra.me.nitni_local_ref_head = NULL;
776 fra.me.REG[0] = NIT_NULL;
777 fra.me.REG[0] = p0;
778 /* ../lib/opts.nit:135 */
779 REGB0 = TAG_Bool(ATTR_opts___OptionParameter____parameter_mandatory(fra.me.REG[0])!=NIT_NULL);
780 if (UNTAG_Bool(REGB0)) {
781 } else {
782 nit_abort("Uninitialized attribute %s", "_parameter_mandatory", LOCATE_opts, 135);
783 }
784 REGB0 = ATTR_opts___OptionParameter____parameter_mandatory(fra.me.REG[0]);
785 stack_frame_head = fra.me.prev;
786 return REGB0;
787 }
788 static const char LOCATE_opts___OptionParameter___parameter_mandatory__eq[] = "opts::OptionParameter::parameter_mandatory=";
789 void opts___OptionParameter___parameter_mandatory__eq(val_t p0, val_t p1){
790 struct {struct stack_frame_t me;} fra;
791 val_t REGB0;
792 val_t tmp;
793 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
794 fra.me.file = LOCATE_opts;
795 fra.me.line = 135;
796 fra.me.meth = LOCATE_opts___OptionParameter___parameter_mandatory__eq;
797 fra.me.has_broke = 0;
798 fra.me.REG_size = 1;
799 fra.me.nitni_local_ref_head = NULL;
800 fra.me.REG[0] = NIT_NULL;
801 fra.me.REG[0] = p0;
802 REGB0 = p1;
803 /* ../lib/opts.nit:135 */
804 ATTR_opts___OptionParameter____parameter_mandatory(fra.me.REG[0]) = REGB0;
805 stack_frame_head = fra.me.prev;
806 return;
807 }
808 static const char LOCATE_opts___OptionParameter___read_param[] = "opts::OptionParameter::(opts::Option::read_param)";
809 void opts___OptionParameter___read_param(val_t p0, val_t p1){
810 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
811 val_t REGB0;
812 val_t REGB1;
813 val_t REGB2;
814 val_t tmp;
815 static val_t once_value_1; /* Once value */
816 static val_t once_value_2; /* Once value */
817 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
818 fra.me.file = LOCATE_opts;
819 fra.me.line = 138;
820 fra.me.meth = LOCATE_opts___OptionParameter___read_param;
821 fra.me.has_broke = 0;
822 fra.me.REG_size = 4;
823 fra.me.nitni_local_ref_head = NULL;
824 fra.me.REG[0] = NIT_NULL;
825 fra.me.REG[1] = NIT_NULL;
826 fra.me.REG[2] = NIT_NULL;
827 fra.me.REG[3] = NIT_NULL;
828 fra.me.REG[0] = p0;
829 fra.me.REG[1] = p1;
830 /* ../lib/opts.nit:138 */
831 fra.me.REG[2] = fra.me.REG[0];
832 fra.me.REG[3] = fra.me.REG[1];
833 /* ../lib/opts.nit:140 */
834 CALL_SUPER_opts___OptionParameter___read_param(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
835 /* ../lib/opts.nit:141 */
836 REGB0 = CALL_standard___collection___abstract_collection___Iterator___is_ok(fra.me.REG[3])(fra.me.REG[3]);
837 if (UNTAG_Bool(REGB0)) {
838 fra.me.REG[1] = CALL_standard___collection___abstract_collection___Iterator___item(fra.me.REG[3])(fra.me.REG[3]);
839 REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
840 if (UNTAG_Bool(REGB0)) {
841 nit_abort("Reciever is null", NULL, LOCATE_opts, 141);
842 }
843 fra.me.REG[1] = CALL_standard___collection___abstract_collection___Collection___first(fra.me.REG[1])(fra.me.REG[1]);
844 REGB0 = TAG_Char('-');
845 REGB1 = TAG_Bool(IS_EQUAL_ON(REGB0,fra.me.REG[1]));
846 if (UNTAG_Bool(REGB1)) {
847 } else {
848 REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
849 if (UNTAG_Bool(REGB2)) {
850 REGB2 = TAG_Bool(0);
851 REGB1 = REGB2;
852 } else {
853 /* ../lib/standard/kernel.nit:381 */
854 REGB0 = TAG_Bool((fra.me.REG[1])==(REGB0));
855 /* ../lib/opts.nit:141 */
856 REGB1 = REGB0;
857 }
858 }
859 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
860 } else {
861 REGB0 = TAG_Bool(0);
862 REGB1 = REGB0;
863 }
864 if (UNTAG_Bool(REGB1)) {
865 /* ../lib/opts.nit:142 */
866 fra.me.REG[1] = CALL_standard___collection___abstract_collection___Iterator___item(fra.me.REG[3])(fra.me.REG[3]);
867 fra.me.REG[1] = CALL_opts___OptionParameter___convert(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
868 CALL_opts___Option___value__eq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
869 /* ../lib/opts.nit:143 */
870 CALL_standard___collection___abstract_collection___Iterator___next(fra.me.REG[3])(fra.me.REG[3]);
871 } else {
872 /* ../lib/opts.nit:145 */
873 REGB1 = TAG_Bool(ATTR_opts___OptionParameter____parameter_mandatory(fra.me.REG[2])!=NIT_NULL);
874 if (UNTAG_Bool(REGB1)) {
875 } else {
876 nit_abort("Uninitialized attribute %s", "_parameter_mandatory", LOCATE_opts, 145);
877 }
878 REGB1 = ATTR_opts___OptionParameter____parameter_mandatory(fra.me.REG[2]);
879 if (UNTAG_Bool(REGB1)) {
880 /* ../lib/opts.nit:146 */
881 REGB1 = TAG_Bool(ATTR_opts___Option____errors(fra.me.REG[2])!=NIT_NULL);
882 if (UNTAG_Bool(REGB1)) {
883 } else {
884 nit_abort("Uninitialized attribute %s", "_errors", LOCATE_opts, 146);
885 }
886 fra.me.REG[3] = ATTR_opts___Option____errors(fra.me.REG[2]);
887 REGB1 = TAG_Int(3);
888 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB1);
889 if (!once_value_1) {
890 fra.me.REG[0] = BOX_NativeString("Parameter expected for option ");
891 REGB1 = TAG_Int(30);
892 fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB1);
893 once_value_1 = fra.me.REG[0];
894 register_static_object(&once_value_1);
895 } else fra.me.REG[0] = once_value_1;
896 fra.me.REG[0] = fra.me.REG[0];
897 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
898 fra.me.REG[2] = CALL_opts___Option___names(fra.me.REG[2])(fra.me.REG[2]);
899 fra.me.REG[2] = CALL_standard___collection___abstract_collection___Collection___first(fra.me.REG[2])(fra.me.REG[2]);
900 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
901 if (!once_value_2) {
902 fra.me.REG[2] = BOX_NativeString(".");
903 REGB1 = TAG_Int(1);
904 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB1);
905 once_value_2 = fra.me.REG[2];
906 register_static_object(&once_value_2);
907 } else fra.me.REG[2] = once_value_2;
908 fra.me.REG[2] = fra.me.REG[2];
909 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
910 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
911 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
912 }
913 }
914 stack_frame_head = fra.me.prev;
915 return;
916 }
917 static const char LOCATE_opts___OptionParameter___init_opt[] = "opts::OptionParameter::init_opt";
918 void opts___OptionParameter___init_opt(val_t p0, val_t p1, val_t p2, val_t p3, int* init_table){
919 int itpos4 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_opts___OptionParameter].i;
920 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
921 val_t REGB0;
922 val_t tmp;
923 if (init_table[itpos4]) return;
924 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
925 fra.me.file = LOCATE_opts;
926 fra.me.line = 151;
927 fra.me.meth = LOCATE_opts___OptionParameter___init_opt;
928 fra.me.has_broke = 0;
929 fra.me.REG_size = 5;
930 fra.me.nitni_local_ref_head = NULL;
931 fra.me.REG[0] = NIT_NULL;
932 fra.me.REG[1] = NIT_NULL;
933 fra.me.REG[2] = NIT_NULL;
934 fra.me.REG[3] = NIT_NULL;
935 fra.me.REG[4] = NIT_NULL;
936 fra.me.REG[0] = p0;
937 fra.me.REG[1] = p1;
938 fra.me.REG[2] = p2;
939 fra.me.REG[3] = p3;
940 /* ../lib/opts.nit:151 */
941 fra.me.REG[4] = fra.me.REG[0];
942 /* ../lib/opts.nit:153 */
943 CALL_opts___Option___init_opt(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[2], fra.me.REG[3], init_table);
944 /* ../lib/opts.nit:154 */
945 REGB0 = TAG_Bool(1);
946 ATTR_opts___OptionParameter____parameter_mandatory(fra.me.REG[4]) = REGB0;
947 stack_frame_head = fra.me.prev;
948 init_table[itpos4] = 1;
949 return;
950 }
951 static const char LOCATE_opts___OptionString___init[] = "opts::OptionString::init";
952 void opts___OptionString___init(val_t p0, val_t p1, val_t p2, int* init_table){
953 int itpos5 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_opts___OptionString].i;
954 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
955 val_t REGB0;
956 val_t tmp;
957 if (init_table[itpos5]) return;
958 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
959 fra.me.file = LOCATE_opts;
960 fra.me.line = 162;
961 fra.me.meth = LOCATE_opts___OptionString___init;
962 fra.me.has_broke = 0;
963 fra.me.REG_size = 4;
964 fra.me.nitni_local_ref_head = NULL;
965 fra.me.REG[0] = NIT_NULL;
966 fra.me.REG[1] = NIT_NULL;
967 fra.me.REG[2] = NIT_NULL;
968 fra.me.REG[3] = NIT_NULL;
969 fra.me.REG[0] = p0;
970 fra.me.REG[1] = p1;
971 fra.me.REG[2] = p2;
972 /* ../lib/opts.nit:162 */
973 fra.me.REG[3] = fra.me.REG[0];
974 REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[2], COLOR_standard___collection___array___Array, ID_standard___collection___array___Array)) /*cast Array[String]*/;
975 if (UNTAG_Bool(REGB0)) {
976 } else {
977 nit_abort("Cast failed", NULL, LOCATE_opts, 162);
978 }
979 CALL_opts___OptionParameter___init_opt(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1], NIT_NULL, fra.me.REG[2], init_table);
980 stack_frame_head = fra.me.prev;
981 init_table[itpos5] = 1;
982 return;
983 }
984 static const char LOCATE_opts___OptionString___convert[] = "opts::OptionString::(opts::OptionParameter::convert)";
985 val_t opts___OptionString___convert(val_t p0, val_t p1){
986 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
987 val_t tmp;
988 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
989 fra.me.file = LOCATE_opts;
990 fra.me.line = 164;
991 fra.me.meth = LOCATE_opts___OptionString___convert;
992 fra.me.has_broke = 0;
993 fra.me.REG_size = 2;
994 fra.me.nitni_local_ref_head = NULL;
995 fra.me.REG[0] = NIT_NULL;
996 fra.me.REG[1] = NIT_NULL;
997 fra.me.REG[0] = p0;
998 fra.me.REG[1] = p1;
999 /* ../lib/opts.nit:164 */
1000 goto label1;
1001 label1: while(0);
1002 stack_frame_head = fra.me.prev;
1003 return fra.me.REG[1];
1004 }
1005 static const char LOCATE_opts___OptionEnum___init[] = "opts::OptionEnum::init";
1006 void opts___OptionEnum___init(val_t p0, val_t p1, val_t p2, val_t p3, val_t p4, int* init_table){
1007 int itpos6 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_opts___OptionEnum].i;
1008 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
1009 val_t REGB0;
1010 val_t REGB1;
1011 val_t REGB2;
1012 val_t REGB3;
1013 val_t tmp;
1014 static val_t once_value_1; /* Once value */
1015 static val_t once_value_2; /* Once value */
1016 static val_t once_value_3; /* Once value */
1017 static val_t once_value_4; /* Once value */
1018 if (init_table[itpos6]) return;
1019 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1020 fra.me.file = LOCATE_opts;
1021 fra.me.line = 172;
1022 fra.me.meth = LOCATE_opts___OptionEnum___init;
1023 fra.me.has_broke = 0;
1024 fra.me.REG_size = 6;
1025 fra.me.nitni_local_ref_head = NULL;
1026 fra.me.REG[0] = NIT_NULL;
1027 fra.me.REG[1] = NIT_NULL;
1028 fra.me.REG[2] = NIT_NULL;
1029 fra.me.REG[3] = NIT_NULL;
1030 fra.me.REG[4] = NIT_NULL;
1031 fra.me.REG[5] = NIT_NULL;
1032 fra.me.REG[0] = p0;
1033 fra.me.REG[1] = p1;
1034 fra.me.REG[2] = p2;
1035 REGB0 = p3;
1036 fra.me.REG[3] = p4;
1037 /* ../lib/opts.nit:172 */
1038 fra.me.REG[4] = fra.me.REG[0];
1039 REGB1 = TAG_Bool(VAL_ISA(fra.me.REG[3], COLOR_standard___collection___array___Array, ID_standard___collection___array___Array)) /*cast Array[String]*/;
1040 if (UNTAG_Bool(REGB1)) {
1041 } else {
1042 nit_abort("Cast failed", NULL, LOCATE_opts, 172);
1043 }
1044 /* ../lib/standard/collection/array.nit:24 */
1045 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1046 if (UNTAG_Bool(REGB1)) {
1047 } else {
1048 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1049 }
1050 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1051 /* ../lib/opts.nit:174 */
1052 REGB2 = TAG_Int(0);
1053 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1054 if (UNTAG_Bool(REGB3)) {
1055 } else {
1056 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1057 }
1058 /* ../lib/standard/kernel.nit:237 */
1059 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB2));
1060 /* ../lib/opts.nit:174 */
1061 if (UNTAG_Bool(REGB2)) {
1062 } else {
1063 nit_abort("Assert failed", NULL, LOCATE_opts, 174);
1064 }
1065 /* ../lib/opts.nit:175 */
1066 fra.me.REG[0] = CALL_standard___collection___array___Collection___to_a(fra.me.REG[1])(fra.me.REG[1]);
1067 ATTR_opts___OptionEnum____values(fra.me.REG[4]) = fra.me.REG[0];
1068 /* ../lib/opts.nit:176 */
1069 REGB2 = TAG_Int(5);
1070 fra.me.REG[0] = NEW_Array_standard___collection___array___Array___with_capacity(REGB2);
1071 if (!once_value_1) {
1072 fra.me.REG[5] = BOX_NativeString("");
1073 REGB2 = TAG_Int(0);
1074 fra.me.REG[5] = NEW_String_standard___string___String___with_native(fra.me.REG[5], REGB2);
1075 once_value_1 = fra.me.REG[5];
1076 register_static_object(&once_value_1);
1077 } else fra.me.REG[5] = once_value_1;
1078 fra.me.REG[5] = fra.me.REG[5];
1079 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[5]);
1080 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
1081 if (!once_value_2) {
1082 fra.me.REG[2] = BOX_NativeString(" <");
1083 REGB2 = TAG_Int(2);
1084 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB2);
1085 once_value_2 = fra.me.REG[2];
1086 register_static_object(&once_value_2);
1087 } else fra.me.REG[2] = once_value_2;
1088 fra.me.REG[2] = fra.me.REG[2];
1089 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
1090 if (!once_value_3) {
1091 fra.me.REG[2] = BOX_NativeString(", ");
1092 REGB2 = TAG_Int(2);
1093 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB2);
1094 once_value_3 = fra.me.REG[2];
1095 register_static_object(&once_value_3);
1096 } else fra.me.REG[2] = once_value_3;
1097 fra.me.REG[2] = fra.me.REG[2];
1098 fra.me.REG[2] = CALL_standard___string___Collection___join(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
1099 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
1100 if (!once_value_4) {
1101 fra.me.REG[2] = BOX_NativeString(">");
1102 REGB2 = TAG_Int(1);
1103 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB2);
1104 once_value_4 = fra.me.REG[2];
1105 register_static_object(&once_value_4);
1106 } else fra.me.REG[2] = once_value_4;
1107 fra.me.REG[2] = fra.me.REG[2];
1108 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
1109 fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
1110 CALL_opts___OptionParameter___init_opt(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0], REGB0, fra.me.REG[3], init_table);
1111 stack_frame_head = fra.me.prev;
1112 init_table[itpos6] = 1;
1113 return;
1114 }
1115 static const char LOCATE_opts___OptionEnum___convert[] = "opts::OptionEnum::(opts::OptionParameter::convert)";
1116 val_t opts___OptionEnum___convert(val_t p0, val_t p1){
1117 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
1118 val_t REGB0;
1119 val_t REGB1;
1120 val_t REGB2;
1121 val_t tmp;
1122 static val_t once_value_1; /* Once value */
1123 static val_t once_value_2; /* Once value */
1124 static val_t once_value_3; /* Once value */
1125 static val_t once_value_4; /* Once value */
1126 static val_t once_value_5; /* Once value */
1127 static val_t once_value_6; /* Once value */
1128 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1129 fra.me.file = LOCATE_opts;
1130 fra.me.line = 179;
1131 fra.me.meth = LOCATE_opts___OptionEnum___convert;
1132 fra.me.has_broke = 0;
1133 fra.me.REG_size = 5;
1134 fra.me.nitni_local_ref_head = NULL;
1135 fra.me.REG[0] = NIT_NULL;
1136 fra.me.REG[1] = NIT_NULL;
1137 fra.me.REG[2] = NIT_NULL;
1138 fra.me.REG[3] = NIT_NULL;
1139 fra.me.REG[4] = NIT_NULL;
1140 fra.me.REG[0] = p0;
1141 fra.me.REG[1] = p1;
1142 /* ../lib/opts.nit:181 */
1143 REGB0 = TAG_Bool(ATTR_opts___OptionEnum____values(fra.me.REG[0])!=NIT_NULL);
1144 if (UNTAG_Bool(REGB0)) {
1145 } else {
1146 nit_abort("Uninitialized attribute %s", "_values", LOCATE_opts, 181);
1147 }
1148 fra.me.REG[2] = ATTR_opts___OptionEnum____values(fra.me.REG[0]);
1149 REGB0 = CALL_standard___collection___abstract_collection___SequenceRead___index_of(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
1150 /* ../lib/opts.nit:182 */
1151 REGB1 = TAG_Int(1);
1152 /* ../lib/standard/kernel.nit:239 */
1153 REGB1 = TAG_Int(-UNTAG_Int(REGB1));
1154 /* ../lib/opts.nit:182 */
1155 REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
1156 if (UNTAG_Bool(REGB2)) {
1157 } else {
1158 /* ../lib/standard/kernel.nit:230 */
1159 REGB1 = TAG_Bool((REGB0)==(REGB1));
1160 /* ../lib/opts.nit:182 */
1161 REGB2 = REGB1;
1162 }
1163 if (UNTAG_Bool(REGB2)) {
1164 /* ../lib/opts.nit:183 */
1165 REGB2 = TAG_Int(3);
1166 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB2);
1167 if (!once_value_1) {
1168 fra.me.REG[2] = BOX_NativeString("Unrecognized value for option ");
1169 REGB2 = TAG_Int(30);
1170 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB2);
1171 once_value_1 = fra.me.REG[2];
1172 register_static_object(&once_value_1);
1173 } else fra.me.REG[2] = once_value_1;
1174 fra.me.REG[2] = fra.me.REG[2];
1175 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
1176 REGB2 = TAG_Bool(ATTR_opts___Option____names(fra.me.REG[0])!=NIT_NULL);
1177 if (UNTAG_Bool(REGB2)) {
1178 } else {
1179 nit_abort("Uninitialized attribute %s", "_names", LOCATE_opts, 183);
1180 }
1181 fra.me.REG[2] = ATTR_opts___Option____names(fra.me.REG[0]);
1182 if (!once_value_2) {
1183 fra.me.REG[3] = BOX_NativeString(", ");
1184 REGB2 = TAG_Int(2);
1185 fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB2);
1186 once_value_2 = fra.me.REG[3];
1187 register_static_object(&once_value_2);
1188 } else fra.me.REG[3] = once_value_2;
1189 fra.me.REG[3] = fra.me.REG[3];
1190 fra.me.REG[3] = CALL_standard___string___Collection___join(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
1191 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
1192 if (!once_value_3) {
1193 fra.me.REG[3] = BOX_NativeString(".\n");
1194 REGB2 = TAG_Int(2);
1195 fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB2);
1196 once_value_3 = fra.me.REG[3];
1197 register_static_object(&once_value_3);
1198 } else fra.me.REG[3] = once_value_3;
1199 fra.me.REG[3] = fra.me.REG[3];
1200 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
1201 fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
1202 /* ../lib/opts.nit:184 */
1203 REGB2 = TAG_Int(3);
1204 fra.me.REG[3] = NEW_Array_standard___collection___array___Array___with_capacity(REGB2);
1205 if (!once_value_4) {
1206 fra.me.REG[2] = BOX_NativeString("Expected values are: ");
1207 REGB2 = TAG_Int(21);
1208 fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB2);
1209 once_value_4 = fra.me.REG[2];
1210 register_static_object(&once_value_4);
1211 } else fra.me.REG[2] = once_value_4;
1212 fra.me.REG[2] = fra.me.REG[2];
1213 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
1214 REGB2 = TAG_Bool(ATTR_opts___OptionEnum____values(fra.me.REG[0])!=NIT_NULL);
1215 if (UNTAG_Bool(REGB2)) {
1216 } else {
1217 nit_abort("Uninitialized attribute %s", "_values", LOCATE_opts, 184);
1218 }
1219 fra.me.REG[2] = ATTR_opts___OptionEnum____values(fra.me.REG[0]);
1220 if (!once_value_5) {
1221 fra.me.REG[4] = BOX_NativeString(", ");
1222 REGB2 = TAG_Int(2);
1223 fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB2);
1224 once_value_5 = fra.me.REG[4];
1225 register_static_object(&once_value_5);
1226 } else fra.me.REG[4] = once_value_5;
1227 fra.me.REG[4] = fra.me.REG[4];
1228 fra.me.REG[4] = CALL_standard___string___Collection___join(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[4]);
1229 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
1230 if (!once_value_6) {
1231 fra.me.REG[4] = BOX_NativeString(".");
1232 REGB2 = TAG_Int(1);
1233 fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB2);
1234 once_value_6 = fra.me.REG[4];
1235 register_static_object(&once_value_6);
1236 } else fra.me.REG[4] = once_value_6;
1237 fra.me.REG[4] = fra.me.REG[4];
1238 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
1239 fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
1240 fra.me.REG[3] = CALL_standard___string___String_____plus(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
1241 fra.me.REG[1] = fra.me.REG[3];
1242 /* ../lib/opts.nit:185 */
1243 REGB2 = TAG_Bool(ATTR_opts___Option____errors(fra.me.REG[0])!=NIT_NULL);
1244 if (UNTAG_Bool(REGB2)) {
1245 } else {
1246 nit_abort("Uninitialized attribute %s", "_errors", LOCATE_opts, 185);
1247 }
1248 fra.me.REG[0] = ATTR_opts___Option____errors(fra.me.REG[0]);
1249 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1250 }
1251 /* ../lib/opts.nit:187 */
1252 goto label7;
1253 label7: while(0);
1254 stack_frame_head = fra.me.prev;
1255 return REGB0;
1256 }
1257 static const char LOCATE_opts___OptionEnum___value_name[] = "opts::OptionEnum::value_name";
1258 val_t opts___OptionEnum___value_name(val_t p0){
1259 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1260 val_t REGB0;
1261 val_t REGB1;
1262 val_t REGB2;
1263 val_t tmp;
1264 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1265 fra.me.file = LOCATE_opts;
1266 fra.me.line = 190;
1267 fra.me.meth = LOCATE_opts___OptionEnum___value_name;
1268 fra.me.has_broke = 0;
1269 fra.me.REG_size = 2;
1270 fra.me.nitni_local_ref_head = NULL;
1271 fra.me.REG[0] = NIT_NULL;
1272 fra.me.REG[1] = NIT_NULL;
1273 fra.me.REG[0] = p0;
1274 /* ../lib/opts.nit:190 */
1275 REGB0 = TAG_Bool(ATTR_opts___OptionEnum____values(fra.me.REG[0])!=NIT_NULL);
1276 if (UNTAG_Bool(REGB0)) {
1277 } else {
1278 nit_abort("Uninitialized attribute %s", "_values", LOCATE_opts, 190);
1279 }
1280 fra.me.REG[1] = ATTR_opts___OptionEnum____values(fra.me.REG[0]);
1281 fra.me.REG[0] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]);
1282 /* ../lib/standard/collection/array.nit:278 */
1283 REGB0 = fra.me.REG[0];
1284 /* ../lib/standard/collection/array.nit:280 */
1285 REGB1 = TAG_Int(0);
1286 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1287 if (UNTAG_Bool(REGB2)) {
1288 } else {
1289 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1290 }
1291 /* ../lib/standard/kernel.nit:236 */
1292 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
1293 /* ../lib/standard/collection/array.nit:280 */
1294 if (UNTAG_Bool(REGB1)) {
1295 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1296 if (UNTAG_Bool(REGB1)) {
1297 } else {
1298 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
1299 }
1300 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1301 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1302 if (UNTAG_Bool(REGB2)) {
1303 } else {
1304 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1305 }
1306 /* ../lib/standard/kernel.nit:235 */
1307 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1308 } else {
1309 /* ../lib/standard/collection/array.nit:280 */
1310 REGB2 = TAG_Bool(0);
1311 REGB1 = REGB2;
1312 }
1313 if (UNTAG_Bool(REGB1)) {
1314 } else {
1315 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
1316 }
1317 /* ../lib/standard/collection/array.nit:281 */
1318 fra.me.REG[1] = ATTR_standard___collection___array___Array____items(fra.me.REG[1]);
1319 REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
1320 if (UNTAG_Bool(REGB1)) {
1321 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
1322 }
1323 /* ../lib/standard/collection/array.nit:724 */
1324 fra.me.REG[1] = ((Nit_NativeArray)fra.me.REG[1])->val[UNTAG_Int(REGB0)];
1325 /* ../lib/standard/collection/array.nit:281 */
1326 goto label1;
1327 label1: while(0);
1328 /* ../lib/opts.nit:190 */
1329 goto label2;
1330 label2: while(0);
1331 stack_frame_head = fra.me.prev;
1332 return fra.me.REG[1];
1333 }
1334 static const char LOCATE_opts___OptionEnum___pretty_default[] = "opts::OptionEnum::(opts::Option::pretty_default)";
1335 val_t opts___OptionEnum___pretty_default(val_t p0){
1336 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
1337 val_t REGB0;
1338 val_t REGB1;
1339 val_t REGB2;
1340 val_t tmp;
1341 static val_t once_value_1; /* Once value */
1342 static val_t once_value_3; /* Once value */
1343 static val_t once_value_5; /* Once value */
1344 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1345 fra.me.file = LOCATE_opts;
1346 fra.me.line = 192;
1347 fra.me.meth = LOCATE_opts___OptionEnum___pretty_default;
1348 fra.me.has_broke = 0;
1349 fra.me.REG_size = 4;
1350 fra.me.nitni_local_ref_head = NULL;
1351 fra.me.REG[0] = NIT_NULL;
1352 fra.me.REG[1] = NIT_NULL;
1353 fra.me.REG[2] = NIT_NULL;
1354 fra.me.REG[3] = NIT_NULL;
1355 fra.me.REG[0] = p0;
1356 /* ../lib/opts.nit:192 */
1357 fra.me.REG[1] = fra.me.REG[0];
1358 /* ../lib/opts.nit:194 */
1359 fra.me.REG[2] = CALL_opts___Option___default_value(fra.me.REG[1])(fra.me.REG[1]);
1360 REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1361 if (UNTAG_Bool(REGB0)) {
1362 } else {
1363 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1364 if (UNTAG_Bool(REGB1)) {
1365 REGB1 = TAG_Bool(0);
1366 REGB0 = REGB1;
1367 } else {
1368 /* ../lib/standard/kernel.nit:230 */
1369 REGB1 = TAG_Bool((fra.me.REG[2])==(NIT_NULL));
1370 /* ../lib/opts.nit:194 */
1371 REGB0 = REGB1;
1372 }
1373 }
1374 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
1375 if (UNTAG_Bool(REGB0)) {
1376 /* ../lib/opts.nit:195 */
1377 REGB0 = TAG_Int(3);
1378 fra.me.REG[2] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
1379 if (!once_value_1) {
1380 fra.me.REG[3] = BOX_NativeString(" (");
1381 REGB0 = TAG_Int(2);
1382 fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
1383 once_value_1 = fra.me.REG[3];
1384 register_static_object(&once_value_1);
1385 } else fra.me.REG[3] = once_value_1;
1386 fra.me.REG[3] = fra.me.REG[3];
1387 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
1388 REGB0 = TAG_Bool(ATTR_opts___OptionEnum____values(fra.me.REG[1])!=NIT_NULL);
1389 if (UNTAG_Bool(REGB0)) {
1390 } else {
1391 nit_abort("Uninitialized attribute %s", "_values", LOCATE_opts, 195);
1392 }
1393 fra.me.REG[3] = ATTR_opts___OptionEnum____values(fra.me.REG[1]);
1394 fra.me.REG[1] = CALL_opts___Option___default_value(fra.me.REG[1])(fra.me.REG[1]);
1395 REGB0 = TAG_Bool((fra.me.REG[1]!=NIT_NULL) && VAL_ISA(fra.me.REG[1], VTCOLOR_opts___Option___VALUE(fra.me.REG[0]), VTID_opts___Option___VALUE(fra.me.REG[0]))) /*cast VALUE*/;
1396 if (UNTAG_Bool(REGB0)) {
1397 } else {
1398 nit_abort("Cast failed", NULL, LOCATE_opts, 195);
1399 }
1400 /* ../lib/standard/collection/array.nit:278 */
1401 REGB0 = fra.me.REG[1];
1402 /* ../lib/standard/collection/array.nit:280 */
1403 REGB1 = TAG_Int(0);
1404 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1405 if (UNTAG_Bool(REGB2)) {
1406 } else {
1407 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1408 }
1409 /* ../lib/standard/kernel.nit:236 */
1410 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
1411 /* ../lib/standard/collection/array.nit:280 */
1412 if (UNTAG_Bool(REGB1)) {
1413 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
1414 if (UNTAG_Bool(REGB1)) {
1415 } else {
1416 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
1417 }
1418 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
1419 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1420 if (UNTAG_Bool(REGB2)) {
1421 } else {
1422 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1423 }
1424 /* ../lib/standard/kernel.nit:235 */
1425 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1426 } else {
1427 /* ../lib/standard/collection/array.nit:280 */
1428 REGB2 = TAG_Bool(0);
1429 REGB1 = REGB2;
1430 }
1431 if (UNTAG_Bool(REGB1)) {
1432 } else {
1433 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
1434 }
1435 /* ../lib/standard/collection/array.nit:281 */
1436 fra.me.REG[3] = ATTR_standard___collection___array___Array____items(fra.me.REG[3]);
1437 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
1438 if (UNTAG_Bool(REGB1)) {
1439 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
1440 }
1441 /* ../lib/standard/collection/array.nit:724 */
1442 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB0)];
1443 /* ../lib/standard/collection/array.nit:281 */
1444 goto label2;
1445 label2: while(0);
1446 /* ../lib/opts.nit:195 */
1447 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
1448 if (!once_value_3) {
1449 fra.me.REG[3] = BOX_NativeString(")");
1450 REGB0 = TAG_Int(1);
1451 fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
1452 once_value_3 = fra.me.REG[3];
1453 register_static_object(&once_value_3);
1454 } else fra.me.REG[3] = once_value_3;
1455 fra.me.REG[3] = fra.me.REG[3];
1456 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
1457 fra.me.REG[2] = CALL_standard___string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
1458 goto label4;
1459 } else {
1460 /* ../lib/opts.nit:197 */
1461 if (!once_value_5) {
1462 fra.me.REG[3] = BOX_NativeString("");
1463 REGB0 = TAG_Int(0);
1464 fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
1465 once_value_5 = fra.me.REG[3];
1466 register_static_object(&once_value_5);
1467 } else fra.me.REG[3] = once_value_5;
1468 fra.me.REG[3] = fra.me.REG[3];
1469 fra.me.REG[2] = fra.me.REG[3];
1470 goto label4;
1471 }
1472 label4: while(0);
1473 stack_frame_head = fra.me.prev;
1474 return fra.me.REG[2];
1475 }
1476 static const char LOCATE_opts___OptionInt___init[] = "opts::OptionInt::init";
1477 void opts___OptionInt___init(val_t p0, val_t p1, val_t p2, val_t p3, int* init_table){
1478 int itpos7 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_opts___OptionInt].i;
1479 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
1480 val_t REGB0;
1481 val_t REGB1;
1482 val_t tmp;
1483 if (init_table[itpos7]) return;
1484 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1485 fra.me.file = LOCATE_opts;
1486 fra.me.line = 206;
1487 fra.me.meth = LOCATE_opts___OptionInt___init;
1488 fra.me.has_broke = 0;
1489 fra.me.REG_size = 4;
1490 fra.me.nitni_local_ref_head = NULL;
1491 fra.me.REG[0] = NIT_NULL;
1492 fra.me.REG[1] = NIT_NULL;
1493 fra.me.REG[2] = NIT_NULL;
1494 fra.me.REG[3] = NIT_NULL;
1495 fra.me.REG[0] = p0;
1496 fra.me.REG[1] = p1;
1497 REGB0 = p2;
1498 fra.me.REG[2] = p3;
1499 /* ../lib/opts.nit:206 */
1500 fra.me.REG[3] = fra.me.REG[0];
1501 REGB1 = TAG_Bool(VAL_ISA(fra.me.REG[2], COLOR_standard___collection___array___Array, ID_standard___collection___array___Array)) /*cast Array[String]*/;
1502 if (UNTAG_Bool(REGB1)) {
1503 } else {
1504 nit_abort("Cast failed", NULL, LOCATE_opts, 206);
1505 }
1506 CALL_opts___OptionParameter___init_opt(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1], REGB0, fra.me.REG[2], init_table);
1507 stack_frame_head = fra.me.prev;
1508 init_table[itpos7] = 1;
1509 return;
1510 }
1511 static const char LOCATE_opts___OptionInt___convert[] = "opts::OptionInt::(opts::OptionParameter::convert)";
1512 val_t opts___OptionInt___convert(val_t p0, val_t p1){
1513 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1514 val_t REGB0;
1515 val_t tmp;
1516 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1517 fra.me.file = LOCATE_opts;
1518 fra.me.line = 208;
1519 fra.me.meth = LOCATE_opts___OptionInt___convert;
1520 fra.me.has_broke = 0;
1521 fra.me.REG_size = 2;
1522 fra.me.nitni_local_ref_head = NULL;
1523 fra.me.REG[0] = NIT_NULL;
1524 fra.me.REG[1] = NIT_NULL;
1525 fra.me.REG[0] = p0;
1526 fra.me.REG[1] = p1;
1527 /* ../lib/opts.nit:208 */
1528 REGB0 = CALL_standard___string___AbstractString___to_i(fra.me.REG[1])(fra.me.REG[1]);
1529 goto label1;
1530 label1: while(0);
1531 stack_frame_head = fra.me.prev;
1532 return REGB0;
1533 }
1534 static const char LOCATE_opts___OptionArray___init[] = "opts::OptionArray::init";
1535 void opts___OptionArray___init(val_t p0, val_t p1, val_t p2, int* init_table){
1536 int itpos8 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_opts___OptionArray].i;
1537 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
1538 val_t REGB0;
1539 val_t tmp;
1540 if (init_table[itpos8]) return;
1541 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1542 fra.me.file = LOCATE_opts;
1543 fra.me.line = 215;
1544 fra.me.meth = LOCATE_opts___OptionArray___init;
1545 fra.me.has_broke = 0;
1546 fra.me.REG_size = 4;
1547 fra.me.nitni_local_ref_head = NULL;
1548 fra.me.REG[0] = NIT_NULL;
1549 fra.me.REG[1] = NIT_NULL;
1550 fra.me.REG[2] = NIT_NULL;
1551 fra.me.REG[3] = NIT_NULL;
1552 fra.me.REG[0] = p0;
1553 fra.me.REG[1] = p1;
1554 fra.me.REG[2] = p2;
1555 /* ../lib/opts.nit:215 */
1556 fra.me.REG[3] = fra.me.REG[0];
1557 REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[2], COLOR_standard___collection___array___Array, ID_standard___collection___array___Array)) /*cast Array[String]*/;
1558 if (UNTAG_Bool(REGB0)) {
1559 } else {
1560 nit_abort("Cast failed", NULL, LOCATE_opts, 215);
1561 }
1562 /* ../lib/opts.nit:217 */
1563 fra.me.REG[0] = NEW_Array_standard___collection___array___Array___init();
1564 ATTR_opts___OptionArray____values(fra.me.REG[3]) = fra.me.REG[0];
1565 /* ../lib/opts.nit:218 */
1566 REGB0 = TAG_Bool(ATTR_opts___OptionArray____values(fra.me.REG[3])!=NIT_NULL);
1567 if (UNTAG_Bool(REGB0)) {
1568 } else {
1569 nit_abort("Uninitialized attribute %s", "_values", LOCATE_opts, 218);
1570 }
1571 fra.me.REG[0] = ATTR_opts___OptionArray____values(fra.me.REG[3]);
1572 CALL_opts___OptionParameter___init_opt(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1], fra.me.REG[0], fra.me.REG[2], init_table);
1573 stack_frame_head = fra.me.prev;
1574 init_table[itpos8] = 1;
1575 return;
1576 }
1577 static const char LOCATE_opts___OptionArray___convert[] = "opts::OptionArray::(opts::OptionParameter::convert)";
1578 val_t opts___OptionArray___convert(val_t p0, val_t p1){
1579 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1580 val_t REGB0;
1581 val_t tmp;
1582 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1583 fra.me.file = LOCATE_opts;
1584 fra.me.line = 222;
1585 fra.me.meth = LOCATE_opts___OptionArray___convert;
1586 fra.me.has_broke = 0;
1587 fra.me.REG_size = 3;
1588 fra.me.nitni_local_ref_head = NULL;
1589 fra.me.REG[0] = NIT_NULL;
1590 fra.me.REG[1] = NIT_NULL;
1591 fra.me.REG[2] = NIT_NULL;
1592 fra.me.REG[0] = p0;
1593 fra.me.REG[1] = p1;
1594 /* ../lib/opts.nit:224 */
1595 REGB0 = TAG_Bool(ATTR_opts___OptionArray____values(fra.me.REG[0])!=NIT_NULL);
1596 if (UNTAG_Bool(REGB0)) {
1597 } else {
1598 nit_abort("Uninitialized attribute %s", "_values", LOCATE_opts, 224);
1599 }
1600 fra.me.REG[2] = ATTR_opts___OptionArray____values(fra.me.REG[0]);
1601 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
1602 /* ../lib/opts.nit:225 */
1603 REGB0 = TAG_Bool(ATTR_opts___OptionArray____values(fra.me.REG[0])!=NIT_NULL);
1604 if (UNTAG_Bool(REGB0)) {
1605 } else {
1606 nit_abort("Uninitialized attribute %s", "_values", LOCATE_opts, 225);
1607 }
1608 fra.me.REG[0] = ATTR_opts___OptionArray____values(fra.me.REG[0]);
1609 goto label1;
1610 label1: while(0);
1611 stack_frame_head = fra.me.prev;
1612 return fra.me.REG[0];
1613 }
1614 static const char LOCATE_opts___OptionContext___options[] = "opts::OptionContext::options";
1615 val_t opts___OptionContext___options(val_t p0){
1616 struct {struct stack_frame_t me;} fra;
1617 val_t REGB0;
1618 val_t tmp;
1619 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1620 fra.me.file = LOCATE_opts;
1621 fra.me.line = 230;
1622 fra.me.meth = LOCATE_opts___OptionContext___options;
1623 fra.me.has_broke = 0;
1624 fra.me.REG_size = 1;
1625 fra.me.nitni_local_ref_head = NULL;
1626 fra.me.REG[0] = NIT_NULL;
1627 fra.me.REG[0] = p0;
1628 /* ../lib/opts.nit:230 */
1629 REGB0 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[0])!=NIT_NULL);
1630 if (UNTAG_Bool(REGB0)) {
1631 } else {
1632 nit_abort("Uninitialized attribute %s", "_options", LOCATE_opts, 230);
1633 }
1634 fra.me.REG[0] = ATTR_opts___OptionContext____options(fra.me.REG[0]);
1635 stack_frame_head = fra.me.prev;
1636 return fra.me.REG[0];
1637 }
1638 static const char LOCATE_opts___OptionContext___rest[] = "opts::OptionContext::rest";
1639 val_t opts___OptionContext___rest(val_t p0){
1640 struct {struct stack_frame_t me;} fra;
1641 val_t REGB0;
1642 val_t tmp;
1643 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1644 fra.me.file = LOCATE_opts;
1645 fra.me.line = 231;
1646 fra.me.meth = LOCATE_opts___OptionContext___rest;
1647 fra.me.has_broke = 0;
1648 fra.me.REG_size = 1;
1649 fra.me.nitni_local_ref_head = NULL;
1650 fra.me.REG[0] = NIT_NULL;
1651 fra.me.REG[0] = p0;
1652 /* ../lib/opts.nit:231 */
1653 REGB0 = TAG_Bool(ATTR_opts___OptionContext____rest(fra.me.REG[0])!=NIT_NULL);
1654 if (UNTAG_Bool(REGB0)) {
1655 } else {
1656 nit_abort("Uninitialized attribute %s", "_rest", LOCATE_opts, 231);
1657 }
1658 fra.me.REG[0] = ATTR_opts___OptionContext____rest(fra.me.REG[0]);
1659 stack_frame_head = fra.me.prev;
1660 return fra.me.REG[0];
1661 }
1662 static const char LOCATE_opts___OptionContext___errors[] = "opts::OptionContext::errors";
1663 val_t opts___OptionContext___errors(val_t p0){
1664 struct {struct stack_frame_t me;} fra;
1665 val_t REGB0;
1666 val_t tmp;
1667 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1668 fra.me.file = LOCATE_opts;
1669 fra.me.line = 232;
1670 fra.me.meth = LOCATE_opts___OptionContext___errors;
1671 fra.me.has_broke = 0;
1672 fra.me.REG_size = 1;
1673 fra.me.nitni_local_ref_head = NULL;
1674 fra.me.REG[0] = NIT_NULL;
1675 fra.me.REG[0] = p0;
1676 /* ../lib/opts.nit:232 */
1677 REGB0 = TAG_Bool(ATTR_opts___OptionContext____errors(fra.me.REG[0])!=NIT_NULL);
1678 if (UNTAG_Bool(REGB0)) {
1679 } else {
1680 nit_abort("Uninitialized attribute %s", "_errors", LOCATE_opts, 232);
1681 }
1682 fra.me.REG[0] = ATTR_opts___OptionContext____errors(fra.me.REG[0]);
1683 stack_frame_head = fra.me.prev;
1684 return fra.me.REG[0];
1685 }
1686 static const char LOCATE_opts___OptionContext___usage[] = "opts::OptionContext::usage";
1687 void opts___OptionContext___usage(val_t p0){
1688 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
1689 val_t REGB0;
1690 val_t REGB1;
1691 val_t REGB2;
1692 val_t REGB3;
1693 val_t REGB4;
1694 val_t REGB5;
1695 val_t tmp;
1696 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1697 fra.me.file = LOCATE_opts;
1698 fra.me.line = 236;
1699 fra.me.meth = LOCATE_opts___OptionContext___usage;
1700 fra.me.has_broke = 0;
1701 fra.me.REG_size = 6;
1702 fra.me.nitni_local_ref_head = NULL;
1703 fra.me.REG[0] = NIT_NULL;
1704 fra.me.REG[1] = NIT_NULL;
1705 fra.me.REG[2] = NIT_NULL;
1706 fra.me.REG[3] = NIT_NULL;
1707 fra.me.REG[4] = NIT_NULL;
1708 fra.me.REG[5] = NIT_NULL;
1709 fra.me.REG[0] = p0;
1710 /* ../lib/opts.nit:238 */
1711 REGB0 = TAG_Int(1);
1712 /* ../lib/opts.nit:239 */
1713 REGB1 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[0])!=NIT_NULL);
1714 if (UNTAG_Bool(REGB1)) {
1715 } else {
1716 nit_abort("Uninitialized attribute %s", "_options", LOCATE_opts, 239);
1717 }
1718 fra.me.REG[1] = ATTR_opts___OptionContext____options(fra.me.REG[0]);
1719 /* ../lib/standard/collection/array.nit:269 */
1720 REGB1 = TAG_Int(0);
1721 /* ../lib/standard/collection/array.nit:270 */
1722 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1723 if (UNTAG_Bool(REGB2)) {
1724 } else {
1725 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
1726 }
1727 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1728 /* ../lib/standard/collection/array.nit:271 */
1729 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[1]);
1730 /* ../lib/standard/collection/array.nit:272 */
1731 while(1) {
1732 /* ../lib/standard/collection/array.nit:24 */
1733 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1734 if (UNTAG_Bool(REGB2)) {
1735 } else {
1736 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1737 }
1738 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1739 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1740 if (UNTAG_Bool(REGB3)) {
1741 } else {
1742 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1743 }
1744 /* ../lib/standard/kernel.nit:235 */
1745 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
1746 /* ../lib/standard/collection/array.nit:272 */
1747 if (UNTAG_Bool(REGB2)) {
1748 /* ../lib/standard/collection/array.nit:273 */
1749 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1750 if (UNTAG_Bool(REGB2)) {
1751 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
1752 }
1753 /* ../lib/standard/collection/array.nit:724 */
1754 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB1)];
1755 /* ../lib/opts.nit:240 */
1756 REGB2 = TAG_Int(3);
1757 /* ../lib/opts.nit:241 */
1758 fra.me.REG[3] = CALL_opts___Option___names(fra.me.REG[3])(fra.me.REG[3]);
1759 /* ../lib/standard/collection/array.nit:269 */
1760 REGB3 = TAG_Int(0);
1761 /* ../lib/standard/collection/array.nit:270 */
1762 REGB4 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
1763 if (UNTAG_Bool(REGB4)) {
1764 } else {
1765 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
1766 }
1767 REGB4 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
1768 /* ../lib/standard/collection/array.nit:271 */
1769 fra.me.REG[4] = ATTR_standard___collection___array___Array____items(fra.me.REG[3]);
1770 /* ../lib/standard/collection/array.nit:272 */
1771 while(1) {
1772 /* ../lib/standard/collection/array.nit:24 */
1773 REGB4 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
1774 if (UNTAG_Bool(REGB4)) {
1775 } else {
1776 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1777 }
1778 REGB4 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
1779 REGB5 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
1780 if (UNTAG_Bool(REGB5)) {
1781 } else {
1782 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1783 }
1784 /* ../lib/standard/kernel.nit:235 */
1785 REGB4 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
1786 /* ../lib/standard/collection/array.nit:272 */
1787 if (UNTAG_Bool(REGB4)) {
1788 /* ../lib/standard/collection/array.nit:273 */
1789 REGB4 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
1790 if (UNTAG_Bool(REGB4)) {
1791 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
1792 }
1793 /* ../lib/standard/collection/array.nit:724 */
1794 fra.me.REG[5] = ((Nit_NativeArray)fra.me.REG[4])->val[UNTAG_Int(REGB3)];
1795 /* ../lib/standard/collection/array.nit:24 */
1796 REGB4 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[5])!=NIT_NULL);
1797 if (UNTAG_Bool(REGB4)) {
1798 } else {
1799 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1800 }
1801 REGB4 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[5]);
1802 /* ../lib/opts.nit:242 */
1803 REGB5 = TAG_Int(2);
1804 /* ../lib/standard/kernel.nit:238 */
1805 REGB5 = TAG_Int(UNTAG_Int(REGB4)+UNTAG_Int(REGB5));
1806 REGB5 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB5));
1807 /* ../lib/opts.nit:242 */
1808 REGB2 = REGB5;
1809 /* ../lib/standard/collection/array.nit:274 */
1810 REGB5 = TAG_Int(1);
1811 /* ../lib/standard/kernel.nit:238 */
1812 REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5));
1813 /* ../lib/standard/collection/array.nit:274 */
1814 REGB3 = REGB5;
1815 } else {
1816 /* ../lib/standard/collection/array.nit:272 */
1817 goto label1;
1818 }
1819 }
1820 label1: while(0);
1821 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1822 if (UNTAG_Bool(REGB3)) {
1823 } else {
1824 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1825 }
1826 /* ../lib/standard/kernel.nit:235 */
1827 REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
1828 /* ../lib/opts.nit:244 */
1829 if (UNTAG_Bool(REGB3)) {
1830 REGB0 = REGB2;
1831 }
1832 /* ../lib/standard/collection/array.nit:274 */
1833 REGB2 = TAG_Int(1);
1834 /* ../lib/standard/kernel.nit:238 */
1835 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
1836 /* ../lib/standard/collection/array.nit:274 */
1837 REGB1 = REGB2;
1838 } else {
1839 /* ../lib/standard/collection/array.nit:272 */
1840 goto label2;
1841 }
1842 }
1843 label2: while(0);
1844 /* ../lib/opts.nit:247 */
1845 REGB1 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[0])!=NIT_NULL);
1846 if (UNTAG_Bool(REGB1)) {
1847 } else {
1848 nit_abort("Uninitialized attribute %s", "_options", LOCATE_opts, 247);
1849 }
1850 fra.me.REG[2] = ATTR_opts___OptionContext____options(fra.me.REG[0]);
1851 /* ../lib/standard/collection/array.nit:269 */
1852 REGB1 = TAG_Int(0);
1853 /* ../lib/standard/collection/array.nit:270 */
1854 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1855 if (UNTAG_Bool(REGB2)) {
1856 } else {
1857 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
1858 }
1859 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
1860 /* ../lib/standard/collection/array.nit:271 */
1861 fra.me.REG[1] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
1862 /* ../lib/standard/collection/array.nit:272 */
1863 while(1) {
1864 /* ../lib/standard/collection/array.nit:24 */
1865 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1866 if (UNTAG_Bool(REGB2)) {
1867 } else {
1868 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1869 }
1870 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
1871 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1872 if (UNTAG_Bool(REGB3)) {
1873 } else {
1874 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1875 }
1876 /* ../lib/standard/kernel.nit:235 */
1877 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
1878 /* ../lib/standard/collection/array.nit:272 */
1879 if (UNTAG_Bool(REGB2)) {
1880 /* ../lib/standard/collection/array.nit:273 */
1881 REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
1882 if (UNTAG_Bool(REGB2)) {
1883 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
1884 }
1885 /* ../lib/standard/collection/array.nit:724 */
1886 fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[1])->val[UNTAG_Int(REGB1)];
1887 /* ../lib/opts.nit:248 */
1888 fra.me.REG[4] = CALL_opts___Option___pretty(fra.me.REG[4])(fra.me.REG[4], REGB0);
1889 CALL_standard___file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
1890 /* ../lib/standard/collection/array.nit:274 */
1891 REGB2 = TAG_Int(1);
1892 /* ../lib/standard/kernel.nit:238 */
1893 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
1894 /* ../lib/standard/collection/array.nit:274 */
1895 REGB1 = REGB2;
1896 } else {
1897 /* ../lib/standard/collection/array.nit:272 */
1898 goto label3;
1899 }
1900 }
1901 label3: while(0);
1902 stack_frame_head = fra.me.prev;
1903 return;
1904 }
1905 static const char LOCATE_opts___OptionContext___parse[] = "opts::OptionContext::parse";
1906 void opts___OptionContext___parse(val_t p0, val_t p1){
1907 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1908 val_t tmp;
1909 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1910 fra.me.file = LOCATE_opts;
1911 fra.me.line = 252;
1912 fra.me.meth = LOCATE_opts___OptionContext___parse;
1913 fra.me.has_broke = 0;
1914 fra.me.REG_size = 2;
1915 fra.me.nitni_local_ref_head = NULL;
1916 fra.me.REG[0] = NIT_NULL;
1917 fra.me.REG[1] = NIT_NULL;
1918 fra.me.REG[0] = p0;
1919 fra.me.REG[1] = p1;
1920 /* ../lib/opts.nit:255 */
1921 fra.me.REG[1] = CALL_standard___collection___abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
1922 /* ../lib/opts.nit:256 */
1923 CALL_opts___OptionContext___parse_intern(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
1924 stack_frame_head = fra.me.prev;
1925 return;
1926 }
1927 static const char LOCATE_opts___OptionContext___parse_intern[] = "opts::OptionContext::parse_intern";
1928 void opts___OptionContext___parse_intern(val_t p0, val_t p1){
1929 struct {struct stack_frame_t me; val_t MORE_REG[6];} fra;
1930 val_t REGB0;
1931 val_t REGB1;
1932 val_t REGB2;
1933 val_t REGB3;
1934 val_t REGB4;
1935 val_t REGB5;
1936 val_t tmp;
1937 static val_t once_value_1; /* Once value */
1938 static val_t once_value_2; /* Once value */
1939 static val_t once_value_5; /* Once value */
1940 static val_t once_value_6; /* Once value */
1941 static val_t once_value_7; /* Once value */
1942 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1943 fra.me.file = LOCATE_opts;
1944 fra.me.line = 259;
1945 fra.me.meth = LOCATE_opts___OptionContext___parse_intern;
1946 fra.me.has_broke = 0;
1947 fra.me.REG_size = 7;
1948 fra.me.nitni_local_ref_head = NULL;
1949 fra.me.REG[0] = NIT_NULL;
1950 fra.me.REG[1] = NIT_NULL;
1951 fra.me.REG[2] = NIT_NULL;
1952 fra.me.REG[3] = NIT_NULL;
1953 fra.me.REG[4] = NIT_NULL;
1954 fra.me.REG[5] = NIT_NULL;
1955 fra.me.REG[6] = NIT_NULL;
1956 fra.me.REG[0] = p0;
1957 fra.me.REG[1] = p1;
1958 /* ../lib/opts.nit:261 */
1959 REGB0 = TAG_Bool(1);
1960 /* ../lib/opts.nit:262 */
1961 CALL_opts___OptionContext___build(fra.me.REG[0])(fra.me.REG[0]);
1962 /* ../lib/opts.nit:263 */
1963 REGB1 = TAG_Bool(ATTR_opts___OptionContext____rest(fra.me.REG[0])!=NIT_NULL);
1964 if (UNTAG_Bool(REGB1)) {
1965 } else {
1966 nit_abort("Uninitialized attribute %s", "_rest", LOCATE_opts, 263);
1967 }
1968 fra.me.REG[2] = ATTR_opts___OptionContext____rest(fra.me.REG[0]);
1969 /* ../lib/opts.nit:265 */
1970 while(1) {
1971 if (UNTAG_Bool(REGB0)) {
1972 REGB1 = CALL_standard___collection___abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
1973 } else {
1974 REGB2 = TAG_Bool(0);
1975 REGB1 = REGB2;
1976 }
1977 if (UNTAG_Bool(REGB1)) {
1978 /* ../lib/opts.nit:266 */
1979 fra.me.REG[3] = CALL_standard___collection___abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
1980 /* ../lib/opts.nit:267 */
1981 if (!once_value_1) {
1982 fra.me.REG[4] = BOX_NativeString("--");
1983 REGB1 = TAG_Int(2);
1984 fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB1);
1985 once_value_1 = fra.me.REG[4];
1986 register_static_object(&once_value_1);
1987 } else fra.me.REG[4] = once_value_1;
1988 fra.me.REG[4] = fra.me.REG[4];
1989 REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[4]));
1990 if (UNTAG_Bool(REGB1)) {
1991 } else {
1992 REGB2 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
1993 REGB1 = REGB2;
1994 }
1995 if (UNTAG_Bool(REGB1)) {
1996 /* ../lib/opts.nit:268 */
1997 CALL_standard___collection___abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
1998 /* ../lib/opts.nit:269 */
1999 fra.me.REG[4] = CALL_standard___collection___array___Iterator___to_a(fra.me.REG[1])(fra.me.REG[1]);
2000 CALL_standard___collection___abstract_collection___SimpleCollection___add_all(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[4]);
2001 /* ../lib/opts.nit:270 */
2002 REGB1 = TAG_Bool(0);
2003 REGB0 = REGB1;
2004 } else {
2005 /* ../lib/opts.nit:273 */
2006 REGB1 = TAG_Char('-');
2007 REGB1 = CALL_standard___collection___array___AbstractArrayRead___last_index_of(fra.me.REG[3])(fra.me.REG[3], REGB1);
2008 REGB2 = TAG_Int(0);
2009 REGB3 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB2));
2010 if (UNTAG_Bool(REGB3)) {
2011 } else {
2012 /* ../lib/standard/kernel.nit:230 */
2013 REGB2 = TAG_Bool((REGB1)==(REGB2));
2014 /* ../lib/opts.nit:273 */
2015 REGB3 = REGB2;
2016 }
2017 if (UNTAG_Bool(REGB3)) {
2018 /* ../lib/standard/collection/array.nit:24 */
2019 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
2020 if (UNTAG_Bool(REGB3)) {
2021 } else {
2022 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2023 }
2024 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
2025 /* ../lib/opts.nit:273 */
2026 REGB2 = TAG_Int(2);
2027 REGB1 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
2028 if (UNTAG_Bool(REGB1)) {
2029 } else {
2030 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2031 }
2032 /* ../lib/standard/kernel.nit:237 */
2033 REGB2 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB2));
2034 } else {
2035 /* ../lib/opts.nit:273 */
2036 REGB3 = TAG_Bool(0);
2037 REGB2 = REGB3;
2038 }
2039 if (UNTAG_Bool(REGB2)) {
2040 /* ../lib/opts.nit:274 */
2041 REGB2 = TAG_Bool(0);
2042 /* ../lib/opts.nit:275 */
2043 REGB3 = TAG_Int(1);
2044 /* ../lib/standard/collection/array.nit:24 */
2045 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
2046 if (UNTAG_Bool(REGB1)) {
2047 } else {
2048 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2049 }
2050 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
2051 /* ../lib/standard/kernel.nit:344 */
2052 while(1) {
2053 REGB4 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
2054 if (UNTAG_Bool(REGB4)) {
2055 } else {
2056 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2057 }
2058 /* ../lib/standard/kernel.nit:234 */
2059 REGB4 = TAG_Bool(UNTAG_Int(REGB3)<=UNTAG_Int(REGB1));
2060 /* ../lib/standard/kernel.nit:344 */
2061 if (UNTAG_Bool(REGB4)) {
2062 /* ../lib/opts.nit:275 */
2063 REGB4 = REGB3;
2064 /* ../lib/opts.nit:276 */
2065 if (!once_value_2) {
2066 fra.me.REG[4] = BOX_NativeString("-");
2067 REGB5 = TAG_Int(1);
2068 fra.me.REG[4] = NEW_String_standard___string___String___with_native(fra.me.REG[4], REGB5);
2069 once_value_2 = fra.me.REG[4];
2070 register_static_object(&once_value_2);
2071 } else fra.me.REG[4] = once_value_2;
2072 fra.me.REG[4] = fra.me.REG[4];
2073 REGB4 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[3])(fra.me.REG[3], REGB4);
2074 fra.me.REG[5] = CALL_standard___string___Object___to_s(REGB4)(REGB4);
2075 fra.me.REG[5] = CALL_standard___string___String_____plus(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
2076 /* ../lib/opts.nit:277 */
2077 REGB4 = TAG_Bool(ATTR_opts___OptionContext____optmap(fra.me.REG[0])!=NIT_NULL);
2078 if (UNTAG_Bool(REGB4)) {
2079 } else {
2080 nit_abort("Uninitialized attribute %s", "_optmap", LOCATE_opts, 277);
2081 }
2082 fra.me.REG[4] = ATTR_opts___OptionContext____optmap(fra.me.REG[0]);
2083 REGB4 = CALL_standard___collection___abstract_collection___MapRead___has_key(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
2084 if (UNTAG_Bool(REGB4)) {
2085 /* ../lib/opts.nit:278 */
2086 REGB4 = TAG_Bool(ATTR_opts___OptionContext____optmap(fra.me.REG[0])!=NIT_NULL);
2087 if (UNTAG_Bool(REGB4)) {
2088 } else {
2089 nit_abort("Uninitialized attribute %s", "_optmap", LOCATE_opts, 278);
2090 }
2091 fra.me.REG[4] = ATTR_opts___OptionContext____optmap(fra.me.REG[0]);
2092 fra.me.REG[5] = CALL_standard___collection___abstract_collection___MapRead_____bra(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
2093 /* ../lib/opts.nit:279 */
2094 REGB4 = TAG_Bool(VAL_ISA(fra.me.REG[5], COLOR_opts___OptionParameter, ID_opts___OptionParameter)) /*cast OptionParameter*/;
2095 if (UNTAG_Bool(REGB4)) {
2096 /* ../lib/opts.nit:280 */
2097 CALL_standard___collection___abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
2098 /* ../lib/opts.nit:281 */
2099 REGB4 = TAG_Bool(1);
2100 REGB2 = REGB4;
2101 }
2102 /* ../lib/opts.nit:283 */
2103 CALL_opts___Option___read_param(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[1]);
2104 }
2105 /* ../lib/standard/kernel.nit:346 */
2106 REGB4 = TAG_Int(1);
2107 /* ../lib/standard/kernel.nit:238 */
2108 REGB4 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB4));
2109 /* ../lib/standard/kernel.nit:346 */
2110 REGB3 = REGB4;
2111 } else {
2112 /* ../lib/standard/kernel.nit:344 */
2113 goto label3;
2114 }
2115 }
2116 label3: while(0);
2117 /* ../lib/opts.nit:286 */
2118 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
2119 if (UNTAG_Bool(REGB2)) {
2120 CALL_standard___collection___abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
2121 }
2122 } else {
2123 /* ../lib/opts.nit:288 */
2124 REGB2 = TAG_Bool(ATTR_opts___OptionContext____optmap(fra.me.REG[0])!=NIT_NULL);
2125 if (UNTAG_Bool(REGB2)) {
2126 } else {
2127 nit_abort("Uninitialized attribute %s", "_optmap", LOCATE_opts, 288);
2128 }
2129 fra.me.REG[5] = ATTR_opts___OptionContext____optmap(fra.me.REG[0]);
2130 REGB2 = CALL_standard___collection___abstract_collection___MapRead___has_key(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
2131 if (UNTAG_Bool(REGB2)) {
2132 /* ../lib/opts.nit:289 */
2133 REGB2 = TAG_Bool(ATTR_opts___OptionContext____optmap(fra.me.REG[0])!=NIT_NULL);
2134 if (UNTAG_Bool(REGB2)) {
2135 } else {
2136 nit_abort("Uninitialized attribute %s", "_optmap", LOCATE_opts, 289);
2137 }
2138 fra.me.REG[5] = ATTR_opts___OptionContext____optmap(fra.me.REG[0]);
2139 fra.me.REG[3] = CALL_standard___collection___abstract_collection___MapRead_____bra(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
2140 /* ../lib/opts.nit:290 */
2141 CALL_standard___collection___abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
2142 /* ../lib/opts.nit:291 */
2143 CALL_opts___Option___read_param(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
2144 } else {
2145 /* ../lib/opts.nit:293 */
2146 fra.me.REG[3] = CALL_standard___collection___abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
2147 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
2148 /* ../lib/opts.nit:294 */
2149 CALL_standard___collection___abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
2150 }
2151 }
2152 }
2153 } else {
2154 /* ../lib/opts.nit:265 */
2155 goto label4;
2156 }
2157 }
2158 label4: while(0);
2159 /* ../lib/opts.nit:300 */
2160 REGB0 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[0])!=NIT_NULL);
2161 if (UNTAG_Bool(REGB0)) {
2162 } else {
2163 nit_abort("Uninitialized attribute %s", "_options", LOCATE_opts, 300);
2164 }
2165 fra.me.REG[1] = ATTR_opts___OptionContext____options(fra.me.REG[0]);
2166 /* ../lib/standard/collection/array.nit:269 */
2167 REGB0 = TAG_Int(0);
2168 /* ../lib/standard/collection/array.nit:270 */
2169 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2170 if (UNTAG_Bool(REGB2)) {
2171 } else {
2172 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
2173 }
2174 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2175 /* ../lib/standard/collection/array.nit:271 */
2176 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[1]);
2177 /* ../lib/standard/collection/array.nit:272 */
2178 while(1) {
2179 /* ../lib/standard/collection/array.nit:24 */
2180 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2181 if (UNTAG_Bool(REGB2)) {
2182 } else {
2183 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2184 }
2185 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2186 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2187 if (UNTAG_Bool(REGB3)) {
2188 } else {
2189 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2190 }
2191 /* ../lib/standard/kernel.nit:235 */
2192 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB2));
2193 /* ../lib/standard/collection/array.nit:272 */
2194 if (UNTAG_Bool(REGB2)) {
2195 /* ../lib/standard/collection/array.nit:273 */
2196 REGB2 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2197 if (UNTAG_Bool(REGB2)) {
2198 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
2199 }
2200 /* ../lib/standard/collection/array.nit:724 */
2201 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
2202 /* ../lib/opts.nit:301 */
2203 REGB2 = CALL_opts___Option___mandatory(fra.me.REG[3])(fra.me.REG[3]);
2204 if (UNTAG_Bool(REGB2)) {
2205 REGB2 = CALL_opts___Option___read(fra.me.REG[3])(fra.me.REG[3]);
2206 REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
2207 } else {
2208 REGB3 = TAG_Bool(0);
2209 REGB2 = REGB3;
2210 }
2211 if (UNTAG_Bool(REGB2)) {
2212 /* ../lib/opts.nit:302 */
2213 REGB2 = TAG_Bool(ATTR_opts___OptionContext____errors(fra.me.REG[0])!=NIT_NULL);
2214 if (UNTAG_Bool(REGB2)) {
2215 } else {
2216 nit_abort("Uninitialized attribute %s", "_errors", LOCATE_opts, 302);
2217 }
2218 fra.me.REG[5] = ATTR_opts___OptionContext____errors(fra.me.REG[0]);
2219 REGB2 = TAG_Int(3);
2220 fra.me.REG[4] = NEW_Array_standard___collection___array___Array___with_capacity(REGB2);
2221 if (!once_value_5) {
2222 fra.me.REG[6] = BOX_NativeString("Mandatory option ");
2223 REGB2 = TAG_Int(17);
2224 fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB2);
2225 once_value_5 = fra.me.REG[6];
2226 register_static_object(&once_value_5);
2227 } else fra.me.REG[6] = once_value_5;
2228 fra.me.REG[6] = fra.me.REG[6];
2229 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[6]);
2230 fra.me.REG[3] = CALL_opts___Option___names(fra.me.REG[3])(fra.me.REG[3]);
2231 if (!once_value_6) {
2232 fra.me.REG[6] = BOX_NativeString(", ");
2233 REGB2 = TAG_Int(2);
2234 fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB2);
2235 once_value_6 = fra.me.REG[6];
2236 register_static_object(&once_value_6);
2237 } else fra.me.REG[6] = once_value_6;
2238 fra.me.REG[6] = fra.me.REG[6];
2239 fra.me.REG[6] = CALL_standard___string___Collection___join(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[6]);
2240 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[6]);
2241 if (!once_value_7) {
2242 fra.me.REG[6] = BOX_NativeString(" not found.");
2243 REGB2 = TAG_Int(11);
2244 fra.me.REG[6] = NEW_String_standard___string___String___with_native(fra.me.REG[6], REGB2);
2245 once_value_7 = fra.me.REG[6];
2246 register_static_object(&once_value_7);
2247 } else fra.me.REG[6] = once_value_7;
2248 fra.me.REG[6] = fra.me.REG[6];
2249 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[6]);
2250 fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
2251 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[4]);
2252 }
2253 /* ../lib/standard/collection/array.nit:274 */
2254 REGB2 = TAG_Int(1);
2255 /* ../lib/standard/kernel.nit:238 */
2256 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
2257 /* ../lib/standard/collection/array.nit:274 */
2258 REGB0 = REGB2;
2259 } else {
2260 /* ../lib/standard/collection/array.nit:272 */
2261 goto label8;
2262 }
2263 }
2264 label8: while(0);
2265 stack_frame_head = fra.me.prev;
2266 return;
2267 }
2268 static const char LOCATE_opts___OptionContext___add_option[] = "opts::OptionContext::add_option";
2269 void opts___OptionContext___add_option(val_t p0, val_t p1){
2270 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
2271 val_t REGB0;
2272 val_t REGB1;
2273 val_t REGB2;
2274 val_t tmp;
2275 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2276 fra.me.file = LOCATE_opts;
2277 fra.me.line = 307;
2278 fra.me.meth = LOCATE_opts___OptionContext___add_option;
2279 fra.me.has_broke = 0;
2280 fra.me.REG_size = 5;
2281 fra.me.nitni_local_ref_head = NULL;
2282 fra.me.REG[0] = NIT_NULL;
2283 fra.me.REG[1] = NIT_NULL;
2284 fra.me.REG[2] = NIT_NULL;
2285 fra.me.REG[3] = NIT_NULL;
2286 fra.me.REG[4] = NIT_NULL;
2287 fra.me.REG[0] = p0;
2288 fra.me.REG[1] = p1;
2289 /* ../lib/opts.nit:307 */
2290 fra.me.REG[2] = fra.me.REG[0];
2291 REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[1], COLOR_standard___collection___array___Array, ID_standard___collection___array___Array)) /*cast Array[Option]*/;
2292 if (UNTAG_Bool(REGB0)) {
2293 } else {
2294 nit_abort("Cast failed", NULL, LOCATE_opts, 307);
2295 }
2296 /* ../lib/standard/collection/array.nit:269 */
2297 REGB0 = TAG_Int(0);
2298 /* ../lib/standard/collection/array.nit:270 */
2299 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2300 if (UNTAG_Bool(REGB1)) {
2301 } else {
2302 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
2303 }
2304 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2305 /* ../lib/standard/collection/array.nit:271 */
2306 fra.me.REG[0] = ATTR_standard___collection___array___Array____items(fra.me.REG[1]);
2307 /* ../lib/standard/collection/array.nit:272 */
2308 while(1) {
2309 /* ../lib/standard/collection/array.nit:24 */
2310 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2311 if (UNTAG_Bool(REGB1)) {
2312 } else {
2313 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2314 }
2315 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2316 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2317 if (UNTAG_Bool(REGB2)) {
2318 } else {
2319 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2320 }
2321 /* ../lib/standard/kernel.nit:235 */
2322 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
2323 /* ../lib/standard/collection/array.nit:272 */
2324 if (UNTAG_Bool(REGB1)) {
2325 /* ../lib/standard/collection/array.nit:273 */
2326 REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
2327 if (UNTAG_Bool(REGB1)) {
2328 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
2329 }
2330 /* ../lib/standard/collection/array.nit:724 */
2331 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[0])->val[UNTAG_Int(REGB0)];
2332 /* ../lib/opts.nit:310 */
2333 REGB1 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[2])!=NIT_NULL);
2334 if (UNTAG_Bool(REGB1)) {
2335 } else {
2336 nit_abort("Uninitialized attribute %s", "_options", LOCATE_opts, 310);
2337 }
2338 fra.me.REG[4] = ATTR_opts___OptionContext____options(fra.me.REG[2]);
2339 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
2340 /* ../lib/standard/collection/array.nit:274 */
2341 REGB1 = TAG_Int(1);
2342 /* ../lib/standard/kernel.nit:238 */
2343 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2344 /* ../lib/standard/collection/array.nit:274 */
2345 REGB0 = REGB1;
2346 } else {
2347 /* ../lib/standard/collection/array.nit:272 */
2348 goto label1;
2349 }
2350 }
2351 label1: while(0);
2352 stack_frame_head = fra.me.prev;
2353 return;
2354 }
2355 static const char LOCATE_opts___OptionContext___init[] = "opts::OptionContext::init";
2356 void opts___OptionContext___init(val_t p0, int* init_table){
2357 int itpos9 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_opts___OptionContext].i;
2358 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2359 val_t tmp;
2360 if (init_table[itpos9]) return;
2361 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2362 fra.me.file = LOCATE_opts;
2363 fra.me.line = 314;
2364 fra.me.meth = LOCATE_opts___OptionContext___init;
2365 fra.me.has_broke = 0;
2366 fra.me.REG_size = 2;
2367 fra.me.nitni_local_ref_head = NULL;
2368 fra.me.REG[0] = NIT_NULL;
2369 fra.me.REG[1] = NIT_NULL;
2370 fra.me.REG[0] = p0;
2371 /* ../lib/opts.nit:316 */
2372 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___init();
2373 ATTR_opts___OptionContext____options(fra.me.REG[0]) = fra.me.REG[1];
2374 /* ../lib/opts.nit:317 */
2375 fra.me.REG[1] = NEW_HashMap_standard___collection___hash_collection___HashMap___init();
2376 ATTR_opts___OptionContext____optmap(fra.me.REG[0]) = fra.me.REG[1];
2377 /* ../lib/opts.nit:318 */
2378 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___init();
2379 ATTR_opts___OptionContext____rest(fra.me.REG[0]) = fra.me.REG[1];
2380 /* ../lib/opts.nit:319 */
2381 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___init();
2382 ATTR_opts___OptionContext____errors(fra.me.REG[0]) = fra.me.REG[1];
2383 stack_frame_head = fra.me.prev;
2384 init_table[itpos9] = 1;
2385 return;
2386 }
2387 static const char LOCATE_opts___OptionContext___build[] = "opts::OptionContext::build";
2388 void opts___OptionContext___build(val_t p0){
2389 struct {struct stack_frame_t me; val_t MORE_REG[7];} fra;
2390 val_t REGB0;
2391 val_t REGB1;
2392 val_t REGB2;
2393 val_t REGB3;
2394 val_t tmp;
2395 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2396 fra.me.file = LOCATE_opts;
2397 fra.me.line = 322;
2398 fra.me.meth = LOCATE_opts___OptionContext___build;
2399 fra.me.has_broke = 0;
2400 fra.me.REG_size = 8;
2401 fra.me.nitni_local_ref_head = NULL;
2402 fra.me.REG[0] = NIT_NULL;
2403 fra.me.REG[1] = NIT_NULL;
2404 fra.me.REG[2] = NIT_NULL;
2405 fra.me.REG[3] = NIT_NULL;
2406 fra.me.REG[4] = NIT_NULL;
2407 fra.me.REG[5] = NIT_NULL;
2408 fra.me.REG[6] = NIT_NULL;
2409 fra.me.REG[7] = NIT_NULL;
2410 fra.me.REG[0] = p0;
2411 /* ../lib/opts.nit:324 */
2412 REGB0 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[0])!=NIT_NULL);
2413 if (UNTAG_Bool(REGB0)) {
2414 } else {
2415 nit_abort("Uninitialized attribute %s", "_options", LOCATE_opts, 324);
2416 }
2417 fra.me.REG[1] = ATTR_opts___OptionContext____options(fra.me.REG[0]);
2418 /* ../lib/standard/collection/array.nit:269 */
2419 REGB0 = TAG_Int(0);
2420 /* ../lib/standard/collection/array.nit:270 */
2421 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2422 if (UNTAG_Bool(REGB1)) {
2423 } else {
2424 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
2425 }
2426 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2427 /* ../lib/standard/collection/array.nit:271 */
2428 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[1]);
2429 /* ../lib/standard/collection/array.nit:272 */
2430 while(1) {
2431 /* ../lib/standard/collection/array.nit:24 */
2432 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
2433 if (UNTAG_Bool(REGB1)) {
2434 } else {
2435 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2436 }
2437 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
2438 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2439 if (UNTAG_Bool(REGB2)) {
2440 } else {
2441 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2442 }
2443 /* ../lib/standard/kernel.nit:235 */
2444 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
2445 /* ../lib/standard/collection/array.nit:272 */
2446 if (UNTAG_Bool(REGB1)) {
2447 /* ../lib/standard/collection/array.nit:273 */
2448 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2449 if (UNTAG_Bool(REGB1)) {
2450 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
2451 }
2452 /* ../lib/standard/collection/array.nit:724 */
2453 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
2454 /* ../lib/opts.nit:325 */
2455 fra.me.REG[4] = CALL_opts___Option___names(fra.me.REG[3])(fra.me.REG[3]);
2456 /* ../lib/standard/collection/array.nit:269 */
2457 REGB1 = TAG_Int(0);
2458 /* ../lib/standard/collection/array.nit:270 */
2459 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
2460 if (UNTAG_Bool(REGB2)) {
2461 } else {
2462 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
2463 }
2464 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[4]);
2465 /* ../lib/standard/collection/array.nit:271 */
2466 fra.me.REG[5] = ATTR_standard___collection___array___Array____items(fra.me.REG[4]);
2467 /* ../lib/standard/collection/array.nit:272 */
2468 while(1) {
2469 /* ../lib/standard/collection/array.nit:24 */
2470 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
2471 if (UNTAG_Bool(REGB2)) {
2472 } else {
2473 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2474 }
2475 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[4]);
2476 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
2477 if (UNTAG_Bool(REGB3)) {
2478 } else {
2479 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2480 }
2481 /* ../lib/standard/kernel.nit:235 */
2482 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
2483 /* ../lib/standard/collection/array.nit:272 */
2484 if (UNTAG_Bool(REGB2)) {
2485 /* ../lib/standard/collection/array.nit:273 */
2486 REGB2 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
2487 if (UNTAG_Bool(REGB2)) {
2488 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
2489 }
2490 /* ../lib/standard/collection/array.nit:724 */
2491 fra.me.REG[6] = ((Nit_NativeArray)fra.me.REG[5])->val[UNTAG_Int(REGB1)];
2492 /* ../lib/opts.nit:326 */
2493 REGB2 = TAG_Bool(ATTR_opts___OptionContext____optmap(fra.me.REG[0])!=NIT_NULL);
2494 if (UNTAG_Bool(REGB2)) {
2495 } else {
2496 nit_abort("Uninitialized attribute %s", "_optmap", LOCATE_opts, 326);
2497 }
2498 fra.me.REG[7] = ATTR_opts___OptionContext____optmap(fra.me.REG[0]);
2499 CALL_standard___collection___abstract_collection___Map_____braeq(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[6], fra.me.REG[3]);
2500 /* ../lib/standard/collection/array.nit:274 */
2501 REGB2 = TAG_Int(1);
2502 /* ../lib/standard/kernel.nit:238 */
2503 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
2504 /* ../lib/standard/collection/array.nit:274 */
2505 REGB1 = REGB2;
2506 } else {
2507 /* ../lib/standard/collection/array.nit:272 */
2508 goto label1;
2509 }
2510 }
2511 label1: while(0);
2512 /* ../lib/standard/collection/array.nit:274 */
2513 REGB1 = TAG_Int(1);
2514 /* ../lib/standard/kernel.nit:238 */
2515 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2516 /* ../lib/standard/collection/array.nit:274 */
2517 REGB0 = REGB1;
2518 } else {
2519 /* ../lib/standard/collection/array.nit:272 */
2520 goto label2;
2521 }
2522 }
2523 label2: while(0);
2524 stack_frame_head = fra.me.prev;
2525 return;
2526 }
2527 static const char LOCATE_opts___OptionContext___get_errors[] = "opts::OptionContext::get_errors";
2528 val_t opts___OptionContext___get_errors(val_t p0){
2529 struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
2530 val_t REGB0;
2531 val_t REGB1;
2532 val_t REGB2;
2533 val_t REGB3;
2534 val_t tmp;
2535 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2536 fra.me.file = LOCATE_opts;
2537 fra.me.line = 331;
2538 fra.me.meth = LOCATE_opts___OptionContext___get_errors;
2539 fra.me.has_broke = 0;
2540 fra.me.REG_size = 6;
2541 fra.me.nitni_local_ref_head = NULL;
2542 fra.me.REG[0] = NIT_NULL;
2543 fra.me.REG[1] = NIT_NULL;
2544 fra.me.REG[2] = NIT_NULL;
2545 fra.me.REG[3] = NIT_NULL;
2546 fra.me.REG[4] = NIT_NULL;
2547 fra.me.REG[5] = NIT_NULL;
2548 fra.me.REG[0] = p0;
2549 /* ../lib/opts.nit:333 */
2550 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___init();
2551 /* ../lib/opts.nit:335 */
2552 REGB0 = TAG_Bool(ATTR_opts___OptionContext____errors(fra.me.REG[0])!=NIT_NULL);
2553 if (UNTAG_Bool(REGB0)) {
2554 } else {
2555 nit_abort("Uninitialized attribute %s", "_errors", LOCATE_opts, 335);
2556 }
2557 fra.me.REG[2] = ATTR_opts___OptionContext____errors(fra.me.REG[0]);
2558 CALL_standard___collection___abstract_collection___SimpleCollection___add_all(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
2559 /* ../lib/opts.nit:337 */
2560 REGB0 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[0])!=NIT_NULL);
2561 if (UNTAG_Bool(REGB0)) {
2562 } else {
2563 nit_abort("Uninitialized attribute %s", "_options", LOCATE_opts, 337);
2564 }
2565 fra.me.REG[0] = ATTR_opts___OptionContext____options(fra.me.REG[0]);
2566 /* ../lib/standard/collection/array.nit:269 */
2567 REGB0 = TAG_Int(0);
2568 /* ../lib/standard/collection/array.nit:270 */
2569 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2570 if (UNTAG_Bool(REGB1)) {
2571 } else {
2572 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
2573 }
2574 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2575 /* ../lib/standard/collection/array.nit:271 */
2576 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[0]);
2577 /* ../lib/standard/collection/array.nit:272 */
2578 while(1) {
2579 /* ../lib/standard/collection/array.nit:24 */
2580 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2581 if (UNTAG_Bool(REGB1)) {
2582 } else {
2583 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2584 }
2585 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2586 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2587 if (UNTAG_Bool(REGB2)) {
2588 } else {
2589 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2590 }
2591 /* ../lib/standard/kernel.nit:235 */
2592 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
2593 /* ../lib/standard/collection/array.nit:272 */
2594 if (UNTAG_Bool(REGB1)) {
2595 /* ../lib/standard/collection/array.nit:273 */
2596 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2597 if (UNTAG_Bool(REGB1)) {
2598 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
2599 }
2600 /* ../lib/standard/collection/array.nit:724 */
2601 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
2602 /* ../lib/opts.nit:338 */
2603 fra.me.REG[3] = CALL_opts___Option___errors(fra.me.REG[3])(fra.me.REG[3]);
2604 /* ../lib/standard/collection/array.nit:269 */
2605 REGB1 = TAG_Int(0);
2606 /* ../lib/standard/collection/array.nit:270 */
2607 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
2608 if (UNTAG_Bool(REGB2)) {
2609 } else {
2610 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
2611 }
2612 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
2613 /* ../lib/standard/collection/array.nit:271 */
2614 fra.me.REG[4] = ATTR_standard___collection___array___Array____items(fra.me.REG[3]);
2615 /* ../lib/standard/collection/array.nit:272 */
2616 while(1) {
2617 /* ../lib/standard/collection/array.nit:24 */
2618 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
2619 if (UNTAG_Bool(REGB2)) {
2620 } else {
2621 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2622 }
2623 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
2624 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
2625 if (UNTAG_Bool(REGB3)) {
2626 } else {
2627 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2628 }
2629 /* ../lib/standard/kernel.nit:235 */
2630 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
2631 /* ../lib/standard/collection/array.nit:272 */
2632 if (UNTAG_Bool(REGB2)) {
2633 /* ../lib/standard/collection/array.nit:273 */
2634 REGB2 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
2635 if (UNTAG_Bool(REGB2)) {
2636 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
2637 }
2638 /* ../lib/standard/collection/array.nit:724 */
2639 fra.me.REG[5] = ((Nit_NativeArray)fra.me.REG[4])->val[UNTAG_Int(REGB1)];
2640 /* ../lib/opts.nit:339 */
2641 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[5]);
2642 /* ../lib/standard/collection/array.nit:274 */
2643 REGB2 = TAG_Int(1);
2644 /* ../lib/standard/kernel.nit:238 */
2645 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
2646 /* ../lib/standard/collection/array.nit:274 */
2647 REGB1 = REGB2;
2648 } else {
2649 /* ../lib/standard/collection/array.nit:272 */
2650 goto label1;
2651 }
2652 }
2653 label1: while(0);
2654 /* ../lib/standard/collection/array.nit:274 */
2655 REGB1 = TAG_Int(1);
2656 /* ../lib/standard/kernel.nit:238 */
2657 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2658 /* ../lib/standard/collection/array.nit:274 */
2659 REGB0 = REGB1;
2660 } else {
2661 /* ../lib/standard/collection/array.nit:272 */
2662 goto label2;
2663 }
2664 }
2665 label2: while(0);
2666 /* ../lib/opts.nit:343 */
2667 goto label3;
2668 label3: while(0);
2669 stack_frame_head = fra.me.prev;
2670 return fra.me.REG[1];
2671 }