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] = ((opts___Option___pretty_t
)CALL(variable
[2],COLOR_opts___Option___pretty
))(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( self
)->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(((array___AbstractArray_____eqeq_t
)CALL( variable
[3] /*names*/,COLOR_kernel___Object_____eqeq
))( 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] = ((array___Collection___to_a_t
)CALL( variable
[3] /*names*/,COLOR_array___Collection___to_a
))( 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( self
)->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 ((abstract_collection___SimpleCollection___add_all_t
)CALL(variable
[3],COLOR_abstract_collection___SimpleCollection___add_all
))(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] = ((string___Collection___join_t
)CALL(variable
[4],COLOR_string___Collection___join
))(variable
[4], variable
[5]) /*Collection::join*/;
177 ((string___String___append_t
)CALL( variable
[3] /*text*/,COLOR_abstract_collection___IndexedCollection___append
))( variable
[3] /*text*/, variable
[4]) /*String::append*/;
178 variable
[4] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(2)); /*new String*/
179 ((string___String___append_t
)CALL( variable
[3] /*text*/,COLOR_abstract_collection___IndexedCollection___append
))( variable
[3] /*text*/, variable
[4]) /*String::append*/;
180 variable
[5] = ((array___AbstractArray___length_t
)CALL( variable
[3] /*text*/,COLOR_abstract_collection___Collection___length
))( 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] = ((string___String_____star_t
)CALL(variable
[5],COLOR_string___String_____star
))(variable
[5], variable
[4] /*rest*/) /*String::**/;
187 ((string___String___append_t
)CALL( variable
[3] /*text*/,COLOR_abstract_collection___IndexedCollection___append
))( variable
[3] /*text*/, variable
[5]) /*String::append*/;
189 variable
[5] = variable
[0];
190 variable
[5] = ((opts___Option___helptext_t
)CALL(variable
[5],COLOR_opts___Option___helptext
))(variable
[5]) /*Option::helptext*/;
191 ((string___String___append_t
)CALL( variable
[3] /*text*/,COLOR_abstract_collection___IndexedCollection___append
))( 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] = ((opts___Option___default_value_t
)CALL(variable
[2],COLOR_opts___Option___default_value
))(variable
[2]) /*Option::default_value*/;
207 variable
[2] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable
[2] == NIT_NULL
/*null*/) || ((variable
[2] != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable
[2],COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable
[2], NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable
[2],COLOR_kernel___Object_____eqeq
))(variable
[2], NIT_NULL
/*null*/) /*Object::==*/)))))));
208 if (UNTAG_Bool(variable
[2])) { /*if*/
209 variable
[2] = NEW_String_string___String___init(); /*new String*/
210 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString(" ("), TAG_Int(2)); /*new String*/
211 variable
[4] = variable
[3];
212 ((string___String___append_t
)CALL(variable
[2],COLOR_abstract_collection___IndexedCollection___append
))(variable
[2], variable
[4]) /*String::append*/;
213 variable
[5] = variable
[0];
214 variable
[5] = ((opts___Option___default_value_t
)CALL(variable
[5],COLOR_opts___Option___default_value
))(variable
[5]) /*Option::default_value*/;
215 variable
[6] = variable
[5];
216 variable
[6] = ((string___String___to_s_t
)CALL(variable
[6],COLOR_string___Object___to_s
))(variable
[6]) /*String::to_s*/;
217 ((string___String___append_t
)CALL(variable
[2],COLOR_abstract_collection___IndexedCollection___append
))(variable
[2], variable
[6]) /*String::append*/;
218 variable
[7] = NEW_String_string___String___with_native(BOX_NativeString(")"), TAG_Int(1)); /*new String*/
219 variable
[8] = variable
[7];
220 ((string___String___append_t
)CALL(variable
[2],COLOR_abstract_collection___IndexedCollection___append
))(variable
[2], variable
[8]) /*String::append*/;
221 variable
[1] = variable
[2];
224 variable
[2] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
225 variable
[1] = variable
[2];
227 return_label4
: while(false);
228 tracehead
= trace
.prev
;
231 void opts___Option___read_param(val_t self
, val_t param0
) {
232 struct trace_t trace
= {NULL
, NULL
, 78, LOCATE_opts___Option___read_param
};
233 val_t
*variable
= NULL
;
234 void **closurevariable
= NULL
;
235 trace
.prev
= tracehead
; tracehead
= &trace
;
236 trace
.file
= LOCATE_opts
;
237 fprintf(stderr
, "Deferred method called");
238 fprintf(stderr
, " (%s:%d)\n", LOCATE_opts
, 78);
240 tracehead
= trace
.prev
;
243 val_t
opts___OptionText___to_s(val_t self
) {
244 struct trace_t trace
= {NULL
, NULL
, 88, LOCATE_opts___OptionText___to_s
};
246 void **closurevariable
= NULL
;
247 trace
.prev
= tracehead
; tracehead
= &trace
;
248 trace
.file
= LOCATE_opts
;
250 variable
[2] = variable
[0];
251 variable
[2] = ((opts___Option___helptext_t
)CALL(variable
[2],COLOR_opts___Option___helptext
))(variable
[2]) /*Option::helptext*/;
252 variable
[1] = variable
[2];
254 return_label5
: while(false);
255 tracehead
= trace
.prev
;
258 val_t
opts___OptionText___pretty(val_t self
, val_t param0
) {
259 struct trace_t trace
= {NULL
, NULL
, 86, LOCATE_opts___OptionText___pretty
};
261 void **closurevariable
= NULL
;
262 trace
.prev
= tracehead
; tracehead
= &trace
;
263 trace
.file
= LOCATE_opts
;
265 variable
[1] = param0
;
266 variable
[3] = variable
[0];
267 variable
[3] = ((opts___OptionText___to_s_t
)CALL(variable
[3],COLOR_string___Object___to_s
))(variable
[3]) /*OptionText::to_s*/;
268 variable
[2] = variable
[3];
270 return_label6
: while(false);
271 tracehead
= trace
.prev
;
274 void opts___OptionText___init(val_t self
, val_t param0
, int* init_table
) {
275 struct trace_t trace
= {NULL
, NULL
, 84, LOCATE_opts___OptionText___init
};
277 void **closurevariable
= NULL
;
278 trace
.prev
= tracehead
; tracehead
= &trace
;
279 trace
.file
= LOCATE_opts
;
281 variable
[1] = param0
;
282 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionText
].i
]) return;
283 variable
[3] = variable
[0];
284 ((opts___Option___init_opt_t
)CALL(variable
[3],COLOR_opts___Option___init_opt
))(variable
[3], variable
[1] /*text*/, NIT_NULL
/*null*/, NIT_NULL
/*null*/, init_table
/*YYY*/) /*Option::init_opt*/;
285 return_label7
: while(false);
286 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionText
].i
] = 1;
287 tracehead
= trace
.prev
;
290 void opts___OptionBool___read_param(val_t self
, val_t param0
) {
291 struct trace_t trace
= {NULL
, NULL
, 97, LOCATE_opts___OptionBool___read_param
};
293 void **closurevariable
= NULL
;
294 trace
.prev
= tracehead
; tracehead
= &trace
;
295 trace
.file
= LOCATE_opts
;
297 variable
[1] = param0
;
298 variable
[3] = variable
[0];
299 ((opts___Option___value__eq_t
)CALL(variable
[3],COLOR_opts___Option___value__eq
))(variable
[3], TAG_Bool(true)) /*Option::value=*/;
300 return_label8
: while(false);
301 tracehead
= trace
.prev
;
304 void opts___OptionBool___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
305 struct trace_t trace
= {NULL
, NULL
, 95, LOCATE_opts___OptionBool___init
};
307 void **closurevariable
= NULL
;
308 trace
.prev
= tracehead
; tracehead
= &trace
;
309 trace
.file
= LOCATE_opts
;
311 variable
[1] = param0
;
312 /* check if p<Array[String] with p:String */
313 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]*/;
314 variable
[2] = param1
;
315 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionBool
].i
]) return;
316 variable
[4] = variable
[0];
317 ((opts___Option___init_opt_t
)CALL(variable
[4],COLOR_opts___Option___init_opt
))(variable
[4], variable
[1] /*help*/, TAG_Bool(false), variable
[2] /*names*/, init_table
/*YYY*/) /*Option::init_opt*/;
318 return_label9
: while(false);
319 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionBool
].i
] = 1;
320 tracehead
= trace
.prev
;
323 void opts___OptionParameter___read_param(val_t self
, val_t param0
) {
324 struct trace_t trace
= {NULL
, NULL
, 105, LOCATE_opts___OptionParameter___read_param
};
326 void **closurevariable
= NULL
;
327 trace
.prev
= tracehead
; tracehead
= &trace
;
328 trace
.file
= LOCATE_opts
;
330 variable
[1] = param0
;
331 variable
[3] = variable
[0];
332 variable
[3] = ((opts___Option___context_t
)CALL(variable
[3],COLOR_opts___Option___context
))(variable
[3]) /*Option::context*/;
333 variable
[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable
[3] == NIT_NULL
/*null*/) || ((variable
[3] != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL(variable
[3],COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN(variable
[3], NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL(variable
[3],COLOR_kernel___Object_____eqeq
))(variable
[3], NIT_NULL
/*null*/) /*Object::==*/)))))));
334 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);}
335 variable
[3] = ((abstract_collection___Iterator___is_ok_t
)CALL( variable
[1] /*it*/,COLOR_abstract_collection___Iterator___is_ok
))( variable
[1] /*it*/) /*Iterator::is_ok*/;
336 if (UNTAG_Bool(variable
[3])) { /*if*/
337 variable
[3] = variable
[0];
338 variable
[4] = variable
[0];
339 variable
[5] = ((abstract_collection___Iterator___item_t
)CALL( variable
[1] /*it*/,COLOR_abstract_collection___Iterator___item
))( variable
[1] /*it*/) /*Iterator::item*/;
340 variable
[4] = ((opts___OptionParameter___convert_t
)CALL(variable
[4],COLOR_opts___OptionParameter___convert
))(variable
[4], variable
[5]) /*OptionParameter::convert*/;
341 ((opts___Option___value__eq_t
)CALL(variable
[3],COLOR_opts___Option___value__eq
))(variable
[3], variable
[4]) /*Option::value=*/;
342 ((abstract_collection___Iterator___next_t
)CALL( variable
[1] /*it*/,COLOR_abstract_collection___Iterator___next
))( variable
[1] /*it*/) /*Iterator::next*/;
344 return_label10
: while(false);
345 tracehead
= trace
.prev
;
348 val_t
opts___OptionParameter___convert(val_t self
, val_t param0
) {
349 struct trace_t trace
= {NULL
, NULL
, 103, LOCATE_opts___OptionParameter___convert
};
350 val_t
*variable
= NULL
;
351 void **closurevariable
= NULL
;
352 trace
.prev
= tracehead
; tracehead
= &trace
;
353 trace
.file
= LOCATE_opts
;
354 fprintf(stderr
, "Deferred method called");
355 fprintf(stderr
, " (%s:%d)\n", LOCATE_opts
, 103);
357 tracehead
= trace
.prev
;
360 void opts___OptionParameter___init_opt(val_t self
, val_t param0
, val_t param1
, val_t param2
, int* init_table
) {
361 struct trace_t trace
= {NULL
, NULL
, 116, LOCATE_opts___OptionParameter___init_opt
};
363 void **closurevariable
= NULL
;
364 trace
.prev
= tracehead
; tracehead
= &trace
;
365 trace
.file
= LOCATE_opts
;
367 variable
[1] = param0
;
368 variable
[2] = param1
;
369 variable
[3] = param2
;
370 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionParameter
].i
]) return;
371 ((opts___Option___init_opt_t
)CALL(variable
[0],COLOR_opts___Option___init_opt
))(variable
[0], variable
[1], variable
[2], variable
[3], init_table
/*YYY*/) /*Option::init_opt*/;
372 return_label11
: while(false);
373 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionParameter
].i
] = 1;
374 tracehead
= trace
.prev
;
377 val_t
opts___OptionString___convert(val_t self
, val_t param0
) {
378 struct trace_t trace
= {NULL
, NULL
, 125, LOCATE_opts___OptionString___convert
};
380 void **closurevariable
= NULL
;
381 trace
.prev
= tracehead
; tracehead
= &trace
;
382 trace
.file
= LOCATE_opts
;
384 variable
[1] = param0
;
385 variable
[2] = variable
[1] /*str*/;
387 return_label12
: while(false);
388 tracehead
= trace
.prev
;
391 void opts___OptionString___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
392 struct trace_t trace
= {NULL
, NULL
, 123, LOCATE_opts___OptionString___init
};
394 void **closurevariable
= NULL
;
395 trace
.prev
= tracehead
; tracehead
= &trace
;
396 trace
.file
= LOCATE_opts
;
398 variable
[1] = param0
;
399 /* check if p<Array[String] with p:String */
400 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]*/;
401 variable
[2] = param1
;
402 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionString
].i
]) return;
403 variable
[4] = variable
[0];
404 ((opts___OptionParameter___init_opt_t
)CALL(variable
[4],COLOR_opts___OptionParameter___init_opt
))(variable
[4], variable
[1] /*help*/, NIT_NULL
/*null*/, variable
[2] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
405 return_label13
: while(false);
406 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionString
].i
] = 1;
407 tracehead
= trace
.prev
;
410 val_t
opts___OptionEnum___pretty_default(val_t self
) {
411 struct trace_t trace
= {NULL
, NULL
, 146, LOCATE_opts___OptionEnum___pretty_default
};
413 void **closurevariable
= NULL
;
414 trace
.prev
= tracehead
; tracehead
= &trace
;
415 trace
.file
= LOCATE_opts
;
417 variable
[2] = variable
[0];
418 variable
[2] = ((opts___Option___default_value_t
)CALL(variable
[2],COLOR_opts___Option___default_value
))(variable
[2]) /*Option::default_value*/;
419 variable
[2] = TAG_Bool((variable
[2])!=( NIT_NULL
/*null*/));
420 if (UNTAG_Bool(variable
[2])) { /*if*/
421 variable
[2] = NEW_String_string___String___init(); /*new String*/
422 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString(" ("), TAG_Int(2)); /*new String*/
423 variable
[4] = variable
[3];
424 ((string___String___append_t
)CALL(variable
[2],COLOR_abstract_collection___IndexedCollection___append
))(variable
[2], variable
[4]) /*String::append*/;
425 variable
[5] = variable
[0];
426 variable
[5] = ATTR_opts___OptionEnum____enum(variable
[5]) /*OptionEnum::_enum*/;
427 variable
[6] = variable
[0];
428 variable
[6] = ((opts___Option___default_value_t
)CALL(variable
[6],COLOR_opts___Option___default_value
))(variable
[6]) /*Option::default_value*/;
429 variable
[7] = variable
[5];
430 variable
[8] = variable
[6];
431 variable
[10] = TAG_Bool(UNTAG_Int( variable
[8] /*index*/)>=UNTAG_Int( TAG_Int(0)));
432 variable
[11] = variable
[10];
433 if (UNTAG_Bool(variable
[11])) { /* and */
434 variable
[11] = variable
[7];
435 variable
[11] = ATTR_array___AbstractArray____length(variable
[11]) /*AbstractArray::_length*/;
436 variable
[11] = TAG_Bool(UNTAG_Int( variable
[8] /*index*/)<UNTAG_Int(variable
[11]));
438 variable
[10] = variable
[11];
439 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);}
440 variable
[10] = variable
[7];
441 variable
[10] = ATTR_array___Array____items(variable
[10]) /*Array::_items*/;
442 variable
[10] = UNBOX_NativeArray(variable
[10])[UNTAG_Int( variable
[8] /*index*/)];
443 variable
[9] = variable
[10];
445 return_label15
: while(false);
446 variable
[5] = variable
[9];
447 variable
[6] = variable
[5];
448 ((string___String___append_t
)CALL(variable
[2],COLOR_abstract_collection___IndexedCollection___append
))(variable
[2], variable
[6]) /*String::append*/;
449 variable
[7] = NEW_String_string___String___with_native(BOX_NativeString(")"), TAG_Int(1)); /*new String*/
450 variable
[8] = variable
[7];
451 ((string___String___append_t
)CALL(variable
[2],COLOR_abstract_collection___IndexedCollection___append
))(variable
[2], variable
[8]) /*String::append*/;
452 variable
[1] = variable
[2];
455 variable
[2] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
456 variable
[1] = variable
[2];
459 return_label14
: while(false);
460 tracehead
= trace
.prev
;
463 val_t
opts___OptionEnum___convert(val_t self
, val_t param0
) {
464 struct trace_t trace
= {NULL
, NULL
, 140, LOCATE_opts___OptionEnum___convert
};
466 void **closurevariable
= NULL
;
467 trace
.prev
= tracehead
; tracehead
= &trace
;
468 trace
.file
= LOCATE_opts
;
470 variable
[1] = param0
;
471 variable
[4] = variable
[0];
472 variable
[4] = ATTR_opts___OptionEnum____enum(variable
[4]) /*OptionEnum::_enum*/;
473 variable
[4] = ((array___AbstractArray___index_of_t
)CALL(variable
[4],COLOR_abstract_collection___IndexedCollection___index_of
))(variable
[4], variable
[1] /*str*/) /*AbstractArray::index_of*/;
474 variable
[3] = variable
[4];
475 variable
[2] = variable
[3] /*id*/;
477 return_label16
: while(false);
478 tracehead
= trace
.prev
;
481 void opts___OptionEnum___init(val_t self
, val_t param0
, val_t param1
, val_t param2
, val_t param3
, int* init_table
) {
482 struct trace_t trace
= {NULL
, NULL
, 133, LOCATE_opts___OptionEnum___init
};
484 void **closurevariable
= NULL
;
485 trace
.prev
= tracehead
; tracehead
= &trace
;
486 trace
.file
= LOCATE_opts
;
488 variable
[1] = param0
;
489 variable
[2] = param1
;
490 variable
[3] = param2
;
491 /* check if p<Array[String] with p:String */
492 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]*/;
493 variable
[4] = param3
;
494 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionEnum
].i
]) return;
495 variable
[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable
[1] /*enum*/ == NIT_NULL
/*null*/) || (( variable
[1] /*enum*/ != NIT_NULL
) && ((((kernel___Object_____eqeq_t
)CALL( variable
[1] /*enum*/,COLOR_kernel___Object_____eqeq
))==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable
[1] /*enum*/, NIT_NULL
/*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t
)CALL( variable
[1] /*enum*/,COLOR_kernel___Object_____eqeq
))( variable
[1] /*enum*/, NIT_NULL
/*null*/) /*Object::==*/)))))));
496 variable
[7] = variable
[6];
497 if (UNTAG_Bool(variable
[7])) { /* and */
498 variable
[7] = ((array___AbstractArray___length_t
)CALL( variable
[1] /*enum*/,COLOR_abstract_collection___Collection___length
))( variable
[1] /*enum*/) /*AbstractArray::length*/;
499 variable
[7] = TAG_Bool(UNTAG_Int(variable
[7])>UNTAG_Int( TAG_Int(0)));
501 variable
[6] = variable
[7];
502 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);}
503 variable
[6] = variable
[0];
504 variable
[7] = ((array___Collection___to_a_t
)CALL( variable
[1] /*enum*/,COLOR_array___Collection___to_a
))( variable
[1] /*enum*/) /*Collection::to_a*/;
505 ATTR_opts___OptionEnum____enum(variable
[6]) /*OptionEnum::_enum*/ = variable
[7];
506 variable
[6] = variable
[0];
507 variable
[7] = NEW_String_string___String___init(); /*new String*/
508 variable
[8] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
509 variable
[9] = variable
[8];
510 ((string___String___append_t
)CALL(variable
[7],COLOR_abstract_collection___IndexedCollection___append
))(variable
[7], variable
[9]) /*String::append*/;
511 variable
[10] = variable
[2] /*help*/;
512 ((string___String___append_t
)CALL(variable
[7],COLOR_abstract_collection___IndexedCollection___append
))(variable
[7], variable
[10]) /*String::append*/;
513 variable
[11] = NEW_String_string___String___with_native(BOX_NativeString(" <"), TAG_Int(2)); /*new String*/
514 variable
[12] = variable
[11];
515 ((string___String___append_t
)CALL(variable
[7],COLOR_abstract_collection___IndexedCollection___append
))(variable
[7], variable
[12]) /*String::append*/;
516 variable
[13] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)); /*new String*/
517 variable
[13] = ((string___Collection___join_t
)CALL( variable
[1] /*enum*/,COLOR_string___Collection___join
))( variable
[1] /*enum*/, variable
[13]) /*Collection::join*/;
518 variable
[14] = variable
[13];
519 ((string___String___append_t
)CALL(variable
[7],COLOR_abstract_collection___IndexedCollection___append
))(variable
[7], variable
[14]) /*String::append*/;
520 variable
[15] = NEW_String_string___String___with_native(BOX_NativeString(">"), TAG_Int(1)); /*new String*/
521 variable
[16] = variable
[15];
522 ((string___String___append_t
)CALL(variable
[7],COLOR_abstract_collection___IndexedCollection___append
))(variable
[7], variable
[16]) /*String::append*/;
523 ((opts___OptionParameter___init_opt_t
)CALL(variable
[6],COLOR_opts___OptionParameter___init_opt
))(variable
[6], variable
[7], variable
[3] /*default*/, variable
[4] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
524 return_label17
: while(false);
525 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionEnum
].i
] = 1;
526 tracehead
= trace
.prev
;
529 val_t
opts___OptionInt___convert(val_t self
, val_t param0
) {
530 struct trace_t trace
= {NULL
, NULL
, 162, LOCATE_opts___OptionInt___convert
};
532 void **closurevariable
= NULL
;
533 trace
.prev
= tracehead
; tracehead
= &trace
;
534 trace
.file
= LOCATE_opts
;
536 variable
[1] = param0
;
537 variable
[3] = ((string___String___to_i_t
)CALL( variable
[1] /*str*/,COLOR_string___String___to_i
))( variable
[1] /*str*/) /*String::to_i*/;
538 variable
[2] = variable
[3];
540 return_label18
: while(false);
541 tracehead
= trace
.prev
;
544 void opts___OptionInt___init(val_t self
, val_t param0
, val_t param1
, val_t param2
, int* init_table
) {
545 struct trace_t trace
= {NULL
, NULL
, 160, LOCATE_opts___OptionInt___init
};
547 void **closurevariable
= NULL
;
548 trace
.prev
= tracehead
; tracehead
= &trace
;
549 trace
.file
= LOCATE_opts
;
551 variable
[1] = param0
;
552 variable
[2] = param1
;
553 /* check if p<Array[String] with p:String */
554 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]*/;
555 variable
[3] = param2
;
556 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionInt
].i
]) return;
557 variable
[5] = variable
[0];
558 ((opts___OptionParameter___init_opt_t
)CALL(variable
[5],COLOR_opts___OptionParameter___init_opt
))(variable
[5], variable
[1] /*help*/, variable
[2] /*default*/, variable
[3] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
559 return_label19
: while(false);
560 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionInt
].i
] = 1;
561 tracehead
= trace
.prev
;
564 val_t
opts___OptionArray___convert(val_t self
, val_t param0
) {
565 struct trace_t trace
= {NULL
, NULL
, 176, LOCATE_opts___OptionArray___convert
};
567 void **closurevariable
= NULL
;
568 trace
.prev
= tracehead
; tracehead
= &trace
;
569 trace
.file
= LOCATE_opts
;
571 variable
[1] = param0
;
572 variable
[3] = variable
[0];
573 variable
[3] = ATTR_opts___OptionArray____values(variable
[3]) /*OptionArray::_values*/;
574 ((array___AbstractArray___add_t
)CALL(variable
[3],COLOR_abstract_collection___SimpleCollection___add
))(variable
[3], variable
[1] /*str*/) /*AbstractArray::add*/;
575 variable
[3] = variable
[0];
576 variable
[3] = ATTR_opts___OptionArray____values(variable
[3]) /*OptionArray::_values*/;
577 variable
[2] = variable
[3];
579 return_label20
: while(false);
580 tracehead
= trace
.prev
;
583 void opts___OptionArray___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
584 struct trace_t trace
= {NULL
, NULL
, 169, LOCATE_opts___OptionArray___init
};
586 void **closurevariable
= NULL
;
587 trace
.prev
= tracehead
; tracehead
= &trace
;
588 trace
.file
= LOCATE_opts
;
590 variable
[1] = param0
;
591 /* check if p<Array[String] with p:String */
592 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]*/;
593 variable
[2] = param1
;
594 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionArray
].i
]) return;
595 variable
[4] = variable
[0];
596 variable
[5] = NEW_Array_array___Array___init(); /*new Array[String]*/
597 ATTR_opts___OptionArray____values(variable
[4]) /*OptionArray::_values*/ = variable
[5];
598 variable
[4] = variable
[0];
599 variable
[5] = variable
[0];
600 variable
[5] = ATTR_opts___OptionArray____values(variable
[5]) /*OptionArray::_values*/;
601 ((opts___OptionParameter___init_opt_t
)CALL(variable
[4],COLOR_opts___OptionParameter___init_opt
))(variable
[4], variable
[1] /*help*/, variable
[5], variable
[2] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
602 return_label21
: while(false);
603 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionArray
].i
] = 1;
604 tracehead
= trace
.prev
;
607 val_t
opts___OptionContext___options(val_t self
) {
608 struct trace_t trace
= {NULL
, NULL
, 184, LOCATE_opts___OptionContext___options
};
609 val_t
*variable
= NULL
;
610 void **closurevariable
= NULL
;
611 trace
.prev
= tracehead
; tracehead
= &trace
;
612 trace
.file
= LOCATE_opts
;
613 tracehead
= trace
.prev
;
614 return ATTR_opts___OptionContext____options( self
) /*OptionContext::_options*/;
616 val_t
opts___OptionContext___rest(val_t self
) {
617 struct trace_t trace
= {NULL
, NULL
, 185, LOCATE_opts___OptionContext___rest
};
618 val_t
*variable
= NULL
;
619 void **closurevariable
= NULL
;
620 trace
.prev
= tracehead
; tracehead
= &trace
;
621 trace
.file
= LOCATE_opts
;
622 tracehead
= trace
.prev
;
623 return ATTR_opts___OptionContext____rest( self
) /*OptionContext::_rest*/;
625 void opts___OptionContext___usage(val_t self
) {
626 struct trace_t trace
= {NULL
, NULL
, 189, LOCATE_opts___OptionContext___usage
};
628 void **closurevariable
= NULL
;
629 trace
.prev
= tracehead
; tracehead
= &trace
;
630 trace
.file
= LOCATE_opts
;
632 variable
[2] = TAG_Int(1);
633 variable
[3] = variable
[0];
634 variable
[3] = ATTR_opts___OptionContext____options(variable
[3]) /*OptionContext::_options*/;
635 variable
[3] = ((array___AbstractArray___iterator_t
)CALL(variable
[3],COLOR_abstract_collection___Collection___iterator
))(variable
[3]) /*AbstractArray::iterator*/;
636 while (true) { /*for*/
637 variable
[4] = ((array___ArrayIterator___is_ok_t
)CALL(variable
[3],COLOR_abstract_collection___Iterator___is_ok
))(variable
[3]) /*ArrayIterator::is_ok*/;
638 if (!UNTAG_Bool(variable
[4])) break; /*for*/
639 variable
[4] = ((array___ArrayIterator___item_t
)CALL(variable
[3],COLOR_abstract_collection___Iterator___item
))(variable
[3]) /*ArrayIterator::item*/;
640 variable
[5] = variable
[4];
641 variable
[6] = TAG_Int(3);
642 variable
[7] = ((opts___Option___names_t
)CALL( variable
[5] /*i*/,COLOR_opts___Option___names
))( variable
[5] /*i*/) /*Option::names*/;
643 variable
[7] = ((array___AbstractArray___iterator_t
)CALL(variable
[7],COLOR_abstract_collection___Collection___iterator
))(variable
[7]) /*AbstractArray::iterator*/;
644 while (true) { /*for*/
645 variable
[8] = ((array___ArrayIterator___is_ok_t
)CALL(variable
[7],COLOR_abstract_collection___Iterator___is_ok
))(variable
[7]) /*ArrayIterator::is_ok*/;
646 if (!UNTAG_Bool(variable
[8])) break; /*for*/
647 variable
[8] = ((array___ArrayIterator___item_t
)CALL(variable
[7],COLOR_abstract_collection___Iterator___item
))(variable
[7]) /*ArrayIterator::item*/;
648 variable
[9] = variable
[8];
649 variable
[10] = ((array___AbstractArray___length_t
)CALL( variable
[9] /*n*/,COLOR_abstract_collection___Collection___length
))( variable
[9] /*n*/) /*AbstractArray::length*/;
650 variable
[10] = TAG_Int(UNTAG_Int(variable
[10])+UNTAG_Int( TAG_Int(2)));
651 variable
[6] = TAG_Int(UNTAG_Int(variable
[6])+UNTAG_Int(variable
[10])) /*l*/;
652 continue_24
: while(0);
653 ((array___ArrayIterator___next_t
)CALL(variable
[7],COLOR_abstract_collection___Iterator___next
))(variable
[7]) /*ArrayIterator::next*/;
656 variable
[7] = TAG_Bool(UNTAG_Int( variable
[2] /*lmax*/)<UNTAG_Int( variable
[6] /*l*/));
657 if (UNTAG_Bool(variable
[7])) { /*if*/
658 variable
[2] = variable
[6] /*l*/ /*lmax=*/;
660 continue_23
: while(0);
661 ((array___ArrayIterator___next_t
)CALL(variable
[3],COLOR_abstract_collection___Iterator___next
))(variable
[3]) /*ArrayIterator::next*/;
664 variable
[3] = variable
[0];
665 variable
[3] = ATTR_opts___OptionContext____options(variable
[3]) /*OptionContext::_options*/;
666 variable
[3] = ((array___AbstractArray___iterator_t
)CALL(variable
[3],COLOR_abstract_collection___Collection___iterator
))(variable
[3]) /*AbstractArray::iterator*/;
667 while (true) { /*for*/
668 variable
[4] = ((array___ArrayIterator___is_ok_t
)CALL(variable
[3],COLOR_abstract_collection___Iterator___is_ok
))(variable
[3]) /*ArrayIterator::is_ok*/;
669 if (!UNTAG_Bool(variable
[4])) break; /*for*/
670 variable
[4] = ((array___ArrayIterator___item_t
)CALL(variable
[3],COLOR_abstract_collection___Iterator___item
))(variable
[3]) /*ArrayIterator::item*/;
671 variable
[5] = variable
[4];
672 variable
[6] = variable
[0];
673 variable
[7] = ((opts___Option___pretty_t
)CALL( variable
[5] /*i*/,COLOR_opts___Option___pretty
))( variable
[5] /*i*/, variable
[2] /*lmax*/) /*Option::pretty*/;
674 ((file___Object___print_t
)CALL(variable
[6],COLOR_file___Object___print
))(variable
[6], variable
[7]) /*Object::print*/;
675 continue_25
: while(0);
676 ((array___ArrayIterator___next_t
)CALL(variable
[3],COLOR_abstract_collection___Iterator___next
))(variable
[3]) /*ArrayIterator::next*/;
679 return_label22
: while(false);
680 tracehead
= trace
.prev
;
683 void opts___OptionContext___parse(val_t self
, val_t param0
) {
684 struct trace_t trace
= {NULL
, NULL
, 205, LOCATE_opts___OptionContext___parse
};
686 void **closurevariable
= NULL
;
687 trace
.prev
= tracehead
; tracehead
= &trace
;
688 trace
.file
= LOCATE_opts
;
690 variable
[1] = param0
;
691 variable
[4] = ((abstract_collection___Collection___iterator_t
)CALL( variable
[1] /*argv*/,COLOR_abstract_collection___Collection___iterator
))( variable
[1] /*argv*/) /*Collection::iterator*/;
692 variable
[3] = variable
[4];
693 variable
[4] = variable
[0];
694 ((opts___OptionContext___parse_intern_t
)CALL(variable
[4],COLOR_opts___OptionContext___parse_intern
))(variable
[4], variable
[3] /*it*/) /*OptionContext::parse_intern*/;
695 return_label26
: while(false);
696 tracehead
= trace
.prev
;
699 void opts___OptionContext___parse_intern(val_t self
, val_t param0
) {
700 struct trace_t trace
= {NULL
, NULL
, 212, LOCATE_opts___OptionContext___parse_intern
};
702 void **closurevariable
= NULL
;
703 trace
.prev
= tracehead
; tracehead
= &trace
;
704 trace
.file
= LOCATE_opts
;
706 variable
[1] = param0
;
707 variable
[3] = TAG_Bool(true);
708 variable
[4] = variable
[0];
709 ((opts___OptionContext___build_t
)CALL(variable
[4],COLOR_opts___OptionContext___build
))(variable
[4]) /*OptionContext::build*/;
710 variable
[5] = variable
[0];
711 variable
[5] = ATTR_opts___OptionContext____rest(variable
[5]) /*OptionContext::_rest*/;
712 variable
[4] = variable
[5];
713 while (true) { /*while*/
714 variable
[5] = variable
[3] /*parseargs*/;
715 if (UNTAG_Bool(variable
[5])) { /* and */
716 variable
[5] = ((abstract_collection___Iterator___is_ok_t
)CALL( variable
[1] /*it*/,COLOR_abstract_collection___Iterator___is_ok
))( variable
[1] /*it*/) /*Iterator::is_ok*/;
718 if (!UNTAG_Bool(variable
[5])) break; /* while*/
719 variable
[6] = ((abstract_collection___Iterator___item_t
)CALL( variable
[1] /*it*/,COLOR_abstract_collection___Iterator___item
))( variable
[1] /*it*/) /*Iterator::item*/;
720 variable
[5] = variable
[6];
721 variable
[6] = NEW_String_string___String___with_native(BOX_NativeString("--"), TAG_Int(2)); /*new String*/
722 variable
[6] = TAG_Bool(( variable
[5] /*str*/ == variable
[6]) || (( variable
[5] /*str*/ != NIT_NULL
) && UNTAG_Bool(((string___String_____eqeq_t
)CALL( variable
[5] /*str*/,COLOR_kernel___Object_____eqeq
))( variable
[5] /*str*/, variable
[6]) /*String::==*/)));
723 if (UNTAG_Bool(variable
[6])) { /*if*/
724 ((abstract_collection___Iterator___next_t
)CALL( variable
[1] /*it*/,COLOR_abstract_collection___Iterator___next
))( variable
[1] /*it*/) /*Iterator::next*/;
725 variable
[6] = ((array___Iterator___to_a_t
)CALL( variable
[1] /*it*/,COLOR_array___Iterator___to_a
))( variable
[1] /*it*/) /*Iterator::to_a*/;
726 ((abstract_collection___SimpleCollection___add_all_t
)CALL( variable
[4] /*rest*/,COLOR_abstract_collection___SimpleCollection___add_all
))( variable
[4] /*rest*/, variable
[6]) /*SimpleCollection::add_all*/;
727 variable
[3] = TAG_Bool(false) /*parseargs=*/;
729 variable
[6] = variable
[0];
730 variable
[6] = ATTR_opts___OptionContext____optmap(variable
[6]) /*OptionContext::_optmap*/;
731 variable
[6] = ((abstract_collection___Map___has_key_t
)CALL(variable
[6],COLOR_abstract_collection___Map___has_key
))(variable
[6], variable
[5] /*str*/) /*Map::has_key*/;
732 if (UNTAG_Bool(variable
[6])) { /*if*/
733 variable
[7] = variable
[0];
734 variable
[7] = ATTR_opts___OptionContext____optmap(variable
[7]) /*OptionContext::_optmap*/;
735 variable
[7] = ((abstract_collection___Map_____bra_t
)CALL(variable
[7],COLOR_abstract_collection___Map_____bra
))(variable
[7], variable
[5] /*str*/) /*Map::[]*/;
736 variable
[6] = variable
[7];
737 ((abstract_collection___Iterator___next_t
)CALL( variable
[1] /*it*/,COLOR_abstract_collection___Iterator___next
))( variable
[1] /*it*/) /*Iterator::next*/;
738 ((opts___Option___read_param_t
)CALL( variable
[6] /*opt*/,COLOR_opts___Option___read_param
))( variable
[6] /*opt*/, variable
[1] /*it*/) /*Option::read_param*/;
740 variable
[6] = ((abstract_collection___Iterator___item_t
)CALL( variable
[1] /*it*/,COLOR_abstract_collection___Iterator___item
))( variable
[1] /*it*/) /*Iterator::item*/;
741 ((array___AbstractArray___add_t
)CALL( variable
[4] /*rest*/,COLOR_abstract_collection___SimpleCollection___add
))( variable
[4] /*rest*/, variable
[6]) /*AbstractArray::add*/;
742 ((abstract_collection___Iterator___next_t
)CALL( variable
[1] /*it*/,COLOR_abstract_collection___Iterator___next
))( variable
[1] /*it*/) /*Iterator::next*/;
745 continue_28
: while(0);
748 return_label27
: while(false);
749 tracehead
= trace
.prev
;
752 void opts___OptionContext___add_option(val_t self
, val_t param0
) {
753 struct trace_t trace
= {NULL
, NULL
, 237, LOCATE_opts___OptionContext___add_option
};
755 void **closurevariable
= NULL
;
756 trace
.prev
= tracehead
; tracehead
= &trace
;
757 trace
.file
= LOCATE_opts
;
759 /* check if p<Array[Option] with p:Option */
760 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]*/;
761 variable
[1] = param0
;
762 variable
[3] = ((array___AbstractArray___iterator_t
)CALL( variable
[1] /*opts*/,COLOR_abstract_collection___Collection___iterator
))( variable
[1] /*opts*/) /*AbstractArray::iterator*/;
763 while (true) { /*for*/
764 variable
[4] = ((array___ArrayIterator___is_ok_t
)CALL(variable
[3],COLOR_abstract_collection___Iterator___is_ok
))(variable
[3]) /*ArrayIterator::is_ok*/;
765 if (!UNTAG_Bool(variable
[4])) break; /*for*/
766 variable
[4] = ((array___ArrayIterator___item_t
)CALL(variable
[3],COLOR_abstract_collection___Iterator___item
))(variable
[3]) /*ArrayIterator::item*/;
767 variable
[5] = variable
[4];
768 variable
[6] = variable
[0];
769 ((opts___Option___context__eq_t
)CALL( variable
[5] /*opt*/,COLOR_opts___Option___context__eq
))( variable
[5] /*opt*/, variable
[6]) /*Option::context=*/;
770 variable
[6] = variable
[0];
771 variable
[6] = ATTR_opts___OptionContext____options(variable
[6]) /*OptionContext::_options*/;
772 ((array___AbstractArray___add_t
)CALL(variable
[6],COLOR_abstract_collection___SimpleCollection___add
))(variable
[6], variable
[5] /*opt*/) /*AbstractArray::add*/;
773 continue_30
: while(0);
774 ((array___ArrayIterator___next_t
)CALL(variable
[3],COLOR_abstract_collection___Iterator___next
))(variable
[3]) /*ArrayIterator::next*/;
777 return_label29
: while(false);
778 tracehead
= trace
.prev
;
781 void opts___OptionContext___init(val_t self
, int* init_table
) {
782 struct trace_t trace
= {NULL
, NULL
, 245, LOCATE_opts___OptionContext___init
};
784 void **closurevariable
= NULL
;
785 trace
.prev
= tracehead
; tracehead
= &trace
;
786 trace
.file
= LOCATE_opts
;
788 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionContext
].i
]) return;
789 variable
[2] = variable
[0];
790 variable
[3] = NEW_Array_array___Array___init(); /*new Array[Option]*/
791 ATTR_opts___OptionContext____options(variable
[2]) /*OptionContext::_options*/ = variable
[3];
792 variable
[2] = variable
[0];
793 variable
[3] = NEW_HashMap_hash___HashMap___init(); /*new HashMap[String, Option]*/
794 ATTR_opts___OptionContext____optmap(variable
[2]) /*OptionContext::_optmap*/ = variable
[3];
795 variable
[2] = variable
[0];
796 variable
[3] = NEW_Array_array___Array___init(); /*new Array[String]*/
797 ATTR_opts___OptionContext____rest(variable
[2]) /*OptionContext::_rest*/ = variable
[3];
798 return_label31
: while(false);
799 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_OptionContext
].i
] = 1;
800 tracehead
= trace
.prev
;
803 void opts___OptionContext___build(val_t self
) {
804 struct trace_t trace
= {NULL
, NULL
, 252, LOCATE_opts___OptionContext___build
};
806 void **closurevariable
= NULL
;
807 trace
.prev
= tracehead
; tracehead
= &trace
;
808 trace
.file
= LOCATE_opts
;
810 variable
[2] = variable
[0];
811 variable
[2] = ATTR_opts___OptionContext____options(variable
[2]) /*OptionContext::_options*/;
812 variable
[2] = ((array___AbstractArray___iterator_t
)CALL(variable
[2],COLOR_abstract_collection___Collection___iterator
))(variable
[2]) /*AbstractArray::iterator*/;
813 while (true) { /*for*/
814 variable
[3] = ((array___ArrayIterator___is_ok_t
)CALL(variable
[2],COLOR_abstract_collection___Iterator___is_ok
))(variable
[2]) /*ArrayIterator::is_ok*/;
815 if (!UNTAG_Bool(variable
[3])) break; /*for*/
816 variable
[3] = ((array___ArrayIterator___item_t
)CALL(variable
[2],COLOR_abstract_collection___Iterator___item
))(variable
[2]) /*ArrayIterator::item*/;
817 variable
[4] = variable
[3];
818 variable
[5] = ((opts___Option___names_t
)CALL( variable
[4] /*o*/,COLOR_opts___Option___names
))( variable
[4] /*o*/) /*Option::names*/;
819 variable
[5] = ((array___AbstractArray___iterator_t
)CALL(variable
[5],COLOR_abstract_collection___Collection___iterator
))(variable
[5]) /*AbstractArray::iterator*/;
820 while (true) { /*for*/
821 variable
[6] = ((array___ArrayIterator___is_ok_t
)CALL(variable
[5],COLOR_abstract_collection___Iterator___is_ok
))(variable
[5]) /*ArrayIterator::is_ok*/;
822 if (!UNTAG_Bool(variable
[6])) break; /*for*/
823 variable
[6] = ((array___ArrayIterator___item_t
)CALL(variable
[5],COLOR_abstract_collection___Iterator___item
))(variable
[5]) /*ArrayIterator::item*/;
824 variable
[7] = variable
[6];
825 variable
[8] = variable
[0];
826 variable
[8] = ATTR_opts___OptionContext____optmap(variable
[8]) /*OptionContext::_optmap*/;
827 ((abstract_collection___Map_____braeq_t
)CALL(variable
[8],COLOR_abstract_collection___Map_____braeq
))(variable
[8], variable
[7] /*n*/, variable
[4] /*o*/) /*Map::[]=*/;
828 continue_34
: while(0);
829 ((array___ArrayIterator___next_t
)CALL(variable
[5],COLOR_abstract_collection___Iterator___next
))(variable
[5]) /*ArrayIterator::next*/;
832 continue_33
: while(0);
833 ((array___ArrayIterator___next_t
)CALL(variable
[2],COLOR_abstract_collection___Iterator___next
))(variable
[2]) /*ArrayIterator::next*/;
836 return_label32
: while(false);
837 tracehead
= trace
.prev
;