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 struct WBT_
**closurevariable
= NULL
;
7 trace
.prev
= tracehead
; tracehead
= &trace
;
8 trace
.file
= LOCATE_type_formal
;
9 /* Register variable[0]: Local variable */
11 /* Register variable[1]: Method return value and escape marker */
12 variable
[1] = variable
[0];
14 return_label0
: while(false);
15 tracehead
= trace
.prev
;
18 val_t
type_formal___MMTypeFormal___to_s(val_t self
) {
19 struct trace_t trace
= {NULL
, NULL
, 50, LOCATE_type_formal___MMTypeFormal___to_s
};
21 struct WBT_
**closurevariable
= NULL
;
22 trace
.prev
= tracehead
; tracehead
= &trace
;
23 trace
.file
= LOCATE_type_formal
;
24 /* Register variable[0]: Local variable */
26 /* Register variable[1]: Method return value and escape marker */
27 /* Register variable[2]: Result */
28 variable
[2] = ATTR_type_formal___MMTypeFormal____name(variable
[0]) /*MMTypeFormal::_name*/;
29 /* Register variable[2]: Result */
30 variable
[2] = CALL_string___Object___to_s(variable
[2])(variable
[2]) /*Symbol::to_s*/;
31 variable
[1] = variable
[2];
33 return_label1
: while(false);
34 tracehead
= trace
.prev
;
37 val_t
type_formal___MMTypeFormal___local_class(val_t self
) {
38 struct trace_t trace
= {NULL
, NULL
, 48, LOCATE_type_formal___MMTypeFormal___local_class
};
40 struct WBT_
**closurevariable
= NULL
;
41 trace
.prev
= tracehead
; tracehead
= &trace
;
42 trace
.file
= LOCATE_type_formal
;
43 /* Register variable[0]: Local variable */
45 /* Register variable[1]: Method return value and escape marker */
46 /* Register variable[2]: Result */
47 variable
[2] = ATTR_type_formal___MMTypeFormal____bound(variable
[0]) /*MMTypeFormal::_bound*/;
48 /* Register variable[2]: Result */
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___is_valid(val_t self
) {
57 struct trace_t trace
= {NULL
, NULL
, 31, LOCATE_type_formal___MMTypeFormal___is_valid
};
59 struct WBT_
**closurevariable
= NULL
;
60 trace
.prev
= tracehead
; tracehead
= &trace
;
61 trace
.file
= LOCATE_type_formal
;
62 /* Register variable[0]: Local variable */
64 /* Register variable[1]: Method return value and escape marker */
65 /* Register variable[2]: Result */
66 variable
[2] = ATTR_type_formal___MMTypeFormal____bound(variable
[0]) /*MMTypeFormal::_bound*/;
67 /* Register variable[2]: Result */
68 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::==*/)))))));
69 /* Ensure var variable[2]: Left 'and' operand*/
70 if (UNTAG_Bool(variable
[2])) { /* and */
71 /* Register variable[2]: Result */
72 variable
[2] = ATTR_type_formal___MMTypeFormal____bound(variable
[0]) /*MMTypeFormal::_bound*/;
73 /* Register variable[2]: Result */
74 variable
[2] = CALL_static_type___MMType___is_valid(variable
[2])(variable
[2]) /*MMType::is_valid*/;
76 /* Register variable[2]: Result */
77 variable
[1] = variable
[2];
79 return_label3
: while(false);
80 tracehead
= trace
.prev
;
83 val_t
type_formal___MMTypeFormal_____l(val_t self
, val_t param0
) {
84 struct trace_t trace
= {NULL
, NULL
, 44, LOCATE_type_formal___MMTypeFormal_____l
};
86 struct WBT_
**closurevariable
= NULL
;
87 trace
.prev
= tracehead
; tracehead
= &trace
;
88 trace
.file
= LOCATE_type_formal
;
89 /* Register variable[0]: Local variable */
91 /* Register variable[1]: Local variable */
93 /* Register variable[2]: Method return value and escape marker */
94 /* Register variable[3]: Result */
95 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::==*/)))))));
96 /* Ensure var variable[3]: Left 'and' operand*/
97 if (UNTAG_Bool(variable
[3])) { /* and */
98 /* Register variable[3]: Result */
99 variable
[3] = TAG_Bool(( variable
[1] /*t*/ == variable
[0]) || (( variable
[1] /*t*/ != NIT_NULL
) && ((CALL_kernel___Object_____eqeq( variable
[1] /*t*/)==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable
[1] /*t*/,variable
[0])):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable
[1] /*t*/)( variable
[1] /*t*/, variable
[0]) /*Object::==*/)))));
100 /* Ensure var variable[3]: Left 'or' operand*/
101 if (!UNTAG_Bool(variable
[3])) { /* or */
102 /* Register variable[3]: Result */
103 variable
[3] = ATTR_type_formal___MMTypeFormal____bound(variable
[0]) /*MMTypeFormal::_bound*/;
104 /* Register variable[3]: Result */
105 variable
[3] = CALL_static_type___MMType___is_supertype( variable
[1] /*t*/)( variable
[1] /*t*/, variable
[3]) /*MMType::is_supertype*/;
107 /* Register variable[3]: Result */
109 /* Register variable[3]: Result */
110 variable
[2] = variable
[3];
112 return_label4
: while(false);
113 tracehead
= trace
.prev
;
116 val_t
type_formal___MMTypeFormal___is_supertype(val_t self
, val_t param0
) {
117 struct trace_t trace
= {NULL
, NULL
, 45, LOCATE_type_formal___MMTypeFormal___is_supertype
};
119 struct WBT_
**closurevariable
= NULL
;
120 trace
.prev
= tracehead
; tracehead
= &trace
;
121 trace
.file
= LOCATE_type_formal
;
122 /* Register variable[0]: Local variable */
124 /* Register variable[1]: Local variable */
125 variable
[1] = param0
;
126 /* Register variable[2]: Method return value and escape marker */
127 /* Register variable[3]: Result */
128 variable
[3] = ATTR_type_formal___MMTypeFormal____bound(variable
[0]) /*MMTypeFormal::_bound*/;
129 /* Register variable[3]: Result */
130 variable
[3] = CALL_static_type___MMType___is_supertype(variable
[3])(variable
[3], variable
[1] /*t*/) /*MMType::is_supertype*/;
131 variable
[2] = variable
[3];
133 return_label5
: while(false);
134 tracehead
= trace
.prev
;
137 val_t
type_formal___MMTypeFormal___is_nullable(val_t self
) {
138 struct trace_t trace
= {NULL
, NULL
, 46, LOCATE_type_formal___MMTypeFormal___is_nullable
};
140 struct WBT_
**closurevariable
= NULL
;
141 trace
.prev
= tracehead
; tracehead
= &trace
;
142 trace
.file
= LOCATE_type_formal
;
143 /* Register variable[0]: Local variable */
145 /* Register variable[1]: Method return value and escape marker */
146 /* Register variable[2]: Result */
147 variable
[2] = ATTR_type_formal___MMTypeFormal____bound(variable
[0]) /*MMTypeFormal::_bound*/;
148 /* Register variable[2]: Result */
149 variable
[2] = CALL_static_type___MMType___is_nullable(variable
[2])(variable
[2]) /*MMType::is_nullable*/;
150 variable
[1] = variable
[2];
152 return_label6
: while(false);
153 tracehead
= trace
.prev
;
156 val_t
type_formal___MMTypeFormal___direct_type(val_t self
) {
157 struct trace_t trace
= {NULL
, NULL
, 47, LOCATE_type_formal___MMTypeFormal___direct_type
};
159 struct WBT_
**closurevariable
= NULL
;
160 trace
.prev
= tracehead
; tracehead
= &trace
;
161 trace
.file
= LOCATE_type_formal
;
162 /* Register variable[0]: Local variable */
164 /* Register variable[1]: Method return value and escape marker */
165 /* Register variable[2]: Result */
166 variable
[2] = ATTR_type_formal___MMTypeFormal____bound(variable
[0]) /*MMTypeFormal::_bound*/;
167 /* Register variable[2]: Result */
168 variable
[2] = CALL_type_formal___MMType___direct_type(variable
[2])(variable
[2]) /*MMType::direct_type*/;
169 variable
[1] = variable
[2];
171 return_label7
: while(false);
172 tracehead
= trace
.prev
;
175 val_t
type_formal___MMTypeFormal___name(val_t self
) {
176 struct trace_t trace
= {NULL
, NULL
, 33, LOCATE_type_formal___MMTypeFormal___name
};
177 val_t
*variable
= NULL
;
178 struct WBT_
**closurevariable
= NULL
;
179 trace
.prev
= tracehead
; tracehead
= &trace
;
180 trace
.file
= LOCATE_type_formal
;
181 tracehead
= trace
.prev
;
182 return ATTR_type_formal___MMTypeFormal____name( self
) /*MMTypeFormal::_name*/;
184 val_t
type_formal___MMTypeFormal___bound(val_t self
) {
185 struct trace_t trace
= {NULL
, NULL
, 36, LOCATE_type_formal___MMTypeFormal___bound
};
187 struct WBT_
**closurevariable
= NULL
;
188 trace
.prev
= tracehead
; tracehead
= &trace
;
189 trace
.file
= LOCATE_type_formal
;
190 /* Register variable[0]: Local variable */
192 /* Register variable[1]: Method return value and escape marker */
193 /* Register variable[2]: Result */
194 variable
[2] = CALL_static_type___MMType___is_valid(variable
[0])(variable
[0]) /*MMTypeFormal::is_valid*/;
195 if (!UNTAG_Bool(variable
[2])) { fprintf(stderr
, "Assert%s failed", ""); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_type_formal___MMTypeFormal___bound
, LOCATE_type_formal
, 39); nit_exit(1);}
196 /* Register variable[2]: Result */
197 variable
[2] = ATTR_type_formal___MMTypeFormal____bound(variable
[0]) /*MMTypeFormal::_bound*/;
198 variable
[1] = variable
[2];
200 return_label8
: while(false);
201 tracehead
= trace
.prev
;
204 void type_formal___MMTypeFormal___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
205 struct trace_t trace
= {NULL
, NULL
, 52, LOCATE_type_formal___MMTypeFormal___init
};
207 struct WBT_
**closurevariable
= NULL
;
208 trace
.prev
= tracehead
; tracehead
= &trace
;
209 trace
.file
= LOCATE_type_formal
;
210 /* Register variable[0]: Local variable */
212 /* Register variable[1]: Local variable */
213 variable
[1] = param0
;
214 /* Register variable[2]: Local variable */
215 variable
[2] = param1
;
216 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_MMTypeFormal
].i
]) return;
217 /* Register variable[3]: Method return value and escape marker */
218 ATTR_type_formal___MMTypeFormal____name(variable
[0]) /*MMTypeFormal::_name*/ = variable
[1] /*name*/;
219 ATTR_type_formal___MMTypeFormal____bound(variable
[0]) /*MMTypeFormal::_bound*/ = variable
[2] /*bound*/;
220 return_label9
: while(false);
221 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_MMTypeFormal
].i
] = 1;
222 tracehead
= trace
.prev
;