1 /* This C file is generated by NIT to compile module standard___exec. */
2 #include "standard___exec._sep.h"
3 val_t
standard___exec___Process___id(val_t p0
){
4 struct {struct stack_frame_t me
;} fra
;
7 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
8 fra
.me
.file
= LOCATE_standard___exec
;
10 fra
.me
.meth
= LOCATE_standard___exec___Process___id
;
13 fra
.me
.REG
[0] = NIT_NULL
;
15 /* ./../lib/standard//exec.nit:24 */
16 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[0])!=NIT_NULL
);
17 if (UNTAG_Bool(REGB0
)) {
19 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 24);
21 fra
.me
.REG
[0] = ATTR_standard___exec___Process____data(fra
.me
.REG
[0]);
22 REGB0
= CALL_standard___exec___NativeProcess___id(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
25 stack_frame_head
= fra
.me
.prev
;
28 val_t
standard___exec___Process___is_finished(val_t p0
){
29 struct {struct stack_frame_t me
;} fra
;
32 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
33 fra
.me
.file
= LOCATE_standard___exec
;
35 fra
.me
.meth
= LOCATE_standard___exec___Process___is_finished
;
38 fra
.me
.REG
[0] = NIT_NULL
;
40 /* ./../lib/standard//exec.nit:27 */
41 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[0])!=NIT_NULL
);
42 if (UNTAG_Bool(REGB0
)) {
44 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 27);
46 fra
.me
.REG
[0] = ATTR_standard___exec___Process____data(fra
.me
.REG
[0]);
47 REGB0
= CALL_standard___exec___NativeProcess___is_finished(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
50 stack_frame_head
= fra
.me
.prev
;
53 void standard___exec___Process___wait(val_t p0
){
54 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
57 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
58 fra
.me
.file
= LOCATE_standard___exec
;
60 fra
.me
.meth
= LOCATE_standard___exec___Process___wait
;
63 fra
.me
.REG
[0] = NIT_NULL
;
64 fra
.me
.REG
[1] = NIT_NULL
;
66 /* ./../lib/standard//exec.nit:32 */
67 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[0])!=NIT_NULL
);
68 if (UNTAG_Bool(REGB0
)) {
70 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 32);
72 fra
.me
.REG
[1] = ATTR_standard___exec___Process____data(fra
.me
.REG
[0]);
73 CALL_standard___exec___NativeProcess___wait(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
74 /* ./../lib/standard//exec.nit:33 */
75 REGB0
= CALL_standard___exec___Process___is_finished(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
76 if (UNTAG_Bool(REGB0
)) {
78 nit_abort("Assert failed", NULL
, LOCATE_standard___exec
, 33);
80 stack_frame_head
= fra
.me
.prev
;
83 val_t
standard___exec___Process___status(val_t p0
){
84 struct {struct stack_frame_t me
;} fra
;
87 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
88 fra
.me
.file
= LOCATE_standard___exec
;
90 fra
.me
.meth
= LOCATE_standard___exec___Process___status
;
93 fra
.me
.REG
[0] = NIT_NULL
;
95 /* ./../lib/standard//exec.nit:39 */
96 REGB0
= CALL_standard___exec___Process___is_finished(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
97 if (UNTAG_Bool(REGB0
)) {
99 nit_abort("Assert failed", NULL
, LOCATE_standard___exec
, 39);
101 /* ./../lib/standard//exec.nit:40 */
102 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[0])!=NIT_NULL
);
103 if (UNTAG_Bool(REGB0
)) {
105 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 40);
107 fra
.me
.REG
[0] = ATTR_standard___exec___Process____data(fra
.me
.REG
[0]);
108 REGB0
= CALL_standard___exec___NativeProcess___status(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
111 stack_frame_head
= fra
.me
.prev
;
114 void standard___exec___Process___init(val_t p0
, val_t p1
, val_t p2
, int* init_table
){
115 int itpos0
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___exec___Process
].i
;
116 struct {struct stack_frame_t me
; val_t MORE_REG
[3];} fra
;
119 if (init_table
[itpos0
]) return;
120 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
121 fra
.me
.file
= LOCATE_standard___exec
;
123 fra
.me
.meth
= LOCATE_standard___exec___Process___init
;
124 fra
.me
.has_broke
= 0;
126 fra
.me
.REG
[0] = NIT_NULL
;
127 fra
.me
.REG
[1] = NIT_NULL
;
128 fra
.me
.REG
[2] = NIT_NULL
;
129 fra
.me
.REG
[3] = NIT_NULL
;
133 /* ./../lib/standard//exec.nit:43 */
134 fra
.me
.REG
[3] = fra
.me
.REG
[0];
135 REGB0
= TAG_Bool(VAL_ISA(fra
.me
.REG
[2], COLOR_standard___collection___array___Array
, ID_standard___collection___array___Array
)) /*cast Array[String]*/;
136 if (UNTAG_Bool(REGB0
)) {
138 nit_abort("Cast failed", NULL
, LOCATE_standard___exec
, 43);
140 /* ./../lib/standard//exec.nit:46 */
142 CALL_standard___exec___Process___execute(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[1], fra
.me
.REG
[2], REGB0
, init_table
);
143 stack_frame_head
= fra
.me
.prev
;
144 init_table
[itpos0
] = 1;
147 void standard___exec___Process___init_(val_t p0
, val_t p1
, int* init_table
){
148 int itpos1
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___exec___Process
].i
;
149 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
152 if (init_table
[itpos1
]) return;
153 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
154 fra
.me
.file
= LOCATE_standard___exec
;
156 fra
.me
.meth
= LOCATE_standard___exec___Process___init_
;
157 fra
.me
.has_broke
= 0;
159 fra
.me
.REG
[0] = NIT_NULL
;
160 fra
.me
.REG
[1] = NIT_NULL
;
163 /* ./../lib/standard//exec.nit:52 */
165 CALL_standard___exec___Process___execute(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], NIT_NULL
, REGB0
, init_table
);
166 stack_frame_head
= fra
.me
.prev
;
167 init_table
[itpos1
] = 1;
170 void standard___exec___Process___execute(val_t p0
, val_t p1
, val_t p2
, val_t p3
, int* init_table
){
171 int itpos2
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___exec___Process
].i
;
172 struct {struct stack_frame_t me
; val_t MORE_REG
[6];} fra
;
179 if (init_table
[itpos2
]) return;
180 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
181 fra
.me
.file
= LOCATE_standard___exec
;
183 fra
.me
.meth
= LOCATE_standard___exec___Process___execute
;
184 fra
.me
.has_broke
= 0;
186 fra
.me
.REG
[0] = NIT_NULL
;
187 fra
.me
.REG
[1] = NIT_NULL
;
188 fra
.me
.REG
[2] = NIT_NULL
;
189 fra
.me
.REG
[3] = NIT_NULL
;
190 fra
.me
.REG
[4] = NIT_NULL
;
191 fra
.me
.REG
[5] = NIT_NULL
;
192 fra
.me
.REG
[6] = NIT_NULL
;
197 /* ./../lib/standard//exec.nit:58 */
198 fra
.me
.REG
[3] = NEW_Buffer_standard___string___Buffer___init();
199 /* ./../lib/standard//exec.nit:59 */
201 /* ./../lib/standard//exec.nit:60 */
202 CALL_standard___collection___abstract_collection___Sequence___append(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[1]);
203 /* ./../lib/standard//exec.nit:61 */
204 REGB2
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
205 if (UNTAG_Bool(REGB2
)) {
207 REGB3
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
208 if (UNTAG_Bool(REGB3
)) {
209 REGB3
= TAG_Bool(false);
212 REGB3
= CALL_standard___kernel___Object_____eqeq(fra
.me
.REG
[2])(fra
.me
.REG
[2], NIT_NULL
);
216 REGB2
= TAG_Bool(!UNTAG_Bool(REGB2
));
217 if (UNTAG_Bool(REGB2
)) {
218 /* ./../lib/standard//exec.nit:62 */
219 REGB2
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
220 if (UNTAG_Bool(REGB2
)) {
221 nit_abort("Reciever is null", NULL
, LOCATE_standard___exec
, 62);
223 /* ./../lib/standard//collection//array.nit:266 */
224 fra
.me
.REG
[4] = fra
.me
.REG
[2];
225 /* ./../lib/standard//collection//array.nit:269 */
227 /* ./../lib/standard//collection//array.nit:270 */
228 REGB3
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[4])!=NIT_NULL
);
229 if (UNTAG_Bool(REGB3
)) {
231 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 270);
233 REGB3
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[4]);
234 /* ./../lib/standard//collection//array.nit:271 */
235 fra
.me
.REG
[5] = ATTR_standard___collection___array___Array____items(fra
.me
.REG
[4]);
236 /* ./../lib/standard//collection//array.nit:272 */
238 /* ./../lib/standard//collection//array.nit:24 */
239 REGB3
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[4])!=NIT_NULL
);
240 if (UNTAG_Bool(REGB3
)) {
242 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
244 REGB3
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[4]);
245 REGB4
= TAG_Bool(VAL_ISA(REGB3
, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2
), VTID_standard___kernel___Comparable___OTHER(REGB2
))) /*cast OTHER*/;
246 if (UNTAG_Bool(REGB4
)) {
248 nit_abort("Cast failed", NULL
, LOCATE_standard___kernel
, 0);
250 /* ./../lib/standard//kernel.nit:232 */
251 REGB3
= TAG_Bool(UNTAG_Int(REGB2
)<UNTAG_Int(REGB3
));
252 /* ./../lib/standard//collection//array.nit:272 */
253 if (UNTAG_Bool(REGB3
)) {
254 /* ./../lib/standard//collection//array.nit:273 */
255 REGB3
= TAG_Bool(fra
.me
.REG
[5]==NIT_NULL
);
256 if (UNTAG_Bool(REGB3
)) {
257 nit_abort("Reciever is null", NULL
, LOCATE_standard___collection___array
, 273);
259 /* ./../lib/standard//collection//array.nit:718 */
260 fra
.me
.REG
[6] = ((Nit_NativeArray
)fra
.me
.REG
[5])->val
[UNTAG_Int(REGB2
)];
261 /* ./../lib/standard//exec.nit:63 */
262 REGB3
= TAG_Char('\0');
263 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra
.me
.REG
[3])(fra
.me
.REG
[3], REGB3
);
264 /* ./../lib/standard//exec.nit:64 */
265 CALL_standard___collection___abstract_collection___Sequence___append(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[6]);
266 /* ./../lib/standard//collection//array.nit:274 */
268 /* ./../lib/standard//kernel.nit:235 */
269 REGB3
= TAG_Int(UNTAG_Int(REGB2
)+UNTAG_Int(REGB3
));
270 /* ./../lib/standard//collection//array.nit:274 */
273 /* ./../lib/standard//collection//array.nit:272 */
278 /* ./../lib/standard//exec.nit:66 */
279 REGB2
= TAG_Bool(fra
.me
.REG
[2]==NIT_NULL
);
280 if (UNTAG_Bool(REGB2
)) {
281 nit_abort("Reciever is null", NULL
, LOCATE_standard___exec
, 66);
283 /* ./../lib/standard//collection//array.nit:24 */
284 REGB2
= TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2])!=NIT_NULL
);
285 if (UNTAG_Bool(REGB2
)) {
287 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array
, 24);
289 REGB2
= ATTR_standard___collection___array___AbstractArrayRead____length(fra
.me
.REG
[2]);
290 /* ./../lib/standard//kernel.nit:235 */
291 REGB2
= TAG_Int(UNTAG_Int(REGB1
)+UNTAG_Int(REGB2
));
292 /* ./../lib/standard//exec.nit:66 */
295 /* ./../lib/standard//exec.nit:68 */
296 fra
.me
.REG
[1] = CALL_standard___string___String___to_cstring(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
297 fra
.me
.REG
[3] = CALL_standard___string___Object___to_s(fra
.me
.REG
[3])(fra
.me
.REG
[3]);
298 fra
.me
.REG
[3] = CALL_standard___string___String___to_cstring(fra
.me
.REG
[3])(fra
.me
.REG
[3]);
299 fra
.me
.REG
[3] = CALL_standard___exec___Process___basic_exec_execute(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], fra
.me
.REG
[3], REGB1
, REGB0
);
300 ATTR_standard___exec___Process____data(fra
.me
.REG
[0]) = fra
.me
.REG
[3];
301 stack_frame_head
= fra
.me
.prev
;
302 init_table
[itpos2
] = 1;
305 val_t
standard___exec___Process___basic_exec_execute(val_t p0
, val_t p1
, val_t p2
, val_t p3
, val_t p4
){
306 struct {struct stack_frame_t me
; val_t MORE_REG
[2];} fra
;
310 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
311 fra
.me
.file
= LOCATE_standard___exec
;
313 fra
.me
.meth
= LOCATE_standard___exec___Process___basic_exec_execute
;
314 fra
.me
.has_broke
= 0;
316 fra
.me
.REG
[0] = NIT_NULL
;
317 fra
.me
.REG
[1] = NIT_NULL
;
318 fra
.me
.REG
[2] = NIT_NULL
;
324 /* ./../lib/standard//exec.nit:72 */
325 fra
.me
.REG
[2] = Process_basic_exec_execute___out(fra
.me
.REG
[0], fra
.me
.REG
[1], fra
.me
.REG
[2], REGB0
, REGB1
);
326 stack_frame_head
= fra
.me
.prev
;
327 return fra
.me
.REG
[2];
329 void standard___exec___IProcess___close(val_t p0
){
330 struct {struct stack_frame_t me
;} fra
;
333 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
334 fra
.me
.file
= LOCATE_standard___exec
;
336 fra
.me
.meth
= LOCATE_standard___exec___IProcess___close
;
337 fra
.me
.has_broke
= 0;
339 fra
.me
.REG
[0] = NIT_NULL
;
341 /* ./../lib/standard//exec.nit:81 */
342 REGB0
= TAG_Bool(ATTR_standard___exec___IProcess____in(fra
.me
.REG
[0])!=NIT_NULL
);
343 if (UNTAG_Bool(REGB0
)) {
345 nit_abort("Uninitialized attribute %s", "_in", LOCATE_standard___exec
, 81);
347 fra
.me
.REG
[0] = ATTR_standard___exec___IProcess____in(fra
.me
.REG
[0]);
348 CALL_standard___stream___IOS___close(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
349 stack_frame_head
= fra
.me
.prev
;
352 val_t
standard___exec___IProcess___read_char(val_t p0
){
353 struct {struct stack_frame_t me
;} fra
;
356 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
357 fra
.me
.file
= LOCATE_standard___exec
;
359 fra
.me
.meth
= LOCATE_standard___exec___IProcess___read_char
;
360 fra
.me
.has_broke
= 0;
362 fra
.me
.REG
[0] = NIT_NULL
;
364 /* ./../lib/standard//exec.nit:83 */
365 REGB0
= TAG_Bool(ATTR_standard___exec___IProcess____in(fra
.me
.REG
[0])!=NIT_NULL
);
366 if (UNTAG_Bool(REGB0
)) {
368 nit_abort("Uninitialized attribute %s", "_in", LOCATE_standard___exec
, 83);
370 fra
.me
.REG
[0] = ATTR_standard___exec___IProcess____in(fra
.me
.REG
[0]);
371 REGB0
= CALL_standard___stream___IStream___read_char(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
374 stack_frame_head
= fra
.me
.prev
;
377 val_t
standard___exec___IProcess___eof(val_t p0
){
378 struct {struct stack_frame_t me
;} fra
;
381 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
382 fra
.me
.file
= LOCATE_standard___exec
;
384 fra
.me
.meth
= LOCATE_standard___exec___IProcess___eof
;
385 fra
.me
.has_broke
= 0;
387 fra
.me
.REG
[0] = NIT_NULL
;
389 /* ./../lib/standard//exec.nit:85 */
390 REGB0
= TAG_Bool(ATTR_standard___exec___IProcess____in(fra
.me
.REG
[0])!=NIT_NULL
);
391 if (UNTAG_Bool(REGB0
)) {
393 nit_abort("Uninitialized attribute %s", "_in", LOCATE_standard___exec
, 85);
395 fra
.me
.REG
[0] = ATTR_standard___exec___IProcess____in(fra
.me
.REG
[0]);
396 REGB0
= CALL_standard___stream___IStream___eof(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
399 stack_frame_head
= fra
.me
.prev
;
402 void standard___exec___IProcess___init(val_t p0
, val_t p1
, val_t p2
, int* init_table
){
403 int itpos3
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___exec___IProcess
].i
;
404 struct {struct stack_frame_t me
; val_t MORE_REG
[3];} fra
;
407 if (init_table
[itpos3
]) return;
408 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
409 fra
.me
.file
= LOCATE_standard___exec
;
411 fra
.me
.meth
= LOCATE_standard___exec___IProcess___init
;
412 fra
.me
.has_broke
= 0;
414 fra
.me
.REG
[0] = NIT_NULL
;
415 fra
.me
.REG
[1] = NIT_NULL
;
416 fra
.me
.REG
[2] = NIT_NULL
;
417 fra
.me
.REG
[3] = NIT_NULL
;
421 /* ./../lib/standard//exec.nit:87 */
422 fra
.me
.REG
[3] = fra
.me
.REG
[0];
423 REGB0
= TAG_Bool(VAL_ISA(fra
.me
.REG
[2], COLOR_standard___collection___array___Array
, ID_standard___collection___array___Array
)) /*cast Array[String]*/;
424 if (UNTAG_Bool(REGB0
)) {
426 nit_abort("Cast failed", NULL
, LOCATE_standard___exec
, 87);
428 /* ./../lib/standard//exec.nit:89 */
430 CALL_standard___exec___Process___execute(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[1], fra
.me
.REG
[2], REGB0
, init_table
);
431 /* ./../lib/standard//exec.nit:90 */
432 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[3])!=NIT_NULL
);
433 if (UNTAG_Bool(REGB0
)) {
435 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 90);
437 fra
.me
.REG
[2] = ATTR_standard___exec___Process____data(fra
.me
.REG
[3]);
438 REGB0
= CALL_standard___exec___NativeProcess___out_fd(fra
.me
.REG
[2])(fra
.me
.REG
[2]);
439 fra
.me
.REG
[2] = NEW_FDIStream_standard___stream___FDIStream___init(REGB0
);
440 ATTR_standard___exec___IProcess____in(fra
.me
.REG
[3]) = fra
.me
.REG
[2];
441 stack_frame_head
= fra
.me
.prev
;
442 init_table
[itpos3
] = 1;
445 void standard___exec___IProcess___init_(val_t p0
, val_t p1
, int* init_table
){
446 int itpos4
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___exec___IProcess
].i
;
447 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
450 if (init_table
[itpos4
]) return;
451 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
452 fra
.me
.file
= LOCATE_standard___exec
;
454 fra
.me
.meth
= LOCATE_standard___exec___IProcess___init_
;
455 fra
.me
.has_broke
= 0;
457 fra
.me
.REG
[0] = NIT_NULL
;
458 fra
.me
.REG
[1] = NIT_NULL
;
461 /* ./../lib/standard//exec.nit:95 */
463 CALL_standard___exec___Process___execute(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], NIT_NULL
, REGB0
, init_table
);
464 /* ./../lib/standard//exec.nit:96 */
465 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[0])!=NIT_NULL
);
466 if (UNTAG_Bool(REGB0
)) {
468 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 96);
470 fra
.me
.REG
[1] = ATTR_standard___exec___Process____data(fra
.me
.REG
[0]);
471 REGB0
= CALL_standard___exec___NativeProcess___out_fd(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
472 fra
.me
.REG
[1] = NEW_FDIStream_standard___stream___FDIStream___init(REGB0
);
473 ATTR_standard___exec___IProcess____in(fra
.me
.REG
[0]) = fra
.me
.REG
[1];
474 stack_frame_head
= fra
.me
.prev
;
475 init_table
[itpos4
] = 1;
478 void standard___exec___OProcess___close(val_t p0
){
479 struct {struct stack_frame_t me
;} fra
;
482 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
483 fra
.me
.file
= LOCATE_standard___exec
;
485 fra
.me
.meth
= LOCATE_standard___exec___OProcess___close
;
486 fra
.me
.has_broke
= 0;
488 fra
.me
.REG
[0] = NIT_NULL
;
490 /* ./../lib/standard//exec.nit:106 */
491 REGB0
= TAG_Bool(ATTR_standard___exec___OProcess____out(fra
.me
.REG
[0])!=NIT_NULL
);
492 if (UNTAG_Bool(REGB0
)) {
494 nit_abort("Uninitialized attribute %s", "_out", LOCATE_standard___exec
, 106);
496 fra
.me
.REG
[0] = ATTR_standard___exec___OProcess____out(fra
.me
.REG
[0]);
497 CALL_standard___stream___IOS___close(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
498 stack_frame_head
= fra
.me
.prev
;
501 val_t
standard___exec___OProcess___is_writable(val_t p0
){
502 struct {struct stack_frame_t me
;} fra
;
505 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
506 fra
.me
.file
= LOCATE_standard___exec
;
508 fra
.me
.meth
= LOCATE_standard___exec___OProcess___is_writable
;
509 fra
.me
.has_broke
= 0;
511 fra
.me
.REG
[0] = NIT_NULL
;
513 /* ./../lib/standard//exec.nit:108 */
514 REGB0
= TAG_Bool(ATTR_standard___exec___OProcess____out(fra
.me
.REG
[0])!=NIT_NULL
);
515 if (UNTAG_Bool(REGB0
)) {
517 nit_abort("Uninitialized attribute %s", "_out", LOCATE_standard___exec
, 108);
519 fra
.me
.REG
[0] = ATTR_standard___exec___OProcess____out(fra
.me
.REG
[0]);
520 REGB0
= CALL_standard___stream___OStream___is_writable(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
523 stack_frame_head
= fra
.me
.prev
;
526 void standard___exec___OProcess___write(val_t p0
, val_t p1
){
527 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
530 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
531 fra
.me
.file
= LOCATE_standard___exec
;
533 fra
.me
.meth
= LOCATE_standard___exec___OProcess___write
;
534 fra
.me
.has_broke
= 0;
536 fra
.me
.REG
[0] = NIT_NULL
;
537 fra
.me
.REG
[1] = NIT_NULL
;
540 /* ./../lib/standard//exec.nit:110 */
541 REGB0
= TAG_Bool(ATTR_standard___exec___OProcess____out(fra
.me
.REG
[0])!=NIT_NULL
);
542 if (UNTAG_Bool(REGB0
)) {
544 nit_abort("Uninitialized attribute %s", "_out", LOCATE_standard___exec
, 110);
546 fra
.me
.REG
[0] = ATTR_standard___exec___OProcess____out(fra
.me
.REG
[0]);
547 CALL_standard___stream___OStream___write(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1]);
548 stack_frame_head
= fra
.me
.prev
;
551 void standard___exec___OProcess___init(val_t p0
, val_t p1
, val_t p2
, int* init_table
){
552 int itpos5
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___exec___OProcess
].i
;
553 struct {struct stack_frame_t me
; val_t MORE_REG
[3];} fra
;
556 if (init_table
[itpos5
]) return;
557 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
558 fra
.me
.file
= LOCATE_standard___exec
;
560 fra
.me
.meth
= LOCATE_standard___exec___OProcess___init
;
561 fra
.me
.has_broke
= 0;
563 fra
.me
.REG
[0] = NIT_NULL
;
564 fra
.me
.REG
[1] = NIT_NULL
;
565 fra
.me
.REG
[2] = NIT_NULL
;
566 fra
.me
.REG
[3] = NIT_NULL
;
570 /* ./../lib/standard//exec.nit:112 */
571 fra
.me
.REG
[3] = fra
.me
.REG
[0];
572 REGB0
= TAG_Bool(VAL_ISA(fra
.me
.REG
[2], COLOR_standard___collection___array___Array
, ID_standard___collection___array___Array
)) /*cast Array[String]*/;
573 if (UNTAG_Bool(REGB0
)) {
575 nit_abort("Cast failed", NULL
, LOCATE_standard___exec
, 112);
577 /* ./../lib/standard//exec.nit:114 */
579 CALL_standard___exec___Process___execute(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[1], fra
.me
.REG
[2], REGB0
, init_table
);
580 /* ./../lib/standard//exec.nit:115 */
581 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[3])!=NIT_NULL
);
582 if (UNTAG_Bool(REGB0
)) {
584 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 115);
586 fra
.me
.REG
[2] = ATTR_standard___exec___Process____data(fra
.me
.REG
[3]);
587 REGB0
= CALL_standard___exec___NativeProcess___in_fd(fra
.me
.REG
[2])(fra
.me
.REG
[2]);
588 fra
.me
.REG
[2] = NEW_FDOStream_standard___stream___FDOStream___init(REGB0
);
589 ATTR_standard___exec___OProcess____out(fra
.me
.REG
[3]) = fra
.me
.REG
[2];
590 stack_frame_head
= fra
.me
.prev
;
591 init_table
[itpos5
] = 1;
594 void standard___exec___OProcess___init_(val_t p0
, val_t p1
, int* init_table
){
595 int itpos6
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___exec___OProcess
].i
;
596 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
599 if (init_table
[itpos6
]) return;
600 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
601 fra
.me
.file
= LOCATE_standard___exec
;
603 fra
.me
.meth
= LOCATE_standard___exec___OProcess___init_
;
604 fra
.me
.has_broke
= 0;
606 fra
.me
.REG
[0] = NIT_NULL
;
607 fra
.me
.REG
[1] = NIT_NULL
;
610 /* ./../lib/standard//exec.nit:120 */
612 CALL_standard___exec___Process___execute(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], NIT_NULL
, REGB0
, init_table
);
613 /* ./../lib/standard//exec.nit:121 */
614 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[0])!=NIT_NULL
);
615 if (UNTAG_Bool(REGB0
)) {
617 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 121);
619 fra
.me
.REG
[1] = ATTR_standard___exec___Process____data(fra
.me
.REG
[0]);
620 REGB0
= CALL_standard___exec___NativeProcess___in_fd(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
621 fra
.me
.REG
[1] = NEW_FDOStream_standard___stream___FDOStream___init(REGB0
);
622 ATTR_standard___exec___OProcess____out(fra
.me
.REG
[0]) = fra
.me
.REG
[1];
623 stack_frame_head
= fra
.me
.prev
;
624 init_table
[itpos6
] = 1;
627 void standard___exec___IOProcess___close(val_t p0
){
628 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
631 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
632 fra
.me
.file
= LOCATE_standard___exec
;
634 fra
.me
.meth
= LOCATE_standard___exec___IOProcess___close
;
635 fra
.me
.has_broke
= 0;
637 fra
.me
.REG
[0] = NIT_NULL
;
638 fra
.me
.REG
[1] = NIT_NULL
;
640 /* ./../lib/standard//exec.nit:133 */
641 REGB0
= TAG_Bool(ATTR_standard___exec___IProcess____in(fra
.me
.REG
[0])!=NIT_NULL
);
642 if (UNTAG_Bool(REGB0
)) {
644 nit_abort("Uninitialized attribute %s", "_in", LOCATE_standard___exec
, 133);
646 fra
.me
.REG
[1] = ATTR_standard___exec___IProcess____in(fra
.me
.REG
[0]);
647 CALL_standard___stream___IOS___close(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
648 /* ./../lib/standard//exec.nit:134 */
649 REGB0
= TAG_Bool(ATTR_standard___exec___OProcess____out(fra
.me
.REG
[0])!=NIT_NULL
);
650 if (UNTAG_Bool(REGB0
)) {
652 nit_abort("Uninitialized attribute %s", "_out", LOCATE_standard___exec
, 134);
654 fra
.me
.REG
[0] = ATTR_standard___exec___OProcess____out(fra
.me
.REG
[0]);
655 CALL_standard___stream___IOS___close(fra
.me
.REG
[0])(fra
.me
.REG
[0]);
656 stack_frame_head
= fra
.me
.prev
;
659 void standard___exec___IOProcess___init(val_t p0
, val_t p1
, val_t p2
, int* init_table
){
660 int itpos7
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___exec___IOProcess
].i
;
661 struct {struct stack_frame_t me
; val_t MORE_REG
[5];} fra
;
664 if (init_table
[itpos7
]) return;
665 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
666 fra
.me
.file
= LOCATE_standard___exec
;
668 fra
.me
.meth
= LOCATE_standard___exec___IOProcess___init
;
669 fra
.me
.has_broke
= 0;
671 fra
.me
.REG
[0] = NIT_NULL
;
672 fra
.me
.REG
[1] = NIT_NULL
;
673 fra
.me
.REG
[2] = NIT_NULL
;
674 fra
.me
.REG
[3] = NIT_NULL
;
675 fra
.me
.REG
[4] = NIT_NULL
;
676 fra
.me
.REG
[5] = NIT_NULL
;
680 /* ./../lib/standard//exec.nit:137 */
681 fra
.me
.REG
[3] = fra
.me
.REG
[0];
682 fra
.me
.REG
[4] = fra
.me
.REG
[1];
683 REGB0
= TAG_Bool(VAL_ISA(fra
.me
.REG
[2], COLOR_standard___collection___array___Array
, ID_standard___collection___array___Array
)) /*cast Array[String]*/;
684 if (UNTAG_Bool(REGB0
)) {
686 nit_abort("Cast failed", NULL
, LOCATE_standard___exec
, 137);
688 fra
.me
.REG
[5] = fra
.me
.REG
[2];
689 /* ./../lib/standard//exec.nit:139 */
691 CALL_standard___exec___Process___execute(fra
.me
.REG
[3])(fra
.me
.REG
[3], fra
.me
.REG
[4], fra
.me
.REG
[5], REGB0
, init_table
);
692 CALL_standard___exec___IProcess___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], fra
.me
.REG
[2], init_table
);
693 CALL_standard___exec___OProcess___init(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], fra
.me
.REG
[2], init_table
);
694 /* ./../lib/standard//exec.nit:140 */
695 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[3])!=NIT_NULL
);
696 if (UNTAG_Bool(REGB0
)) {
698 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 140);
700 fra
.me
.REG
[2] = ATTR_standard___exec___Process____data(fra
.me
.REG
[3]);
701 REGB0
= CALL_standard___exec___NativeProcess___out_fd(fra
.me
.REG
[2])(fra
.me
.REG
[2]);
702 fra
.me
.REG
[2] = NEW_FDIStream_standard___stream___FDIStream___init(REGB0
);
703 ATTR_standard___exec___IProcess____in(fra
.me
.REG
[3]) = fra
.me
.REG
[2];
704 /* ./../lib/standard//exec.nit:141 */
705 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[3])!=NIT_NULL
);
706 if (UNTAG_Bool(REGB0
)) {
708 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 141);
710 fra
.me
.REG
[2] = ATTR_standard___exec___Process____data(fra
.me
.REG
[3]);
711 REGB0
= CALL_standard___exec___NativeProcess___in_fd(fra
.me
.REG
[2])(fra
.me
.REG
[2]);
712 fra
.me
.REG
[2] = NEW_FDOStream_standard___stream___FDOStream___init(REGB0
);
713 ATTR_standard___exec___OProcess____out(fra
.me
.REG
[3]) = fra
.me
.REG
[2];
714 stack_frame_head
= fra
.me
.prev
;
715 init_table
[itpos7
] = 1;
718 void standard___exec___IOProcess___init_(val_t p0
, val_t p1
, int* init_table
){
719 int itpos8
= VAL2OBJ(p0
)->vft
[INIT_TABLE_POS_standard___exec___IOProcess
].i
;
720 struct {struct stack_frame_t me
; val_t MORE_REG
[3];} fra
;
723 if (init_table
[itpos8
]) return;
724 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
725 fra
.me
.file
= LOCATE_standard___exec
;
727 fra
.me
.meth
= LOCATE_standard___exec___IOProcess___init_
;
728 fra
.me
.has_broke
= 0;
730 fra
.me
.REG
[0] = NIT_NULL
;
731 fra
.me
.REG
[1] = NIT_NULL
;
732 fra
.me
.REG
[2] = NIT_NULL
;
733 fra
.me
.REG
[3] = NIT_NULL
;
736 /* ./../lib/standard//exec.nit:144 */
737 fra
.me
.REG
[2] = fra
.me
.REG
[0];
738 fra
.me
.REG
[3] = fra
.me
.REG
[1];
739 /* ./../lib/standard//exec.nit:146 */
741 CALL_standard___exec___Process___execute(fra
.me
.REG
[2])(fra
.me
.REG
[2], fra
.me
.REG
[3], NIT_NULL
, REGB0
, init_table
);
742 CALL_standard___exec___IProcess___init_(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], init_table
);
743 CALL_standard___exec___OProcess___init_(fra
.me
.REG
[0])(fra
.me
.REG
[0], fra
.me
.REG
[1], init_table
);
744 /* ./../lib/standard//exec.nit:147 */
745 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[2])!=NIT_NULL
);
746 if (UNTAG_Bool(REGB0
)) {
748 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 147);
750 fra
.me
.REG
[1] = ATTR_standard___exec___Process____data(fra
.me
.REG
[2]);
751 REGB0
= CALL_standard___exec___NativeProcess___out_fd(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
752 fra
.me
.REG
[1] = NEW_FDIStream_standard___stream___FDIStream___init(REGB0
);
753 ATTR_standard___exec___IProcess____in(fra
.me
.REG
[2]) = fra
.me
.REG
[1];
754 /* ./../lib/standard//exec.nit:148 */
755 REGB0
= TAG_Bool(ATTR_standard___exec___Process____data(fra
.me
.REG
[2])!=NIT_NULL
);
756 if (UNTAG_Bool(REGB0
)) {
758 nit_abort("Uninitialized attribute %s", "_data", LOCATE_standard___exec
, 148);
760 fra
.me
.REG
[1] = ATTR_standard___exec___Process____data(fra
.me
.REG
[2]);
761 REGB0
= CALL_standard___exec___NativeProcess___in_fd(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
762 fra
.me
.REG
[1] = NEW_FDOStream_standard___stream___FDOStream___init(REGB0
);
763 ATTR_standard___exec___OProcess____out(fra
.me
.REG
[2]) = fra
.me
.REG
[1];
764 stack_frame_head
= fra
.me
.prev
;
765 init_table
[itpos8
] = 1;
768 val_t
standard___exec___Sys___system(val_t p0
, val_t p1
){
769 struct {struct stack_frame_t me
; val_t MORE_REG
[1];} fra
;
772 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
773 fra
.me
.file
= LOCATE_standard___exec
;
775 fra
.me
.meth
= LOCATE_standard___exec___Sys___system
;
776 fra
.me
.has_broke
= 0;
778 fra
.me
.REG
[0] = NIT_NULL
;
779 fra
.me
.REG
[1] = NIT_NULL
;
782 /* ./../lib/standard//exec.nit:156 */
783 fra
.me
.REG
[1] = CALL_standard___string___String___to_cstring(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
784 REGB0
= CALL_standard___exec___NativeString___system(fra
.me
.REG
[1])(fra
.me
.REG
[1]);
787 stack_frame_head
= fra
.me
.prev
;
790 val_t
standard___exec___NativeString___system(val_t p0
){
791 struct {struct stack_frame_t me
;} fra
;
794 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
795 fra
.me
.file
= LOCATE_standard___exec
;
797 fra
.me
.meth
= LOCATE_standard___exec___NativeString___system
;
798 fra
.me
.has_broke
= 0;
800 fra
.me
.REG
[0] = NIT_NULL
;
802 /* ./../lib/standard//exec.nit:161 */
803 REGB0
= NativeString_system___out(fra
.me
.REG
[0]);
804 stack_frame_head
= fra
.me
.prev
;
807 val_t
standard___exec___NativeProcess___id(val_t p0
){
808 struct {struct stack_frame_t me
;} fra
;
811 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
812 fra
.me
.file
= LOCATE_standard___exec
;
814 fra
.me
.meth
= LOCATE_standard___exec___NativeProcess___id
;
815 fra
.me
.has_broke
= 0;
817 fra
.me
.REG
[0] = NIT_NULL
;
819 /* ./../lib/standard//exec.nit:165 */
820 REGB0
= NativeProcess_id___out(fra
.me
.REG
[0]);
821 stack_frame_head
= fra
.me
.prev
;
824 val_t
standard___exec___NativeProcess___is_finished(val_t p0
){
825 struct {struct stack_frame_t me
;} fra
;
828 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
829 fra
.me
.file
= LOCATE_standard___exec
;
831 fra
.me
.meth
= LOCATE_standard___exec___NativeProcess___is_finished
;
832 fra
.me
.has_broke
= 0;
834 fra
.me
.REG
[0] = NIT_NULL
;
836 /* ./../lib/standard//exec.nit:166 */
837 REGB0
= NativeProcess_is_finished___out(fra
.me
.REG
[0]);
838 stack_frame_head
= fra
.me
.prev
;
841 val_t
standard___exec___NativeProcess___status(val_t p0
){
842 struct {struct stack_frame_t me
;} fra
;
845 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
846 fra
.me
.file
= LOCATE_standard___exec
;
848 fra
.me
.meth
= LOCATE_standard___exec___NativeProcess___status
;
849 fra
.me
.has_broke
= 0;
851 fra
.me
.REG
[0] = NIT_NULL
;
853 /* ./../lib/standard//exec.nit:167 */
854 REGB0
= NativeProcess_status___out(fra
.me
.REG
[0]);
855 stack_frame_head
= fra
.me
.prev
;
858 void standard___exec___NativeProcess___wait(val_t p0
){
859 struct {struct stack_frame_t me
;} fra
;
861 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
862 fra
.me
.file
= LOCATE_standard___exec
;
864 fra
.me
.meth
= LOCATE_standard___exec___NativeProcess___wait
;
865 fra
.me
.has_broke
= 0;
867 fra
.me
.REG
[0] = NIT_NULL
;
869 /* ./../lib/standard//exec.nit:168 */
870 NativeProcess_wait___out(fra
.me
.REG
[0]);
871 stack_frame_head
= fra
.me
.prev
;
874 val_t
standard___exec___NativeProcess___in_fd(val_t p0
){
875 struct {struct stack_frame_t me
;} fra
;
878 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
879 fra
.me
.file
= LOCATE_standard___exec
;
881 fra
.me
.meth
= LOCATE_standard___exec___NativeProcess___in_fd
;
882 fra
.me
.has_broke
= 0;
884 fra
.me
.REG
[0] = NIT_NULL
;
886 /* ./../lib/standard//exec.nit:170 */
887 REGB0
= NativeProcess_in_fd___out(fra
.me
.REG
[0]);
888 stack_frame_head
= fra
.me
.prev
;
891 val_t
standard___exec___NativeProcess___out_fd(val_t p0
){
892 struct {struct stack_frame_t me
;} fra
;
895 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
896 fra
.me
.file
= LOCATE_standard___exec
;
898 fra
.me
.meth
= LOCATE_standard___exec___NativeProcess___out_fd
;
899 fra
.me
.has_broke
= 0;
901 fra
.me
.REG
[0] = NIT_NULL
;
903 /* ./../lib/standard//exec.nit:171 */
904 REGB0
= NativeProcess_out_fd___out(fra
.me
.REG
[0]);
905 stack_frame_head
= fra
.me
.prev
;
908 val_t
standard___exec___NativeProcess___err_fd(val_t p0
){
909 struct {struct stack_frame_t me
;} fra
;
912 fra
.me
.prev
= stack_frame_head
; stack_frame_head
= &fra
.me
;
913 fra
.me
.file
= LOCATE_standard___exec
;
915 fra
.me
.meth
= LOCATE_standard___exec___NativeProcess___err_fd
;
916 fra
.me
.has_broke
= 0;
918 fra
.me
.REG
[0] = NIT_NULL
;
920 /* ./../lib/standard//exec.nit:172 */
921 REGB0
= NativeProcess_err_fd___out(fra
.me
.REG
[0]);
922 stack_frame_head
= fra
.me
.prev
;