1 /* This C file is generated by NIT to compile module abstracttool. */
2 #include "abstracttool._sep.h"
3 void abstracttool___AbstractCompiler___init(val_t self
, int* init_table
) {
4 struct trace_t trace
= {NULL
, NULL
, 28, LOCATE_abstracttool___AbstractCompiler___init
};
6 struct WBT_
**closurevariable
= NULL
;
7 trace
.prev
= tracehead
; tracehead
= &trace
;
8 trace
.file
= LOCATE_abstracttool
;
9 /* Register variable[0]: Local variable */
11 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_AbstractCompiler
].i
]) return;
12 /* Register variable[1]: Method return value and escape marker */
13 CALL_mmloader___ToolContext___init(variable
[0])(variable
[0], init_table
/*YYY*/) /*ToolContext::init*/;
14 /* Register variable[2]: Result */
15 variable
[2] = NEW_SrcModuleLoader_syntax___SrcModuleLoader___init() /*new SrcModuleLoader*/;
16 CALL_mmloader___ToolContext___register_loader(variable
[0])(variable
[0], variable
[2]) /*ToolContext::register_loader*/;
17 return_label0
: while(false);
18 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_AbstractCompiler
].i
] = 1;
19 tracehead
= trace
.prev
;
22 void abstracttool___AbstractCompiler___exec_cmd_line(val_t self
) {
23 struct trace_t trace
= {NULL
, NULL
, 34, LOCATE_abstracttool___AbstractCompiler___exec_cmd_line
};
25 struct WBT_
**closurevariable
= NULL
;
26 trace
.prev
= tracehead
; tracehead
= &trace
;
27 trace
.file
= LOCATE_abstracttool
;
28 /* Register variable[0]: Local variable */
30 /* Register variable[1]: Method return value and escape marker */
31 CALL_mmloader___ToolContext___process_options(variable
[0])(variable
[0]) /*ToolContext::process_options*/;
32 /* Register variable[2]: Result */
33 variable
[2] = CALL_mmloader___ToolContext___opt_help(variable
[0])(variable
[0]) /*ToolContext::opt_help*/;
34 /* Register variable[2]: Result */
35 variable
[2] = CALL_opts___Option___value(variable
[2])(variable
[2]) /*Option::value*/;
36 if (UNTAG_Bool(variable
[2])) { /*if*/
37 /* Register variable[2]: Result */
38 variable
[2] = CALL_mmloader___ToolContext___option_context(variable
[0])(variable
[0]) /*ToolContext::option_context*/;
39 CALL_opts___OptionContext___usage(variable
[2])(variable
[2]) /*OptionContext::usage*/;
40 exit(UNTAG_Int( TAG_Int(0)));
42 /* Register variable[2]: Result */
43 variable
[2] = CALL_mmloader___ToolContext___option_context(variable
[0])(variable
[0]) /*ToolContext::option_context*/;
44 /* Register variable[2]: Result */
45 variable
[2] = CALL_opts___OptionContext___rest(variable
[2])(variable
[2]) /*OptionContext::rest*/;
46 /* Register variable[2]: Result */
47 variable
[2] = CALL_abstract_collection___Collection___length(variable
[2])(variable
[2]) /*AbstractArrayRead::length*/;
48 /* Register variable[2]: Result */
49 variable
[2] = TAG_Bool((variable
[2])==( TAG_Int(0)));
50 if (UNTAG_Bool(variable
[2])) { /*if*/
51 /* Register variable[2]: Result */
52 variable
[2] = CALL_mmloader___ToolContext___option_context(variable
[0])(variable
[0]) /*ToolContext::option_context*/;
53 CALL_opts___OptionContext___usage(variable
[2])(variable
[2]) /*OptionContext::usage*/;
54 exit(UNTAG_Int( TAG_Int(1)));
56 /* Register variable[2]: Local variable */
57 /* Register variable[3]: Result */
58 variable
[3] = CALL_mmloader___ToolContext___option_context(variable
[0])(variable
[0]) /*ToolContext::option_context*/;
59 /* Register variable[3]: Result */
60 variable
[3] = CALL_opts___OptionContext___rest(variable
[3])(variable
[3]) /*OptionContext::rest*/;
61 variable
[2] = variable
[3];
62 /* Register variable[3]: Local variable */
63 /* Register variable[4]: Result */
64 variable
[4] = NEW_Array_array___Array___init() /*new Array[MMModule]*/;
65 variable
[3] = variable
[4];
66 /* Register variable[4]: Result */
67 variable
[4] = CALL_abstract_collection___Collection___length( variable
[2] /*rest*/)( variable
[2] /*rest*/) /*AbstractArrayRead::length*/;
68 /* Register variable[4]: Result */
69 variable
[4] = NEW_Range_range___Range___without_last( TAG_Int(0), variable
[4]) /*new Range[Int]*/;
70 /* Register variable[4]: For iterator */
71 variable
[4] = CALL_abstract_collection___Collection___iterator(variable
[4])(variable
[4]) /*Range::iterator*/;
72 while (true) { /*for*/
73 /* Register variable[5]: For 'is_ok' result */
74 variable
[5] = CALL_abstract_collection___Iterator___is_ok(variable
[4])(variable
[4]) /*Iterator::is_ok*/;
75 if (!UNTAG_Bool(variable
[5])) break; /*for*/
76 variable
[5] = CALL_abstract_collection___Iterator___item(variable
[4])(variable
[4]) /*Iterator::item*/ /* Ensure var: For item*/;
77 /* Register variable[6]: Local variable */
78 variable
[6] = variable
[5];
79 /* Register variable[7]: Local variable */
80 /* Register variable[8]: Local variable */
81 variable
[8] = variable
[2] /*rest*/;
82 /* Register variable[9]: Local variable */
83 variable
[9] = variable
[6] /*i*/;
84 /* Register variable[10]: Method return value and escape marker */
85 /* Register variable[11]: Result */
86 variable
[11] = TAG_Bool(UNTAG_Int( variable
[9] /*index*/)>=UNTAG_Int( TAG_Int(0)));
87 /* Ensure var variable[11]: Left 'and' operand*/
88 if (UNTAG_Bool(variable
[11])) { /* and */
89 /* Register variable[11]: Result */
90 variable
[11] = ATTR_array___AbstractArrayRead____length(variable
[8]) /*AbstractArrayRead::_length*/;
91 /* Register variable[11]: Result */
92 variable
[11] = TAG_Bool(UNTAG_Int( variable
[9] /*index*/)<UNTAG_Int(variable
[11]));
94 /* Register variable[11]: Result */
95 if (!UNTAG_Bool(variable
[11])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_abstracttool
, 234); nit_exit(1);}
96 /* Register variable[11]: Result */
97 variable
[11] = ATTR_array___Array____items(variable
[8]) /*Array::_items*/;
98 /* Register variable[11]: Result */
99 variable
[11] = UNBOX_NativeArray(variable
[11])[UNTAG_Int( variable
[9] /*index*/)];
100 variable
[10] = variable
[11];
102 return_label3
: while(false);
103 /* Register variable[8]: Result */
104 variable
[8] = variable
[10];
105 /* Register variable[8]: Result */
106 variable
[8] = CALL_mmloader___ToolContext___get_module_from_filename(variable
[0])(variable
[0], variable
[8]) /*ToolContext::get_module_from_filename*/;
107 variable
[7] = variable
[8];
108 CALL_abstract_collection___SimpleCollection___add( variable
[3] /*to_do*/)( variable
[3] /*to_do*/, variable
[7] /*mod*/) /*AbstractArray::add*/;
109 continue_2
: while(0);
110 CALL_abstract_collection___Iterator___next(variable
[4])(variable
[4]) /*Iterator::next*/;
113 /* Register variable[4]: Result */
114 variable
[4] = CALL_mmloader___ToolContext___opt_log(variable
[0])(variable
[0]) /*ToolContext::opt_log*/;
115 /* Register variable[4]: Result */
116 variable
[4] = CALL_opts___Option___value(variable
[4])(variable
[4]) /*Option::value*/;
117 if (UNTAG_Bool(variable
[4])) { /*if*/
118 CALL_abstracttool___AbstractCompiler___dump_context_info(variable
[0])(variable
[0]) /*AbstractCompiler::dump_context_info*/;
120 /* Register variable[4]: Result */
121 variable
[4] = CALL_abstract_collection___Collection___is_empty( variable
[3] /*to_do*/)( variable
[3] /*to_do*/) /*AbstractArrayRead::is_empty*/;
122 variable
[4] = TAG_Bool(!UNTAG_Bool(variable
[4])) /* Ensure var: Left 'and' operand*/;
123 if (UNTAG_Bool(variable
[4])) { /* and */
124 /* Register variable[4]: Result */
125 variable
[4] = CALL_mmloader___ToolContext___opt_only_metamodel(variable
[0])(variable
[0]) /*ToolContext::opt_only_metamodel*/;
126 /* Register variable[4]: Result */
127 variable
[4] = CALL_opts___Option___value(variable
[4])(variable
[4]) /*Option::value*/;
128 variable
[4] = TAG_Bool(!UNTAG_Bool(variable
[4]));
130 /* Register variable[4]: Result */
131 /* Ensure var variable[4]: Left 'and' operand*/
132 if (UNTAG_Bool(variable
[4])) { /* and */
133 /* Register variable[4]: Result */
134 variable
[4] = CALL_mmloader___ToolContext___opt_only_parse(variable
[0])(variable
[0]) /*ToolContext::opt_only_parse*/;
135 /* Register variable[4]: Result */
136 variable
[4] = CALL_opts___Option___value(variable
[4])(variable
[4]) /*Option::value*/;
137 variable
[4] = TAG_Bool(!UNTAG_Bool(variable
[4]));
139 /* Register variable[4]: Result */
140 if (UNTAG_Bool(variable
[4])) { /*if*/
141 CALL_abstracttool___AbstractCompiler___perform_work(variable
[0])(variable
[0], variable
[3] /*to_do*/) /*AbstractCompiler::perform_work*/;
143 return_label1
: while(false);
144 tracehead
= trace
.prev
;
147 void abstracttool___AbstractCompiler___perform_work(val_t self
, val_t param0
) {
148 struct trace_t trace
= {NULL
, NULL
, 63, LOCATE_abstracttool___AbstractCompiler___perform_work
};
149 val_t
*variable
= NULL
;
150 struct WBT_
**closurevariable
= NULL
;
151 trace
.prev
= tracehead
; tracehead
= &trace
;
152 trace
.file
= LOCATE_abstracttool
;
153 fprintf(stderr
, "Deferred method called");
154 fprintf(stderr
, " (%s:%d)\n", LOCATE_abstracttool
, 63);
156 tracehead
= trace
.prev
;
159 void abstracttool___AbstractCompiler___dump_context_info(val_t self
) {
160 struct trace_t trace
= {NULL
, NULL
, 65, LOCATE_abstracttool___AbstractCompiler___dump_context_info
};
161 static val_t once_value_6
= NIT_NULL
; /* Once value for string variable[5]*/
162 static val_t once_value_7
= NIT_NULL
; /* Once value for string variable[6]*/
163 static val_t once_value_8
= NIT_NULL
; /* Once value for string variable[6]*/
164 static val_t once_value_9
= NIT_NULL
; /* Once value for string variable[6]*/
165 static val_t once_value_10
= NIT_NULL
; /* Once value for string variable[6]*/
167 struct WBT_
**closurevariable
= NULL
;
168 trace
.prev
= tracehead
; tracehead
= &trace
;
169 trace
.file
= LOCATE_abstracttool
;
170 /* Register variable[0]: Local variable */
172 /* Register variable[1]: Method return value and escape marker */
173 /* Register variable[2]: Result */
174 variable
[2] = CALL_abstractmetamodel___MMContext___module_hierarchy(variable
[0])(variable
[0]) /*MMContext::module_hierarchy*/;
175 /* Register variable[2]: For iterator */
176 variable
[2] = CALL_abstract_collection___Collection___iterator(variable
[2])(variable
[2]) /*PartialOrder::iterator*/;
177 while (true) { /*for*/
178 /* Register variable[3]: For 'is_ok' result */
179 variable
[3] = CALL_abstract_collection___Iterator___is_ok(variable
[2])(variable
[2]) /*Iterator::is_ok*/;
180 if (!UNTAG_Bool(variable
[3])) break; /*for*/
181 variable
[3] = CALL_abstract_collection___Iterator___item(variable
[2])(variable
[2]) /*Iterator::item*/ /* Ensure var: For item*/;
182 /* Register variable[4]: Local variable */
183 variable
[4] = variable
[3];
184 CALL_abstracttool___MMModule___dump_module_info( variable
[4] /*mod*/)( variable
[4] /*mod*/) /*MMModule::dump_module_info*/;
185 continue_5
: while(0);
186 CALL_abstract_collection___Iterator___next(variable
[2])(variable
[2]) /*Iterator::next*/;
189 /* Register variable[2]: Local variable */
190 /* Register variable[3]: Result */
191 variable
[3] = NEW_Array_array___Array___init() /*new Array[MMModule]*/;
192 variable
[2] = variable
[3];
193 /* Register variable[3]: Result */
194 variable
[3] = CALL_abstractmetamodel___MMContext___module_hierarchy(variable
[0])(variable
[0]) /*MMContext::module_hierarchy*/;
195 CALL_abstract_collection___SimpleCollection___add_all( variable
[2] /*tab*/)( variable
[2] /*tab*/, variable
[3]) /*SimpleCollection::add_all*/;
196 /* Register variable[3]: Local variable */
197 /* Register variable[4]: Result */
198 variable
[4] = CALL_abstractmetamodel___MMContext___module_hierarchy(variable
[0])(variable
[0]) /*MMContext::module_hierarchy*/;
199 /* Register variable[4]: Result */
200 variable
[4] = CALL_partial_order___PartialOrder___select_smallests(variable
[4])(variable
[4], variable
[2] /*tab*/) /*PartialOrder::select_smallests*/;
201 /* Register variable[5]: Once String constant */
202 if (once_value_6
!= NIT_NULL
) variable
[5] = once_value_6
;
204 variable
[5] = NEW_String_string___String___with_native(BOX_NativeString("-"), TAG_Int(1)) /*new String*/;
205 once_value_6
= variable
[5];
207 /* Register variable[5]: Result */
208 /* Register variable[4]: Result */
209 variable
[4] = CALL_string___Collection___join(variable
[4])(variable
[4], variable
[5]) /*Collection::join*/;
210 variable
[3] = variable
[4];
211 /* Register variable[4]: Local variable */
212 variable
[5] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
213 /* Register variable[6]: Once String constant */
214 if (once_value_7
!= NIT_NULL
) variable
[6] = once_value_7
;
216 variable
[6] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
217 once_value_7
= variable
[6];
219 /* Register variable[6]: Result */
220 /* Ensure var variable[6]: super-string element*/
221 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
222 variable
[6] = variable
[3] /*name*/ /* Ensure var: super-string element*/;
223 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
224 /* Register variable[6]: Once String constant */
225 if (once_value_8
!= NIT_NULL
) variable
[6] = once_value_8
;
227 variable
[6] = NEW_String_string___String___with_native(BOX_NativeString(".full_class_hierarchy.new.dot"), TAG_Int(29)) /*new String*/;
228 once_value_8
= variable
[6];
230 /* Register variable[6]: Result */
231 /* Ensure var variable[6]: super-string element*/
232 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
233 /* Register variable[5]: Result */
234 variable
[5] = CALL_string___Object___to_s(variable
[5])(variable
[5]) /*Object::to_s*/;
235 /* Register variable[5]: Result */
236 variable
[5] = NEW_OFStream_file___OFStream___open(variable
[5]) /*new OFStream*/;
237 variable
[4] = variable
[5];
238 /* Register variable[5]: Result */
239 variable
[5] = CALL_abstractmetamodel___MMContext___class_hierarchy(variable
[0])(variable
[0]) /*MMContext::class_hierarchy*/;
240 /* Register variable[5]: Result */
241 variable
[5] = CALL_partial_order___PartialOrder___to_dot(variable
[5])(variable
[5]) /*PartialOrder::to_dot*/;
242 CALL_stream___OStream___write( variable
[4] /*f*/)( variable
[4] /*f*/, variable
[5]) /*OFStream::write*/;
243 CALL_stream___IOS___close( variable
[4] /*f*/)( variable
[4] /*f*/) /*OFStream::close*/;
244 variable
[5] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
245 /* Register variable[6]: Once String constant */
246 if (once_value_9
!= NIT_NULL
) variable
[6] = once_value_9
;
248 variable
[6] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
249 once_value_9
= variable
[6];
251 /* Register variable[6]: Result */
252 /* Ensure var variable[6]: super-string element*/
253 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
254 variable
[6] = variable
[3] /*name*/ /* Ensure var: super-string element*/;
255 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
256 /* Register variable[6]: Once String constant */
257 if (once_value_10
!= NIT_NULL
) variable
[6] = once_value_10
;
259 variable
[6] = NEW_String_string___String___with_native(BOX_NativeString(".module_hierarchy.new.dot"), TAG_Int(25)) /*new String*/;
260 once_value_10
= variable
[6];
262 /* Register variable[6]: Result */
263 /* Ensure var variable[6]: super-string element*/
264 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
265 /* Register variable[5]: Result */
266 variable
[5] = CALL_string___Object___to_s(variable
[5])(variable
[5]) /*Object::to_s*/;
267 /* Register variable[5]: Result */
268 variable
[5] = NEW_OFStream_file___OFStream___open(variable
[5]) /*new OFStream*/;
269 variable
[4] = variable
[5] /*f=*/;
270 /* Register variable[5]: Result */
271 variable
[5] = CALL_abstractmetamodel___MMContext___module_hierarchy(variable
[0])(variable
[0]) /*MMContext::module_hierarchy*/;
272 /* Register variable[5]: Result */
273 variable
[5] = CALL_partial_order___PartialOrder___to_dot(variable
[5])(variable
[5]) /*PartialOrder::to_dot*/;
274 CALL_stream___OStream___write( variable
[4] /*f*/)( variable
[4] /*f*/, variable
[5]) /*OFStream::write*/;
275 CALL_stream___IOS___close( variable
[4] /*f*/)( variable
[4] /*f*/) /*OFStream::close*/;
276 return_label4
: while(false);
277 tracehead
= trace
.prev
;
280 void abstracttool___MMModule___dump_module_info(val_t self
) {
281 struct trace_t trace
= {NULL
, NULL
, 85, LOCATE_abstracttool___MMModule___dump_module_info
};
282 static val_t once_value_12
= NIT_NULL
; /* Once value for string variable[5]*/
283 static val_t once_value_13
= NIT_NULL
; /* Once value for string variable[5]*/
284 static val_t once_value_14
= NIT_NULL
; /* Once value for string variable[5]*/
285 static val_t once_value_15
= NIT_NULL
; /* Once value for string variable[6]*/
286 static val_t once_value_16
= NIT_NULL
; /* Once value for string variable[6]*/
287 static val_t once_value_17
= NIT_NULL
; /* Once value for string variable[6]*/
288 static val_t once_value_18
= NIT_NULL
; /* Once value for string variable[6]*/
289 static val_t once_value_20
= NIT_NULL
; /* Once value for string variable[8]*/
291 struct WBT_
**closurevariable
= NULL
;
292 trace
.prev
= tracehead
; tracehead
= &trace
;
293 trace
.file
= LOCATE_abstracttool
;
294 /* Register variable[0]: Local variable */
296 /* Register variable[1]: Method return value and escape marker */
297 /* Register variable[2]: Local variable */
298 /* Register variable[3]: Result */
299 variable
[3] = CALL_abstractmetamodel___MMModule___filename(variable
[0])(variable
[0]) /*MMModule::filename*/;
300 /* Register variable[3]: Result */
301 variable
[3] = CALL_file___String___file_path(variable
[3])(variable
[3]) /*String::file_path*/;
302 variable
[2] = variable
[3];
303 /* Register variable[3]: Local variable */
304 variable
[4] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
305 /* Register variable[5]: Once String constant */
306 if (once_value_12
!= NIT_NULL
) variable
[5] = once_value_12
;
308 variable
[5] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
309 once_value_12
= variable
[5];
311 /* Register variable[5]: Result */
312 /* Ensure var variable[5]: super-string element*/
313 CALL_abstract_collection___SimpleCollection___add(variable
[4])(variable
[4], variable
[5]) /*AbstractArray::add*/;
314 variable
[5] = variable
[2] /*p*/ /* Ensure var: super-string element*/;
315 CALL_abstract_collection___SimpleCollection___add(variable
[4])(variable
[4], variable
[5]) /*AbstractArray::add*/;
316 /* Register variable[5]: Once String constant */
317 if (once_value_13
!= NIT_NULL
) variable
[5] = once_value_13
;
319 variable
[5] = NEW_String_string___String___with_native(BOX_NativeString("/"), TAG_Int(1)) /*new String*/;
320 once_value_13
= variable
[5];
322 /* Register variable[5]: Result */
323 /* Ensure var variable[5]: super-string element*/
324 CALL_abstract_collection___SimpleCollection___add(variable
[4])(variable
[4], variable
[5]) /*AbstractArray::add*/;
325 /* Register variable[5]: Result */
326 variable
[5] = CALL_abstractmetamodel___MMModule___name(variable
[0])(variable
[0]) /*MMModule::name*/;
327 /* Ensure var variable[5]: super-string element*/
328 CALL_abstract_collection___SimpleCollection___add(variable
[4])(variable
[4], CALL_string___Object___to_s(variable
[5])(variable
[5]) /*Object::to_s*/) /*AbstractArray::add*/;
329 /* Register variable[5]: Once String constant */
330 if (once_value_14
!= NIT_NULL
) variable
[5] = once_value_14
;
332 variable
[5] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
333 once_value_14
= variable
[5];
335 /* Register variable[5]: Result */
336 /* Ensure var variable[5]: super-string element*/
337 CALL_abstract_collection___SimpleCollection___add(variable
[4])(variable
[4], variable
[5]) /*AbstractArray::add*/;
338 /* Register variable[4]: Result */
339 variable
[4] = CALL_string___Object___to_s(variable
[4])(variable
[4]) /*Object::to_s*/;
340 variable
[3] = variable
[4];
341 /* Register variable[4]: Local variable */
342 variable
[5] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
343 /* Register variable[6]: Once String constant */
344 if (once_value_15
!= NIT_NULL
) variable
[6] = once_value_15
;
346 variable
[6] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
347 once_value_15
= variable
[6];
349 /* Register variable[6]: Result */
350 /* Ensure var variable[6]: super-string element*/
351 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
352 variable
[6] = variable
[3] /*fname*/ /* Ensure var: super-string element*/;
353 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
354 /* Register variable[6]: Once String constant */
355 if (once_value_16
!= NIT_NULL
) variable
[6] = once_value_16
;
357 variable
[6] = NEW_String_string___String___with_native(BOX_NativeString(".class_hierarchy.new.dot"), TAG_Int(24)) /*new String*/;
358 once_value_16
= variable
[6];
360 /* Register variable[6]: Result */
361 /* Ensure var variable[6]: super-string element*/
362 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
363 /* Register variable[5]: Result */
364 variable
[5] = CALL_string___Object___to_s(variable
[5])(variable
[5]) /*Object::to_s*/;
365 /* Register variable[5]: Result */
366 variable
[5] = NEW_OFStream_file___OFStream___open(variable
[5]) /*new OFStream*/;
367 variable
[4] = variable
[5];
368 /* Register variable[5]: Result */
369 variable
[5] = CALL_abstractmetamodel___MMModule___class_specialization_hierarchy(variable
[0])(variable
[0]) /*MMModule::class_specialization_hierarchy*/;
370 /* Register variable[5]: Result */
371 variable
[5] = CALL_partial_order___PartialOrder___to_dot(variable
[5])(variable
[5]) /*PartialOrder::to_dot*/;
372 CALL_stream___OStream___write( variable
[4] /*f*/)( variable
[4] /*f*/, variable
[5]) /*OFStream::write*/;
373 CALL_stream___IOS___close( variable
[4] /*f*/)( variable
[4] /*f*/) /*OFStream::close*/;
374 variable
[5] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
375 /* Register variable[6]: Once String constant */
376 if (once_value_17
!= NIT_NULL
) variable
[6] = once_value_17
;
378 variable
[6] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
379 once_value_17
= variable
[6];
381 /* Register variable[6]: Result */
382 /* Ensure var variable[6]: super-string element*/
383 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
384 variable
[6] = variable
[3] /*fname*/ /* Ensure var: super-string element*/;
385 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
386 /* Register variable[6]: Once String constant */
387 if (once_value_18
!= NIT_NULL
) variable
[6] = once_value_18
;
389 variable
[6] = NEW_String_string___String___with_native(BOX_NativeString(".properties.log"), TAG_Int(15)) /*new String*/;
390 once_value_18
= variable
[6];
392 /* Register variable[6]: Result */
393 /* Ensure var variable[6]: super-string element*/
394 CALL_abstract_collection___SimpleCollection___add(variable
[5])(variable
[5], variable
[6]) /*AbstractArray::add*/;
395 /* Register variable[5]: Result */
396 variable
[5] = CALL_string___Object___to_s(variable
[5])(variable
[5]) /*Object::to_s*/;
397 /* Register variable[5]: Result */
398 variable
[5] = NEW_OFStream_file___OFStream___open(variable
[5]) /*new OFStream*/;
399 variable
[4] = variable
[5] /*f=*/;
400 /* Register variable[5]: Result */
401 variable
[5] = CALL_abstractmetamodel___MMModule___local_classes(variable
[0])(variable
[0]) /*MMModule::local_classes*/;
402 /* Register variable[5]: For iterator */
403 variable
[5] = CALL_abstract_collection___Collection___iterator(variable
[5])(variable
[5]) /*AbstractArrayRead::iterator*/;
404 while (true) { /*for*/
405 /* Register variable[6]: For 'is_ok' result */
406 variable
[6] = CALL_abstract_collection___Iterator___is_ok(variable
[5])(variable
[5]) /*ArrayIterator::is_ok*/;
407 if (!UNTAG_Bool(variable
[6])) break; /*for*/
408 variable
[6] = CALL_abstract_collection___Iterator___item(variable
[5])(variable
[5]) /*ArrayIterator::item*/ /* Ensure var: For item*/;
409 /* Register variable[7]: Local variable */
410 variable
[7] = variable
[6];
411 CALL_abstracttool___MMLocalClass___dump_properties( variable
[7] /*cla*/)( variable
[7] /*cla*/, variable
[4] /*f*/) /*MMLocalClass::dump_properties*/;
412 /* Register variable[8]: Once String constant */
413 if (once_value_20
!= NIT_NULL
) variable
[8] = once_value_20
;
415 variable
[8] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)) /*new String*/;
416 once_value_20
= variable
[8];
418 /* Register variable[8]: Result */
419 CALL_stream___OStream___write( variable
[4] /*f*/)( variable
[4] /*f*/, variable
[8]) /*OFStream::write*/;
420 continue_19
: while(0);
421 CALL_abstract_collection___Iterator___next(variable
[5])(variable
[5]) /*ArrayIterator::next*/;
424 CALL_stream___IOS___close( variable
[4] /*f*/)( variable
[4] /*f*/) /*OFStream::close*/;
425 return_label11
: while(false);
426 tracehead
= trace
.prev
;
429 void abstracttool___MMLocalClass___dump_properties(val_t self
, val_t param0
) {
430 struct trace_t trace
= {NULL
, NULL
, 103, LOCATE_abstracttool___MMLocalClass___dump_properties
};
431 static val_t once_value_22
= NIT_NULL
; /* Once value for string variable[4]*/
432 static val_t once_value_23
= NIT_NULL
; /* Once value for string variable[4]*/
433 static val_t once_value_25
= NIT_NULL
; /* Once value for string variable[8]*/
434 static val_t once_value_26
= NIT_NULL
; /* Once value for string variable[8]*/
435 static val_t once_value_27
= NIT_NULL
; /* Once value for string variable[8]*/
436 static val_t once_value_28
= NIT_NULL
; /* Once value for string variable[4]*/
437 static val_t once_value_29
= NIT_NULL
; /* Once value for string variable[4]*/
439 struct WBT_
**closurevariable
= NULL
;
440 trace
.prev
= tracehead
; tracehead
= &trace
;
441 trace
.file
= LOCATE_abstracttool
;
442 /* Register variable[0]: Local variable */
444 /* Register variable[1]: Local variable */
445 variable
[1] = param0
;
446 /* Register variable[2]: Method return value and escape marker */
447 variable
[3] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
448 /* Register variable[4]: Once String constant */
449 if (once_value_22
!= NIT_NULL
) variable
[4] = once_value_22
;
451 variable
[4] = NEW_String_string___String___with_native(BOX_NativeString("class "), TAG_Int(6)) /*new String*/;
452 once_value_22
= variable
[4];
454 /* Register variable[4]: Result */
455 /* Ensure var variable[4]: super-string element*/
456 CALL_abstract_collection___SimpleCollection___add(variable
[3])(variable
[3], variable
[4]) /*AbstractArray::add*/;
457 /* Ensure var variable[0]: super-string element*/
458 CALL_abstract_collection___SimpleCollection___add(variable
[3])(variable
[3], CALL_string___Object___to_s(variable
[0])(variable
[0]) /*Object::to_s*/) /*AbstractArray::add*/;
459 /* Register variable[4]: Once String constant */
460 if (once_value_23
!= NIT_NULL
) variable
[4] = once_value_23
;
462 variable
[4] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)) /*new String*/;
463 once_value_23
= variable
[4];
465 /* Register variable[4]: Result */
466 /* Ensure var variable[4]: super-string element*/
467 CALL_abstract_collection___SimpleCollection___add(variable
[3])(variable
[3], variable
[4]) /*AbstractArray::add*/;
468 /* Register variable[3]: Result */
469 variable
[3] = CALL_string___Object___to_s(variable
[3])(variable
[3]) /*Object::to_s*/;
470 CALL_stream___OStream___write( variable
[1] /*file*/)( variable
[1] /*file*/, variable
[3]) /*OStream::write*/;
471 /* Register variable[3]: Result */
472 variable
[3] = CALL_abstractmetamodel___MMLocalClass___global_properties(variable
[0])(variable
[0]) /*MMLocalClass::global_properties*/;
473 /* Register variable[3]: For iterator */
474 variable
[3] = CALL_abstract_collection___Collection___iterator(variable
[3])(variable
[3]) /*Collection::iterator*/;
475 while (true) { /*for*/
476 /* Register variable[4]: For 'is_ok' result */
477 variable
[4] = CALL_abstract_collection___Iterator___is_ok(variable
[3])(variable
[3]) /*Iterator::is_ok*/;
478 if (!UNTAG_Bool(variable
[4])) break; /*for*/
479 variable
[4] = CALL_abstract_collection___Iterator___item(variable
[3])(variable
[3]) /*Iterator::item*/ /* Ensure var: For item*/;
480 /* Register variable[5]: Local variable */
481 variable
[5] = variable
[4];
482 /* Register variable[6]: Local variable */
483 /* Register variable[7]: Result */
484 variable
[7] = CALL_abstractmetamodel___MMLocalClass_____bra(variable
[0])(variable
[0], variable
[5] /*p*/) /*MMLocalClass::[]*/;
485 variable
[6] = variable
[7];
486 variable
[7] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
487 /* Register variable[8]: Once String constant */
488 if (once_value_25
!= NIT_NULL
) variable
[8] = once_value_25
;
490 variable
[8] = NEW_String_string___String___with_native(BOX_NativeString("\t"), TAG_Int(1)) /*new String*/;
491 once_value_25
= variable
[8];
493 /* Register variable[8]: Result */
494 /* Ensure var variable[8]: super-string element*/
495 CALL_abstract_collection___SimpleCollection___add(variable
[7])(variable
[7], variable
[8]) /*AbstractArray::add*/;
496 variable
[8] = variable
[6] /*lp*/ /* Ensure var: super-string element*/;
497 CALL_abstract_collection___SimpleCollection___add(variable
[7])(variable
[7], CALL_string___Object___to_s(variable
[8])(variable
[8]) /*Object::to_s*/) /*AbstractArray::add*/;
498 /* Register variable[8]: Once String constant */
499 if (once_value_26
!= NIT_NULL
) variable
[8] = once_value_26
;
501 variable
[8] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
502 once_value_26
= variable
[8];
504 /* Register variable[8]: Result */
505 /* Ensure var variable[8]: super-string element*/
506 CALL_abstract_collection___SimpleCollection___add(variable
[7])(variable
[7], variable
[8]) /*AbstractArray::add*/;
507 /* Register variable[8]: Result */
508 variable
[8] = CALL_static_type___MMLocalClass___get_type(variable
[0])(variable
[0]) /*MMLocalClass::get_type*/;
509 /* Register variable[8]: Result */
510 variable
[8] = CALL_static_type___MMLocalProperty___signature_for( variable
[6] /*lp*/)( variable
[6] /*lp*/, variable
[8]) /*MMLocalProperty::signature_for*/;
511 /* Ensure var variable[8]: super-string element*/
512 CALL_abstract_collection___SimpleCollection___add(variable
[7])(variable
[7], CALL_string___Object___to_s(variable
[8])(variable
[8]) /*Object::to_s*/) /*AbstractArray::add*/;
513 /* Register variable[8]: Once String constant */
514 if (once_value_27
!= NIT_NULL
) variable
[8] = once_value_27
;
516 variable
[8] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)) /*new String*/;
517 once_value_27
= variable
[8];
519 /* Register variable[8]: Result */
520 /* Ensure var variable[8]: super-string element*/
521 CALL_abstract_collection___SimpleCollection___add(variable
[7])(variable
[7], variable
[8]) /*AbstractArray::add*/;
522 /* Register variable[7]: Result */
523 variable
[7] = CALL_string___Object___to_s(variable
[7])(variable
[7]) /*Object::to_s*/;
524 CALL_stream___OStream___write( variable
[1] /*file*/)( variable
[1] /*file*/, variable
[7]) /*OStream::write*/;
525 continue_24
: while(0);
526 CALL_abstract_collection___Iterator___next(variable
[3])(variable
[3]) /*Iterator::next*/;
529 variable
[3] = NEW_Array_array___Array___with_capacity(TAG_Int(3)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
530 /* Register variable[4]: Once String constant */
531 if (once_value_28
!= NIT_NULL
) variable
[4] = once_value_28
;
533 variable
[4] = NEW_String_string___String___with_native(BOX_NativeString("end # "), TAG_Int(6)) /*new String*/;
534 once_value_28
= variable
[4];
536 /* Register variable[4]: Result */
537 /* Ensure var variable[4]: super-string element*/
538 CALL_abstract_collection___SimpleCollection___add(variable
[3])(variable
[3], variable
[4]) /*AbstractArray::add*/;
539 /* Ensure var variable[0]: super-string element*/
540 CALL_abstract_collection___SimpleCollection___add(variable
[3])(variable
[3], CALL_string___Object___to_s(variable
[0])(variable
[0]) /*Object::to_s*/) /*AbstractArray::add*/;
541 /* Register variable[4]: Once String constant */
542 if (once_value_29
!= NIT_NULL
) variable
[4] = once_value_29
;
544 variable
[4] = NEW_String_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)) /*new String*/;
545 once_value_29
= variable
[4];
547 /* Register variable[4]: Result */
548 /* Ensure var variable[4]: super-string element*/
549 CALL_abstract_collection___SimpleCollection___add(variable
[3])(variable
[3], variable
[4]) /*AbstractArray::add*/;
550 /* Register variable[3]: Result */
551 variable
[3] = CALL_string___Object___to_s(variable
[3])(variable
[3]) /*Object::to_s*/;
552 CALL_stream___OStream___write( variable
[1] /*file*/)( variable
[1] /*file*/, variable
[3]) /*OStream::write*/;
553 return_label21
: while(false);
554 tracehead
= trace
.prev
;