1 /* valabaseaccess.c generated by valac, the Vala compiler
2  * generated from valabaseaccess.vala, do not modify */
3 
4 /* valabaseaccess.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 <stdlib.h>
28 #include <string.h>
29 #include <glib.h>
30 #include <valagee.h>
31 #include <glib-object.h>
32 
33 #define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
34 #define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
35 
36 static gpointer vala_base_access_parent_class = NULL;
37 
38 static void vala_base_access_real_accept (ValaCodeNode* base,
39                                    ValaCodeVisitor* visitor);
40 static gchar* vala_base_access_real_to_string (ValaCodeNode* base);
41 static gboolean vala_base_access_real_is_pure (ValaExpression* base);
42 static gboolean vala_base_access_real_check (ValaCodeNode* base,
43                                       ValaCodeContext* context);
44 static void vala_base_access_real_emit (ValaCodeNode* base,
45                                  ValaCodeGenerator* codegen);
46 static GType vala_base_access_get_type_once (void);
47 
48 /**
49  * Creates a new base access expression.
50  *
51  * @param source reference to source code
52  * @return       newly created base access expression
53  */
54 ValaBaseAccess*
vala_base_access_construct(GType object_type,ValaSourceReference * source)55 vala_base_access_construct (GType object_type,
56                             ValaSourceReference* source)
57 {
58 	ValaBaseAccess* self = NULL;
59 	self = (ValaBaseAccess*) vala_expression_construct (object_type);
60 	vala_code_node_set_source_reference ((ValaCodeNode*) self, source);
61 	return self;
62 }
63 
64 ValaBaseAccess*
vala_base_access_new(ValaSourceReference * source)65 vala_base_access_new (ValaSourceReference* source)
66 {
67 	return vala_base_access_construct (VALA_TYPE_BASE_ACCESS, source);
68 }
69 
70 static void
vala_base_access_real_accept(ValaCodeNode * base,ValaCodeVisitor * visitor)71 vala_base_access_real_accept (ValaCodeNode* base,
72                               ValaCodeVisitor* visitor)
73 {
74 	ValaBaseAccess * self;
75 	self = (ValaBaseAccess*) base;
76 	g_return_if_fail (visitor != NULL);
77 	vala_code_visitor_visit_base_access (visitor, self);
78 	vala_code_visitor_visit_expression (visitor, (ValaExpression*) self);
79 }
80 
81 static gchar*
vala_base_access_real_to_string(ValaCodeNode * base)82 vala_base_access_real_to_string (ValaCodeNode* base)
83 {
84 	ValaBaseAccess * self;
85 	gchar* _tmp0_;
86 	gchar* result = NULL;
87 	self = (ValaBaseAccess*) base;
88 	_tmp0_ = g_strdup ("base");
89 	result = _tmp0_;
90 	return result;
91 }
92 
93 static gboolean
vala_base_access_real_is_pure(ValaExpression * base)94 vala_base_access_real_is_pure (ValaExpression* base)
95 {
96 	ValaBaseAccess * self;
97 	gboolean result = FALSE;
98 	self = (ValaBaseAccess*) base;
99 	result = TRUE;
100 	return result;
101 }
102 
103 static gpointer
_vala_iterable_ref0(gpointer self)104 _vala_iterable_ref0 (gpointer self)
105 {
106 	return self ? vala_iterable_ref (self) : NULL;
107 }
108 
109 static gboolean
vala_base_access_real_check(ValaCodeNode * base,ValaCodeContext * context)110 vala_base_access_real_check (ValaCodeNode* base,
111                              ValaCodeContext* context)
112 {
113 	ValaBaseAccess * self;
114 	gboolean _tmp0_;
115 	gboolean _tmp1_;
116 	ValaSemanticAnalyzer* _tmp4_;
117 	ValaSemanticAnalyzer* _tmp5_;
118 	ValaSemanticAnalyzer* _tmp8_;
119 	ValaSemanticAnalyzer* _tmp9_;
120 	ValaClass* _tmp10_;
121 	ValaClass* _tmp11_;
122 	ValaDataType* _tmp124_;
123 	ValaDataType* _tmp125_;
124 	ValaTypeSymbol* _tmp126_;
125 	ValaTypeSymbol* _tmp127_;
126 	gboolean _tmp128_;
127 	gboolean _tmp129_;
128 	gboolean result = FALSE;
129 	self = (ValaBaseAccess*) base;
130 	g_return_val_if_fail (context != NULL, FALSE);
131 	_tmp0_ = vala_code_node_get_checked ((ValaCodeNode*) self);
132 	_tmp1_ = _tmp0_;
133 	if (_tmp1_) {
134 		gboolean _tmp2_;
135 		gboolean _tmp3_;
136 		_tmp2_ = vala_code_node_get_error ((ValaCodeNode*) self);
137 		_tmp3_ = _tmp2_;
138 		result = !_tmp3_;
139 		return result;
140 	}
141 	vala_code_node_set_checked ((ValaCodeNode*) self, TRUE);
142 	_tmp4_ = vala_code_context_get_analyzer (context);
143 	_tmp5_ = _tmp4_;
144 	if (!vala_semantic_analyzer_is_in_instance_method (_tmp5_)) {
145 		ValaSourceReference* _tmp6_;
146 		ValaSourceReference* _tmp7_;
147 		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
148 		_tmp6_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
149 		_tmp7_ = _tmp6_;
150 		vala_report_error (_tmp7_, "Base access invalid outside of instance methods");
151 		result = FALSE;
152 		return result;
153 	}
154 	_tmp8_ = vala_code_context_get_analyzer (context);
155 	_tmp9_ = _tmp8_;
156 	_tmp10_ = vala_semantic_analyzer_get_current_class (_tmp9_);
157 	_tmp11_ = _tmp10_;
158 	if (_tmp11_ == NULL) {
159 		ValaSemanticAnalyzer* _tmp12_;
160 		ValaSemanticAnalyzer* _tmp13_;
161 		ValaStruct* _tmp14_;
162 		ValaStruct* _tmp15_;
163 		ValaSemanticAnalyzer* _tmp26_;
164 		ValaSemanticAnalyzer* _tmp27_;
165 		ValaStruct* _tmp28_;
166 		ValaStruct* _tmp29_;
167 		ValaDataType* _tmp30_;
168 		ValaDataType* _tmp31_;
169 		_tmp12_ = vala_code_context_get_analyzer (context);
170 		_tmp13_ = _tmp12_;
171 		_tmp14_ = vala_semantic_analyzer_get_current_struct (_tmp13_);
172 		_tmp15_ = _tmp14_;
173 		if (_tmp15_ == NULL) {
174 			ValaSourceReference* _tmp16_;
175 			ValaSourceReference* _tmp17_;
176 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
177 			_tmp16_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
178 			_tmp17_ = _tmp16_;
179 			vala_report_error (_tmp17_, "Base access invalid outside of class and struct");
180 			result = FALSE;
181 			return result;
182 		} else {
183 			ValaSemanticAnalyzer* _tmp18_;
184 			ValaSemanticAnalyzer* _tmp19_;
185 			ValaStruct* _tmp20_;
186 			ValaStruct* _tmp21_;
187 			ValaDataType* _tmp22_;
188 			ValaDataType* _tmp23_;
189 			_tmp18_ = vala_code_context_get_analyzer (context);
190 			_tmp19_ = _tmp18_;
191 			_tmp20_ = vala_semantic_analyzer_get_current_struct (_tmp19_);
192 			_tmp21_ = _tmp20_;
193 			_tmp22_ = vala_struct_get_base_type (_tmp21_);
194 			_tmp23_ = _tmp22_;
195 			if (_tmp23_ == NULL) {
196 				ValaSourceReference* _tmp24_;
197 				ValaSourceReference* _tmp25_;
198 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
199 				_tmp24_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
200 				_tmp25_ = _tmp24_;
201 				vala_report_error (_tmp25_, "Base access invalid without base type");
202 				result = FALSE;
203 				return result;
204 			}
205 		}
206 		_tmp26_ = vala_code_context_get_analyzer (context);
207 		_tmp27_ = _tmp26_;
208 		_tmp28_ = vala_semantic_analyzer_get_current_struct (_tmp27_);
209 		_tmp29_ = _tmp28_;
210 		_tmp30_ = vala_struct_get_base_type (_tmp29_);
211 		_tmp31_ = _tmp30_;
212 		vala_expression_set_value_type ((ValaExpression*) self, _tmp31_);
213 	} else {
214 		ValaSemanticAnalyzer* _tmp32_;
215 		ValaSemanticAnalyzer* _tmp33_;
216 		ValaClass* _tmp34_;
217 		ValaClass* _tmp35_;
218 		ValaClass* _tmp36_;
219 		ValaClass* _tmp37_;
220 		_tmp32_ = vala_code_context_get_analyzer (context);
221 		_tmp33_ = _tmp32_;
222 		_tmp34_ = vala_semantic_analyzer_get_current_class (_tmp33_);
223 		_tmp35_ = _tmp34_;
224 		_tmp36_ = vala_class_get_base_class (_tmp35_);
225 		_tmp37_ = _tmp36_;
226 		if (_tmp37_ == NULL) {
227 			ValaSourceReference* _tmp38_;
228 			ValaSourceReference* _tmp39_;
229 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
230 			_tmp38_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
231 			_tmp39_ = _tmp38_;
232 			vala_report_error (_tmp39_, "Base access invalid without base class");
233 			result = FALSE;
234 			return result;
235 		} else {
236 			gboolean _tmp40_ = FALSE;
237 			gboolean _tmp41_ = FALSE;
238 			gboolean _tmp42_ = FALSE;
239 			ValaSemanticAnalyzer* _tmp43_;
240 			ValaSemanticAnalyzer* _tmp44_;
241 			ValaClass* _tmp45_;
242 			ValaClass* _tmp46_;
243 			gboolean _tmp47_;
244 			gboolean _tmp48_;
245 			_tmp43_ = vala_code_context_get_analyzer (context);
246 			_tmp44_ = _tmp43_;
247 			_tmp45_ = vala_semantic_analyzer_get_current_class (_tmp44_);
248 			_tmp46_ = _tmp45_;
249 			_tmp47_ = vala_class_get_is_compact (_tmp46_);
250 			_tmp48_ = _tmp47_;
251 			if (_tmp48_) {
252 				ValaSemanticAnalyzer* _tmp49_;
253 				ValaSemanticAnalyzer* _tmp50_;
254 				ValaMethod* _tmp51_;
255 				ValaMethod* _tmp52_;
256 				_tmp49_ = vala_code_context_get_analyzer (context);
257 				_tmp50_ = _tmp49_;
258 				_tmp51_ = vala_semantic_analyzer_get_current_method (_tmp50_);
259 				_tmp52_ = _tmp51_;
260 				_tmp42_ = _tmp52_ != NULL;
261 			} else {
262 				_tmp42_ = FALSE;
263 			}
264 			if (_tmp42_) {
265 				ValaSemanticAnalyzer* _tmp53_;
266 				ValaSemanticAnalyzer* _tmp54_;
267 				ValaMethod* _tmp55_;
268 				ValaMethod* _tmp56_;
269 				_tmp53_ = vala_code_context_get_analyzer (context);
270 				_tmp54_ = _tmp53_;
271 				_tmp55_ = vala_semantic_analyzer_get_current_method (_tmp54_);
272 				_tmp56_ = _tmp55_;
273 				_tmp41_ = !VALA_IS_CREATION_METHOD (_tmp56_);
274 			} else {
275 				_tmp41_ = FALSE;
276 			}
277 			if (_tmp41_) {
278 				gboolean _tmp57_ = FALSE;
279 				ValaSemanticAnalyzer* _tmp58_;
280 				ValaSemanticAnalyzer* _tmp59_;
281 				ValaMethod* _tmp60_;
282 				ValaMethod* _tmp61_;
283 				gboolean _tmp62_;
284 				gboolean _tmp63_;
285 				_tmp58_ = vala_code_context_get_analyzer (context);
286 				_tmp59_ = _tmp58_;
287 				_tmp60_ = vala_semantic_analyzer_get_current_method (_tmp59_);
288 				_tmp61_ = _tmp60_;
289 				_tmp62_ = vala_method_get_overrides (_tmp61_);
290 				_tmp63_ = _tmp62_;
291 				if (_tmp63_) {
292 					_tmp57_ = TRUE;
293 				} else {
294 					ValaSemanticAnalyzer* _tmp64_;
295 					ValaSemanticAnalyzer* _tmp65_;
296 					ValaMethod* _tmp66_;
297 					ValaMethod* _tmp67_;
298 					gboolean _tmp68_;
299 					gboolean _tmp69_;
300 					_tmp64_ = vala_code_context_get_analyzer (context);
301 					_tmp65_ = _tmp64_;
302 					_tmp66_ = vala_semantic_analyzer_get_current_method (_tmp65_);
303 					_tmp67_ = _tmp66_;
304 					_tmp68_ = vala_method_get_is_virtual (_tmp67_);
305 					_tmp69_ = _tmp68_;
306 					_tmp57_ = _tmp69_;
307 				}
308 				_tmp40_ = _tmp57_;
309 			} else {
310 				_tmp40_ = FALSE;
311 			}
312 			if (_tmp40_) {
313 				ValaSourceReference* _tmp70_;
314 				ValaSourceReference* _tmp71_;
315 				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
316 				_tmp70_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
317 				_tmp71_ = _tmp70_;
318 				vala_report_error (_tmp71_, "Base access invalid in virtual overridden method of compact class");
319 				result = FALSE;
320 				return result;
321 			} else {
322 				gboolean _tmp72_ = FALSE;
323 				gboolean _tmp73_ = FALSE;
324 				ValaSemanticAnalyzer* _tmp74_;
325 				ValaSemanticAnalyzer* _tmp75_;
326 				ValaClass* _tmp76_;
327 				ValaClass* _tmp77_;
328 				gboolean _tmp78_;
329 				gboolean _tmp79_;
330 				_tmp74_ = vala_code_context_get_analyzer (context);
331 				_tmp75_ = _tmp74_;
332 				_tmp76_ = vala_semantic_analyzer_get_current_class (_tmp75_);
333 				_tmp77_ = _tmp76_;
334 				_tmp78_ = vala_class_get_is_compact (_tmp77_);
335 				_tmp79_ = _tmp78_;
336 				if (_tmp79_) {
337 					ValaSemanticAnalyzer* _tmp80_;
338 					ValaSemanticAnalyzer* _tmp81_;
339 					ValaPropertyAccessor* _tmp82_;
340 					ValaPropertyAccessor* _tmp83_;
341 					_tmp80_ = vala_code_context_get_analyzer (context);
342 					_tmp81_ = _tmp80_;
343 					_tmp82_ = vala_semantic_analyzer_get_current_property_accessor (_tmp81_);
344 					_tmp83_ = _tmp82_;
345 					_tmp73_ = _tmp83_ != NULL;
346 				} else {
347 					_tmp73_ = FALSE;
348 				}
349 				if (_tmp73_) {
350 					gboolean _tmp84_ = FALSE;
351 					ValaSemanticAnalyzer* _tmp85_;
352 					ValaSemanticAnalyzer* _tmp86_;
353 					ValaPropertyAccessor* _tmp87_;
354 					ValaPropertyAccessor* _tmp88_;
355 					ValaProperty* _tmp89_;
356 					ValaProperty* _tmp90_;
357 					gboolean _tmp91_;
358 					gboolean _tmp92_;
359 					_tmp85_ = vala_code_context_get_analyzer (context);
360 					_tmp86_ = _tmp85_;
361 					_tmp87_ = vala_semantic_analyzer_get_current_property_accessor (_tmp86_);
362 					_tmp88_ = _tmp87_;
363 					_tmp89_ = vala_property_accessor_get_prop (_tmp88_);
364 					_tmp90_ = _tmp89_;
365 					_tmp91_ = vala_property_get_overrides (_tmp90_);
366 					_tmp92_ = _tmp91_;
367 					if (_tmp92_) {
368 						_tmp84_ = TRUE;
369 					} else {
370 						ValaSemanticAnalyzer* _tmp93_;
371 						ValaSemanticAnalyzer* _tmp94_;
372 						ValaPropertyAccessor* _tmp95_;
373 						ValaPropertyAccessor* _tmp96_;
374 						ValaProperty* _tmp97_;
375 						ValaProperty* _tmp98_;
376 						gboolean _tmp99_;
377 						gboolean _tmp100_;
378 						_tmp93_ = vala_code_context_get_analyzer (context);
379 						_tmp94_ = _tmp93_;
380 						_tmp95_ = vala_semantic_analyzer_get_current_property_accessor (_tmp94_);
381 						_tmp96_ = _tmp95_;
382 						_tmp97_ = vala_property_accessor_get_prop (_tmp96_);
383 						_tmp98_ = _tmp97_;
384 						_tmp99_ = vala_property_get_is_virtual (_tmp98_);
385 						_tmp100_ = _tmp99_;
386 						_tmp84_ = _tmp100_;
387 					}
388 					_tmp72_ = _tmp84_;
389 				} else {
390 					_tmp72_ = FALSE;
391 				}
392 				if (_tmp72_) {
393 					ValaSourceReference* _tmp101_;
394 					ValaSourceReference* _tmp102_;
395 					vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
396 					_tmp101_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
397 					_tmp102_ = _tmp101_;
398 					vala_report_error (_tmp102_, "Base access invalid in virtual overridden property of compact class");
399 					result = FALSE;
400 					return result;
401 				} else {
402 					{
403 						ValaList* _base_type_list = NULL;
404 						ValaSemanticAnalyzer* _tmp103_;
405 						ValaSemanticAnalyzer* _tmp104_;
406 						ValaClass* _tmp105_;
407 						ValaClass* _tmp106_;
408 						ValaList* _tmp107_;
409 						ValaList* _tmp108_;
410 						gint _base_type_size = 0;
411 						ValaList* _tmp109_;
412 						gint _tmp110_;
413 						gint _tmp111_;
414 						gint _base_type_index = 0;
415 						_tmp103_ = vala_code_context_get_analyzer (context);
416 						_tmp104_ = _tmp103_;
417 						_tmp105_ = vala_semantic_analyzer_get_current_class (_tmp104_);
418 						_tmp106_ = _tmp105_;
419 						_tmp107_ = vala_class_get_base_types (_tmp106_);
420 						_tmp108_ = _vala_iterable_ref0 (_tmp107_);
421 						_base_type_list = _tmp108_;
422 						_tmp109_ = _base_type_list;
423 						_tmp110_ = vala_collection_get_size ((ValaCollection*) _tmp109_);
424 						_tmp111_ = _tmp110_;
425 						_base_type_size = _tmp111_;
426 						_base_type_index = -1;
427 						while (TRUE) {
428 							gint _tmp112_;
429 							gint _tmp113_;
430 							ValaDataType* base_type = NULL;
431 							ValaList* _tmp114_;
432 							gpointer _tmp115_;
433 							ValaDataType* _tmp116_;
434 							ValaTypeSymbol* _tmp117_;
435 							ValaTypeSymbol* _tmp118_;
436 							_base_type_index = _base_type_index + 1;
437 							_tmp112_ = _base_type_index;
438 							_tmp113_ = _base_type_size;
439 							if (!(_tmp112_ < _tmp113_)) {
440 								break;
441 							}
442 							_tmp114_ = _base_type_list;
443 							_tmp115_ = vala_list_get (_tmp114_, _base_type_index);
444 							base_type = (ValaDataType*) _tmp115_;
445 							_tmp116_ = base_type;
446 							_tmp117_ = vala_data_type_get_type_symbol (_tmp116_);
447 							_tmp118_ = _tmp117_;
448 							if (VALA_IS_CLASS (_tmp118_)) {
449 								ValaDataType* _tmp119_;
450 								ValaDataType* _tmp120_;
451 								ValaDataType* _tmp121_;
452 								ValaDataType* _tmp122_;
453 								ValaDataType* _tmp123_;
454 								_tmp119_ = base_type;
455 								_tmp120_ = vala_data_type_copy (_tmp119_);
456 								_tmp121_ = _tmp120_;
457 								vala_expression_set_value_type ((ValaExpression*) self, _tmp121_);
458 								_vala_code_node_unref0 (_tmp121_);
459 								_tmp122_ = vala_expression_get_value_type ((ValaExpression*) self);
460 								_tmp123_ = _tmp122_;
461 								vala_data_type_set_value_owned (_tmp123_, FALSE);
462 							}
463 							_vala_code_node_unref0 (base_type);
464 						}
465 						_vala_iterable_unref0 (_base_type_list);
466 					}
467 				}
468 			}
469 		}
470 	}
471 	_tmp124_ = vala_expression_get_value_type ((ValaExpression*) self);
472 	_tmp125_ = _tmp124_;
473 	_tmp126_ = vala_data_type_get_type_symbol (_tmp125_);
474 	_tmp127_ = _tmp126_;
475 	vala_expression_set_symbol_reference ((ValaExpression*) self, (ValaSymbol*) _tmp127_);
476 	_tmp128_ = vala_code_node_get_error ((ValaCodeNode*) self);
477 	_tmp129_ = _tmp128_;
478 	result = !_tmp129_;
479 	return result;
480 }
481 
482 static void
vala_base_access_real_emit(ValaCodeNode * base,ValaCodeGenerator * codegen)483 vala_base_access_real_emit (ValaCodeNode* base,
484                             ValaCodeGenerator* codegen)
485 {
486 	ValaBaseAccess * self;
487 	self = (ValaBaseAccess*) base;
488 	g_return_if_fail (codegen != NULL);
489 	vala_code_visitor_visit_base_access ((ValaCodeVisitor*) codegen, self);
490 	vala_code_visitor_visit_expression ((ValaCodeVisitor*) codegen, (ValaExpression*) self);
491 }
492 
493 static void
vala_base_access_class_init(ValaBaseAccessClass * klass,gpointer klass_data)494 vala_base_access_class_init (ValaBaseAccessClass * klass,
495                              gpointer klass_data)
496 {
497 	vala_base_access_parent_class = g_type_class_peek_parent (klass);
498 	((ValaCodeNodeClass *) klass)->accept = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_base_access_real_accept;
499 	((ValaCodeNodeClass *) klass)->to_string = (gchar* (*) (ValaCodeNode*)) vala_base_access_real_to_string;
500 	((ValaExpressionClass *) klass)->is_pure = (gboolean (*) (ValaExpression*)) vala_base_access_real_is_pure;
501 	((ValaCodeNodeClass *) klass)->check = (gboolean (*) (ValaCodeNode*, ValaCodeContext*)) vala_base_access_real_check;
502 	((ValaCodeNodeClass *) klass)->emit = (void (*) (ValaCodeNode*, ValaCodeGenerator*)) vala_base_access_real_emit;
503 }
504 
505 static void
vala_base_access_instance_init(ValaBaseAccess * self,gpointer klass)506 vala_base_access_instance_init (ValaBaseAccess * self,
507                                 gpointer klass)
508 {
509 }
510 
511 /**
512  * Represents an access to base type member in the source code.
513  */
514 static GType
vala_base_access_get_type_once(void)515 vala_base_access_get_type_once (void)
516 {
517 	static const GTypeInfo g_define_type_info = { sizeof (ValaBaseAccessClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_base_access_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaBaseAccess), 0, (GInstanceInitFunc) vala_base_access_instance_init, NULL };
518 	GType vala_base_access_type_id;
519 	vala_base_access_type_id = g_type_register_static (VALA_TYPE_EXPRESSION, "ValaBaseAccess", &g_define_type_info, 0);
520 	return vala_base_access_type_id;
521 }
522 
523 GType
vala_base_access_get_type(void)524 vala_base_access_get_type (void)
525 {
526 	static volatile gsize vala_base_access_type_id__volatile = 0;
527 	if (g_once_init_enter (&vala_base_access_type_id__volatile)) {
528 		GType vala_base_access_type_id;
529 		vala_base_access_type_id = vala_base_access_get_type_once ();
530 		g_once_init_leave (&vala_base_access_type_id__volatile, vala_base_access_type_id);
531 	}
532 	return vala_base_access_type_id__volatile;
533 }
534 
535