1 /* valafield.c generated by valac, the Vala compiler
2  * generated from valafield.vala, do not modify */
3 
4 /* valafield.vala
5  *
6  * Copyright (C) 2006-2010  Jürg Billeter
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12 
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17 
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
21  *
22  * Author:
23  * 	Jürg Billeter <j@bitron.ch>
24  */
25 
26 #include "vala.h"
27 #include <glib.h>
28 #include <stdlib.h>
29 #include <string.h>
30 
31 #define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
32 #define _vala_source_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_file_unref (var), NULL)))
33 #define _g_free0(var) (var = (g_free (var), NULL))
34 
35 struct _ValaFieldPrivate {
36 	ValaMemberBinding _binding;
37 	gboolean _is_volatile;
38 	gboolean _lock_used;
39 };
40 
41 static gint ValaField_private_offset;
42 static gpointer vala_field_parent_class = NULL;
43 static ValaLockableIface * vala_field_vala_lockable_parent_iface = NULL;
44 
45 static void vala_field_real_accept (ValaCodeNode* base,
46                              ValaCodeVisitor* visitor);
47 static void vala_field_real_accept_children (ValaCodeNode* base,
48                                       ValaCodeVisitor* visitor);
49 static void vala_field_real_replace_expression (ValaCodeNode* base,
50                                          ValaExpression* old_node,
51                                          ValaExpression* new_node);
52 static void vala_field_real_replace_type (ValaCodeNode* base,
53                                    ValaDataType* old_type,
54                                    ValaDataType* new_type);
55 static gboolean vala_field_real_check (ValaCodeNode* base,
56                                 ValaCodeContext* context);
57 static void vala_field_finalize (ValaCodeNode * obj);
58 static GType vala_field_get_type_once (void);
59 
60 static inline gpointer
vala_field_get_instance_private(ValaField * self)61 vala_field_get_instance_private (ValaField* self)
62 {
63 	return G_STRUCT_MEMBER_P (self, ValaField_private_offset);
64 }
65 
66 ValaMemberBinding
vala_field_get_binding(ValaField * self)67 vala_field_get_binding (ValaField* self)
68 {
69 	ValaMemberBinding result;
70 	ValaMemberBinding _tmp0_;
71 	g_return_val_if_fail (self != NULL, 0);
72 	_tmp0_ = self->priv->_binding;
73 	result = _tmp0_;
74 	return result;
75 }
76 
77 void
vala_field_set_binding(ValaField * self,ValaMemberBinding value)78 vala_field_set_binding (ValaField* self,
79                         ValaMemberBinding value)
80 {
81 	g_return_if_fail (self != NULL);
82 	self->priv->_binding = value;
83 }
84 
85 gboolean
vala_field_get_is_volatile(ValaField * self)86 vala_field_get_is_volatile (ValaField* self)
87 {
88 	gboolean result;
89 	g_return_val_if_fail (self != NULL, FALSE);
90 	result = self->priv->_is_volatile;
91 	return result;
92 }
93 
94 void
vala_field_set_is_volatile(ValaField * self,gboolean value)95 vala_field_set_is_volatile (ValaField* self,
96                             gboolean value)
97 {
98 	g_return_if_fail (self != NULL);
99 	self->priv->_is_volatile = value;
100 }
101 
102 static gboolean
vala_field_real_get_lock_used(ValaLockable * base)103 vala_field_real_get_lock_used (ValaLockable* base)
104 {
105 	gboolean result;
106 	ValaField* self;
107 	self = (ValaField*) base;
108 	result = self->priv->_lock_used;
109 	return result;
110 }
111 
112 static void
vala_field_real_set_lock_used(ValaLockable * base,gboolean value)113 vala_field_real_set_lock_used (ValaLockable* base,
114                                gboolean value)
115 {
116 	ValaField* self;
117 	self = (ValaField*) base;
118 	self->priv->_lock_used = value;
119 }
120 
121 /**
122  * Creates a new field.
123  *
124  * @param name              field name
125  * @param variable_type     field type
126  * @param initializer       initializer expression
127  * @param source_reference  reference to source code
128  * @return                  newly created field
129  */
130 ValaField*
vala_field_construct(GType object_type,const gchar * name,ValaDataType * variable_type,ValaExpression * initializer,ValaSourceReference * source_reference,ValaComment * comment)131 vala_field_construct (GType object_type,
132                       const gchar* name,
133                       ValaDataType* variable_type,
134                       ValaExpression* initializer,
135                       ValaSourceReference* source_reference,
136                       ValaComment* comment)
137 {
138 	ValaField* self = NULL;
139 	g_return_val_if_fail (name != NULL, NULL);
140 	g_return_val_if_fail (variable_type != NULL, NULL);
141 	self = (ValaField*) vala_variable_construct (object_type, variable_type, name, initializer, source_reference, comment);
142 	return self;
143 }
144 
145 ValaField*
vala_field_new(const gchar * name,ValaDataType * variable_type,ValaExpression * initializer,ValaSourceReference * source_reference,ValaComment * comment)146 vala_field_new (const gchar* name,
147                 ValaDataType* variable_type,
148                 ValaExpression* initializer,
149                 ValaSourceReference* source_reference,
150                 ValaComment* comment)
151 {
152 	return vala_field_construct (VALA_TYPE_FIELD, name, variable_type, initializer, source_reference, comment);
153 }
154 
155 static void
vala_field_real_accept(ValaCodeNode * base,ValaCodeVisitor * visitor)156 vala_field_real_accept (ValaCodeNode* base,
157                         ValaCodeVisitor* visitor)
158 {
159 	ValaField * self;
160 	self = (ValaField*) base;
161 	g_return_if_fail (visitor != NULL);
162 	vala_code_visitor_visit_field (visitor, self);
163 }
164 
165 static void
vala_field_real_accept_children(ValaCodeNode * base,ValaCodeVisitor * visitor)166 vala_field_real_accept_children (ValaCodeNode* base,
167                                  ValaCodeVisitor* visitor)
168 {
169 	ValaField * self;
170 	ValaDataType* _tmp0_;
171 	ValaDataType* _tmp1_;
172 	ValaExpression* _tmp2_;
173 	ValaExpression* _tmp3_;
174 	self = (ValaField*) base;
175 	g_return_if_fail (visitor != NULL);
176 	_tmp0_ = vala_variable_get_variable_type ((ValaVariable*) self);
177 	_tmp1_ = _tmp0_;
178 	vala_code_node_accept ((ValaCodeNode*) _tmp1_, visitor);
179 	_tmp2_ = vala_variable_get_initializer ((ValaVariable*) self);
180 	_tmp3_ = _tmp2_;
181 	if (_tmp3_ != NULL) {
182 		ValaExpression* _tmp4_;
183 		ValaExpression* _tmp5_;
184 		_tmp4_ = vala_variable_get_initializer ((ValaVariable*) self);
185 		_tmp5_ = _tmp4_;
186 		vala_code_node_accept ((ValaCodeNode*) _tmp5_, visitor);
187 	}
188 }
189 
190 static void
vala_field_real_replace_expression(ValaCodeNode * base,ValaExpression * old_node,ValaExpression * new_node)191 vala_field_real_replace_expression (ValaCodeNode* base,
192                                     ValaExpression* old_node,
193                                     ValaExpression* new_node)
194 {
195 	ValaField * self;
196 	ValaExpression* _tmp0_;
197 	ValaExpression* _tmp1_;
198 	self = (ValaField*) base;
199 	g_return_if_fail (old_node != NULL);
200 	g_return_if_fail (new_node != NULL);
201 	_tmp0_ = vala_variable_get_initializer ((ValaVariable*) self);
202 	_tmp1_ = _tmp0_;
203 	if (_tmp1_ == old_node) {
204 		vala_variable_set_initializer ((ValaVariable*) self, new_node);
205 	}
206 }
207 
208 static void
vala_field_real_replace_type(ValaCodeNode * base,ValaDataType * old_type,ValaDataType * new_type)209 vala_field_real_replace_type (ValaCodeNode* base,
210                               ValaDataType* old_type,
211                               ValaDataType* new_type)
212 {
213 	ValaField * self;
214 	ValaDataType* _tmp0_;
215 	ValaDataType* _tmp1_;
216 	self = (ValaField*) base;
217 	g_return_if_fail (old_type != NULL);
218 	g_return_if_fail (new_type != NULL);
219 	_tmp0_ = vala_variable_get_variable_type ((ValaVariable*) self);
220 	_tmp1_ = _tmp0_;
221 	if (_tmp1_ == old_type) {
222 		vala_variable_set_variable_type ((ValaVariable*) self, new_type);
223 	}
224 }
225 
226 static gpointer
_vala_source_file_ref0(gpointer self)227 _vala_source_file_ref0 (gpointer self)
228 {
229 	return self ? vala_source_file_ref (self) : NULL;
230 }
231 
232 static gpointer
_vala_code_node_ref0(gpointer self)233 _vala_code_node_ref0 (gpointer self)
234 {
235 	return self ? vala_code_node_ref (self) : NULL;
236 }
237 
238 static gboolean
vala_field_real_check(ValaCodeNode * base,ValaCodeContext * context)239 vala_field_real_check (ValaCodeNode* base,
240                        ValaCodeContext* context)
241 {
242 	ValaField * self;
243 	gboolean _tmp0_;
244 	gboolean _tmp1_;
245 	ValaSourceFile* old_source_file = NULL;
246 	ValaSemanticAnalyzer* _tmp4_;
247 	ValaSemanticAnalyzer* _tmp5_;
248 	ValaSourceFile* _tmp6_;
249 	ValaSourceFile* _tmp7_;
250 	ValaSourceFile* _tmp8_;
251 	ValaSymbol* old_symbol = NULL;
252 	ValaSemanticAnalyzer* _tmp9_;
253 	ValaSemanticAnalyzer* _tmp10_;
254 	ValaSymbol* _tmp11_;
255 	ValaSymbol* _tmp12_;
256 	ValaSymbol* _tmp13_;
257 	ValaSourceReference* _tmp14_;
258 	ValaSourceReference* _tmp15_;
259 	ValaSemanticAnalyzer* _tmp22_;
260 	ValaSemanticAnalyzer* _tmp23_;
261 	ValaDataType* _tmp24_;
262 	ValaDataType* _tmp25_;
263 	ValaDataType* _tmp28_;
264 	ValaDataType* _tmp29_;
265 	ValaTypeSymbol* _tmp30_;
266 	ValaTypeSymbol* _tmp31_;
267 	ValaSemanticAnalyzer* _tmp32_;
268 	ValaSemanticAnalyzer* _tmp33_;
269 	ValaDataType* _tmp34_;
270 	ValaTypeSymbol* _tmp35_;
271 	ValaTypeSymbol* _tmp36_;
272 	ValaDataType* _tmp47_;
273 	ValaDataType* _tmp48_;
274 	gboolean _tmp49_;
275 	gboolean _tmp50_;
276 	ValaSemanticAnalyzer* _tmp67_;
277 	ValaSemanticAnalyzer* _tmp68_;
278 	ValaDataType* _tmp69_;
279 	ValaDataType* _tmp70_;
280 	ValaArrayType* variable_array_type = NULL;
281 	ValaDataType* _tmp81_;
282 	ValaDataType* _tmp82_;
283 	gboolean _tmp83_ = FALSE;
284 	gboolean _tmp84_ = FALSE;
285 	gboolean _tmp85_ = FALSE;
286 	ValaArrayType* _tmp86_;
287 	gboolean _tmp98_ = FALSE;
288 	gboolean _tmp99_ = FALSE;
289 	ValaArrayType* _tmp100_;
290 	ValaExpression* _tmp109_;
291 	ValaExpression* _tmp110_;
292 	gboolean _tmp233_ = FALSE;
293 	ValaMemberBinding _tmp234_;
294 	gboolean field_in_header = FALSE;
295 	ValaSymbol* _tmp239_;
296 	ValaSymbol* _tmp240_;
297 	gboolean _tmp249_ = FALSE;
298 	gboolean _tmp250_ = FALSE;
299 	gboolean _tmp251_;
300 	gboolean _tmp252_;
301 	ValaSemanticAnalyzer* _tmp267_;
302 	ValaSemanticAnalyzer* _tmp268_;
303 	ValaSourceFile* _tmp269_;
304 	ValaSemanticAnalyzer* _tmp270_;
305 	ValaSemanticAnalyzer* _tmp271_;
306 	ValaSymbol* _tmp272_;
307 	gboolean _tmp273_;
308 	gboolean _tmp274_;
309 	gboolean result = FALSE;
310 	self = (ValaField*) base;
311 	g_return_val_if_fail (context != NULL, FALSE);
312 	_tmp0_ = vala_code_node_get_checked ((ValaCodeNode*) self);
313 	_tmp1_ = _tmp0_;
314 	if (_tmp1_) {
315 		gboolean _tmp2_;
316 		gboolean _tmp3_;
317 		_tmp2_ = vala_code_node_get_error ((ValaCodeNode*) self);
318 		_tmp3_ = _tmp2_;
319 		result = !_tmp3_;
320 		return result;
321 	}
322 	vala_code_node_set_checked ((ValaCodeNode*) self, TRUE);
323 	_tmp4_ = vala_code_context_get_analyzer (context);
324 	_tmp5_ = _tmp4_;
325 	_tmp6_ = vala_semantic_analyzer_get_current_source_file (_tmp5_);
326 	_tmp7_ = _tmp6_;
327 	_tmp8_ = _vala_source_file_ref0 (_tmp7_);
328 	old_source_file = _tmp8_;
329 	_tmp9_ = vala_code_context_get_analyzer (context);
330 	_tmp10_ = _tmp9_;
331 	_tmp11_ = vala_semantic_analyzer_get_current_symbol (_tmp10_);
332 	_tmp12_ = _tmp11_;
333 	_tmp13_ = _vala_code_node_ref0 (_tmp12_);
334 	old_symbol = _tmp13_;
335 	_tmp14_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
336 	_tmp15_ = _tmp14_;
337 	if (_tmp15_ != NULL) {
338 		ValaSemanticAnalyzer* _tmp16_;
339 		ValaSemanticAnalyzer* _tmp17_;
340 		ValaSourceReference* _tmp18_;
341 		ValaSourceReference* _tmp19_;
342 		ValaSourceFile* _tmp20_;
343 		ValaSourceFile* _tmp21_;
344 		_tmp16_ = vala_code_context_get_analyzer (context);
345 		_tmp17_ = _tmp16_;
346 		_tmp18_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
347 		_tmp19_ = _tmp18_;
348 		_tmp20_ = vala_source_reference_get_file (_tmp19_);
349 		_tmp21_ = _tmp20_;
350 		vala_semantic_analyzer_set_current_source_file (_tmp17_, _tmp21_);
351 	}
352 	_tmp22_ = vala_code_context_get_analyzer (context);
353 	_tmp23_ = _tmp22_;
354 	vala_semantic_analyzer_set_current_symbol (_tmp23_, (ValaSymbol*) self);
355 	_tmp24_ = vala_variable_get_variable_type ((ValaVariable*) self);
356 	_tmp25_ = _tmp24_;
357 	if (VALA_IS_VOID_TYPE (_tmp25_)) {
358 		ValaSourceReference* _tmp26_;
359 		ValaSourceReference* _tmp27_;
360 		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
361 		_tmp26_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
362 		_tmp27_ = _tmp26_;
363 		vala_report_error (_tmp27_, "'void' not supported as field type");
364 		result = FALSE;
365 		_vala_code_node_unref0 (old_symbol);
366 		_vala_source_file_unref0 (old_source_file);
367 		return result;
368 	}
369 	_tmp28_ = vala_variable_get_variable_type ((ValaVariable*) self);
370 	_tmp29_ = _tmp28_;
371 	_tmp30_ = vala_data_type_get_type_symbol (_tmp29_);
372 	_tmp31_ = _tmp30_;
373 	_tmp32_ = vala_code_context_get_analyzer (context);
374 	_tmp33_ = _tmp32_;
375 	_tmp34_ = _tmp33_->va_list_type;
376 	_tmp35_ = vala_data_type_get_type_symbol (_tmp34_);
377 	_tmp36_ = _tmp35_;
378 	if (_tmp31_ == _tmp36_) {
379 		ValaSourceReference* _tmp37_;
380 		ValaSourceReference* _tmp38_;
381 		ValaDataType* _tmp39_;
382 		ValaDataType* _tmp40_;
383 		ValaTypeSymbol* _tmp41_;
384 		ValaTypeSymbol* _tmp42_;
385 		gchar* _tmp43_;
386 		gchar* _tmp44_;
387 		gchar* _tmp45_;
388 		gchar* _tmp46_;
389 		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
390 		_tmp37_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
391 		_tmp38_ = _tmp37_;
392 		_tmp39_ = vala_variable_get_variable_type ((ValaVariable*) self);
393 		_tmp40_ = _tmp39_;
394 		_tmp41_ = vala_data_type_get_type_symbol (_tmp40_);
395 		_tmp42_ = _tmp41_;
396 		_tmp43_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp42_);
397 		_tmp44_ = _tmp43_;
398 		_tmp45_ = g_strdup_printf ("`%s' not supported as field type", _tmp44_);
399 		_tmp46_ = _tmp45_;
400 		vala_report_error (_tmp38_, _tmp46_);
401 		_g_free0 (_tmp46_);
402 		_g_free0 (_tmp44_);
403 		result = FALSE;
404 		_vala_code_node_unref0 (old_symbol);
405 		_vala_source_file_unref0 (old_source_file);
406 		return result;
407 	}
408 	_tmp47_ = vala_variable_get_variable_type ((ValaVariable*) self);
409 	_tmp48_ = _tmp47_;
410 	vala_code_node_check ((ValaCodeNode*) _tmp48_, context);
411 	_tmp49_ = vala_symbol_get_external_package ((ValaSymbol*) self);
412 	_tmp50_ = _tmp49_;
413 	if (!_tmp50_) {
414 		ValaSemanticAnalyzer* _tmp51_;
415 		ValaSemanticAnalyzer* _tmp52_;
416 		ValaDataType* _tmp53_;
417 		ValaDataType* _tmp54_;
418 		ValaDataType* _tmp55_;
419 		ValaDataType* _tmp56_;
420 		ValaTypeSymbol* _tmp57_;
421 		ValaTypeSymbol* _tmp58_;
422 		_tmp51_ = vala_code_context_get_analyzer (context);
423 		_tmp52_ = _tmp51_;
424 		_tmp53_ = vala_variable_get_variable_type ((ValaVariable*) self);
425 		_tmp54_ = _tmp53_;
426 		vala_semantic_analyzer_check_type (_tmp52_, _tmp54_);
427 		_tmp55_ = vala_variable_get_variable_type ((ValaVariable*) self);
428 		_tmp56_ = _tmp55_;
429 		_tmp57_ = vala_data_type_get_type_symbol (_tmp56_);
430 		_tmp58_ = _tmp57_;
431 		if (_tmp58_ != NULL) {
432 			ValaDataType* _tmp59_;
433 			ValaDataType* _tmp60_;
434 			ValaTypeSymbol* _tmp61_;
435 			ValaTypeSymbol* _tmp62_;
436 			ValaVersionAttribute* _tmp63_;
437 			ValaVersionAttribute* _tmp64_;
438 			ValaSourceReference* _tmp65_;
439 			ValaSourceReference* _tmp66_;
440 			_tmp59_ = vala_variable_get_variable_type ((ValaVariable*) self);
441 			_tmp60_ = _tmp59_;
442 			_tmp61_ = vala_data_type_get_type_symbol (_tmp60_);
443 			_tmp62_ = _tmp61_;
444 			_tmp63_ = vala_symbol_get_version ((ValaSymbol*) _tmp62_);
445 			_tmp64_ = _tmp63_;
446 			_tmp65_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
447 			_tmp66_ = _tmp65_;
448 			vala_version_attribute_check (_tmp64_, _tmp66_);
449 		}
450 	}
451 	_tmp67_ = vala_code_context_get_analyzer (context);
452 	_tmp68_ = _tmp67_;
453 	_tmp69_ = vala_variable_get_variable_type ((ValaVariable*) self);
454 	_tmp70_ = _tmp69_;
455 	if (!vala_semantic_analyzer_is_type_accessible (_tmp68_, (ValaSymbol*) self, _tmp70_)) {
456 		ValaSourceReference* _tmp71_;
457 		ValaSourceReference* _tmp72_;
458 		ValaDataType* _tmp73_;
459 		ValaDataType* _tmp74_;
460 		gchar* _tmp75_;
461 		gchar* _tmp76_;
462 		gchar* _tmp77_;
463 		gchar* _tmp78_;
464 		gchar* _tmp79_;
465 		gchar* _tmp80_;
466 		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
467 		_tmp71_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
468 		_tmp72_ = _tmp71_;
469 		_tmp73_ = vala_variable_get_variable_type ((ValaVariable*) self);
470 		_tmp74_ = _tmp73_;
471 		_tmp75_ = vala_code_node_to_string ((ValaCodeNode*) _tmp74_);
472 		_tmp76_ = _tmp75_;
473 		_tmp77_ = vala_symbol_get_full_name ((ValaSymbol*) self);
474 		_tmp78_ = _tmp77_;
475 		_tmp79_ = g_strdup_printf ("field type `%s' is less accessible than field `%s'", _tmp76_, _tmp78_);
476 		_tmp80_ = _tmp79_;
477 		vala_report_error (_tmp72_, _tmp80_);
478 		_g_free0 (_tmp80_);
479 		_g_free0 (_tmp78_);
480 		_g_free0 (_tmp76_);
481 		result = FALSE;
482 		_vala_code_node_unref0 (old_symbol);
483 		_vala_source_file_unref0 (old_source_file);
484 		return result;
485 	}
486 	_tmp81_ = vala_variable_get_variable_type ((ValaVariable*) self);
487 	_tmp82_ = _tmp81_;
488 	variable_array_type = VALA_IS_ARRAY_TYPE (_tmp82_) ? ((ValaArrayType*) _tmp82_) : NULL;
489 	_tmp86_ = variable_array_type;
490 	if (_tmp86_ != NULL) {
491 		ValaArrayType* _tmp87_;
492 		gboolean _tmp88_;
493 		gboolean _tmp89_;
494 		_tmp87_ = variable_array_type;
495 		_tmp88_ = vala_array_type_get_inline_allocated (_tmp87_);
496 		_tmp89_ = _tmp88_;
497 		_tmp85_ = _tmp89_;
498 	} else {
499 		_tmp85_ = FALSE;
500 	}
501 	if (_tmp85_) {
502 		ValaExpression* _tmp90_;
503 		ValaExpression* _tmp91_;
504 		_tmp90_ = vala_variable_get_initializer ((ValaVariable*) self);
505 		_tmp91_ = _tmp90_;
506 		_tmp84_ = VALA_IS_ARRAY_CREATION_EXPRESSION (_tmp91_);
507 	} else {
508 		_tmp84_ = FALSE;
509 	}
510 	if (_tmp84_) {
511 		ValaExpression* _tmp92_;
512 		ValaExpression* _tmp93_;
513 		ValaInitializerList* _tmp94_;
514 		ValaInitializerList* _tmp95_;
515 		_tmp92_ = vala_variable_get_initializer ((ValaVariable*) self);
516 		_tmp93_ = _tmp92_;
517 		_tmp94_ = vala_array_creation_expression_get_initializer_list (G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, VALA_TYPE_ARRAY_CREATION_EXPRESSION, ValaArrayCreationExpression));
518 		_tmp95_ = _tmp94_;
519 		_tmp83_ = _tmp95_ == NULL;
520 	} else {
521 		_tmp83_ = FALSE;
522 	}
523 	if (_tmp83_) {
524 		ValaSourceReference* _tmp96_;
525 		ValaSourceReference* _tmp97_;
526 		_tmp96_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
527 		_tmp97_ = _tmp96_;
528 		vala_report_warning (_tmp97_, "Inline allocated arrays don't require an explicit instantiation");
529 		vala_variable_set_initializer ((ValaVariable*) self, NULL);
530 	}
531 	_tmp100_ = variable_array_type;
532 	if (_tmp100_ != NULL) {
533 		ValaArrayType* _tmp101_;
534 		gboolean _tmp102_;
535 		gboolean _tmp103_;
536 		_tmp101_ = variable_array_type;
537 		_tmp102_ = vala_array_type_get_inline_allocated (_tmp101_);
538 		_tmp103_ = _tmp102_;
539 		_tmp99_ = _tmp103_;
540 	} else {
541 		_tmp99_ = FALSE;
542 	}
543 	if (_tmp99_) {
544 		ValaArrayType* _tmp104_;
545 		gboolean _tmp105_;
546 		gboolean _tmp106_;
547 		_tmp104_ = variable_array_type;
548 		_tmp105_ = vala_array_type_get_fixed_length (_tmp104_);
549 		_tmp106_ = _tmp105_;
550 		_tmp98_ = !_tmp106_;
551 	} else {
552 		_tmp98_ = FALSE;
553 	}
554 	if (_tmp98_) {
555 		ValaSourceReference* _tmp107_;
556 		ValaSourceReference* _tmp108_;
557 		_tmp107_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
558 		_tmp108_ = _tmp107_;
559 		vala_report_error (_tmp108_, "Inline allocated array as field requires to have fixed length");
560 	}
561 	_tmp109_ = vala_variable_get_initializer ((ValaVariable*) self);
562 	_tmp110_ = _tmp109_;
563 	if (_tmp110_ != NULL) {
564 		ValaExpression* _tmp111_;
565 		ValaExpression* _tmp112_;
566 		ValaDataType* _tmp113_;
567 		ValaDataType* _tmp114_;
568 		gboolean is_initializer_list = FALSE;
569 		gint initializer_size = 0;
570 		ValaExpression* _tmp115_;
571 		ValaExpression* _tmp116_;
572 		ValaExpression* _tmp121_;
573 		ValaExpression* _tmp122_;
574 		ValaExpression* _tmp123_;
575 		ValaExpression* _tmp124_;
576 		ValaDataType* _tmp125_;
577 		ValaDataType* _tmp126_;
578 		ValaExpression* _tmp129_;
579 		ValaExpression* _tmp130_;
580 		ValaDataType* _tmp131_;
581 		ValaDataType* _tmp132_;
582 		ValaDataType* _tmp133_;
583 		ValaDataType* _tmp134_;
584 		gboolean _tmp149_ = FALSE;
585 		gboolean _tmp150_ = FALSE;
586 		gboolean _tmp151_ = FALSE;
587 		ValaArrayType* _tmp152_;
588 		gboolean _tmp166_ = FALSE;
589 		gboolean _tmp167_ = FALSE;
590 		ValaArrayType* _tmp168_;
591 		ValaExpression* _tmp178_;
592 		ValaExpression* _tmp179_;
593 		ValaDataType* _tmp180_;
594 		ValaDataType* _tmp181_;
595 		gboolean _tmp191_ = FALSE;
596 		ValaSymbol* _tmp192_;
597 		ValaSymbol* _tmp193_;
598 		gboolean _tmp198_ = FALSE;
599 		gboolean _tmp199_ = FALSE;
600 		ValaSymbol* _tmp200_;
601 		ValaSymbol* _tmp201_;
602 		gboolean _tmp215_ = FALSE;
603 		gboolean _tmp216_ = FALSE;
604 		gboolean _tmp217_ = FALSE;
605 		ValaMemberBinding _tmp218_;
606 		gboolean _tmp229_;
607 		gboolean _tmp230_;
608 		_tmp111_ = vala_variable_get_initializer ((ValaVariable*) self);
609 		_tmp112_ = _tmp111_;
610 		_tmp113_ = vala_variable_get_variable_type ((ValaVariable*) self);
611 		_tmp114_ = _tmp113_;
612 		vala_expression_set_target_type (_tmp112_, _tmp114_);
613 		is_initializer_list = FALSE;
614 		initializer_size = -1;
615 		_tmp115_ = vala_variable_get_initializer ((ValaVariable*) self);
616 		_tmp116_ = _tmp115_;
617 		if (VALA_IS_INITIALIZER_LIST (_tmp116_)) {
618 			ValaExpression* _tmp117_;
619 			ValaExpression* _tmp118_;
620 			gint _tmp119_;
621 			gint _tmp120_;
622 			_tmp117_ = vala_variable_get_initializer ((ValaVariable*) self);
623 			_tmp118_ = _tmp117_;
624 			_tmp119_ = vala_initializer_list_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp118_, VALA_TYPE_INITIALIZER_LIST, ValaInitializerList));
625 			_tmp120_ = _tmp119_;
626 			initializer_size = _tmp120_;
627 			is_initializer_list = TRUE;
628 		}
629 		_tmp121_ = vala_variable_get_initializer ((ValaVariable*) self);
630 		_tmp122_ = _tmp121_;
631 		if (!vala_code_node_check ((ValaCodeNode*) _tmp122_, context)) {
632 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
633 			result = FALSE;
634 			_vala_code_node_unref0 (old_symbol);
635 			_vala_source_file_unref0 (old_source_file);
636 			return result;
637 		}
638 		_tmp123_ = vala_variable_get_initializer ((ValaVariable*) self);
639 		_tmp124_ = _tmp123_;
640 		_tmp125_ = vala_expression_get_value_type (_tmp124_);
641 		_tmp126_ = _tmp125_;
642 		if (_tmp126_ == NULL) {
643 			ValaSourceReference* _tmp127_;
644 			ValaSourceReference* _tmp128_;
645 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
646 			_tmp127_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
647 			_tmp128_ = _tmp127_;
648 			vala_report_error (_tmp128_, "expression type not allowed as initializer");
649 			result = FALSE;
650 			_vala_code_node_unref0 (old_symbol);
651 			_vala_source_file_unref0 (old_source_file);
652 			return result;
653 		}
654 		_tmp129_ = vala_variable_get_initializer ((ValaVariable*) self);
655 		_tmp130_ = _tmp129_;
656 		_tmp131_ = vala_expression_get_value_type (_tmp130_);
657 		_tmp132_ = _tmp131_;
658 		_tmp133_ = vala_variable_get_variable_type ((ValaVariable*) self);
659 		_tmp134_ = _tmp133_;
660 		if (!vala_data_type_compatible (_tmp132_, _tmp134_)) {
661 			ValaSourceReference* _tmp135_;
662 			ValaSourceReference* _tmp136_;
663 			ValaExpression* _tmp137_;
664 			ValaExpression* _tmp138_;
665 			ValaDataType* _tmp139_;
666 			ValaDataType* _tmp140_;
667 			gchar* _tmp141_;
668 			gchar* _tmp142_;
669 			ValaDataType* _tmp143_;
670 			ValaDataType* _tmp144_;
671 			gchar* _tmp145_;
672 			gchar* _tmp146_;
673 			gchar* _tmp147_;
674 			gchar* _tmp148_;
675 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
676 			_tmp135_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
677 			_tmp136_ = _tmp135_;
678 			_tmp137_ = vala_variable_get_initializer ((ValaVariable*) self);
679 			_tmp138_ = _tmp137_;
680 			_tmp139_ = vala_expression_get_value_type (_tmp138_);
681 			_tmp140_ = _tmp139_;
682 			_tmp141_ = vala_code_node_to_string ((ValaCodeNode*) _tmp140_);
683 			_tmp142_ = _tmp141_;
684 			_tmp143_ = vala_variable_get_variable_type ((ValaVariable*) self);
685 			_tmp144_ = _tmp143_;
686 			_tmp145_ = vala_code_node_to_string ((ValaCodeNode*) _tmp144_);
687 			_tmp146_ = _tmp145_;
688 			_tmp147_ = g_strdup_printf ("Cannot convert from `%s' to `%s'", _tmp142_, _tmp146_);
689 			_tmp148_ = _tmp147_;
690 			vala_report_error (_tmp136_, _tmp148_);
691 			_g_free0 (_tmp148_);
692 			_g_free0 (_tmp146_);
693 			_g_free0 (_tmp142_);
694 			result = FALSE;
695 			_vala_code_node_unref0 (old_symbol);
696 			_vala_source_file_unref0 (old_source_file);
697 			return result;
698 		}
699 		_tmp152_ = variable_array_type;
700 		if (_tmp152_ != NULL) {
701 			ValaArrayType* _tmp153_;
702 			gboolean _tmp154_;
703 			gboolean _tmp155_;
704 			_tmp153_ = variable_array_type;
705 			_tmp154_ = vala_array_type_get_inline_allocated (_tmp153_);
706 			_tmp155_ = _tmp154_;
707 			_tmp151_ = _tmp155_;
708 		} else {
709 			_tmp151_ = FALSE;
710 		}
711 		if (_tmp151_) {
712 			ValaArrayType* _tmp156_;
713 			gboolean _tmp157_;
714 			gboolean _tmp158_;
715 			_tmp156_ = variable_array_type;
716 			_tmp157_ = vala_array_type_get_fixed_length (_tmp156_);
717 			_tmp158_ = _tmp157_;
718 			_tmp150_ = !_tmp158_;
719 		} else {
720 			_tmp150_ = FALSE;
721 		}
722 		if (_tmp150_) {
723 			_tmp149_ = is_initializer_list;
724 		} else {
725 			_tmp149_ = FALSE;
726 		}
727 		if (_tmp149_) {
728 			ValaArrayType* _tmp159_;
729 			gchar* _tmp160_;
730 			gchar* _tmp161_;
731 			ValaIntegerLiteral* _tmp162_;
732 			ValaIntegerLiteral* _tmp163_;
733 			ValaArrayType* _tmp164_;
734 			ValaArrayType* _tmp165_;
735 			_tmp159_ = variable_array_type;
736 			_tmp160_ = g_strdup_printf ("%i", initializer_size);
737 			_tmp161_ = _tmp160_;
738 			_tmp162_ = vala_integer_literal_new (_tmp161_, NULL);
739 			_tmp163_ = _tmp162_;
740 			vala_array_type_set_length (_tmp159_, (ValaExpression*) _tmp163_);
741 			_vala_code_node_unref0 (_tmp163_);
742 			_g_free0 (_tmp161_);
743 			_tmp164_ = variable_array_type;
744 			vala_array_type_set_fixed_length (_tmp164_, TRUE);
745 			_tmp165_ = variable_array_type;
746 			vala_data_type_set_nullable ((ValaDataType*) _tmp165_, FALSE);
747 		}
748 		_tmp168_ = variable_array_type;
749 		if (_tmp168_ != NULL) {
750 			ValaArrayType* _tmp169_;
751 			gboolean _tmp170_;
752 			gboolean _tmp171_;
753 			_tmp169_ = variable_array_type;
754 			_tmp170_ = vala_array_type_get_inline_allocated (_tmp169_);
755 			_tmp171_ = _tmp170_;
756 			_tmp167_ = _tmp171_;
757 		} else {
758 			_tmp167_ = FALSE;
759 		}
760 		if (_tmp167_) {
761 			ValaExpression* _tmp172_;
762 			ValaExpression* _tmp173_;
763 			ValaDataType* _tmp174_;
764 			ValaDataType* _tmp175_;
765 			_tmp172_ = vala_variable_get_initializer ((ValaVariable*) self);
766 			_tmp173_ = _tmp172_;
767 			_tmp174_ = vala_expression_get_value_type (_tmp173_);
768 			_tmp175_ = _tmp174_;
769 			_tmp166_ = !VALA_IS_ARRAY_TYPE (_tmp175_);
770 		} else {
771 			_tmp166_ = FALSE;
772 		}
773 		if (_tmp166_) {
774 			ValaSourceReference* _tmp176_;
775 			ValaSourceReference* _tmp177_;
776 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
777 			_tmp176_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
778 			_tmp177_ = _tmp176_;
779 			vala_report_error (_tmp177_, "only arrays are allowed as initializer for arrays with fixed length");
780 			result = FALSE;
781 			_vala_code_node_unref0 (old_symbol);
782 			_vala_source_file_unref0 (old_source_file);
783 			return result;
784 		}
785 		_tmp178_ = vala_variable_get_initializer ((ValaVariable*) self);
786 		_tmp179_ = _tmp178_;
787 		_tmp180_ = vala_expression_get_value_type (_tmp179_);
788 		_tmp181_ = _tmp180_;
789 		if (vala_data_type_is_disposable (_tmp181_)) {
790 			gboolean _tmp182_ = FALSE;
791 			ValaDataType* _tmp183_;
792 			ValaDataType* _tmp184_;
793 			_tmp183_ = vala_variable_get_variable_type ((ValaVariable*) self);
794 			_tmp184_ = _tmp183_;
795 			if (!VALA_IS_POINTER_TYPE (_tmp184_)) {
796 				ValaDataType* _tmp185_;
797 				ValaDataType* _tmp186_;
798 				gboolean _tmp187_;
799 				gboolean _tmp188_;
800 				_tmp185_ = vala_variable_get_variable_type ((ValaVariable*) self);
801 				_tmp186_ = _tmp185_;
802 				_tmp187_ = vala_data_type_get_value_owned (_tmp186_);
803 				_tmp188_ = _tmp187_;
804 				_tmp182_ = !_tmp188_;
805 			} else {
806 				_tmp182_ = FALSE;
807 			}
808 			if (_tmp182_) {
809 				ValaSourceReference* _tmp189_;
810 				ValaSourceReference* _tmp190_;
811 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
812 				_tmp189_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
813 				_tmp190_ = _tmp189_;
814 				vala_report_error (_tmp190_, "Invalid assignment from owned expression to unowned variable");
815 				result = FALSE;
816 				_vala_code_node_unref0 (old_symbol);
817 				_vala_source_file_unref0 (old_source_file);
818 				return result;
819 			}
820 		}
821 		_tmp192_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
822 		_tmp193_ = _tmp192_;
823 		if (VALA_IS_NAMESPACE (_tmp193_)) {
824 			ValaExpression* _tmp194_;
825 			ValaExpression* _tmp195_;
826 			_tmp194_ = vala_variable_get_initializer ((ValaVariable*) self);
827 			_tmp195_ = _tmp194_;
828 			_tmp191_ = !vala_expression_is_constant (_tmp195_);
829 		} else {
830 			_tmp191_ = FALSE;
831 		}
832 		if (_tmp191_) {
833 			ValaSourceReference* _tmp196_;
834 			ValaSourceReference* _tmp197_;
835 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
836 			_tmp196_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
837 			_tmp197_ = _tmp196_;
838 			vala_report_error (_tmp197_, "Non-constant field initializers not supported in this context");
839 			result = FALSE;
840 			_vala_code_node_unref0 (old_symbol);
841 			_vala_source_file_unref0 (old_source_file);
842 			return result;
843 		}
844 		_tmp200_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
845 		_tmp201_ = _tmp200_;
846 		if (VALA_IS_NAMESPACE (_tmp201_)) {
847 			ValaExpression* _tmp202_;
848 			ValaExpression* _tmp203_;
849 			_tmp202_ = vala_variable_get_initializer ((ValaVariable*) self);
850 			_tmp203_ = _tmp202_;
851 			_tmp199_ = vala_expression_is_constant (_tmp203_);
852 		} else {
853 			_tmp199_ = FALSE;
854 		}
855 		if (_tmp199_) {
856 			ValaExpression* _tmp204_;
857 			ValaExpression* _tmp205_;
858 			_tmp204_ = vala_variable_get_initializer ((ValaVariable*) self);
859 			_tmp205_ = _tmp204_;
860 			_tmp198_ = vala_expression_is_non_null (_tmp205_);
861 		} else {
862 			_tmp198_ = FALSE;
863 		}
864 		if (_tmp198_) {
865 			gboolean _tmp206_ = FALSE;
866 			ValaDataType* _tmp207_;
867 			ValaDataType* _tmp208_;
868 			_tmp207_ = vala_variable_get_variable_type ((ValaVariable*) self);
869 			_tmp208_ = _tmp207_;
870 			if (vala_data_type_is_disposable (_tmp208_)) {
871 				ValaDataType* _tmp209_;
872 				ValaDataType* _tmp210_;
873 				gboolean _tmp211_;
874 				gboolean _tmp212_;
875 				_tmp209_ = vala_variable_get_variable_type ((ValaVariable*) self);
876 				_tmp210_ = _tmp209_;
877 				_tmp211_ = vala_data_type_get_value_owned (_tmp210_);
878 				_tmp212_ = _tmp211_;
879 				_tmp206_ = _tmp212_;
880 			} else {
881 				_tmp206_ = FALSE;
882 			}
883 			if (_tmp206_) {
884 				ValaSourceReference* _tmp213_;
885 				ValaSourceReference* _tmp214_;
886 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
887 				_tmp213_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
888 				_tmp214_ = _tmp213_;
889 				vala_report_error (_tmp214_, "Owned namespace fields can only be initialized in a function or method");
890 				result = FALSE;
891 				_vala_code_node_unref0 (old_symbol);
892 				_vala_source_file_unref0 (old_source_file);
893 				return result;
894 			}
895 		}
896 		_tmp218_ = self->priv->_binding;
897 		if (_tmp218_ == VALA_MEMBER_BINDING_STATIC) {
898 			ValaSymbol* _tmp219_;
899 			ValaSymbol* _tmp220_;
900 			_tmp219_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
901 			_tmp220_ = _tmp219_;
902 			_tmp217_ = VALA_IS_CLASS (_tmp220_);
903 		} else {
904 			_tmp217_ = FALSE;
905 		}
906 		if (_tmp217_) {
907 			ValaSymbol* _tmp221_;
908 			ValaSymbol* _tmp222_;
909 			gboolean _tmp223_;
910 			gboolean _tmp224_;
911 			_tmp221_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
912 			_tmp222_ = _tmp221_;
913 			_tmp223_ = vala_class_get_is_compact (G_TYPE_CHECK_INSTANCE_CAST (_tmp222_, VALA_TYPE_CLASS, ValaClass));
914 			_tmp224_ = _tmp223_;
915 			_tmp216_ = _tmp224_;
916 		} else {
917 			_tmp216_ = FALSE;
918 		}
919 		if (_tmp216_) {
920 			ValaExpression* _tmp225_;
921 			ValaExpression* _tmp226_;
922 			_tmp225_ = vala_variable_get_initializer ((ValaVariable*) self);
923 			_tmp226_ = _tmp225_;
924 			_tmp215_ = !vala_expression_is_constant (_tmp226_);
925 		} else {
926 			_tmp215_ = FALSE;
927 		}
928 		if (_tmp215_) {
929 			ValaSourceReference* _tmp227_;
930 			ValaSourceReference* _tmp228_;
931 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
932 			_tmp227_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
933 			_tmp228_ = _tmp227_;
934 			vala_report_error (_tmp228_, "Static fields in compact classes cannot have non-constant initializers");
935 			result = FALSE;
936 			_vala_code_node_unref0 (old_symbol);
937 			_vala_source_file_unref0 (old_source_file);
938 			return result;
939 		}
940 		_tmp229_ = vala_symbol_get_external ((ValaSymbol*) self);
941 		_tmp230_ = _tmp229_;
942 		if (_tmp230_) {
943 			ValaSourceReference* _tmp231_;
944 			ValaSourceReference* _tmp232_;
945 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
946 			_tmp231_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
947 			_tmp232_ = _tmp231_;
948 			vala_report_error (_tmp232_, "External fields cannot use initializers");
949 		}
950 	}
951 	_tmp234_ = self->priv->_binding;
952 	if (_tmp234_ == VALA_MEMBER_BINDING_INSTANCE) {
953 		ValaSymbol* _tmp235_;
954 		ValaSymbol* _tmp236_;
955 		_tmp235_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
956 		_tmp236_ = _tmp235_;
957 		_tmp233_ = VALA_IS_INTERFACE (_tmp236_);
958 	} else {
959 		_tmp233_ = FALSE;
960 	}
961 	if (_tmp233_) {
962 		ValaSourceReference* _tmp237_;
963 		ValaSourceReference* _tmp238_;
964 		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
965 		_tmp237_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
966 		_tmp238_ = _tmp237_;
967 		vala_report_error (_tmp238_, "Interfaces may not have instance fields");
968 		result = FALSE;
969 		_vala_code_node_unref0 (old_symbol);
970 		_vala_source_file_unref0 (old_source_file);
971 		return result;
972 	}
973 	field_in_header = !vala_symbol_is_internal_symbol ((ValaSymbol*) self);
974 	_tmp239_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
975 	_tmp240_ = _tmp239_;
976 	if (VALA_IS_CLASS (_tmp240_)) {
977 		ValaClass* cl = NULL;
978 		ValaSymbol* _tmp241_;
979 		ValaSymbol* _tmp242_;
980 		ValaClass* _tmp243_;
981 		gboolean _tmp244_ = FALSE;
982 		ValaClass* _tmp245_;
983 		gboolean _tmp246_;
984 		gboolean _tmp247_;
985 		_tmp241_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
986 		_tmp242_ = _tmp241_;
987 		_tmp243_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp242_, VALA_TYPE_CLASS, ValaClass));
988 		cl = _tmp243_;
989 		_tmp245_ = cl;
990 		_tmp246_ = vala_class_get_is_compact (_tmp245_);
991 		_tmp247_ = _tmp246_;
992 		if (_tmp247_) {
993 			ValaClass* _tmp248_;
994 			_tmp248_ = cl;
995 			_tmp244_ = !vala_symbol_is_internal_symbol ((ValaSymbol*) _tmp248_);
996 		} else {
997 			_tmp244_ = FALSE;
998 		}
999 		if (_tmp244_) {
1000 			field_in_header = TRUE;
1001 		}
1002 		_vala_code_node_unref0 (cl);
1003 	}
1004 	_tmp251_ = vala_symbol_get_external_package ((ValaSymbol*) self);
1005 	_tmp252_ = _tmp251_;
1006 	if (!_tmp252_) {
1007 		gboolean _tmp253_;
1008 		gboolean _tmp254_;
1009 		_tmp253_ = vala_symbol_get_hides ((ValaSymbol*) self);
1010 		_tmp254_ = _tmp253_;
1011 		_tmp250_ = !_tmp254_;
1012 	} else {
1013 		_tmp250_ = FALSE;
1014 	}
1015 	if (_tmp250_) {
1016 		ValaSymbol* _tmp255_;
1017 		ValaSymbol* _tmp256_;
1018 		_tmp255_ = vala_symbol_get_hidden_member ((ValaSymbol*) self);
1019 		_tmp256_ = _tmp255_;
1020 		_tmp249_ = _tmp256_ != NULL;
1021 		_vala_code_node_unref0 (_tmp256_);
1022 	} else {
1023 		_tmp249_ = FALSE;
1024 	}
1025 	if (_tmp249_) {
1026 		ValaSourceReference* _tmp257_;
1027 		ValaSourceReference* _tmp258_;
1028 		gchar* _tmp259_;
1029 		gchar* _tmp260_;
1030 		ValaSymbol* _tmp261_;
1031 		ValaSymbol* _tmp262_;
1032 		gchar* _tmp263_;
1033 		gchar* _tmp264_;
1034 		gchar* _tmp265_;
1035 		gchar* _tmp266_;
1036 		_tmp257_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1037 		_tmp258_ = _tmp257_;
1038 		_tmp259_ = vala_symbol_get_full_name ((ValaSymbol*) self);
1039 		_tmp260_ = _tmp259_;
1040 		_tmp261_ = vala_symbol_get_hidden_member ((ValaSymbol*) self);
1041 		_tmp262_ = _tmp261_;
1042 		_tmp263_ = vala_symbol_get_full_name (_tmp262_);
1043 		_tmp264_ = _tmp263_;
1044 		_tmp265_ = g_strdup_printf ("%s hides inherited field `%s'. Use the `new' keyword if hiding was int" \
1045 "entional", _tmp260_, _tmp264_);
1046 		_tmp266_ = _tmp265_;
1047 		vala_report_warning (_tmp258_, _tmp266_);
1048 		_g_free0 (_tmp266_);
1049 		_g_free0 (_tmp264_);
1050 		_vala_code_node_unref0 (_tmp262_);
1051 		_g_free0 (_tmp260_);
1052 	}
1053 	_tmp267_ = vala_code_context_get_analyzer (context);
1054 	_tmp268_ = _tmp267_;
1055 	_tmp269_ = old_source_file;
1056 	vala_semantic_analyzer_set_current_source_file (_tmp268_, _tmp269_);
1057 	_tmp270_ = vala_code_context_get_analyzer (context);
1058 	_tmp271_ = _tmp270_;
1059 	_tmp272_ = old_symbol;
1060 	vala_semantic_analyzer_set_current_symbol (_tmp271_, _tmp272_);
1061 	_tmp273_ = vala_code_node_get_error ((ValaCodeNode*) self);
1062 	_tmp274_ = _tmp273_;
1063 	result = !_tmp274_;
1064 	_vala_code_node_unref0 (old_symbol);
1065 	_vala_source_file_unref0 (old_source_file);
1066 	return result;
1067 }
1068 
1069 static void
vala_field_class_init(ValaFieldClass * klass,gpointer klass_data)1070 vala_field_class_init (ValaFieldClass * klass,
1071                        gpointer klass_data)
1072 {
1073 	vala_field_parent_class = g_type_class_peek_parent (klass);
1074 	((ValaCodeNodeClass *) klass)->finalize = vala_field_finalize;
1075 	g_type_class_adjust_private_offset (klass, &ValaField_private_offset);
1076 	((ValaCodeNodeClass *) klass)->accept = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_field_real_accept;
1077 	((ValaCodeNodeClass *) klass)->accept_children = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_field_real_accept_children;
1078 	((ValaCodeNodeClass *) klass)->replace_expression = (void (*) (ValaCodeNode*, ValaExpression*, ValaExpression*)) vala_field_real_replace_expression;
1079 	((ValaCodeNodeClass *) klass)->replace_type = (void (*) (ValaCodeNode*, ValaDataType*, ValaDataType*)) vala_field_real_replace_type;
1080 	((ValaCodeNodeClass *) klass)->check = (gboolean (*) (ValaCodeNode*, ValaCodeContext*)) vala_field_real_check;
1081 }
1082 
1083 static void
vala_field_vala_lockable_interface_init(ValaLockableIface * iface,gpointer iface_data)1084 vala_field_vala_lockable_interface_init (ValaLockableIface * iface,
1085                                          gpointer iface_data)
1086 {
1087 	vala_field_vala_lockable_parent_iface = g_type_interface_peek_parent (iface);
1088 	iface->get_lock_used = vala_field_real_get_lock_used;
1089 	iface->set_lock_used = vala_field_real_set_lock_used;
1090 }
1091 
1092 static void
vala_field_instance_init(ValaField * self,gpointer klass)1093 vala_field_instance_init (ValaField * self,
1094                           gpointer klass)
1095 {
1096 	self->priv = vala_field_get_instance_private (self);
1097 	self->priv->_binding = VALA_MEMBER_BINDING_INSTANCE;
1098 }
1099 
1100 static void
vala_field_finalize(ValaCodeNode * obj)1101 vala_field_finalize (ValaCodeNode * obj)
1102 {
1103 	ValaField * self;
1104 	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_FIELD, ValaField);
1105 	VALA_CODE_NODE_CLASS (vala_field_parent_class)->finalize (obj);
1106 }
1107 
1108 /**
1109  * Represents a type or namespace field.
1110  */
1111 static GType
vala_field_get_type_once(void)1112 vala_field_get_type_once (void)
1113 {
1114 	static const GTypeInfo g_define_type_info = { sizeof (ValaFieldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_field_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaField), 0, (GInstanceInitFunc) vala_field_instance_init, NULL };
1115 	static const GInterfaceInfo vala_lockable_info = { (GInterfaceInitFunc) vala_field_vala_lockable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
1116 	GType vala_field_type_id;
1117 	vala_field_type_id = g_type_register_static (VALA_TYPE_VARIABLE, "ValaField", &g_define_type_info, 0);
1118 	g_type_add_interface_static (vala_field_type_id, VALA_TYPE_LOCKABLE, &vala_lockable_info);
1119 	ValaField_private_offset = g_type_add_instance_private (vala_field_type_id, sizeof (ValaFieldPrivate));
1120 	return vala_field_type_id;
1121 }
1122 
1123 GType
vala_field_get_type(void)1124 vala_field_get_type (void)
1125 {
1126 	static volatile gsize vala_field_type_id__volatile = 0;
1127 	if (g_once_init_enter (&vala_field_type_id__volatile)) {
1128 		GType vala_field_type_id;
1129 		vala_field_type_id = vala_field_get_type_once ();
1130 		g_once_init_leave (&vala_field_type_id__volatile, vala_field_type_id);
1131 	}
1132 	return vala_field_type_id__volatile;
1133 }
1134 
1135