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 struct WBT_
**closurevariable
= NULL
;
7 trace
.prev
= tracehead
; tracehead
= &trace
;
8 trace
.file
= LOCATE_opts
;
9 /* Register variable[0]: Local variable */
11 /* Register variable[1]: Method return value and escape marker */
12 /* Register variable[2]: Result */
13 variable
[2] = CALL_opts___Option___pretty(variable
[0])(variable
[0], TAG_Int(2)) /*Option::pretty*/;
14 variable
[1] = variable
[2];
16 return_label0
: while(false);
17 tracehead
= trace
.prev
;
20 val_t
opts___Option___names(val_t self
) {
21 struct trace_t trace
= {NULL
, NULL
, 16, LOCATE_opts___Option___names
};
22 val_t
*variable
= NULL
;
23 struct WBT_
**closurevariable
= NULL
;
24 trace
.prev
= tracehead
; tracehead
= &trace
;
25 trace
.file
= LOCATE_opts
;
26 tracehead
= trace
.prev
;
27 return ATTR_opts___Option____names( self
) /*Option::_names*/;
29 val_t
opts___Option___helptext(val_t self
) {
30 struct trace_t trace
= {NULL
, NULL
, 22, LOCATE_opts___Option___helptext
};
31 val_t
*variable
= NULL
;
32 struct WBT_
**closurevariable
= NULL
;
33 trace
.prev
= tracehead
; tracehead
= &trace
;
34 trace
.file
= LOCATE_opts
;
35 tracehead
= trace
.prev
;
36 return ATTR_opts___Option____helptext( self
) /*Option::_helptext*/;
38 val_t
opts___Option___mandatory(val_t self
) {
39 struct trace_t trace
= {NULL
, NULL
, 25, LOCATE_opts___Option___mandatory
};
40 val_t
*variable
= NULL
;
41 struct WBT_
**closurevariable
= NULL
;
42 trace
.prev
= tracehead
; tracehead
= &trace
;
43 trace
.file
= LOCATE_opts
;
44 tracehead
= trace
.prev
;
45 return ATTR_opts___Option____mandatory( self
) /*Option::_mandatory*/;
47 void opts___Option___mandatory__eq(val_t self
, val_t param0
) {
48 struct trace_t trace
= {NULL
, NULL
, 25, LOCATE_opts___Option___mandatory__eq
};
49 val_t
*variable
= NULL
;
50 struct WBT_
**closurevariable
= NULL
;
51 trace
.prev
= tracehead
; tracehead
= &trace
;
52 trace
.file
= LOCATE_opts
;
53 ATTR_opts___Option____mandatory( self
) /*Option::_mandatory*/ = param0
;
54 tracehead
= trace
.prev
;
57 val_t
opts___Option___context(val_t self
) {
58 struct trace_t trace
= {NULL
, NULL
, 28, LOCATE_opts___Option___context
};
59 val_t
*variable
= NULL
;
60 struct WBT_
**closurevariable
= NULL
;
61 trace
.prev
= tracehead
; tracehead
= &trace
;
62 trace
.file
= LOCATE_opts
;
63 tracehead
= trace
.prev
;
64 return ATTR_opts___Option____context( self
) /*Option::_context*/;
66 void opts___Option___context__eq(val_t self
, val_t param0
) {
67 struct trace_t trace
= {NULL
, NULL
, 28, LOCATE_opts___Option___context__eq
};
68 val_t
*variable
= NULL
;
69 struct WBT_
**closurevariable
= NULL
;
70 trace
.prev
= tracehead
; tracehead
= &trace
;
71 trace
.file
= LOCATE_opts
;
72 ATTR_opts___Option____context( self
) /*Option::_context*/ = param0
;
73 tracehead
= trace
.prev
;
76 val_t
opts___Option___value(val_t self
) {
77 struct trace_t trace
= {NULL
, NULL
, 31, LOCATE_opts___Option___value
};
78 val_t
*variable
= NULL
;
79 struct WBT_
**closurevariable
= NULL
;
80 trace
.prev
= tracehead
; tracehead
= &trace
;
81 trace
.file
= LOCATE_opts
;
82 tracehead
= trace
.prev
;
83 return ATTR_opts___Option____value( self
) /*Option::_value*/;
85 void opts___Option___value__eq(val_t self
, val_t param0
) {
86 struct trace_t trace
= {NULL
, NULL
, 31, LOCATE_opts___Option___value__eq
};
87 val_t
*variable
= NULL
;
88 struct WBT_
**closurevariable
= NULL
;
89 trace
.prev
= tracehead
; tracehead
= &trace
;
90 trace
.file
= LOCATE_opts
;
91 ATTR_opts___Option____value( self
) /*Option::_value*/ = param0
;
92 tracehead
= trace
.prev
;
95 val_t
opts___Option___default_value(val_t self
) {
96 struct trace_t trace
= {NULL
, NULL
, 34, LOCATE_opts___Option___default_value
};
97 val_t
*variable
= NULL
;
98 struct WBT_
**closurevariable
= NULL
;
99 trace
.prev
= tracehead
; tracehead
= &trace
;
100 trace
.file
= LOCATE_opts
;
101 tracehead
= trace
.prev
;
102 return ATTR_opts___Option____default_value( self
) /*Option::_default_value*/;
104 void opts___Option___default_value__eq(val_t self
, val_t param0
) {
105 struct trace_t trace
= {NULL
, NULL
, 34, LOCATE_opts___Option___default_value__eq
};
106 val_t
*variable
= NULL
;
107 struct WBT_
**closurevariable
= NULL
;
108 trace
.prev
= tracehead
; tracehead
= &trace
;
109 trace
.file
= LOCATE_opts
;
110 ATTR_opts___Option____default_value( self
) /*Option::_default_value*/ = param0
;
111 tracehead
= trace
.prev
;
114 void opts___Option___init_opt(val_t self
, val_t param0
, val_t param1
, val_t param2
, int* init_table
) {
115 struct trace_t trace
= {NULL
, NULL
, 37, LOCATE_opts___Option___init_opt
};
117 struct WBT_
**closurevariable
= NULL
;
118 trace
.prev
= tracehead
; tracehead
= &trace
;
119 trace
.file
= LOCATE_opts
;
120 /* Register variable[0]: Local variable */
122 /* Register variable[1]: Local variable */
123 variable
[1] = param0
;
124 /* Register variable[2]: Local variable */
125 variable
[2] = param1
;
126 /* Register variable[3]: Local variable */
127 variable
[3] = param2
;
128 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Option
].i
]) return;
129 /* Register variable[4]: Method return value and escape marker */
130 /* Register variable[5]: Result */
131 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*/) /*AbstractArrayRead::==*/)));
132 if (UNTAG_Bool(variable
[5])) { /*if*/
133 /* Register variable[5]: Result */
134 variable
[5] = NEW_Array_array___Array___init() /*new Array[String]*/;
135 ATTR_opts___Option____names(variable
[0]) /*Option::_names*/ = variable
[5];
137 /* Register variable[5]: Result */
138 variable
[5] = CALL_array___Collection___to_a( variable
[3] /*names*/)( variable
[3] /*names*/) /*Collection::to_a*/;
139 ATTR_opts___Option____names(variable
[0]) /*Option::_names*/ = variable
[5];
141 ATTR_opts___Option____helptext(variable
[0]) /*Option::_helptext*/ = variable
[1] /*help*/;
142 ATTR_opts___Option____mandatory(variable
[0]) /*Option::_mandatory*/ = TAG_Bool(false);
143 ATTR_opts___Option____default_value(variable
[0]) /*Option::_default_value*/ = variable
[2] /*default*/;
144 ATTR_opts___Option____value(variable
[0]) /*Option::_value*/ = variable
[2] /*default*/;
145 return_label1
: while(false);
146 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Option
].i
] = 1;
147 tracehead
= trace
.prev
;
150 void opts___Option___add_aliases(val_t self
, val_t param0
) {
151 struct trace_t trace
= {NULL
, NULL
, 51, LOCATE_opts___Option___add_aliases
};
153 struct WBT_
**closurevariable
= NULL
;
154 trace
.prev
= tracehead
; tracehead
= &trace
;
155 trace
.file
= LOCATE_opts
;
156 /* Register variable[0]: Local variable */
158 /* Register variable[1]: Local variable */
159 /* check if p<Array[String] with p:String */
160 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]*/;
161 variable
[1] = param0
;
162 /* Register variable[2]: Method return value and escape marker */
163 /* Register variable[3]: Result */
164 variable
[3] = ATTR_opts___Option____names(variable
[0]) /*Option::_names*/;
165 CALL_abstract_collection___SimpleCollection___add_all(variable
[3])(variable
[3], variable
[1] /*names*/) /*SimpleCollection::add_all*/;
166 return_label2
: while(false);
167 tracehead
= trace
.prev
;
170 val_t
opts___Option___pretty(val_t self
, val_t param0
) {
171 struct trace_t trace
= {NULL
, NULL
, 57, LOCATE_opts___Option___pretty
};
172 static val_t once_value_4
= NIT_NULL
; /* Once value for string variable[4]*/
173 static val_t once_value_5
= NIT_NULL
; /* Once value for string variable[5]*/
174 static val_t once_value_6
= NIT_NULL
; /* Once value for string variable[4]*/
175 static val_t once_value_7
= NIT_NULL
; /* Once value for string variable[5]*/
177 struct WBT_
**closurevariable
= NULL
;
178 trace
.prev
= tracehead
; tracehead
= &trace
;
179 trace
.file
= LOCATE_opts
;
180 /* Register variable[0]: Local variable */
182 /* Register variable[1]: Local variable */
183 variable
[1] = param0
;
184 /* Register variable[2]: Method return value and escape marker */
185 /* Register variable[3]: Local variable */
186 /* Register variable[4]: Once String constant */
187 if (once_value_4
!= NIT_NULL
) variable
[4] = once_value_4
;
189 variable
[4] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(2)) /*new String*/;
190 once_value_4
= variable
[4];
192 /* Register variable[4]: Result */
193 /* Register variable[4]: Result */
194 variable
[4] = NEW_Buffer_string___Buffer___from(variable
[4]) /*new Buffer*/;
195 variable
[3] = variable
[4];
196 /* Register variable[4]: Result */
197 variable
[4] = ATTR_opts___Option____names(variable
[0]) /*Option::_names*/;
198 /* Register variable[5]: Once String constant */
199 if (once_value_5
!= NIT_NULL
) variable
[5] = once_value_5
;
201 variable
[5] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)) /*new String*/;
202 once_value_5
= variable
[5];
204 /* Register variable[5]: Result */
205 /* Register variable[4]: Result */
206 variable
[4] = CALL_string___Collection___join(variable
[4])(variable
[4], variable
[5]) /*Collection::join*/;
207 CALL_abstract_collection___IndexedCollection___append( variable
[3] /*text*/)( variable
[3] /*text*/, variable
[4]) /*Buffer::append*/;
208 /* Register variable[4]: Once String constant */
209 if (once_value_6
!= NIT_NULL
) variable
[4] = once_value_6
;
211 variable
[4] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(2)) /*new String*/;
212 once_value_6
= variable
[4];
214 /* Register variable[4]: Result */
215 CALL_abstract_collection___IndexedCollection___append( variable
[3] /*text*/)( variable
[3] /*text*/, variable
[4]) /*Buffer::append*/;
216 /* Register variable[4]: Local variable */
217 /* Register variable[5]: Result */
218 variable
[5] = CALL_abstract_collection___Collection___length( variable
[3] /*text*/)( variable
[3] /*text*/) /*AbstractArrayRead::length*/;
219 /* Register variable[5]: Result */
220 variable
[5] = TAG_Int(UNTAG_Int( variable
[1] /*off*/)-UNTAG_Int(variable
[5]));
221 variable
[4] = variable
[5];
222 /* Register variable[5]: Result */
223 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*rest*/)>UNTAG_Int( TAG_Int(0)));
224 if (UNTAG_Bool(variable
[5])) { /*if*/
225 /* Register variable[5]: Once String constant */
226 if (once_value_7
!= NIT_NULL
) variable
[5] = once_value_7
;
228 variable
[5] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)) /*new String*/;
229 once_value_7
= variable
[5];
231 /* Register variable[5]: Result */
232 /* Register variable[5]: Result */
233 variable
[5] = CALL_string___String_____star(variable
[5])(variable
[5], variable
[4] /*rest*/) /*String::**/;
234 CALL_abstract_collection___IndexedCollection___append( variable
[3] /*text*/)( variable
[3] /*text*/, variable
[5]) /*Buffer::append*/;
236 /* Register variable[5]: Result */
237 variable
[5] = CALL_opts___Option___helptext(variable
[0])(variable
[0]) /*Option::helptext*/;
238 CALL_abstract_collection___IndexedCollection___append( variable
[3] /*text*/)( variable
[3] /*text*/, variable
[5]) /*Buffer::append*/;
239 /* Register variable[5]: Result */
240 variable
[5] = CALL_string___Object___to_s( variable
[3] /*text*/)( variable
[3] /*text*/) /*Buffer::to_s*/;
241 variable
[2] = variable
[5];
243 return_label3
: while(false);
244 tracehead
= trace
.prev
;
247 val_t
opts___Option___pretty_default(val_t self
) {
248 struct trace_t trace
= {NULL
, NULL
, 70, LOCATE_opts___Option___pretty_default
};
249 static val_t once_value_9
= NIT_NULL
; /* Once value for string variable[3]*/
250 static val_t once_value_10
= NIT_NULL
; /* Once value for string variable[3]*/
251 static val_t once_value_11
= NIT_NULL
; /* Once value for string variable[2]*/
253 struct WBT_
**closurevariable
= NULL
;
254 trace
.prev
= tracehead
; tracehead
= &trace
;
255 trace
.file
= LOCATE_opts
;
256 /* Register variable[0]: Local variable */
258 /* Register variable[1]: Method return value and escape marker */
259 /* Register variable[2]: Result */
260 variable
[2] = CALL_opts___Option___default_value(variable
[0])(variable
[0]) /*Option::default_value*/;
261 /* Register variable[2]: Result */
262 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::==*/)))))));
263 if (UNTAG_Bool(variable
[2])) { /*if*/
264 variable
[2] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
265 /* Register variable[3]: Once String constant */
266 if (once_value_9
!= NIT_NULL
) variable
[3] = once_value_9
;
268 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString(" ("), TAG_Int(2)) /*new String*/;
269 once_value_9
= variable
[3];
271 /* Register variable[3]: Result */
272 /* Ensure var variable[3]: super-string element*/
273 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], variable
[3]) /*AbstractArray::add*/;
274 /* Register variable[3]: Result */
275 variable
[3] = CALL_opts___Option___default_value(variable
[0])(variable
[0]) /*Option::default_value*/;
276 /* Ensure var variable[3]: super-string element*/
277 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], CALL_string___Object___to_s(variable
[3])(variable
[3]) /*Object::to_s*/) /*AbstractArray::add*/;
278 /* Register variable[3]: Once String constant */
279 if (once_value_10
!= NIT_NULL
) variable
[3] = once_value_10
;
281 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString(")"), TAG_Int(1)) /*new String*/;
282 once_value_10
= variable
[3];
284 /* Register variable[3]: Result */
285 /* Ensure var variable[3]: super-string element*/
286 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], variable
[3]) /*AbstractArray::add*/;
287 /* Register variable[2]: Result */
288 variable
[2] = CALL_string___Object___to_s(variable
[2])(variable
[2]) /*Object::to_s*/;
289 variable
[1] = variable
[2];
292 /* Register variable[2]: Once String constant */
293 if (once_value_11
!= NIT_NULL
) variable
[2] = once_value_11
;
295 variable
[2] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
296 once_value_11
= variable
[2];
298 /* Register variable[2]: Result */
299 variable
[1] = variable
[2];
301 return_label8
: while(false);
302 tracehead
= trace
.prev
;
305 void opts___Option___read_param(val_t self
, val_t param0
) {
306 struct trace_t trace
= {NULL
, NULL
, 78, LOCATE_opts___Option___read_param
};
307 val_t
*variable
= NULL
;
308 struct WBT_
**closurevariable
= NULL
;
309 trace
.prev
= tracehead
; tracehead
= &trace
;
310 trace
.file
= LOCATE_opts
;
311 fprintf(stderr
, "Deferred method called");
312 fprintf(stderr
, " (%s:%d)\n", LOCATE_opts
, 78);
314 tracehead
= trace
.prev
;
317 val_t
opts___OptionText___to_s(val_t self
) {
318 struct trace_t trace
= {NULL
, NULL
, 88, LOCATE_opts___OptionText___to_s
};
320 struct WBT_
**closurevariable
= NULL
;
321 trace
.prev
= tracehead
; tracehead
= &trace
;
322 trace
.file
= LOCATE_opts
;
323 /* Register variable[0]: Local variable */
325 /* Register variable[1]: Method return value and escape marker */
326 /* Register variable[2]: Result */
327 variable
[2] = CALL_opts___Option___helptext(variable
[0])(variable
[0]) /*Option::helptext*/;
328 variable
[1] = variable
[2];
330 return_label12
: while(false);
331 tracehead
= trace
.prev
;
334 val_t
opts___OptionText___pretty(val_t self
, val_t param0
) {
335 struct trace_t trace
= {NULL
, NULL
, 86, LOCATE_opts___OptionText___pretty
};
337 struct WBT_
**closurevariable
= NULL
;
338 trace
.prev
= tracehead
; tracehead
= &trace
;
339 trace
.file
= LOCATE_opts
;
340 /* Register variable[0]: Local variable */
342 /* Register variable[1]: Local variable */
343 variable
[1] = param0
;
344 /* Register variable[2]: Method return value and escape marker */
345 /* Register variable[3]: Result */
346 variable
[3] = CALL_string___Object___to_s(variable
[0])(variable
[0]) /*OptionText::to_s*/;
347 variable
[2] = variable
[3];
349 return_label13
: while(false);
350 tracehead
= trace
.prev
;
353 void opts___OptionText___init(val_t self
, val_t param0
, int* init_table
) {
354 struct trace_t trace
= {NULL
, NULL
, 84, LOCATE_opts___OptionText___init
};
356 struct WBT_
**closurevariable
= NULL
;
357 trace
.prev
= tracehead
; tracehead
= &trace
;
358 trace
.file
= LOCATE_opts
;
359 /* Register variable[0]: Local variable */
361 /* Register variable[1]: Local variable */
362 variable
[1] = param0
;
363 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionText
].i
]) return;
364 /* Register variable[2]: Method return value and escape marker */
365 CALL_opts___Option___init_opt(variable
[0])(variable
[0], variable
[1] /*text*/, NIT_NULL
/*null*/, NIT_NULL
/*null*/, init_table
/*YYY*/) /*Option::init_opt*/;
366 return_label14
: while(false);
367 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionText
].i
] = 1;
368 tracehead
= trace
.prev
;
371 void opts___OptionBool___read_param(val_t self
, val_t param0
) {
372 struct trace_t trace
= {NULL
, NULL
, 97, LOCATE_opts___OptionBool___read_param
};
374 struct WBT_
**closurevariable
= NULL
;
375 trace
.prev
= tracehead
; tracehead
= &trace
;
376 trace
.file
= LOCATE_opts
;
377 /* Register variable[0]: Local variable */
379 /* Register variable[1]: Local variable */
380 variable
[1] = param0
;
381 /* Register variable[2]: Method return value and escape marker */
382 CALL_opts___Option___value__eq(variable
[0])(variable
[0], TAG_Bool(true)) /*Option::value=*/;
383 return_label15
: while(false);
384 tracehead
= trace
.prev
;
387 void opts___OptionBool___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
388 struct trace_t trace
= {NULL
, NULL
, 95, LOCATE_opts___OptionBool___init
};
390 struct WBT_
**closurevariable
= NULL
;
391 trace
.prev
= tracehead
; tracehead
= &trace
;
392 trace
.file
= LOCATE_opts
;
393 /* Register variable[0]: Local variable */
395 /* Register variable[1]: Local variable */
396 variable
[1] = param0
;
397 /* Register variable[2]: Local variable */
398 /* check if p<Array[String] with p:String */
399 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]*/;
400 variable
[2] = param1
;
401 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionBool
].i
]) return;
402 /* Register variable[3]: Method return value and escape marker */
403 CALL_opts___Option___init_opt(variable
[0])(variable
[0], variable
[1] /*help*/, TAG_Bool(false), variable
[2] /*names*/, init_table
/*YYY*/) /*Option::init_opt*/;
404 return_label16
: while(false);
405 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionBool
].i
] = 1;
406 tracehead
= trace
.prev
;
409 void opts___OptionCount___read_param(val_t self
, val_t param0
) {
410 struct trace_t trace
= {NULL
, NULL
, 106, LOCATE_opts___OptionCount___read_param
};
412 struct WBT_
**closurevariable
= NULL
;
413 trace
.prev
= tracehead
; tracehead
= &trace
;
414 trace
.file
= LOCATE_opts
;
415 /* Register variable[0]: Local variable */
417 /* Register variable[1]: Local variable */
418 variable
[1] = param0
;
419 /* Register variable[2]: Method return value and escape marker */
420 CALL_opts___Option___value__eq(variable
[0])(variable
[0], TAG_Int(UNTAG_Int(CALL_opts___Option___value(variable
[0])(variable
[0]) /*Option::value*/)+UNTAG_Int( TAG_Int(1)))) /*Option::value=*/;
421 return_label17
: while(false);
422 tracehead
= trace
.prev
;
425 void opts___OptionCount___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
426 struct trace_t trace
= {NULL
, NULL
, 104, LOCATE_opts___OptionCount___init
};
428 struct WBT_
**closurevariable
= NULL
;
429 trace
.prev
= tracehead
; tracehead
= &trace
;
430 trace
.file
= LOCATE_opts
;
431 /* Register variable[0]: Local variable */
433 /* Register variable[1]: Local variable */
434 variable
[1] = param0
;
435 /* Register variable[2]: Local variable */
436 /* check if p<Array[String] with p:String */
437 if (( param1
!=NIT_NULL
) && !VAL_ISA( param1
, COLOR_Array
, ID_Array
)) { fprintf(stderr
, "Cast failled"); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___OptionCount___init
, LOCATE_opts
, 104); nit_exit(1); } /*cast Array[String]*/;
438 variable
[2] = param1
;
439 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionCount
].i
]) return;
440 /* Register variable[3]: Method return value and escape marker */
441 CALL_opts___Option___init_opt(variable
[0])(variable
[0], variable
[1] /*help*/, TAG_Int(0), variable
[2] /*names*/, init_table
/*YYY*/) /*Option::init_opt*/;
442 return_label18
: while(false);
443 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionCount
].i
] = 1;
444 tracehead
= trace
.prev
;
447 void opts___OptionParameter___read_param(val_t self
, val_t param0
) {
448 struct trace_t trace
= {NULL
, NULL
, 114, LOCATE_opts___OptionParameter___read_param
};
450 struct WBT_
**closurevariable
= NULL
;
451 trace
.prev
= tracehead
; tracehead
= &trace
;
452 trace
.file
= LOCATE_opts
;
453 /* Register variable[0]: Local variable */
455 /* Register variable[1]: Local variable */
456 variable
[1] = param0
;
457 /* Register variable[2]: Method return value and escape marker */
458 /* Register variable[3]: Result */
459 variable
[3] = CALL_opts___Option___context(variable
[0])(variable
[0]) /*Option::context*/;
460 /* Register variable[3]: Result */
461 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::==*/)))))));
462 if (!UNTAG_Bool(variable
[3])) { fprintf(stderr
, "Assert%s failed", ""); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___OptionParameter___read_param
, LOCATE_opts
, 116); nit_exit(1);}
463 /* Register variable[3]: Result */
464 variable
[3] = CALL_abstract_collection___Iterator___is_ok( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::is_ok*/;
465 if (UNTAG_Bool(variable
[3])) { /*if*/
466 /* Register variable[3]: Result */
467 variable
[3] = CALL_abstract_collection___Iterator___item( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::item*/;
468 /* Register variable[3]: Result */
469 variable
[3] = CALL_opts___OptionParameter___convert(variable
[0])(variable
[0], variable
[3]) /*OptionParameter::convert*/;
470 CALL_opts___Option___value__eq(variable
[0])(variable
[0], variable
[3]) /*Option::value=*/;
471 CALL_abstract_collection___Iterator___next( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::next*/;
474 return_label19
: while(false);
475 tracehead
= trace
.prev
;
478 val_t
opts___OptionParameter___convert(val_t self
, val_t param0
) {
479 struct trace_t trace
= {NULL
, NULL
, 112, LOCATE_opts___OptionParameter___convert
};
480 val_t
*variable
= NULL
;
481 struct WBT_
**closurevariable
= NULL
;
482 trace
.prev
= tracehead
; tracehead
= &trace
;
483 trace
.file
= LOCATE_opts
;
484 fprintf(stderr
, "Deferred method called");
485 fprintf(stderr
, " (%s:%d)\n", LOCATE_opts
, 112);
487 tracehead
= trace
.prev
;
490 void opts___OptionParameter___init_opt(val_t self
, val_t param0
, val_t param1
, val_t param2
, int* init_table
) {
491 struct trace_t trace
= {NULL
, NULL
, 125, LOCATE_opts___OptionParameter___init_opt
};
493 struct WBT_
**closurevariable
= NULL
;
494 trace
.prev
= tracehead
; tracehead
= &trace
;
495 trace
.file
= LOCATE_opts
;
496 /* Register variable[0]: Local variable */
498 /* Register variable[1]: Local variable */
499 variable
[1] = param0
;
500 /* Register variable[2]: Local variable */
501 variable
[2] = param1
;
502 /* Register variable[3]: Local variable */
503 variable
[3] = param2
;
504 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionParameter
].i
]) return;
505 /* Register variable[4]: Method return value and escape marker */
506 CALL_opts___Option___init_opt(variable
[0])(variable
[0], variable
[1], variable
[2], variable
[3], init_table
/*YYY*/) /*Option::init_opt*/;
507 return_label20
: while(false);
508 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionParameter
].i
] = 1;
509 tracehead
= trace
.prev
;
512 val_t
opts___OptionString___convert(val_t self
, val_t param0
) {
513 struct trace_t trace
= {NULL
, NULL
, 134, LOCATE_opts___OptionString___convert
};
515 struct WBT_
**closurevariable
= NULL
;
516 trace
.prev
= tracehead
; tracehead
= &trace
;
517 trace
.file
= LOCATE_opts
;
518 /* Register variable[0]: Local variable */
520 /* Register variable[1]: Local variable */
521 variable
[1] = param0
;
522 /* Register variable[2]: Method return value and escape marker */
523 variable
[2] = variable
[1] /*str*/;
525 return_label21
: while(false);
526 tracehead
= trace
.prev
;
529 void opts___OptionString___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
530 struct trace_t trace
= {NULL
, NULL
, 132, LOCATE_opts___OptionString___init
};
532 struct WBT_
**closurevariable
= NULL
;
533 trace
.prev
= tracehead
; tracehead
= &trace
;
534 trace
.file
= LOCATE_opts
;
535 /* Register variable[0]: Local variable */
537 /* Register variable[1]: Local variable */
538 variable
[1] = param0
;
539 /* Register variable[2]: Local variable */
540 /* check if p<Array[String] with p:String */
541 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
, 132); nit_exit(1); } /*cast Array[String]*/;
542 variable
[2] = param1
;
543 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionString
].i
]) return;
544 /* Register variable[3]: Method return value and escape marker */
545 CALL_opts___OptionParameter___init_opt(variable
[0])(variable
[0], variable
[1] /*help*/, NIT_NULL
/*null*/, variable
[2] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
546 return_label22
: while(false);
547 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionString
].i
] = 1;
548 tracehead
= trace
.prev
;
551 val_t
opts___OptionEnum___pretty_default(val_t self
) {
552 struct trace_t trace
= {NULL
, NULL
, 155, LOCATE_opts___OptionEnum___pretty_default
};
553 static val_t once_value_24
= NIT_NULL
; /* Once value for string variable[3]*/
554 static val_t once_value_26
= NIT_NULL
; /* Once value for string variable[3]*/
555 static val_t once_value_27
= NIT_NULL
; /* Once value for string variable[2]*/
557 struct WBT_
**closurevariable
= NULL
;
558 trace
.prev
= tracehead
; tracehead
= &trace
;
559 trace
.file
= LOCATE_opts
;
560 /* Register variable[0]: Local variable */
562 /* Register variable[1]: Method return value and escape marker */
563 /* Register variable[2]: Result */
564 variable
[2] = CALL_opts___Option___default_value(variable
[0])(variable
[0]) /*Option::default_value*/;
565 /* Register variable[2]: Result */
566 variable
[2] = TAG_Bool((variable
[2])!=( NIT_NULL
/*null*/));
567 if (UNTAG_Bool(variable
[2])) { /*if*/
568 variable
[2] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
569 /* Register variable[3]: Once String constant */
570 if (once_value_24
!= NIT_NULL
) variable
[3] = once_value_24
;
572 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString(" ("), TAG_Int(2)) /*new String*/;
573 once_value_24
= variable
[3];
575 /* Register variable[3]: Result */
576 /* Ensure var variable[3]: super-string element*/
577 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], variable
[3]) /*AbstractArray::add*/;
578 /* Register variable[3]: Result */
579 variable
[3] = ATTR_opts___OptionEnum____enum(variable
[0]) /*OptionEnum::_enum*/;
580 /* Register variable[4]: Result */
581 variable
[4] = CALL_opts___Option___default_value(variable
[0])(variable
[0]) /*Option::default_value*/;
582 /* Register variable[5]: Local variable */
583 variable
[5] = variable
[3];
584 /* Register variable[6]: Local variable */
585 variable
[6] = variable
[4];
586 /* Register variable[7]: Method return value and escape marker */
587 /* Register variable[8]: Result */
588 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)>=UNTAG_Int( TAG_Int(0)));
589 /* Ensure var variable[8]: Left 'and' operand*/
590 if (UNTAG_Bool(variable
[8])) { /* and */
591 /* Register variable[8]: Result */
592 variable
[8] = ATTR_array___AbstractArrayRead____length(variable
[5]) /*AbstractArrayRead::_length*/;
593 /* Register variable[8]: Result */
594 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*index*/)<UNTAG_Int(variable
[8]));
596 /* Register variable[8]: Result */
597 if (!UNTAG_Bool(variable
[8])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_opts
, 234); nit_exit(1);}
598 /* Register variable[8]: Result */
599 variable
[8] = ATTR_array___Array____items(variable
[5]) /*Array::_items*/;
600 /* Register variable[8]: Result */
601 variable
[8] = UNBOX_NativeArray(variable
[8])[UNTAG_Int( variable
[6] /*index*/)];
602 variable
[7] = variable
[8];
604 return_label25
: while(false);
605 /* Register variable[3]: Result */
606 variable
[3] = variable
[7];
607 /* Ensure var variable[3]: super-string element*/
608 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], variable
[3]) /*AbstractArray::add*/;
609 /* Register variable[3]: Once String constant */
610 if (once_value_26
!= NIT_NULL
) variable
[3] = once_value_26
;
612 variable
[3] = NEW_String_string___String___with_native(BOX_NativeString(")"), TAG_Int(1)) /*new String*/;
613 once_value_26
= variable
[3];
615 /* Register variable[3]: Result */
616 /* Ensure var variable[3]: super-string element*/
617 CALL_abstract_collection___SimpleCollection___add(variable
[2])(variable
[2], variable
[3]) /*AbstractArray::add*/;
618 /* Register variable[2]: Result */
619 variable
[2] = CALL_string___Object___to_s(variable
[2])(variable
[2]) /*Object::to_s*/;
620 variable
[1] = variable
[2];
623 /* Register variable[2]: Once String constant */
624 if (once_value_27
!= NIT_NULL
) variable
[2] = once_value_27
;
626 variable
[2] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
627 once_value_27
= variable
[2];
629 /* Register variable[2]: Result */
630 variable
[1] = variable
[2];
633 return_label23
: while(false);
634 tracehead
= trace
.prev
;
637 val_t
opts___OptionEnum___convert(val_t self
, val_t param0
) {
638 struct trace_t trace
= {NULL
, NULL
, 149, LOCATE_opts___OptionEnum___convert
};
640 struct WBT_
**closurevariable
= NULL
;
641 trace
.prev
= tracehead
; tracehead
= &trace
;
642 trace
.file
= LOCATE_opts
;
643 /* Register variable[0]: Local variable */
645 /* Register variable[1]: Local variable */
646 variable
[1] = param0
;
647 /* Register variable[2]: Method return value and escape marker */
648 /* Register variable[3]: Local variable */
649 /* Register variable[4]: Result */
650 variable
[4] = ATTR_opts___OptionEnum____enum(variable
[0]) /*OptionEnum::_enum*/;
651 /* Register variable[4]: Result */
652 variable
[4] = CALL_abstract_collection___IndexedCollectionRead___index_of(variable
[4])(variable
[4], variable
[1] /*str*/) /*AbstractArrayRead::index_of*/;
653 variable
[3] = variable
[4];
654 variable
[2] = variable
[3] /*id*/;
656 return_label28
: while(false);
657 tracehead
= trace
.prev
;
660 void opts___OptionEnum___init(val_t self
, val_t param0
, val_t param1
, val_t param2
, val_t param3
, int* init_table
) {
661 struct trace_t trace
= {NULL
, NULL
, 142, LOCATE_opts___OptionEnum___init
};
662 static val_t once_value_30
= NIT_NULL
; /* Once value for string variable[7]*/
663 static val_t once_value_31
= NIT_NULL
; /* Once value for string variable[7]*/
664 static val_t once_value_32
= NIT_NULL
; /* Once value for string variable[7]*/
665 static val_t once_value_33
= NIT_NULL
; /* Once value for string variable[7]*/
667 struct WBT_
**closurevariable
= NULL
;
668 trace
.prev
= tracehead
; tracehead
= &trace
;
669 trace
.file
= LOCATE_opts
;
670 /* Register variable[0]: Local variable */
672 /* Register variable[1]: Local variable */
673 variable
[1] = param0
;
674 /* Register variable[2]: Local variable */
675 variable
[2] = param1
;
676 /* Register variable[3]: Local variable */
677 variable
[3] = param2
;
678 /* Register variable[4]: Local variable */
679 /* check if p<Array[String] with p:String */
680 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
, 142); nit_exit(1); } /*cast Array[String]*/;
681 variable
[4] = param3
;
682 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionEnum
].i
]) return;
683 /* Register variable[5]: Method return value and escape marker */
684 /* Register variable[6]: Result */
685 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::==*/)))))));
686 /* Ensure var variable[6]: Left 'and' operand*/
687 if (UNTAG_Bool(variable
[6])) { /* and */
688 /* Register variable[6]: Result */
689 variable
[6] = CALL_abstract_collection___Collection___length( variable
[1] /*enum*/)( variable
[1] /*enum*/) /*AbstractArrayRead::length*/;
690 /* Register variable[6]: Result */
691 variable
[6] = TAG_Bool(UNTAG_Int(variable
[6])>UNTAG_Int( TAG_Int(0)));
693 /* Register variable[6]: Result */
694 if (!UNTAG_Bool(variable
[6])) { fprintf(stderr
, "Assert%s failed", ""); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_opts___OptionEnum___init
, LOCATE_opts
, 144); nit_exit(1);}
695 /* Register variable[6]: Result */
696 variable
[6] = CALL_array___Collection___to_a( variable
[1] /*enum*/)( variable
[1] /*enum*/) /*Collection::to_a*/;
697 ATTR_opts___OptionEnum____enum(variable
[0]) /*OptionEnum::_enum*/ = variable
[6];
698 variable
[6] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
699 /* Register variable[7]: Once String constant */
700 if (once_value_30
!= NIT_NULL
) variable
[7] = once_value_30
;
702 variable
[7] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
703 once_value_30
= variable
[7];
705 /* Register variable[7]: Result */
706 /* Ensure var variable[7]: super-string element*/
707 CALL_abstract_collection___SimpleCollection___add(variable
[6])(variable
[6], variable
[7]) /*AbstractArray::add*/;
708 variable
[7] = variable
[2] /*help*/ /* Ensure var: super-string element*/;
709 CALL_abstract_collection___SimpleCollection___add(variable
[6])(variable
[6], variable
[7]) /*AbstractArray::add*/;
710 /* Register variable[7]: Once String constant */
711 if (once_value_31
!= NIT_NULL
) variable
[7] = once_value_31
;
713 variable
[7] = NEW_String_string___String___with_native(BOX_NativeString(" <"), TAG_Int(2)) /*new String*/;
714 once_value_31
= variable
[7];
716 /* Register variable[7]: Result */
717 /* Ensure var variable[7]: super-string element*/
718 CALL_abstract_collection___SimpleCollection___add(variable
[6])(variable
[6], variable
[7]) /*AbstractArray::add*/;
719 /* Register variable[7]: Once String constant */
720 if (once_value_32
!= NIT_NULL
) variable
[7] = once_value_32
;
722 variable
[7] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)) /*new String*/;
723 once_value_32
= variable
[7];
725 /* Register variable[7]: Result */
726 /* Register variable[7]: Result */
727 variable
[7] = CALL_string___Collection___join( variable
[1] /*enum*/)( variable
[1] /*enum*/, variable
[7]) /*Collection::join*/;
728 /* Ensure var variable[7]: super-string element*/
729 CALL_abstract_collection___SimpleCollection___add(variable
[6])(variable
[6], variable
[7]) /*AbstractArray::add*/;
730 /* Register variable[7]: Once String constant */
731 if (once_value_33
!= NIT_NULL
) variable
[7] = once_value_33
;
733 variable
[7] = NEW_String_string___String___with_native(BOX_NativeString(">"), TAG_Int(1)) /*new String*/;
734 once_value_33
= variable
[7];
736 /* Register variable[7]: Result */
737 /* Ensure var variable[7]: super-string element*/
738 CALL_abstract_collection___SimpleCollection___add(variable
[6])(variable
[6], variable
[7]) /*AbstractArray::add*/;
739 /* Register variable[6]: Result */
740 variable
[6] = CALL_string___Object___to_s(variable
[6])(variable
[6]) /*Object::to_s*/;
741 CALL_opts___OptionParameter___init_opt(variable
[0])(variable
[0], variable
[6], variable
[3] /*default*/, variable
[4] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
742 return_label29
: while(false);
743 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionEnum
].i
] = 1;
744 tracehead
= trace
.prev
;
747 val_t
opts___OptionInt___convert(val_t self
, val_t param0
) {
748 struct trace_t trace
= {NULL
, NULL
, 171, LOCATE_opts___OptionInt___convert
};
750 struct WBT_
**closurevariable
= NULL
;
751 trace
.prev
= tracehead
; tracehead
= &trace
;
752 trace
.file
= LOCATE_opts
;
753 /* Register variable[0]: Local variable */
755 /* Register variable[1]: Local variable */
756 variable
[1] = param0
;
757 /* Register variable[2]: Method return value and escape marker */
758 /* Register variable[3]: Result */
759 variable
[3] = CALL_string___AbstractString___to_i( variable
[1] /*str*/)( variable
[1] /*str*/) /*AbstractString::to_i*/;
760 variable
[2] = variable
[3];
762 return_label34
: while(false);
763 tracehead
= trace
.prev
;
766 void opts___OptionInt___init(val_t self
, val_t param0
, val_t param1
, val_t param2
, int* init_table
) {
767 struct trace_t trace
= {NULL
, NULL
, 169, LOCATE_opts___OptionInt___init
};
769 struct WBT_
**closurevariable
= NULL
;
770 trace
.prev
= tracehead
; tracehead
= &trace
;
771 trace
.file
= LOCATE_opts
;
772 /* Register variable[0]: Local variable */
774 /* Register variable[1]: Local variable */
775 variable
[1] = param0
;
776 /* Register variable[2]: Local variable */
777 variable
[2] = param1
;
778 /* Register variable[3]: Local variable */
779 /* check if p<Array[String] with p:String */
780 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
, 169); nit_exit(1); } /*cast Array[String]*/;
781 variable
[3] = param2
;
782 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionInt
].i
]) return;
783 /* Register variable[4]: Method return value and escape marker */
784 CALL_opts___OptionParameter___init_opt(variable
[0])(variable
[0], variable
[1] /*help*/, variable
[2] /*default*/, variable
[3] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
785 return_label35
: while(false);
786 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionInt
].i
] = 1;
787 tracehead
= trace
.prev
;
790 val_t
opts___OptionArray___convert(val_t self
, val_t param0
) {
791 struct trace_t trace
= {NULL
, NULL
, 185, LOCATE_opts___OptionArray___convert
};
793 struct WBT_
**closurevariable
= NULL
;
794 trace
.prev
= tracehead
; tracehead
= &trace
;
795 trace
.file
= LOCATE_opts
;
796 /* Register variable[0]: Local variable */
798 /* Register variable[1]: Local variable */
799 variable
[1] = param0
;
800 /* Register variable[2]: Method return value and escape marker */
801 /* Register variable[3]: Result */
802 variable
[3] = ATTR_opts___OptionArray____values(variable
[0]) /*OptionArray::_values*/;
803 CALL_abstract_collection___SimpleCollection___add(variable
[3])(variable
[3], variable
[1] /*str*/) /*AbstractArray::add*/;
804 /* Register variable[3]: Result */
805 variable
[3] = ATTR_opts___OptionArray____values(variable
[0]) /*OptionArray::_values*/;
806 variable
[2] = variable
[3];
808 return_label36
: while(false);
809 tracehead
= trace
.prev
;
812 void opts___OptionArray___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
813 struct trace_t trace
= {NULL
, NULL
, 178, LOCATE_opts___OptionArray___init
};
815 struct WBT_
**closurevariable
= NULL
;
816 trace
.prev
= tracehead
; tracehead
= &trace
;
817 trace
.file
= LOCATE_opts
;
818 /* Register variable[0]: Local variable */
820 /* Register variable[1]: Local variable */
821 variable
[1] = param0
;
822 /* Register variable[2]: Local variable */
823 /* check if p<Array[String] with p:String */
824 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
, 178); nit_exit(1); } /*cast Array[String]*/;
825 variable
[2] = param1
;
826 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionArray
].i
]) return;
827 /* Register variable[3]: Method return value and escape marker */
828 /* Register variable[4]: Result */
829 variable
[4] = NEW_Array_array___Array___init() /*new Array[String]*/;
830 ATTR_opts___OptionArray____values(variable
[0]) /*OptionArray::_values*/ = variable
[4];
831 /* Register variable[4]: Result */
832 variable
[4] = ATTR_opts___OptionArray____values(variable
[0]) /*OptionArray::_values*/;
833 CALL_opts___OptionParameter___init_opt(variable
[0])(variable
[0], variable
[1] /*help*/, variable
[4], variable
[2] /*names*/, init_table
/*YYY*/) /*OptionParameter::init_opt*/;
834 return_label37
: while(false);
835 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionArray
].i
] = 1;
836 tracehead
= trace
.prev
;
839 val_t
opts___OptionContext___options(val_t self
) {
840 struct trace_t trace
= {NULL
, NULL
, 193, LOCATE_opts___OptionContext___options
};
841 val_t
*variable
= NULL
;
842 struct WBT_
**closurevariable
= NULL
;
843 trace
.prev
= tracehead
; tracehead
= &trace
;
844 trace
.file
= LOCATE_opts
;
845 tracehead
= trace
.prev
;
846 return ATTR_opts___OptionContext____options( self
) /*OptionContext::_options*/;
848 val_t
opts___OptionContext___rest(val_t self
) {
849 struct trace_t trace
= {NULL
, NULL
, 194, LOCATE_opts___OptionContext___rest
};
850 val_t
*variable
= NULL
;
851 struct WBT_
**closurevariable
= NULL
;
852 trace
.prev
= tracehead
; tracehead
= &trace
;
853 trace
.file
= LOCATE_opts
;
854 tracehead
= trace
.prev
;
855 return ATTR_opts___OptionContext____rest( self
) /*OptionContext::_rest*/;
857 void opts___OptionContext___usage(val_t self
) {
858 struct trace_t trace
= {NULL
, NULL
, 198, LOCATE_opts___OptionContext___usage
};
860 struct WBT_
**closurevariable
= NULL
;
861 trace
.prev
= tracehead
; tracehead
= &trace
;
862 trace
.file
= LOCATE_opts
;
863 /* Register variable[0]: Local variable */
865 /* Register variable[1]: Method return value and escape marker */
866 /* Register variable[2]: Local variable */
867 variable
[2] = TAG_Int(1);
868 /* Register variable[3]: Result */
869 variable
[3] = ATTR_opts___OptionContext____options(variable
[0]) /*OptionContext::_options*/;
870 /* Register variable[3]: For iterator */
871 variable
[3] = CALL_abstract_collection___Collection___iterator(variable
[3])(variable
[3]) /*AbstractArrayRead::iterator*/;
872 while (true) { /*for*/
873 /* Register variable[4]: For 'is_ok' result */
874 variable
[4] = CALL_abstract_collection___Iterator___is_ok(variable
[3])(variable
[3]) /*ArrayIterator::is_ok*/;
875 if (!UNTAG_Bool(variable
[4])) break; /*for*/
876 variable
[4] = CALL_abstract_collection___Iterator___item(variable
[3])(variable
[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
877 /* Register variable[5]: Local variable */
878 variable
[5] = variable
[4];
879 /* Register variable[6]: Local variable */
880 variable
[6] = TAG_Int(3);
881 /* Register variable[7]: Result */
882 variable
[7] = CALL_opts___Option___names( variable
[5] /*i*/)( variable
[5] /*i*/) /*Option::names*/;
883 /* Register variable[7]: For iterator */
884 variable
[7] = CALL_abstract_collection___Collection___iterator(variable
[7])(variable
[7]) /*AbstractArrayRead::iterator*/;
885 while (true) { /*for*/
886 /* Register variable[8]: For 'is_ok' result */
887 variable
[8] = CALL_abstract_collection___Iterator___is_ok(variable
[7])(variable
[7]) /*ArrayIterator::is_ok*/;
888 if (!UNTAG_Bool(variable
[8])) break; /*for*/
889 variable
[8] = CALL_abstract_collection___Iterator___item(variable
[7])(variable
[7]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
890 /* Register variable[9]: Local variable */
891 variable
[9] = variable
[8];
892 /* Register variable[10]: Result */
893 variable
[10] = CALL_abstract_collection___Collection___length( variable
[9] /*n*/)( variable
[9] /*n*/) /*AbstractArrayRead::length*/;
894 /* Register variable[10]: Result */
895 variable
[10] = TAG_Int(UNTAG_Int(variable
[10])+UNTAG_Int( TAG_Int(2)));
896 variable
[6] = TAG_Int(UNTAG_Int(variable
[6])+UNTAG_Int(variable
[10])) /*l*/;
897 continue_40
: while(0);
898 CALL_abstract_collection___Iterator___next(variable
[7])(variable
[7]) /*ArrayIterator::next*/;
901 /* Register variable[7]: Result */
902 variable
[7] = TAG_Bool(UNTAG_Int( variable
[2] /*lmax*/)<UNTAG_Int( variable
[6] /*l*/));
903 if (UNTAG_Bool(variable
[7])) { /*if*/
904 variable
[2] = variable
[6] /*l*/ /*lmax=*/;
906 continue_39
: while(0);
907 CALL_abstract_collection___Iterator___next(variable
[3])(variable
[3]) /*ArrayIterator::next*/;
910 /* Register variable[3]: Result */
911 variable
[3] = ATTR_opts___OptionContext____options(variable
[0]) /*OptionContext::_options*/;
912 /* Register variable[3]: For iterator */
913 variable
[3] = CALL_abstract_collection___Collection___iterator(variable
[3])(variable
[3]) /*AbstractArrayRead::iterator*/;
914 while (true) { /*for*/
915 /* Register variable[4]: For 'is_ok' result */
916 variable
[4] = CALL_abstract_collection___Iterator___is_ok(variable
[3])(variable
[3]) /*ArrayIterator::is_ok*/;
917 if (!UNTAG_Bool(variable
[4])) break; /*for*/
918 variable
[4] = CALL_abstract_collection___Iterator___item(variable
[3])(variable
[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
919 /* Register variable[5]: Local variable */
920 variable
[5] = variable
[4];
921 /* Register variable[6]: Result */
922 variable
[6] = CALL_opts___Option___pretty( variable
[5] /*i*/)( variable
[5] /*i*/, variable
[2] /*lmax*/) /*Option::pretty*/;
923 CALL_file___Object___print(variable
[0])(variable
[0], variable
[6]) /*Object::print*/;
924 continue_41
: while(0);
925 CALL_abstract_collection___Iterator___next(variable
[3])(variable
[3]) /*ArrayIterator::next*/;
928 return_label38
: while(false);
929 tracehead
= trace
.prev
;
932 void opts___OptionContext___parse(val_t self
, val_t param0
) {
933 struct trace_t trace
= {NULL
, NULL
, 214, LOCATE_opts___OptionContext___parse
};
935 struct WBT_
**closurevariable
= NULL
;
936 trace
.prev
= tracehead
; tracehead
= &trace
;
937 trace
.file
= LOCATE_opts
;
938 /* Register variable[0]: Local variable */
940 /* Register variable[1]: Local variable */
941 variable
[1] = param0
;
942 /* Register variable[2]: Method return value and escape marker */
943 /* Register variable[3]: Local variable */
944 /* Register variable[4]: Result */
945 variable
[4] = CALL_abstract_collection___Collection___iterator( variable
[1] /*argv*/)( variable
[1] /*argv*/) /*Collection::iterator*/;
946 variable
[3] = variable
[4];
947 CALL_opts___OptionContext___parse_intern(variable
[0])(variable
[0], variable
[3] /*it*/) /*OptionContext::parse_intern*/;
948 return_label42
: while(false);
949 tracehead
= trace
.prev
;
952 void opts___OptionContext___parse_intern(val_t self
, val_t param0
) {
953 struct trace_t trace
= {NULL
, NULL
, 221, LOCATE_opts___OptionContext___parse_intern
};
954 static val_t once_value_45
= NIT_NULL
; /* Once value for string variable[6]*/
956 struct WBT_
**closurevariable
= NULL
;
957 trace
.prev
= tracehead
; tracehead
= &trace
;
958 trace
.file
= LOCATE_opts
;
959 /* Register variable[0]: Local variable */
961 /* Register variable[1]: Local variable */
962 variable
[1] = param0
;
963 /* Register variable[2]: Method return value and escape marker */
964 /* Register variable[3]: Local variable */
965 variable
[3] = TAG_Bool(true);
966 CALL_opts___OptionContext___build(variable
[0])(variable
[0]) /*OptionContext::build*/;
967 /* Register variable[4]: Local variable */
968 /* Register variable[5]: Result */
969 variable
[5] = ATTR_opts___OptionContext____rest(variable
[0]) /*OptionContext::_rest*/;
970 variable
[4] = variable
[5];
971 while (true) { /*while*/
972 variable
[5] = variable
[3] /*parseargs*/ /* Ensure var: Left 'and' operand*/;
973 if (UNTAG_Bool(variable
[5])) { /* and */
974 /* Register variable[5]: Result */
975 variable
[5] = CALL_abstract_collection___Iterator___is_ok( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::is_ok*/;
977 /* Register variable[5]: Result */
978 if (!UNTAG_Bool(variable
[5])) break; /* while*/
979 /* Register variable[5]: Local variable */
980 /* Register variable[6]: Result */
981 variable
[6] = CALL_abstract_collection___Iterator___item( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::item*/;
982 variable
[5] = variable
[6];
983 /* Register variable[6]: Once String constant */
984 if (once_value_45
!= NIT_NULL
) variable
[6] = once_value_45
;
986 variable
[6] = NEW_String_string___String___with_native(BOX_NativeString("--"), TAG_Int(2)) /*new String*/;
987 once_value_45
= variable
[6];
989 /* Register variable[6]: Result */
990 /* Register variable[6]: Result */
991 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::==*/)));
992 if (UNTAG_Bool(variable
[6])) { /*if*/
993 CALL_abstract_collection___Iterator___next( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::next*/;
994 /* Register variable[6]: Result */
995 variable
[6] = CALL_array___Iterator___to_a( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::to_a*/;
996 CALL_abstract_collection___SimpleCollection___add_all( variable
[4] /*rest*/)( variable
[4] /*rest*/, variable
[6]) /*SimpleCollection::add_all*/;
997 variable
[3] = TAG_Bool(false) /*parseargs=*/;
999 /* Register variable[6]: Result */
1000 variable
[6] = ATTR_opts___OptionContext____optmap(variable
[0]) /*OptionContext::_optmap*/;
1001 /* Register variable[6]: Result */
1002 variable
[6] = CALL_abstract_collection___MapRead___has_key(variable
[6])(variable
[6], variable
[5] /*str*/) /*MapRead::has_key*/;
1003 if (UNTAG_Bool(variable
[6])) { /*if*/
1004 /* Register variable[6]: Local variable */
1005 /* Register variable[7]: Result */
1006 variable
[7] = ATTR_opts___OptionContext____optmap(variable
[0]) /*OptionContext::_optmap*/;
1007 /* Register variable[7]: Result */
1008 variable
[7] = CALL_abstract_collection___MapRead_____bra(variable
[7])(variable
[7], variable
[5] /*str*/) /*MapRead::[]*/;
1009 variable
[6] = variable
[7];
1010 CALL_abstract_collection___Iterator___next( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::next*/;
1011 CALL_opts___Option___read_param( variable
[6] /*opt*/)( variable
[6] /*opt*/, variable
[1] /*it*/) /*Option::read_param*/;
1013 /* Register variable[6]: Result */
1014 variable
[6] = CALL_abstract_collection___Iterator___item( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::item*/;
1015 CALL_abstract_collection___SimpleCollection___add( variable
[4] /*rest*/)( variable
[4] /*rest*/, variable
[6]) /*AbstractArray::add*/;
1016 CALL_abstract_collection___Iterator___next( variable
[1] /*it*/)( variable
[1] /*it*/) /*Iterator::next*/;
1019 continue_44
: while(0);
1022 return_label43
: while(false);
1023 tracehead
= trace
.prev
;
1026 void opts___OptionContext___add_option(val_t self
, val_t param0
) {
1027 struct trace_t trace
= {NULL
, NULL
, 246, LOCATE_opts___OptionContext___add_option
};
1029 struct WBT_
**closurevariable
= NULL
;
1030 trace
.prev
= tracehead
; tracehead
= &trace
;
1031 trace
.file
= LOCATE_opts
;
1032 /* Register variable[0]: Local variable */
1034 /* Register variable[1]: Local variable */
1035 /* check if p<Array[Option] with p:Option */
1036 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
, 246); nit_exit(1); } /*cast Array[Option]*/;
1037 variable
[1] = param0
;
1038 /* Register variable[2]: Method return value and escape marker */
1039 /* Register variable[3]: For iterator */
1040 variable
[3] = CALL_abstract_collection___Collection___iterator( variable
[1] /*opts*/)( variable
[1] /*opts*/) /*AbstractArrayRead::iterator*/;
1041 while (true) { /*for*/
1042 /* Register variable[4]: For 'is_ok' result */
1043 variable
[4] = CALL_abstract_collection___Iterator___is_ok(variable
[3])(variable
[3]) /*ArrayIterator::is_ok*/;
1044 if (!UNTAG_Bool(variable
[4])) break; /*for*/
1045 variable
[4] = CALL_abstract_collection___Iterator___item(variable
[3])(variable
[3]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
1046 /* Register variable[5]: Local variable */
1047 variable
[5] = variable
[4];
1048 CALL_opts___Option___context__eq( variable
[5] /*opt*/)( variable
[5] /*opt*/, variable
[0]) /*Option::context=*/;
1049 /* Register variable[6]: Result */
1050 variable
[6] = ATTR_opts___OptionContext____options(variable
[0]) /*OptionContext::_options*/;
1051 CALL_abstract_collection___SimpleCollection___add(variable
[6])(variable
[6], variable
[5] /*opt*/) /*AbstractArray::add*/;
1052 continue_47
: while(0);
1053 CALL_abstract_collection___Iterator___next(variable
[3])(variable
[3]) /*ArrayIterator::next*/;
1056 return_label46
: while(false);
1057 tracehead
= trace
.prev
;
1060 void opts___OptionContext___init(val_t self
, int* init_table
) {
1061 struct trace_t trace
= {NULL
, NULL
, 254, LOCATE_opts___OptionContext___init
};
1063 struct WBT_
**closurevariable
= NULL
;
1064 trace
.prev
= tracehead
; tracehead
= &trace
;
1065 trace
.file
= LOCATE_opts
;
1066 /* Register variable[0]: Local variable */
1068 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionContext
].i
]) return;
1069 /* Register variable[1]: Method return value and escape marker */
1070 /* Register variable[2]: Result */
1071 variable
[2] = NEW_Array_array___Array___init() /*new Array[Option]*/;
1072 ATTR_opts___OptionContext____options(variable
[0]) /*OptionContext::_options*/ = variable
[2];
1073 /* Register variable[2]: Result */
1074 variable
[2] = NEW_HashMap_hash___HashMap___init() /*new HashMap[String, Option]*/;
1075 ATTR_opts___OptionContext____optmap(variable
[0]) /*OptionContext::_optmap*/ = variable
[2];
1076 /* Register variable[2]: Result */
1077 variable
[2] = NEW_Array_array___Array___init() /*new Array[String]*/;
1078 ATTR_opts___OptionContext____rest(variable
[0]) /*OptionContext::_rest*/ = variable
[2];
1079 return_label48
: while(false);
1080 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_OptionContext
].i
] = 1;
1081 tracehead
= trace
.prev
;
1084 void opts___OptionContext___build(val_t self
) {
1085 struct trace_t trace
= {NULL
, NULL
, 261, LOCATE_opts___OptionContext___build
};
1087 struct WBT_
**closurevariable
= NULL
;
1088 trace
.prev
= tracehead
; tracehead
= &trace
;
1089 trace
.file
= LOCATE_opts
;
1090 /* Register variable[0]: Local variable */
1092 /* Register variable[1]: Method return value and escape marker */
1093 /* Register variable[2]: Result */
1094 variable
[2] = ATTR_opts___OptionContext____options(variable
[0]) /*OptionContext::_options*/;
1095 /* Register variable[2]: For iterator */
1096 variable
[2] = CALL_abstract_collection___Collection___iterator(variable
[2])(variable
[2]) /*AbstractArrayRead::iterator*/;
1097 while (true) { /*for*/
1098 /* Register variable[3]: For 'is_ok' result */
1099 variable
[3] = CALL_abstract_collection___Iterator___is_ok(variable
[2])(variable
[2]) /*ArrayIterator::is_ok*/;
1100 if (!UNTAG_Bool(variable
[3])) break; /*for*/
1101 variable
[3] = CALL_abstract_collection___Iterator___item(variable
[2])(variable
[2]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
1102 /* Register variable[4]: Local variable */
1103 variable
[4] = variable
[3];
1104 /* Register variable[5]: Result */
1105 variable
[5] = CALL_opts___Option___names( variable
[4] /*o*/)( variable
[4] /*o*/) /*Option::names*/;
1106 /* Register variable[5]: For iterator */
1107 variable
[5] = CALL_abstract_collection___Collection___iterator(variable
[5])(variable
[5]) /*AbstractArrayRead::iterator*/;
1108 while (true) { /*for*/
1109 /* Register variable[6]: For 'is_ok' result */
1110 variable
[6] = CALL_abstract_collection___Iterator___is_ok(variable
[5])(variable
[5]) /*ArrayIterator::is_ok*/;
1111 if (!UNTAG_Bool(variable
[6])) break; /*for*/
1112 variable
[6] = CALL_abstract_collection___Iterator___item(variable
[5])(variable
[5]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
1113 /* Register variable[7]: Local variable */
1114 variable
[7] = variable
[6];
1115 /* Register variable[8]: Result */
1116 variable
[8] = ATTR_opts___OptionContext____optmap(variable
[0]) /*OptionContext::_optmap*/;
1117 CALL_abstract_collection___Map_____braeq(variable
[8])(variable
[8], variable
[7] /*n*/, variable
[4] /*o*/) /*Map::[]=*/;
1118 continue_51
: while(0);
1119 CALL_abstract_collection___Iterator___next(variable
[5])(variable
[5]) /*ArrayIterator::next*/;
1122 continue_50
: while(0);
1123 CALL_abstract_collection___Iterator___next(variable
[2])(variable
[2]) /*ArrayIterator::next*/;
1126 return_label49
: while(false);
1127 tracehead
= trace
.prev
;