1 /* This C file is generated by NIT to compile module type_formal. */
2 #include "type_formal._sep.h"
3 val_t
type_formal___MMType___direct_type(val_t self
) {
4 struct trace_t trace
= {NULL
, NULL
, 24, LOCATE_type_formal___MMType___direct_type
};
6 void **closurevariable
= NULL
;
7 trace
.prev
= tracehead
; tracehead
= &trace
;
8 trace
.file
= LOCATE_type_formal
;
10 variable
[2] = variable
[0];
11 variable
[1] = variable
[2];
13 return_label0
: while(false);
14 tracehead
= trace
.prev
;
17 val_t
type_formal___MMTypeFormal___to_s(val_t self
) {
18 struct trace_t trace
= {NULL
, NULL
, 46, LOCATE_type_formal___MMTypeFormal___to_s
};
20 void **closurevariable
= NULL
;
21 trace
.prev
= tracehead
; tracehead
= &trace
;
22 trace
.file
= LOCATE_type_formal
;
24 variable
[2] = variable
[0];
25 variable
[2] = ATTR_type_formal___MMTypeFormal____name(variable
[2]) /*MMTypeFormal::_name*/;
26 variable
[2] = CALL_string___Object___to_s(variable
[2])(variable
[2]) /*Symbol::to_s*/;
27 variable
[1] = variable
[2];
29 return_label1
: while(false);
30 tracehead
= trace
.prev
;
33 val_t
type_formal___MMTypeFormal___local_class(val_t self
) {
34 struct trace_t trace
= {NULL
, NULL
, 40, LOCATE_type_formal___MMTypeFormal___local_class
};
36 void **closurevariable
= NULL
;
37 trace
.prev
= tracehead
; tracehead
= &trace
;
38 trace
.file
= LOCATE_type_formal
;
40 variable
[2] = variable
[0];
41 variable
[2] = ATTR_type_formal___MMTypeFormal____bound(variable
[2]) /*MMTypeFormal::_bound*/;
42 variable
[2] = 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::==*/)))));
43 if (UNTAG_Bool(variable
[2])) { /*if*/
44 variable
[1] = NIT_NULL
/*null*/;
47 variable
[2] = variable
[0];
48 variable
[2] = ATTR_type_formal___MMTypeFormal____bound(variable
[2]) /*MMTypeFormal::_bound*/;
49 variable
[2] = CALL_static_type___MMType___local_class(variable
[2])(variable
[2]) /*MMType::local_class*/;
50 variable
[1] = variable
[2];
52 return_label2
: while(false);
53 tracehead
= trace
.prev
;
56 val_t
type_formal___MMTypeFormal_____l(val_t self
, val_t param0
) {
57 struct trace_t trace
= {NULL
, NULL
, 37, LOCATE_type_formal___MMTypeFormal_____l
};
59 void **closurevariable
= NULL
;
60 trace
.prev
= tracehead
; tracehead
= &trace
;
61 trace
.file
= LOCATE_type_formal
;
64 variable
[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable
[1] /*t*/ == NIT_NULL
/*null*/) || (( variable
[1] /*t*/ != NIT_NULL
) && ((CALL_kernel___Object_____eqeq( variable
[1] /*t*/)==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable
[1] /*t*/, NIT_NULL
/*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable
[1] /*t*/)( variable
[1] /*t*/, NIT_NULL
/*null*/) /*Object::==*/)))))));
65 variable
[4] = variable
[3];
66 if (UNTAG_Bool(variable
[4])) { /* and */
67 variable
[4] = variable
[0];
68 variable
[4] = TAG_Bool(( variable
[1] /*t*/ == variable
[4]) || (( variable
[1] /*t*/ != NIT_NULL
) && ((CALL_kernel___Object_____eqeq( variable
[1] /*t*/)==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable
[1] /*t*/,variable
[4])):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable
[1] /*t*/)( variable
[1] /*t*/, variable
[4]) /*Object::==*/)))));
69 variable
[5] = variable
[4];
70 if (!UNTAG_Bool(variable
[5])) { /* or */
71 variable
[5] = variable
[0];
72 variable
[5] = ATTR_type_formal___MMTypeFormal____bound(variable
[5]) /*MMTypeFormal::_bound*/;
73 variable
[5] = CALL_static_type___MMType___is_supertype( variable
[1] /*t*/)( variable
[1] /*t*/, variable
[5]) /*MMType::is_supertype*/;
75 variable
[4] = variable
[5];
77 variable
[3] = variable
[4];
78 variable
[2] = variable
[3];
80 return_label3
: while(false);
81 tracehead
= trace
.prev
;
84 val_t
type_formal___MMTypeFormal___is_supertype(val_t self
, val_t param0
) {
85 struct trace_t trace
= {NULL
, NULL
, 38, LOCATE_type_formal___MMTypeFormal___is_supertype
};
87 void **closurevariable
= NULL
;
88 trace
.prev
= tracehead
; tracehead
= &trace
;
89 trace
.file
= LOCATE_type_formal
;
92 variable
[3] = variable
[0];
93 variable
[3] = ATTR_type_formal___MMTypeFormal____bound(variable
[3]) /*MMTypeFormal::_bound*/;
94 variable
[3] = CALL_static_type___MMType___is_supertype(variable
[3])(variable
[3], variable
[1] /*t*/) /*MMType::is_supertype*/;
95 variable
[2] = variable
[3];
97 return_label4
: while(false);
98 tracehead
= trace
.prev
;
101 val_t
type_formal___MMTypeFormal___direct_type(val_t self
) {
102 struct trace_t trace
= {NULL
, NULL
, 39, LOCATE_type_formal___MMTypeFormal___direct_type
};
104 void **closurevariable
= NULL
;
105 trace
.prev
= tracehead
; tracehead
= &trace
;
106 trace
.file
= LOCATE_type_formal
;
108 variable
[2] = variable
[0];
109 variable
[2] = ATTR_type_formal___MMTypeFormal____bound(variable
[2]) /*MMTypeFormal::_bound*/;
110 variable
[2] = CALL_type_formal___MMType___direct_type(variable
[2])(variable
[2]) /*MMType::direct_type*/;
111 variable
[1] = variable
[2];
113 return_label5
: while(false);
114 tracehead
= trace
.prev
;
117 val_t
type_formal___MMTypeFormal___name(val_t self
) {
118 struct trace_t trace
= {NULL
, NULL
, 31, LOCATE_type_formal___MMTypeFormal___name
};
119 val_t
*variable
= NULL
;
120 void **closurevariable
= NULL
;
121 trace
.prev
= tracehead
; tracehead
= &trace
;
122 trace
.file
= LOCATE_type_formal
;
123 tracehead
= trace
.prev
;
124 return ATTR_type_formal___MMTypeFormal____name( self
) /*MMTypeFormal::_name*/;
126 val_t
type_formal___MMTypeFormal___bound(val_t self
) {
127 struct trace_t trace
= {NULL
, NULL
, 34, LOCATE_type_formal___MMTypeFormal___bound
};
128 val_t
*variable
= NULL
;
129 void **closurevariable
= NULL
;
130 trace
.prev
= tracehead
; tracehead
= &trace
;
131 trace
.file
= LOCATE_type_formal
;
132 tracehead
= trace
.prev
;
133 return ATTR_type_formal___MMTypeFormal____bound( self
) /*MMTypeFormal::_bound*/;
135 void type_formal___MMTypeFormal___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
136 struct trace_t trace
= {NULL
, NULL
, 48, LOCATE_type_formal___MMTypeFormal___init
};
138 void **closurevariable
= NULL
;
139 trace
.prev
= tracehead
; tracehead
= &trace
;
140 trace
.file
= LOCATE_type_formal
;
142 variable
[1] = param0
;
143 variable
[2] = param1
;
144 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_MMTypeFormal
].i
]) return;
145 variable
[4] = variable
[0];
146 ATTR_type_formal___MMTypeFormal____name(variable
[4]) /*MMTypeFormal::_name*/ = variable
[1] /*name*/;
147 variable
[4] = variable
[0];
148 ATTR_type_formal___MMTypeFormal____bound(variable
[4]) /*MMTypeFormal::_bound*/ = variable
[2] /*bound*/;
149 return_label6
: while(false);
150 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_MMTypeFormal
].i
] = 1;
151 tracehead
= trace
.prev
;