1 /* valathrowstatement.c generated by valac, the Vala compiler
2  * generated from valathrowstatement.vala, do not modify */
3 
4 /* valathrowstatement.vala
5  *
6  * Copyright (C) 2007-2010  Jürg Billeter
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12 
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17 
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
21  *
22  * Author:
23  * 	Jürg Billeter <j@bitron.ch>
24  */
25 
26 #include "vala.h"
27 #include <valagee.h>
28 #include <glib-object.h>
29 #include <glib.h>
30 #include <stdlib.h>
31 #include <string.h>
32 
33 #define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
34 #define _g_free0(var) (var = (g_free (var), NULL))
35 
36 struct _ValaThrowStatementPrivate {
37 	ValaExpression* _error_expression;
38 };
39 
40 static gint ValaThrowStatement_private_offset;
41 static gpointer vala_throw_statement_parent_class = NULL;
42 static ValaStatementIface * vala_throw_statement_vala_statement_parent_iface = NULL;
43 
44 static void vala_throw_statement_real_accept (ValaCodeNode* base,
45                                        ValaCodeVisitor* visitor);
46 static void vala_throw_statement_real_accept_children (ValaCodeNode* base,
47                                                 ValaCodeVisitor* visitor);
48 static void vala_throw_statement_real_replace_expression (ValaCodeNode* base,
49                                                    ValaExpression* old_node,
50                                                    ValaExpression* new_node);
51 static void vala_throw_statement_real_get_error_types (ValaCodeNode* base,
52                                                 ValaCollection* collection,
53                                                 ValaSourceReference* source_reference);
54 static gboolean vala_throw_statement_real_check (ValaCodeNode* base,
55                                           ValaCodeContext* context);
56 static void vala_throw_statement_real_emit (ValaCodeNode* base,
57                                      ValaCodeGenerator* codegen);
58 static void vala_throw_statement_real_get_defined_variables (ValaCodeNode* base,
59                                                       ValaCollection* collection);
60 static void vala_throw_statement_real_get_used_variables (ValaCodeNode* base,
61                                                    ValaCollection* collection);
62 static void vala_throw_statement_finalize (ValaCodeNode * obj);
63 static GType vala_throw_statement_get_type_once (void);
64 
65 static inline gpointer
vala_throw_statement_get_instance_private(ValaThrowStatement * self)66 vala_throw_statement_get_instance_private (ValaThrowStatement* self)
67 {
68 	return G_STRUCT_MEMBER_P (self, ValaThrowStatement_private_offset);
69 }
70 
71 ValaExpression*
vala_throw_statement_get_error_expression(ValaThrowStatement * self)72 vala_throw_statement_get_error_expression (ValaThrowStatement* self)
73 {
74 	ValaExpression* result;
75 	ValaExpression* _tmp0_;
76 	g_return_val_if_fail (self != NULL, NULL);
77 	_tmp0_ = self->priv->_error_expression;
78 	result = _tmp0_;
79 	return result;
80 }
81 
82 static gpointer
_vala_code_node_ref0(gpointer self)83 _vala_code_node_ref0 (gpointer self)
84 {
85 	return self ? vala_code_node_ref (self) : NULL;
86 }
87 
88 void
vala_throw_statement_set_error_expression(ValaThrowStatement * self,ValaExpression * value)89 vala_throw_statement_set_error_expression (ValaThrowStatement* self,
90                                            ValaExpression* value)
91 {
92 	ValaExpression* _tmp0_;
93 	ValaExpression* _tmp1_;
94 	g_return_if_fail (self != NULL);
95 	_tmp0_ = _vala_code_node_ref0 (value);
96 	_vala_code_node_unref0 (self->priv->_error_expression);
97 	self->priv->_error_expression = _tmp0_;
98 	_tmp1_ = self->priv->_error_expression;
99 	if (_tmp1_ != NULL) {
100 		ValaExpression* _tmp2_;
101 		_tmp2_ = self->priv->_error_expression;
102 		vala_code_node_set_parent_node ((ValaCodeNode*) _tmp2_, (ValaCodeNode*) self);
103 	}
104 }
105 
106 /**
107  * Creates a new throw statement.
108  *
109  * @param error_expression the error expression
110  * @param source_reference reference to source code
111  * @return                 newly created throw statement
112  */
113 ValaThrowStatement*
vala_throw_statement_construct(GType object_type,ValaExpression * error_expression,ValaSourceReference * source_reference)114 vala_throw_statement_construct (GType object_type,
115                                 ValaExpression* error_expression,
116                                 ValaSourceReference* source_reference)
117 {
118 	ValaThrowStatement* self = NULL;
119 	g_return_val_if_fail (error_expression != NULL, NULL);
120 	self = (ValaThrowStatement*) vala_code_node_construct (object_type);
121 	vala_code_node_set_source_reference ((ValaCodeNode*) self, source_reference);
122 	vala_throw_statement_set_error_expression (self, error_expression);
123 	return self;
124 }
125 
126 ValaThrowStatement*
vala_throw_statement_new(ValaExpression * error_expression,ValaSourceReference * source_reference)127 vala_throw_statement_new (ValaExpression* error_expression,
128                           ValaSourceReference* source_reference)
129 {
130 	return vala_throw_statement_construct (VALA_TYPE_THROW_STATEMENT, error_expression, source_reference);
131 }
132 
133 static void
vala_throw_statement_real_accept(ValaCodeNode * base,ValaCodeVisitor * visitor)134 vala_throw_statement_real_accept (ValaCodeNode* base,
135                                   ValaCodeVisitor* visitor)
136 {
137 	ValaThrowStatement * self;
138 	self = (ValaThrowStatement*) base;
139 	g_return_if_fail (visitor != NULL);
140 	vala_code_visitor_visit_throw_statement (visitor, self);
141 }
142 
143 static void
vala_throw_statement_real_accept_children(ValaCodeNode * base,ValaCodeVisitor * visitor)144 vala_throw_statement_real_accept_children (ValaCodeNode* base,
145                                            ValaCodeVisitor* visitor)
146 {
147 	ValaThrowStatement * self;
148 	ValaExpression* _tmp0_;
149 	ValaExpression* _tmp1_;
150 	self = (ValaThrowStatement*) base;
151 	g_return_if_fail (visitor != NULL);
152 	_tmp0_ = vala_throw_statement_get_error_expression (self);
153 	_tmp1_ = _tmp0_;
154 	if (_tmp1_ != NULL) {
155 		ValaExpression* _tmp2_;
156 		ValaExpression* _tmp3_;
157 		ValaExpression* _tmp4_;
158 		ValaExpression* _tmp5_;
159 		_tmp2_ = vala_throw_statement_get_error_expression (self);
160 		_tmp3_ = _tmp2_;
161 		vala_code_node_accept ((ValaCodeNode*) _tmp3_, visitor);
162 		_tmp4_ = vala_throw_statement_get_error_expression (self);
163 		_tmp5_ = _tmp4_;
164 		vala_code_visitor_visit_end_full_expression (visitor, _tmp5_);
165 	}
166 }
167 
168 static void
vala_throw_statement_real_replace_expression(ValaCodeNode * base,ValaExpression * old_node,ValaExpression * new_node)169 vala_throw_statement_real_replace_expression (ValaCodeNode* base,
170                                               ValaExpression* old_node,
171                                               ValaExpression* new_node)
172 {
173 	ValaThrowStatement * self;
174 	ValaExpression* _tmp0_;
175 	ValaExpression* _tmp1_;
176 	self = (ValaThrowStatement*) base;
177 	g_return_if_fail (old_node != NULL);
178 	g_return_if_fail (new_node != NULL);
179 	_tmp0_ = vala_throw_statement_get_error_expression (self);
180 	_tmp1_ = _tmp0_;
181 	if (_tmp1_ == old_node) {
182 		vala_throw_statement_set_error_expression (self, new_node);
183 	}
184 }
185 
186 static void
vala_throw_statement_real_get_error_types(ValaCodeNode * base,ValaCollection * collection,ValaSourceReference * source_reference)187 vala_throw_statement_real_get_error_types (ValaCodeNode* base,
188                                            ValaCollection* collection,
189                                            ValaSourceReference* source_reference)
190 {
191 	ValaThrowStatement * self;
192 	gboolean _tmp0_;
193 	gboolean _tmp1_;
194 	ValaDataType* error_type = NULL;
195 	ValaExpression* _tmp4_;
196 	ValaExpression* _tmp5_;
197 	ValaDataType* _tmp6_;
198 	ValaDataType* _tmp7_;
199 	ValaDataType* _tmp8_;
200 	ValaDataType* _tmp9_;
201 	ValaDataType* _tmp10_;
202 	self = (ValaThrowStatement*) base;
203 	g_return_if_fail (collection != NULL);
204 	_tmp0_ = vala_code_node_get_error ((ValaCodeNode*) self);
205 	_tmp1_ = _tmp0_;
206 	if (_tmp1_) {
207 		return;
208 	}
209 	if (source_reference == NULL) {
210 		ValaSourceReference* _tmp2_;
211 		ValaSourceReference* _tmp3_;
212 		_tmp2_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
213 		_tmp3_ = _tmp2_;
214 		source_reference = _tmp3_;
215 	}
216 	_tmp4_ = vala_throw_statement_get_error_expression (self);
217 	_tmp5_ = _tmp4_;
218 	_tmp6_ = vala_expression_get_value_type (_tmp5_);
219 	_tmp7_ = _tmp6_;
220 	_tmp8_ = vala_data_type_copy (_tmp7_);
221 	error_type = _tmp8_;
222 	_tmp9_ = error_type;
223 	vala_code_node_set_source_reference ((ValaCodeNode*) _tmp9_, source_reference);
224 	_tmp10_ = error_type;
225 	vala_collection_add (collection, _tmp10_);
226 	_vala_code_node_unref0 (error_type);
227 }
228 
229 static gboolean
vala_throw_statement_real_check(ValaCodeNode * base,ValaCodeContext * context)230 vala_throw_statement_real_check (ValaCodeNode* base,
231                                  ValaCodeContext* context)
232 {
233 	ValaThrowStatement * self;
234 	gboolean _tmp0_;
235 	gboolean _tmp1_;
236 	ValaProfile _tmp4_;
237 	ValaProfile _tmp5_;
238 	ValaExpression* _tmp8_;
239 	ValaExpression* _tmp9_;
240 	ValaSourceReference* _tmp10_;
241 	ValaSourceReference* _tmp11_;
242 	ValaErrorType* _tmp12_;
243 	ValaErrorType* _tmp13_;
244 	ValaExpression* _tmp14_;
245 	ValaExpression* _tmp15_;
246 	ValaDataType* _tmp16_;
247 	ValaDataType* _tmp17_;
248 	ValaExpression* _tmp18_;
249 	ValaExpression* _tmp19_;
250 	gboolean _tmp49_;
251 	gboolean _tmp50_;
252 	gboolean result = FALSE;
253 	self = (ValaThrowStatement*) base;
254 	g_return_val_if_fail (context != NULL, FALSE);
255 	_tmp0_ = vala_code_node_get_checked ((ValaCodeNode*) self);
256 	_tmp1_ = _tmp0_;
257 	if (_tmp1_) {
258 		gboolean _tmp2_;
259 		gboolean _tmp3_;
260 		_tmp2_ = vala_code_node_get_error ((ValaCodeNode*) self);
261 		_tmp3_ = _tmp2_;
262 		result = !_tmp3_;
263 		return result;
264 	}
265 	vala_code_node_set_checked ((ValaCodeNode*) self, TRUE);
266 	_tmp4_ = vala_code_context_get_profile (context);
267 	_tmp5_ = _tmp4_;
268 	if (_tmp5_ == VALA_PROFILE_POSIX) {
269 		ValaSourceReference* _tmp6_;
270 		ValaSourceReference* _tmp7_;
271 		_tmp6_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
272 		_tmp7_ = _tmp6_;
273 		vala_report_error (_tmp7_, "`throws' is not supported in POSIX profile");
274 		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
275 		result = FALSE;
276 		return result;
277 	}
278 	_tmp8_ = vala_throw_statement_get_error_expression (self);
279 	_tmp9_ = _tmp8_;
280 	_tmp10_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
281 	_tmp11_ = _tmp10_;
282 	_tmp12_ = vala_error_type_new (NULL, NULL, _tmp11_);
283 	_tmp13_ = _tmp12_;
284 	vala_expression_set_target_type (_tmp9_, (ValaDataType*) _tmp13_);
285 	_vala_code_node_unref0 (_tmp13_);
286 	_tmp14_ = vala_throw_statement_get_error_expression (self);
287 	_tmp15_ = _tmp14_;
288 	_tmp16_ = vala_expression_get_target_type (_tmp15_);
289 	_tmp17_ = _tmp16_;
290 	vala_data_type_set_value_owned (_tmp17_, TRUE);
291 	_tmp18_ = vala_throw_statement_get_error_expression (self);
292 	_tmp19_ = _tmp18_;
293 	if (_tmp19_ != NULL) {
294 		ValaExpression* _tmp20_;
295 		ValaExpression* _tmp21_;
296 		ValaExpression* _tmp22_;
297 		ValaExpression* _tmp23_;
298 		ValaDataType* _tmp24_;
299 		ValaDataType* _tmp25_;
300 		gboolean _tmp30_ = FALSE;
301 		ValaProfile _tmp31_;
302 		ValaProfile _tmp32_;
303 		_tmp20_ = vala_throw_statement_get_error_expression (self);
304 		_tmp21_ = _tmp20_;
305 		if (!vala_code_node_check ((ValaCodeNode*) _tmp21_, context)) {
306 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
307 			result = FALSE;
308 			return result;
309 		}
310 		_tmp22_ = vala_throw_statement_get_error_expression (self);
311 		_tmp23_ = _tmp22_;
312 		_tmp24_ = vala_expression_get_value_type (_tmp23_);
313 		_tmp25_ = _tmp24_;
314 		if (_tmp25_ == NULL) {
315 			ValaExpression* _tmp26_;
316 			ValaExpression* _tmp27_;
317 			ValaSourceReference* _tmp28_;
318 			ValaSourceReference* _tmp29_;
319 			_tmp26_ = vala_throw_statement_get_error_expression (self);
320 			_tmp27_ = _tmp26_;
321 			_tmp28_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp27_);
322 			_tmp29_ = _tmp28_;
323 			vala_report_error (_tmp29_, "invalid error expression");
324 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
325 			result = FALSE;
326 			return result;
327 		}
328 		_tmp31_ = vala_code_context_get_profile (context);
329 		_tmp32_ = _tmp31_;
330 		if (_tmp32_ == VALA_PROFILE_GOBJECT) {
331 			ValaExpression* _tmp33_;
332 			ValaExpression* _tmp34_;
333 			ValaDataType* _tmp35_;
334 			ValaDataType* _tmp36_;
335 			_tmp33_ = vala_throw_statement_get_error_expression (self);
336 			_tmp34_ = _tmp33_;
337 			_tmp35_ = vala_expression_get_value_type (_tmp34_);
338 			_tmp36_ = _tmp35_;
339 			_tmp30_ = !VALA_IS_ERROR_TYPE (_tmp36_);
340 		} else {
341 			_tmp30_ = FALSE;
342 		}
343 		if (_tmp30_) {
344 			ValaExpression* _tmp37_;
345 			ValaExpression* _tmp38_;
346 			ValaSourceReference* _tmp39_;
347 			ValaSourceReference* _tmp40_;
348 			ValaExpression* _tmp41_;
349 			ValaExpression* _tmp42_;
350 			ValaDataType* _tmp43_;
351 			ValaDataType* _tmp44_;
352 			gchar* _tmp45_;
353 			gchar* _tmp46_;
354 			gchar* _tmp47_;
355 			gchar* _tmp48_;
356 			_tmp37_ = vala_throw_statement_get_error_expression (self);
357 			_tmp38_ = _tmp37_;
358 			_tmp39_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp38_);
359 			_tmp40_ = _tmp39_;
360 			_tmp41_ = vala_throw_statement_get_error_expression (self);
361 			_tmp42_ = _tmp41_;
362 			_tmp43_ = vala_expression_get_value_type (_tmp42_);
363 			_tmp44_ = _tmp43_;
364 			_tmp45_ = vala_code_node_to_string ((ValaCodeNode*) _tmp44_);
365 			_tmp46_ = _tmp45_;
366 			_tmp47_ = g_strdup_printf ("`%s' is not an error type", _tmp46_);
367 			_tmp48_ = _tmp47_;
368 			vala_report_error (_tmp40_, _tmp48_);
369 			_g_free0 (_tmp48_);
370 			_g_free0 (_tmp46_);
371 			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
372 			result = FALSE;
373 			return result;
374 		}
375 	}
376 	_tmp49_ = vala_code_node_get_error ((ValaCodeNode*) self);
377 	_tmp50_ = _tmp49_;
378 	result = !_tmp50_;
379 	return result;
380 }
381 
382 static void
vala_throw_statement_real_emit(ValaCodeNode * base,ValaCodeGenerator * codegen)383 vala_throw_statement_real_emit (ValaCodeNode* base,
384                                 ValaCodeGenerator* codegen)
385 {
386 	ValaThrowStatement * self;
387 	ValaExpression* _tmp0_;
388 	ValaExpression* _tmp1_;
389 	self = (ValaThrowStatement*) base;
390 	g_return_if_fail (codegen != NULL);
391 	_tmp0_ = vala_throw_statement_get_error_expression (self);
392 	_tmp1_ = _tmp0_;
393 	if (_tmp1_ != NULL) {
394 		ValaExpression* _tmp2_;
395 		ValaExpression* _tmp3_;
396 		ValaExpression* _tmp4_;
397 		ValaExpression* _tmp5_;
398 		_tmp2_ = vala_throw_statement_get_error_expression (self);
399 		_tmp3_ = _tmp2_;
400 		vala_code_node_emit ((ValaCodeNode*) _tmp3_, codegen);
401 		_tmp4_ = vala_throw_statement_get_error_expression (self);
402 		_tmp5_ = _tmp4_;
403 		vala_code_visitor_visit_end_full_expression ((ValaCodeVisitor*) codegen, _tmp5_);
404 	}
405 	vala_code_visitor_visit_throw_statement ((ValaCodeVisitor*) codegen, self);
406 }
407 
408 static void
vala_throw_statement_real_get_defined_variables(ValaCodeNode * base,ValaCollection * collection)409 vala_throw_statement_real_get_defined_variables (ValaCodeNode* base,
410                                                  ValaCollection* collection)
411 {
412 	ValaThrowStatement * self;
413 	ValaExpression* _tmp0_;
414 	ValaExpression* _tmp1_;
415 	self = (ValaThrowStatement*) base;
416 	g_return_if_fail (collection != NULL);
417 	_tmp0_ = vala_throw_statement_get_error_expression (self);
418 	_tmp1_ = _tmp0_;
419 	vala_code_node_get_defined_variables ((ValaCodeNode*) _tmp1_, collection);
420 }
421 
422 static void
vala_throw_statement_real_get_used_variables(ValaCodeNode * base,ValaCollection * collection)423 vala_throw_statement_real_get_used_variables (ValaCodeNode* base,
424                                               ValaCollection* collection)
425 {
426 	ValaThrowStatement * self;
427 	ValaExpression* _tmp0_;
428 	ValaExpression* _tmp1_;
429 	self = (ValaThrowStatement*) base;
430 	g_return_if_fail (collection != NULL);
431 	_tmp0_ = vala_throw_statement_get_error_expression (self);
432 	_tmp1_ = _tmp0_;
433 	vala_code_node_get_used_variables ((ValaCodeNode*) _tmp1_, collection);
434 }
435 
436 static void
vala_throw_statement_class_init(ValaThrowStatementClass * klass,gpointer klass_data)437 vala_throw_statement_class_init (ValaThrowStatementClass * klass,
438                                  gpointer klass_data)
439 {
440 	vala_throw_statement_parent_class = g_type_class_peek_parent (klass);
441 	((ValaCodeNodeClass *) klass)->finalize = vala_throw_statement_finalize;
442 	g_type_class_adjust_private_offset (klass, &ValaThrowStatement_private_offset);
443 	((ValaCodeNodeClass *) klass)->accept = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_throw_statement_real_accept;
444 	((ValaCodeNodeClass *) klass)->accept_children = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_throw_statement_real_accept_children;
445 	((ValaCodeNodeClass *) klass)->replace_expression = (void (*) (ValaCodeNode*, ValaExpression*, ValaExpression*)) vala_throw_statement_real_replace_expression;
446 	((ValaCodeNodeClass *) klass)->get_error_types = (void (*) (ValaCodeNode*, ValaCollection*, ValaSourceReference*)) vala_throw_statement_real_get_error_types;
447 	((ValaCodeNodeClass *) klass)->check = (gboolean (*) (ValaCodeNode*, ValaCodeContext*)) vala_throw_statement_real_check;
448 	((ValaCodeNodeClass *) klass)->emit = (void (*) (ValaCodeNode*, ValaCodeGenerator*)) vala_throw_statement_real_emit;
449 	((ValaCodeNodeClass *) klass)->get_defined_variables = (void (*) (ValaCodeNode*, ValaCollection*)) vala_throw_statement_real_get_defined_variables;
450 	((ValaCodeNodeClass *) klass)->get_used_variables = (void (*) (ValaCodeNode*, ValaCollection*)) vala_throw_statement_real_get_used_variables;
451 }
452 
453 static void
vala_throw_statement_vala_statement_interface_init(ValaStatementIface * iface,gpointer iface_data)454 vala_throw_statement_vala_statement_interface_init (ValaStatementIface * iface,
455                                                     gpointer iface_data)
456 {
457 	vala_throw_statement_vala_statement_parent_iface = g_type_interface_peek_parent (iface);
458 }
459 
460 static void
vala_throw_statement_instance_init(ValaThrowStatement * self,gpointer klass)461 vala_throw_statement_instance_init (ValaThrowStatement * self,
462                                     gpointer klass)
463 {
464 	self->priv = vala_throw_statement_get_instance_private (self);
465 }
466 
467 static void
vala_throw_statement_finalize(ValaCodeNode * obj)468 vala_throw_statement_finalize (ValaCodeNode * obj)
469 {
470 	ValaThrowStatement * self;
471 	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_THROW_STATEMENT, ValaThrowStatement);
472 	_vala_code_node_unref0 (self->priv->_error_expression);
473 	VALA_CODE_NODE_CLASS (vala_throw_statement_parent_class)->finalize (obj);
474 }
475 
476 /**
477  * Represents a throw statement in the source code.
478  */
479 static GType
vala_throw_statement_get_type_once(void)480 vala_throw_statement_get_type_once (void)
481 {
482 	static const GTypeInfo g_define_type_info = { sizeof (ValaThrowStatementClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_throw_statement_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaThrowStatement), 0, (GInstanceInitFunc) vala_throw_statement_instance_init, NULL };
483 	static const GInterfaceInfo vala_statement_info = { (GInterfaceInitFunc) vala_throw_statement_vala_statement_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
484 	GType vala_throw_statement_type_id;
485 	vala_throw_statement_type_id = g_type_register_static (VALA_TYPE_CODE_NODE, "ValaThrowStatement", &g_define_type_info, 0);
486 	g_type_add_interface_static (vala_throw_statement_type_id, VALA_TYPE_STATEMENT, &vala_statement_info);
487 	ValaThrowStatement_private_offset = g_type_add_instance_private (vala_throw_statement_type_id, sizeof (ValaThrowStatementPrivate));
488 	return vala_throw_statement_type_id;
489 }
490 
491 GType
vala_throw_statement_get_type(void)492 vala_throw_statement_get_type (void)
493 {
494 	static volatile gsize vala_throw_statement_type_id__volatile = 0;
495 	if (g_once_init_enter (&vala_throw_statement_type_id__volatile)) {
496 		GType vala_throw_statement_type_id;
497 		vala_throw_statement_type_id = vala_throw_statement_get_type_once ();
498 		g_once_init_leave (&vala_throw_statement_type_id__volatile, vala_throw_statement_type_id);
499 	}
500 	return vala_throw_statement_type_id__volatile;
501 }
502 
503