1 /* This C file is generated by NIT to compile module opts. */
3 val_t
opts___Option___to_s(val_t self
) {
4 struct trace_t trace
= {NULL
, NULL
, 54, LOCATE_opts___Option___to_s
};
6 void **closurevariable
= NULL
;
7 trace
.prev
= tracehead
; tracehead
= &trace
;
8 trace
.file
= LOCATE_opts
;
10 variable
[2] = variable
[0];
11 variable
[2] = CALL_opts___Option___pretty(variable
[2])(variable
[2], TAG_Int(2)) /*Option::pretty*/;
12 variable
[1] = variable
[2];
14 return_label0
: while(false);
15 tracehead
= trace
.prev
;
18 val_t
opts___Option___names(val_t self
) {
19 struct trace_t trace
= {NULL
, NULL
, 16, LOCATE_opts___Option___names
};
20 val_t
*variable
= NULL
;
21 void **closurevariable
= NULL
;
22 trace
.prev
= tracehead
; tracehead
= &trace
;
23 trace
.file
= LOCATE_opts
;
24 tracehead
= trace
.prev
;
25 return ATTR_opts___Option____names( self
) /*Option::_names*/;
27 val_t
opts___Option___helptext(val_t self
) {
28 struct trace_t trace
= {NULL
, NULL
, 22, LOCATE_opts___Option___helptext
};
29 val_t
*variable
= NULL
;
30 void **closurevariable
= NULL
;
31 trace
.prev
= tracehead
; tracehead
= &trace
;
32 trace
.file
= LOCATE_opts
;
33 tracehead
= trace
.prev
;
34 return ATTR_opts___Option____helptext( self
) /*Option::_helptext*/;
36 val_t
opts___Option___mandatory(val_t self
) {
37 struct trace_t trace
= {NULL
, NULL
, 25, LOCATE_opts___Option___mandatory
};
38 val_t
*variable
= NULL
;
39 void **closurevariable
= NULL
;
40 trace
.prev
= tracehead
; tracehead
= &trace
;
41 trace
.file
= LOCATE_opts
;
42 tracehead
= trace
.prev
;
43 return ATTR_opts___Option____mandatory( self
) /*Option::_mandatory*/;
45 void opts___Option___mandatory__eq(val_t self
, val_t param0
) {
46 struct trace_t trace
= {NULL
, NULL
, 25, LOCATE_opts___Option___mandatory__eq
};
47 val_t
*variable
= NULL
;
48 void **closurevariable
= NULL
;
49 trace
.prev
= tracehead
; tracehead
= &trace
;
50 trace
.file
= LOCATE_opts
;
51 ATTR_opts___Option____mandatory( self
) /*Option::_mandatory*/ = param0
;
52 tracehead
= trace
.prev
;
55 val_t
opts___Option___context(val_t self
) {
56 struct trace_t trace
= {NULL
, NULL
, 28, LOCATE_opts___Option___context
};
57 val_t
*variable
= NULL
;
58 void **closurevariable
= NULL
;
59 trace
.prev
= tracehead
; tracehead
= &trace
;
60 trace
.file
= LOCATE_opts
;
61 tracehead
= trace
.prev
;
62 return ATTR_opts___Option____context( self
) /*Option::_context*/;
64 void opts___Option___context__eq(val_t self
, val_t param0
) {
65 struct trace_t trace
= {NULL
, NULL
, 28, LOCATE_opts___Option___context__eq
};
66 val_t
*variable
= NULL
;
67 void **closurevariable
= NULL
;
68 trace
.prev
= tracehead
; tracehead
= &trace
;
69 trace
.file
= LOCATE_opts
;
70 ATTR_opts___Option____context( self
) /*Option::_context*/ = param0
;
71 tracehead
= trace
.prev
;
74 val_t
opts___Option___value(val_t self
) {
75 struct trace_t trace
= {NULL
, NULL
, 31, LOCATE_opts___Option___value
};
76 val_t
*variable
= NULL
;
77 void **closurevariable
= NULL
;
78 trace
.prev
= tracehead
; tracehead
= &trace
;
79 trace
.file
= LOCATE_opts
;
80 tracehead
= trace
.prev
;
81 return ATTR_opts___Option____value( self
) /*Option::_value*/;
83 void opts___Option___value__eq(val_t self
, val_t param0
) {
84 struct trace_t trace
= {NULL
, NULL
, 31, LOCATE_opts___Option___value__eq
};
85 val_t
*variable
= NULL
;
86 void **closurevariable
= NULL
;
87 trace
.prev
= tracehead
; tracehead
= &trace
;
88 trace
.file
= LOCATE_opts
;
89 ATTR_opts___Option____value( self
) /*Option::_value*/ = param0
;
90 tracehead
= trace
.prev
;
93 val_t
opts___Option___default_value(val_t self
) {
94 struct trace_t trace
= {NULL
, NULL
, 34, LOCATE_opts___Option___default_value
};
95 val_t
*variable
= NULL
;
96 void **closurevariable
= NULL
;
97 trace
.prev
= tracehead
; tracehead
= &trace
;
98 trace
.file
= LOCATE_opts
;
99 tracehead
= trace
.prev
;
100 return ATTR_opts___Option____default_value( self
) /*Option::_default_value*/;
102 void opts___Option___default_value__eq(val_t self
, val_t param0
) {
103 struct trace_t trace
= {NULL
, NULL
, 34, LOCATE_opts___Option___default_value__eq
};
104 val_t
*variable
= NULL
;
105 void **closurevariable
= NULL
;
106 trace
.prev
= tracehead
; tracehead
= &trace
;
107 trace
.file
= LOCATE_opts
;
108 ATTR_opts___Option____default_value( self
) /*Option::_default_value*/ = param0
;
109 tracehead
= trace
.prev
;
112 void opts___Option___init_opt(val_t self
, val_t param0
, val_t param1
, val_t param2
, int* init_table
) {
113 struct trace_t trace
= {NULL
, NULL
, 37, LOCATE_opts___Option___init_opt
};
115 void **closurevariable
= NULL
;
116 trace
.prev
= tracehead
; tracehead
= &trace
;
117 trace
.file
= LOCATE_opts
;
119 variable
[1] = param0
;
120 variable
[2] = param1
;
121 variable
[3] = param2
;
122 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Option
].i
]) return;
123 variable
[5] = TAG_Bool(( variable
[3] /*names*/ == NIT_NULL
/*null*/) || (( variable
[3] /*names*/ != NIT_NULL
) && UNTAG_Bool(CALL_kernel___Object_____eqeq( variable
[3] /*names*/)( variable
[3] /*names*/, NIT_NULL
/*null*/) /*AbstractArray::==*/)));
124 if (UNTAG_Bool(variable
[5])) { /*if*/
125 variable
[5] = variable
[0];
126 variable
[6] = NEW_Array_array___Array___init(); /*new Array[String]*/
127 ATTR_opts___Option____names(variable
[5]) /*Option::_names*/ = variable
[6];
129 variable
[5] = variable
[0];
130 variable
[6] = CALL_array___Collection___to_a( variable
[3] /*names*/)( variable
[3] /*names*/) /*Collection::to_a*/;
131 ATTR_opts___Option____names(variable
[5]) /*Option::_names*/ = variable
[6];
133 variable
[5] = variable
[0];
134 ATTR_opts___Option____helptext(variable
[5]) /*Option::_helptext*/ = variable
[1] /*help*/;
135 variable
[5] = variable
[0];
136 ATTR_opts___Option____mandatory(variable
[5]) /*Option::_mandatory*/ = TAG_Bool(false);
137 variable
[5] = variable
[0];
138 ATTR_opts___Option____default_value(variable
[5]) /*Option::_default_value*/ = variable
[2] /*default*/;
139 variable
[5] = variable
[0];
140 ATTR_opts___Option____value(variable
[5]) /*Option::_value*/ = variable
[2] /*default*/;
141 return_label1
: while(false);
142 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Option
].i
] = 1;
143 tracehead
= trace
.prev
;
146 void opts___Option___add_aliases(val_t self
, val_t param0
) {
147 struct trace_t trace
= {NULL
, NULL
, 51, LOCATE_opts___Option___add_aliases
};
149 void **closurevariable
= NULL
;
150 trace
.prev
= tracehead
; tracehead
= &trace
;
151 trace
.file
= LOCATE_opts
;
153 /* check if p<Array[String] with p:String */
154 if (( param0
!=NIT_NULL
) && !VAL_ISA( param0
, COLOR_Array
, ID_Array
)) { fprintf(stderr
, "Cast failled"); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___Option___add_aliases
, LOCATE_opts
, 52); nit_exit(1); } /*cast Array[String]*/;
155 variable
[1] = param0
;
156 variable
[3] = variable
[0];
157 variable
[3] = ATTR_opts___Option____names(variable
[3]) /*Option::_names*/;
158 CALL_abstract_collection___SimpleCollection___add_all(variable
[3])(variable
[3], variable
[1] /*names*/) /*SimpleCollection::add_all*/;
159 return_label2
: while(false);
160 tracehead
= trace
.prev
;
163 val_t
opts___Option___pretty(val_t self
, val_t param0
) {
164 struct trace_t trace
= {NULL
, NULL
, 57, LOCATE_opts___Option___pretty
};
166 void **closurevariable
= NULL
;
167 trace
.prev
= tracehead
; tracehead
= &trace
;
168 trace
.file
= LOCATE_opts
;
170 variable
[1] = param0
;
171 variable
[4] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(2)); /*new String*/
172 variable
[3] = variable
[4];
173 variable
[4] = variable
[0];
174 variable
[4] = ATTR_opts___Option____names(variable
[4]) /*Option::_names*/;
175 variable
[5] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)); /*new String*/
176 variable
[4] = CALL_string___Collection___join(variable
[4])(variable
[4], variable
[5]) /*Collection::join*/;
177 CALL_abstract_collection___IndexedCollection___append( variable
[3] /*text*/)( variable
[3] /*text*/, variable
[4]) /*String::append*/;
178 variable
[4] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(2)); /*new String*/
179 CALL_abstract_collection___IndexedCollection___append( variable
[3] /*text*/)( variable
[3] /*text*/, variable
[4]) /*String::append*/;
180 variable
[5] = CALL_abstract_collection___Collection___length( variable
[3] /*text*/)( variable
[3] /*text*/) /*AbstractArray::length*/;
181 variable
[5] = TAG_Int(UNTAG_Int( variable
[1] /*off*/)-UNTAG_Int(variable
[5]));
182 variable
[4] = variable
[5];
183 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*rest*/)>UNTAG_Int( TAG_Int(0)));
184 if (UNTAG_Bool(variable
[5])) { /*if*/
185 variable
[5] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)); /*new String*/
186 variable
[5] = CALL_string___String_____star(variable
[5])(variable
[5], variable
[4] /*rest*/) /*String::**/;
187 CALL_abstract_collection___IndexedCollection___append( variable
[3] /*text*/)( variable
[3] /*text*/, variable
[5]) /*String::append*/;
189 variable
[5] = variable
[0];
190 variable
[5] = CALL_opts___Option___helptext(variable
[5])(variable
[5]) /*Option::helptext*/;
191 CALL_abstract_collection___IndexedCollection___append( variable
[3] /*text*/)( variable
[3] /*text*/, variable
[5]) /*String::append*/;
192 variable
[2] = variable
[3] /*text*/;
194 return_label3
: while(false);
195 tracehead
= trace
.prev
;
198 val_t
opts___Option___pretty_default(val_t self
) {
199 struct trace_t trace
= {NULL
, NULL
, 70, LOCATE_opts___Option___pretty_default
};
201 void **closurevariable
= NULL
;
202 trace
.prev
= tracehead
; tracehead
= &trace
;
203 trace
.file
= LOCATE_opts
;
205 variable
[2] = variable
[0];
206 variable
[2] = CALL_opts___Option___default_value(variable
[2])(variable
[2]) /*Option::default_value*/;
207 variable
[2] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable
[2] == NIT_NULL
/*null*/) || ((variable
[2] != NIT_NULL
) && ((CALL_kernel___Object_____eqeq(variable
[2])==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable
[2], NIT_NULL
/*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable
[2])(variable
[2], NIT_NULL
/*null*/) /*Object::==*/)))))));
208 if (UNTAG_Bool(variable
[2])) { /*if*/
209 variable
[2] = NEW_Array_array___Array___with_capacity(TAG_Int(3)); /*new Array[String]*/
210 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString(" ("), TAG_Int(2)); /*new String*/
211 variable
[4] = variable
[3];
212 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], variable
[4]) /*AbstractArray::add*/;
213 variable
[5] = variable
[0];
214 variable
[5] = CALL_opts___Option___default_value(variable
[5])(variable
[5]) /*Option::default_value*/;
215 variable
[6] = variable
[5];
216 variable
[6] = CALL_string___Object___to_s(variable
[6])(variable
[6]) /*Object::to_s*/;
217 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], variable
[6]) /*AbstractArray::add*/;
218 variable
[7] = NEW_String_string___String___with_native(BOX_NativeString(")"), TAG_Int(1)); /*new String*/
219 variable
[8] = variable
[7];
220 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], variable
[8]) /*AbstractArray::add*/;
221 variable
[2] = CALL_string___Object___to_s(variable
[2])(variable
[2]) /*Object::to_s*/;
222 variable
[1] = variable
[2];
225 variable
[2] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
226 variable
[1] = variable
[2];
228 return_label4
: while(false);
229 tracehead
= trace
.prev
;
232 void opts___Option___read_param(val_t self
, val_t param0
) {
233 struct trace_t trace
= {NULL
, NULL
, 78, LOCATE_opts___Option___read_param
};
234 val_t
*variable
= NULL
;
235 void **closurevariable
= NULL
;
236 trace
.prev
= tracehead
; tracehead
= &trace
;
237 trace
.file
= LOCATE_opts
;
238 fprintf(stderr
, "Deferred method called");
239 fprintf(stderr
, " (%s:%d)\n", LOCATE_opts
, 78);
241 tracehead
= trace
.prev
;
244 val_t
opts___OptionText___to_s(val_t self
) {
245 struct trace_t trace
= {NULL
, NULL
, 88, LOCATE_opts___OptionText___to_s
};
247 void **closurevariable
= NULL
;
248 trace
.prev
= tracehead
; tracehead
= &trace
;
249 trace
.file
= LOCATE_opts
;
251 variable
[2] = variable
[0];
252 variable
[2] = CALL_opts___Option___helptext(variable
[2])(variable
[2]) /*Option::helptext*/;
253 variable
[1] = variable
[2];
255 return_label5
: while(false);
256 tracehead
= trace
.prev
;
259 val_t
opts___OptionText___pretty(val_t self
, val_t param0
) {
260 struct trace_t trace
= {NULL
, NULL
, 86, LOCATE_opts___OptionText___pretty
};
262 void **closurevariable
= NULL
;
263 trace
.prev
= tracehead
; tracehead
= &trace
;
264 trace
.file
= LOCATE_opts
;
266 variable
[1] = param0
;
267 variable
[3] = variable
[0];
268 variable
[3] = CALL_string___Object___to_s(variable
[3])(variable
[3]) /*OptionText::to_s*/;
269 variable
[2] = variable
[3];
271 return_label6
: while(false);
272 tracehead
= trace
.prev
;
275 void opts___OptionText___init(val_t self
, val_t param0
, int* init_table
) {
276 struct trace_t trace
= {NULL
, NULL
, 84, LOCATE_opts___OptionText___init
};
278 void **closurevariable
= NULL
;
279 trace
.prev
= tracehead
; tracehead
= &trace
;
280 trace
.file
= LOCATE_opts
;
282 variable
[1] = param0
;
283 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionText
].i
]) return;
284 variable
[3] = variable
[0];
285 CALL_opts___Option___init_opt(variable
[3])(variable
[3], variable
[1] /*text*/, NIT_NULL
/*null*/, NIT_NULL
/*null*/, init_table
/*YYY*/) /*Option::init_opt*/;
286 return_label7
: while(false);
287 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionText
].i
] = 1;
288 tracehead
= trace
.prev
;
291 void opts___OptionBool___read_param(val_t self
, val_t param0
) {
292 struct trace_t trace
= {NULL
, NULL
, 97, LOCATE_opts___OptionBool___read_param
};
294 void **closurevariable
= NULL
;
295 trace
.prev
= tracehead
; tracehead
= &trace
;
296 trace
.file
= LOCATE_opts
;
298 variable
[1] = param0
;
299 variable
[3] = variable
[0];
300 CALL_opts___Option___value__eq(variable
[3])(variable
[3], TAG_Bool(true)) /*Option::value=*/;
301 return_label8
: while(false);
302 tracehead
= trace
.prev
;
305 void opts___OptionBool___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
306 struct trace_t trace
= {NULL
, NULL
, 95, LOCATE_opts___OptionBool___init
};
308 void **closurevariable
= NULL
;
309 trace
.prev
= tracehead
; tracehead
= &trace
;
310 trace
.file
= LOCATE_opts
;
312 variable
[1] = param0
;
313 /* check if p<Array[String] with p:String */
314 if (( param1
!=NIT_NULL
) && !VAL_ISA( param1
, COLOR_Array
, ID_Array
)) { fprintf(stderr
, "Cast failled"); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___OptionBool___init
, LOCATE_opts
, 95); nit_exit(1); } /*cast Array[String]*/;
315 variable
[2] = param1
;
316 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionBool
].i
]) return;
317 variable
[4] = variable
[0];
318 CALL_opts___Option___init_opt(variable
[4])(variable
[4], variable
[1] /*help*/, TAG_Bool(false), variable
[2] /*names*/, init_table
/*YYY*/) /*Option::init_opt*/;
319 return_label9
: while(false);
320 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionBool
].i
] = 1;
321 tracehead
= trace
.prev
;
324 void opts___OptionParameter___read_param(val_t self
, val_t param0
) {
325 struct trace_t trace
= {NULL
, NULL
, 105, LOCATE_opts___OptionParameter___read_param
};
327 void **closurevariable
= NULL
;
328 trace
.prev
= tracehead
; tracehead
= &trace
;
329 trace
.file
= LOCATE_opts
;
331 variable
[1] = param0
;
332 variable
[3] = variable
[0];
333 variable
[3] = CALL_opts___Option___context(variable
[3])(variable
[3]) /*Option::context*/;
334 variable
[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable
[3] == NIT_NULL
/*null*/) || ((variable
[3] != NIT_NULL
) && ((CALL_kernel___Object_____eqeq(variable
[3])==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable
[3], NIT_NULL
/*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable
[3])(variable
[3], NIT_NULL
/*null*/) /*Object::==*/)))))));
335 if (!UNTAG_Bool(variable
[3])) { fprintf(stderr
, "Assert%s failed", ""); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___OptionParameter___read_param
, LOCATE_opts
, 107); nit_exit(1);}
336 variable
[3] = CALL_abstract_collection___Iterator___is_ok( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::is_ok*/;
337 if (UNTAG_Bool(variable
[3])) { /*if*/
338 variable
[3] = variable
[0];
339 variable
[4] = variable
[0];
340 variable
[5] = CALL_abstract_collection___Iterator___item( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::item*/;
341 variable
[4] = CALL_opts___OptionParameter___convert(variable
[4])(variable
[4], variable
[5]) /*OptionParameter::convert*/;
342 CALL_opts___Option___value__eq(variable
[3])(variable
[3], variable
[4]) /*Option::value=*/;
343 CALL_abstract_collection___Iterator___next( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::next*/;
346 return_label10
: while(false);
347 tracehead
= trace
.prev
;
350 val_t
opts___OptionParameter___convert(val_t self
, val_t param0
) {
351 struct trace_t trace
= {NULL
, NULL
, 103, LOCATE_opts___OptionParameter___convert
};
352 val_t
*variable
= NULL
;
353 void **closurevariable
= NULL
;
354 trace
.prev
= tracehead
; tracehead
= &trace
;
355 trace
.file
= LOCATE_opts
;
356 fprintf(stderr
, "Deferred method called");
357 fprintf(stderr
, " (%s:%d)\n", LOCATE_opts
, 103);
359 tracehead
= trace
.prev
;
362 void opts___OptionParameter___init_opt(val_t self
, val_t param0
, val_t param1
, val_t param2
, int* init_table
) {
363 struct trace_t trace
= {NULL
, NULL
, 116, LOCATE_opts___OptionParameter___init_opt
};
365 void **closurevariable
= NULL
;
366 trace
.prev
= tracehead
; tracehead
= &trace
;
367 trace
.file
= LOCATE_opts
;
369 variable
[1] = param0
;
370 variable
[2] = param1
;
371 variable
[3] = param2
;
372 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionParameter
].i
]) return;
373 CALL_opts___Option___init_opt(variable
[0])(variable
[0], variable
[1], variable
[2], variable
[3], init_table
/*YYY*/) /*Option::init_opt*/;
374 return_label11
: while(false);
375 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionParameter
].i
] = 1;
376 tracehead
= trace
.prev
;
379 val_t
opts___OptionString___convert(val_t self
, val_t param0
) {
380 struct trace_t trace
= {NULL
, NULL
, 125, LOCATE_opts___OptionString___convert
};
382 void **closurevariable
= NULL
;
383 trace
.prev
= tracehead
; tracehead
= &trace
;
384 trace
.file
= LOCATE_opts
;
386 variable
[1] = param0
;
387 variable
[2] = variable
[1] /*str*/;
389 return_label12
: while(false);
390 tracehead
= trace
.prev
;
393 void opts___OptionString___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
394 struct trace_t trace
= {NULL
, NULL
, 123, LOCATE_opts___OptionString___init
};
396 void **closurevariable
= NULL
;
397 trace
.prev
= tracehead
; tracehead
= &trace
;
398 trace
.file
= LOCATE_opts
;
400 variable
[1] = param0
;
401 /* check if p<Array[String] with p:String */
402 if (( param1
!=NIT_NULL
) && !VAL_ISA( param1
, COLOR_Array
, ID_Array
)) { fprintf(stderr
, "Cast failled"); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___OptionString___init
, LOCATE_opts
, 123); nit_exit(1); } /*cast Array[String]*/;
403 variable
[2] = param1
;
404 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionString
].i
]) return;
405 variable
[4] = variable
[0];
406 CALL_opts___OptionParameter___init_opt(variable
[4])(variable
[4], variable
[1] /*help*/, NIT_NULL
/*null*/, variable
[2] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
407 return_label13
: while(false);
408 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionString
].i
] = 1;
409 tracehead
= trace
.prev
;
412 val_t
opts___OptionEnum___pretty_default(val_t self
) {
413 struct trace_t trace
= {NULL
, NULL
, 146, LOCATE_opts___OptionEnum___pretty_default
};
415 void **closurevariable
= NULL
;
416 trace
.prev
= tracehead
; tracehead
= &trace
;
417 trace
.file
= LOCATE_opts
;
419 variable
[2] = variable
[0];
420 variable
[2] = CALL_opts___Option___default_value(variable
[2])(variable
[2]) /*Option::default_value*/;
421 variable
[2] = TAG_Bool((variable
[2])!=( NIT_NULL
/*null*/));
422 if (UNTAG_Bool(variable
[2])) { /*if*/
423 variable
[2] = NEW_Array_array___Array___with_capacity(TAG_Int(3)); /*new Array[String]*/
424 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString(" ("), TAG_Int(2)); /*new String*/
425 variable
[4] = variable
[3];
426 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], variable
[4]) /*AbstractArray::add*/;
427 variable
[5] = variable
[0];
428 variable
[5] = ATTR_opts___OptionEnum____enum(variable
[5]) /*OptionEnum::_enum*/;
429 variable
[6] = variable
[0];
430 variable
[6] = CALL_opts___Option___default_value(variable
[6])(variable
[6]) /*Option::default_value*/;
431 variable
[7] = variable
[5];
432 variable
[8] = variable
[6];
433 variable
[10] = TAG_Bool(UNTAG_Int( variable
[8] /*index*/)>=UNTAG_Int( TAG_Int(0)));
434 variable
[11] = variable
[10];
435 if (UNTAG_Bool(variable
[11])) { /* and */
436 variable
[11] = variable
[7];
437 variable
[11] = ATTR_array___AbstractArray____length(variable
[11]) /*AbstractArray::_length*/;
438 variable
[11] = TAG_Bool(UNTAG_Int( variable
[8] /*index*/)<UNTAG_Int(variable
[11]));
440 variable
[10] = variable
[11];
441 if (!UNTAG_Bool(variable
[10])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_opts
, 229); nit_exit(1);}
442 variable
[10] = variable
[7];
443 variable
[10] = ATTR_array___Array____items(variable
[10]) /*Array::_items*/;
444 variable
[10] = UNBOX_NativeArray(variable
[10])[UNTAG_Int( variable
[8] /*index*/)];
445 variable
[9] = variable
[10];
447 return_label15
: while(false);
448 variable
[5] = variable
[9];
449 variable
[6] = variable
[5];
450 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], variable
[6]) /*AbstractArray::add*/;
451 variable
[7] = NEW_String_string___String___with_native(BOX_NativeString(")"), TAG_Int(1)); /*new String*/
452 variable
[8] = variable
[7];
453 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], variable
[8]) /*AbstractArray::add*/;
454 variable
[2] = CALL_string___Object___to_s(variable
[2])(variable
[2]) /*Object::to_s*/;
455 variable
[1] = variable
[2];
458 variable
[2] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
459 variable
[1] = variable
[2];
462 return_label14
: while(false);
463 tracehead
= trace
.prev
;
466 val_t
opts___OptionEnum___convert(val_t self
, val_t param0
) {
467 struct trace_t trace
= {NULL
, NULL
, 140, LOCATE_opts___OptionEnum___convert
};
469 void **closurevariable
= NULL
;
470 trace
.prev
= tracehead
; tracehead
= &trace
;
471 trace
.file
= LOCATE_opts
;
473 variable
[1] = param0
;
474 variable
[4] = variable
[0];
475 variable
[4] = ATTR_opts___OptionEnum____enum(variable
[4]) /*OptionEnum::_enum*/;
476 variable
[4] = CALL_abstract_collection___IndexedCollection___index_of(variable
[4])(variable
[4], variable
[1] /*str*/) /*AbstractArray::index_of*/;
477 variable
[3] = variable
[4];
478 variable
[2] = variable
[3] /*id*/;
480 return_label16
: while(false);
481 tracehead
= trace
.prev
;
484 void opts___OptionEnum___init(val_t self
, val_t param0
, val_t param1
, val_t param2
, val_t param3
, int* init_table
) {
485 struct trace_t trace
= {NULL
, NULL
, 133, LOCATE_opts___OptionEnum___init
};
487 void **closurevariable
= NULL
;
488 trace
.prev
= tracehead
; tracehead
= &trace
;
489 trace
.file
= LOCATE_opts
;
491 variable
[1] = param0
;
492 variable
[2] = param1
;
493 variable
[3] = param2
;
494 /* check if p<Array[String] with p:String */
495 if (( param3
!=NIT_NULL
) && !VAL_ISA( param3
, COLOR_Array
, ID_Array
)) { fprintf(stderr
, "Cast failled"); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___OptionEnum___init
, LOCATE_opts
, 133); nit_exit(1); } /*cast Array[String]*/;
496 variable
[4] = param3
;
497 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionEnum
].i
]) return;
498 variable
[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable
[1] /*enum*/ == NIT_NULL
/*null*/) || (( variable
[1] /*enum*/ != NIT_NULL
) && ((CALL_kernel___Object_____eqeq( variable
[1] /*enum*/)==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable
[1] /*enum*/, NIT_NULL
/*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable
[1] /*enum*/)( variable
[1] /*enum*/, NIT_NULL
/*null*/) /*Object::==*/)))))));
499 variable
[7] = variable
[6];
500 if (UNTAG_Bool(variable
[7])) { /* and */
501 variable
[7] = CALL_abstract_collection___Collection___length( variable
[1] /*enum*/)( variable
[1] /*enum*/) /*AbstractArray::length*/;
502 variable
[7] = TAG_Bool(UNTAG_Int(variable
[7])>UNTAG_Int( TAG_Int(0)));
504 variable
[6] = variable
[7];
505 if (!UNTAG_Bool(variable
[6])) { fprintf(stderr
, "Assert%s failed", ""); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___OptionEnum___init
, LOCATE_opts
, 135); nit_exit(1);}
506 variable
[6] = variable
[0];
507 variable
[7] = CALL_array___Collection___to_a( variable
[1] /*enum*/)( variable
[1] /*enum*/) /*Collection::to_a*/;
508 ATTR_opts___OptionEnum____enum(variable
[6]) /*OptionEnum::_enum*/ = variable
[7];
509 variable
[6] = variable
[0];
510 variable
[7] = NEW_Array_array___Array___with_capacity(TAG_Int(5)); /*new Array[String]*/
511 variable
[8] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
512 variable
[9] = variable
[8];
513 CALL_abstract_collection___SimpleCollection___add(variable
[7])(variable
[7], variable
[9]) /*AbstractArray::add*/;
514 variable
[10] = variable
[2] /*help*/;
515 CALL_abstract_collection___SimpleCollection___add(variable
[7])(variable
[7], variable
[10]) /*AbstractArray::add*/;
516 variable
[11] = NEW_String_string___String___with_native(BOX_NativeString(" <"), TAG_Int(2)); /*new String*/
517 variable
[12] = variable
[11];
518 CALL_abstract_collection___SimpleCollection___add(variable
[7])(variable
[7], variable
[12]) /*AbstractArray::add*/;
519 variable
[13] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)); /*new String*/
520 variable
[13] = CALL_string___Collection___join( variable
[1] /*enum*/)( variable
[1] /*enum*/, variable
[13]) /*Collection::join*/;
521 variable
[14] = variable
[13];
522 CALL_abstract_collection___SimpleCollection___add(variable
[7])(variable
[7], variable
[14]) /*AbstractArray::add*/;
523 variable
[15] = NEW_String_string___String___with_native(BOX_NativeString(">"), TAG_Int(1)); /*new String*/
524 variable
[16] = variable
[15];
525 CALL_abstract_collection___SimpleCollection___add(variable
[7])(variable
[7], variable
[16]) /*AbstractArray::add*/;
526 variable
[7] = CALL_string___Object___to_s(variable
[7])(variable
[7]) /*Object::to_s*/;
527 CALL_opts___OptionParameter___init_opt(variable
[6])(variable
[6], variable
[7], variable
[3] /*default*/, variable
[4] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
528 return_label17
: while(false);
529 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionEnum
].i
] = 1;
530 tracehead
= trace
.prev
;
533 val_t
opts___OptionInt___convert(val_t self
, val_t param0
) {
534 struct trace_t trace
= {NULL
, NULL
, 162, LOCATE_opts___OptionInt___convert
};
536 void **closurevariable
= NULL
;
537 trace
.prev
= tracehead
; tracehead
= &trace
;
538 trace
.file
= LOCATE_opts
;
540 variable
[1] = param0
;
541 variable
[3] = CALL_string___String___to_i( variable
[1] /*str*/)( variable
[1] /*str*/) /*String::to_i*/;
542 variable
[2] = variable
[3];
544 return_label18
: while(false);
545 tracehead
= trace
.prev
;
548 void opts___OptionInt___init(val_t self
, val_t param0
, val_t param1
, val_t param2
, int* init_table
) {
549 struct trace_t trace
= {NULL
, NULL
, 160, LOCATE_opts___OptionInt___init
};
551 void **closurevariable
= NULL
;
552 trace
.prev
= tracehead
; tracehead
= &trace
;
553 trace
.file
= LOCATE_opts
;
555 variable
[1] = param0
;
556 variable
[2] = param1
;
557 /* check if p<Array[String] with p:String */
558 if (( param2
!=NIT_NULL
) && !VAL_ISA( param2
, COLOR_Array
, ID_Array
)) { fprintf(stderr
, "Cast failled"); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___OptionInt___init
, LOCATE_opts
, 160); nit_exit(1); } /*cast Array[String]*/;
559 variable
[3] = param2
;
560 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionInt
].i
]) return;
561 variable
[5] = variable
[0];
562 CALL_opts___OptionParameter___init_opt(variable
[5])(variable
[5], variable
[1] /*help*/, variable
[2] /*default*/, variable
[3] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
563 return_label19
: while(false);
564 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionInt
].i
] = 1;
565 tracehead
= trace
.prev
;
568 val_t
opts___OptionArray___convert(val_t self
, val_t param0
) {
569 struct trace_t trace
= {NULL
, NULL
, 176, LOCATE_opts___OptionArray___convert
};
571 void **closurevariable
= NULL
;
572 trace
.prev
= tracehead
; tracehead
= &trace
;
573 trace
.file
= LOCATE_opts
;
575 variable
[1] = param0
;
576 variable
[3] = variable
[0];
577 variable
[3] = ATTR_opts___OptionArray____values(variable
[3]) /*OptionArray::_values*/;
578 CALL_abstract_collection___SimpleCollection___add(variable
[3])(variable
[3], variable
[1] /*str*/) /*AbstractArray::add*/;
579 variable
[3] = variable
[0];
580 variable
[3] = ATTR_opts___OptionArray____values(variable
[3]) /*OptionArray::_values*/;
581 variable
[2] = variable
[3];
583 return_label20
: while(false);
584 tracehead
= trace
.prev
;
587 void opts___OptionArray___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
588 struct trace_t trace
= {NULL
, NULL
, 169, LOCATE_opts___OptionArray___init
};
590 void **closurevariable
= NULL
;
591 trace
.prev
= tracehead
; tracehead
= &trace
;
592 trace
.file
= LOCATE_opts
;
594 variable
[1] = param0
;
595 /* check if p<Array[String] with p:String */
596 if (( param1
!=NIT_NULL
) && !VAL_ISA( param1
, COLOR_Array
, ID_Array
)) { fprintf(stderr
, "Cast failled"); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___OptionArray___init
, LOCATE_opts
, 169); nit_exit(1); } /*cast Array[String]*/;
597 variable
[2] = param1
;
598 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionArray
].i
]) return;
599 variable
[4] = variable
[0];
600 variable
[5] = NEW_Array_array___Array___init(); /*new Array[String]*/
601 ATTR_opts___OptionArray____values(variable
[4]) /*OptionArray::_values*/ = variable
[5];
602 variable
[4] = variable
[0];
603 variable
[5] = variable
[0];
604 variable
[5] = ATTR_opts___OptionArray____values(variable
[5]) /*OptionArray::_values*/;
605 CALL_opts___OptionParameter___init_opt(variable
[4])(variable
[4], variable
[1] /*help*/, variable
[5], variable
[2] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
606 return_label21
: while(false);
607 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionArray
].i
] = 1;
608 tracehead
= trace
.prev
;
611 val_t
opts___OptionContext___options(val_t self
) {
612 struct trace_t trace
= {NULL
, NULL
, 184, LOCATE_opts___OptionContext___options
};
613 val_t
*variable
= NULL
;
614 void **closurevariable
= NULL
;
615 trace
.prev
= tracehead
; tracehead
= &trace
;
616 trace
.file
= LOCATE_opts
;
617 tracehead
= trace
.prev
;
618 return ATTR_opts___OptionContext____options( self
) /*OptionContext::_options*/;
620 val_t
opts___OptionContext___rest(val_t self
) {
621 struct trace_t trace
= {NULL
, NULL
, 185, LOCATE_opts___OptionContext___rest
};
622 val_t
*variable
= NULL
;
623 void **closurevariable
= NULL
;
624 trace
.prev
= tracehead
; tracehead
= &trace
;
625 trace
.file
= LOCATE_opts
;
626 tracehead
= trace
.prev
;
627 return ATTR_opts___OptionContext____rest( self
) /*OptionContext::_rest*/;
629 void opts___OptionContext___usage(val_t self
) {
630 struct trace_t trace
= {NULL
, NULL
, 189, LOCATE_opts___OptionContext___usage
};
632 void **closurevariable
= NULL
;
633 trace
.prev
= tracehead
; tracehead
= &trace
;
634 trace
.file
= LOCATE_opts
;
636 variable
[2] = TAG_Int(1);
637 variable
[3] = variable
[0];
638 variable
[3] = ATTR_opts___OptionContext____options(variable
[3]) /*OptionContext::_options*/;
639 variable
[3] = CALL_abstract_collection___Collection___iterator(variable
[3])(variable
[3]) /*AbstractArray::iterator*/;
640 while (true) { /*for*/
641 variable
[4] = CALL_abstract_collection___Iterator___is_ok(variable
[3])(variable
[3]) /*ArrayIterator::is_ok*/;
642 if (!UNTAG_Bool(variable
[4])) break; /*for*/
643 variable
[4] = CALL_abstract_collection___Iterator___item(variable
[3])(variable
[3]) /*ArrayIterator::item*/;
644 variable
[5] = variable
[4];
645 variable
[6] = TAG_Int(3);
646 variable
[7] = CALL_opts___Option___names( variable
[5] /*i*/)( variable
[5] /*i*/) /*Option::names*/;
647 variable
[7] = CALL_abstract_collection___Collection___iterator(variable
[7])(variable
[7]) /*AbstractArray::iterator*/;
648 while (true) { /*for*/
649 variable
[8] = CALL_abstract_collection___Iterator___is_ok(variable
[7])(variable
[7]) /*ArrayIterator::is_ok*/;
650 if (!UNTAG_Bool(variable
[8])) break; /*for*/
651 variable
[8] = CALL_abstract_collection___Iterator___item(variable
[7])(variable
[7]) /*ArrayIterator::item*/;
652 variable
[9] = variable
[8];
653 variable
[10] = CALL_abstract_collection___Collection___length( variable
[9] /*n*/)( variable
[9] /*n*/) /*AbstractArray::length*/;
654 variable
[10] = TAG_Int(UNTAG_Int(variable
[10])+UNTAG_Int( TAG_Int(2)));
655 variable
[6] = TAG_Int(UNTAG_Int(variable
[6])+UNTAG_Int(variable
[10])) /*l*/;
656 continue_24
: while(0);
657 CALL_abstract_collection___Iterator___next(variable
[7])(variable
[7]) /*ArrayIterator::next*/;
660 variable
[7] = TAG_Bool(UNTAG_Int( variable
[2] /*lmax*/)<UNTAG_Int( variable
[6] /*l*/));
661 if (UNTAG_Bool(variable
[7])) { /*if*/
662 variable
[2] = variable
[6] /*l*/ /*lmax=*/;
664 continue_23
: while(0);
665 CALL_abstract_collection___Iterator___next(variable
[3])(variable
[3]) /*ArrayIterator::next*/;
668 variable
[3] = variable
[0];
669 variable
[3] = ATTR_opts___OptionContext____options(variable
[3]) /*OptionContext::_options*/;
670 variable
[3] = CALL_abstract_collection___Collection___iterator(variable
[3])(variable
[3]) /*AbstractArray::iterator*/;
671 while (true) { /*for*/
672 variable
[4] = CALL_abstract_collection___Iterator___is_ok(variable
[3])(variable
[3]) /*ArrayIterator::is_ok*/;
673 if (!UNTAG_Bool(variable
[4])) break; /*for*/
674 variable
[4] = CALL_abstract_collection___Iterator___item(variable
[3])(variable
[3]) /*ArrayIterator::item*/;
675 variable
[5] = variable
[4];
676 variable
[6] = variable
[0];
677 variable
[7] = CALL_opts___Option___pretty( variable
[5] /*i*/)( variable
[5] /*i*/, variable
[2] /*lmax*/) /*Option::pretty*/;
678 CALL_file___Object___print(variable
[6])(variable
[6], variable
[7]) /*Object::print*/;
679 continue_25
: while(0);
680 CALL_abstract_collection___Iterator___next(variable
[3])(variable
[3]) /*ArrayIterator::next*/;
683 return_label22
: while(false);
684 tracehead
= trace
.prev
;
687 void opts___OptionContext___parse(val_t self
, val_t param0
) {
688 struct trace_t trace
= {NULL
, NULL
, 205, LOCATE_opts___OptionContext___parse
};
690 void **closurevariable
= NULL
;
691 trace
.prev
= tracehead
; tracehead
= &trace
;
692 trace
.file
= LOCATE_opts
;
694 variable
[1] = param0
;
695 variable
[4] = CALL_abstract_collection___Collection___iterator( variable
[1] /*argv*/)( variable
[1] /*argv*/) /*Collection::iterator*/;
696 variable
[3] = variable
[4];
697 variable
[4] = variable
[0];
698 CALL_opts___OptionContext___parse_intern(variable
[4])(variable
[4], variable
[3] /*it*/) /*OptionContext::parse_intern*/;
699 return_label26
: while(false);
700 tracehead
= trace
.prev
;
703 void opts___OptionContext___parse_intern(val_t self
, val_t param0
) {
704 struct trace_t trace
= {NULL
, NULL
, 212, LOCATE_opts___OptionContext___parse_intern
};
706 void **closurevariable
= NULL
;
707 trace
.prev
= tracehead
; tracehead
= &trace
;
708 trace
.file
= LOCATE_opts
;
710 variable
[1] = param0
;
711 variable
[3] = TAG_Bool(true);
712 variable
[4] = variable
[0];
713 CALL_opts___OptionContext___build(variable
[4])(variable
[4]) /*OptionContext::build*/;
714 variable
[5] = variable
[0];
715 variable
[5] = ATTR_opts___OptionContext____rest(variable
[5]) /*OptionContext::_rest*/;
716 variable
[4] = variable
[5];
717 while (true) { /*while*/
718 variable
[5] = variable
[3] /*parseargs*/;
719 if (UNTAG_Bool(variable
[5])) { /* and */
720 variable
[5] = CALL_abstract_collection___Iterator___is_ok( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::is_ok*/;
722 if (!UNTAG_Bool(variable
[5])) break; /* while*/
723 variable
[6] = CALL_abstract_collection___Iterator___item( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::item*/;
724 variable
[5] = variable
[6];
725 variable
[6] = NEW_String_string___String___with_native(BOX_NativeString("--"), TAG_Int(2)); /*new String*/
726 variable
[6] = TAG_Bool(( variable
[5] /*str*/ == variable
[6]) || (( variable
[5] /*str*/ != NIT_NULL
) && UNTAG_Bool(CALL_kernel___Object_____eqeq( variable
[5] /*str*/)( variable
[5] /*str*/, variable
[6]) /*String::==*/)));
727 if (UNTAG_Bool(variable
[6])) { /*if*/
728 CALL_abstract_collection___Iterator___next( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::next*/;
729 variable
[6] = CALL_array___Iterator___to_a( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::to_a*/;
730 CALL_abstract_collection___SimpleCollection___add_all( variable
[4] /*rest*/)( variable
[4] /*rest*/, variable
[6]) /*SimpleCollection::add_all*/;
731 variable
[3] = TAG_Bool(false) /*parseargs=*/;
733 variable
[6] = variable
[0];
734 variable
[6] = ATTR_opts___OptionContext____optmap(variable
[6]) /*OptionContext::_optmap*/;
735 variable
[6] = CALL_abstract_collection___Map___has_key(variable
[6])(variable
[6], variable
[5] /*str*/) /*Map::has_key*/;
736 if (UNTAG_Bool(variable
[6])) { /*if*/
737 variable
[7] = variable
[0];
738 variable
[7] = ATTR_opts___OptionContext____optmap(variable
[7]) /*OptionContext::_optmap*/;
739 variable
[7] = CALL_abstract_collection___Map_____bra(variable
[7])(variable
[7], variable
[5] /*str*/) /*Map::[]*/;
740 variable
[6] = variable
[7];
741 CALL_abstract_collection___Iterator___next( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::next*/;
742 CALL_opts___Option___read_param( variable
[6] /*opt*/)( variable
[6] /*opt*/, variable
[1] /*it*/) /*Option::read_param*/;
744 variable
[6] = CALL_abstract_collection___Iterator___item( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::item*/;
745 CALL_abstract_collection___SimpleCollection___add( variable
[4] /*rest*/)( variable
[4] /*rest*/, variable
[6]) /*AbstractArray::add*/;
746 CALL_abstract_collection___Iterator___next( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::next*/;
749 continue_28
: while(0);
752 return_label27
: while(false);
753 tracehead
= trace
.prev
;
756 void opts___OptionContext___add_option(val_t self
, val_t param0
) {
757 struct trace_t trace
= {NULL
, NULL
, 237, LOCATE_opts___OptionContext___add_option
};
759 void **closurevariable
= NULL
;
760 trace
.prev
= tracehead
; tracehead
= &trace
;
761 trace
.file
= LOCATE_opts
;
763 /* check if p<Array[Option] with p:Option */
764 if (( param0
!=NIT_NULL
) && !VAL_ISA( param0
, COLOR_Array
, ID_Array
)) { fprintf(stderr
, "Cast failled"); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___OptionContext___add_option
, LOCATE_opts
, 237); nit_exit(1); } /*cast Array[Option]*/;
765 variable
[1] = param0
;
766 variable
[3] = CALL_abstract_collection___Collection___iterator( variable
[1] /*opts*/)( variable
[1] /*opts*/) /*AbstractArray::iterator*/;
767 while (true) { /*for*/
768 variable
[4] = CALL_abstract_collection___Iterator___is_ok(variable
[3])(variable
[3]) /*ArrayIterator::is_ok*/;
769 if (!UNTAG_Bool(variable
[4])) break; /*for*/
770 variable
[4] = CALL_abstract_collection___Iterator___item(variable
[3])(variable
[3]) /*ArrayIterator::item*/;
771 variable
[5] = variable
[4];
772 variable
[6] = variable
[0];
773 CALL_opts___Option___context__eq( variable
[5] /*opt*/)( variable
[5] /*opt*/, variable
[6]) /*Option::context=*/;
774 variable
[6] = variable
[0];
775 variable
[6] = ATTR_opts___OptionContext____options(variable
[6]) /*OptionContext::_options*/;
776 CALL_abstract_collection___SimpleCollection___add(variable
[6])(variable
[6], variable
[5] /*opt*/) /*AbstractArray::add*/;
777 continue_30
: while(0);
778 CALL_abstract_collection___Iterator___next(variable
[3])(variable
[3]) /*ArrayIterator::next*/;
781 return_label29
: while(false);
782 tracehead
= trace
.prev
;
785 void opts___OptionContext___init(val_t self
, int* init_table
) {
786 struct trace_t trace
= {NULL
, NULL
, 245, LOCATE_opts___OptionContext___init
};
788 void **closurevariable
= NULL
;
789 trace
.prev
= tracehead
; tracehead
= &trace
;
790 trace
.file
= LOCATE_opts
;
792 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionContext
].i
]) return;
793 variable
[2] = variable
[0];
794 variable
[3] = NEW_Array_array___Array___init(); /*new Array[Option]*/
795 ATTR_opts___OptionContext____options(variable
[2]) /*OptionContext::_options*/ = variable
[3];
796 variable
[2] = variable
[0];
797 variable
[3] = NEW_HashMap_hash___HashMap___init(); /*new HashMap[String, Option]*/
798 ATTR_opts___OptionContext____optmap(variable
[2]) /*OptionContext::_optmap*/ = variable
[3];
799 variable
[2] = variable
[0];
800 variable
[3] = NEW_Array_array___Array___init(); /*new Array[String]*/
801 ATTR_opts___OptionContext____rest(variable
[2]) /*OptionContext::_rest*/ = variable
[3];
802 return_label31
: while(false);
803 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionContext
].i
] = 1;
804 tracehead
= trace
.prev
;
807 void opts___OptionContext___build(val_t self
) {
808 struct trace_t trace
= {NULL
, NULL
, 252, LOCATE_opts___OptionContext___build
};
810 void **closurevariable
= NULL
;
811 trace
.prev
= tracehead
; tracehead
= &trace
;
812 trace
.file
= LOCATE_opts
;
814 variable
[2] = variable
[0];
815 variable
[2] = ATTR_opts___OptionContext____options(variable
[2]) /*OptionContext::_options*/;
816 variable
[2] = CALL_abstract_collection___Collection___iterator(variable
[2])(variable
[2]) /*AbstractArray::iterator*/;
817 while (true) { /*for*/
818 variable
[3] = CALL_abstract_collection___Iterator___is_ok(variable
[2])(variable
[2]) /*ArrayIterator::is_ok*/;
819 if (!UNTAG_Bool(variable
[3])) break; /*for*/
820 variable
[3] = CALL_abstract_collection___Iterator___item(variable
[2])(variable
[2]) /*ArrayIterator::item*/;
821 variable
[4] = variable
[3];
822 variable
[5] = CALL_opts___Option___names( variable
[4] /*o*/)( variable
[4] /*o*/) /*Option::names*/;
823 variable
[5] = CALL_abstract_collection___Collection___iterator(variable
[5])(variable
[5]) /*AbstractArray::iterator*/;
824 while (true) { /*for*/
825 variable
[6] = CALL_abstract_collection___Iterator___is_ok(variable
[5])(variable
[5]) /*ArrayIterator::is_ok*/;
826 if (!UNTAG_Bool(variable
[6])) break; /*for*/
827 variable
[6] = CALL_abstract_collection___Iterator___item(variable
[5])(variable
[5]) /*ArrayIterator::item*/;
828 variable
[7] = variable
[6];
829 variable
[8] = variable
[0];
830 variable
[8] = ATTR_opts___OptionContext____optmap(variable
[8]) /*OptionContext::_optmap*/;
831 CALL_abstract_collection___Map_____braeq(variable
[8])(variable
[8], variable
[7] /*n*/, variable
[4] /*o*/) /*Map::[]=*/;
832 continue_34
: while(0);
833 CALL_abstract_collection___Iterator___next(variable
[5])(variable
[5]) /*ArrayIterator::next*/;
836 continue_33
: while(0);
837 CALL_abstract_collection___Iterator___next(variable
[2])(variable
[2]) /*ArrayIterator::next*/;
840 return_label32
: while(false);
841 tracehead
= trace
.prev
;