1 /* valainterface.c generated by valac, the Vala compiler
2  * generated from valainterface.vala, do not modify */
3 
4 /* valainterface.vala
5  *
6  * Copyright (C) 2006-2010  Jürg Billeter
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12 
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17 
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
21  *
22  * Author:
23  * 	Jürg Billeter <j@bitron.ch>
24  */
25 
26 #include "vala.h"
27 #include <valagee.h>
28 #include <glib-object.h>
29 #include <glib.h>
30 #include <stdlib.h>
31 #include <string.h>
32 
33 #define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
34 #define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
35 #define _g_free0(var) (var = (g_free (var), NULL))
36 #define _vala_source_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_file_unref (var), NULL)))
37 #define _vala_map_unref0(var) ((var == NULL) ? NULL : (var = (vala_map_unref (var), NULL)))
38 
39 struct _ValaInterfacePrivate {
40 	ValaList* prerequisites;
41 	ValaList* virtuals;
42 };
43 
44 static gint ValaInterface_private_offset;
45 static gpointer vala_interface_parent_class = NULL;
46 
47 static void vala_interface_real_add_method (ValaSymbol* base,
48                                      ValaMethod* m);
49 static void vala_interface_real_add_property (ValaSymbol* base,
50                                        ValaProperty* prop);
51 static ValaList* vala_interface_real_get_virtuals (ValaInterface* self);
52 static void vala_interface_real_accept (ValaCodeNode* base,
53                                  ValaCodeVisitor* visitor);
54 static void vala_interface_real_accept_children (ValaCodeNode* base,
55                                           ValaCodeVisitor* visitor);
56 static gboolean vala_interface_real_is_reference_type (ValaTypeSymbol* base);
57 static gboolean vala_interface_real_is_subtype_of (ValaTypeSymbol* base,
58                                             ValaTypeSymbol* t);
59 static void vala_interface_real_replace_type (ValaCodeNode* base,
60                                        ValaDataType* old_type,
61                                        ValaDataType* new_type);
62 static gboolean vala_interface_real_check (ValaCodeNode* base,
63                                     ValaCodeContext* context);
64 static void vala_interface_finalize (ValaCodeNode * obj);
65 static GType vala_interface_get_type_once (void);
66 
67 static inline gpointer
vala_interface_get_instance_private(ValaInterface * self)68 vala_interface_get_instance_private (ValaInterface* self)
69 {
70 	return G_STRUCT_MEMBER_P (self, ValaInterface_private_offset);
71 }
72 
73 /**
74  * Creates a new interface.
75  *
76  * @param name              type name
77  * @param source_reference  reference to source code
78  * @return                  newly created interface
79  */
80 ValaInterface*
vala_interface_construct(GType object_type,const gchar * name,ValaSourceReference * source_reference,ValaComment * comment)81 vala_interface_construct (GType object_type,
82                           const gchar* name,
83                           ValaSourceReference* source_reference,
84                           ValaComment* comment)
85 {
86 	ValaInterface* self = NULL;
87 	g_return_val_if_fail (name != NULL, NULL);
88 	self = (ValaInterface*) vala_object_type_symbol_construct (object_type, name, source_reference, comment);
89 	return self;
90 }
91 
92 ValaInterface*
vala_interface_new(const gchar * name,ValaSourceReference * source_reference,ValaComment * comment)93 vala_interface_new (const gchar* name,
94                     ValaSourceReference* source_reference,
95                     ValaComment* comment)
96 {
97 	return vala_interface_construct (VALA_TYPE_INTERFACE, name, source_reference, comment);
98 }
99 
100 /**
101  * Adds the specified interface or class to the list of prerequisites of
102  * this interface.
103  *
104  * @param type an interface or class reference
105  */
106 void
vala_interface_add_prerequisite(ValaInterface * self,ValaDataType * type)107 vala_interface_add_prerequisite (ValaInterface* self,
108                                  ValaDataType* type)
109 {
110 	ValaList* _tmp0_;
111 	g_return_if_fail (self != NULL);
112 	g_return_if_fail (type != NULL);
113 	_tmp0_ = self->priv->prerequisites;
114 	vala_collection_add ((ValaCollection*) _tmp0_, type);
115 	vala_code_node_set_parent_node ((ValaCodeNode*) type, (ValaCodeNode*) self);
116 }
117 
118 /**
119  * Returns the base type list.
120  *
121  * @return list of base types
122  */
123 ValaList*
vala_interface_get_prerequisites(ValaInterface * self)124 vala_interface_get_prerequisites (ValaInterface* self)
125 {
126 	ValaList* _tmp0_;
127 	ValaList* result = NULL;
128 	g_return_val_if_fail (self != NULL, NULL);
129 	_tmp0_ = self->priv->prerequisites;
130 	result = _tmp0_;
131 	return result;
132 }
133 
134 /**
135  * Adds the specified method as a member to this interface.
136  *
137  * @param m a method
138  */
139 static void
vala_interface_real_add_method(ValaSymbol * base,ValaMethod * m)140 vala_interface_real_add_method (ValaSymbol* base,
141                                 ValaMethod* m)
142 {
143 	ValaInterface * self;
144 	ValaMemberBinding _tmp2_;
145 	ValaMemberBinding _tmp3_;
146 	gboolean _tmp18_ = FALSE;
147 	ValaDataType* _tmp19_;
148 	ValaDataType* _tmp20_;
149 	self = (ValaInterface*) base;
150 	g_return_if_fail (m != NULL);
151 	if (VALA_IS_CREATION_METHOD (m)) {
152 		ValaSourceReference* _tmp0_;
153 		ValaSourceReference* _tmp1_;
154 		_tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) m);
155 		_tmp1_ = _tmp0_;
156 		vala_report_error (_tmp1_, "construction methods may only be declared within classes and structs");
157 		vala_code_node_set_error ((ValaCodeNode*) m, TRUE);
158 		return;
159 	}
160 	_tmp2_ = vala_method_get_binding (m);
161 	_tmp3_ = _tmp2_;
162 	if (_tmp3_ != VALA_MEMBER_BINDING_STATIC) {
163 		ValaDataType* _tmp4_;
164 		ValaDataType* _tmp5_;
165 		ValaSourceReference* _tmp6_;
166 		ValaSourceReference* _tmp7_;
167 		ValaParameter* _tmp8_;
168 		ValaParameter* _tmp9_;
169 		ValaScope* _tmp10_;
170 		ValaScope* _tmp11_;
171 		ValaParameter* _tmp12_;
172 		ValaParameter* _tmp13_;
173 		const gchar* _tmp14_;
174 		const gchar* _tmp15_;
175 		ValaParameter* _tmp16_;
176 		ValaParameter* _tmp17_;
177 		_tmp4_ = vala_semantic_analyzer_get_this_type ((ValaSymbol*) m, (ValaTypeSymbol*) self);
178 		_tmp5_ = _tmp4_;
179 		_tmp6_ = vala_code_node_get_source_reference ((ValaCodeNode*) m);
180 		_tmp7_ = _tmp6_;
181 		_tmp8_ = vala_parameter_new ("this", _tmp5_, _tmp7_);
182 		_tmp9_ = _tmp8_;
183 		vala_method_set_this_parameter (m, _tmp9_);
184 		_vala_code_node_unref0 (_tmp9_);
185 		_vala_code_node_unref0 (_tmp5_);
186 		_tmp10_ = vala_symbol_get_scope ((ValaSymbol*) m);
187 		_tmp11_ = _tmp10_;
188 		_tmp12_ = vala_method_get_this_parameter (m);
189 		_tmp13_ = _tmp12_;
190 		_tmp14_ = vala_symbol_get_name ((ValaSymbol*) _tmp13_);
191 		_tmp15_ = _tmp14_;
192 		_tmp16_ = vala_method_get_this_parameter (m);
193 		_tmp17_ = _tmp16_;
194 		vala_scope_add (_tmp11_, _tmp15_, (ValaSymbol*) _tmp17_);
195 	}
196 	_tmp19_ = vala_callable_get_return_type ((ValaCallable*) m);
197 	_tmp20_ = _tmp19_;
198 	if (!VALA_IS_VOID_TYPE (_tmp20_)) {
199 		ValaList* _tmp21_;
200 		gint _tmp22_;
201 		gint _tmp23_;
202 		_tmp21_ = vala_method_get_postconditions (m);
203 		_tmp22_ = vala_collection_get_size ((ValaCollection*) _tmp21_);
204 		_tmp23_ = _tmp22_;
205 		_tmp18_ = _tmp23_ > 0;
206 	} else {
207 		_tmp18_ = FALSE;
208 	}
209 	if (_tmp18_) {
210 		ValaDataType* _tmp24_;
211 		ValaDataType* _tmp25_;
212 		ValaDataType* _tmp26_;
213 		ValaDataType* _tmp27_;
214 		ValaSourceReference* _tmp28_;
215 		ValaSourceReference* _tmp29_;
216 		ValaLocalVariable* _tmp30_;
217 		ValaLocalVariable* _tmp31_;
218 		ValaLocalVariable* _tmp32_;
219 		ValaLocalVariable* _tmp33_;
220 		_tmp24_ = vala_callable_get_return_type ((ValaCallable*) m);
221 		_tmp25_ = _tmp24_;
222 		_tmp26_ = vala_data_type_copy (_tmp25_);
223 		_tmp27_ = _tmp26_;
224 		_tmp28_ = vala_code_node_get_source_reference ((ValaCodeNode*) m);
225 		_tmp29_ = _tmp28_;
226 		_tmp30_ = vala_local_variable_new (_tmp27_, "result", NULL, _tmp29_);
227 		_tmp31_ = _tmp30_;
228 		vala_subroutine_set_result_var ((ValaSubroutine*) m, _tmp31_);
229 		_vala_code_node_unref0 (_tmp31_);
230 		_vala_code_node_unref0 (_tmp27_);
231 		_tmp32_ = vala_subroutine_get_result_var ((ValaSubroutine*) m);
232 		_tmp33_ = _tmp32_;
233 		vala_local_variable_set_is_result (_tmp33_, TRUE);
234 	}
235 	VALA_SYMBOL_CLASS (vala_interface_parent_class)->add_method ((ValaSymbol*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol), m);
236 }
237 
238 /**
239  * Adds the specified property as a member to this interface.
240  *
241  * @param prop a property
242  */
243 static void
vala_interface_real_add_property(ValaSymbol * base,ValaProperty * prop)244 vala_interface_real_add_property (ValaSymbol* base,
245                                   ValaProperty* prop)
246 {
247 	ValaInterface * self;
248 	ValaField* _tmp0_;
249 	ValaField* _tmp1_;
250 	ValaMemberBinding _tmp4_;
251 	ValaMemberBinding _tmp5_;
252 	self = (ValaInterface*) base;
253 	g_return_if_fail (prop != NULL);
254 	_tmp0_ = vala_property_get_field (prop);
255 	_tmp1_ = _tmp0_;
256 	if (_tmp1_ != NULL) {
257 		ValaSourceReference* _tmp2_;
258 		ValaSourceReference* _tmp3_;
259 		_tmp2_ = vala_code_node_get_source_reference ((ValaCodeNode*) prop);
260 		_tmp3_ = _tmp2_;
261 		vala_report_error (_tmp3_, "interface properties should be `abstract' or have `get' accessor and/o" \
262 "r `set' mutator");
263 		vala_code_node_set_error ((ValaCodeNode*) prop, TRUE);
264 		return;
265 	}
266 	VALA_SYMBOL_CLASS (vala_interface_parent_class)->add_property ((ValaSymbol*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol), prop);
267 	_tmp4_ = vala_property_get_binding (prop);
268 	_tmp5_ = _tmp4_;
269 	if (_tmp5_ != VALA_MEMBER_BINDING_STATIC) {
270 		ValaDataType* _tmp6_;
271 		ValaDataType* _tmp7_;
272 		ValaSourceReference* _tmp8_;
273 		ValaSourceReference* _tmp9_;
274 		ValaParameter* _tmp10_;
275 		ValaParameter* _tmp11_;
276 		ValaScope* _tmp12_;
277 		ValaScope* _tmp13_;
278 		ValaParameter* _tmp14_;
279 		ValaParameter* _tmp15_;
280 		const gchar* _tmp16_;
281 		const gchar* _tmp17_;
282 		ValaParameter* _tmp18_;
283 		ValaParameter* _tmp19_;
284 		_tmp6_ = vala_semantic_analyzer_get_this_type ((ValaSymbol*) prop, (ValaTypeSymbol*) self);
285 		_tmp7_ = _tmp6_;
286 		_tmp8_ = vala_code_node_get_source_reference ((ValaCodeNode*) prop);
287 		_tmp9_ = _tmp8_;
288 		_tmp10_ = vala_parameter_new ("this", _tmp7_, _tmp9_);
289 		_tmp11_ = _tmp10_;
290 		vala_property_set_this_parameter (prop, _tmp11_);
291 		_vala_code_node_unref0 (_tmp11_);
292 		_vala_code_node_unref0 (_tmp7_);
293 		_tmp12_ = vala_symbol_get_scope ((ValaSymbol*) prop);
294 		_tmp13_ = _tmp12_;
295 		_tmp14_ = vala_property_get_this_parameter (prop);
296 		_tmp15_ = _tmp14_;
297 		_tmp16_ = vala_symbol_get_name ((ValaSymbol*) _tmp15_);
298 		_tmp17_ = _tmp16_;
299 		_tmp18_ = vala_property_get_this_parameter (prop);
300 		_tmp19_ = _tmp18_;
301 		vala_scope_add (_tmp13_, _tmp17_, (ValaSymbol*) _tmp19_);
302 	}
303 }
304 
305 static gpointer
_vala_iterable_ref0(gpointer self)306 _vala_iterable_ref0 (gpointer self)
307 {
308 	return self ? vala_iterable_ref (self) : NULL;
309 }
310 
311 static ValaList*
vala_interface_real_get_virtuals(ValaInterface * self)312 vala_interface_real_get_virtuals (ValaInterface* self)
313 {
314 	ValaList* _tmp0_;
315 	ValaList* _tmp1_;
316 	ValaList* result = NULL;
317 	_tmp0_ = self->priv->virtuals;
318 	_tmp1_ = _vala_iterable_ref0 (_tmp0_);
319 	result = _tmp1_;
320 	return result;
321 }
322 
323 ValaList*
vala_interface_get_virtuals(ValaInterface * self)324 vala_interface_get_virtuals (ValaInterface* self)
325 {
326 	g_return_val_if_fail (self != NULL, NULL);
327 	return VALA_INTERFACE_GET_CLASS (self)->get_virtuals (self);
328 }
329 
330 static void
vala_interface_real_accept(ValaCodeNode * base,ValaCodeVisitor * visitor)331 vala_interface_real_accept (ValaCodeNode* base,
332                             ValaCodeVisitor* visitor)
333 {
334 	ValaInterface * self;
335 	self = (ValaInterface*) base;
336 	g_return_if_fail (visitor != NULL);
337 	vala_code_visitor_visit_interface (visitor, self);
338 }
339 
340 static void
vala_interface_real_accept_children(ValaCodeNode * base,ValaCodeVisitor * visitor)341 vala_interface_real_accept_children (ValaCodeNode* base,
342                                      ValaCodeVisitor* visitor)
343 {
344 	ValaInterface * self;
345 	self = (ValaInterface*) base;
346 	g_return_if_fail (visitor != NULL);
347 	{
348 		ValaList* _type_list = NULL;
349 		ValaList* _tmp0_;
350 		ValaList* _tmp1_;
351 		gint _type_size = 0;
352 		ValaList* _tmp2_;
353 		gint _tmp3_;
354 		gint _tmp4_;
355 		gint _type_index = 0;
356 		_tmp0_ = self->priv->prerequisites;
357 		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
358 		_type_list = _tmp1_;
359 		_tmp2_ = _type_list;
360 		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
361 		_tmp4_ = _tmp3_;
362 		_type_size = _tmp4_;
363 		_type_index = -1;
364 		while (TRUE) {
365 			gint _tmp5_;
366 			gint _tmp6_;
367 			ValaDataType* type = NULL;
368 			ValaList* _tmp7_;
369 			gpointer _tmp8_;
370 			ValaDataType* _tmp9_;
371 			_type_index = _type_index + 1;
372 			_tmp5_ = _type_index;
373 			_tmp6_ = _type_size;
374 			if (!(_tmp5_ < _tmp6_)) {
375 				break;
376 			}
377 			_tmp7_ = _type_list;
378 			_tmp8_ = vala_list_get (_tmp7_, _type_index);
379 			type = (ValaDataType*) _tmp8_;
380 			_tmp9_ = type;
381 			vala_code_node_accept ((ValaCodeNode*) _tmp9_, visitor);
382 			_vala_code_node_unref0 (type);
383 		}
384 		_vala_iterable_unref0 (_type_list);
385 	}
386 	VALA_CODE_NODE_CLASS (vala_interface_parent_class)->accept_children ((ValaCodeNode*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol), visitor);
387 }
388 
389 static gboolean
vala_interface_real_is_reference_type(ValaTypeSymbol * base)390 vala_interface_real_is_reference_type (ValaTypeSymbol* base)
391 {
392 	ValaInterface * self;
393 	gboolean result = FALSE;
394 	self = (ValaInterface*) base;
395 	result = TRUE;
396 	return result;
397 }
398 
399 static gboolean
vala_interface_real_is_subtype_of(ValaTypeSymbol * base,ValaTypeSymbol * t)400 vala_interface_real_is_subtype_of (ValaTypeSymbol* base,
401                                    ValaTypeSymbol* t)
402 {
403 	ValaInterface * self;
404 	gboolean result = FALSE;
405 	self = (ValaInterface*) base;
406 	g_return_val_if_fail (t != NULL, FALSE);
407 	if (G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol) == t) {
408 		result = TRUE;
409 		return result;
410 	}
411 	{
412 		ValaList* _prerequisite_list = NULL;
413 		ValaList* _tmp0_;
414 		ValaList* _tmp1_;
415 		gint _prerequisite_size = 0;
416 		ValaList* _tmp2_;
417 		gint _tmp3_;
418 		gint _tmp4_;
419 		gint _prerequisite_index = 0;
420 		_tmp0_ = self->priv->prerequisites;
421 		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
422 		_prerequisite_list = _tmp1_;
423 		_tmp2_ = _prerequisite_list;
424 		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
425 		_tmp4_ = _tmp3_;
426 		_prerequisite_size = _tmp4_;
427 		_prerequisite_index = -1;
428 		while (TRUE) {
429 			gint _tmp5_;
430 			gint _tmp6_;
431 			ValaDataType* prerequisite = NULL;
432 			ValaList* _tmp7_;
433 			gpointer _tmp8_;
434 			gboolean _tmp9_ = FALSE;
435 			ValaDataType* _tmp10_;
436 			ValaTypeSymbol* _tmp11_;
437 			ValaTypeSymbol* _tmp12_;
438 			_prerequisite_index = _prerequisite_index + 1;
439 			_tmp5_ = _prerequisite_index;
440 			_tmp6_ = _prerequisite_size;
441 			if (!(_tmp5_ < _tmp6_)) {
442 				break;
443 			}
444 			_tmp7_ = _prerequisite_list;
445 			_tmp8_ = vala_list_get (_tmp7_, _prerequisite_index);
446 			prerequisite = (ValaDataType*) _tmp8_;
447 			_tmp10_ = prerequisite;
448 			_tmp11_ = vala_data_type_get_type_symbol (_tmp10_);
449 			_tmp12_ = _tmp11_;
450 			if (_tmp12_ != NULL) {
451 				ValaDataType* _tmp13_;
452 				ValaTypeSymbol* _tmp14_;
453 				ValaTypeSymbol* _tmp15_;
454 				_tmp13_ = prerequisite;
455 				_tmp14_ = vala_data_type_get_type_symbol (_tmp13_);
456 				_tmp15_ = _tmp14_;
457 				_tmp9_ = vala_typesymbol_is_subtype_of (_tmp15_, t);
458 			} else {
459 				_tmp9_ = FALSE;
460 			}
461 			if (_tmp9_) {
462 				result = TRUE;
463 				_vala_code_node_unref0 (prerequisite);
464 				_vala_iterable_unref0 (_prerequisite_list);
465 				return result;
466 			}
467 			_vala_code_node_unref0 (prerequisite);
468 		}
469 		_vala_iterable_unref0 (_prerequisite_list);
470 	}
471 	result = FALSE;
472 	return result;
473 }
474 
475 static void
vala_interface_real_replace_type(ValaCodeNode * base,ValaDataType * old_type,ValaDataType * new_type)476 vala_interface_real_replace_type (ValaCodeNode* base,
477                                   ValaDataType* old_type,
478                                   ValaDataType* new_type)
479 {
480 	ValaInterface * self;
481 	self = (ValaInterface*) base;
482 	g_return_if_fail (old_type != NULL);
483 	g_return_if_fail (new_type != NULL);
484 	{
485 		gint i = 0;
486 		i = 0;
487 		{
488 			gboolean _tmp0_ = FALSE;
489 			_tmp0_ = TRUE;
490 			while (TRUE) {
491 				ValaList* _tmp2_;
492 				gint _tmp3_;
493 				gint _tmp4_;
494 				ValaList* _tmp5_;
495 				gpointer _tmp6_;
496 				ValaDataType* _tmp7_;
497 				gboolean _tmp8_;
498 				if (!_tmp0_) {
499 					gint _tmp1_;
500 					_tmp1_ = i;
501 					i = _tmp1_ + 1;
502 				}
503 				_tmp0_ = FALSE;
504 				_tmp2_ = self->priv->prerequisites;
505 				_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
506 				_tmp4_ = _tmp3_;
507 				if (!(i < _tmp4_)) {
508 					break;
509 				}
510 				_tmp5_ = self->priv->prerequisites;
511 				_tmp6_ = vala_list_get (_tmp5_, i);
512 				_tmp7_ = (ValaDataType*) _tmp6_;
513 				_tmp8_ = _tmp7_ == old_type;
514 				_vala_code_node_unref0 (_tmp7_);
515 				if (_tmp8_) {
516 					ValaList* _tmp9_;
517 					_tmp9_ = self->priv->prerequisites;
518 					vala_list_set (_tmp9_, i, new_type);
519 					vala_code_node_set_parent_node ((ValaCodeNode*) new_type, (ValaCodeNode*) self);
520 					return;
521 				}
522 			}
523 		}
524 	}
525 }
526 
527 static gpointer
_vala_source_file_ref0(gpointer self)528 _vala_source_file_ref0 (gpointer self)
529 {
530 	return self ? vala_source_file_ref (self) : NULL;
531 }
532 
533 static gpointer
_vala_code_node_ref0(gpointer self)534 _vala_code_node_ref0 (gpointer self)
535 {
536 	return self ? vala_code_node_ref (self) : NULL;
537 }
538 
539 static gboolean
vala_interface_real_check(ValaCodeNode * base,ValaCodeContext * context)540 vala_interface_real_check (ValaCodeNode* base,
541                            ValaCodeContext* context)
542 {
543 	ValaInterface * self;
544 	gboolean _tmp0_;
545 	gboolean _tmp1_;
546 	ValaSourceFile* old_source_file = NULL;
547 	ValaSemanticAnalyzer* _tmp4_;
548 	ValaSemanticAnalyzer* _tmp5_;
549 	ValaSourceFile* _tmp6_;
550 	ValaSourceFile* _tmp7_;
551 	ValaSourceFile* _tmp8_;
552 	ValaSymbol* old_symbol = NULL;
553 	ValaSemanticAnalyzer* _tmp9_;
554 	ValaSemanticAnalyzer* _tmp10_;
555 	ValaSymbol* _tmp11_;
556 	ValaSymbol* _tmp12_;
557 	ValaSymbol* _tmp13_;
558 	ValaSourceReference* _tmp14_;
559 	ValaSourceReference* _tmp15_;
560 	ValaSemanticAnalyzer* _tmp22_;
561 	ValaSemanticAnalyzer* _tmp23_;
562 	ValaClass* prereq_class = NULL;
563 	gboolean _tmp139_;
564 	gboolean _tmp140_;
565 	ValaMap* positions = NULL;
566 	GHashFunc _tmp278_;
567 	GEqualFunc _tmp279_;
568 	GEqualFunc _tmp280_;
569 	ValaHashMap* _tmp281_;
570 	gboolean ordered_seen = FALSE;
571 	gboolean unordered_seen = FALSE;
572 	ValaSemanticAnalyzer* _tmp357_;
573 	ValaSemanticAnalyzer* _tmp358_;
574 	ValaSourceFile* _tmp359_;
575 	ValaSemanticAnalyzer* _tmp360_;
576 	ValaSemanticAnalyzer* _tmp361_;
577 	ValaSymbol* _tmp362_;
578 	gboolean _tmp363_;
579 	gboolean _tmp364_;
580 	gboolean result = FALSE;
581 	self = (ValaInterface*) base;
582 	g_return_val_if_fail (context != NULL, FALSE);
583 	_tmp0_ = vala_code_node_get_checked ((ValaCodeNode*) self);
584 	_tmp1_ = _tmp0_;
585 	if (_tmp1_) {
586 		gboolean _tmp2_;
587 		gboolean _tmp3_;
588 		_tmp2_ = vala_code_node_get_error ((ValaCodeNode*) self);
589 		_tmp3_ = _tmp2_;
590 		result = !_tmp3_;
591 		return result;
592 	}
593 	if (!VALA_CODE_NODE_CLASS (vala_interface_parent_class)->check ((ValaCodeNode*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol), context)) {
594 		result = FALSE;
595 		return result;
596 	}
597 	vala_code_node_set_checked ((ValaCodeNode*) self, TRUE);
598 	_tmp4_ = vala_code_context_get_analyzer (context);
599 	_tmp5_ = _tmp4_;
600 	_tmp6_ = vala_semantic_analyzer_get_current_source_file (_tmp5_);
601 	_tmp7_ = _tmp6_;
602 	_tmp8_ = _vala_source_file_ref0 (_tmp7_);
603 	old_source_file = _tmp8_;
604 	_tmp9_ = vala_code_context_get_analyzer (context);
605 	_tmp10_ = _tmp9_;
606 	_tmp11_ = vala_semantic_analyzer_get_current_symbol (_tmp10_);
607 	_tmp12_ = _tmp11_;
608 	_tmp13_ = _vala_code_node_ref0 (_tmp12_);
609 	old_symbol = _tmp13_;
610 	_tmp14_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
611 	_tmp15_ = _tmp14_;
612 	if (_tmp15_ != NULL) {
613 		ValaSemanticAnalyzer* _tmp16_;
614 		ValaSemanticAnalyzer* _tmp17_;
615 		ValaSourceReference* _tmp18_;
616 		ValaSourceReference* _tmp19_;
617 		ValaSourceFile* _tmp20_;
618 		ValaSourceFile* _tmp21_;
619 		_tmp16_ = vala_code_context_get_analyzer (context);
620 		_tmp17_ = _tmp16_;
621 		_tmp18_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
622 		_tmp19_ = _tmp18_;
623 		_tmp20_ = vala_source_reference_get_file (_tmp19_);
624 		_tmp21_ = _tmp20_;
625 		vala_semantic_analyzer_set_current_source_file (_tmp17_, _tmp21_);
626 	}
627 	_tmp22_ = vala_code_context_get_analyzer (context);
628 	_tmp23_ = _tmp22_;
629 	vala_semantic_analyzer_set_current_symbol (_tmp23_, (ValaSymbol*) self);
630 	{
631 		ValaList* _prerequisite_reference_list = NULL;
632 		ValaList* _tmp24_;
633 		ValaList* _tmp25_;
634 		gint _prerequisite_reference_size = 0;
635 		ValaList* _tmp26_;
636 		gint _tmp27_;
637 		gint _tmp28_;
638 		gint _prerequisite_reference_index = 0;
639 		_tmp24_ = vala_interface_get_prerequisites (self);
640 		_tmp25_ = _vala_iterable_ref0 (_tmp24_);
641 		_prerequisite_reference_list = _tmp25_;
642 		_tmp26_ = _prerequisite_reference_list;
643 		_tmp27_ = vala_collection_get_size ((ValaCollection*) _tmp26_);
644 		_tmp28_ = _tmp27_;
645 		_prerequisite_reference_size = _tmp28_;
646 		_prerequisite_reference_index = -1;
647 		while (TRUE) {
648 			gint _tmp29_;
649 			gint _tmp30_;
650 			ValaDataType* prerequisite_reference = NULL;
651 			ValaList* _tmp31_;
652 			gpointer _tmp32_;
653 			ValaSemanticAnalyzer* _tmp33_;
654 			ValaSemanticAnalyzer* _tmp34_;
655 			ValaDataType* _tmp35_;
656 			_prerequisite_reference_index = _prerequisite_reference_index + 1;
657 			_tmp29_ = _prerequisite_reference_index;
658 			_tmp30_ = _prerequisite_reference_size;
659 			if (!(_tmp29_ < _tmp30_)) {
660 				break;
661 			}
662 			_tmp31_ = _prerequisite_reference_list;
663 			_tmp32_ = vala_list_get (_tmp31_, _prerequisite_reference_index);
664 			prerequisite_reference = (ValaDataType*) _tmp32_;
665 			_tmp33_ = vala_code_context_get_analyzer (context);
666 			_tmp34_ = _tmp33_;
667 			_tmp35_ = prerequisite_reference;
668 			if (!vala_semantic_analyzer_is_type_accessible (_tmp34_, (ValaSymbol*) self, _tmp35_)) {
669 				ValaSourceReference* _tmp36_;
670 				ValaSourceReference* _tmp37_;
671 				ValaDataType* _tmp38_;
672 				gchar* _tmp39_;
673 				gchar* _tmp40_;
674 				gchar* _tmp41_;
675 				gchar* _tmp42_;
676 				gchar* _tmp43_;
677 				gchar* _tmp44_;
678 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
679 				_tmp36_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
680 				_tmp37_ = _tmp36_;
681 				_tmp38_ = prerequisite_reference;
682 				_tmp39_ = vala_code_node_to_string ((ValaCodeNode*) _tmp38_);
683 				_tmp40_ = _tmp39_;
684 				_tmp41_ = vala_symbol_get_full_name ((ValaSymbol*) self);
685 				_tmp42_ = _tmp41_;
686 				_tmp43_ = g_strdup_printf ("prerequisite `%s' is less accessible than interface `%s'", _tmp40_, _tmp42_);
687 				_tmp44_ = _tmp43_;
688 				vala_report_error (_tmp37_, _tmp44_);
689 				_g_free0 (_tmp44_);
690 				_g_free0 (_tmp42_);
691 				_g_free0 (_tmp40_);
692 				result = FALSE;
693 				_vala_code_node_unref0 (prerequisite_reference);
694 				_vala_iterable_unref0 (_prerequisite_reference_list);
695 				_vala_code_node_unref0 (old_symbol);
696 				_vala_source_file_unref0 (old_source_file);
697 				return result;
698 			}
699 			_vala_code_node_unref0 (prerequisite_reference);
700 		}
701 		_vala_iterable_unref0 (_prerequisite_reference_list);
702 	}
703 	prereq_class = NULL;
704 	{
705 		ValaList* _prereq_list = NULL;
706 		ValaList* _tmp45_;
707 		ValaList* _tmp46_;
708 		gint _prereq_size = 0;
709 		ValaList* _tmp47_;
710 		gint _tmp48_;
711 		gint _tmp49_;
712 		gint _prereq_index = 0;
713 		_tmp45_ = vala_interface_get_prerequisites (self);
714 		_tmp46_ = _vala_iterable_ref0 (_tmp45_);
715 		_prereq_list = _tmp46_;
716 		_tmp47_ = _prereq_list;
717 		_tmp48_ = vala_collection_get_size ((ValaCollection*) _tmp47_);
718 		_tmp49_ = _tmp48_;
719 		_prereq_size = _tmp49_;
720 		_prereq_index = -1;
721 		while (TRUE) {
722 			gint _tmp50_;
723 			gint _tmp51_;
724 			ValaDataType* prereq = NULL;
725 			ValaList* _tmp52_;
726 			gpointer _tmp53_;
727 			ValaDataType* _tmp54_;
728 			ValaDataType* _tmp64_;
729 			ValaTypeSymbol* _tmp65_;
730 			ValaTypeSymbol* _tmp66_;
731 			_prereq_index = _prereq_index + 1;
732 			_tmp50_ = _prereq_index;
733 			_tmp51_ = _prereq_size;
734 			if (!(_tmp50_ < _tmp51_)) {
735 				break;
736 			}
737 			_tmp52_ = _prereq_list;
738 			_tmp53_ = vala_list_get (_tmp52_, _prereq_index);
739 			prereq = (ValaDataType*) _tmp53_;
740 			_tmp54_ = prereq;
741 			if (!VALA_IS_OBJECT_TYPE (_tmp54_)) {
742 				ValaSourceReference* _tmp55_;
743 				ValaSourceReference* _tmp56_;
744 				ValaDataType* _tmp57_;
745 				gchar* _tmp58_;
746 				gchar* _tmp59_;
747 				gchar* _tmp60_;
748 				gchar* _tmp61_;
749 				gchar* _tmp62_;
750 				gchar* _tmp63_;
751 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
752 				_tmp55_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
753 				_tmp56_ = _tmp55_;
754 				_tmp57_ = prereq;
755 				_tmp58_ = vala_code_node_to_string ((ValaCodeNode*) _tmp57_);
756 				_tmp59_ = _tmp58_;
757 				_tmp60_ = vala_symbol_get_full_name ((ValaSymbol*) self);
758 				_tmp61_ = _tmp60_;
759 				_tmp62_ = g_strdup_printf ("Prerequisite `%s' of interface `%s' is not a class or interface", _tmp59_, _tmp61_);
760 				_tmp63_ = _tmp62_;
761 				vala_report_error (_tmp56_, _tmp63_);
762 				_g_free0 (_tmp63_);
763 				_g_free0 (_tmp61_);
764 				_g_free0 (_tmp59_);
765 				result = FALSE;
766 				_vala_code_node_unref0 (prereq);
767 				_vala_iterable_unref0 (_prereq_list);
768 				_vala_code_node_unref0 (prereq_class);
769 				_vala_code_node_unref0 (old_symbol);
770 				_vala_source_file_unref0 (old_source_file);
771 				return result;
772 			}
773 			_tmp64_ = prereq;
774 			_tmp65_ = vala_data_type_get_type_symbol (_tmp64_);
775 			_tmp66_ = _tmp65_;
776 			if (VALA_IS_CLASS (_tmp66_)) {
777 				ValaClass* _tmp67_;
778 				ValaDataType* _tmp82_;
779 				ValaTypeSymbol* _tmp83_;
780 				ValaTypeSymbol* _tmp84_;
781 				ValaClass* _tmp85_;
782 				_tmp67_ = prereq_class;
783 				if (_tmp67_ != NULL) {
784 					ValaSourceReference* _tmp68_;
785 					ValaSourceReference* _tmp69_;
786 					gchar* _tmp70_;
787 					gchar* _tmp71_;
788 					ValaDataType* _tmp72_;
789 					ValaTypeSymbol* _tmp73_;
790 					ValaTypeSymbol* _tmp74_;
791 					gchar* _tmp75_;
792 					gchar* _tmp76_;
793 					ValaClass* _tmp77_;
794 					gchar* _tmp78_;
795 					gchar* _tmp79_;
796 					gchar* _tmp80_;
797 					gchar* _tmp81_;
798 					vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
799 					_tmp68_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
800 					_tmp69_ = _tmp68_;
801 					_tmp70_ = vala_symbol_get_full_name ((ValaSymbol*) self);
802 					_tmp71_ = _tmp70_;
803 					_tmp72_ = prereq;
804 					_tmp73_ = vala_data_type_get_type_symbol (_tmp72_);
805 					_tmp74_ = _tmp73_;
806 					_tmp75_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp74_);
807 					_tmp76_ = _tmp75_;
808 					_tmp77_ = prereq_class;
809 					_tmp78_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp77_);
810 					_tmp79_ = _tmp78_;
811 					_tmp80_ = g_strdup_printf ("%s: Interfaces cannot have multiple instantiable prerequisites (`%s' a" \
812 "nd `%s')", _tmp71_, _tmp76_, _tmp79_);
813 					_tmp81_ = _tmp80_;
814 					vala_report_error (_tmp69_, _tmp81_);
815 					_g_free0 (_tmp81_);
816 					_g_free0 (_tmp79_);
817 					_g_free0 (_tmp76_);
818 					_g_free0 (_tmp71_);
819 					result = FALSE;
820 					_vala_code_node_unref0 (prereq);
821 					_vala_iterable_unref0 (_prereq_list);
822 					_vala_code_node_unref0 (prereq_class);
823 					_vala_code_node_unref0 (old_symbol);
824 					_vala_source_file_unref0 (old_source_file);
825 					return result;
826 				}
827 				_tmp82_ = prereq;
828 				_tmp83_ = vala_data_type_get_type_symbol (_tmp82_);
829 				_tmp84_ = _tmp83_;
830 				_tmp85_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp84_, VALA_TYPE_CLASS, ValaClass));
831 				_vala_code_node_unref0 (prereq_class);
832 				prereq_class = _tmp85_;
833 			}
834 			_vala_code_node_unref0 (prereq);
835 		}
836 		_vala_iterable_unref0 (_prereq_list);
837 	}
838 	{
839 		ValaList* _type_list = NULL;
840 		ValaList* _tmp86_;
841 		ValaList* _tmp87_;
842 		gint _type_size = 0;
843 		ValaList* _tmp88_;
844 		gint _tmp89_;
845 		gint _tmp90_;
846 		gint _type_index = 0;
847 		_tmp86_ = self->priv->prerequisites;
848 		_tmp87_ = _vala_iterable_ref0 (_tmp86_);
849 		_type_list = _tmp87_;
850 		_tmp88_ = _type_list;
851 		_tmp89_ = vala_collection_get_size ((ValaCollection*) _tmp88_);
852 		_tmp90_ = _tmp89_;
853 		_type_size = _tmp90_;
854 		_type_index = -1;
855 		while (TRUE) {
856 			gint _tmp91_;
857 			gint _tmp92_;
858 			ValaDataType* type = NULL;
859 			ValaList* _tmp93_;
860 			gpointer _tmp94_;
861 			ValaDataType* _tmp95_;
862 			ValaSemanticAnalyzer* _tmp96_;
863 			ValaSemanticAnalyzer* _tmp97_;
864 			ValaDataType* _tmp98_;
865 			_type_index = _type_index + 1;
866 			_tmp91_ = _type_index;
867 			_tmp92_ = _type_size;
868 			if (!(_tmp91_ < _tmp92_)) {
869 				break;
870 			}
871 			_tmp93_ = _type_list;
872 			_tmp94_ = vala_list_get (_tmp93_, _type_index);
873 			type = (ValaDataType*) _tmp94_;
874 			_tmp95_ = type;
875 			vala_code_node_check ((ValaCodeNode*) _tmp95_, context);
876 			_tmp96_ = vala_code_context_get_analyzer (context);
877 			_tmp97_ = _tmp96_;
878 			_tmp98_ = type;
879 			vala_semantic_analyzer_check_type (_tmp97_, _tmp98_);
880 			_vala_code_node_unref0 (type);
881 		}
882 		_vala_iterable_unref0 (_type_list);
883 	}
884 	{
885 		ValaList* _p_list = NULL;
886 		ValaList* _tmp99_;
887 		ValaList* _tmp100_;
888 		gint _p_size = 0;
889 		ValaList* _tmp101_;
890 		gint _tmp102_;
891 		gint _tmp103_;
892 		gint _p_index = 0;
893 		_tmp99_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) self);
894 		_tmp100_ = _vala_iterable_ref0 (_tmp99_);
895 		_p_list = _tmp100_;
896 		_tmp101_ = _p_list;
897 		_tmp102_ = vala_collection_get_size ((ValaCollection*) _tmp101_);
898 		_tmp103_ = _tmp102_;
899 		_p_size = _tmp103_;
900 		_p_index = -1;
901 		while (TRUE) {
902 			gint _tmp104_;
903 			gint _tmp105_;
904 			ValaTypeParameter* p = NULL;
905 			ValaList* _tmp106_;
906 			gpointer _tmp107_;
907 			ValaTypeParameter* _tmp108_;
908 			_p_index = _p_index + 1;
909 			_tmp104_ = _p_index;
910 			_tmp105_ = _p_size;
911 			if (!(_tmp104_ < _tmp105_)) {
912 				break;
913 			}
914 			_tmp106_ = _p_list;
915 			_tmp107_ = vala_list_get (_tmp106_, _p_index);
916 			p = (ValaTypeParameter*) _tmp107_;
917 			_tmp108_ = p;
918 			vala_code_node_check ((ValaCodeNode*) _tmp108_, context);
919 			_vala_code_node_unref0 (p);
920 		}
921 		_vala_iterable_unref0 (_p_list);
922 	}
923 	{
924 		ValaList* _en_list = NULL;
925 		ValaList* _tmp109_;
926 		ValaList* _tmp110_;
927 		gint _en_size = 0;
928 		ValaList* _tmp111_;
929 		gint _tmp112_;
930 		gint _tmp113_;
931 		gint _en_index = 0;
932 		_tmp109_ = vala_object_type_symbol_get_enums ((ValaObjectTypeSymbol*) self);
933 		_tmp110_ = _vala_iterable_ref0 (_tmp109_);
934 		_en_list = _tmp110_;
935 		_tmp111_ = _en_list;
936 		_tmp112_ = vala_collection_get_size ((ValaCollection*) _tmp111_);
937 		_tmp113_ = _tmp112_;
938 		_en_size = _tmp113_;
939 		_en_index = -1;
940 		while (TRUE) {
941 			gint _tmp114_;
942 			gint _tmp115_;
943 			ValaEnum* en = NULL;
944 			ValaList* _tmp116_;
945 			gpointer _tmp117_;
946 			ValaEnum* _tmp118_;
947 			_en_index = _en_index + 1;
948 			_tmp114_ = _en_index;
949 			_tmp115_ = _en_size;
950 			if (!(_tmp114_ < _tmp115_)) {
951 				break;
952 			}
953 			_tmp116_ = _en_list;
954 			_tmp117_ = vala_list_get (_tmp116_, _en_index);
955 			en = (ValaEnum*) _tmp117_;
956 			_tmp118_ = en;
957 			vala_code_node_check ((ValaCodeNode*) _tmp118_, context);
958 			_vala_code_node_unref0 (en);
959 		}
960 		_vala_iterable_unref0 (_en_list);
961 	}
962 	{
963 		ValaList* _f_list = NULL;
964 		ValaList* _tmp119_;
965 		ValaList* _tmp120_;
966 		gint _f_size = 0;
967 		ValaList* _tmp121_;
968 		gint _tmp122_;
969 		gint _tmp123_;
970 		gint _f_index = 0;
971 		_tmp119_ = vala_object_type_symbol_get_fields ((ValaObjectTypeSymbol*) self);
972 		_tmp120_ = _vala_iterable_ref0 (_tmp119_);
973 		_f_list = _tmp120_;
974 		_tmp121_ = _f_list;
975 		_tmp122_ = vala_collection_get_size ((ValaCollection*) _tmp121_);
976 		_tmp123_ = _tmp122_;
977 		_f_size = _tmp123_;
978 		_f_index = -1;
979 		while (TRUE) {
980 			gint _tmp124_;
981 			gint _tmp125_;
982 			ValaField* f = NULL;
983 			ValaList* _tmp126_;
984 			gpointer _tmp127_;
985 			ValaField* _tmp128_;
986 			_f_index = _f_index + 1;
987 			_tmp124_ = _f_index;
988 			_tmp125_ = _f_size;
989 			if (!(_tmp124_ < _tmp125_)) {
990 				break;
991 			}
992 			_tmp126_ = _f_list;
993 			_tmp127_ = vala_list_get (_tmp126_, _f_index);
994 			f = (ValaField*) _tmp127_;
995 			_tmp128_ = f;
996 			vala_code_node_check ((ValaCodeNode*) _tmp128_, context);
997 			_vala_code_node_unref0 (f);
998 		}
999 		_vala_iterable_unref0 (_f_list);
1000 	}
1001 	{
1002 		ValaList* _c_list = NULL;
1003 		ValaList* _tmp129_;
1004 		ValaList* _tmp130_;
1005 		gint _c_size = 0;
1006 		ValaList* _tmp131_;
1007 		gint _tmp132_;
1008 		gint _tmp133_;
1009 		gint _c_index = 0;
1010 		_tmp129_ = vala_object_type_symbol_get_constants ((ValaObjectTypeSymbol*) self);
1011 		_tmp130_ = _vala_iterable_ref0 (_tmp129_);
1012 		_c_list = _tmp130_;
1013 		_tmp131_ = _c_list;
1014 		_tmp132_ = vala_collection_get_size ((ValaCollection*) _tmp131_);
1015 		_tmp133_ = _tmp132_;
1016 		_c_size = _tmp133_;
1017 		_c_index = -1;
1018 		while (TRUE) {
1019 			gint _tmp134_;
1020 			gint _tmp135_;
1021 			ValaConstant* c = NULL;
1022 			ValaList* _tmp136_;
1023 			gpointer _tmp137_;
1024 			ValaConstant* _tmp138_;
1025 			_c_index = _c_index + 1;
1026 			_tmp134_ = _c_index;
1027 			_tmp135_ = _c_size;
1028 			if (!(_tmp134_ < _tmp135_)) {
1029 				break;
1030 			}
1031 			_tmp136_ = _c_list;
1032 			_tmp137_ = vala_list_get (_tmp136_, _c_index);
1033 			c = (ValaConstant*) _tmp137_;
1034 			_tmp138_ = c;
1035 			vala_code_node_check ((ValaCodeNode*) _tmp138_, context);
1036 			_vala_code_node_unref0 (c);
1037 		}
1038 		_vala_iterable_unref0 (_c_list);
1039 	}
1040 	_tmp139_ = vala_code_context_get_abi_stability (context);
1041 	_tmp140_ = _tmp139_;
1042 	if (_tmp140_) {
1043 		{
1044 			ValaList* _s_list = NULL;
1045 			ValaList* _tmp141_;
1046 			ValaList* _tmp142_;
1047 			gint _s_size = 0;
1048 			ValaList* _tmp143_;
1049 			gint _tmp144_;
1050 			gint _tmp145_;
1051 			gint _s_index = 0;
1052 			_tmp141_ = vala_object_type_symbol_get_members ((ValaObjectTypeSymbol*) self);
1053 			_tmp142_ = _vala_iterable_ref0 (_tmp141_);
1054 			_s_list = _tmp142_;
1055 			_tmp143_ = _s_list;
1056 			_tmp144_ = vala_collection_get_size ((ValaCollection*) _tmp143_);
1057 			_tmp145_ = _tmp144_;
1058 			_s_size = _tmp145_;
1059 			_s_index = -1;
1060 			while (TRUE) {
1061 				gint _tmp146_;
1062 				gint _tmp147_;
1063 				ValaSymbol* s = NULL;
1064 				ValaList* _tmp148_;
1065 				gpointer _tmp149_;
1066 				ValaSymbol* _tmp150_;
1067 				_s_index = _s_index + 1;
1068 				_tmp146_ = _s_index;
1069 				_tmp147_ = _s_size;
1070 				if (!(_tmp146_ < _tmp147_)) {
1071 					break;
1072 				}
1073 				_tmp148_ = _s_list;
1074 				_tmp149_ = vala_list_get (_tmp148_, _s_index);
1075 				s = (ValaSymbol*) _tmp149_;
1076 				_tmp150_ = s;
1077 				if (VALA_IS_METHOD (_tmp150_)) {
1078 					ValaMethod* m = NULL;
1079 					ValaSymbol* _tmp151_;
1080 					ValaMethod* _tmp152_;
1081 					ValaMethod* _tmp153_;
1082 					gboolean _tmp154_ = FALSE;
1083 					ValaMethod* _tmp155_;
1084 					gboolean _tmp156_;
1085 					gboolean _tmp157_;
1086 					_tmp151_ = s;
1087 					_tmp152_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp151_, VALA_TYPE_METHOD, ValaMethod));
1088 					m = _tmp152_;
1089 					_tmp153_ = m;
1090 					vala_code_node_check ((ValaCodeNode*) _tmp153_, context);
1091 					_tmp155_ = m;
1092 					_tmp156_ = vala_method_get_is_virtual (_tmp155_);
1093 					_tmp157_ = _tmp156_;
1094 					if (_tmp157_) {
1095 						_tmp154_ = TRUE;
1096 					} else {
1097 						ValaMethod* _tmp158_;
1098 						gboolean _tmp159_;
1099 						gboolean _tmp160_;
1100 						_tmp158_ = m;
1101 						_tmp159_ = vala_method_get_is_abstract (_tmp158_);
1102 						_tmp160_ = _tmp159_;
1103 						_tmp154_ = _tmp160_;
1104 					}
1105 					if (_tmp154_) {
1106 						ValaList* _tmp161_;
1107 						ValaMethod* _tmp162_;
1108 						_tmp161_ = self->priv->virtuals;
1109 						_tmp162_ = m;
1110 						vala_collection_add ((ValaCollection*) _tmp161_, (ValaSymbol*) _tmp162_);
1111 					}
1112 					_vala_code_node_unref0 (m);
1113 				} else {
1114 					ValaSymbol* _tmp163_;
1115 					_tmp163_ = s;
1116 					if (VALA_IS_SIGNAL (_tmp163_)) {
1117 						ValaSignal* sig = NULL;
1118 						ValaSymbol* _tmp164_;
1119 						ValaSignal* _tmp165_;
1120 						ValaSignal* _tmp166_;
1121 						ValaSignal* _tmp167_;
1122 						gboolean _tmp168_;
1123 						gboolean _tmp169_;
1124 						_tmp164_ = s;
1125 						_tmp165_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp164_, VALA_TYPE_SIGNAL, ValaSignal));
1126 						sig = _tmp165_;
1127 						_tmp166_ = sig;
1128 						vala_code_node_check ((ValaCodeNode*) _tmp166_, context);
1129 						_tmp167_ = sig;
1130 						_tmp168_ = vala_signal_get_is_virtual (_tmp167_);
1131 						_tmp169_ = _tmp168_;
1132 						if (_tmp169_) {
1133 							ValaList* _tmp170_;
1134 							ValaSignal* _tmp171_;
1135 							_tmp170_ = self->priv->virtuals;
1136 							_tmp171_ = sig;
1137 							vala_collection_add ((ValaCollection*) _tmp170_, (ValaSymbol*) _tmp171_);
1138 						}
1139 						_vala_code_node_unref0 (sig);
1140 					} else {
1141 						ValaSymbol* _tmp172_;
1142 						_tmp172_ = s;
1143 						if (VALA_IS_PROPERTY (_tmp172_)) {
1144 							ValaProperty* prop = NULL;
1145 							ValaSymbol* _tmp173_;
1146 							ValaProperty* _tmp174_;
1147 							ValaProperty* _tmp175_;
1148 							gboolean _tmp176_ = FALSE;
1149 							ValaProperty* _tmp177_;
1150 							gboolean _tmp178_;
1151 							gboolean _tmp179_;
1152 							_tmp173_ = s;
1153 							_tmp174_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp173_, VALA_TYPE_PROPERTY, ValaProperty));
1154 							prop = _tmp174_;
1155 							_tmp175_ = prop;
1156 							vala_code_node_check ((ValaCodeNode*) _tmp175_, context);
1157 							_tmp177_ = prop;
1158 							_tmp178_ = vala_property_get_is_virtual (_tmp177_);
1159 							_tmp179_ = _tmp178_;
1160 							if (_tmp179_) {
1161 								_tmp176_ = TRUE;
1162 							} else {
1163 								ValaProperty* _tmp180_;
1164 								gboolean _tmp181_;
1165 								gboolean _tmp182_;
1166 								_tmp180_ = prop;
1167 								_tmp181_ = vala_property_get_is_abstract (_tmp180_);
1168 								_tmp182_ = _tmp181_;
1169 								_tmp176_ = _tmp182_;
1170 							}
1171 							if (_tmp176_) {
1172 								ValaList* _tmp183_;
1173 								ValaProperty* _tmp184_;
1174 								_tmp183_ = self->priv->virtuals;
1175 								_tmp184_ = prop;
1176 								vala_collection_add ((ValaCollection*) _tmp183_, (ValaSymbol*) _tmp184_);
1177 							}
1178 							_vala_code_node_unref0 (prop);
1179 						}
1180 					}
1181 				}
1182 				_vala_code_node_unref0 (s);
1183 			}
1184 			_vala_iterable_unref0 (_s_list);
1185 		}
1186 	} else {
1187 		{
1188 			ValaList* _m_list = NULL;
1189 			ValaList* _tmp185_;
1190 			ValaList* _tmp186_;
1191 			gint _m_size = 0;
1192 			ValaList* _tmp187_;
1193 			gint _tmp188_;
1194 			gint _tmp189_;
1195 			gint _m_index = 0;
1196 			_tmp185_ = vala_object_type_symbol_get_methods ((ValaObjectTypeSymbol*) self);
1197 			_tmp186_ = _vala_iterable_ref0 (_tmp185_);
1198 			_m_list = _tmp186_;
1199 			_tmp187_ = _m_list;
1200 			_tmp188_ = vala_collection_get_size ((ValaCollection*) _tmp187_);
1201 			_tmp189_ = _tmp188_;
1202 			_m_size = _tmp189_;
1203 			_m_index = -1;
1204 			while (TRUE) {
1205 				gint _tmp190_;
1206 				gint _tmp191_;
1207 				ValaMethod* m = NULL;
1208 				ValaList* _tmp192_;
1209 				gpointer _tmp193_;
1210 				ValaMethod* _tmp194_;
1211 				gboolean _tmp195_ = FALSE;
1212 				ValaMethod* _tmp196_;
1213 				gboolean _tmp197_;
1214 				gboolean _tmp198_;
1215 				_m_index = _m_index + 1;
1216 				_tmp190_ = _m_index;
1217 				_tmp191_ = _m_size;
1218 				if (!(_tmp190_ < _tmp191_)) {
1219 					break;
1220 				}
1221 				_tmp192_ = _m_list;
1222 				_tmp193_ = vala_list_get (_tmp192_, _m_index);
1223 				m = (ValaMethod*) _tmp193_;
1224 				_tmp194_ = m;
1225 				vala_code_node_check ((ValaCodeNode*) _tmp194_, context);
1226 				_tmp196_ = m;
1227 				_tmp197_ = vala_method_get_is_virtual (_tmp196_);
1228 				_tmp198_ = _tmp197_;
1229 				if (_tmp198_) {
1230 					_tmp195_ = TRUE;
1231 				} else {
1232 					ValaMethod* _tmp199_;
1233 					gboolean _tmp200_;
1234 					gboolean _tmp201_;
1235 					_tmp199_ = m;
1236 					_tmp200_ = vala_method_get_is_abstract (_tmp199_);
1237 					_tmp201_ = _tmp200_;
1238 					_tmp195_ = _tmp201_;
1239 				}
1240 				if (_tmp195_) {
1241 					ValaList* _tmp202_;
1242 					ValaMethod* _tmp203_;
1243 					_tmp202_ = self->priv->virtuals;
1244 					_tmp203_ = m;
1245 					vala_collection_add ((ValaCollection*) _tmp202_, (ValaSymbol*) _tmp203_);
1246 				}
1247 				_vala_code_node_unref0 (m);
1248 			}
1249 			_vala_iterable_unref0 (_m_list);
1250 		}
1251 		{
1252 			ValaList* _sig_list = NULL;
1253 			ValaList* _tmp204_;
1254 			ValaList* _tmp205_;
1255 			gint _sig_size = 0;
1256 			ValaList* _tmp206_;
1257 			gint _tmp207_;
1258 			gint _tmp208_;
1259 			gint _sig_index = 0;
1260 			_tmp204_ = vala_object_type_symbol_get_signals ((ValaObjectTypeSymbol*) self);
1261 			_tmp205_ = _vala_iterable_ref0 (_tmp204_);
1262 			_sig_list = _tmp205_;
1263 			_tmp206_ = _sig_list;
1264 			_tmp207_ = vala_collection_get_size ((ValaCollection*) _tmp206_);
1265 			_tmp208_ = _tmp207_;
1266 			_sig_size = _tmp208_;
1267 			_sig_index = -1;
1268 			while (TRUE) {
1269 				gint _tmp209_;
1270 				gint _tmp210_;
1271 				ValaSignal* sig = NULL;
1272 				ValaList* _tmp211_;
1273 				gpointer _tmp212_;
1274 				ValaSignal* _tmp213_;
1275 				ValaSignal* _tmp214_;
1276 				gboolean _tmp215_;
1277 				gboolean _tmp216_;
1278 				_sig_index = _sig_index + 1;
1279 				_tmp209_ = _sig_index;
1280 				_tmp210_ = _sig_size;
1281 				if (!(_tmp209_ < _tmp210_)) {
1282 					break;
1283 				}
1284 				_tmp211_ = _sig_list;
1285 				_tmp212_ = vala_list_get (_tmp211_, _sig_index);
1286 				sig = (ValaSignal*) _tmp212_;
1287 				_tmp213_ = sig;
1288 				vala_code_node_check ((ValaCodeNode*) _tmp213_, context);
1289 				_tmp214_ = sig;
1290 				_tmp215_ = vala_signal_get_is_virtual (_tmp214_);
1291 				_tmp216_ = _tmp215_;
1292 				if (_tmp216_) {
1293 					ValaList* _tmp217_;
1294 					ValaSignal* _tmp218_;
1295 					_tmp217_ = self->priv->virtuals;
1296 					_tmp218_ = sig;
1297 					vala_collection_add ((ValaCollection*) _tmp217_, (ValaSymbol*) _tmp218_);
1298 				}
1299 				_vala_code_node_unref0 (sig);
1300 			}
1301 			_vala_iterable_unref0 (_sig_list);
1302 		}
1303 		{
1304 			ValaList* _prop_list = NULL;
1305 			ValaList* _tmp219_;
1306 			ValaList* _tmp220_;
1307 			gint _prop_size = 0;
1308 			ValaList* _tmp221_;
1309 			gint _tmp222_;
1310 			gint _tmp223_;
1311 			gint _prop_index = 0;
1312 			_tmp219_ = vala_object_type_symbol_get_properties ((ValaObjectTypeSymbol*) self);
1313 			_tmp220_ = _vala_iterable_ref0 (_tmp219_);
1314 			_prop_list = _tmp220_;
1315 			_tmp221_ = _prop_list;
1316 			_tmp222_ = vala_collection_get_size ((ValaCollection*) _tmp221_);
1317 			_tmp223_ = _tmp222_;
1318 			_prop_size = _tmp223_;
1319 			_prop_index = -1;
1320 			while (TRUE) {
1321 				gint _tmp224_;
1322 				gint _tmp225_;
1323 				ValaProperty* prop = NULL;
1324 				ValaList* _tmp226_;
1325 				gpointer _tmp227_;
1326 				ValaProperty* _tmp228_;
1327 				gboolean _tmp229_ = FALSE;
1328 				ValaProperty* _tmp230_;
1329 				gboolean _tmp231_;
1330 				gboolean _tmp232_;
1331 				_prop_index = _prop_index + 1;
1332 				_tmp224_ = _prop_index;
1333 				_tmp225_ = _prop_size;
1334 				if (!(_tmp224_ < _tmp225_)) {
1335 					break;
1336 				}
1337 				_tmp226_ = _prop_list;
1338 				_tmp227_ = vala_list_get (_tmp226_, _prop_index);
1339 				prop = (ValaProperty*) _tmp227_;
1340 				_tmp228_ = prop;
1341 				vala_code_node_check ((ValaCodeNode*) _tmp228_, context);
1342 				_tmp230_ = prop;
1343 				_tmp231_ = vala_property_get_is_virtual (_tmp230_);
1344 				_tmp232_ = _tmp231_;
1345 				if (_tmp232_) {
1346 					_tmp229_ = TRUE;
1347 				} else {
1348 					ValaProperty* _tmp233_;
1349 					gboolean _tmp234_;
1350 					gboolean _tmp235_;
1351 					_tmp233_ = prop;
1352 					_tmp234_ = vala_property_get_is_abstract (_tmp233_);
1353 					_tmp235_ = _tmp234_;
1354 					_tmp229_ = _tmp235_;
1355 				}
1356 				if (_tmp229_) {
1357 					ValaList* _tmp236_;
1358 					ValaProperty* _tmp237_;
1359 					_tmp236_ = self->priv->virtuals;
1360 					_tmp237_ = prop;
1361 					vala_collection_add ((ValaCollection*) _tmp236_, (ValaSymbol*) _tmp237_);
1362 				}
1363 				_vala_code_node_unref0 (prop);
1364 			}
1365 			_vala_iterable_unref0 (_prop_list);
1366 		}
1367 	}
1368 	{
1369 		ValaList* _cl_list = NULL;
1370 		ValaList* _tmp238_;
1371 		ValaList* _tmp239_;
1372 		gint _cl_size = 0;
1373 		ValaList* _tmp240_;
1374 		gint _tmp241_;
1375 		gint _tmp242_;
1376 		gint _cl_index = 0;
1377 		_tmp238_ = vala_object_type_symbol_get_classes ((ValaObjectTypeSymbol*) self);
1378 		_tmp239_ = _vala_iterable_ref0 (_tmp238_);
1379 		_cl_list = _tmp239_;
1380 		_tmp240_ = _cl_list;
1381 		_tmp241_ = vala_collection_get_size ((ValaCollection*) _tmp240_);
1382 		_tmp242_ = _tmp241_;
1383 		_cl_size = _tmp242_;
1384 		_cl_index = -1;
1385 		while (TRUE) {
1386 			gint _tmp243_;
1387 			gint _tmp244_;
1388 			ValaClass* cl = NULL;
1389 			ValaList* _tmp245_;
1390 			gpointer _tmp246_;
1391 			ValaClass* _tmp247_;
1392 			_cl_index = _cl_index + 1;
1393 			_tmp243_ = _cl_index;
1394 			_tmp244_ = _cl_size;
1395 			if (!(_tmp243_ < _tmp244_)) {
1396 				break;
1397 			}
1398 			_tmp245_ = _cl_list;
1399 			_tmp246_ = vala_list_get (_tmp245_, _cl_index);
1400 			cl = (ValaClass*) _tmp246_;
1401 			_tmp247_ = cl;
1402 			vala_code_node_check ((ValaCodeNode*) _tmp247_, context);
1403 			_vala_code_node_unref0 (cl);
1404 		}
1405 		_vala_iterable_unref0 (_cl_list);
1406 	}
1407 	{
1408 		ValaList* _iface_list = NULL;
1409 		ValaList* _tmp248_;
1410 		ValaList* _tmp249_;
1411 		gint _iface_size = 0;
1412 		ValaList* _tmp250_;
1413 		gint _tmp251_;
1414 		gint _tmp252_;
1415 		gint _iface_index = 0;
1416 		_tmp248_ = vala_object_type_symbol_get_interfaces ((ValaObjectTypeSymbol*) self);
1417 		_tmp249_ = _vala_iterable_ref0 (_tmp248_);
1418 		_iface_list = _tmp249_;
1419 		_tmp250_ = _iface_list;
1420 		_tmp251_ = vala_collection_get_size ((ValaCollection*) _tmp250_);
1421 		_tmp252_ = _tmp251_;
1422 		_iface_size = _tmp252_;
1423 		_iface_index = -1;
1424 		while (TRUE) {
1425 			gint _tmp253_;
1426 			gint _tmp254_;
1427 			ValaInterface* iface = NULL;
1428 			ValaList* _tmp255_;
1429 			gpointer _tmp256_;
1430 			ValaInterface* _tmp257_;
1431 			_iface_index = _iface_index + 1;
1432 			_tmp253_ = _iface_index;
1433 			_tmp254_ = _iface_size;
1434 			if (!(_tmp253_ < _tmp254_)) {
1435 				break;
1436 			}
1437 			_tmp255_ = _iface_list;
1438 			_tmp256_ = vala_list_get (_tmp255_, _iface_index);
1439 			iface = (ValaInterface*) _tmp256_;
1440 			_tmp257_ = iface;
1441 			vala_code_node_check ((ValaCodeNode*) _tmp257_, context);
1442 			_vala_code_node_unref0 (iface);
1443 		}
1444 		_vala_iterable_unref0 (_iface_list);
1445 	}
1446 	{
1447 		ValaList* _st_list = NULL;
1448 		ValaList* _tmp258_;
1449 		ValaList* _tmp259_;
1450 		gint _st_size = 0;
1451 		ValaList* _tmp260_;
1452 		gint _tmp261_;
1453 		gint _tmp262_;
1454 		gint _st_index = 0;
1455 		_tmp258_ = vala_object_type_symbol_get_structs ((ValaObjectTypeSymbol*) self);
1456 		_tmp259_ = _vala_iterable_ref0 (_tmp258_);
1457 		_st_list = _tmp259_;
1458 		_tmp260_ = _st_list;
1459 		_tmp261_ = vala_collection_get_size ((ValaCollection*) _tmp260_);
1460 		_tmp262_ = _tmp261_;
1461 		_st_size = _tmp262_;
1462 		_st_index = -1;
1463 		while (TRUE) {
1464 			gint _tmp263_;
1465 			gint _tmp264_;
1466 			ValaStruct* st = NULL;
1467 			ValaList* _tmp265_;
1468 			gpointer _tmp266_;
1469 			ValaStruct* _tmp267_;
1470 			_st_index = _st_index + 1;
1471 			_tmp263_ = _st_index;
1472 			_tmp264_ = _st_size;
1473 			if (!(_tmp263_ < _tmp264_)) {
1474 				break;
1475 			}
1476 			_tmp265_ = _st_list;
1477 			_tmp266_ = vala_list_get (_tmp265_, _st_index);
1478 			st = (ValaStruct*) _tmp266_;
1479 			_tmp267_ = st;
1480 			vala_code_node_check ((ValaCodeNode*) _tmp267_, context);
1481 			_vala_code_node_unref0 (st);
1482 		}
1483 		_vala_iterable_unref0 (_st_list);
1484 	}
1485 	{
1486 		ValaList* _d_list = NULL;
1487 		ValaList* _tmp268_;
1488 		ValaList* _tmp269_;
1489 		gint _d_size = 0;
1490 		ValaList* _tmp270_;
1491 		gint _tmp271_;
1492 		gint _tmp272_;
1493 		gint _d_index = 0;
1494 		_tmp268_ = vala_object_type_symbol_get_delegates ((ValaObjectTypeSymbol*) self);
1495 		_tmp269_ = _vala_iterable_ref0 (_tmp268_);
1496 		_d_list = _tmp269_;
1497 		_tmp270_ = _d_list;
1498 		_tmp271_ = vala_collection_get_size ((ValaCollection*) _tmp270_);
1499 		_tmp272_ = _tmp271_;
1500 		_d_size = _tmp272_;
1501 		_d_index = -1;
1502 		while (TRUE) {
1503 			gint _tmp273_;
1504 			gint _tmp274_;
1505 			ValaDelegate* d = NULL;
1506 			ValaList* _tmp275_;
1507 			gpointer _tmp276_;
1508 			ValaDelegate* _tmp277_;
1509 			_d_index = _d_index + 1;
1510 			_tmp273_ = _d_index;
1511 			_tmp274_ = _d_size;
1512 			if (!(_tmp273_ < _tmp274_)) {
1513 				break;
1514 			}
1515 			_tmp275_ = _d_list;
1516 			_tmp276_ = vala_list_get (_tmp275_, _d_index);
1517 			d = (ValaDelegate*) _tmp276_;
1518 			_tmp277_ = d;
1519 			vala_code_node_check ((ValaCodeNode*) _tmp277_, context);
1520 			_vala_code_node_unref0 (d);
1521 		}
1522 		_vala_iterable_unref0 (_d_list);
1523 	}
1524 	_tmp278_ = g_direct_hash;
1525 	_tmp279_ = g_direct_equal;
1526 	_tmp280_ = g_direct_equal;
1527 	_tmp281_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp278_, _tmp279_, _tmp280_);
1528 	positions = (ValaMap*) _tmp281_;
1529 	ordered_seen = FALSE;
1530 	unordered_seen = FALSE;
1531 	{
1532 		ValaList* _sym_list = NULL;
1533 		ValaList* _tmp282_;
1534 		ValaList* _tmp283_;
1535 		gint _sym_size = 0;
1536 		ValaList* _tmp284_;
1537 		gint _tmp285_;
1538 		gint _tmp286_;
1539 		gint _sym_index = 0;
1540 		_tmp282_ = self->priv->virtuals;
1541 		_tmp283_ = _vala_iterable_ref0 (_tmp282_);
1542 		_sym_list = _tmp283_;
1543 		_tmp284_ = _sym_list;
1544 		_tmp285_ = vala_collection_get_size ((ValaCollection*) _tmp284_);
1545 		_tmp286_ = _tmp285_;
1546 		_sym_size = _tmp286_;
1547 		_sym_index = -1;
1548 		while (TRUE) {
1549 			gint _tmp287_;
1550 			gint _tmp288_;
1551 			ValaSymbol* sym = NULL;
1552 			ValaList* _tmp289_;
1553 			gpointer _tmp290_;
1554 			gint ordering = 0;
1555 			ValaSymbol* _tmp291_;
1556 			gboolean ordered = FALSE;
1557 			gboolean _tmp300_ = FALSE;
1558 			gboolean _tmp301_ = FALSE;
1559 			gboolean _tmp310_ = FALSE;
1560 			gboolean _tmp311_ = FALSE;
1561 			gboolean _tmp312_ = FALSE;
1562 			gboolean _tmp321_ = FALSE;
1563 			gboolean _tmp322_ = FALSE;
1564 			_sym_index = _sym_index + 1;
1565 			_tmp287_ = _sym_index;
1566 			_tmp288_ = _sym_size;
1567 			if (!(_tmp287_ < _tmp288_)) {
1568 				break;
1569 			}
1570 			_tmp289_ = _sym_list;
1571 			_tmp290_ = vala_list_get (_tmp289_, _sym_index);
1572 			sym = (ValaSymbol*) _tmp290_;
1573 			_tmp291_ = sym;
1574 			ordering = vala_code_node_get_attribute_integer ((ValaCodeNode*) _tmp291_, "CCode", "ordering", -1);
1575 			if (ordering < -1) {
1576 				ValaSymbol* _tmp292_;
1577 				ValaSourceReference* _tmp293_;
1578 				ValaSourceReference* _tmp294_;
1579 				ValaSymbol* _tmp295_;
1580 				gchar* _tmp296_;
1581 				gchar* _tmp297_;
1582 				gchar* _tmp298_;
1583 				gchar* _tmp299_;
1584 				_tmp292_ = sym;
1585 				_tmp293_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp292_);
1586 				_tmp294_ = _tmp293_;
1587 				_tmp295_ = sym;
1588 				_tmp296_ = vala_symbol_get_full_name (_tmp295_);
1589 				_tmp297_ = _tmp296_;
1590 				_tmp298_ = g_strdup_printf ("%s: Invalid ordering", _tmp297_);
1591 				_tmp299_ = _tmp298_;
1592 				vala_report_error (_tmp294_, _tmp299_);
1593 				_g_free0 (_tmp299_);
1594 				_g_free0 (_tmp297_);
1595 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1596 				ordered_seen = TRUE;
1597 				unordered_seen = TRUE;
1598 				_vala_code_node_unref0 (sym);
1599 				continue;
1600 			}
1601 			ordered = ordering != -1;
1602 			if (ordered) {
1603 				_tmp301_ = unordered_seen;
1604 			} else {
1605 				_tmp301_ = FALSE;
1606 			}
1607 			if (_tmp301_) {
1608 				_tmp300_ = !ordered_seen;
1609 			} else {
1610 				_tmp300_ = FALSE;
1611 			}
1612 			if (_tmp300_) {
1613 				ValaSymbol* _tmp302_;
1614 				ValaSourceReference* _tmp303_;
1615 				ValaSourceReference* _tmp304_;
1616 				ValaSymbol* _tmp305_;
1617 				gchar* _tmp306_;
1618 				gchar* _tmp307_;
1619 				gchar* _tmp308_;
1620 				gchar* _tmp309_;
1621 				_tmp302_ = sym;
1622 				_tmp303_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp302_);
1623 				_tmp304_ = _tmp303_;
1624 				_tmp305_ = sym;
1625 				_tmp306_ = vala_symbol_get_full_name (_tmp305_);
1626 				_tmp307_ = _tmp306_;
1627 				_tmp308_ = g_strdup_printf ("%s: Cannot mix ordered and unordered virtuals", _tmp307_);
1628 				_tmp309_ = _tmp308_;
1629 				vala_report_error (_tmp304_, _tmp309_);
1630 				_g_free0 (_tmp309_);
1631 				_g_free0 (_tmp307_);
1632 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1633 			}
1634 			if (ordered_seen) {
1635 				_tmp310_ = TRUE;
1636 			} else {
1637 				_tmp310_ = ordered;
1638 			}
1639 			ordered_seen = _tmp310_;
1640 			if (!ordered) {
1641 				_tmp312_ = !unordered_seen;
1642 			} else {
1643 				_tmp312_ = FALSE;
1644 			}
1645 			if (_tmp312_) {
1646 				_tmp311_ = ordered_seen;
1647 			} else {
1648 				_tmp311_ = FALSE;
1649 			}
1650 			if (_tmp311_) {
1651 				ValaSymbol* _tmp313_;
1652 				ValaSourceReference* _tmp314_;
1653 				ValaSourceReference* _tmp315_;
1654 				ValaSymbol* _tmp316_;
1655 				gchar* _tmp317_;
1656 				gchar* _tmp318_;
1657 				gchar* _tmp319_;
1658 				gchar* _tmp320_;
1659 				_tmp313_ = sym;
1660 				_tmp314_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp313_);
1661 				_tmp315_ = _tmp314_;
1662 				_tmp316_ = sym;
1663 				_tmp317_ = vala_symbol_get_full_name (_tmp316_);
1664 				_tmp318_ = _tmp317_;
1665 				_tmp319_ = g_strdup_printf ("%s: Cannot mix ordered and unordered virtuals", _tmp318_);
1666 				_tmp320_ = _tmp319_;
1667 				vala_report_error (_tmp315_, _tmp320_);
1668 				_g_free0 (_tmp320_);
1669 				_g_free0 (_tmp318_);
1670 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1671 			}
1672 			if (unordered_seen) {
1673 				_tmp321_ = TRUE;
1674 			} else {
1675 				_tmp321_ = !ordered;
1676 			}
1677 			unordered_seen = _tmp321_;
1678 			if (!ordered_seen) {
1679 				_tmp322_ = TRUE;
1680 			} else {
1681 				_tmp322_ = !unordered_seen;
1682 			}
1683 			if (_tmp322_) {
1684 				if (ordered) {
1685 					ValaSymbol* prev = NULL;
1686 					ValaMap* _tmp323_;
1687 					gpointer _tmp324_;
1688 					ValaSymbol* _tmp325_;
1689 					ValaMap* _tmp337_;
1690 					ValaSymbol* _tmp338_;
1691 					_tmp323_ = positions;
1692 					_tmp324_ = vala_map_get (_tmp323_, (gpointer) ((gintptr) ordering));
1693 					prev = (ValaSymbol*) _tmp324_;
1694 					_tmp325_ = prev;
1695 					if (_tmp325_ != NULL) {
1696 						ValaSymbol* _tmp326_;
1697 						ValaSourceReference* _tmp327_;
1698 						ValaSourceReference* _tmp328_;
1699 						ValaSymbol* _tmp329_;
1700 						gchar* _tmp330_;
1701 						gchar* _tmp331_;
1702 						ValaSymbol* _tmp332_;
1703 						const gchar* _tmp333_;
1704 						const gchar* _tmp334_;
1705 						gchar* _tmp335_;
1706 						gchar* _tmp336_;
1707 						_tmp326_ = sym;
1708 						_tmp327_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp326_);
1709 						_tmp328_ = _tmp327_;
1710 						_tmp329_ = sym;
1711 						_tmp330_ = vala_symbol_get_full_name (_tmp329_);
1712 						_tmp331_ = _tmp330_;
1713 						_tmp332_ = prev;
1714 						_tmp333_ = vala_symbol_get_name (_tmp332_);
1715 						_tmp334_ = _tmp333_;
1716 						_tmp335_ = g_strdup_printf ("%s: Duplicate ordering (previous virtual with the same position is %s)", _tmp331_, _tmp334_);
1717 						_tmp336_ = _tmp335_;
1718 						vala_report_error (_tmp328_, _tmp336_);
1719 						_g_free0 (_tmp336_);
1720 						_g_free0 (_tmp331_);
1721 						vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1722 					}
1723 					_tmp337_ = positions;
1724 					_tmp338_ = sym;
1725 					vala_map_set (_tmp337_, (gpointer) ((gintptr) ordering), _tmp338_);
1726 					_vala_code_node_unref0 (prev);
1727 				}
1728 			}
1729 			_vala_code_node_unref0 (sym);
1730 		}
1731 		_vala_iterable_unref0 (_sym_list);
1732 	}
1733 	if (ordered_seen) {
1734 		{
1735 			gint i = 0;
1736 			i = 0;
1737 			{
1738 				gboolean _tmp339_ = FALSE;
1739 				_tmp339_ = TRUE;
1740 				while (TRUE) {
1741 					ValaList* _tmp341_;
1742 					gint _tmp342_;
1743 					gint _tmp343_;
1744 					ValaSymbol* sym = NULL;
1745 					ValaMap* _tmp344_;
1746 					gpointer _tmp345_;
1747 					ValaSymbol* _tmp346_;
1748 					gboolean _tmp353_;
1749 					gboolean _tmp354_;
1750 					if (!_tmp339_) {
1751 						gint _tmp340_;
1752 						_tmp340_ = i;
1753 						i = _tmp340_ + 1;
1754 					}
1755 					_tmp339_ = FALSE;
1756 					_tmp341_ = self->priv->virtuals;
1757 					_tmp342_ = vala_collection_get_size ((ValaCollection*) _tmp341_);
1758 					_tmp343_ = _tmp342_;
1759 					if (!(i < _tmp343_)) {
1760 						break;
1761 					}
1762 					_tmp344_ = positions;
1763 					_tmp345_ = vala_map_get (_tmp344_, (gpointer) ((gintptr) i));
1764 					sym = (ValaSymbol*) _tmp345_;
1765 					_tmp346_ = sym;
1766 					if (_tmp346_ == NULL) {
1767 						ValaSourceReference* _tmp347_;
1768 						ValaSourceReference* _tmp348_;
1769 						gchar* _tmp349_;
1770 						gchar* _tmp350_;
1771 						gchar* _tmp351_;
1772 						gchar* _tmp352_;
1773 						_tmp347_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1774 						_tmp348_ = _tmp347_;
1775 						_tmp349_ = vala_symbol_get_full_name ((ValaSymbol*) self);
1776 						_tmp350_ = _tmp349_;
1777 						_tmp351_ = g_strdup_printf ("%s: Gap in ordering in position %d", _tmp350_, i);
1778 						_tmp352_ = _tmp351_;
1779 						vala_report_error (_tmp348_, _tmp352_);
1780 						_g_free0 (_tmp352_);
1781 						_g_free0 (_tmp350_);
1782 						vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1783 					}
1784 					_tmp353_ = vala_code_node_get_error ((ValaCodeNode*) self);
1785 					_tmp354_ = _tmp353_;
1786 					if (!_tmp354_) {
1787 						ValaList* _tmp355_;
1788 						ValaSymbol* _tmp356_;
1789 						_tmp355_ = self->priv->virtuals;
1790 						_tmp356_ = sym;
1791 						vala_list_set (_tmp355_, i, _tmp356_);
1792 					}
1793 					_vala_code_node_unref0 (sym);
1794 				}
1795 			}
1796 		}
1797 	}
1798 	_tmp357_ = vala_code_context_get_analyzer (context);
1799 	_tmp358_ = _tmp357_;
1800 	_tmp359_ = old_source_file;
1801 	vala_semantic_analyzer_set_current_source_file (_tmp358_, _tmp359_);
1802 	_tmp360_ = vala_code_context_get_analyzer (context);
1803 	_tmp361_ = _tmp360_;
1804 	_tmp362_ = old_symbol;
1805 	vala_semantic_analyzer_set_current_symbol (_tmp361_, _tmp362_);
1806 	_tmp363_ = vala_code_node_get_error ((ValaCodeNode*) self);
1807 	_tmp364_ = _tmp363_;
1808 	result = !_tmp364_;
1809 	_vala_map_unref0 (positions);
1810 	_vala_code_node_unref0 (prereq_class);
1811 	_vala_code_node_unref0 (old_symbol);
1812 	_vala_source_file_unref0 (old_source_file);
1813 	return result;
1814 }
1815 
1816 static void
vala_interface_class_init(ValaInterfaceClass * klass,gpointer klass_data)1817 vala_interface_class_init (ValaInterfaceClass * klass,
1818                            gpointer klass_data)
1819 {
1820 	vala_interface_parent_class = g_type_class_peek_parent (klass);
1821 	((ValaCodeNodeClass *) klass)->finalize = vala_interface_finalize;
1822 	g_type_class_adjust_private_offset (klass, &ValaInterface_private_offset);
1823 	((ValaSymbolClass *) klass)->add_method = (void (*) (ValaSymbol*, ValaMethod*)) vala_interface_real_add_method;
1824 	((ValaSymbolClass *) klass)->add_property = (void (*) (ValaSymbol*, ValaProperty*)) vala_interface_real_add_property;
1825 	((ValaInterfaceClass *) klass)->get_virtuals = (ValaList* (*) (ValaInterface*)) vala_interface_real_get_virtuals;
1826 	((ValaCodeNodeClass *) klass)->accept = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_interface_real_accept;
1827 	((ValaCodeNodeClass *) klass)->accept_children = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_interface_real_accept_children;
1828 	((ValaTypeSymbolClass *) klass)->is_reference_type = (gboolean (*) (ValaTypeSymbol*)) vala_interface_real_is_reference_type;
1829 	((ValaTypeSymbolClass *) klass)->is_subtype_of = (gboolean (*) (ValaTypeSymbol*, ValaTypeSymbol*)) vala_interface_real_is_subtype_of;
1830 	((ValaCodeNodeClass *) klass)->replace_type = (void (*) (ValaCodeNode*, ValaDataType*, ValaDataType*)) vala_interface_real_replace_type;
1831 	((ValaCodeNodeClass *) klass)->check = (gboolean (*) (ValaCodeNode*, ValaCodeContext*)) vala_interface_real_check;
1832 }
1833 
1834 static void
vala_interface_instance_init(ValaInterface * self,gpointer klass)1835 vala_interface_instance_init (ValaInterface * self,
1836                               gpointer klass)
1837 {
1838 	GEqualFunc _tmp0_;
1839 	ValaArrayList* _tmp1_;
1840 	GEqualFunc _tmp2_;
1841 	ValaArrayList* _tmp3_;
1842 	self->priv = vala_interface_get_instance_private (self);
1843 	_tmp0_ = g_direct_equal;
1844 	_tmp1_ = vala_array_list_new (VALA_TYPE_DATA_TYPE, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp0_);
1845 	self->priv->prerequisites = (ValaList*) _tmp1_;
1846 	_tmp2_ = g_direct_equal;
1847 	_tmp3_ = vala_array_list_new (VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp2_);
1848 	self->priv->virtuals = (ValaList*) _tmp3_;
1849 }
1850 
1851 static void
vala_interface_finalize(ValaCodeNode * obj)1852 vala_interface_finalize (ValaCodeNode * obj)
1853 {
1854 	ValaInterface * self;
1855 	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_INTERFACE, ValaInterface);
1856 	_vala_iterable_unref0 (self->priv->prerequisites);
1857 	_vala_iterable_unref0 (self->priv->virtuals);
1858 	VALA_CODE_NODE_CLASS (vala_interface_parent_class)->finalize (obj);
1859 }
1860 
1861 /**
1862  * Represents an interface declaration in the source code.
1863  */
1864 static GType
vala_interface_get_type_once(void)1865 vala_interface_get_type_once (void)
1866 {
1867 	static const GTypeInfo g_define_type_info = { sizeof (ValaInterfaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_interface_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaInterface), 0, (GInstanceInitFunc) vala_interface_instance_init, NULL };
1868 	GType vala_interface_type_id;
1869 	vala_interface_type_id = g_type_register_static (VALA_TYPE_OBJECT_TYPE_SYMBOL, "ValaInterface", &g_define_type_info, 0);
1870 	ValaInterface_private_offset = g_type_add_instance_private (vala_interface_type_id, sizeof (ValaInterfacePrivate));
1871 	return vala_interface_type_id;
1872 }
1873 
1874 GType
vala_interface_get_type(void)1875 vala_interface_get_type (void)
1876 {
1877 	static volatile gsize vala_interface_type_id__volatile = 0;
1878 	if (g_once_init_enter (&vala_interface_type_id__volatile)) {
1879 		GType vala_interface_type_id;
1880 		vala_interface_type_id = vala_interface_get_type_once ();
1881 		g_once_init_leave (&vala_interface_type_id__volatile, vala_interface_type_id);
1882 	}
1883 	return vala_interface_type_id__volatile;
1884 }
1885 
1886