1 /* valacatchclause.c generated by valac, the Vala compiler
2 * generated from valacatchclause.vala, do not modify */
3
4 /* valacatchclause.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 <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 _g_free0(var) (var = (g_free (var), NULL))
35
36 struct _ValaCatchClausePrivate {
37 gchar* _variable_name;
38 gchar* _clabel_name;
39 ValaDataType* _data_type;
40 ValaBlock* _body;
41 ValaLocalVariable* _error_variable;
42 };
43
44 static gint ValaCatchClause_private_offset;
45 static gpointer vala_catch_clause_parent_class = NULL;
46
47 static void vala_catch_clause_real_accept (ValaCodeNode* base,
48 ValaCodeVisitor* visitor);
49 static void vala_catch_clause_real_accept_children (ValaCodeNode* base,
50 ValaCodeVisitor* visitor);
51 static void vala_catch_clause_real_replace_type (ValaCodeNode* base,
52 ValaDataType* old_type,
53 ValaDataType* new_type);
54 static gboolean vala_catch_clause_real_check (ValaCodeNode* base,
55 ValaCodeContext* context);
56 static void vala_catch_clause_real_emit (ValaCodeNode* base,
57 ValaCodeGenerator* codegen);
58 static void vala_catch_clause_real_get_defined_variables (ValaCodeNode* base,
59 ValaCollection* collection);
60 static void vala_catch_clause_finalize (ValaCodeNode * obj);
61 static GType vala_catch_clause_get_type_once (void);
62
63 static inline gpointer
vala_catch_clause_get_instance_private(ValaCatchClause * self)64 vala_catch_clause_get_instance_private (ValaCatchClause* self)
65 {
66 return G_STRUCT_MEMBER_P (self, ValaCatchClause_private_offset);
67 }
68
69 ValaDataType*
vala_catch_clause_get_error_type(ValaCatchClause * self)70 vala_catch_clause_get_error_type (ValaCatchClause* self)
71 {
72 ValaDataType* result;
73 ValaDataType* _tmp0_;
74 g_return_val_if_fail (self != NULL, NULL);
75 _tmp0_ = self->priv->_data_type;
76 result = _tmp0_;
77 return result;
78 }
79
80 static gpointer
_vala_code_node_ref0(gpointer self)81 _vala_code_node_ref0 (gpointer self)
82 {
83 return self ? vala_code_node_ref (self) : NULL;
84 }
85
86 void
vala_catch_clause_set_error_type(ValaCatchClause * self,ValaDataType * value)87 vala_catch_clause_set_error_type (ValaCatchClause* self,
88 ValaDataType* value)
89 {
90 ValaDataType* _tmp0_;
91 ValaDataType* _tmp1_;
92 g_return_if_fail (self != NULL);
93 _tmp0_ = _vala_code_node_ref0 (value);
94 _vala_code_node_unref0 (self->priv->_data_type);
95 self->priv->_data_type = _tmp0_;
96 _tmp1_ = self->priv->_data_type;
97 if (_tmp1_ != NULL) {
98 ValaDataType* _tmp2_;
99 _tmp2_ = self->priv->_data_type;
100 vala_code_node_set_parent_node ((ValaCodeNode*) _tmp2_, (ValaCodeNode*) self);
101 }
102 }
103
104 const gchar*
vala_catch_clause_get_variable_name(ValaCatchClause * self)105 vala_catch_clause_get_variable_name (ValaCatchClause* self)
106 {
107 const gchar* result;
108 const gchar* _tmp0_;
109 g_return_val_if_fail (self != NULL, NULL);
110 _tmp0_ = self->priv->_variable_name;
111 result = _tmp0_;
112 return result;
113 }
114
115 void
vala_catch_clause_set_variable_name(ValaCatchClause * self,const gchar * value)116 vala_catch_clause_set_variable_name (ValaCatchClause* self,
117 const gchar* value)
118 {
119 gchar* _tmp0_;
120 g_return_if_fail (self != NULL);
121 _tmp0_ = g_strdup (value);
122 _g_free0 (self->priv->_variable_name);
123 self->priv->_variable_name = _tmp0_;
124 }
125
126 ValaBlock*
vala_catch_clause_get_body(ValaCatchClause * self)127 vala_catch_clause_get_body (ValaCatchClause* self)
128 {
129 ValaBlock* result;
130 ValaBlock* _tmp0_;
131 g_return_val_if_fail (self != NULL, NULL);
132 _tmp0_ = self->priv->_body;
133 result = _tmp0_;
134 return result;
135 }
136
137 void
vala_catch_clause_set_body(ValaCatchClause * self,ValaBlock * value)138 vala_catch_clause_set_body (ValaCatchClause* self,
139 ValaBlock* value)
140 {
141 ValaBlock* _tmp0_;
142 ValaBlock* _tmp1_;
143 g_return_if_fail (self != NULL);
144 _tmp0_ = _vala_code_node_ref0 (value);
145 _vala_code_node_unref0 (self->priv->_body);
146 self->priv->_body = _tmp0_;
147 _tmp1_ = self->priv->_body;
148 vala_code_node_set_parent_node ((ValaCodeNode*) _tmp1_, (ValaCodeNode*) self);
149 }
150
151 ValaLocalVariable*
vala_catch_clause_get_error_variable(ValaCatchClause * self)152 vala_catch_clause_get_error_variable (ValaCatchClause* self)
153 {
154 ValaLocalVariable* result;
155 ValaLocalVariable* _tmp0_;
156 g_return_val_if_fail (self != NULL, NULL);
157 _tmp0_ = self->priv->_error_variable;
158 result = _tmp0_;
159 return result;
160 }
161
162 void
vala_catch_clause_set_error_variable(ValaCatchClause * self,ValaLocalVariable * value)163 vala_catch_clause_set_error_variable (ValaCatchClause* self,
164 ValaLocalVariable* value)
165 {
166 ValaLocalVariable* _tmp0_;
167 ValaLocalVariable* _tmp1_;
168 g_return_if_fail (self != NULL);
169 _tmp0_ = _vala_code_node_ref0 (value);
170 _vala_code_node_unref0 (self->priv->_error_variable);
171 self->priv->_error_variable = _tmp0_;
172 _tmp1_ = self->priv->_error_variable;
173 vala_code_node_set_parent_node ((ValaCodeNode*) _tmp1_, (ValaCodeNode*) self);
174 }
175
176 const gchar*
vala_catch_clause_get_clabel_name(ValaCatchClause * self)177 vala_catch_clause_get_clabel_name (ValaCatchClause* self)
178 {
179 const gchar* result;
180 const gchar* _tmp0_;
181 g_return_val_if_fail (self != NULL, NULL);
182 _tmp0_ = self->priv->_clabel_name;
183 result = _tmp0_;
184 return result;
185 }
186
187 void
vala_catch_clause_set_clabel_name(ValaCatchClause * self,const gchar * value)188 vala_catch_clause_set_clabel_name (ValaCatchClause* self,
189 const gchar* value)
190 {
191 gchar* _tmp0_;
192 g_return_if_fail (self != NULL);
193 _tmp0_ = g_strdup (value);
194 _g_free0 (self->priv->_clabel_name);
195 self->priv->_clabel_name = _tmp0_;
196 }
197
198 /**
199 * Creates a new catch
200 *
201 * @param error_type error type
202 * @param variable_name error variable name
203 * @param body error handler body
204 * @param source_reference reference to source code
205 * @return newly created catch clause
206 */
207 ValaCatchClause*
vala_catch_clause_construct(GType object_type,ValaDataType * error_type,const gchar * variable_name,ValaBlock * body,ValaSourceReference * source_reference)208 vala_catch_clause_construct (GType object_type,
209 ValaDataType* error_type,
210 const gchar* variable_name,
211 ValaBlock* body,
212 ValaSourceReference* source_reference)
213 {
214 ValaCatchClause* self = NULL;
215 g_return_val_if_fail (body != NULL, NULL);
216 self = (ValaCatchClause*) vala_code_node_construct (object_type);
217 vala_catch_clause_set_error_type (self, error_type);
218 vala_catch_clause_set_variable_name (self, variable_name);
219 vala_catch_clause_set_body (self, body);
220 vala_code_node_set_source_reference ((ValaCodeNode*) self, source_reference);
221 return self;
222 }
223
224 ValaCatchClause*
vala_catch_clause_new(ValaDataType * error_type,const gchar * variable_name,ValaBlock * body,ValaSourceReference * source_reference)225 vala_catch_clause_new (ValaDataType* error_type,
226 const gchar* variable_name,
227 ValaBlock* body,
228 ValaSourceReference* source_reference)
229 {
230 return vala_catch_clause_construct (VALA_TYPE_CATCH_CLAUSE, error_type, variable_name, body, source_reference);
231 }
232
233 static void
vala_catch_clause_real_accept(ValaCodeNode * base,ValaCodeVisitor * visitor)234 vala_catch_clause_real_accept (ValaCodeNode* base,
235 ValaCodeVisitor* visitor)
236 {
237 ValaCatchClause * self;
238 self = (ValaCatchClause*) base;
239 g_return_if_fail (visitor != NULL);
240 vala_code_visitor_visit_catch_clause (visitor, self);
241 }
242
243 static void
vala_catch_clause_real_accept_children(ValaCodeNode * base,ValaCodeVisitor * visitor)244 vala_catch_clause_real_accept_children (ValaCodeNode* base,
245 ValaCodeVisitor* visitor)
246 {
247 ValaCatchClause * self;
248 ValaDataType* _tmp0_;
249 ValaDataType* _tmp1_;
250 ValaBlock* _tmp4_;
251 ValaBlock* _tmp5_;
252 self = (ValaCatchClause*) base;
253 g_return_if_fail (visitor != NULL);
254 _tmp0_ = vala_catch_clause_get_error_type (self);
255 _tmp1_ = _tmp0_;
256 if (_tmp1_ != NULL) {
257 ValaDataType* _tmp2_;
258 ValaDataType* _tmp3_;
259 _tmp2_ = vala_catch_clause_get_error_type (self);
260 _tmp3_ = _tmp2_;
261 vala_code_node_accept ((ValaCodeNode*) _tmp3_, visitor);
262 }
263 _tmp4_ = vala_catch_clause_get_body (self);
264 _tmp5_ = _tmp4_;
265 vala_code_node_accept ((ValaCodeNode*) _tmp5_, visitor);
266 }
267
268 static void
vala_catch_clause_real_replace_type(ValaCodeNode * base,ValaDataType * old_type,ValaDataType * new_type)269 vala_catch_clause_real_replace_type (ValaCodeNode* base,
270 ValaDataType* old_type,
271 ValaDataType* new_type)
272 {
273 ValaCatchClause * self;
274 ValaDataType* _tmp0_;
275 ValaDataType* _tmp1_;
276 self = (ValaCatchClause*) base;
277 g_return_if_fail (old_type != NULL);
278 g_return_if_fail (new_type != NULL);
279 _tmp0_ = vala_catch_clause_get_error_type (self);
280 _tmp1_ = _tmp0_;
281 if (_tmp1_ == old_type) {
282 vala_catch_clause_set_error_type (self, new_type);
283 }
284 }
285
286 static gboolean
vala_catch_clause_real_check(ValaCodeNode * base,ValaCodeContext * context)287 vala_catch_clause_real_check (ValaCodeNode* base,
288 ValaCodeContext* context)
289 {
290 ValaCatchClause * self;
291 gboolean _tmp0_;
292 gboolean _tmp1_;
293 ValaProfile _tmp4_;
294 ValaProfile _tmp5_;
295 ValaDataType* _tmp8_;
296 ValaDataType* _tmp9_;
297 ValaDataType* _tmp47_;
298 ValaDataType* _tmp48_;
299 ValaBlock* _tmp49_;
300 ValaBlock* _tmp50_;
301 gboolean _tmp51_;
302 gboolean _tmp52_;
303 gboolean result = FALSE;
304 self = (ValaCatchClause*) base;
305 g_return_val_if_fail (context != NULL, FALSE);
306 _tmp0_ = vala_code_node_get_checked ((ValaCodeNode*) self);
307 _tmp1_ = _tmp0_;
308 if (_tmp1_) {
309 gboolean _tmp2_;
310 gboolean _tmp3_;
311 _tmp2_ = vala_code_node_get_error ((ValaCodeNode*) self);
312 _tmp3_ = _tmp2_;
313 result = !_tmp3_;
314 return result;
315 }
316 vala_code_node_set_checked ((ValaCodeNode*) self, TRUE);
317 _tmp4_ = vala_code_context_get_profile (context);
318 _tmp5_ = _tmp4_;
319 if (_tmp5_ == VALA_PROFILE_POSIX) {
320 ValaSourceReference* _tmp6_;
321 ValaSourceReference* _tmp7_;
322 _tmp6_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
323 _tmp7_ = _tmp6_;
324 vala_report_error (_tmp7_, "`catch' is not supported in POSIX profile");
325 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
326 result = FALSE;
327 return result;
328 }
329 _tmp8_ = vala_catch_clause_get_error_type (self);
330 _tmp9_ = _tmp8_;
331 if (_tmp9_ != NULL) {
332 ValaDataType* _tmp10_;
333 ValaDataType* _tmp11_;
334 const gchar* _tmp20_;
335 _tmp10_ = vala_catch_clause_get_error_type (self);
336 _tmp11_ = _tmp10_;
337 if (!VALA_IS_ERROR_TYPE (_tmp11_)) {
338 ValaSourceReference* _tmp12_;
339 ValaSourceReference* _tmp13_;
340 ValaDataType* _tmp14_;
341 ValaDataType* _tmp15_;
342 gchar* _tmp16_;
343 gchar* _tmp17_;
344 gchar* _tmp18_;
345 gchar* _tmp19_;
346 _tmp12_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
347 _tmp13_ = _tmp12_;
348 _tmp14_ = vala_catch_clause_get_error_type (self);
349 _tmp15_ = _tmp14_;
350 _tmp16_ = vala_code_node_to_string ((ValaCodeNode*) _tmp15_);
351 _tmp17_ = _tmp16_;
352 _tmp18_ = g_strdup_printf ("clause must catch a valid error type, found `%s' instead", _tmp17_);
353 _tmp19_ = _tmp18_;
354 vala_report_error (_tmp13_, _tmp19_);
355 _g_free0 (_tmp19_);
356 _g_free0 (_tmp17_);
357 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
358 }
359 _tmp20_ = self->priv->_variable_name;
360 if (_tmp20_ != NULL) {
361 ValaDataType* _tmp21_;
362 ValaDataType* _tmp22_;
363 ValaDataType* _tmp23_;
364 ValaDataType* _tmp24_;
365 const gchar* _tmp25_;
366 ValaSourceReference* _tmp26_;
367 ValaSourceReference* _tmp27_;
368 ValaLocalVariable* _tmp28_;
369 ValaLocalVariable* _tmp29_;
370 ValaBlock* _tmp30_;
371 ValaBlock* _tmp31_;
372 ValaScope* _tmp32_;
373 ValaScope* _tmp33_;
374 const gchar* _tmp34_;
375 ValaLocalVariable* _tmp35_;
376 ValaLocalVariable* _tmp36_;
377 ValaBlock* _tmp37_;
378 ValaBlock* _tmp38_;
379 ValaLocalVariable* _tmp39_;
380 ValaLocalVariable* _tmp40_;
381 ValaLocalVariable* _tmp41_;
382 ValaLocalVariable* _tmp42_;
383 _tmp21_ = vala_catch_clause_get_error_type (self);
384 _tmp22_ = _tmp21_;
385 _tmp23_ = vala_data_type_copy (_tmp22_);
386 _tmp24_ = _tmp23_;
387 _tmp25_ = self->priv->_variable_name;
388 _tmp26_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
389 _tmp27_ = _tmp26_;
390 _tmp28_ = vala_local_variable_new (_tmp24_, _tmp25_, NULL, _tmp27_);
391 _tmp29_ = _tmp28_;
392 vala_catch_clause_set_error_variable (self, _tmp29_);
393 _vala_code_node_unref0 (_tmp29_);
394 _vala_code_node_unref0 (_tmp24_);
395 _tmp30_ = vala_catch_clause_get_body (self);
396 _tmp31_ = _tmp30_;
397 _tmp32_ = vala_symbol_get_scope ((ValaSymbol*) _tmp31_);
398 _tmp33_ = _tmp32_;
399 _tmp34_ = self->priv->_variable_name;
400 _tmp35_ = vala_catch_clause_get_error_variable (self);
401 _tmp36_ = _tmp35_;
402 vala_scope_add (_tmp33_, _tmp34_, (ValaSymbol*) _tmp36_);
403 _tmp37_ = vala_catch_clause_get_body (self);
404 _tmp38_ = _tmp37_;
405 _tmp39_ = vala_catch_clause_get_error_variable (self);
406 _tmp40_ = _tmp39_;
407 vala_block_add_local_variable (_tmp38_, _tmp40_);
408 _tmp41_ = vala_catch_clause_get_error_variable (self);
409 _tmp42_ = _tmp41_;
410 vala_code_node_set_checked ((ValaCodeNode*) _tmp42_, TRUE);
411 }
412 } else {
413 ValaSourceReference* _tmp43_;
414 ValaSourceReference* _tmp44_;
415 ValaErrorType* _tmp45_;
416 ValaErrorType* _tmp46_;
417 _tmp43_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
418 _tmp44_ = _tmp43_;
419 _tmp45_ = vala_error_type_new (NULL, NULL, _tmp44_);
420 _tmp46_ = _tmp45_;
421 vala_catch_clause_set_error_type (self, (ValaDataType*) _tmp46_);
422 _vala_code_node_unref0 (_tmp46_);
423 }
424 _tmp47_ = vala_catch_clause_get_error_type (self);
425 _tmp48_ = _tmp47_;
426 vala_code_node_check ((ValaCodeNode*) _tmp48_, context);
427 _tmp49_ = vala_catch_clause_get_body (self);
428 _tmp50_ = _tmp49_;
429 vala_code_node_check ((ValaCodeNode*) _tmp50_, context);
430 _tmp51_ = vala_code_node_get_error ((ValaCodeNode*) self);
431 _tmp52_ = _tmp51_;
432 result = !_tmp52_;
433 return result;
434 }
435
436 static void
vala_catch_clause_real_emit(ValaCodeNode * base,ValaCodeGenerator * codegen)437 vala_catch_clause_real_emit (ValaCodeNode* base,
438 ValaCodeGenerator* codegen)
439 {
440 ValaCatchClause * self;
441 ValaLocalVariable* _tmp0_;
442 ValaLocalVariable* _tmp1_;
443 self = (ValaCatchClause*) base;
444 g_return_if_fail (codegen != NULL);
445 _tmp0_ = vala_catch_clause_get_error_variable (self);
446 _tmp1_ = _tmp0_;
447 if (_tmp1_ != NULL) {
448 ValaLocalVariable* _tmp2_;
449 ValaLocalVariable* _tmp3_;
450 _tmp2_ = vala_catch_clause_get_error_variable (self);
451 _tmp3_ = _tmp2_;
452 vala_symbol_set_active ((ValaSymbol*) _tmp3_, TRUE);
453 }
454 vala_code_visitor_visit_catch_clause ((ValaCodeVisitor*) codegen, self);
455 }
456
457 static void
vala_catch_clause_real_get_defined_variables(ValaCodeNode * base,ValaCollection * collection)458 vala_catch_clause_real_get_defined_variables (ValaCodeNode* base,
459 ValaCollection* collection)
460 {
461 ValaCatchClause * self;
462 ValaLocalVariable* _tmp0_;
463 ValaLocalVariable* _tmp1_;
464 self = (ValaCatchClause*) base;
465 g_return_if_fail (collection != NULL);
466 _tmp0_ = vala_catch_clause_get_error_variable (self);
467 _tmp1_ = _tmp0_;
468 if (_tmp1_ != NULL) {
469 ValaLocalVariable* _tmp2_;
470 ValaLocalVariable* _tmp3_;
471 _tmp2_ = vala_catch_clause_get_error_variable (self);
472 _tmp3_ = _tmp2_;
473 vala_collection_add (collection, (ValaVariable*) _tmp3_);
474 }
475 }
476
477 static void
vala_catch_clause_class_init(ValaCatchClauseClass * klass,gpointer klass_data)478 vala_catch_clause_class_init (ValaCatchClauseClass * klass,
479 gpointer klass_data)
480 {
481 vala_catch_clause_parent_class = g_type_class_peek_parent (klass);
482 ((ValaCodeNodeClass *) klass)->finalize = vala_catch_clause_finalize;
483 g_type_class_adjust_private_offset (klass, &ValaCatchClause_private_offset);
484 ((ValaCodeNodeClass *) klass)->accept = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_catch_clause_real_accept;
485 ((ValaCodeNodeClass *) klass)->accept_children = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_catch_clause_real_accept_children;
486 ((ValaCodeNodeClass *) klass)->replace_type = (void (*) (ValaCodeNode*, ValaDataType*, ValaDataType*)) vala_catch_clause_real_replace_type;
487 ((ValaCodeNodeClass *) klass)->check = (gboolean (*) (ValaCodeNode*, ValaCodeContext*)) vala_catch_clause_real_check;
488 ((ValaCodeNodeClass *) klass)->emit = (void (*) (ValaCodeNode*, ValaCodeGenerator*)) vala_catch_clause_real_emit;
489 ((ValaCodeNodeClass *) klass)->get_defined_variables = (void (*) (ValaCodeNode*, ValaCollection*)) vala_catch_clause_real_get_defined_variables;
490 }
491
492 static void
vala_catch_clause_instance_init(ValaCatchClause * self,gpointer klass)493 vala_catch_clause_instance_init (ValaCatchClause * self,
494 gpointer klass)
495 {
496 self->priv = vala_catch_clause_get_instance_private (self);
497 }
498
499 static void
vala_catch_clause_finalize(ValaCodeNode * obj)500 vala_catch_clause_finalize (ValaCodeNode * obj)
501 {
502 ValaCatchClause * self;
503 self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_CATCH_CLAUSE, ValaCatchClause);
504 _g_free0 (self->priv->_variable_name);
505 _g_free0 (self->priv->_clabel_name);
506 _vala_code_node_unref0 (self->priv->_data_type);
507 _vala_code_node_unref0 (self->priv->_body);
508 _vala_code_node_unref0 (self->priv->_error_variable);
509 VALA_CODE_NODE_CLASS (vala_catch_clause_parent_class)->finalize (obj);
510 }
511
512 /**
513 * Represents a catch clause in a try statement in the source code.
514 */
515 static GType
vala_catch_clause_get_type_once(void)516 vala_catch_clause_get_type_once (void)
517 {
518 static const GTypeInfo g_define_type_info = { sizeof (ValaCatchClauseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_catch_clause_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCatchClause), 0, (GInstanceInitFunc) vala_catch_clause_instance_init, NULL };
519 GType vala_catch_clause_type_id;
520 vala_catch_clause_type_id = g_type_register_static (VALA_TYPE_CODE_NODE, "ValaCatchClause", &g_define_type_info, 0);
521 ValaCatchClause_private_offset = g_type_add_instance_private (vala_catch_clause_type_id, sizeof (ValaCatchClausePrivate));
522 return vala_catch_clause_type_id;
523 }
524
525 GType
vala_catch_clause_get_type(void)526 vala_catch_clause_get_type (void)
527 {
528 static volatile gsize vala_catch_clause_type_id__volatile = 0;
529 if (g_once_init_enter (&vala_catch_clause_type_id__volatile)) {
530 GType vala_catch_clause_type_id;
531 vala_catch_clause_type_id = vala_catch_clause_get_type_once ();
532 g_once_init_leave (&vala_catch_clause_type_id__volatile, vala_catch_clause_type_id);
533 }
534 return vala_catch_clause_type_id__volatile;
535 }
536
537