1 /* valaclass.c generated by valac, the Vala compiler
2  * generated from valaclass.vala, do not modify */
3 
4 /* valaclass.vala
5  *
6  * Copyright (C) 2006-2012  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 <glib.h>
28 #include <valagee.h>
29 #include <glib-object.h>
30 #include <string.h>
31 #include <stdlib.h>
32 
33 #define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
34 #define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))
35 #define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
36 #define _vala_map_unref0(var) ((var == NULL) ? NULL : (var = (vala_map_unref (var), NULL)))
37 #define _vala_source_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_file_unref (var), NULL)))
38 
39 struct _ValaClassPrivate {
40 	ValaClass* _base_class;
41 	gboolean _is_abstract;
42 	gboolean _is_sealed;
43 	gboolean _has_private_fields;
44 	gboolean _has_class_private_fields;
45 	gboolean* _is_compact;
46 	gboolean* _is_immutable;
47 	gboolean* _is_singleton;
48 	ValaList* base_types;
49 	ValaHashMap* implicit_implementations;
50 	ValaCreationMethod* _default_construction_method;
51 	ValaConstructor* _constructor;
52 	ValaConstructor* _class_constructor;
53 	ValaConstructor* _static_constructor;
54 	ValaDestructor* _destructor;
55 	ValaDestructor* _class_destructor;
56 	ValaDestructor* _static_destructor;
57 };
58 
59 static gint ValaClass_private_offset;
60 static gpointer vala_class_parent_class = NULL;
61 
62 static gboolean* _bool_dup (gboolean* self);
63 static void vala_class_set_has_class_private_fields (ValaClass* self,
64                                               gboolean value);
65 static guint _vala_symbol_hash_func_ghash_func (gconstpointer key);
66 static gboolean _vala_symbol_equal_func_gequal_func (gconstpointer a,
67                                               gconstpointer b);
68 static void vala_class_set_default_construction_method (ValaClass* self,
69                                                  ValaCreationMethod* value);
70 static void vala_class_set_constructor (ValaClass* self,
71                                  ValaConstructor* value);
72 static void vala_class_set_class_constructor (ValaClass* self,
73                                        ValaConstructor* value);
74 static void vala_class_set_static_constructor (ValaClass* self,
75                                         ValaConstructor* value);
76 static void vala_class_set_destructor (ValaClass* self,
77                                 ValaDestructor* value);
78 static void vala_class_set_static_destructor (ValaClass* self,
79                                        ValaDestructor* value);
80 static void vala_class_set_class_destructor (ValaClass* self,
81                                       ValaDestructor* value);
82 static void vala_class_real_add_field (ValaSymbol* base,
83                                 ValaField* f);
84 static void vala_class_real_add_method (ValaSymbol* base,
85                                  ValaMethod* m);
86 static void vala_class_real_add_property (ValaSymbol* base,
87                                    ValaProperty* prop);
88 static void vala_class_real_add_constructor (ValaSymbol* base,
89                                       ValaConstructor* c);
90 static void vala_class_real_add_destructor (ValaSymbol* base,
91                                      ValaDestructor* d);
92 static void vala_class_real_accept (ValaCodeNode* base,
93                              ValaCodeVisitor* visitor);
94 static void vala_class_real_accept_children (ValaCodeNode* base,
95                                       ValaCodeVisitor* visitor);
96 static gboolean vala_class_real_is_reference_type (ValaTypeSymbol* base);
97 static gboolean vala_class_real_is_subtype_of (ValaTypeSymbol* base,
98                                         ValaTypeSymbol* t);
99 static void vala_class_real_replace_type (ValaCodeNode* base,
100                                    ValaDataType* old_type,
101                                    ValaDataType* new_type);
102 static void vala_class_get_all_prerequisites (ValaClass* self,
103                                        ValaInterface* iface,
104                                        ValaList* list);
105 static gboolean vala_class_real_check (ValaCodeNode* base,
106                                 ValaCodeContext* context);
107 static void vala_class_finalize (ValaCodeNode * obj);
108 static GType vala_class_get_type_once (void);
109 
110 static inline gpointer
vala_class_get_instance_private(ValaClass * self)111 vala_class_get_instance_private (ValaClass* self)
112 {
113 	return G_STRUCT_MEMBER_P (self, ValaClass_private_offset);
114 }
115 
116 ValaClass*
vala_class_get_base_class(ValaClass * self)117 vala_class_get_base_class (ValaClass* self)
118 {
119 	ValaClass* result;
120 	ValaClass* _tmp0_;
121 	g_return_val_if_fail (self != NULL, NULL);
122 	_tmp0_ = self->priv->_base_class;
123 	result = _tmp0_;
124 	return result;
125 }
126 
127 static gpointer
_vala_code_node_ref0(gpointer self)128 _vala_code_node_ref0 (gpointer self)
129 {
130 	return self ? vala_code_node_ref (self) : NULL;
131 }
132 
133 void
vala_class_set_base_class(ValaClass * self,ValaClass * value)134 vala_class_set_base_class (ValaClass* self,
135                            ValaClass* value)
136 {
137 	ValaClass* _tmp0_;
138 	g_return_if_fail (self != NULL);
139 	_tmp0_ = _vala_code_node_ref0 (value);
140 	_vala_code_node_unref0 (self->priv->_base_class);
141 	self->priv->_base_class = _tmp0_;
142 }
143 
144 gboolean
vala_class_get_is_abstract(ValaClass * self)145 vala_class_get_is_abstract (ValaClass* self)
146 {
147 	gboolean result;
148 	g_return_val_if_fail (self != NULL, FALSE);
149 	result = self->priv->_is_abstract;
150 	return result;
151 }
152 
153 void
vala_class_set_is_abstract(ValaClass * self,gboolean value)154 vala_class_set_is_abstract (ValaClass* self,
155                             gboolean value)
156 {
157 	g_return_if_fail (self != NULL);
158 	self->priv->_is_abstract = value;
159 }
160 
161 gboolean
vala_class_get_is_sealed(ValaClass * self)162 vala_class_get_is_sealed (ValaClass* self)
163 {
164 	gboolean result;
165 	g_return_val_if_fail (self != NULL, FALSE);
166 	result = self->priv->_is_sealed;
167 	return result;
168 }
169 
170 void
vala_class_set_is_sealed(ValaClass * self,gboolean value)171 vala_class_set_is_sealed (ValaClass* self,
172                           gboolean value)
173 {
174 	g_return_if_fail (self != NULL);
175 	self->priv->_is_sealed = value;
176 }
177 
178 static gboolean*
_bool_dup(gboolean * self)179 _bool_dup (gboolean* self)
180 {
181 	gboolean* dup;
182 	dup = g_new0 (gboolean, 1);
183 	memcpy (dup, self, sizeof (gboolean));
184 	return dup;
185 }
186 
187 static gpointer
__bool_dup0(gpointer self)188 __bool_dup0 (gpointer self)
189 {
190 	return self ? _bool_dup (self) : NULL;
191 }
192 
193 gboolean
vala_class_get_is_compact(ValaClass * self)194 vala_class_get_is_compact (ValaClass* self)
195 {
196 	gboolean result;
197 	gboolean* _tmp0_;
198 	gboolean* _tmp11_;
199 	g_return_val_if_fail (self != NULL, FALSE);
200 	_tmp0_ = self->priv->_is_compact;
201 	if (_tmp0_ == NULL) {
202 		gboolean _tmp1_ = FALSE;
203 		ValaClass* _tmp2_;
204 		_tmp2_ = self->priv->_base_class;
205 		if (_tmp2_ != NULL) {
206 			ValaClass* _tmp3_;
207 			_tmp3_ = self->priv->_base_class;
208 			_tmp1_ = !vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) _tmp3_, (ValaTypeSymbol*) self);
209 		} else {
210 			_tmp1_ = FALSE;
211 		}
212 		if (_tmp1_) {
213 			ValaClass* _tmp4_;
214 			gboolean _tmp5_;
215 			gboolean _tmp6_;
216 			gboolean* _tmp7_;
217 			_tmp4_ = self->priv->_base_class;
218 			_tmp5_ = vala_class_get_is_compact (_tmp4_);
219 			_tmp6_ = _tmp5_;
220 			_tmp7_ = __bool_dup0 (&_tmp6_);
221 			_g_free0 (self->priv->_is_compact);
222 			self->priv->_is_compact = _tmp7_;
223 		} else {
224 			ValaAttribute* _tmp8_;
225 			gboolean _tmp9_;
226 			gboolean* _tmp10_;
227 			_tmp8_ = vala_code_node_get_attribute ((ValaCodeNode*) self, "Compact");
228 			_tmp9_ = _tmp8_ != NULL;
229 			_tmp10_ = __bool_dup0 (&_tmp9_);
230 			_g_free0 (self->priv->_is_compact);
231 			self->priv->_is_compact = _tmp10_;
232 		}
233 	}
234 	_tmp11_ = self->priv->_is_compact;
235 	result = *_tmp11_;
236 	return result;
237 }
238 
239 void
vala_class_set_is_compact(ValaClass * self,gboolean value)240 vala_class_set_is_compact (ValaClass* self,
241                            gboolean value)
242 {
243 	gboolean* _tmp0_;
244 	g_return_if_fail (self != NULL);
245 	_tmp0_ = __bool_dup0 (&value);
246 	_g_free0 (self->priv->_is_compact);
247 	self->priv->_is_compact = _tmp0_;
248 	vala_code_node_set_attribute ((ValaCodeNode*) self, "Compact", value, NULL);
249 }
250 
251 gboolean
vala_class_get_is_immutable(ValaClass * self)252 vala_class_get_is_immutable (ValaClass* self)
253 {
254 	gboolean result;
255 	gboolean* _tmp0_;
256 	gboolean* _tmp11_;
257 	g_return_val_if_fail (self != NULL, FALSE);
258 	_tmp0_ = self->priv->_is_immutable;
259 	if (_tmp0_ == NULL) {
260 		gboolean _tmp1_ = FALSE;
261 		ValaClass* _tmp2_;
262 		_tmp2_ = self->priv->_base_class;
263 		if (_tmp2_ != NULL) {
264 			ValaClass* _tmp3_;
265 			_tmp3_ = self->priv->_base_class;
266 			_tmp1_ = !vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) _tmp3_, (ValaTypeSymbol*) self);
267 		} else {
268 			_tmp1_ = FALSE;
269 		}
270 		if (_tmp1_) {
271 			ValaClass* _tmp4_;
272 			gboolean _tmp5_;
273 			gboolean _tmp6_;
274 			gboolean* _tmp7_;
275 			_tmp4_ = self->priv->_base_class;
276 			_tmp5_ = vala_class_get_is_immutable (_tmp4_);
277 			_tmp6_ = _tmp5_;
278 			_tmp7_ = __bool_dup0 (&_tmp6_);
279 			_g_free0 (self->priv->_is_immutable);
280 			self->priv->_is_immutable = _tmp7_;
281 		} else {
282 			ValaAttribute* _tmp8_;
283 			gboolean _tmp9_;
284 			gboolean* _tmp10_;
285 			_tmp8_ = vala_code_node_get_attribute ((ValaCodeNode*) self, "Immutable");
286 			_tmp9_ = _tmp8_ != NULL;
287 			_tmp10_ = __bool_dup0 (&_tmp9_);
288 			_g_free0 (self->priv->_is_immutable);
289 			self->priv->_is_immutable = _tmp10_;
290 		}
291 	}
292 	_tmp11_ = self->priv->_is_immutable;
293 	result = *_tmp11_;
294 	return result;
295 }
296 
297 void
vala_class_set_is_immutable(ValaClass * self,gboolean value)298 vala_class_set_is_immutable (ValaClass* self,
299                              gboolean value)
300 {
301 	gboolean* _tmp0_;
302 	g_return_if_fail (self != NULL);
303 	_tmp0_ = __bool_dup0 (&value);
304 	_g_free0 (self->priv->_is_immutable);
305 	self->priv->_is_immutable = _tmp0_;
306 	vala_code_node_set_attribute ((ValaCodeNode*) self, "Immutable", value, NULL);
307 }
308 
309 gboolean
vala_class_get_is_singleton(ValaClass * self)310 vala_class_get_is_singleton (ValaClass* self)
311 {
312 	gboolean result;
313 	gboolean* _tmp0_;
314 	gboolean* _tmp4_;
315 	g_return_val_if_fail (self != NULL, FALSE);
316 	_tmp0_ = self->priv->_is_singleton;
317 	if (_tmp0_ == NULL) {
318 		ValaAttribute* _tmp1_;
319 		gboolean _tmp2_;
320 		gboolean* _tmp3_;
321 		_tmp1_ = vala_code_node_get_attribute ((ValaCodeNode*) self, "SingleInstance");
322 		_tmp2_ = _tmp1_ != NULL;
323 		_tmp3_ = __bool_dup0 (&_tmp2_);
324 		_g_free0 (self->priv->_is_singleton);
325 		self->priv->_is_singleton = _tmp3_;
326 	}
327 	_tmp4_ = self->priv->_is_singleton;
328 	result = *_tmp4_;
329 	return result;
330 }
331 
332 void
vala_class_set_is_singleton(ValaClass * self,gboolean value)333 vala_class_set_is_singleton (ValaClass* self,
334                              gboolean value)
335 {
336 	gboolean* _tmp0_;
337 	g_return_if_fail (self != NULL);
338 	_tmp0_ = __bool_dup0 (&value);
339 	_g_free0 (self->priv->_is_singleton);
340 	self->priv->_is_singleton = _tmp0_;
341 	vala_code_node_set_attribute ((ValaCodeNode*) self, "SingleInstance", value, NULL);
342 }
343 
344 gboolean
vala_class_get_has_private_fields(ValaClass * self)345 vala_class_get_has_private_fields (ValaClass* self)
346 {
347 	gboolean result;
348 	g_return_val_if_fail (self != NULL, FALSE);
349 	result = self->priv->_has_private_fields;
350 	return result;
351 }
352 
353 void
vala_class_set_has_private_fields(ValaClass * self,gboolean value)354 vala_class_set_has_private_fields (ValaClass* self,
355                                    gboolean value)
356 {
357 	g_return_if_fail (self != NULL);
358 	self->priv->_has_private_fields = value;
359 }
360 
361 gboolean
vala_class_get_has_class_private_fields(ValaClass * self)362 vala_class_get_has_class_private_fields (ValaClass* self)
363 {
364 	gboolean result;
365 	g_return_val_if_fail (self != NULL, FALSE);
366 	result = self->priv->_has_class_private_fields;
367 	return result;
368 }
369 
370 static void
vala_class_set_has_class_private_fields(ValaClass * self,gboolean value)371 vala_class_set_has_class_private_fields (ValaClass* self,
372                                          gboolean value)
373 {
374 	g_return_if_fail (self != NULL);
375 	self->priv->_has_class_private_fields = value;
376 }
377 
378 static guint
_vala_symbol_hash_func_ghash_func(gconstpointer key)379 _vala_symbol_hash_func_ghash_func (gconstpointer key)
380 {
381 	guint result;
382 	result = vala_symbol_hash_func ((ValaSymbol*) key);
383 	return result;
384 }
385 
386 static gboolean
_vala_symbol_equal_func_gequal_func(gconstpointer a,gconstpointer b)387 _vala_symbol_equal_func_gequal_func (gconstpointer a,
388                                      gconstpointer b)
389 {
390 	gboolean result;
391 	result = vala_symbol_equal_func ((ValaSymbol*) a, (ValaSymbol*) b);
392 	return result;
393 }
394 
395 ValaCreationMethod*
vala_class_get_default_construction_method(ValaClass * self)396 vala_class_get_default_construction_method (ValaClass* self)
397 {
398 	ValaCreationMethod* result;
399 	ValaCreationMethod* _tmp0_;
400 	g_return_val_if_fail (self != NULL, NULL);
401 	_tmp0_ = self->priv->_default_construction_method;
402 	result = _tmp0_;
403 	return result;
404 }
405 
406 static void
vala_class_set_default_construction_method(ValaClass * self,ValaCreationMethod * value)407 vala_class_set_default_construction_method (ValaClass* self,
408                                             ValaCreationMethod* value)
409 {
410 	ValaCreationMethod* _tmp0_;
411 	g_return_if_fail (self != NULL);
412 	_tmp0_ = _vala_code_node_ref0 (value);
413 	_vala_code_node_unref0 (self->priv->_default_construction_method);
414 	self->priv->_default_construction_method = _tmp0_;
415 }
416 
417 ValaConstructor*
vala_class_get_constructor(ValaClass * self)418 vala_class_get_constructor (ValaClass* self)
419 {
420 	ValaConstructor* result;
421 	ValaConstructor* _tmp0_;
422 	g_return_val_if_fail (self != NULL, NULL);
423 	_tmp0_ = self->priv->_constructor;
424 	result = _tmp0_;
425 	return result;
426 }
427 
428 static void
vala_class_set_constructor(ValaClass * self,ValaConstructor * value)429 vala_class_set_constructor (ValaClass* self,
430                             ValaConstructor* value)
431 {
432 	ValaConstructor* _tmp0_;
433 	ValaConstructor* _tmp1_;
434 	g_return_if_fail (self != NULL);
435 	_tmp0_ = _vala_code_node_ref0 (value);
436 	_vala_code_node_unref0 (self->priv->_constructor);
437 	self->priv->_constructor = _tmp0_;
438 	_tmp1_ = self->priv->_constructor;
439 	if (_tmp1_ != NULL) {
440 		ValaConstructor* _tmp2_;
441 		ValaScope* _tmp3_;
442 		ValaScope* _tmp4_;
443 		_tmp2_ = self->priv->_constructor;
444 		_tmp3_ = vala_symbol_get_scope ((ValaSymbol*) self);
445 		_tmp4_ = _tmp3_;
446 		vala_symbol_set_owner ((ValaSymbol*) _tmp2_, _tmp4_);
447 	}
448 }
449 
450 ValaConstructor*
vala_class_get_class_constructor(ValaClass * self)451 vala_class_get_class_constructor (ValaClass* self)
452 {
453 	ValaConstructor* result;
454 	ValaConstructor* _tmp0_;
455 	g_return_val_if_fail (self != NULL, NULL);
456 	_tmp0_ = self->priv->_class_constructor;
457 	result = _tmp0_;
458 	return result;
459 }
460 
461 static void
vala_class_set_class_constructor(ValaClass * self,ValaConstructor * value)462 vala_class_set_class_constructor (ValaClass* self,
463                                   ValaConstructor* value)
464 {
465 	ValaConstructor* _tmp0_;
466 	ValaConstructor* _tmp1_;
467 	g_return_if_fail (self != NULL);
468 	_tmp0_ = _vala_code_node_ref0 (value);
469 	_vala_code_node_unref0 (self->priv->_class_constructor);
470 	self->priv->_class_constructor = _tmp0_;
471 	_tmp1_ = self->priv->_class_constructor;
472 	if (_tmp1_ != NULL) {
473 		ValaConstructor* _tmp2_;
474 		ValaScope* _tmp3_;
475 		ValaScope* _tmp4_;
476 		_tmp2_ = self->priv->_class_constructor;
477 		_tmp3_ = vala_symbol_get_scope ((ValaSymbol*) self);
478 		_tmp4_ = _tmp3_;
479 		vala_symbol_set_owner ((ValaSymbol*) _tmp2_, _tmp4_);
480 	}
481 }
482 
483 ValaConstructor*
vala_class_get_static_constructor(ValaClass * self)484 vala_class_get_static_constructor (ValaClass* self)
485 {
486 	ValaConstructor* result;
487 	ValaConstructor* _tmp0_;
488 	g_return_val_if_fail (self != NULL, NULL);
489 	_tmp0_ = self->priv->_static_constructor;
490 	result = _tmp0_;
491 	return result;
492 }
493 
494 static void
vala_class_set_static_constructor(ValaClass * self,ValaConstructor * value)495 vala_class_set_static_constructor (ValaClass* self,
496                                    ValaConstructor* value)
497 {
498 	ValaConstructor* _tmp0_;
499 	ValaConstructor* _tmp1_;
500 	g_return_if_fail (self != NULL);
501 	_tmp0_ = _vala_code_node_ref0 (value);
502 	_vala_code_node_unref0 (self->priv->_static_constructor);
503 	self->priv->_static_constructor = _tmp0_;
504 	_tmp1_ = self->priv->_static_constructor;
505 	if (_tmp1_ != NULL) {
506 		ValaConstructor* _tmp2_;
507 		ValaScope* _tmp3_;
508 		ValaScope* _tmp4_;
509 		_tmp2_ = self->priv->_static_constructor;
510 		_tmp3_ = vala_symbol_get_scope ((ValaSymbol*) self);
511 		_tmp4_ = _tmp3_;
512 		vala_symbol_set_owner ((ValaSymbol*) _tmp2_, _tmp4_);
513 	}
514 }
515 
516 ValaDestructor*
vala_class_get_destructor(ValaClass * self)517 vala_class_get_destructor (ValaClass* self)
518 {
519 	ValaDestructor* result;
520 	ValaDestructor* _tmp0_;
521 	g_return_val_if_fail (self != NULL, NULL);
522 	_tmp0_ = self->priv->_destructor;
523 	result = _tmp0_;
524 	return result;
525 }
526 
527 static void
vala_class_set_destructor(ValaClass * self,ValaDestructor * value)528 vala_class_set_destructor (ValaClass* self,
529                            ValaDestructor* value)
530 {
531 	ValaDestructor* _tmp0_;
532 	ValaDestructor* _tmp1_;
533 	g_return_if_fail (self != NULL);
534 	_tmp0_ = _vala_code_node_ref0 (value);
535 	_vala_code_node_unref0 (self->priv->_destructor);
536 	self->priv->_destructor = _tmp0_;
537 	_tmp1_ = self->priv->_destructor;
538 	if (_tmp1_ != NULL) {
539 		ValaDestructor* _tmp2_;
540 		ValaScope* _tmp3_;
541 		ValaScope* _tmp4_;
542 		_tmp2_ = self->priv->_destructor;
543 		_tmp3_ = vala_symbol_get_scope ((ValaSymbol*) self);
544 		_tmp4_ = _tmp3_;
545 		vala_symbol_set_owner ((ValaSymbol*) _tmp2_, _tmp4_);
546 	}
547 }
548 
549 ValaDestructor*
vala_class_get_static_destructor(ValaClass * self)550 vala_class_get_static_destructor (ValaClass* self)
551 {
552 	ValaDestructor* result;
553 	ValaDestructor* _tmp0_;
554 	g_return_val_if_fail (self != NULL, NULL);
555 	_tmp0_ = self->priv->_static_destructor;
556 	result = _tmp0_;
557 	return result;
558 }
559 
560 static void
vala_class_set_static_destructor(ValaClass * self,ValaDestructor * value)561 vala_class_set_static_destructor (ValaClass* self,
562                                   ValaDestructor* value)
563 {
564 	ValaDestructor* _tmp0_;
565 	ValaDestructor* _tmp1_;
566 	g_return_if_fail (self != NULL);
567 	_tmp0_ = _vala_code_node_ref0 (value);
568 	_vala_code_node_unref0 (self->priv->_static_destructor);
569 	self->priv->_static_destructor = _tmp0_;
570 	_tmp1_ = self->priv->_static_destructor;
571 	if (_tmp1_ != NULL) {
572 		ValaDestructor* _tmp2_;
573 		ValaScope* _tmp3_;
574 		ValaScope* _tmp4_;
575 		_tmp2_ = self->priv->_static_destructor;
576 		_tmp3_ = vala_symbol_get_scope ((ValaSymbol*) self);
577 		_tmp4_ = _tmp3_;
578 		vala_symbol_set_owner ((ValaSymbol*) _tmp2_, _tmp4_);
579 	}
580 }
581 
582 ValaDestructor*
vala_class_get_class_destructor(ValaClass * self)583 vala_class_get_class_destructor (ValaClass* self)
584 {
585 	ValaDestructor* result;
586 	ValaDestructor* _tmp0_;
587 	g_return_val_if_fail (self != NULL, NULL);
588 	_tmp0_ = self->priv->_class_destructor;
589 	result = _tmp0_;
590 	return result;
591 }
592 
593 static void
vala_class_set_class_destructor(ValaClass * self,ValaDestructor * value)594 vala_class_set_class_destructor (ValaClass* self,
595                                  ValaDestructor* value)
596 {
597 	ValaDestructor* _tmp0_;
598 	ValaDestructor* _tmp1_;
599 	g_return_if_fail (self != NULL);
600 	_tmp0_ = _vala_code_node_ref0 (value);
601 	_vala_code_node_unref0 (self->priv->_class_destructor);
602 	self->priv->_class_destructor = _tmp0_;
603 	_tmp1_ = self->priv->_class_destructor;
604 	if (_tmp1_ != NULL) {
605 		ValaDestructor* _tmp2_;
606 		ValaScope* _tmp3_;
607 		ValaScope* _tmp4_;
608 		_tmp2_ = self->priv->_class_destructor;
609 		_tmp3_ = vala_symbol_get_scope ((ValaSymbol*) self);
610 		_tmp4_ = _tmp3_;
611 		vala_symbol_set_owner ((ValaSymbol*) _tmp2_, _tmp4_);
612 	}
613 }
614 
615 gboolean
vala_class_get_is_error_base(ValaClass * self)616 vala_class_get_is_error_base (ValaClass* self)
617 {
618 	gboolean result;
619 	ValaAttribute* _tmp0_;
620 	g_return_val_if_fail (self != NULL, FALSE);
621 	_tmp0_ = vala_code_node_get_attribute ((ValaCodeNode*) self, "ErrorBase");
622 	result = _tmp0_ != NULL;
623 	return result;
624 }
625 
626 /**
627  * Creates a new class.
628  *
629  * @param name             type name
630  * @param source_reference reference to source code
631  * @param comment          class documentation
632  * @return                 newly created class
633  */
634 ValaClass*
vala_class_construct(GType object_type,const gchar * name,ValaSourceReference * source_reference,ValaComment * comment)635 vala_class_construct (GType object_type,
636                       const gchar* name,
637                       ValaSourceReference* source_reference,
638                       ValaComment* comment)
639 {
640 	ValaClass* self = NULL;
641 	g_return_val_if_fail (name != NULL, NULL);
642 	self = (ValaClass*) vala_object_type_symbol_construct (object_type, name, source_reference, comment);
643 	return self;
644 }
645 
646 ValaClass*
vala_class_new(const gchar * name,ValaSourceReference * source_reference,ValaComment * comment)647 vala_class_new (const gchar* name,
648                 ValaSourceReference* source_reference,
649                 ValaComment* comment)
650 {
651 	return vala_class_construct (VALA_TYPE_CLASS, name, source_reference, comment);
652 }
653 
654 /**
655  * Adds the specified class or interface to the list of base types of
656  * this class.
657  *
658  * @param type a class or interface reference
659  */
660 void
vala_class_add_base_type(ValaClass * self,ValaDataType * type)661 vala_class_add_base_type (ValaClass* self,
662                           ValaDataType* type)
663 {
664 	ValaList* _tmp0_;
665 	g_return_if_fail (self != NULL);
666 	g_return_if_fail (type != NULL);
667 	_tmp0_ = self->priv->base_types;
668 	vala_collection_add ((ValaCollection*) _tmp0_, type);
669 	vala_code_node_set_parent_node ((ValaCodeNode*) type, (ValaCodeNode*) self);
670 }
671 
672 /**
673  * Returns the base type list.
674  *
675  * @return list of base types
676  */
677 ValaList*
vala_class_get_base_types(ValaClass * self)678 vala_class_get_base_types (ValaClass* self)
679 {
680 	ValaList* _tmp0_;
681 	ValaList* result = NULL;
682 	g_return_val_if_fail (self != NULL, NULL);
683 	_tmp0_ = self->priv->base_types;
684 	result = _tmp0_;
685 	return result;
686 }
687 
688 /**
689  * Adds the specified field as a member to this class.
690  *
691  * @param f a field
692  */
693 static void
vala_class_real_add_field(ValaSymbol * base,ValaField * f)694 vala_class_real_add_field (ValaSymbol* base,
695                            ValaField* f)
696 {
697 	ValaClass * self;
698 	gboolean _tmp0_ = FALSE;
699 	ValaSymbolAccessibility _tmp1_;
700 	ValaSymbolAccessibility _tmp2_;
701 	self = (ValaClass*) base;
702 	g_return_if_fail (f != NULL);
703 	VALA_SYMBOL_CLASS (vala_class_parent_class)->add_field ((ValaSymbol*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol), f);
704 	_tmp1_ = vala_symbol_get_access ((ValaSymbol*) f);
705 	_tmp2_ = _tmp1_;
706 	if (_tmp2_ == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
707 		ValaMemberBinding _tmp3_;
708 		ValaMemberBinding _tmp4_;
709 		_tmp3_ = vala_field_get_binding (f);
710 		_tmp4_ = _tmp3_;
711 		_tmp0_ = _tmp4_ == VALA_MEMBER_BINDING_INSTANCE;
712 	} else {
713 		_tmp0_ = FALSE;
714 	}
715 	if (_tmp0_) {
716 		vala_class_set_has_private_fields (self, TRUE);
717 	} else {
718 		gboolean _tmp5_ = FALSE;
719 		ValaSymbolAccessibility _tmp6_;
720 		ValaSymbolAccessibility _tmp7_;
721 		_tmp6_ = vala_symbol_get_access ((ValaSymbol*) f);
722 		_tmp7_ = _tmp6_;
723 		if (_tmp7_ == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
724 			ValaMemberBinding _tmp8_;
725 			ValaMemberBinding _tmp9_;
726 			_tmp8_ = vala_field_get_binding (f);
727 			_tmp9_ = _tmp8_;
728 			_tmp5_ = _tmp9_ == VALA_MEMBER_BINDING_CLASS;
729 		} else {
730 			_tmp5_ = FALSE;
731 		}
732 		if (_tmp5_) {
733 			vala_class_set_has_class_private_fields (self, TRUE);
734 		}
735 	}
736 }
737 
738 /**
739  * Adds the specified method as a member to this class.
740  *
741  * @param m a method
742  */
743 static void
vala_class_real_add_method(ValaSymbol * base,ValaMethod * m)744 vala_class_real_add_method (ValaSymbol* base,
745                             ValaMethod* m)
746 {
747 	ValaClass * self;
748 	gboolean _tmp0_ = FALSE;
749 	ValaMemberBinding _tmp1_;
750 	ValaMemberBinding _tmp2_;
751 	gboolean _tmp25_ = FALSE;
752 	ValaDataType* _tmp26_;
753 	ValaDataType* _tmp27_;
754 	self = (ValaClass*) base;
755 	g_return_if_fail (m != NULL);
756 	_tmp1_ = vala_method_get_binding (m);
757 	_tmp2_ = _tmp1_;
758 	if (_tmp2_ != VALA_MEMBER_BINDING_STATIC) {
759 		_tmp0_ = TRUE;
760 	} else {
761 		_tmp0_ = VALA_IS_CREATION_METHOD (m);
762 	}
763 	if (_tmp0_) {
764 		ValaParameter* _tmp3_;
765 		ValaParameter* _tmp4_;
766 		ValaDataType* _tmp11_;
767 		ValaDataType* _tmp12_;
768 		ValaSourceReference* _tmp13_;
769 		ValaSourceReference* _tmp14_;
770 		ValaParameter* _tmp15_;
771 		ValaParameter* _tmp16_;
772 		ValaScope* _tmp17_;
773 		ValaScope* _tmp18_;
774 		ValaParameter* _tmp19_;
775 		ValaParameter* _tmp20_;
776 		const gchar* _tmp21_;
777 		const gchar* _tmp22_;
778 		ValaParameter* _tmp23_;
779 		ValaParameter* _tmp24_;
780 		_tmp3_ = vala_method_get_this_parameter (m);
781 		_tmp4_ = _tmp3_;
782 		if (_tmp4_ != NULL) {
783 			ValaScope* _tmp5_;
784 			ValaScope* _tmp6_;
785 			ValaParameter* _tmp7_;
786 			ValaParameter* _tmp8_;
787 			const gchar* _tmp9_;
788 			const gchar* _tmp10_;
789 			_tmp5_ = vala_symbol_get_scope ((ValaSymbol*) m);
790 			_tmp6_ = _tmp5_;
791 			_tmp7_ = vala_method_get_this_parameter (m);
792 			_tmp8_ = _tmp7_;
793 			_tmp9_ = vala_symbol_get_name ((ValaSymbol*) _tmp8_);
794 			_tmp10_ = _tmp9_;
795 			vala_scope_remove (_tmp6_, _tmp10_);
796 		}
797 		_tmp11_ = vala_semantic_analyzer_get_this_type ((ValaSymbol*) m, (ValaTypeSymbol*) self);
798 		_tmp12_ = _tmp11_;
799 		_tmp13_ = vala_code_node_get_source_reference ((ValaCodeNode*) m);
800 		_tmp14_ = _tmp13_;
801 		_tmp15_ = vala_parameter_new ("this", _tmp12_, _tmp14_);
802 		_tmp16_ = _tmp15_;
803 		vala_method_set_this_parameter (m, _tmp16_);
804 		_vala_code_node_unref0 (_tmp16_);
805 		_vala_code_node_unref0 (_tmp12_);
806 		_tmp17_ = vala_symbol_get_scope ((ValaSymbol*) m);
807 		_tmp18_ = _tmp17_;
808 		_tmp19_ = vala_method_get_this_parameter (m);
809 		_tmp20_ = _tmp19_;
810 		_tmp21_ = vala_symbol_get_name ((ValaSymbol*) _tmp20_);
811 		_tmp22_ = _tmp21_;
812 		_tmp23_ = vala_method_get_this_parameter (m);
813 		_tmp24_ = _tmp23_;
814 		vala_scope_add (_tmp18_, _tmp22_, (ValaSymbol*) _tmp24_);
815 	}
816 	_tmp26_ = vala_callable_get_return_type ((ValaCallable*) m);
817 	_tmp27_ = _tmp26_;
818 	if (!VALA_IS_VOID_TYPE (_tmp27_)) {
819 		ValaList* _tmp28_;
820 		gint _tmp29_;
821 		gint _tmp30_;
822 		_tmp28_ = vala_method_get_postconditions (m);
823 		_tmp29_ = vala_collection_get_size ((ValaCollection*) _tmp28_);
824 		_tmp30_ = _tmp29_;
825 		_tmp25_ = _tmp30_ > 0;
826 	} else {
827 		_tmp25_ = FALSE;
828 	}
829 	if (_tmp25_) {
830 		ValaLocalVariable* _tmp31_;
831 		ValaLocalVariable* _tmp32_;
832 		ValaDataType* _tmp39_;
833 		ValaDataType* _tmp40_;
834 		ValaDataType* _tmp41_;
835 		ValaDataType* _tmp42_;
836 		ValaSourceReference* _tmp43_;
837 		ValaSourceReference* _tmp44_;
838 		ValaLocalVariable* _tmp45_;
839 		ValaLocalVariable* _tmp46_;
840 		ValaLocalVariable* _tmp47_;
841 		ValaLocalVariable* _tmp48_;
842 		_tmp31_ = vala_subroutine_get_result_var ((ValaSubroutine*) m);
843 		_tmp32_ = _tmp31_;
844 		if (_tmp32_ != NULL) {
845 			ValaScope* _tmp33_;
846 			ValaScope* _tmp34_;
847 			ValaLocalVariable* _tmp35_;
848 			ValaLocalVariable* _tmp36_;
849 			const gchar* _tmp37_;
850 			const gchar* _tmp38_;
851 			_tmp33_ = vala_symbol_get_scope ((ValaSymbol*) m);
852 			_tmp34_ = _tmp33_;
853 			_tmp35_ = vala_subroutine_get_result_var ((ValaSubroutine*) m);
854 			_tmp36_ = _tmp35_;
855 			_tmp37_ = vala_symbol_get_name ((ValaSymbol*) _tmp36_);
856 			_tmp38_ = _tmp37_;
857 			vala_scope_remove (_tmp34_, _tmp38_);
858 		}
859 		_tmp39_ = vala_callable_get_return_type ((ValaCallable*) m);
860 		_tmp40_ = _tmp39_;
861 		_tmp41_ = vala_data_type_copy (_tmp40_);
862 		_tmp42_ = _tmp41_;
863 		_tmp43_ = vala_code_node_get_source_reference ((ValaCodeNode*) m);
864 		_tmp44_ = _tmp43_;
865 		_tmp45_ = vala_local_variable_new (_tmp42_, "result", NULL, _tmp44_);
866 		_tmp46_ = _tmp45_;
867 		vala_subroutine_set_result_var ((ValaSubroutine*) m, _tmp46_);
868 		_vala_code_node_unref0 (_tmp46_);
869 		_vala_code_node_unref0 (_tmp42_);
870 		_tmp47_ = vala_subroutine_get_result_var ((ValaSubroutine*) m);
871 		_tmp48_ = _tmp47_;
872 		vala_local_variable_set_is_result (_tmp48_, TRUE);
873 	}
874 	if (VALA_IS_CREATION_METHOD (m)) {
875 		const gchar* _tmp49_;
876 		const gchar* _tmp50_;
877 		ValaCreationMethod* cm = NULL;
878 		gboolean _tmp51_ = FALSE;
879 		ValaCreationMethod* _tmp52_;
880 		const gchar* _tmp53_;
881 		const gchar* _tmp54_;
882 		gboolean _tmp69_ = FALSE;
883 		gboolean _tmp70_;
884 		_tmp49_ = vala_symbol_get_name ((ValaSymbol*) m);
885 		_tmp50_ = _tmp49_;
886 		if (_tmp50_ == NULL) {
887 			vala_class_set_default_construction_method (self, G_TYPE_CHECK_INSTANCE_CAST (m, VALA_TYPE_CREATION_METHOD, ValaCreationMethod));
888 			vala_symbol_set_name ((ValaSymbol*) m, ".new");
889 		}
890 		cm = G_TYPE_CHECK_INSTANCE_CAST (m, VALA_TYPE_CREATION_METHOD, ValaCreationMethod);
891 		_tmp52_ = cm;
892 		_tmp53_ = vala_creation_method_get_class_name (_tmp52_);
893 		_tmp54_ = _tmp53_;
894 		if (_tmp54_ != NULL) {
895 			ValaCreationMethod* _tmp55_;
896 			const gchar* _tmp56_;
897 			const gchar* _tmp57_;
898 			const gchar* _tmp58_;
899 			const gchar* _tmp59_;
900 			_tmp55_ = cm;
901 			_tmp56_ = vala_creation_method_get_class_name (_tmp55_);
902 			_tmp57_ = _tmp56_;
903 			_tmp58_ = vala_symbol_get_name ((ValaSymbol*) self);
904 			_tmp59_ = _tmp58_;
905 			_tmp51_ = g_strcmp0 (_tmp57_, _tmp59_) != 0;
906 		} else {
907 			_tmp51_ = FALSE;
908 		}
909 		if (_tmp51_) {
910 			ValaSourceReference* _tmp60_;
911 			ValaSourceReference* _tmp61_;
912 			gchar* _tmp62_;
913 			gchar* _tmp63_;
914 			ValaCreationMethod* _tmp64_;
915 			const gchar* _tmp65_;
916 			const gchar* _tmp66_;
917 			gchar* _tmp67_;
918 			gchar* _tmp68_;
919 			_tmp60_ = vala_code_node_get_source_reference ((ValaCodeNode*) m);
920 			_tmp61_ = _tmp60_;
921 			_tmp62_ = vala_symbol_get_full_name ((ValaSymbol*) self);
922 			_tmp63_ = _tmp62_;
923 			_tmp64_ = cm;
924 			_tmp65_ = vala_creation_method_get_class_name (_tmp64_);
925 			_tmp66_ = _tmp65_;
926 			_tmp67_ = g_strdup_printf ("missing return type in method `%s.%s´", _tmp63_, _tmp66_);
927 			_tmp68_ = _tmp67_;
928 			vala_report_error (_tmp61_, _tmp68_);
929 			_g_free0 (_tmp68_);
930 			_g_free0 (_tmp63_);
931 			vala_code_node_set_error ((ValaCodeNode*) m, TRUE);
932 			return;
933 		}
934 		_tmp70_ = self->priv->_is_abstract;
935 		if (_tmp70_) {
936 			ValaCreationMethod* _tmp71_;
937 			ValaSymbolAccessibility _tmp72_;
938 			ValaSymbolAccessibility _tmp73_;
939 			_tmp71_ = cm;
940 			_tmp72_ = vala_symbol_get_access ((ValaSymbol*) _tmp71_);
941 			_tmp73_ = _tmp72_;
942 			_tmp69_ = _tmp73_ == VALA_SYMBOL_ACCESSIBILITY_PUBLIC;
943 		} else {
944 			_tmp69_ = FALSE;
945 		}
946 		if (_tmp69_) {
947 			gboolean _tmp74_;
948 			gboolean _tmp75_;
949 			_tmp74_ = vala_symbol_get_external_package ((ValaSymbol*) self);
950 			_tmp75_ = _tmp74_;
951 			if (_tmp75_) {
952 				ValaSourceReference* _tmp76_;
953 				ValaSourceReference* _tmp77_;
954 				_tmp76_ = vala_code_node_get_source_reference ((ValaCodeNode*) m);
955 				_tmp77_ = _tmp76_;
956 				vala_report_warning (_tmp77_, "Creation method of abstract class cannot be public.");
957 			} else {
958 				ValaSourceReference* _tmp78_;
959 				ValaSourceReference* _tmp79_;
960 				_tmp78_ = vala_code_node_get_source_reference ((ValaCodeNode*) m);
961 				_tmp79_ = _tmp78_;
962 				vala_report_error (_tmp79_, "Creation method of abstract class cannot be public.");
963 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
964 				return;
965 			}
966 		}
967 	}
968 	VALA_SYMBOL_CLASS (vala_class_parent_class)->add_method ((ValaSymbol*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol), m);
969 }
970 
971 static gpointer
_vala_map_ref0(gpointer self)972 _vala_map_ref0 (gpointer self)
973 {
974 	return self ? vala_map_ref (self) : NULL;
975 }
976 
977 ValaHashMap*
vala_class_get_implicit_implementations(ValaClass * self)978 vala_class_get_implicit_implementations (ValaClass* self)
979 {
980 	ValaHashMap* _tmp0_;
981 	ValaHashMap* _tmp1_;
982 	ValaHashMap* result = NULL;
983 	g_return_val_if_fail (self != NULL, NULL);
984 	_tmp0_ = self->priv->implicit_implementations;
985 	_tmp1_ = _vala_map_ref0 (_tmp0_);
986 	result = _tmp1_;
987 	return result;
988 }
989 
990 /**
991  * Adds the specified property as a member to this class.
992  *
993  * @param prop a property
994  */
995 static void
vala_class_real_add_property(ValaSymbol * base,ValaProperty * prop)996 vala_class_real_add_property (ValaSymbol* base,
997                               ValaProperty* prop)
998 {
999 	ValaClass * self;
1000 	ValaMemberBinding _tmp0_;
1001 	ValaMemberBinding _tmp1_;
1002 	ValaField* _tmp16_;
1003 	ValaField* _tmp17_;
1004 	self = (ValaClass*) base;
1005 	g_return_if_fail (prop != NULL);
1006 	VALA_SYMBOL_CLASS (vala_class_parent_class)->add_property ((ValaSymbol*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol), prop);
1007 	_tmp0_ = vala_property_get_binding (prop);
1008 	_tmp1_ = _tmp0_;
1009 	if (_tmp1_ != VALA_MEMBER_BINDING_STATIC) {
1010 		ValaDataType* _tmp2_;
1011 		ValaDataType* _tmp3_;
1012 		ValaSourceReference* _tmp4_;
1013 		ValaSourceReference* _tmp5_;
1014 		ValaParameter* _tmp6_;
1015 		ValaParameter* _tmp7_;
1016 		ValaScope* _tmp8_;
1017 		ValaScope* _tmp9_;
1018 		ValaParameter* _tmp10_;
1019 		ValaParameter* _tmp11_;
1020 		const gchar* _tmp12_;
1021 		const gchar* _tmp13_;
1022 		ValaParameter* _tmp14_;
1023 		ValaParameter* _tmp15_;
1024 		_tmp2_ = vala_semantic_analyzer_get_this_type ((ValaSymbol*) prop, (ValaTypeSymbol*) self);
1025 		_tmp3_ = _tmp2_;
1026 		_tmp4_ = vala_code_node_get_source_reference ((ValaCodeNode*) prop);
1027 		_tmp5_ = _tmp4_;
1028 		_tmp6_ = vala_parameter_new ("this", _tmp3_, _tmp5_);
1029 		_tmp7_ = _tmp6_;
1030 		vala_property_set_this_parameter (prop, _tmp7_);
1031 		_vala_code_node_unref0 (_tmp7_);
1032 		_vala_code_node_unref0 (_tmp3_);
1033 		_tmp8_ = vala_symbol_get_scope ((ValaSymbol*) prop);
1034 		_tmp9_ = _tmp8_;
1035 		_tmp10_ = vala_property_get_this_parameter (prop);
1036 		_tmp11_ = _tmp10_;
1037 		_tmp12_ = vala_symbol_get_name ((ValaSymbol*) _tmp11_);
1038 		_tmp13_ = _tmp12_;
1039 		_tmp14_ = vala_property_get_this_parameter (prop);
1040 		_tmp15_ = _tmp14_;
1041 		vala_scope_add (_tmp9_, _tmp13_, (ValaSymbol*) _tmp15_);
1042 	}
1043 	_tmp16_ = vala_property_get_field (prop);
1044 	_tmp17_ = _tmp16_;
1045 	if (_tmp17_ != NULL) {
1046 		ValaField* _tmp18_;
1047 		ValaField* _tmp19_;
1048 		_tmp18_ = vala_property_get_field (prop);
1049 		_tmp19_ = _tmp18_;
1050 		vala_symbol_add_field ((ValaSymbol*) self, _tmp19_);
1051 	}
1052 }
1053 
1054 static void
vala_class_real_add_constructor(ValaSymbol * base,ValaConstructor * c)1055 vala_class_real_add_constructor (ValaSymbol* base,
1056                                  ValaConstructor* c)
1057 {
1058 	ValaClass * self;
1059 	ValaMemberBinding _tmp0_;
1060 	ValaMemberBinding _tmp1_;
1061 	ValaMemberBinding _tmp14_;
1062 	ValaMemberBinding _tmp15_;
1063 	self = (ValaClass*) base;
1064 	g_return_if_fail (c != NULL);
1065 	_tmp0_ = vala_constructor_get_binding (c);
1066 	_tmp1_ = _tmp0_;
1067 	switch (_tmp1_) {
1068 		case VALA_MEMBER_BINDING_INSTANCE:
1069 		{
1070 			ValaConstructor* _tmp2_;
1071 			ValaConstructor* _tmp3_;
1072 			_tmp2_ = vala_class_get_constructor (self);
1073 			_tmp3_ = _tmp2_;
1074 			if (_tmp3_ != NULL) {
1075 				ValaSourceReference* _tmp4_;
1076 				ValaSourceReference* _tmp5_;
1077 				_tmp4_ = vala_code_node_get_source_reference ((ValaCodeNode*) c);
1078 				_tmp5_ = _tmp4_;
1079 				vala_report_error (_tmp5_, "class already contains a constructor");
1080 			}
1081 			vala_class_set_constructor (self, c);
1082 			break;
1083 		}
1084 		case VALA_MEMBER_BINDING_CLASS:
1085 		{
1086 			ValaConstructor* _tmp6_;
1087 			ValaConstructor* _tmp7_;
1088 			_tmp6_ = vala_class_get_class_constructor (self);
1089 			_tmp7_ = _tmp6_;
1090 			if (_tmp7_ != NULL) {
1091 				ValaSourceReference* _tmp8_;
1092 				ValaSourceReference* _tmp9_;
1093 				_tmp8_ = vala_code_node_get_source_reference ((ValaCodeNode*) c);
1094 				_tmp9_ = _tmp8_;
1095 				vala_report_error (_tmp9_, "class already contains a class constructor");
1096 			}
1097 			vala_class_set_class_constructor (self, c);
1098 			break;
1099 		}
1100 		case VALA_MEMBER_BINDING_STATIC:
1101 		{
1102 			ValaConstructor* _tmp10_;
1103 			ValaConstructor* _tmp11_;
1104 			_tmp10_ = vala_class_get_static_constructor (self);
1105 			_tmp11_ = _tmp10_;
1106 			if (_tmp11_ != NULL) {
1107 				ValaSourceReference* _tmp12_;
1108 				ValaSourceReference* _tmp13_;
1109 				_tmp12_ = vala_code_node_get_source_reference ((ValaCodeNode*) c);
1110 				_tmp13_ = _tmp12_;
1111 				vala_report_error (_tmp13_, "class already contains a static constructor");
1112 			}
1113 			vala_class_set_static_constructor (self, c);
1114 			break;
1115 		}
1116 		default:
1117 		{
1118 			g_assert_not_reached ();
1119 		}
1120 	}
1121 	_tmp14_ = vala_constructor_get_binding (c);
1122 	_tmp15_ = _tmp14_;
1123 	if (_tmp15_ != VALA_MEMBER_BINDING_STATIC) {
1124 		ValaParameter* _tmp16_;
1125 		ValaParameter* _tmp17_;
1126 		ValaDataType* _tmp24_;
1127 		ValaDataType* _tmp25_;
1128 		ValaSourceReference* _tmp26_;
1129 		ValaSourceReference* _tmp27_;
1130 		ValaParameter* _tmp28_;
1131 		ValaParameter* _tmp29_;
1132 		ValaScope* _tmp30_;
1133 		ValaScope* _tmp31_;
1134 		ValaParameter* _tmp32_;
1135 		ValaParameter* _tmp33_;
1136 		const gchar* _tmp34_;
1137 		const gchar* _tmp35_;
1138 		ValaParameter* _tmp36_;
1139 		ValaParameter* _tmp37_;
1140 		_tmp16_ = vala_constructor_get_this_parameter (c);
1141 		_tmp17_ = _tmp16_;
1142 		if (_tmp17_ != NULL) {
1143 			ValaScope* _tmp18_;
1144 			ValaScope* _tmp19_;
1145 			ValaParameter* _tmp20_;
1146 			ValaParameter* _tmp21_;
1147 			const gchar* _tmp22_;
1148 			const gchar* _tmp23_;
1149 			_tmp18_ = vala_symbol_get_scope ((ValaSymbol*) c);
1150 			_tmp19_ = _tmp18_;
1151 			_tmp20_ = vala_constructor_get_this_parameter (c);
1152 			_tmp21_ = _tmp20_;
1153 			_tmp22_ = vala_symbol_get_name ((ValaSymbol*) _tmp21_);
1154 			_tmp23_ = _tmp22_;
1155 			vala_scope_remove (_tmp19_, _tmp23_);
1156 		}
1157 		_tmp24_ = vala_semantic_analyzer_get_this_type ((ValaSymbol*) c, (ValaTypeSymbol*) self);
1158 		_tmp25_ = _tmp24_;
1159 		_tmp26_ = vala_code_node_get_source_reference ((ValaCodeNode*) c);
1160 		_tmp27_ = _tmp26_;
1161 		_tmp28_ = vala_parameter_new ("this", _tmp25_, _tmp27_);
1162 		_tmp29_ = _tmp28_;
1163 		vala_constructor_set_this_parameter (c, _tmp29_);
1164 		_vala_code_node_unref0 (_tmp29_);
1165 		_vala_code_node_unref0 (_tmp25_);
1166 		_tmp30_ = vala_symbol_get_scope ((ValaSymbol*) c);
1167 		_tmp31_ = _tmp30_;
1168 		_tmp32_ = vala_constructor_get_this_parameter (c);
1169 		_tmp33_ = _tmp32_;
1170 		_tmp34_ = vala_symbol_get_name ((ValaSymbol*) _tmp33_);
1171 		_tmp35_ = _tmp34_;
1172 		_tmp36_ = vala_constructor_get_this_parameter (c);
1173 		_tmp37_ = _tmp36_;
1174 		vala_scope_add (_tmp31_, _tmp35_, (ValaSymbol*) _tmp37_);
1175 	}
1176 }
1177 
1178 static void
vala_class_real_add_destructor(ValaSymbol * base,ValaDestructor * d)1179 vala_class_real_add_destructor (ValaSymbol* base,
1180                                 ValaDestructor* d)
1181 {
1182 	ValaClass * self;
1183 	ValaMemberBinding _tmp0_;
1184 	ValaMemberBinding _tmp1_;
1185 	ValaMemberBinding _tmp14_;
1186 	ValaMemberBinding _tmp15_;
1187 	self = (ValaClass*) base;
1188 	g_return_if_fail (d != NULL);
1189 	_tmp0_ = vala_destructor_get_binding (d);
1190 	_tmp1_ = _tmp0_;
1191 	switch (_tmp1_) {
1192 		case VALA_MEMBER_BINDING_INSTANCE:
1193 		{
1194 			ValaDestructor* _tmp2_;
1195 			ValaDestructor* _tmp3_;
1196 			_tmp2_ = vala_class_get_destructor (self);
1197 			_tmp3_ = _tmp2_;
1198 			if (_tmp3_ != NULL) {
1199 				ValaSourceReference* _tmp4_;
1200 				ValaSourceReference* _tmp5_;
1201 				_tmp4_ = vala_code_node_get_source_reference ((ValaCodeNode*) d);
1202 				_tmp5_ = _tmp4_;
1203 				vala_report_error (_tmp5_, "class already contains a destructor");
1204 			}
1205 			vala_class_set_destructor (self, d);
1206 			break;
1207 		}
1208 		case VALA_MEMBER_BINDING_CLASS:
1209 		{
1210 			ValaDestructor* _tmp6_;
1211 			ValaDestructor* _tmp7_;
1212 			_tmp6_ = vala_class_get_class_destructor (self);
1213 			_tmp7_ = _tmp6_;
1214 			if (_tmp7_ != NULL) {
1215 				ValaSourceReference* _tmp8_;
1216 				ValaSourceReference* _tmp9_;
1217 				_tmp8_ = vala_code_node_get_source_reference ((ValaCodeNode*) d);
1218 				_tmp9_ = _tmp8_;
1219 				vala_report_error (_tmp9_, "class already contains a class destructor");
1220 			}
1221 			vala_class_set_class_destructor (self, d);
1222 			break;
1223 		}
1224 		case VALA_MEMBER_BINDING_STATIC:
1225 		{
1226 			ValaDestructor* _tmp10_;
1227 			ValaDestructor* _tmp11_;
1228 			_tmp10_ = vala_class_get_static_destructor (self);
1229 			_tmp11_ = _tmp10_;
1230 			if (_tmp11_ != NULL) {
1231 				ValaSourceReference* _tmp12_;
1232 				ValaSourceReference* _tmp13_;
1233 				_tmp12_ = vala_code_node_get_source_reference ((ValaCodeNode*) d);
1234 				_tmp13_ = _tmp12_;
1235 				vala_report_error (_tmp13_, "class already contains a static destructor");
1236 			}
1237 			vala_class_set_static_destructor (self, d);
1238 			break;
1239 		}
1240 		default:
1241 		{
1242 			g_assert_not_reached ();
1243 		}
1244 	}
1245 	_tmp14_ = vala_destructor_get_binding (d);
1246 	_tmp15_ = _tmp14_;
1247 	if (_tmp15_ != VALA_MEMBER_BINDING_STATIC) {
1248 		ValaParameter* _tmp16_;
1249 		ValaParameter* _tmp17_;
1250 		ValaDataType* _tmp24_;
1251 		ValaDataType* _tmp25_;
1252 		ValaSourceReference* _tmp26_;
1253 		ValaSourceReference* _tmp27_;
1254 		ValaParameter* _tmp28_;
1255 		ValaParameter* _tmp29_;
1256 		ValaScope* _tmp30_;
1257 		ValaScope* _tmp31_;
1258 		ValaParameter* _tmp32_;
1259 		ValaParameter* _tmp33_;
1260 		const gchar* _tmp34_;
1261 		const gchar* _tmp35_;
1262 		ValaParameter* _tmp36_;
1263 		ValaParameter* _tmp37_;
1264 		_tmp16_ = vala_destructor_get_this_parameter (d);
1265 		_tmp17_ = _tmp16_;
1266 		if (_tmp17_ != NULL) {
1267 			ValaScope* _tmp18_;
1268 			ValaScope* _tmp19_;
1269 			ValaParameter* _tmp20_;
1270 			ValaParameter* _tmp21_;
1271 			const gchar* _tmp22_;
1272 			const gchar* _tmp23_;
1273 			_tmp18_ = vala_symbol_get_scope ((ValaSymbol*) d);
1274 			_tmp19_ = _tmp18_;
1275 			_tmp20_ = vala_destructor_get_this_parameter (d);
1276 			_tmp21_ = _tmp20_;
1277 			_tmp22_ = vala_symbol_get_name ((ValaSymbol*) _tmp21_);
1278 			_tmp23_ = _tmp22_;
1279 			vala_scope_remove (_tmp19_, _tmp23_);
1280 		}
1281 		_tmp24_ = vala_semantic_analyzer_get_this_type ((ValaSymbol*) d, (ValaTypeSymbol*) self);
1282 		_tmp25_ = _tmp24_;
1283 		_tmp26_ = vala_code_node_get_source_reference ((ValaCodeNode*) d);
1284 		_tmp27_ = _tmp26_;
1285 		_tmp28_ = vala_parameter_new ("this", _tmp25_, _tmp27_);
1286 		_tmp29_ = _tmp28_;
1287 		vala_destructor_set_this_parameter (d, _tmp29_);
1288 		_vala_code_node_unref0 (_tmp29_);
1289 		_vala_code_node_unref0 (_tmp25_);
1290 		_tmp30_ = vala_symbol_get_scope ((ValaSymbol*) d);
1291 		_tmp31_ = _tmp30_;
1292 		_tmp32_ = vala_destructor_get_this_parameter (d);
1293 		_tmp33_ = _tmp32_;
1294 		_tmp34_ = vala_symbol_get_name ((ValaSymbol*) _tmp33_);
1295 		_tmp35_ = _tmp34_;
1296 		_tmp36_ = vala_destructor_get_this_parameter (d);
1297 		_tmp37_ = _tmp36_;
1298 		vala_scope_add (_tmp31_, _tmp35_, (ValaSymbol*) _tmp37_);
1299 	}
1300 }
1301 
1302 static void
vala_class_real_accept(ValaCodeNode * base,ValaCodeVisitor * visitor)1303 vala_class_real_accept (ValaCodeNode* base,
1304                         ValaCodeVisitor* visitor)
1305 {
1306 	ValaClass * self;
1307 	self = (ValaClass*) base;
1308 	g_return_if_fail (visitor != NULL);
1309 	vala_code_visitor_visit_class (visitor, self);
1310 }
1311 
1312 static gpointer
_vala_iterable_ref0(gpointer self)1313 _vala_iterable_ref0 (gpointer self)
1314 {
1315 	return self ? vala_iterable_ref (self) : NULL;
1316 }
1317 
1318 static void
vala_class_real_accept_children(ValaCodeNode * base,ValaCodeVisitor * visitor)1319 vala_class_real_accept_children (ValaCodeNode* base,
1320                                  ValaCodeVisitor* visitor)
1321 {
1322 	ValaClass * self;
1323 	ValaConstructor* _tmp10_;
1324 	ValaConstructor* _tmp11_;
1325 	ValaConstructor* _tmp14_;
1326 	ValaConstructor* _tmp15_;
1327 	ValaConstructor* _tmp18_;
1328 	ValaConstructor* _tmp19_;
1329 	ValaDestructor* _tmp22_;
1330 	ValaDestructor* _tmp23_;
1331 	ValaDestructor* _tmp26_;
1332 	ValaDestructor* _tmp27_;
1333 	ValaDestructor* _tmp30_;
1334 	ValaDestructor* _tmp31_;
1335 	self = (ValaClass*) base;
1336 	g_return_if_fail (visitor != NULL);
1337 	{
1338 		ValaList* _type_list = NULL;
1339 		ValaList* _tmp0_;
1340 		ValaList* _tmp1_;
1341 		gint _type_size = 0;
1342 		ValaList* _tmp2_;
1343 		gint _tmp3_;
1344 		gint _tmp4_;
1345 		gint _type_index = 0;
1346 		_tmp0_ = self->priv->base_types;
1347 		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
1348 		_type_list = _tmp1_;
1349 		_tmp2_ = _type_list;
1350 		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
1351 		_tmp4_ = _tmp3_;
1352 		_type_size = _tmp4_;
1353 		_type_index = -1;
1354 		while (TRUE) {
1355 			gint _tmp5_;
1356 			gint _tmp6_;
1357 			ValaDataType* type = NULL;
1358 			ValaList* _tmp7_;
1359 			gpointer _tmp8_;
1360 			ValaDataType* _tmp9_;
1361 			_type_index = _type_index + 1;
1362 			_tmp5_ = _type_index;
1363 			_tmp6_ = _type_size;
1364 			if (!(_tmp5_ < _tmp6_)) {
1365 				break;
1366 			}
1367 			_tmp7_ = _type_list;
1368 			_tmp8_ = vala_list_get (_tmp7_, _type_index);
1369 			type = (ValaDataType*) _tmp8_;
1370 			_tmp9_ = type;
1371 			vala_code_node_accept ((ValaCodeNode*) _tmp9_, visitor);
1372 			_vala_code_node_unref0 (type);
1373 		}
1374 		_vala_iterable_unref0 (_type_list);
1375 	}
1376 	VALA_CODE_NODE_CLASS (vala_class_parent_class)->accept_children ((ValaCodeNode*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol), visitor);
1377 	_tmp10_ = vala_class_get_constructor (self);
1378 	_tmp11_ = _tmp10_;
1379 	if (_tmp11_ != NULL) {
1380 		ValaConstructor* _tmp12_;
1381 		ValaConstructor* _tmp13_;
1382 		_tmp12_ = vala_class_get_constructor (self);
1383 		_tmp13_ = _tmp12_;
1384 		vala_code_node_accept ((ValaCodeNode*) _tmp13_, visitor);
1385 	}
1386 	_tmp14_ = vala_class_get_class_constructor (self);
1387 	_tmp15_ = _tmp14_;
1388 	if (_tmp15_ != NULL) {
1389 		ValaConstructor* _tmp16_;
1390 		ValaConstructor* _tmp17_;
1391 		_tmp16_ = vala_class_get_class_constructor (self);
1392 		_tmp17_ = _tmp16_;
1393 		vala_code_node_accept ((ValaCodeNode*) _tmp17_, visitor);
1394 	}
1395 	_tmp18_ = vala_class_get_static_constructor (self);
1396 	_tmp19_ = _tmp18_;
1397 	if (_tmp19_ != NULL) {
1398 		ValaConstructor* _tmp20_;
1399 		ValaConstructor* _tmp21_;
1400 		_tmp20_ = vala_class_get_static_constructor (self);
1401 		_tmp21_ = _tmp20_;
1402 		vala_code_node_accept ((ValaCodeNode*) _tmp21_, visitor);
1403 	}
1404 	_tmp22_ = vala_class_get_destructor (self);
1405 	_tmp23_ = _tmp22_;
1406 	if (_tmp23_ != NULL) {
1407 		ValaDestructor* _tmp24_;
1408 		ValaDestructor* _tmp25_;
1409 		_tmp24_ = vala_class_get_destructor (self);
1410 		_tmp25_ = _tmp24_;
1411 		vala_code_node_accept ((ValaCodeNode*) _tmp25_, visitor);
1412 	}
1413 	_tmp26_ = vala_class_get_static_destructor (self);
1414 	_tmp27_ = _tmp26_;
1415 	if (_tmp27_ != NULL) {
1416 		ValaDestructor* _tmp28_;
1417 		ValaDestructor* _tmp29_;
1418 		_tmp28_ = vala_class_get_static_destructor (self);
1419 		_tmp29_ = _tmp28_;
1420 		vala_code_node_accept ((ValaCodeNode*) _tmp29_, visitor);
1421 	}
1422 	_tmp30_ = vala_class_get_class_destructor (self);
1423 	_tmp31_ = _tmp30_;
1424 	if (_tmp31_ != NULL) {
1425 		ValaDestructor* _tmp32_;
1426 		ValaDestructor* _tmp33_;
1427 		_tmp32_ = vala_class_get_class_destructor (self);
1428 		_tmp33_ = _tmp32_;
1429 		vala_code_node_accept ((ValaCodeNode*) _tmp33_, visitor);
1430 	}
1431 }
1432 
1433 static gboolean
vala_class_real_is_reference_type(ValaTypeSymbol * base)1434 vala_class_real_is_reference_type (ValaTypeSymbol* base)
1435 {
1436 	ValaClass * self;
1437 	gboolean result = FALSE;
1438 	self = (ValaClass*) base;
1439 	result = TRUE;
1440 	return result;
1441 }
1442 
1443 gboolean
vala_class_is_fundamental(ValaClass * self)1444 vala_class_is_fundamental (ValaClass* self)
1445 {
1446 	gboolean _tmp0_ = FALSE;
1447 	gboolean _tmp1_;
1448 	gboolean _tmp2_;
1449 	gboolean result = FALSE;
1450 	g_return_val_if_fail (self != NULL, FALSE);
1451 	_tmp1_ = vala_class_get_is_compact (self);
1452 	_tmp2_ = _tmp1_;
1453 	if (!_tmp2_) {
1454 		ValaClass* _tmp3_;
1455 		_tmp3_ = self->priv->_base_class;
1456 		_tmp0_ = _tmp3_ == NULL;
1457 	} else {
1458 		_tmp0_ = FALSE;
1459 	}
1460 	if (_tmp0_) {
1461 		result = TRUE;
1462 		return result;
1463 	}
1464 	result = FALSE;
1465 	return result;
1466 }
1467 
1468 static gboolean
vala_class_real_is_subtype_of(ValaTypeSymbol * base,ValaTypeSymbol * t)1469 vala_class_real_is_subtype_of (ValaTypeSymbol* base,
1470                                ValaTypeSymbol* t)
1471 {
1472 	ValaClass * self;
1473 	gboolean result = FALSE;
1474 	self = (ValaClass*) base;
1475 	g_return_val_if_fail (t != NULL, FALSE);
1476 	if (G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol) == t) {
1477 		result = TRUE;
1478 		return result;
1479 	}
1480 	{
1481 		ValaList* _base_type_list = NULL;
1482 		ValaList* _tmp0_;
1483 		ValaList* _tmp1_;
1484 		gint _base_type_size = 0;
1485 		ValaList* _tmp2_;
1486 		gint _tmp3_;
1487 		gint _tmp4_;
1488 		gint _base_type_index = 0;
1489 		_tmp0_ = self->priv->base_types;
1490 		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
1491 		_base_type_list = _tmp1_;
1492 		_tmp2_ = _base_type_list;
1493 		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
1494 		_tmp4_ = _tmp3_;
1495 		_base_type_size = _tmp4_;
1496 		_base_type_index = -1;
1497 		while (TRUE) {
1498 			gint _tmp5_;
1499 			gint _tmp6_;
1500 			ValaDataType* base_type = NULL;
1501 			ValaList* _tmp7_;
1502 			gpointer _tmp8_;
1503 			gboolean _tmp9_ = FALSE;
1504 			gboolean _tmp10_ = FALSE;
1505 			ValaDataType* _tmp11_;
1506 			ValaTypeSymbol* _tmp12_;
1507 			ValaTypeSymbol* _tmp13_;
1508 			_base_type_index = _base_type_index + 1;
1509 			_tmp5_ = _base_type_index;
1510 			_tmp6_ = _base_type_size;
1511 			if (!(_tmp5_ < _tmp6_)) {
1512 				break;
1513 			}
1514 			_tmp7_ = _base_type_list;
1515 			_tmp8_ = vala_list_get (_tmp7_, _base_type_index);
1516 			base_type = (ValaDataType*) _tmp8_;
1517 			_tmp11_ = base_type;
1518 			_tmp12_ = vala_data_type_get_type_symbol (_tmp11_);
1519 			_tmp13_ = _tmp12_;
1520 			if (_tmp13_ != NULL) {
1521 				ValaDataType* _tmp14_;
1522 				ValaTypeSymbol* _tmp15_;
1523 				ValaTypeSymbol* _tmp16_;
1524 				_tmp14_ = base_type;
1525 				_tmp15_ = vala_data_type_get_type_symbol (_tmp14_);
1526 				_tmp16_ = _tmp15_;
1527 				_tmp10_ = _tmp16_ != G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol);
1528 			} else {
1529 				_tmp10_ = FALSE;
1530 			}
1531 			if (_tmp10_) {
1532 				ValaDataType* _tmp17_;
1533 				ValaTypeSymbol* _tmp18_;
1534 				ValaTypeSymbol* _tmp19_;
1535 				_tmp17_ = base_type;
1536 				_tmp18_ = vala_data_type_get_type_symbol (_tmp17_);
1537 				_tmp19_ = _tmp18_;
1538 				_tmp9_ = vala_typesymbol_is_subtype_of (_tmp19_, t);
1539 			} else {
1540 				_tmp9_ = FALSE;
1541 			}
1542 			if (_tmp9_) {
1543 				result = TRUE;
1544 				_vala_code_node_unref0 (base_type);
1545 				_vala_iterable_unref0 (_base_type_list);
1546 				return result;
1547 			}
1548 			_vala_code_node_unref0 (base_type);
1549 		}
1550 		_vala_iterable_unref0 (_base_type_list);
1551 	}
1552 	result = FALSE;
1553 	return result;
1554 }
1555 
1556 static void
vala_class_real_replace_type(ValaCodeNode * base,ValaDataType * old_type,ValaDataType * new_type)1557 vala_class_real_replace_type (ValaCodeNode* base,
1558                               ValaDataType* old_type,
1559                               ValaDataType* new_type)
1560 {
1561 	ValaClass * self;
1562 	self = (ValaClass*) base;
1563 	g_return_if_fail (old_type != NULL);
1564 	g_return_if_fail (new_type != NULL);
1565 	{
1566 		gint i = 0;
1567 		i = 0;
1568 		{
1569 			gboolean _tmp0_ = FALSE;
1570 			_tmp0_ = TRUE;
1571 			while (TRUE) {
1572 				ValaList* _tmp2_;
1573 				gint _tmp3_;
1574 				gint _tmp4_;
1575 				ValaList* _tmp5_;
1576 				gpointer _tmp6_;
1577 				ValaDataType* _tmp7_;
1578 				gboolean _tmp8_;
1579 				if (!_tmp0_) {
1580 					gint _tmp1_;
1581 					_tmp1_ = i;
1582 					i = _tmp1_ + 1;
1583 				}
1584 				_tmp0_ = FALSE;
1585 				_tmp2_ = self->priv->base_types;
1586 				_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
1587 				_tmp4_ = _tmp3_;
1588 				if (!(i < _tmp4_)) {
1589 					break;
1590 				}
1591 				_tmp5_ = self->priv->base_types;
1592 				_tmp6_ = vala_list_get (_tmp5_, i);
1593 				_tmp7_ = (ValaDataType*) _tmp6_;
1594 				_tmp8_ = _tmp7_ == old_type;
1595 				_vala_code_node_unref0 (_tmp7_);
1596 				if (_tmp8_) {
1597 					ValaList* _tmp9_;
1598 					_tmp9_ = self->priv->base_types;
1599 					vala_list_set (_tmp9_, i, new_type);
1600 					vala_code_node_set_parent_node ((ValaCodeNode*) new_type, (ValaCodeNode*) self);
1601 					return;
1602 				}
1603 			}
1604 		}
1605 	}
1606 }
1607 
1608 static void
vala_class_get_all_prerequisites(ValaClass * self,ValaInterface * iface,ValaList * list)1609 vala_class_get_all_prerequisites (ValaClass* self,
1610                                   ValaInterface* iface,
1611                                   ValaList* list)
1612 {
1613 	g_return_if_fail (self != NULL);
1614 	g_return_if_fail (iface != NULL);
1615 	g_return_if_fail (list != NULL);
1616 	{
1617 		ValaList* _prereq_list = NULL;
1618 		ValaList* _tmp0_;
1619 		ValaList* _tmp1_;
1620 		gint _prereq_size = 0;
1621 		ValaList* _tmp2_;
1622 		gint _tmp3_;
1623 		gint _tmp4_;
1624 		gint _prereq_index = 0;
1625 		_tmp0_ = vala_interface_get_prerequisites (iface);
1626 		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
1627 		_prereq_list = _tmp1_;
1628 		_tmp2_ = _prereq_list;
1629 		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
1630 		_tmp4_ = _tmp3_;
1631 		_prereq_size = _tmp4_;
1632 		_prereq_index = -1;
1633 		while (TRUE) {
1634 			gint _tmp5_;
1635 			gint _tmp6_;
1636 			ValaDataType* prereq = NULL;
1637 			ValaList* _tmp7_;
1638 			gpointer _tmp8_;
1639 			ValaTypeSymbol* type = NULL;
1640 			ValaDataType* _tmp9_;
1641 			ValaTypeSymbol* _tmp10_;
1642 			ValaTypeSymbol* _tmp11_;
1643 			ValaTypeSymbol* _tmp12_;
1644 			ValaTypeSymbol* _tmp13_;
1645 			ValaTypeSymbol* _tmp14_;
1646 			ValaTypeSymbol* _tmp15_;
1647 			_prereq_index = _prereq_index + 1;
1648 			_tmp5_ = _prereq_index;
1649 			_tmp6_ = _prereq_size;
1650 			if (!(_tmp5_ < _tmp6_)) {
1651 				break;
1652 			}
1653 			_tmp7_ = _prereq_list;
1654 			_tmp8_ = vala_list_get (_tmp7_, _prereq_index);
1655 			prereq = (ValaDataType*) _tmp8_;
1656 			_tmp9_ = prereq;
1657 			_tmp10_ = vala_data_type_get_type_symbol (_tmp9_);
1658 			_tmp11_ = _tmp10_;
1659 			_tmp12_ = _vala_code_node_ref0 (_tmp11_);
1660 			type = _tmp12_;
1661 			_tmp13_ = type;
1662 			if (_tmp13_ == NULL) {
1663 				_vala_code_node_unref0 (type);
1664 				_vala_code_node_unref0 (prereq);
1665 				continue;
1666 			}
1667 			_tmp14_ = type;
1668 			vala_collection_add ((ValaCollection*) list, _tmp14_);
1669 			_tmp15_ = type;
1670 			if (VALA_IS_INTERFACE (_tmp15_)) {
1671 				ValaTypeSymbol* _tmp16_;
1672 				_tmp16_ = type;
1673 				vala_class_get_all_prerequisites (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, VALA_TYPE_INTERFACE, ValaInterface), list);
1674 			}
1675 			_vala_code_node_unref0 (type);
1676 			_vala_code_node_unref0 (prereq);
1677 		}
1678 		_vala_iterable_unref0 (_prereq_list);
1679 	}
1680 }
1681 
1682 gboolean
vala_class_is_a(ValaClass * self,ValaObjectTypeSymbol * t)1683 vala_class_is_a (ValaClass* self,
1684                  ValaObjectTypeSymbol* t)
1685 {
1686 	gboolean result = FALSE;
1687 	g_return_val_if_fail (self != NULL, FALSE);
1688 	g_return_val_if_fail (t != NULL, FALSE);
1689 	if (G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol) == t) {
1690 		result = TRUE;
1691 		return result;
1692 	}
1693 	{
1694 		ValaList* _base_type_list = NULL;
1695 		ValaList* _tmp0_;
1696 		ValaList* _tmp1_;
1697 		gint _base_type_size = 0;
1698 		ValaList* _tmp2_;
1699 		gint _tmp3_;
1700 		gint _tmp4_;
1701 		gint _base_type_index = 0;
1702 		_tmp0_ = vala_class_get_base_types (self);
1703 		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
1704 		_base_type_list = _tmp1_;
1705 		_tmp2_ = _base_type_list;
1706 		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
1707 		_tmp4_ = _tmp3_;
1708 		_base_type_size = _tmp4_;
1709 		_base_type_index = -1;
1710 		while (TRUE) {
1711 			gint _tmp5_;
1712 			gint _tmp6_;
1713 			ValaDataType* base_type = NULL;
1714 			ValaList* _tmp7_;
1715 			gpointer _tmp8_;
1716 			ValaDataType* _tmp9_;
1717 			ValaTypeSymbol* _tmp10_;
1718 			ValaTypeSymbol* _tmp11_;
1719 			_base_type_index = _base_type_index + 1;
1720 			_tmp5_ = _base_type_index;
1721 			_tmp6_ = _base_type_size;
1722 			if (!(_tmp5_ < _tmp6_)) {
1723 				break;
1724 			}
1725 			_tmp7_ = _base_type_list;
1726 			_tmp8_ = vala_list_get (_tmp7_, _base_type_index);
1727 			base_type = (ValaDataType*) _tmp8_;
1728 			_tmp9_ = base_type;
1729 			_tmp10_ = vala_data_type_get_type_symbol (_tmp9_);
1730 			_tmp11_ = _tmp10_;
1731 			if (VALA_IS_CLASS (_tmp11_)) {
1732 				ValaDataType* _tmp12_;
1733 				ValaTypeSymbol* _tmp13_;
1734 				ValaTypeSymbol* _tmp14_;
1735 				_tmp12_ = base_type;
1736 				_tmp13_ = vala_data_type_get_type_symbol (_tmp12_);
1737 				_tmp14_ = _tmp13_;
1738 				if (vala_class_is_a (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, VALA_TYPE_CLASS, ValaClass), t)) {
1739 					result = TRUE;
1740 					_vala_code_node_unref0 (base_type);
1741 					_vala_iterable_unref0 (_base_type_list);
1742 					return result;
1743 				}
1744 			} else {
1745 				ValaDataType* _tmp15_;
1746 				ValaTypeSymbol* _tmp16_;
1747 				ValaTypeSymbol* _tmp17_;
1748 				_tmp15_ = base_type;
1749 				_tmp16_ = vala_data_type_get_type_symbol (_tmp15_);
1750 				_tmp17_ = _tmp16_;
1751 				if (_tmp17_ == G_TYPE_CHECK_INSTANCE_CAST (t, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol)) {
1752 					result = TRUE;
1753 					_vala_code_node_unref0 (base_type);
1754 					_vala_iterable_unref0 (_base_type_list);
1755 					return result;
1756 				}
1757 			}
1758 			_vala_code_node_unref0 (base_type);
1759 		}
1760 		_vala_iterable_unref0 (_base_type_list);
1761 	}
1762 	result = FALSE;
1763 	return result;
1764 }
1765 
1766 gboolean
vala_class_implements(ValaClass * self,ValaInterface * i)1767 vala_class_implements (ValaClass* self,
1768                        ValaInterface* i)
1769 {
1770 	gboolean result = FALSE;
1771 	g_return_val_if_fail (self != NULL, FALSE);
1772 	g_return_val_if_fail (i != NULL, FALSE);
1773 	{
1774 		ValaList* _base_type_list = NULL;
1775 		ValaList* _tmp0_;
1776 		ValaList* _tmp1_;
1777 		gint _base_type_size = 0;
1778 		ValaList* _tmp2_;
1779 		gint _tmp3_;
1780 		gint _tmp4_;
1781 		gint _base_type_index = 0;
1782 		_tmp0_ = vala_class_get_base_types (self);
1783 		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
1784 		_base_type_list = _tmp1_;
1785 		_tmp2_ = _base_type_list;
1786 		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
1787 		_tmp4_ = _tmp3_;
1788 		_base_type_size = _tmp4_;
1789 		_base_type_index = -1;
1790 		while (TRUE) {
1791 			gint _tmp5_;
1792 			gint _tmp6_;
1793 			ValaDataType* base_type = NULL;
1794 			ValaList* _tmp7_;
1795 			gpointer _tmp8_;
1796 			ValaDataType* _tmp9_;
1797 			ValaTypeSymbol* _tmp10_;
1798 			ValaTypeSymbol* _tmp11_;
1799 			_base_type_index = _base_type_index + 1;
1800 			_tmp5_ = _base_type_index;
1801 			_tmp6_ = _base_type_size;
1802 			if (!(_tmp5_ < _tmp6_)) {
1803 				break;
1804 			}
1805 			_tmp7_ = _base_type_list;
1806 			_tmp8_ = vala_list_get (_tmp7_, _base_type_index);
1807 			base_type = (ValaDataType*) _tmp8_;
1808 			_tmp9_ = base_type;
1809 			_tmp10_ = vala_data_type_get_type_symbol (_tmp9_);
1810 			_tmp11_ = _tmp10_;
1811 			if (_tmp11_ == G_TYPE_CHECK_INSTANCE_CAST (i, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol)) {
1812 				result = TRUE;
1813 				_vala_code_node_unref0 (base_type);
1814 				_vala_iterable_unref0 (_base_type_list);
1815 				return result;
1816 			}
1817 			_vala_code_node_unref0 (base_type);
1818 		}
1819 		_vala_iterable_unref0 (_base_type_list);
1820 	}
1821 	result = FALSE;
1822 	return result;
1823 }
1824 
1825 static gpointer
_vala_source_file_ref0(gpointer self)1826 _vala_source_file_ref0 (gpointer self)
1827 {
1828 	return self ? vala_source_file_ref (self) : NULL;
1829 }
1830 
1831 static gboolean
vala_class_real_check(ValaCodeNode * base,ValaCodeContext * context)1832 vala_class_real_check (ValaCodeNode* base,
1833                        ValaCodeContext* context)
1834 {
1835 	ValaClass * self;
1836 	gboolean _tmp0_;
1837 	gboolean _tmp1_;
1838 	ValaSourceFile* old_source_file = NULL;
1839 	ValaSemanticAnalyzer* _tmp4_;
1840 	ValaSemanticAnalyzer* _tmp5_;
1841 	ValaSourceFile* _tmp6_;
1842 	ValaSourceFile* _tmp7_;
1843 	ValaSourceFile* _tmp8_;
1844 	ValaSymbol* old_symbol = NULL;
1845 	ValaSemanticAnalyzer* _tmp9_;
1846 	ValaSemanticAnalyzer* _tmp10_;
1847 	ValaSymbol* _tmp11_;
1848 	ValaSymbol* _tmp12_;
1849 	ValaSymbol* _tmp13_;
1850 	ValaSourceReference* _tmp14_;
1851 	ValaSourceReference* _tmp15_;
1852 	ValaSemanticAnalyzer* _tmp22_;
1853 	ValaSemanticAnalyzer* _tmp23_;
1854 	gboolean _tmp80_ = FALSE;
1855 	ValaClass* _tmp81_;
1856 	gboolean _tmp94_ = FALSE;
1857 	gboolean _tmp95_;
1858 	gboolean _tmp96_;
1859 	gboolean _tmp106_ = FALSE;
1860 	gboolean _tmp107_;
1861 	gboolean _tmp108_;
1862 	gboolean _tmp120_ = FALSE;
1863 	ValaClass* _tmp121_;
1864 	gboolean _tmp133_;
1865 	ValaConstructor* _tmp242_;
1866 	ValaConstructor* _tmp243_;
1867 	ValaConstructor* _tmp246_;
1868 	ValaConstructor* _tmp247_;
1869 	ValaConstructor* _tmp250_;
1870 	ValaConstructor* _tmp251_;
1871 	ValaDestructor* _tmp254_;
1872 	ValaDestructor* _tmp255_;
1873 	ValaDestructor* _tmp258_;
1874 	ValaDestructor* _tmp259_;
1875 	ValaDestructor* _tmp262_;
1876 	ValaDestructor* _tmp263_;
1877 	gboolean _tmp306_;
1878 	gboolean _tmp307_;
1879 	ValaList* prerequisites = NULL;
1880 	GEqualFunc _tmp352_;
1881 	ValaArrayList* _tmp353_;
1882 	ValaList* missing_prereqs = NULL;
1883 	GEqualFunc _tmp370_;
1884 	ValaArrayList* _tmp371_;
1885 	ValaList* _tmp386_;
1886 	gint _tmp387_;
1887 	gint _tmp388_;
1888 	ValaSourceFileType _tmp413_;
1889 	ValaSourceFileType _tmp414_;
1890 	ValaSemanticAnalyzer* _tmp647_;
1891 	ValaSemanticAnalyzer* _tmp648_;
1892 	ValaSourceFile* _tmp649_;
1893 	ValaSemanticAnalyzer* _tmp650_;
1894 	ValaSemanticAnalyzer* _tmp651_;
1895 	ValaSymbol* _tmp652_;
1896 	gboolean _tmp653_;
1897 	gboolean _tmp654_;
1898 	gboolean result = FALSE;
1899 	self = (ValaClass*) base;
1900 	g_return_val_if_fail (context != NULL, FALSE);
1901 	_tmp0_ = vala_code_node_get_checked ((ValaCodeNode*) self);
1902 	_tmp1_ = _tmp0_;
1903 	if (_tmp1_) {
1904 		gboolean _tmp2_;
1905 		gboolean _tmp3_;
1906 		_tmp2_ = vala_code_node_get_error ((ValaCodeNode*) self);
1907 		_tmp3_ = _tmp2_;
1908 		result = !_tmp3_;
1909 		return result;
1910 	}
1911 	if (!VALA_CODE_NODE_CLASS (vala_class_parent_class)->check ((ValaCodeNode*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol), context)) {
1912 		result = FALSE;
1913 		return result;
1914 	}
1915 	vala_code_node_set_checked ((ValaCodeNode*) self, TRUE);
1916 	_tmp4_ = vala_code_context_get_analyzer (context);
1917 	_tmp5_ = _tmp4_;
1918 	_tmp6_ = vala_semantic_analyzer_get_current_source_file (_tmp5_);
1919 	_tmp7_ = _tmp6_;
1920 	_tmp8_ = _vala_source_file_ref0 (_tmp7_);
1921 	old_source_file = _tmp8_;
1922 	_tmp9_ = vala_code_context_get_analyzer (context);
1923 	_tmp10_ = _tmp9_;
1924 	_tmp11_ = vala_semantic_analyzer_get_current_symbol (_tmp10_);
1925 	_tmp12_ = _tmp11_;
1926 	_tmp13_ = _vala_code_node_ref0 (_tmp12_);
1927 	old_symbol = _tmp13_;
1928 	_tmp14_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1929 	_tmp15_ = _tmp14_;
1930 	if (_tmp15_ != NULL) {
1931 		ValaSemanticAnalyzer* _tmp16_;
1932 		ValaSemanticAnalyzer* _tmp17_;
1933 		ValaSourceReference* _tmp18_;
1934 		ValaSourceReference* _tmp19_;
1935 		ValaSourceFile* _tmp20_;
1936 		ValaSourceFile* _tmp21_;
1937 		_tmp16_ = vala_code_context_get_analyzer (context);
1938 		_tmp17_ = _tmp16_;
1939 		_tmp18_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1940 		_tmp19_ = _tmp18_;
1941 		_tmp20_ = vala_source_reference_get_file (_tmp19_);
1942 		_tmp21_ = _tmp20_;
1943 		vala_semantic_analyzer_set_current_source_file (_tmp17_, _tmp21_);
1944 	}
1945 	_tmp22_ = vala_code_context_get_analyzer (context);
1946 	_tmp23_ = _tmp22_;
1947 	vala_semantic_analyzer_set_current_symbol (_tmp23_, (ValaSymbol*) self);
1948 	{
1949 		ValaList* _base_type_reference_list = NULL;
1950 		ValaList* _tmp24_;
1951 		ValaList* _tmp25_;
1952 		gint _base_type_reference_size = 0;
1953 		ValaList* _tmp26_;
1954 		gint _tmp27_;
1955 		gint _tmp28_;
1956 		gint _base_type_reference_index = 0;
1957 		_tmp24_ = vala_class_get_base_types (self);
1958 		_tmp25_ = _vala_iterable_ref0 (_tmp24_);
1959 		_base_type_reference_list = _tmp25_;
1960 		_tmp26_ = _base_type_reference_list;
1961 		_tmp27_ = vala_collection_get_size ((ValaCollection*) _tmp26_);
1962 		_tmp28_ = _tmp27_;
1963 		_base_type_reference_size = _tmp28_;
1964 		_base_type_reference_index = -1;
1965 		while (TRUE) {
1966 			gint _tmp29_;
1967 			gint _tmp30_;
1968 			ValaDataType* base_type_reference = NULL;
1969 			ValaList* _tmp31_;
1970 			gpointer _tmp32_;
1971 			ValaDataType* _tmp33_;
1972 			ValaDataType* _tmp34_;
1973 			ValaSemanticAnalyzer* _tmp44_;
1974 			ValaSemanticAnalyzer* _tmp45_;
1975 			ValaDataType* _tmp46_;
1976 			ValaDataType* _tmp56_;
1977 			_base_type_reference_index = _base_type_reference_index + 1;
1978 			_tmp29_ = _base_type_reference_index;
1979 			_tmp30_ = _base_type_reference_size;
1980 			if (!(_tmp29_ < _tmp30_)) {
1981 				break;
1982 			}
1983 			_tmp31_ = _base_type_reference_list;
1984 			_tmp32_ = vala_list_get (_tmp31_, _base_type_reference_index);
1985 			base_type_reference = (ValaDataType*) _tmp32_;
1986 			_tmp33_ = base_type_reference;
1987 			if (!vala_code_node_check ((ValaCodeNode*) _tmp33_, context)) {
1988 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1989 				result = FALSE;
1990 				_vala_code_node_unref0 (base_type_reference);
1991 				_vala_iterable_unref0 (_base_type_reference_list);
1992 				_vala_code_node_unref0 (old_symbol);
1993 				_vala_source_file_unref0 (old_source_file);
1994 				return result;
1995 			}
1996 			_tmp34_ = base_type_reference;
1997 			if (!VALA_IS_OBJECT_TYPE (_tmp34_)) {
1998 				ValaSourceReference* _tmp35_;
1999 				ValaSourceReference* _tmp36_;
2000 				ValaDataType* _tmp37_;
2001 				gchar* _tmp38_;
2002 				gchar* _tmp39_;
2003 				gchar* _tmp40_;
2004 				gchar* _tmp41_;
2005 				gchar* _tmp42_;
2006 				gchar* _tmp43_;
2007 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2008 				_tmp35_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2009 				_tmp36_ = _tmp35_;
2010 				_tmp37_ = base_type_reference;
2011 				_tmp38_ = vala_code_node_to_string ((ValaCodeNode*) _tmp37_);
2012 				_tmp39_ = _tmp38_;
2013 				_tmp40_ = vala_symbol_get_full_name ((ValaSymbol*) self);
2014 				_tmp41_ = _tmp40_;
2015 				_tmp42_ = g_strdup_printf ("base type `%s' of class `%s' is not an object type", _tmp39_, _tmp41_);
2016 				_tmp43_ = _tmp42_;
2017 				vala_report_error (_tmp36_, _tmp43_);
2018 				_g_free0 (_tmp43_);
2019 				_g_free0 (_tmp41_);
2020 				_g_free0 (_tmp39_);
2021 				result = FALSE;
2022 				_vala_code_node_unref0 (base_type_reference);
2023 				_vala_iterable_unref0 (_base_type_reference_list);
2024 				_vala_code_node_unref0 (old_symbol);
2025 				_vala_source_file_unref0 (old_source_file);
2026 				return result;
2027 			}
2028 			_tmp44_ = vala_code_context_get_analyzer (context);
2029 			_tmp45_ = _tmp44_;
2030 			_tmp46_ = base_type_reference;
2031 			if (!vala_semantic_analyzer_is_type_accessible (_tmp45_, (ValaSymbol*) self, _tmp46_)) {
2032 				ValaSourceReference* _tmp47_;
2033 				ValaSourceReference* _tmp48_;
2034 				ValaDataType* _tmp49_;
2035 				gchar* _tmp50_;
2036 				gchar* _tmp51_;
2037 				gchar* _tmp52_;
2038 				gchar* _tmp53_;
2039 				gchar* _tmp54_;
2040 				gchar* _tmp55_;
2041 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2042 				_tmp47_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2043 				_tmp48_ = _tmp47_;
2044 				_tmp49_ = base_type_reference;
2045 				_tmp50_ = vala_code_node_to_string ((ValaCodeNode*) _tmp49_);
2046 				_tmp51_ = _tmp50_;
2047 				_tmp52_ = vala_symbol_get_full_name ((ValaSymbol*) self);
2048 				_tmp53_ = _tmp52_;
2049 				_tmp54_ = g_strdup_printf ("base type `%s' is less accessible than class `%s'", _tmp51_, _tmp53_);
2050 				_tmp55_ = _tmp54_;
2051 				vala_report_error (_tmp48_, _tmp55_);
2052 				_g_free0 (_tmp55_);
2053 				_g_free0 (_tmp53_);
2054 				_g_free0 (_tmp51_);
2055 				result = FALSE;
2056 				_vala_code_node_unref0 (base_type_reference);
2057 				_vala_iterable_unref0 (_base_type_reference_list);
2058 				_vala_code_node_unref0 (old_symbol);
2059 				_vala_source_file_unref0 (old_source_file);
2060 				return result;
2061 			}
2062 			_tmp56_ = base_type_reference;
2063 			if (!vala_data_type_check_type_arguments (_tmp56_, context, FALSE)) {
2064 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2065 				result = FALSE;
2066 				_vala_code_node_unref0 (base_type_reference);
2067 				_vala_iterable_unref0 (_base_type_reference_list);
2068 				_vala_code_node_unref0 (old_symbol);
2069 				_vala_source_file_unref0 (old_source_file);
2070 				return result;
2071 			}
2072 			_vala_code_node_unref0 (base_type_reference);
2073 		}
2074 		_vala_iterable_unref0 (_base_type_reference_list);
2075 	}
2076 	{
2077 		ValaList* _type_list = NULL;
2078 		ValaList* _tmp57_;
2079 		ValaList* _tmp58_;
2080 		gint _type_size = 0;
2081 		ValaList* _tmp59_;
2082 		gint _tmp60_;
2083 		gint _tmp61_;
2084 		gint _type_index = 0;
2085 		_tmp57_ = self->priv->base_types;
2086 		_tmp58_ = _vala_iterable_ref0 (_tmp57_);
2087 		_type_list = _tmp58_;
2088 		_tmp59_ = _type_list;
2089 		_tmp60_ = vala_collection_get_size ((ValaCollection*) _tmp59_);
2090 		_tmp61_ = _tmp60_;
2091 		_type_size = _tmp61_;
2092 		_type_index = -1;
2093 		while (TRUE) {
2094 			gint _tmp62_;
2095 			gint _tmp63_;
2096 			ValaDataType* type = NULL;
2097 			ValaList* _tmp64_;
2098 			gpointer _tmp65_;
2099 			ValaDataType* _tmp66_;
2100 			ValaSemanticAnalyzer* _tmp67_;
2101 			ValaSemanticAnalyzer* _tmp68_;
2102 			ValaDataType* _tmp69_;
2103 			_type_index = _type_index + 1;
2104 			_tmp62_ = _type_index;
2105 			_tmp63_ = _type_size;
2106 			if (!(_tmp62_ < _tmp63_)) {
2107 				break;
2108 			}
2109 			_tmp64_ = _type_list;
2110 			_tmp65_ = vala_list_get (_tmp64_, _type_index);
2111 			type = (ValaDataType*) _tmp65_;
2112 			_tmp66_ = type;
2113 			vala_code_node_check ((ValaCodeNode*) _tmp66_, context);
2114 			_tmp67_ = vala_code_context_get_analyzer (context);
2115 			_tmp68_ = _tmp67_;
2116 			_tmp69_ = type;
2117 			vala_semantic_analyzer_check_type (_tmp68_, _tmp69_);
2118 			_vala_code_node_unref0 (type);
2119 		}
2120 		_vala_iterable_unref0 (_type_list);
2121 	}
2122 	{
2123 		ValaList* _p_list = NULL;
2124 		ValaList* _tmp70_;
2125 		ValaList* _tmp71_;
2126 		gint _p_size = 0;
2127 		ValaList* _tmp72_;
2128 		gint _tmp73_;
2129 		gint _tmp74_;
2130 		gint _p_index = 0;
2131 		_tmp70_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) self);
2132 		_tmp71_ = _vala_iterable_ref0 (_tmp70_);
2133 		_p_list = _tmp71_;
2134 		_tmp72_ = _p_list;
2135 		_tmp73_ = vala_collection_get_size ((ValaCollection*) _tmp72_);
2136 		_tmp74_ = _tmp73_;
2137 		_p_size = _tmp74_;
2138 		_p_index = -1;
2139 		while (TRUE) {
2140 			gint _tmp75_;
2141 			gint _tmp76_;
2142 			ValaTypeParameter* p = NULL;
2143 			ValaList* _tmp77_;
2144 			gpointer _tmp78_;
2145 			ValaTypeParameter* _tmp79_;
2146 			_p_index = _p_index + 1;
2147 			_tmp75_ = _p_index;
2148 			_tmp76_ = _p_size;
2149 			if (!(_tmp75_ < _tmp76_)) {
2150 				break;
2151 			}
2152 			_tmp77_ = _p_list;
2153 			_tmp78_ = vala_list_get (_tmp77_, _p_index);
2154 			p = (ValaTypeParameter*) _tmp78_;
2155 			_tmp79_ = p;
2156 			vala_code_node_check ((ValaCodeNode*) _tmp79_, context);
2157 			_vala_code_node_unref0 (p);
2158 		}
2159 		_vala_iterable_unref0 (_p_list);
2160 	}
2161 	_tmp81_ = self->priv->_base_class;
2162 	if (_tmp81_ != NULL) {
2163 		ValaClass* _tmp82_;
2164 		gboolean _tmp83_;
2165 		gboolean _tmp84_;
2166 		_tmp82_ = self->priv->_base_class;
2167 		_tmp83_ = vala_class_get_is_singleton (_tmp82_);
2168 		_tmp84_ = _tmp83_;
2169 		_tmp80_ = _tmp84_;
2170 	} else {
2171 		_tmp80_ = FALSE;
2172 	}
2173 	if (_tmp80_) {
2174 		ValaSourceReference* _tmp85_;
2175 		ValaSourceReference* _tmp86_;
2176 		gchar* _tmp87_;
2177 		gchar* _tmp88_;
2178 		ValaClass* _tmp89_;
2179 		gchar* _tmp90_;
2180 		gchar* _tmp91_;
2181 		gchar* _tmp92_;
2182 		gchar* _tmp93_;
2183 		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2184 		_tmp85_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2185 		_tmp86_ = _tmp85_;
2186 		_tmp87_ = vala_symbol_get_full_name ((ValaSymbol*) self);
2187 		_tmp88_ = _tmp87_;
2188 		_tmp89_ = self->priv->_base_class;
2189 		_tmp90_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp89_);
2190 		_tmp91_ = _tmp90_;
2191 		_tmp92_ = g_strdup_printf ("`%s' cannot inherit from SingleInstance class `%s'", _tmp88_, _tmp91_);
2192 		_tmp93_ = _tmp92_;
2193 		vala_report_error (_tmp86_, _tmp93_);
2194 		_g_free0 (_tmp93_);
2195 		_g_free0 (_tmp91_);
2196 		_g_free0 (_tmp88_);
2197 	}
2198 	_tmp95_ = vala_class_get_is_singleton (self);
2199 	_tmp96_ = _tmp95_;
2200 	if (_tmp96_) {
2201 		ValaSemanticAnalyzer* _tmp97_;
2202 		ValaSemanticAnalyzer* _tmp98_;
2203 		ValaClass* _tmp99_;
2204 		_tmp97_ = vala_code_context_get_analyzer (context);
2205 		_tmp98_ = _tmp97_;
2206 		_tmp99_ = _tmp98_->object_type;
2207 		_tmp94_ = !vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) self, (ValaTypeSymbol*) _tmp99_);
2208 	} else {
2209 		_tmp94_ = FALSE;
2210 	}
2211 	if (_tmp94_) {
2212 		ValaSourceReference* _tmp100_;
2213 		ValaSourceReference* _tmp101_;
2214 		gchar* _tmp102_;
2215 		gchar* _tmp103_;
2216 		gchar* _tmp104_;
2217 		gchar* _tmp105_;
2218 		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2219 		_tmp100_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2220 		_tmp101_ = _tmp100_;
2221 		_tmp102_ = vala_symbol_get_full_name ((ValaSymbol*) self);
2222 		_tmp103_ = _tmp102_;
2223 		_tmp104_ = g_strdup_printf ("SingleInstance class `%s' requires inheritance from `GLib.Object'", _tmp103_);
2224 		_tmp105_ = _tmp104_;
2225 		vala_report_error (_tmp101_, _tmp105_);
2226 		_g_free0 (_tmp105_);
2227 		_g_free0 (_tmp103_);
2228 	}
2229 	_tmp107_ = vala_class_get_is_singleton (self);
2230 	_tmp108_ = _tmp107_;
2231 	if (_tmp108_) {
2232 		ValaConstructor* _tmp109_;
2233 		ValaConstructor* _tmp110_;
2234 		_tmp109_ = vala_class_get_constructor (self);
2235 		_tmp110_ = _tmp109_;
2236 		_tmp106_ = _tmp110_ == NULL;
2237 	} else {
2238 		_tmp106_ = FALSE;
2239 	}
2240 	if (_tmp106_) {
2241 		ValaConstructor* c = NULL;
2242 		ValaSourceReference* _tmp111_;
2243 		ValaSourceReference* _tmp112_;
2244 		ValaConstructor* _tmp113_;
2245 		ValaConstructor* _tmp114_;
2246 		ValaSourceReference* _tmp115_;
2247 		ValaSourceReference* _tmp116_;
2248 		ValaBlock* _tmp117_;
2249 		ValaBlock* _tmp118_;
2250 		ValaConstructor* _tmp119_;
2251 		_tmp111_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2252 		_tmp112_ = _tmp111_;
2253 		_tmp113_ = vala_constructor_new (_tmp112_);
2254 		c = _tmp113_;
2255 		_tmp114_ = c;
2256 		_tmp115_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2257 		_tmp116_ = _tmp115_;
2258 		_tmp117_ = vala_block_new (_tmp116_);
2259 		_tmp118_ = _tmp117_;
2260 		vala_subroutine_set_body ((ValaSubroutine*) _tmp114_, _tmp118_);
2261 		_vala_code_node_unref0 (_tmp118_);
2262 		_tmp119_ = c;
2263 		vala_symbol_add_constructor ((ValaSymbol*) self, _tmp119_);
2264 		_vala_code_node_unref0 (c);
2265 	}
2266 	_tmp121_ = self->priv->_base_class;
2267 	if (_tmp121_ != NULL) {
2268 		ValaClass* _tmp122_;
2269 		gboolean _tmp123_;
2270 		_tmp122_ = self->priv->_base_class;
2271 		_tmp123_ = _tmp122_->priv->_is_sealed;
2272 		_tmp120_ = _tmp123_;
2273 	} else {
2274 		_tmp120_ = FALSE;
2275 	}
2276 	if (_tmp120_) {
2277 		ValaSourceReference* _tmp124_;
2278 		ValaSourceReference* _tmp125_;
2279 		gchar* _tmp126_;
2280 		gchar* _tmp127_;
2281 		ValaClass* _tmp128_;
2282 		gchar* _tmp129_;
2283 		gchar* _tmp130_;
2284 		gchar* _tmp131_;
2285 		gchar* _tmp132_;
2286 		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2287 		_tmp124_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2288 		_tmp125_ = _tmp124_;
2289 		_tmp126_ = vala_symbol_get_full_name ((ValaSymbol*) self);
2290 		_tmp127_ = _tmp126_;
2291 		_tmp128_ = self->priv->_base_class;
2292 		_tmp129_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp128_);
2293 		_tmp130_ = _tmp129_;
2294 		_tmp131_ = g_strdup_printf ("`%s' cannot inherit from sealed class `%s'", _tmp127_, _tmp130_);
2295 		_tmp132_ = _tmp131_;
2296 		vala_report_error (_tmp125_, _tmp132_);
2297 		_g_free0 (_tmp132_);
2298 		_g_free0 (_tmp130_);
2299 		_g_free0 (_tmp127_);
2300 	}
2301 	_tmp133_ = self->priv->_is_sealed;
2302 	if (_tmp133_) {
2303 		gboolean _tmp134_;
2304 		gboolean _tmp135_;
2305 		gboolean _tmp142_;
2306 		gboolean _tmp149_;
2307 		gboolean _tmp150_;
2308 		_tmp134_ = vala_class_get_is_compact (self);
2309 		_tmp135_ = _tmp134_;
2310 		if (_tmp135_) {
2311 			ValaSourceReference* _tmp136_;
2312 			ValaSourceReference* _tmp137_;
2313 			gchar* _tmp138_;
2314 			gchar* _tmp139_;
2315 			gchar* _tmp140_;
2316 			gchar* _tmp141_;
2317 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2318 			_tmp136_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2319 			_tmp137_ = _tmp136_;
2320 			_tmp138_ = vala_symbol_get_full_name ((ValaSymbol*) self);
2321 			_tmp139_ = _tmp138_;
2322 			_tmp140_ = g_strdup_printf ("Sealed class `%s' cannot be compact", _tmp139_);
2323 			_tmp141_ = _tmp140_;
2324 			vala_report_error (_tmp137_, _tmp141_);
2325 			_g_free0 (_tmp141_);
2326 			_g_free0 (_tmp139_);
2327 			result = FALSE;
2328 			_vala_code_node_unref0 (old_symbol);
2329 			_vala_source_file_unref0 (old_source_file);
2330 			return result;
2331 		}
2332 		_tmp142_ = self->priv->_is_abstract;
2333 		if (_tmp142_) {
2334 			ValaSourceReference* _tmp143_;
2335 			ValaSourceReference* _tmp144_;
2336 			gchar* _tmp145_;
2337 			gchar* _tmp146_;
2338 			gchar* _tmp147_;
2339 			gchar* _tmp148_;
2340 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2341 			_tmp143_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2342 			_tmp144_ = _tmp143_;
2343 			_tmp145_ = vala_symbol_get_full_name ((ValaSymbol*) self);
2344 			_tmp146_ = _tmp145_;
2345 			_tmp147_ = g_strdup_printf ("Sealed class `%s' cannot be abstract", _tmp146_);
2346 			_tmp148_ = _tmp147_;
2347 			vala_report_error (_tmp144_, _tmp148_);
2348 			_g_free0 (_tmp148_);
2349 			_g_free0 (_tmp146_);
2350 			result = FALSE;
2351 			_vala_code_node_unref0 (old_symbol);
2352 			_vala_source_file_unref0 (old_source_file);
2353 			return result;
2354 		}
2355 		_tmp149_ = vala_symbol_get_external_package ((ValaSymbol*) self);
2356 		_tmp150_ = _tmp149_;
2357 		if (!_tmp150_) {
2358 			ValaSourceReference* _tmp151_;
2359 			ValaSourceReference* _tmp152_;
2360 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2361 			_tmp151_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2362 			_tmp152_ = _tmp151_;
2363 			vala_report_error (_tmp152_, "Sealed classes are not fully supported yet");
2364 			result = FALSE;
2365 			_vala_code_node_unref0 (old_symbol);
2366 			_vala_source_file_unref0 (old_source_file);
2367 			return result;
2368 		}
2369 	}
2370 	{
2371 		ValaList* _en_list = NULL;
2372 		ValaList* _tmp153_;
2373 		ValaList* _tmp154_;
2374 		gint _en_size = 0;
2375 		ValaList* _tmp155_;
2376 		gint _tmp156_;
2377 		gint _tmp157_;
2378 		gint _en_index = 0;
2379 		_tmp153_ = vala_object_type_symbol_get_enums ((ValaObjectTypeSymbol*) self);
2380 		_tmp154_ = _vala_iterable_ref0 (_tmp153_);
2381 		_en_list = _tmp154_;
2382 		_tmp155_ = _en_list;
2383 		_tmp156_ = vala_collection_get_size ((ValaCollection*) _tmp155_);
2384 		_tmp157_ = _tmp156_;
2385 		_en_size = _tmp157_;
2386 		_en_index = -1;
2387 		while (TRUE) {
2388 			gint _tmp158_;
2389 			gint _tmp159_;
2390 			ValaEnum* en = NULL;
2391 			ValaList* _tmp160_;
2392 			gpointer _tmp161_;
2393 			ValaEnum* _tmp162_;
2394 			_en_index = _en_index + 1;
2395 			_tmp158_ = _en_index;
2396 			_tmp159_ = _en_size;
2397 			if (!(_tmp158_ < _tmp159_)) {
2398 				break;
2399 			}
2400 			_tmp160_ = _en_list;
2401 			_tmp161_ = vala_list_get (_tmp160_, _en_index);
2402 			en = (ValaEnum*) _tmp161_;
2403 			_tmp162_ = en;
2404 			vala_code_node_check ((ValaCodeNode*) _tmp162_, context);
2405 			_vala_code_node_unref0 (en);
2406 		}
2407 		_vala_iterable_unref0 (_en_list);
2408 	}
2409 	{
2410 		ValaList* _f_list = NULL;
2411 		ValaList* _tmp163_;
2412 		ValaList* _tmp164_;
2413 		gint _f_size = 0;
2414 		ValaList* _tmp165_;
2415 		gint _tmp166_;
2416 		gint _tmp167_;
2417 		gint _f_index = 0;
2418 		_tmp163_ = vala_object_type_symbol_get_fields ((ValaObjectTypeSymbol*) self);
2419 		_tmp164_ = _vala_iterable_ref0 (_tmp163_);
2420 		_f_list = _tmp164_;
2421 		_tmp165_ = _f_list;
2422 		_tmp166_ = vala_collection_get_size ((ValaCollection*) _tmp165_);
2423 		_tmp167_ = _tmp166_;
2424 		_f_size = _tmp167_;
2425 		_f_index = -1;
2426 		while (TRUE) {
2427 			gint _tmp168_;
2428 			gint _tmp169_;
2429 			ValaField* f = NULL;
2430 			ValaList* _tmp170_;
2431 			gpointer _tmp171_;
2432 			gboolean _tmp172_ = FALSE;
2433 			gboolean _tmp173_;
2434 			gboolean _tmp174_;
2435 			ValaField* _tmp192_;
2436 			_f_index = _f_index + 1;
2437 			_tmp168_ = _f_index;
2438 			_tmp169_ = _f_size;
2439 			if (!(_tmp168_ < _tmp169_)) {
2440 				break;
2441 			}
2442 			_tmp170_ = _f_list;
2443 			_tmp171_ = vala_list_get (_tmp170_, _f_index);
2444 			f = (ValaField*) _tmp171_;
2445 			_tmp173_ = vala_class_get_is_compact (self);
2446 			_tmp174_ = _tmp173_;
2447 			if (_tmp174_) {
2448 				ValaField* _tmp175_;
2449 				ValaMemberBinding _tmp176_;
2450 				ValaMemberBinding _tmp177_;
2451 				_tmp175_ = f;
2452 				_tmp176_ = vala_field_get_binding (_tmp175_);
2453 				_tmp177_ = _tmp176_;
2454 				_tmp172_ = _tmp177_ != VALA_MEMBER_BINDING_STATIC;
2455 			} else {
2456 				_tmp172_ = FALSE;
2457 			}
2458 			if (_tmp172_) {
2459 				gboolean _tmp178_ = FALSE;
2460 				gboolean _tmp179_;
2461 				gboolean _tmp180_;
2462 				ValaField* _tmp186_;
2463 				ValaMemberBinding _tmp187_;
2464 				ValaMemberBinding _tmp188_;
2465 				_tmp179_ = vala_symbol_get_external_package ((ValaSymbol*) self);
2466 				_tmp180_ = _tmp179_;
2467 				if (!_tmp180_) {
2468 					ValaField* _tmp181_;
2469 					ValaSymbolAccessibility _tmp182_;
2470 					ValaSymbolAccessibility _tmp183_;
2471 					_tmp181_ = f;
2472 					_tmp182_ = vala_symbol_get_access ((ValaSymbol*) _tmp181_);
2473 					_tmp183_ = _tmp182_;
2474 					_tmp178_ = _tmp183_ == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
2475 				} else {
2476 					_tmp178_ = FALSE;
2477 				}
2478 				if (_tmp178_) {
2479 					ValaSourceReference* _tmp184_;
2480 					ValaSourceReference* _tmp185_;
2481 					_tmp184_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2482 					_tmp185_ = _tmp184_;
2483 					vala_report_error (_tmp185_, "private fields are not supported in compact classes");
2484 					vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2485 				}
2486 				_tmp186_ = f;
2487 				_tmp187_ = vala_field_get_binding (_tmp186_);
2488 				_tmp188_ = _tmp187_;
2489 				if (_tmp188_ == VALA_MEMBER_BINDING_CLASS) {
2490 					ValaField* _tmp189_;
2491 					ValaSourceReference* _tmp190_;
2492 					ValaSourceReference* _tmp191_;
2493 					_tmp189_ = f;
2494 					_tmp190_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp189_);
2495 					_tmp191_ = _tmp190_;
2496 					vala_report_error (_tmp191_, "class fields are not supported in compact classes");
2497 					vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2498 				}
2499 			}
2500 			_tmp192_ = f;
2501 			vala_code_node_check ((ValaCodeNode*) _tmp192_, context);
2502 			_vala_code_node_unref0 (f);
2503 		}
2504 		_vala_iterable_unref0 (_f_list);
2505 	}
2506 	{
2507 		ValaList* _c_list = NULL;
2508 		ValaList* _tmp193_;
2509 		ValaList* _tmp194_;
2510 		gint _c_size = 0;
2511 		ValaList* _tmp195_;
2512 		gint _tmp196_;
2513 		gint _tmp197_;
2514 		gint _c_index = 0;
2515 		_tmp193_ = vala_object_type_symbol_get_constants ((ValaObjectTypeSymbol*) self);
2516 		_tmp194_ = _vala_iterable_ref0 (_tmp193_);
2517 		_c_list = _tmp194_;
2518 		_tmp195_ = _c_list;
2519 		_tmp196_ = vala_collection_get_size ((ValaCollection*) _tmp195_);
2520 		_tmp197_ = _tmp196_;
2521 		_c_size = _tmp197_;
2522 		_c_index = -1;
2523 		while (TRUE) {
2524 			gint _tmp198_;
2525 			gint _tmp199_;
2526 			ValaConstant* c = NULL;
2527 			ValaList* _tmp200_;
2528 			gpointer _tmp201_;
2529 			ValaConstant* _tmp202_;
2530 			_c_index = _c_index + 1;
2531 			_tmp198_ = _c_index;
2532 			_tmp199_ = _c_size;
2533 			if (!(_tmp198_ < _tmp199_)) {
2534 				break;
2535 			}
2536 			_tmp200_ = _c_list;
2537 			_tmp201_ = vala_list_get (_tmp200_, _c_index);
2538 			c = (ValaConstant*) _tmp201_;
2539 			_tmp202_ = c;
2540 			vala_code_node_check ((ValaCodeNode*) _tmp202_, context);
2541 			_vala_code_node_unref0 (c);
2542 		}
2543 		_vala_iterable_unref0 (_c_list);
2544 	}
2545 	{
2546 		ValaList* _m_list = NULL;
2547 		ValaList* _tmp203_;
2548 		ValaList* _tmp204_;
2549 		gint _m_size = 0;
2550 		ValaList* _tmp205_;
2551 		gint _tmp206_;
2552 		gint _tmp207_;
2553 		gint _m_index = 0;
2554 		_tmp203_ = vala_object_type_symbol_get_methods ((ValaObjectTypeSymbol*) self);
2555 		_tmp204_ = _vala_iterable_ref0 (_tmp203_);
2556 		_m_list = _tmp204_;
2557 		_tmp205_ = _m_list;
2558 		_tmp206_ = vala_collection_get_size ((ValaCollection*) _tmp205_);
2559 		_tmp207_ = _tmp206_;
2560 		_m_size = _tmp207_;
2561 		_m_index = -1;
2562 		while (TRUE) {
2563 			gint _tmp208_;
2564 			gint _tmp209_;
2565 			ValaMethod* m = NULL;
2566 			ValaList* _tmp210_;
2567 			gpointer _tmp211_;
2568 			ValaMethod* _tmp212_;
2569 			_m_index = _m_index + 1;
2570 			_tmp208_ = _m_index;
2571 			_tmp209_ = _m_size;
2572 			if (!(_tmp208_ < _tmp209_)) {
2573 				break;
2574 			}
2575 			_tmp210_ = _m_list;
2576 			_tmp211_ = vala_list_get (_tmp210_, _m_index);
2577 			m = (ValaMethod*) _tmp211_;
2578 			_tmp212_ = m;
2579 			vala_code_node_check ((ValaCodeNode*) _tmp212_, context);
2580 			_vala_code_node_unref0 (m);
2581 		}
2582 		_vala_iterable_unref0 (_m_list);
2583 	}
2584 	{
2585 		ValaList* _prop_list = NULL;
2586 		ValaList* _tmp213_;
2587 		ValaList* _tmp214_;
2588 		gint _prop_size = 0;
2589 		ValaList* _tmp215_;
2590 		gint _tmp216_;
2591 		gint _tmp217_;
2592 		gint _prop_index = 0;
2593 		_tmp213_ = vala_object_type_symbol_get_properties ((ValaObjectTypeSymbol*) self);
2594 		_tmp214_ = _vala_iterable_ref0 (_tmp213_);
2595 		_prop_list = _tmp214_;
2596 		_tmp215_ = _prop_list;
2597 		_tmp216_ = vala_collection_get_size ((ValaCollection*) _tmp215_);
2598 		_tmp217_ = _tmp216_;
2599 		_prop_size = _tmp217_;
2600 		_prop_index = -1;
2601 		while (TRUE) {
2602 			gint _tmp218_;
2603 			gint _tmp219_;
2604 			ValaProperty* prop = NULL;
2605 			ValaList* _tmp220_;
2606 			gpointer _tmp221_;
2607 			gboolean _tmp222_ = FALSE;
2608 			ValaProperty* _tmp223_;
2609 			ValaAttribute* _tmp224_;
2610 			ValaProperty* _tmp231_;
2611 			_prop_index = _prop_index + 1;
2612 			_tmp218_ = _prop_index;
2613 			_tmp219_ = _prop_size;
2614 			if (!(_tmp218_ < _tmp219_)) {
2615 				break;
2616 			}
2617 			_tmp220_ = _prop_list;
2618 			_tmp221_ = vala_list_get (_tmp220_, _prop_index);
2619 			prop = (ValaProperty*) _tmp221_;
2620 			_tmp223_ = prop;
2621 			_tmp224_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp223_, "NoAccessorMethod");
2622 			if (_tmp224_ != NULL) {
2623 				ValaSemanticAnalyzer* _tmp225_;
2624 				ValaSemanticAnalyzer* _tmp226_;
2625 				ValaClass* _tmp227_;
2626 				_tmp225_ = vala_code_context_get_analyzer (context);
2627 				_tmp226_ = _tmp225_;
2628 				_tmp227_ = _tmp226_->object_type;
2629 				_tmp222_ = !vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) self, (ValaTypeSymbol*) _tmp227_);
2630 			} else {
2631 				_tmp222_ = FALSE;
2632 			}
2633 			if (_tmp222_) {
2634 				ValaProperty* _tmp228_;
2635 				ValaSourceReference* _tmp229_;
2636 				ValaSourceReference* _tmp230_;
2637 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2638 				_tmp228_ = prop;
2639 				_tmp229_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp228_);
2640 				_tmp230_ = _tmp229_;
2641 				vala_report_error (_tmp230_, "NoAccessorMethod is only allowed for properties in classes derived fro" \
2642 "m GLib.Object");
2643 				result = FALSE;
2644 				_vala_code_node_unref0 (prop);
2645 				_vala_iterable_unref0 (_prop_list);
2646 				_vala_code_node_unref0 (old_symbol);
2647 				_vala_source_file_unref0 (old_source_file);
2648 				return result;
2649 			}
2650 			_tmp231_ = prop;
2651 			vala_code_node_check ((ValaCodeNode*) _tmp231_, context);
2652 			_vala_code_node_unref0 (prop);
2653 		}
2654 		_vala_iterable_unref0 (_prop_list);
2655 	}
2656 	{
2657 		ValaList* _sig_list = NULL;
2658 		ValaList* _tmp232_;
2659 		ValaList* _tmp233_;
2660 		gint _sig_size = 0;
2661 		ValaList* _tmp234_;
2662 		gint _tmp235_;
2663 		gint _tmp236_;
2664 		gint _sig_index = 0;
2665 		_tmp232_ = vala_object_type_symbol_get_signals ((ValaObjectTypeSymbol*) self);
2666 		_tmp233_ = _vala_iterable_ref0 (_tmp232_);
2667 		_sig_list = _tmp233_;
2668 		_tmp234_ = _sig_list;
2669 		_tmp235_ = vala_collection_get_size ((ValaCollection*) _tmp234_);
2670 		_tmp236_ = _tmp235_;
2671 		_sig_size = _tmp236_;
2672 		_sig_index = -1;
2673 		while (TRUE) {
2674 			gint _tmp237_;
2675 			gint _tmp238_;
2676 			ValaSignal* sig = NULL;
2677 			ValaList* _tmp239_;
2678 			gpointer _tmp240_;
2679 			ValaSignal* _tmp241_;
2680 			_sig_index = _sig_index + 1;
2681 			_tmp237_ = _sig_index;
2682 			_tmp238_ = _sig_size;
2683 			if (!(_tmp237_ < _tmp238_)) {
2684 				break;
2685 			}
2686 			_tmp239_ = _sig_list;
2687 			_tmp240_ = vala_list_get (_tmp239_, _sig_index);
2688 			sig = (ValaSignal*) _tmp240_;
2689 			_tmp241_ = sig;
2690 			vala_code_node_check ((ValaCodeNode*) _tmp241_, context);
2691 			_vala_code_node_unref0 (sig);
2692 		}
2693 		_vala_iterable_unref0 (_sig_list);
2694 	}
2695 	_tmp242_ = vala_class_get_constructor (self);
2696 	_tmp243_ = _tmp242_;
2697 	if (_tmp243_ != NULL) {
2698 		ValaConstructor* _tmp244_;
2699 		ValaConstructor* _tmp245_;
2700 		_tmp244_ = vala_class_get_constructor (self);
2701 		_tmp245_ = _tmp244_;
2702 		vala_code_node_check ((ValaCodeNode*) _tmp245_, context);
2703 	}
2704 	_tmp246_ = vala_class_get_class_constructor (self);
2705 	_tmp247_ = _tmp246_;
2706 	if (_tmp247_ != NULL) {
2707 		ValaConstructor* _tmp248_;
2708 		ValaConstructor* _tmp249_;
2709 		_tmp248_ = vala_class_get_class_constructor (self);
2710 		_tmp249_ = _tmp248_;
2711 		vala_code_node_check ((ValaCodeNode*) _tmp249_, context);
2712 	}
2713 	_tmp250_ = vala_class_get_static_constructor (self);
2714 	_tmp251_ = _tmp250_;
2715 	if (_tmp251_ != NULL) {
2716 		ValaConstructor* _tmp252_;
2717 		ValaConstructor* _tmp253_;
2718 		_tmp252_ = vala_class_get_static_constructor (self);
2719 		_tmp253_ = _tmp252_;
2720 		vala_code_node_check ((ValaCodeNode*) _tmp253_, context);
2721 	}
2722 	_tmp254_ = vala_class_get_destructor (self);
2723 	_tmp255_ = _tmp254_;
2724 	if (_tmp255_ != NULL) {
2725 		ValaDestructor* _tmp256_;
2726 		ValaDestructor* _tmp257_;
2727 		_tmp256_ = vala_class_get_destructor (self);
2728 		_tmp257_ = _tmp256_;
2729 		vala_code_node_check ((ValaCodeNode*) _tmp257_, context);
2730 	}
2731 	_tmp258_ = vala_class_get_static_destructor (self);
2732 	_tmp259_ = _tmp258_;
2733 	if (_tmp259_ != NULL) {
2734 		ValaDestructor* _tmp260_;
2735 		ValaDestructor* _tmp261_;
2736 		_tmp260_ = vala_class_get_static_destructor (self);
2737 		_tmp261_ = _tmp260_;
2738 		vala_code_node_check ((ValaCodeNode*) _tmp261_, context);
2739 	}
2740 	_tmp262_ = vala_class_get_class_destructor (self);
2741 	_tmp263_ = _tmp262_;
2742 	if (_tmp263_ != NULL) {
2743 		ValaDestructor* _tmp264_;
2744 		ValaDestructor* _tmp265_;
2745 		_tmp264_ = vala_class_get_class_destructor (self);
2746 		_tmp265_ = _tmp264_;
2747 		vala_code_node_check ((ValaCodeNode*) _tmp265_, context);
2748 	}
2749 	{
2750 		ValaList* _cl_list = NULL;
2751 		ValaList* _tmp266_;
2752 		ValaList* _tmp267_;
2753 		gint _cl_size = 0;
2754 		ValaList* _tmp268_;
2755 		gint _tmp269_;
2756 		gint _tmp270_;
2757 		gint _cl_index = 0;
2758 		_tmp266_ = vala_object_type_symbol_get_classes ((ValaObjectTypeSymbol*) self);
2759 		_tmp267_ = _vala_iterable_ref0 (_tmp266_);
2760 		_cl_list = _tmp267_;
2761 		_tmp268_ = _cl_list;
2762 		_tmp269_ = vala_collection_get_size ((ValaCollection*) _tmp268_);
2763 		_tmp270_ = _tmp269_;
2764 		_cl_size = _tmp270_;
2765 		_cl_index = -1;
2766 		while (TRUE) {
2767 			gint _tmp271_;
2768 			gint _tmp272_;
2769 			ValaClass* cl = NULL;
2770 			ValaList* _tmp273_;
2771 			gpointer _tmp274_;
2772 			ValaClass* _tmp275_;
2773 			_cl_index = _cl_index + 1;
2774 			_tmp271_ = _cl_index;
2775 			_tmp272_ = _cl_size;
2776 			if (!(_tmp271_ < _tmp272_)) {
2777 				break;
2778 			}
2779 			_tmp273_ = _cl_list;
2780 			_tmp274_ = vala_list_get (_tmp273_, _cl_index);
2781 			cl = (ValaClass*) _tmp274_;
2782 			_tmp275_ = cl;
2783 			vala_code_node_check ((ValaCodeNode*) _tmp275_, context);
2784 			_vala_code_node_unref0 (cl);
2785 		}
2786 		_vala_iterable_unref0 (_cl_list);
2787 	}
2788 	{
2789 		ValaList* _iface_list = NULL;
2790 		ValaList* _tmp276_;
2791 		ValaList* _tmp277_;
2792 		gint _iface_size = 0;
2793 		ValaList* _tmp278_;
2794 		gint _tmp279_;
2795 		gint _tmp280_;
2796 		gint _iface_index = 0;
2797 		_tmp276_ = vala_object_type_symbol_get_interfaces ((ValaObjectTypeSymbol*) self);
2798 		_tmp277_ = _vala_iterable_ref0 (_tmp276_);
2799 		_iface_list = _tmp277_;
2800 		_tmp278_ = _iface_list;
2801 		_tmp279_ = vala_collection_get_size ((ValaCollection*) _tmp278_);
2802 		_tmp280_ = _tmp279_;
2803 		_iface_size = _tmp280_;
2804 		_iface_index = -1;
2805 		while (TRUE) {
2806 			gint _tmp281_;
2807 			gint _tmp282_;
2808 			ValaInterface* iface = NULL;
2809 			ValaList* _tmp283_;
2810 			gpointer _tmp284_;
2811 			ValaInterface* _tmp285_;
2812 			_iface_index = _iface_index + 1;
2813 			_tmp281_ = _iface_index;
2814 			_tmp282_ = _iface_size;
2815 			if (!(_tmp281_ < _tmp282_)) {
2816 				break;
2817 			}
2818 			_tmp283_ = _iface_list;
2819 			_tmp284_ = vala_list_get (_tmp283_, _iface_index);
2820 			iface = (ValaInterface*) _tmp284_;
2821 			_tmp285_ = iface;
2822 			vala_code_node_check ((ValaCodeNode*) _tmp285_, context);
2823 			_vala_code_node_unref0 (iface);
2824 		}
2825 		_vala_iterable_unref0 (_iface_list);
2826 	}
2827 	{
2828 		ValaList* _st_list = NULL;
2829 		ValaList* _tmp286_;
2830 		ValaList* _tmp287_;
2831 		gint _st_size = 0;
2832 		ValaList* _tmp288_;
2833 		gint _tmp289_;
2834 		gint _tmp290_;
2835 		gint _st_index = 0;
2836 		_tmp286_ = vala_object_type_symbol_get_structs ((ValaObjectTypeSymbol*) self);
2837 		_tmp287_ = _vala_iterable_ref0 (_tmp286_);
2838 		_st_list = _tmp287_;
2839 		_tmp288_ = _st_list;
2840 		_tmp289_ = vala_collection_get_size ((ValaCollection*) _tmp288_);
2841 		_tmp290_ = _tmp289_;
2842 		_st_size = _tmp290_;
2843 		_st_index = -1;
2844 		while (TRUE) {
2845 			gint _tmp291_;
2846 			gint _tmp292_;
2847 			ValaStruct* st = NULL;
2848 			ValaList* _tmp293_;
2849 			gpointer _tmp294_;
2850 			ValaStruct* _tmp295_;
2851 			_st_index = _st_index + 1;
2852 			_tmp291_ = _st_index;
2853 			_tmp292_ = _st_size;
2854 			if (!(_tmp291_ < _tmp292_)) {
2855 				break;
2856 			}
2857 			_tmp293_ = _st_list;
2858 			_tmp294_ = vala_list_get (_tmp293_, _st_index);
2859 			st = (ValaStruct*) _tmp294_;
2860 			_tmp295_ = st;
2861 			vala_code_node_check ((ValaCodeNode*) _tmp295_, context);
2862 			_vala_code_node_unref0 (st);
2863 		}
2864 		_vala_iterable_unref0 (_st_list);
2865 	}
2866 	{
2867 		ValaList* _d_list = NULL;
2868 		ValaList* _tmp296_;
2869 		ValaList* _tmp297_;
2870 		gint _d_size = 0;
2871 		ValaList* _tmp298_;
2872 		gint _tmp299_;
2873 		gint _tmp300_;
2874 		gint _d_index = 0;
2875 		_tmp296_ = vala_object_type_symbol_get_delegates ((ValaObjectTypeSymbol*) self);
2876 		_tmp297_ = _vala_iterable_ref0 (_tmp296_);
2877 		_d_list = _tmp297_;
2878 		_tmp298_ = _d_list;
2879 		_tmp299_ = vala_collection_get_size ((ValaCollection*) _tmp298_);
2880 		_tmp300_ = _tmp299_;
2881 		_d_size = _tmp300_;
2882 		_d_index = -1;
2883 		while (TRUE) {
2884 			gint _tmp301_;
2885 			gint _tmp302_;
2886 			ValaDelegate* d = NULL;
2887 			ValaList* _tmp303_;
2888 			gpointer _tmp304_;
2889 			ValaDelegate* _tmp305_;
2890 			_d_index = _d_index + 1;
2891 			_tmp301_ = _d_index;
2892 			_tmp302_ = _d_size;
2893 			if (!(_tmp301_ < _tmp302_)) {
2894 				break;
2895 			}
2896 			_tmp303_ = _d_list;
2897 			_tmp304_ = vala_list_get (_tmp303_, _d_index);
2898 			d = (ValaDelegate*) _tmp304_;
2899 			_tmp305_ = d;
2900 			vala_code_node_check ((ValaCodeNode*) _tmp305_, context);
2901 			_vala_code_node_unref0 (d);
2902 		}
2903 		_vala_iterable_unref0 (_d_list);
2904 	}
2905 	_tmp306_ = vala_class_get_is_compact (self);
2906 	_tmp307_ = _tmp306_;
2907 	if (_tmp307_) {
2908 		gboolean _tmp326_ = FALSE;
2909 		gboolean _tmp327_ = FALSE;
2910 		gboolean _tmp328_ = FALSE;
2911 		gboolean _tmp329_;
2912 		gboolean _tmp330_;
2913 		{
2914 			ValaList* _base_type_list = NULL;
2915 			ValaList* _tmp308_;
2916 			ValaList* _tmp309_;
2917 			gint _base_type_size = 0;
2918 			ValaList* _tmp310_;
2919 			gint _tmp311_;
2920 			gint _tmp312_;
2921 			gint _base_type_index = 0;
2922 			_tmp308_ = vala_class_get_base_types (self);
2923 			_tmp309_ = _vala_iterable_ref0 (_tmp308_);
2924 			_base_type_list = _tmp309_;
2925 			_tmp310_ = _base_type_list;
2926 			_tmp311_ = vala_collection_get_size ((ValaCollection*) _tmp310_);
2927 			_tmp312_ = _tmp311_;
2928 			_base_type_size = _tmp312_;
2929 			_base_type_index = -1;
2930 			while (TRUE) {
2931 				gint _tmp313_;
2932 				gint _tmp314_;
2933 				ValaDataType* base_type = NULL;
2934 				ValaList* _tmp315_;
2935 				gpointer _tmp316_;
2936 				ValaDataType* _tmp317_;
2937 				ValaTypeSymbol* _tmp318_;
2938 				ValaTypeSymbol* _tmp319_;
2939 				_base_type_index = _base_type_index + 1;
2940 				_tmp313_ = _base_type_index;
2941 				_tmp314_ = _base_type_size;
2942 				if (!(_tmp313_ < _tmp314_)) {
2943 					break;
2944 				}
2945 				_tmp315_ = _base_type_list;
2946 				_tmp316_ = vala_list_get (_tmp315_, _base_type_index);
2947 				base_type = (ValaDataType*) _tmp316_;
2948 				_tmp317_ = base_type;
2949 				_tmp318_ = vala_data_type_get_type_symbol (_tmp317_);
2950 				_tmp319_ = _tmp318_;
2951 				if (VALA_IS_INTERFACE (_tmp319_)) {
2952 					ValaSourceReference* _tmp320_;
2953 					ValaSourceReference* _tmp321_;
2954 					gchar* _tmp322_;
2955 					gchar* _tmp323_;
2956 					gchar* _tmp324_;
2957 					gchar* _tmp325_;
2958 					vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2959 					_tmp320_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2960 					_tmp321_ = _tmp320_;
2961 					_tmp322_ = vala_symbol_get_full_name ((ValaSymbol*) self);
2962 					_tmp323_ = _tmp322_;
2963 					_tmp324_ = g_strdup_printf ("compact classes `%s' may not implement interfaces", _tmp323_);
2964 					_tmp325_ = _tmp324_;
2965 					vala_report_error (_tmp321_, _tmp325_);
2966 					_g_free0 (_tmp325_);
2967 					_g_free0 (_tmp323_);
2968 				}
2969 				_vala_code_node_unref0 (base_type);
2970 			}
2971 			_vala_iterable_unref0 (_base_type_list);
2972 		}
2973 		_tmp329_ = vala_symbol_get_external ((ValaSymbol*) self);
2974 		_tmp330_ = _tmp329_;
2975 		if (!_tmp330_) {
2976 			gboolean _tmp331_;
2977 			gboolean _tmp332_;
2978 			_tmp331_ = vala_symbol_get_external_package ((ValaSymbol*) self);
2979 			_tmp332_ = _tmp331_;
2980 			_tmp328_ = !_tmp332_;
2981 		} else {
2982 			_tmp328_ = FALSE;
2983 		}
2984 		if (_tmp328_) {
2985 			ValaClass* _tmp333_;
2986 			_tmp333_ = self->priv->_base_class;
2987 			_tmp327_ = _tmp333_ != NULL;
2988 		} else {
2989 			_tmp327_ = FALSE;
2990 		}
2991 		if (_tmp327_) {
2992 			ValaClass* _tmp334_;
2993 			ValaSemanticAnalyzer* _tmp335_;
2994 			ValaSemanticAnalyzer* _tmp336_;
2995 			ValaClass* _tmp337_;
2996 			_tmp334_ = self->priv->_base_class;
2997 			_tmp335_ = vala_code_context_get_analyzer (context);
2998 			_tmp336_ = _tmp335_;
2999 			_tmp337_ = _tmp336_->gsource_type;
3000 			_tmp326_ = !vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) _tmp334_, (ValaTypeSymbol*) _tmp337_);
3001 		} else {
3002 			_tmp326_ = FALSE;
3003 		}
3004 		if (_tmp326_) {
3005 			{
3006 				ValaList* _f_list = NULL;
3007 				ValaList* _tmp338_;
3008 				ValaList* _tmp339_;
3009 				gint _f_size = 0;
3010 				ValaList* _tmp340_;
3011 				gint _tmp341_;
3012 				gint _tmp342_;
3013 				gint _f_index = 0;
3014 				_tmp338_ = vala_object_type_symbol_get_fields ((ValaObjectTypeSymbol*) self);
3015 				_tmp339_ = _vala_iterable_ref0 (_tmp338_);
3016 				_f_list = _tmp339_;
3017 				_tmp340_ = _f_list;
3018 				_tmp341_ = vala_collection_get_size ((ValaCollection*) _tmp340_);
3019 				_tmp342_ = _tmp341_;
3020 				_f_size = _tmp342_;
3021 				_f_index = -1;
3022 				while (TRUE) {
3023 					gint _tmp343_;
3024 					gint _tmp344_;
3025 					ValaField* f = NULL;
3026 					ValaList* _tmp345_;
3027 					gpointer _tmp346_;
3028 					ValaField* _tmp347_;
3029 					ValaMemberBinding _tmp348_;
3030 					ValaMemberBinding _tmp349_;
3031 					_f_index = _f_index + 1;
3032 					_tmp343_ = _f_index;
3033 					_tmp344_ = _f_size;
3034 					if (!(_tmp343_ < _tmp344_)) {
3035 						break;
3036 					}
3037 					_tmp345_ = _f_list;
3038 					_tmp346_ = vala_list_get (_tmp345_, _f_index);
3039 					f = (ValaField*) _tmp346_;
3040 					_tmp347_ = f;
3041 					_tmp348_ = vala_field_get_binding (_tmp347_);
3042 					_tmp349_ = _tmp348_;
3043 					if (_tmp349_ == VALA_MEMBER_BINDING_INSTANCE) {
3044 						ValaSourceReference* _tmp350_;
3045 						ValaSourceReference* _tmp351_;
3046 						vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
3047 						_tmp350_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
3048 						_tmp351_ = _tmp350_;
3049 						vala_report_error (_tmp351_, "derived compact classes may not have instance fields");
3050 						_vala_code_node_unref0 (f);
3051 						break;
3052 					}
3053 					_vala_code_node_unref0 (f);
3054 				}
3055 				_vala_iterable_unref0 (_f_list);
3056 			}
3057 		}
3058 	}
3059 	_tmp352_ = g_direct_equal;
3060 	_tmp353_ = vala_array_list_new (VALA_TYPE_TYPESYMBOL, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp352_);
3061 	prerequisites = (ValaList*) _tmp353_;
3062 	{
3063 		ValaList* _base_type_list = NULL;
3064 		ValaList* _tmp354_;
3065 		ValaList* _tmp355_;
3066 		gint _base_type_size = 0;
3067 		ValaList* _tmp356_;
3068 		gint _tmp357_;
3069 		gint _tmp358_;
3070 		gint _base_type_index = 0;
3071 		_tmp354_ = vala_class_get_base_types (self);
3072 		_tmp355_ = _vala_iterable_ref0 (_tmp354_);
3073 		_base_type_list = _tmp355_;
3074 		_tmp356_ = _base_type_list;
3075 		_tmp357_ = vala_collection_get_size ((ValaCollection*) _tmp356_);
3076 		_tmp358_ = _tmp357_;
3077 		_base_type_size = _tmp358_;
3078 		_base_type_index = -1;
3079 		while (TRUE) {
3080 			gint _tmp359_;
3081 			gint _tmp360_;
3082 			ValaDataType* base_type = NULL;
3083 			ValaList* _tmp361_;
3084 			gpointer _tmp362_;
3085 			ValaDataType* _tmp363_;
3086 			ValaTypeSymbol* _tmp364_;
3087 			ValaTypeSymbol* _tmp365_;
3088 			_base_type_index = _base_type_index + 1;
3089 			_tmp359_ = _base_type_index;
3090 			_tmp360_ = _base_type_size;
3091 			if (!(_tmp359_ < _tmp360_)) {
3092 				break;
3093 			}
3094 			_tmp361_ = _base_type_list;
3095 			_tmp362_ = vala_list_get (_tmp361_, _base_type_index);
3096 			base_type = (ValaDataType*) _tmp362_;
3097 			_tmp363_ = base_type;
3098 			_tmp364_ = vala_data_type_get_type_symbol (_tmp363_);
3099 			_tmp365_ = _tmp364_;
3100 			if (VALA_IS_INTERFACE (_tmp365_)) {
3101 				ValaDataType* _tmp366_;
3102 				ValaTypeSymbol* _tmp367_;
3103 				ValaTypeSymbol* _tmp368_;
3104 				ValaList* _tmp369_;
3105 				_tmp366_ = base_type;
3106 				_tmp367_ = vala_data_type_get_type_symbol (_tmp366_);
3107 				_tmp368_ = _tmp367_;
3108 				_tmp369_ = prerequisites;
3109 				vala_class_get_all_prerequisites (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp368_, VALA_TYPE_INTERFACE, ValaInterface), _tmp369_);
3110 			}
3111 			_vala_code_node_unref0 (base_type);
3112 		}
3113 		_vala_iterable_unref0 (_base_type_list);
3114 	}
3115 	_tmp370_ = g_str_equal;
3116 	_tmp371_ = vala_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp370_);
3117 	missing_prereqs = (ValaList*) _tmp371_;
3118 	{
3119 		ValaList* _prereq_list = NULL;
3120 		ValaList* _tmp372_;
3121 		ValaList* _tmp373_;
3122 		gint _prereq_size = 0;
3123 		ValaList* _tmp374_;
3124 		gint _tmp375_;
3125 		gint _tmp376_;
3126 		gint _prereq_index = 0;
3127 		_tmp372_ = prerequisites;
3128 		_tmp373_ = _vala_iterable_ref0 (_tmp372_);
3129 		_prereq_list = _tmp373_;
3130 		_tmp374_ = _prereq_list;
3131 		_tmp375_ = vala_collection_get_size ((ValaCollection*) _tmp374_);
3132 		_tmp376_ = _tmp375_;
3133 		_prereq_size = _tmp376_;
3134 		_prereq_index = -1;
3135 		while (TRUE) {
3136 			gint _tmp377_;
3137 			gint _tmp378_;
3138 			ValaTypeSymbol* prereq = NULL;
3139 			ValaList* _tmp379_;
3140 			gpointer _tmp380_;
3141 			ValaTypeSymbol* _tmp381_;
3142 			_prereq_index = _prereq_index + 1;
3143 			_tmp377_ = _prereq_index;
3144 			_tmp378_ = _prereq_size;
3145 			if (!(_tmp377_ < _tmp378_)) {
3146 				break;
3147 			}
3148 			_tmp379_ = _prereq_list;
3149 			_tmp380_ = vala_list_get (_tmp379_, _prereq_index);
3150 			prereq = (ValaTypeSymbol*) _tmp380_;
3151 			_tmp381_ = prereq;
3152 			if (!vala_class_is_a (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp381_, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol))) {
3153 				ValaList* _tmp382_;
3154 				ValaTypeSymbol* _tmp383_;
3155 				gchar* _tmp384_;
3156 				gchar* _tmp385_;
3157 				_tmp382_ = missing_prereqs;
3158 				_tmp383_ = prereq;
3159 				_tmp384_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp383_);
3160 				_tmp385_ = _tmp384_;
3161 				vala_list_insert (_tmp382_, 0, _tmp385_);
3162 				_g_free0 (_tmp385_);
3163 			}
3164 			_vala_code_node_unref0 (prereq);
3165 		}
3166 		_vala_iterable_unref0 (_prereq_list);
3167 	}
3168 	_tmp386_ = missing_prereqs;
3169 	_tmp387_ = vala_collection_get_size ((ValaCollection*) _tmp386_);
3170 	_tmp388_ = _tmp387_;
3171 	if (_tmp388_ > 0) {
3172 		gchar* error_string = NULL;
3173 		gchar* _tmp389_;
3174 		gchar* _tmp390_;
3175 		gchar* _tmp391_;
3176 		gchar* _tmp392_;
3177 		gboolean first = FALSE;
3178 		const gchar* _tmp408_;
3179 		gchar* _tmp409_;
3180 		ValaSourceReference* _tmp410_;
3181 		ValaSourceReference* _tmp411_;
3182 		const gchar* _tmp412_;
3183 		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
3184 		_tmp389_ = vala_symbol_get_full_name ((ValaSymbol*) self);
3185 		_tmp390_ = _tmp389_;
3186 		_tmp391_ = g_strdup_printf ("%s: some prerequisites (", _tmp390_);
3187 		_tmp392_ = _tmp391_;
3188 		_g_free0 (_tmp390_);
3189 		error_string = _tmp392_;
3190 		first = TRUE;
3191 		{
3192 			ValaList* _s_list = NULL;
3193 			ValaList* _tmp393_;
3194 			ValaList* _tmp394_;
3195 			gint _s_size = 0;
3196 			ValaList* _tmp395_;
3197 			gint _tmp396_;
3198 			gint _tmp397_;
3199 			gint _s_index = 0;
3200 			_tmp393_ = missing_prereqs;
3201 			_tmp394_ = _vala_iterable_ref0 (_tmp393_);
3202 			_s_list = _tmp394_;
3203 			_tmp395_ = _s_list;
3204 			_tmp396_ = vala_collection_get_size ((ValaCollection*) _tmp395_);
3205 			_tmp397_ = _tmp396_;
3206 			_s_size = _tmp397_;
3207 			_s_index = -1;
3208 			while (TRUE) {
3209 				gint _tmp398_;
3210 				gint _tmp399_;
3211 				gchar* s = NULL;
3212 				ValaList* _tmp400_;
3213 				gpointer _tmp401_;
3214 				_s_index = _s_index + 1;
3215 				_tmp398_ = _s_index;
3216 				_tmp399_ = _s_size;
3217 				if (!(_tmp398_ < _tmp399_)) {
3218 					break;
3219 				}
3220 				_tmp400_ = _s_list;
3221 				_tmp401_ = vala_list_get (_tmp400_, _s_index);
3222 				s = (gchar*) _tmp401_;
3223 				if (first) {
3224 					const gchar* _tmp402_;
3225 					const gchar* _tmp403_;
3226 					gchar* _tmp404_;
3227 					_tmp402_ = error_string;
3228 					_tmp403_ = s;
3229 					_tmp404_ = g_strdup_printf ("%s`%s'", _tmp402_, _tmp403_);
3230 					_g_free0 (error_string);
3231 					error_string = _tmp404_;
3232 					first = FALSE;
3233 				} else {
3234 					const gchar* _tmp405_;
3235 					const gchar* _tmp406_;
3236 					gchar* _tmp407_;
3237 					_tmp405_ = error_string;
3238 					_tmp406_ = s;
3239 					_tmp407_ = g_strdup_printf ("%s, `%s'", _tmp405_, _tmp406_);
3240 					_g_free0 (error_string);
3241 					error_string = _tmp407_;
3242 				}
3243 				_g_free0 (s);
3244 			}
3245 			_vala_iterable_unref0 (_s_list);
3246 		}
3247 		_tmp408_ = error_string;
3248 		_tmp409_ = g_strconcat (_tmp408_, ") are not met", NULL);
3249 		_g_free0 (error_string);
3250 		error_string = _tmp409_;
3251 		_tmp410_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
3252 		_tmp411_ = _tmp410_;
3253 		_tmp412_ = error_string;
3254 		vala_report_error (_tmp411_, _tmp412_);
3255 		_g_free0 (error_string);
3256 	}
3257 	_tmp413_ = vala_symbol_get_source_type ((ValaSymbol*) self);
3258 	_tmp414_ = _tmp413_;
3259 	if (_tmp414_ == VALA_SOURCE_FILE_TYPE_SOURCE) {
3260 		gboolean _tmp575_;
3261 		{
3262 			ValaList* _base_type_list = NULL;
3263 			ValaList* _tmp415_;
3264 			ValaList* _tmp416_;
3265 			gint _base_type_size = 0;
3266 			ValaList* _tmp417_;
3267 			gint _tmp418_;
3268 			gint _tmp419_;
3269 			gint _base_type_index = 0;
3270 			_tmp415_ = vala_class_get_base_types (self);
3271 			_tmp416_ = _vala_iterable_ref0 (_tmp415_);
3272 			_base_type_list = _tmp416_;
3273 			_tmp417_ = _base_type_list;
3274 			_tmp418_ = vala_collection_get_size ((ValaCollection*) _tmp417_);
3275 			_tmp419_ = _tmp418_;
3276 			_base_type_size = _tmp419_;
3277 			_base_type_index = -1;
3278 			while (TRUE) {
3279 				gint _tmp420_;
3280 				gint _tmp421_;
3281 				ValaDataType* base_type = NULL;
3282 				ValaList* _tmp422_;
3283 				gpointer _tmp423_;
3284 				ValaDataType* _tmp424_;
3285 				ValaTypeSymbol* _tmp425_;
3286 				ValaTypeSymbol* _tmp426_;
3287 				_base_type_index = _base_type_index + 1;
3288 				_tmp420_ = _base_type_index;
3289 				_tmp421_ = _base_type_size;
3290 				if (!(_tmp420_ < _tmp421_)) {
3291 					break;
3292 				}
3293 				_tmp422_ = _base_type_list;
3294 				_tmp423_ = vala_list_get (_tmp422_, _base_type_index);
3295 				base_type = (ValaDataType*) _tmp423_;
3296 				_tmp424_ = base_type;
3297 				_tmp425_ = vala_data_type_get_type_symbol (_tmp424_);
3298 				_tmp426_ = _tmp425_;
3299 				if (VALA_IS_INTERFACE (_tmp426_)) {
3300 					ValaInterface* iface = NULL;
3301 					ValaDataType* _tmp427_;
3302 					ValaTypeSymbol* _tmp428_;
3303 					ValaTypeSymbol* _tmp429_;
3304 					gboolean _tmp430_ = FALSE;
3305 					ValaClass* _tmp431_;
3306 					_tmp427_ = base_type;
3307 					_tmp428_ = vala_data_type_get_type_symbol (_tmp427_);
3308 					_tmp429_ = _tmp428_;
3309 					iface = G_TYPE_CHECK_INSTANCE_CAST (_tmp429_, VALA_TYPE_INTERFACE, ValaInterface);
3310 					_tmp431_ = self->priv->_base_class;
3311 					if (_tmp431_ != NULL) {
3312 						ValaClass* _tmp432_;
3313 						ValaInterface* _tmp433_;
3314 						_tmp432_ = self->priv->_base_class;
3315 						_tmp433_ = iface;
3316 						_tmp430_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) _tmp432_, (ValaTypeSymbol*) _tmp433_);
3317 					} else {
3318 						_tmp430_ = FALSE;
3319 					}
3320 					if (_tmp430_) {
3321 						_vala_code_node_unref0 (base_type);
3322 						break;
3323 					}
3324 					{
3325 						ValaList* _m_list = NULL;
3326 						ValaInterface* _tmp434_;
3327 						ValaList* _tmp435_;
3328 						ValaList* _tmp436_;
3329 						gint _m_size = 0;
3330 						ValaList* _tmp437_;
3331 						gint _tmp438_;
3332 						gint _tmp439_;
3333 						gint _m_index = 0;
3334 						_tmp434_ = iface;
3335 						_tmp435_ = vala_object_type_symbol_get_methods ((ValaObjectTypeSymbol*) _tmp434_);
3336 						_tmp436_ = _vala_iterable_ref0 (_tmp435_);
3337 						_m_list = _tmp436_;
3338 						_tmp437_ = _m_list;
3339 						_tmp438_ = vala_collection_get_size ((ValaCollection*) _tmp437_);
3340 						_tmp439_ = _tmp438_;
3341 						_m_size = _tmp439_;
3342 						_m_index = -1;
3343 						while (TRUE) {
3344 							gint _tmp440_;
3345 							gint _tmp441_;
3346 							ValaMethod* m = NULL;
3347 							ValaList* _tmp442_;
3348 							gpointer _tmp443_;
3349 							ValaMethod* _tmp444_;
3350 							gboolean _tmp445_;
3351 							gboolean _tmp446_;
3352 							_m_index = _m_index + 1;
3353 							_tmp440_ = _m_index;
3354 							_tmp441_ = _m_size;
3355 							if (!(_tmp440_ < _tmp441_)) {
3356 								break;
3357 							}
3358 							_tmp442_ = _m_list;
3359 							_tmp443_ = vala_list_get (_tmp442_, _m_index);
3360 							m = (ValaMethod*) _tmp443_;
3361 							_tmp444_ = m;
3362 							_tmp445_ = vala_method_get_is_abstract (_tmp444_);
3363 							_tmp446_ = _tmp445_;
3364 							if (_tmp446_) {
3365 								gboolean implemented = FALSE;
3366 								ValaClass* base_class = NULL;
3367 								implemented = FALSE;
3368 								base_class = self;
3369 								while (TRUE) {
3370 									gboolean _tmp447_ = FALSE;
3371 									ValaClass* _tmp448_;
3372 									ValaClass* _tmp502_;
3373 									ValaClass* _tmp503_;
3374 									_tmp448_ = base_class;
3375 									if (_tmp448_ != NULL) {
3376 										_tmp447_ = !implemented;
3377 									} else {
3378 										_tmp447_ = FALSE;
3379 									}
3380 									if (!_tmp447_) {
3381 										break;
3382 									}
3383 									{
3384 										ValaList* _impl_list = NULL;
3385 										ValaClass* _tmp449_;
3386 										ValaList* _tmp450_;
3387 										ValaList* _tmp451_;
3388 										gint _impl_size = 0;
3389 										ValaList* _tmp452_;
3390 										gint _tmp453_;
3391 										gint _tmp454_;
3392 										gint _impl_index = 0;
3393 										_tmp449_ = base_class;
3394 										_tmp450_ = vala_object_type_symbol_get_methods ((ValaObjectTypeSymbol*) _tmp449_);
3395 										_tmp451_ = _vala_iterable_ref0 (_tmp450_);
3396 										_impl_list = _tmp451_;
3397 										_tmp452_ = _impl_list;
3398 										_tmp453_ = vala_collection_get_size ((ValaCollection*) _tmp452_);
3399 										_tmp454_ = _tmp453_;
3400 										_impl_size = _tmp454_;
3401 										_impl_index = -1;
3402 										while (TRUE) {
3403 											gint _tmp455_;
3404 											gint _tmp456_;
3405 											ValaMethod* impl = NULL;
3406 											ValaList* _tmp457_;
3407 											gpointer _tmp458_;
3408 											gboolean _tmp459_ = FALSE;
3409 											ValaMethod* _tmp460_;
3410 											ValaMethod* _tmp461_;
3411 											ValaMethod* _tmp462_;
3412 											ValaMethod* _tmp463_;
3413 											_impl_index = _impl_index + 1;
3414 											_tmp455_ = _impl_index;
3415 											_tmp456_ = _impl_size;
3416 											if (!(_tmp455_ < _tmp456_)) {
3417 												break;
3418 											}
3419 											_tmp457_ = _impl_list;
3420 											_tmp458_ = vala_list_get (_tmp457_, _impl_index);
3421 											impl = (ValaMethod*) _tmp458_;
3422 											_tmp460_ = impl;
3423 											_tmp461_ = vala_method_get_base_interface_method (_tmp460_);
3424 											_tmp462_ = _tmp461_;
3425 											_tmp463_ = m;
3426 											if (_tmp462_ == _tmp463_) {
3427 												_tmp459_ = TRUE;
3428 											} else {
3429 												gboolean _tmp464_ = FALSE;
3430 												gboolean _tmp465_ = FALSE;
3431 												gboolean _tmp466_ = FALSE;
3432 												gboolean _tmp467_ = FALSE;
3433 												ValaClass* _tmp468_;
3434 												_tmp468_ = base_class;
3435 												if (_tmp468_ != self) {
3436 													ValaMethod* _tmp469_;
3437 													ValaMethod* _tmp470_;
3438 													ValaMethod* _tmp471_;
3439 													_tmp469_ = impl;
3440 													_tmp470_ = vala_method_get_base_interface_method (_tmp469_);
3441 													_tmp471_ = _tmp470_;
3442 													_tmp467_ = _tmp471_ == NULL;
3443 												} else {
3444 													_tmp467_ = FALSE;
3445 												}
3446 												if (_tmp467_) {
3447 													ValaMethod* _tmp472_;
3448 													const gchar* _tmp473_;
3449 													const gchar* _tmp474_;
3450 													ValaMethod* _tmp475_;
3451 													const gchar* _tmp476_;
3452 													const gchar* _tmp477_;
3453 													_tmp472_ = impl;
3454 													_tmp473_ = vala_symbol_get_name ((ValaSymbol*) _tmp472_);
3455 													_tmp474_ = _tmp473_;
3456 													_tmp475_ = m;
3457 													_tmp476_ = vala_symbol_get_name ((ValaSymbol*) _tmp475_);
3458 													_tmp477_ = _tmp476_;
3459 													_tmp466_ = g_strcmp0 (_tmp474_, _tmp477_) == 0;
3460 												} else {
3461 													_tmp466_ = FALSE;
3462 												}
3463 												if (_tmp466_) {
3464 													gboolean _tmp478_ = FALSE;
3465 													ValaMethod* _tmp479_;
3466 													ValaDataType* _tmp480_;
3467 													ValaDataType* _tmp481_;
3468 													_tmp479_ = impl;
3469 													_tmp480_ = vala_method_get_base_interface_type (_tmp479_);
3470 													_tmp481_ = _tmp480_;
3471 													if (_tmp481_ == NULL) {
3472 														_tmp478_ = TRUE;
3473 													} else {
3474 														ValaMethod* _tmp482_;
3475 														ValaDataType* _tmp483_;
3476 														ValaDataType* _tmp484_;
3477 														ValaTypeSymbol* _tmp485_;
3478 														ValaTypeSymbol* _tmp486_;
3479 														ValaInterface* _tmp487_;
3480 														_tmp482_ = impl;
3481 														_tmp483_ = vala_method_get_base_interface_type (_tmp482_);
3482 														_tmp484_ = _tmp483_;
3483 														_tmp485_ = vala_data_type_get_type_symbol (_tmp484_);
3484 														_tmp486_ = _tmp485_;
3485 														_tmp487_ = iface;
3486 														_tmp478_ = _tmp486_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp487_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol);
3487 													}
3488 													_tmp465_ = _tmp478_;
3489 												} else {
3490 													_tmp465_ = FALSE;
3491 												}
3492 												if (_tmp465_) {
3493 													ValaMethod* _tmp488_;
3494 													ValaMethod* _tmp489_;
3495 													_tmp488_ = impl;
3496 													_tmp489_ = m;
3497 													_tmp464_ = vala_method_compatible_no_error (_tmp488_, _tmp489_);
3498 												} else {
3499 													_tmp464_ = FALSE;
3500 												}
3501 												_tmp459_ = _tmp464_;
3502 											}
3503 											if (_tmp459_) {
3504 												ValaMethod* _tmp490_;
3505 												ValaVersionAttribute* _tmp491_;
3506 												ValaVersionAttribute* _tmp492_;
3507 												ValaSourceReference* _tmp493_;
3508 												ValaSourceReference* _tmp494_;
3509 												ValaMethod* _tmp495_;
3510 												ValaMethod* _tmp496_;
3511 												ValaMethod* _tmp497_;
3512 												ValaMethod* _tmp498_;
3513 												_tmp490_ = impl;
3514 												_tmp491_ = vala_symbol_get_version ((ValaSymbol*) _tmp490_);
3515 												_tmp492_ = _tmp491_;
3516 												_tmp493_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
3517 												_tmp494_ = _tmp493_;
3518 												vala_version_attribute_check (_tmp492_, _tmp494_);
3519 												_tmp495_ = impl;
3520 												vala_symbol_set_used ((ValaSymbol*) _tmp495_, TRUE);
3521 												implemented = TRUE;
3522 												_tmp496_ = impl;
3523 												_tmp497_ = vala_method_get_base_interface_method (_tmp496_);
3524 												_tmp498_ = _tmp497_;
3525 												if (_tmp498_ == NULL) {
3526 													ValaHashMap* _tmp499_;
3527 													ValaMethod* _tmp500_;
3528 													ValaMethod* _tmp501_;
3529 													_tmp499_ = self->priv->implicit_implementations;
3530 													_tmp500_ = m;
3531 													_tmp501_ = impl;
3532 													vala_map_set ((ValaMap*) _tmp499_, _tmp500_, _tmp501_);
3533 												}
3534 												_vala_code_node_unref0 (impl);
3535 												break;
3536 											}
3537 											_vala_code_node_unref0 (impl);
3538 										}
3539 										_vala_iterable_unref0 (_impl_list);
3540 									}
3541 									_tmp502_ = base_class;
3542 									_tmp503_ = _tmp502_->priv->_base_class;
3543 									base_class = _tmp503_;
3544 								}
3545 								if (!implemented) {
3546 									ValaSourceReference* _tmp504_;
3547 									ValaSourceReference* _tmp505_;
3548 									gchar* _tmp506_;
3549 									gchar* _tmp507_;
3550 									ValaMethod* _tmp508_;
3551 									gchar* _tmp509_;
3552 									gchar* _tmp510_;
3553 									gchar* _tmp511_;
3554 									gchar* _tmp512_;
3555 									vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
3556 									_tmp504_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
3557 									_tmp505_ = _tmp504_;
3558 									_tmp506_ = vala_symbol_get_full_name ((ValaSymbol*) self);
3559 									_tmp507_ = _tmp506_;
3560 									_tmp508_ = m;
3561 									_tmp509_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp508_);
3562 									_tmp510_ = _tmp509_;
3563 									_tmp511_ = g_strdup_printf ("`%s' does not implement interface method `%s'", _tmp507_, _tmp510_);
3564 									_tmp512_ = _tmp511_;
3565 									vala_report_error (_tmp505_, _tmp512_);
3566 									_g_free0 (_tmp512_);
3567 									_g_free0 (_tmp510_);
3568 									_g_free0 (_tmp507_);
3569 								}
3570 							}
3571 							_vala_code_node_unref0 (m);
3572 						}
3573 						_vala_iterable_unref0 (_m_list);
3574 					}
3575 					{
3576 						ValaList* _prop_list = NULL;
3577 						ValaInterface* _tmp513_;
3578 						ValaList* _tmp514_;
3579 						ValaList* _tmp515_;
3580 						gint _prop_size = 0;
3581 						ValaList* _tmp516_;
3582 						gint _tmp517_;
3583 						gint _tmp518_;
3584 						gint _prop_index = 0;
3585 						_tmp513_ = iface;
3586 						_tmp514_ = vala_object_type_symbol_get_properties ((ValaObjectTypeSymbol*) _tmp513_);
3587 						_tmp515_ = _vala_iterable_ref0 (_tmp514_);
3588 						_prop_list = _tmp515_;
3589 						_tmp516_ = _prop_list;
3590 						_tmp517_ = vala_collection_get_size ((ValaCollection*) _tmp516_);
3591 						_tmp518_ = _tmp517_;
3592 						_prop_size = _tmp518_;
3593 						_prop_index = -1;
3594 						while (TRUE) {
3595 							gint _tmp519_;
3596 							gint _tmp520_;
3597 							ValaProperty* prop = NULL;
3598 							ValaList* _tmp521_;
3599 							gpointer _tmp522_;
3600 							ValaProperty* _tmp523_;
3601 							gboolean _tmp524_;
3602 							gboolean _tmp525_;
3603 							_prop_index = _prop_index + 1;
3604 							_tmp519_ = _prop_index;
3605 							_tmp520_ = _prop_size;
3606 							if (!(_tmp519_ < _tmp520_)) {
3607 								break;
3608 							}
3609 							_tmp521_ = _prop_list;
3610 							_tmp522_ = vala_list_get (_tmp521_, _prop_index);
3611 							prop = (ValaProperty*) _tmp522_;
3612 							_tmp523_ = prop;
3613 							_tmp524_ = vala_property_get_is_abstract (_tmp523_);
3614 							_tmp525_ = _tmp524_;
3615 							if (_tmp525_) {
3616 								ValaSymbol* sym = NULL;
3617 								ValaClass* base_class = NULL;
3618 								ValaSymbol* _tmp538_;
3619 								sym = NULL;
3620 								base_class = self;
3621 								while (TRUE) {
3622 									gboolean _tmp526_ = FALSE;
3623 									ValaClass* _tmp527_;
3624 									ValaClass* _tmp529_;
3625 									ValaScope* _tmp530_;
3626 									ValaScope* _tmp531_;
3627 									ValaProperty* _tmp532_;
3628 									const gchar* _tmp533_;
3629 									const gchar* _tmp534_;
3630 									ValaSymbol* _tmp535_;
3631 									ValaClass* _tmp536_;
3632 									ValaClass* _tmp537_;
3633 									_tmp527_ = base_class;
3634 									if (_tmp527_ != NULL) {
3635 										ValaSymbol* _tmp528_;
3636 										_tmp528_ = sym;
3637 										_tmp526_ = !VALA_IS_PROPERTY (_tmp528_);
3638 									} else {
3639 										_tmp526_ = FALSE;
3640 									}
3641 									if (!_tmp526_) {
3642 										break;
3643 									}
3644 									_tmp529_ = base_class;
3645 									_tmp530_ = vala_symbol_get_scope ((ValaSymbol*) _tmp529_);
3646 									_tmp531_ = _tmp530_;
3647 									_tmp532_ = prop;
3648 									_tmp533_ = vala_symbol_get_name ((ValaSymbol*) _tmp532_);
3649 									_tmp534_ = _tmp533_;
3650 									_tmp535_ = vala_scope_lookup (_tmp531_, _tmp534_);
3651 									_vala_code_node_unref0 (sym);
3652 									sym = _tmp535_;
3653 									_tmp536_ = base_class;
3654 									_tmp537_ = _tmp536_->priv->_base_class;
3655 									base_class = _tmp537_;
3656 								}
3657 								_tmp538_ = sym;
3658 								if (VALA_IS_PROPERTY (_tmp538_)) {
3659 									ValaProperty* base_prop = NULL;
3660 									ValaSymbol* _tmp539_;
3661 									ValaProperty* _tmp540_;
3662 									gchar* invalid_match = NULL;
3663 									gboolean _tmp541_ = FALSE;
3664 									ValaProperty* _tmp542_;
3665 									gboolean _tmp543_;
3666 									gboolean _tmp544_;
3667 									ValaSymbol* _tmp560_;
3668 									ValaVersionAttribute* _tmp561_;
3669 									ValaVersionAttribute* _tmp562_;
3670 									ValaSourceReference* _tmp563_;
3671 									ValaSourceReference* _tmp564_;
3672 									ValaSymbol* _tmp565_;
3673 									_tmp539_ = sym;
3674 									_tmp540_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp539_, VALA_TYPE_PROPERTY, ValaProperty));
3675 									base_prop = _tmp540_;
3676 									invalid_match = NULL;
3677 									_tmp542_ = base_prop;
3678 									_tmp543_ = vala_symbol_get_hides ((ValaSymbol*) _tmp542_);
3679 									_tmp544_ = _tmp543_;
3680 									if (!_tmp544_) {
3681 										ValaProperty* _tmp545_;
3682 										ValaProperty* _tmp546_;
3683 										gchar* _tmp547_ = NULL;
3684 										gboolean _tmp548_;
3685 										_tmp545_ = base_prop;
3686 										_tmp546_ = prop;
3687 										_tmp548_ = vala_property_compatible (_tmp545_, _tmp546_, &_tmp547_);
3688 										_g_free0 (invalid_match);
3689 										invalid_match = _tmp547_;
3690 										_tmp541_ = !_tmp548_;
3691 									} else {
3692 										_tmp541_ = FALSE;
3693 									}
3694 									if (_tmp541_) {
3695 										ValaSourceReference* _tmp549_;
3696 										ValaSourceReference* _tmp550_;
3697 										ValaProperty* _tmp551_;
3698 										gchar* _tmp552_;
3699 										gchar* _tmp553_;
3700 										ValaProperty* _tmp554_;
3701 										gchar* _tmp555_;
3702 										gchar* _tmp556_;
3703 										const gchar* _tmp557_;
3704 										gchar* _tmp558_;
3705 										gchar* _tmp559_;
3706 										vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
3707 										_tmp549_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
3708 										_tmp550_ = _tmp549_;
3709 										_tmp551_ = prop;
3710 										_tmp552_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp551_);
3711 										_tmp553_ = _tmp552_;
3712 										_tmp554_ = base_prop;
3713 										_tmp555_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp554_);
3714 										_tmp556_ = _tmp555_;
3715 										_tmp557_ = invalid_match;
3716 										_tmp558_ = g_strdup_printf ("Type and/or accessors of inherited properties `%s' and `%s' do not mat" \
3717 "ch: %s.", _tmp553_, _tmp556_, _tmp557_);
3718 										_tmp559_ = _tmp558_;
3719 										vala_report_error (_tmp550_, _tmp559_);
3720 										_g_free0 (_tmp559_);
3721 										_g_free0 (_tmp556_);
3722 										_g_free0 (_tmp553_);
3723 									}
3724 									_tmp560_ = sym;
3725 									_tmp561_ = vala_symbol_get_version (_tmp560_);
3726 									_tmp562_ = _tmp561_;
3727 									_tmp563_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
3728 									_tmp564_ = _tmp563_;
3729 									vala_version_attribute_check (_tmp562_, _tmp564_);
3730 									_tmp565_ = sym;
3731 									vala_symbol_set_used (_tmp565_, TRUE);
3732 									_g_free0 (invalid_match);
3733 									_vala_code_node_unref0 (base_prop);
3734 								} else {
3735 									ValaSourceReference* _tmp566_;
3736 									ValaSourceReference* _tmp567_;
3737 									gchar* _tmp568_;
3738 									gchar* _tmp569_;
3739 									ValaProperty* _tmp570_;
3740 									gchar* _tmp571_;
3741 									gchar* _tmp572_;
3742 									gchar* _tmp573_;
3743 									gchar* _tmp574_;
3744 									vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
3745 									_tmp566_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
3746 									_tmp567_ = _tmp566_;
3747 									_tmp568_ = vala_symbol_get_full_name ((ValaSymbol*) self);
3748 									_tmp569_ = _tmp568_;
3749 									_tmp570_ = prop;
3750 									_tmp571_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp570_);
3751 									_tmp572_ = _tmp571_;
3752 									_tmp573_ = g_strdup_printf ("`%s' does not implement interface property `%s'", _tmp569_, _tmp572_);
3753 									_tmp574_ = _tmp573_;
3754 									vala_report_error (_tmp567_, _tmp574_);
3755 									_g_free0 (_tmp574_);
3756 									_g_free0 (_tmp572_);
3757 									_g_free0 (_tmp569_);
3758 								}
3759 								_vala_code_node_unref0 (sym);
3760 							}
3761 							_vala_code_node_unref0 (prop);
3762 						}
3763 						_vala_iterable_unref0 (_prop_list);
3764 					}
3765 				}
3766 				_vala_code_node_unref0 (base_type);
3767 			}
3768 			_vala_iterable_unref0 (_base_type_list);
3769 		}
3770 		_tmp575_ = self->priv->_is_abstract;
3771 		if (!_tmp575_) {
3772 			ValaClass* base_class = NULL;
3773 			ValaClass* _tmp576_;
3774 			_tmp576_ = self->priv->_base_class;
3775 			base_class = _tmp576_;
3776 			while (TRUE) {
3777 				gboolean _tmp577_ = FALSE;
3778 				ValaClass* _tmp578_;
3779 				ValaClass* _tmp645_;
3780 				ValaClass* _tmp646_;
3781 				_tmp578_ = base_class;
3782 				if (_tmp578_ != NULL) {
3783 					ValaClass* _tmp579_;
3784 					gboolean _tmp580_;
3785 					_tmp579_ = base_class;
3786 					_tmp580_ = _tmp579_->priv->_is_abstract;
3787 					_tmp577_ = _tmp580_;
3788 				} else {
3789 					_tmp577_ = FALSE;
3790 				}
3791 				if (!_tmp577_) {
3792 					break;
3793 				}
3794 				{
3795 					ValaList* _base_method_list = NULL;
3796 					ValaClass* _tmp581_;
3797 					ValaList* _tmp582_;
3798 					ValaList* _tmp583_;
3799 					gint _base_method_size = 0;
3800 					ValaList* _tmp584_;
3801 					gint _tmp585_;
3802 					gint _tmp586_;
3803 					gint _base_method_index = 0;
3804 					_tmp581_ = base_class;
3805 					_tmp582_ = vala_object_type_symbol_get_methods ((ValaObjectTypeSymbol*) _tmp581_);
3806 					_tmp583_ = _vala_iterable_ref0 (_tmp582_);
3807 					_base_method_list = _tmp583_;
3808 					_tmp584_ = _base_method_list;
3809 					_tmp585_ = vala_collection_get_size ((ValaCollection*) _tmp584_);
3810 					_tmp586_ = _tmp585_;
3811 					_base_method_size = _tmp586_;
3812 					_base_method_index = -1;
3813 					while (TRUE) {
3814 						gint _tmp587_;
3815 						gint _tmp588_;
3816 						ValaMethod* base_method = NULL;
3817 						ValaList* _tmp589_;
3818 						gpointer _tmp590_;
3819 						ValaMethod* _tmp591_;
3820 						gboolean _tmp592_;
3821 						gboolean _tmp593_;
3822 						_base_method_index = _base_method_index + 1;
3823 						_tmp587_ = _base_method_index;
3824 						_tmp588_ = _base_method_size;
3825 						if (!(_tmp587_ < _tmp588_)) {
3826 							break;
3827 						}
3828 						_tmp589_ = _base_method_list;
3829 						_tmp590_ = vala_list_get (_tmp589_, _base_method_index);
3830 						base_method = (ValaMethod*) _tmp590_;
3831 						_tmp591_ = base_method;
3832 						_tmp592_ = vala_method_get_is_abstract (_tmp591_);
3833 						_tmp593_ = _tmp592_;
3834 						if (_tmp593_) {
3835 							ValaMethod* override_method = NULL;
3836 							ValaMethod* _tmp594_;
3837 							const gchar* _tmp595_;
3838 							const gchar* _tmp596_;
3839 							ValaSymbol* _tmp597_;
3840 							ValaMethod* _tmp598_;
3841 							gboolean _tmp599_ = FALSE;
3842 							ValaMethod* _tmp600_;
3843 							_tmp594_ = base_method;
3844 							_tmp595_ = vala_symbol_get_name ((ValaSymbol*) _tmp594_);
3845 							_tmp596_ = _tmp595_;
3846 							_tmp597_ = vala_semantic_analyzer_symbol_lookup_inherited ((ValaSymbol*) self, _tmp596_);
3847 							_tmp598_ = VALA_IS_METHOD (_tmp597_) ? ((ValaMethod*) _tmp597_) : NULL;
3848 							if (_tmp598_ == NULL) {
3849 								_vala_code_node_unref0 (_tmp597_);
3850 							}
3851 							override_method = _tmp598_;
3852 							_tmp600_ = override_method;
3853 							if (_tmp600_ == NULL) {
3854 								_tmp599_ = TRUE;
3855 							} else {
3856 								ValaMethod* _tmp601_;
3857 								gboolean _tmp602_;
3858 								gboolean _tmp603_;
3859 								_tmp601_ = override_method;
3860 								_tmp602_ = vala_method_get_overrides (_tmp601_);
3861 								_tmp603_ = _tmp602_;
3862 								_tmp599_ = !_tmp603_;
3863 							}
3864 							if (_tmp599_) {
3865 								ValaSourceReference* _tmp604_;
3866 								ValaSourceReference* _tmp605_;
3867 								gchar* _tmp606_;
3868 								gchar* _tmp607_;
3869 								ValaMethod* _tmp608_;
3870 								gchar* _tmp609_;
3871 								gchar* _tmp610_;
3872 								gchar* _tmp611_;
3873 								gchar* _tmp612_;
3874 								vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
3875 								_tmp604_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
3876 								_tmp605_ = _tmp604_;
3877 								_tmp606_ = vala_symbol_get_full_name ((ValaSymbol*) self);
3878 								_tmp607_ = _tmp606_;
3879 								_tmp608_ = base_method;
3880 								_tmp609_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp608_);
3881 								_tmp610_ = _tmp609_;
3882 								_tmp611_ = g_strdup_printf ("`%s' does not implement abstract method `%s'", _tmp607_, _tmp610_);
3883 								_tmp612_ = _tmp611_;
3884 								vala_report_error (_tmp605_, _tmp612_);
3885 								_g_free0 (_tmp612_);
3886 								_g_free0 (_tmp610_);
3887 								_g_free0 (_tmp607_);
3888 							}
3889 							_vala_code_node_unref0 (override_method);
3890 						}
3891 						_vala_code_node_unref0 (base_method);
3892 					}
3893 					_vala_iterable_unref0 (_base_method_list);
3894 				}
3895 				{
3896 					ValaList* _base_property_list = NULL;
3897 					ValaClass* _tmp613_;
3898 					ValaList* _tmp614_;
3899 					ValaList* _tmp615_;
3900 					gint _base_property_size = 0;
3901 					ValaList* _tmp616_;
3902 					gint _tmp617_;
3903 					gint _tmp618_;
3904 					gint _base_property_index = 0;
3905 					_tmp613_ = base_class;
3906 					_tmp614_ = vala_object_type_symbol_get_properties ((ValaObjectTypeSymbol*) _tmp613_);
3907 					_tmp615_ = _vala_iterable_ref0 (_tmp614_);
3908 					_base_property_list = _tmp615_;
3909 					_tmp616_ = _base_property_list;
3910 					_tmp617_ = vala_collection_get_size ((ValaCollection*) _tmp616_);
3911 					_tmp618_ = _tmp617_;
3912 					_base_property_size = _tmp618_;
3913 					_base_property_index = -1;
3914 					while (TRUE) {
3915 						gint _tmp619_;
3916 						gint _tmp620_;
3917 						ValaProperty* base_property = NULL;
3918 						ValaList* _tmp621_;
3919 						gpointer _tmp622_;
3920 						ValaProperty* _tmp623_;
3921 						gboolean _tmp624_;
3922 						gboolean _tmp625_;
3923 						_base_property_index = _base_property_index + 1;
3924 						_tmp619_ = _base_property_index;
3925 						_tmp620_ = _base_property_size;
3926 						if (!(_tmp619_ < _tmp620_)) {
3927 							break;
3928 						}
3929 						_tmp621_ = _base_property_list;
3930 						_tmp622_ = vala_list_get (_tmp621_, _base_property_index);
3931 						base_property = (ValaProperty*) _tmp622_;
3932 						_tmp623_ = base_property;
3933 						_tmp624_ = vala_property_get_is_abstract (_tmp623_);
3934 						_tmp625_ = _tmp624_;
3935 						if (_tmp625_) {
3936 							ValaProperty* override_property = NULL;
3937 							ValaProperty* _tmp626_;
3938 							const gchar* _tmp627_;
3939 							const gchar* _tmp628_;
3940 							ValaSymbol* _tmp629_;
3941 							ValaProperty* _tmp630_;
3942 							gboolean _tmp631_ = FALSE;
3943 							ValaProperty* _tmp632_;
3944 							_tmp626_ = base_property;
3945 							_tmp627_ = vala_symbol_get_name ((ValaSymbol*) _tmp626_);
3946 							_tmp628_ = _tmp627_;
3947 							_tmp629_ = vala_semantic_analyzer_symbol_lookup_inherited ((ValaSymbol*) self, _tmp628_);
3948 							_tmp630_ = VALA_IS_PROPERTY (_tmp629_) ? ((ValaProperty*) _tmp629_) : NULL;
3949 							if (_tmp630_ == NULL) {
3950 								_vala_code_node_unref0 (_tmp629_);
3951 							}
3952 							override_property = _tmp630_;
3953 							_tmp632_ = override_property;
3954 							if (_tmp632_ == NULL) {
3955 								_tmp631_ = TRUE;
3956 							} else {
3957 								ValaProperty* _tmp633_;
3958 								gboolean _tmp634_;
3959 								gboolean _tmp635_;
3960 								_tmp633_ = override_property;
3961 								_tmp634_ = vala_property_get_overrides (_tmp633_);
3962 								_tmp635_ = _tmp634_;
3963 								_tmp631_ = !_tmp635_;
3964 							}
3965 							if (_tmp631_) {
3966 								ValaSourceReference* _tmp636_;
3967 								ValaSourceReference* _tmp637_;
3968 								gchar* _tmp638_;
3969 								gchar* _tmp639_;
3970 								ValaProperty* _tmp640_;
3971 								gchar* _tmp641_;
3972 								gchar* _tmp642_;
3973 								gchar* _tmp643_;
3974 								gchar* _tmp644_;
3975 								vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
3976 								_tmp636_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
3977 								_tmp637_ = _tmp636_;
3978 								_tmp638_ = vala_symbol_get_full_name ((ValaSymbol*) self);
3979 								_tmp639_ = _tmp638_;
3980 								_tmp640_ = base_property;
3981 								_tmp641_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp640_);
3982 								_tmp642_ = _tmp641_;
3983 								_tmp643_ = g_strdup_printf ("`%s' does not implement abstract property `%s'", _tmp639_, _tmp642_);
3984 								_tmp644_ = _tmp643_;
3985 								vala_report_error (_tmp637_, _tmp644_);
3986 								_g_free0 (_tmp644_);
3987 								_g_free0 (_tmp642_);
3988 								_g_free0 (_tmp639_);
3989 							}
3990 							_vala_code_node_unref0 (override_property);
3991 						}
3992 						_vala_code_node_unref0 (base_property);
3993 					}
3994 					_vala_iterable_unref0 (_base_property_list);
3995 				}
3996 				_tmp645_ = base_class;
3997 				_tmp646_ = _tmp645_->priv->_base_class;
3998 				base_class = _tmp646_;
3999 			}
4000 		}
4001 	}
4002 	_tmp647_ = vala_code_context_get_analyzer (context);
4003 	_tmp648_ = _tmp647_;
4004 	_tmp649_ = old_source_file;
4005 	vala_semantic_analyzer_set_current_source_file (_tmp648_, _tmp649_);
4006 	_tmp650_ = vala_code_context_get_analyzer (context);
4007 	_tmp651_ = _tmp650_;
4008 	_tmp652_ = old_symbol;
4009 	vala_semantic_analyzer_set_current_symbol (_tmp651_, _tmp652_);
4010 	_tmp653_ = vala_code_node_get_error ((ValaCodeNode*) self);
4011 	_tmp654_ = _tmp653_;
4012 	result = !_tmp654_;
4013 	_vala_iterable_unref0 (missing_prereqs);
4014 	_vala_iterable_unref0 (prerequisites);
4015 	_vala_code_node_unref0 (old_symbol);
4016 	_vala_source_file_unref0 (old_source_file);
4017 	return result;
4018 }
4019 
4020 static void
vala_class_class_init(ValaClassClass * klass,gpointer klass_data)4021 vala_class_class_init (ValaClassClass * klass,
4022                        gpointer klass_data)
4023 {
4024 	vala_class_parent_class = g_type_class_peek_parent (klass);
4025 	((ValaCodeNodeClass *) klass)->finalize = vala_class_finalize;
4026 	g_type_class_adjust_private_offset (klass, &ValaClass_private_offset);
4027 	((ValaSymbolClass *) klass)->add_field = (void (*) (ValaSymbol*, ValaField*)) vala_class_real_add_field;
4028 	((ValaSymbolClass *) klass)->add_method = (void (*) (ValaSymbol*, ValaMethod*)) vala_class_real_add_method;
4029 	((ValaSymbolClass *) klass)->add_property = (void (*) (ValaSymbol*, ValaProperty*)) vala_class_real_add_property;
4030 	((ValaSymbolClass *) klass)->add_constructor = (void (*) (ValaSymbol*, ValaConstructor*)) vala_class_real_add_constructor;
4031 	((ValaSymbolClass *) klass)->add_destructor = (void (*) (ValaSymbol*, ValaDestructor*)) vala_class_real_add_destructor;
4032 	((ValaCodeNodeClass *) klass)->accept = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_class_real_accept;
4033 	((ValaCodeNodeClass *) klass)->accept_children = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_class_real_accept_children;
4034 	((ValaTypeSymbolClass *) klass)->is_reference_type = (gboolean (*) (ValaTypeSymbol*)) vala_class_real_is_reference_type;
4035 	((ValaTypeSymbolClass *) klass)->is_subtype_of = (gboolean (*) (ValaTypeSymbol*, ValaTypeSymbol*)) vala_class_real_is_subtype_of;
4036 	((ValaCodeNodeClass *) klass)->replace_type = (void (*) (ValaCodeNode*, ValaDataType*, ValaDataType*)) vala_class_real_replace_type;
4037 	((ValaCodeNodeClass *) klass)->check = (gboolean (*) (ValaCodeNode*, ValaCodeContext*)) vala_class_real_check;
4038 }
4039 
4040 static void
vala_class_instance_init(ValaClass * self,gpointer klass)4041 vala_class_instance_init (ValaClass * self,
4042                           gpointer klass)
4043 {
4044 	GEqualFunc _tmp0_;
4045 	ValaArrayList* _tmp1_;
4046 	GEqualFunc _tmp2_;
4047 	ValaHashMap* _tmp3_;
4048 	self->priv = vala_class_get_instance_private (self);
4049 	_tmp0_ = g_direct_equal;
4050 	_tmp1_ = vala_array_list_new (VALA_TYPE_DATA_TYPE, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp0_);
4051 	self->priv->base_types = (ValaList*) _tmp1_;
4052 	_tmp2_ = g_direct_equal;
4053 	_tmp3_ = vala_hash_map_new (VALA_TYPE_METHOD, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, VALA_TYPE_METHOD, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _vala_symbol_hash_func_ghash_func, _vala_symbol_equal_func_gequal_func, _tmp2_);
4054 	self->priv->implicit_implementations = _tmp3_;
4055 }
4056 
4057 static void
vala_class_finalize(ValaCodeNode * obj)4058 vala_class_finalize (ValaCodeNode * obj)
4059 {
4060 	ValaClass * self;
4061 	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_CLASS, ValaClass);
4062 	_vala_code_node_unref0 (self->priv->_base_class);
4063 	_g_free0 (self->priv->_is_compact);
4064 	_g_free0 (self->priv->_is_immutable);
4065 	_g_free0 (self->priv->_is_singleton);
4066 	_vala_iterable_unref0 (self->priv->base_types);
4067 	_vala_map_unref0 (self->priv->implicit_implementations);
4068 	_vala_code_node_unref0 (self->priv->_default_construction_method);
4069 	_vala_code_node_unref0 (self->priv->_constructor);
4070 	_vala_code_node_unref0 (self->priv->_class_constructor);
4071 	_vala_code_node_unref0 (self->priv->_static_constructor);
4072 	_vala_code_node_unref0 (self->priv->_destructor);
4073 	_vala_code_node_unref0 (self->priv->_class_destructor);
4074 	_vala_code_node_unref0 (self->priv->_static_destructor);
4075 	VALA_CODE_NODE_CLASS (vala_class_parent_class)->finalize (obj);
4076 }
4077 
4078 /**
4079  * Represents a class declaration in the source code.
4080  */
4081 static GType
vala_class_get_type_once(void)4082 vala_class_get_type_once (void)
4083 {
4084 	static const GTypeInfo g_define_type_info = { sizeof (ValaClassClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_class_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaClass), 0, (GInstanceInitFunc) vala_class_instance_init, NULL };
4085 	GType vala_class_type_id;
4086 	vala_class_type_id = g_type_register_static (VALA_TYPE_OBJECT_TYPE_SYMBOL, "ValaClass", &g_define_type_info, 0);
4087 	ValaClass_private_offset = g_type_add_instance_private (vala_class_type_id, sizeof (ValaClassPrivate));
4088 	return vala_class_type_id;
4089 }
4090 
4091 GType
vala_class_get_type(void)4092 vala_class_get_type (void)
4093 {
4094 	static volatile gsize vala_class_type_id__volatile = 0;
4095 	if (g_once_init_enter (&vala_class_type_id__volatile)) {
4096 		GType vala_class_type_id;
4097 		vala_class_type_id = vala_class_get_type_once ();
4098 		g_once_init_leave (&vala_class_type_id__volatile, vala_class_type_id);
4099 	}
4100 	return vala_class_type_id__volatile;
4101 }
4102 
4103