~ubuntu-branches/ubuntu/maverick/vala/maverick

« back to all changes in this revision

Viewing changes to codegen/valaccodemethodmodule.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-04-02 10:10:55 UTC
  • mfrom: (1.4.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100402101055-qbx3okzv0tnp3wpp
Tags: 0.8.0-0ubuntu1
* New upstream release:
  - Infer type arguments when calling generic methods.
  - Support `in' operator for arrays.
  - Add experimental support for regular expression literals.
  - Add experimental support for chained relational expressions.
  - Add va_list support.
  - Add clutter-gtk-0.10 bindings (Gordon Allott).
  - Add gdl-1.0 bindings (Nicolas Joseph).
  - Add gstreamer-app-0.10 bindings (Sebastian Dröge).
  - Add gstreamer-cdda-0.10 bindings (Sebastian Dröge).
  - Add gudev-1.0 bindings (Jim Nelson).
  - Add libgda-report-4.0 bindings (Shawn Ferris).
  - Add libgvc (graphviz) bindings (Martin Olsson).
  - Add purple bindings (Adrien Bustany).
  - Many bug fixes and binding updates.
* debian/patches/99_ltmain_as-needed.patch: refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
        void (*visit_try_statement) (ValaCCodeModule* self, ValaTryStatement* stmt);
153
153
        void (*visit_catch_clause) (ValaCCodeModule* self, ValaCatchClause* clause);
154
154
        void (*visit_lock_statement) (ValaCCodeModule* self, ValaLockStatement* stmt);
 
155
        void (*visit_unlock_statement) (ValaCCodeModule* self, ValaUnlockStatement* stmt);
155
156
        void (*visit_delete_statement) (ValaCCodeModule* self, ValaDeleteStatement* stmt);
156
157
        void (*visit_expression) (ValaCCodeModule* self, ValaExpression* expr);
157
158
        void (*visit_array_creation_expression) (ValaCCodeModule* self, ValaArrayCreationExpression* expr);
160
161
        void (*visit_integer_literal) (ValaCCodeModule* self, ValaIntegerLiteral* expr);
161
162
        void (*visit_real_literal) (ValaCCodeModule* self, ValaRealLiteral* expr);
162
163
        void (*visit_string_literal) (ValaCCodeModule* self, ValaStringLiteral* expr);
 
164
        void (*visit_list_literal) (ValaCCodeModule* self, ValaListLiteral* expr);
 
165
        void (*visit_set_literal) (ValaCCodeModule* self, ValaSetLiteral* expr);
 
166
        void (*visit_map_literal) (ValaCCodeModule* self, ValaMapLiteral* expr);
 
167
        void (*visit_tuple) (ValaCCodeModule* self, ValaTuple* expr);
 
168
        void (*visit_regex_literal) (ValaCCodeModule* self, ValaRegexLiteral* re);
163
169
        void (*visit_null_literal) (ValaCCodeModule* self, ValaNullLiteral* expr);
164
170
        void (*visit_member_access) (ValaCCodeModule* self, ValaMemberAccess* expr);
165
171
        void (*visit_method_call) (ValaCCodeModule* self, ValaMethodCall* expr);
184
190
        void (*generate_dynamic_method_wrapper) (ValaCCodeModule* self, ValaDynamicMethod* method);
185
191
        gboolean (*method_has_wrapper) (ValaCCodeModule* self, ValaMethod* method);
186
192
        ValaCCodeIdentifier* (*get_value_setter_function) (ValaCCodeModule* self, ValaDataType* type_reference);
 
193
        ValaCCodeIdentifier* (*get_value_taker_function) (ValaCCodeModule* self, ValaDataType* type_reference);
187
194
        ValaCCodeExpression* (*get_construct_property_assignment) (ValaCCodeModule* self, ValaCCodeConstant* canonical_cconstant, ValaDataType* property_type, ValaCCodeExpression* value);
188
195
        ValaCCodeFunctionCall* (*get_param_spec) (ValaCCodeModule* self, ValaProperty* prop);
189
196
        ValaCCodeFunctionCall* (*get_signal_creation) (ValaCCodeModule* self, ValaSignal* sig, ValaTypeSymbol* type);
192
199
        char* (*get_dynamic_property_setter_cname) (ValaCCodeModule* self, ValaDynamicProperty* node);
193
200
        char* (*get_dynamic_signal_cname) (ValaCCodeModule* self, ValaDynamicSignal* node);
194
201
        char* (*get_dynamic_signal_connect_wrapper_name) (ValaCCodeModule* self, ValaDynamicSignal* node);
 
202
        char* (*get_dynamic_signal_connect_after_wrapper_name) (ValaCCodeModule* self, ValaDynamicSignal* node);
195
203
        char* (*get_dynamic_signal_disconnect_wrapper_name) (ValaCCodeModule* self, ValaDynamicSignal* node);
196
204
        void (*generate_marshaller) (ValaCCodeModule* self, ValaList* params, ValaDataType* return_type, gboolean dbus);
197
205
        char* (*get_marshaller_function) (ValaCCodeModule* self, ValaList* params, ValaDataType* return_type, const char* prefix, gboolean dbus);
199
207
        ValaCCodeExpression* (*get_array_length_cexpression) (ValaCCodeModule* self, ValaExpression* array_expr, gint dim);
200
208
        char* (*get_array_size_cname) (ValaCCodeModule* self, const char* array_cname);
201
209
        ValaCCodeExpression* (*get_array_size_cexpression) (ValaCCodeModule* self, ValaExpression* array_expr);
202
 
        void (*add_simple_check) (ValaCCodeModule* self, ValaCodeNode* node, ValaCCodeFragment* cfrag);
 
210
        void (*add_simple_check) (ValaCCodeModule* self, ValaCodeNode* node, ValaCCodeFragment* cfrag, gboolean always_fails);
203
211
};
204
212
 
205
213
struct _ValaCCodeBaseModule {
225
233
        ValaCCodeEnum* prop_enum;
226
234
        ValaCCodeFunction* function;
227
235
        ValaCCodeFragment* pre_statement_fragment;
 
236
        ValaCCodeSwitchStatement* state_switch_statement;
228
237
        ValaArrayList* temp_vars;
229
238
        ValaArrayList* temp_ref_vars;
230
239
        ValaSet* user_marshal_set;
231
240
        ValaSet* predefined_marshal_set;
232
241
        gint next_temp_var_id;
 
242
        gint next_regex_id;
233
243
        gboolean in_constructor;
234
244
        gboolean in_static_or_class_context;
235
245
        gboolean current_method_inner_error;
254
264
        ValaDataType* int64_type;
255
265
        ValaDataType* uint64_type;
256
266
        ValaDataType* string_type;
 
267
        ValaDataType* regex_type;
257
268
        ValaDataType* float_type;
258
269
        ValaDataType* double_type;
259
270
        ValaTypeSymbol* gtype_type;
268
279
        ValaTypeSymbol* gptrarray_type;
269
280
        ValaTypeSymbol* gthreadpool_type;
270
281
        ValaDataType* gquark_type;
 
282
        ValaDataType* genumvalue_type;
271
283
        ValaStruct* gvalue_type;
272
284
        ValaStruct* mutex_type;
273
285
        ValaTypeSymbol* type_module_type;
339
351
void vala_ccode_module_unref (gpointer instance);
340
352
GParamSpec* vala_param_spec_ccode_module (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
341
353
void vala_value_set_ccode_module (GValue* value, gpointer v_object);
 
354
void vala_value_take_ccode_module (GValue* value, gpointer v_object);
342
355
gpointer vala_value_get_ccode_module (const GValue* value);
343
356
GType vala_ccode_module_get_type (void);
344
357
GType vala_ccode_base_module_get_type (void);
346
359
void vala_ccode_declaration_space_unref (gpointer instance);
347
360
GParamSpec* vala_param_spec_ccode_declaration_space (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
348
361
void vala_value_set_ccode_declaration_space (GValue* value, gpointer v_object);
 
362
void vala_value_take_ccode_declaration_space (GValue* value, gpointer v_object);
349
363
gpointer vala_value_get_ccode_declaration_space (const GValue* value);
350
364
GType vala_ccode_declaration_space_get_type (void);
351
365
GType vala_ccode_struct_module_get_type (void);
394
408
ValaCCodeExpression* vala_ccode_base_module_transform_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
395
409
static ValaCCodeStatement* vala_ccode_method_module_create_method_type_check_statement (ValaCCodeMethodModule* self, ValaMethod* m, ValaDataType* return_type, ValaTypeSymbol* t, gboolean non_null, const char* var_name);
396
410
char* vala_ccode_base_module_get_variable_cname (ValaCCodeBaseModule* self, const char* name);
 
411
ValaCCodeExpression* vala_ccode_base_module_default_value_for_type (ValaCCodeBaseModule* self, ValaDataType* type, gboolean initializer_expression);
397
412
ValaCCodeExpression* vala_ccode_module_get_construct_property_assignment (ValaCCodeModule* self, ValaCCodeConstant* canonical_cconstant, ValaDataType* property_type, ValaCCodeExpression* value);
398
413
void vala_ccode_declaration_space_add_include (ValaCCodeDeclarationSpace* self, const char* filename, gboolean local);
399
414
ValaCodeContext* vala_ccode_base_module_get_context (ValaCCodeBaseModule* self);
400
415
static ValaCCodeStatement* vala_ccode_method_module_create_precondition_statement (ValaCCodeMethodModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaExpression* precondition);
401
 
ValaCCodeExpression* vala_ccode_base_module_default_value_for_type (ValaCCodeBaseModule* self, ValaDataType* type, gboolean initializer_expression);
402
416
void vala_ccode_method_module_generate_vfunc (ValaCCodeMethodModule* self, ValaMethod* m, ValaDataType* return_type, ValaMap* cparam_map, ValaMap* carg_map, const char* suffix, gint direction);
403
417
static void vala_ccode_method_module_real_visit_method (ValaCCodeModule* base, ValaMethod* m);
404
418
void vala_ccode_method_module_generate_parameter (ValaCCodeMethodModule* self, ValaFormalParameter* param, ValaCCodeDeclarationSpace* decl_space, ValaMap* cparam_map, ValaMap* carg_map);
427
441
 
428
442
static gboolean vala_ccode_method_module_real_method_has_wrapper (ValaCCodeModule* base, ValaMethod* method) {
429
443
        ValaCCodeMethodModule * self;
430
 
        gboolean result;
 
444
        gboolean result = FALSE;
431
445
        ValaAttribute* _tmp0_;
432
446
        gboolean _tmp1_;
433
447
        self = (ValaCCodeMethodModule*) base;
439
453
 
440
454
static char* vala_ccode_method_module_real_get_custom_creturn_type (ValaCCodeModule* base, ValaMethod* m) {
441
455
        ValaCCodeMethodModule * self;
442
 
        char* result;
 
456
        char* result = NULL;
443
457
        ValaAttribute* attr;
444
458
        self = (ValaCCodeMethodModule*) base;
445
459
        g_return_val_if_fail (m != NULL, NULL);
461
475
 
462
476
 
463
477
static char* vala_ccode_method_module_get_creturn_type (ValaCCodeMethodModule* self, ValaMethod* m, const char* default_value) {
464
 
        char* result;
 
478
        char* result = NULL;
465
479
        char* type;
466
480
        g_return_val_if_fail (self != NULL, NULL);
467
481
        g_return_val_if_fail (m != NULL, NULL);
483
497
 
484
498
 
485
499
static gboolean vala_ccode_method_module_is_gtypeinstance_creation_method (ValaCCodeMethodModule* self, ValaMethod* m) {
486
 
        gboolean result;
 
500
        gboolean result = FALSE;
487
501
        gboolean _result_;
488
502
        ValaSymbol* _tmp0_;
489
503
        ValaClass* cl;
517
531
        char* _tmp4_;
518
532
        char* _tmp3_;
519
533
        gboolean _tmp20_ = FALSE;
520
 
        ValaList* _tmp21_;
521
 
        gboolean _tmp22_;
 
534
        gboolean _tmp21_ = FALSE;
 
535
        ValaList* _tmp22_;
 
536
        gboolean _tmp23_;
522
537
        g_return_if_fail (self != NULL);
523
538
        g_return_if_fail (m != NULL);
524
539
        g_return_if_fail (decl_space != NULL);
632
647
                        }
633
648
                }
634
649
        }
635
 
        if ((_tmp22_ = vala_collection_get_size ((ValaCollection*) (_tmp21_ = vala_code_node_get_error_types ((ValaCodeNode*) m))) > 0, _vala_collection_object_unref0 (_tmp21_), _tmp22_)) {
 
650
        if ((_tmp23_ = vala_collection_get_size ((ValaCollection*) (_tmp22_ = vala_code_node_get_error_types ((ValaCodeNode*) m))) > 0, _vala_collection_object_unref0 (_tmp22_), _tmp23_)) {
 
651
                _tmp21_ = TRUE;
 
652
        } else {
 
653
                gboolean _tmp24_ = FALSE;
 
654
                if (vala_method_get_base_method (m) != NULL) {
 
655
                        ValaList* _tmp25_;
 
656
                        _tmp24_ = vala_collection_get_size ((ValaCollection*) (_tmp25_ = vala_code_node_get_error_types ((ValaCodeNode*) vala_method_get_base_method (m)))) > 0;
 
657
                        _vala_collection_object_unref0 (_tmp25_);
 
658
                } else {
 
659
                        _tmp24_ = FALSE;
 
660
                }
 
661
                _tmp21_ = _tmp24_;
 
662
        }
 
663
        if (_tmp21_) {
636
664
                _tmp20_ = TRUE;
637
665
        } else {
638
 
                gboolean _tmp23_ = FALSE;
639
 
                if (vala_method_get_base_method (m) != NULL) {
640
 
                        ValaList* _tmp24_;
641
 
                        _tmp23_ = vala_collection_get_size ((ValaCollection*) (_tmp24_ = vala_code_node_get_error_types ((ValaCodeNode*) vala_method_get_base_method (m)))) > 0;
642
 
                        _vala_collection_object_unref0 (_tmp24_);
 
666
                gboolean _tmp26_ = FALSE;
 
667
                if (vala_method_get_base_interface_method (m) != NULL) {
 
668
                        ValaList* _tmp27_;
 
669
                        _tmp26_ = vala_collection_get_size ((ValaCollection*) (_tmp27_ = vala_code_node_get_error_types ((ValaCodeNode*) vala_method_get_base_interface_method (m)))) > 0;
 
670
                        _vala_collection_object_unref0 (_tmp27_);
643
671
                } else {
644
 
                        _tmp23_ = FALSE;
 
672
                        _tmp26_ = FALSE;
645
673
                }
646
 
                _tmp20_ = _tmp23_;
 
674
                _tmp20_ = _tmp26_;
647
675
        }
648
676
        if (_tmp20_) {
649
677
                ValaCCodeFormalParameter* cparam;
650
678
                {
651
 
                        ValaList* _tmp25_;
652
 
                        ValaIterator* _tmp26_;
 
679
                        ValaList* _tmp28_;
 
680
                        ValaIterator* _tmp29_;
653
681
                        ValaIterator* _error_type_it;
654
 
                        _error_type_it = (_tmp26_ = vala_iterable_iterator ((ValaIterable*) (_tmp25_ = vala_code_node_get_error_types ((ValaCodeNode*) m))), _vala_collection_object_unref0 (_tmp25_), _tmp26_);
 
682
                        _error_type_it = (_tmp29_ = vala_iterable_iterator ((ValaIterable*) (_tmp28_ = vala_code_node_get_error_types ((ValaCodeNode*) m))), _vala_collection_object_unref0 (_tmp28_), _tmp29_);
655
683
                        while (TRUE) {
656
684
                                ValaDataType* error_type;
657
685
                                if (!vala_iterator_next (_error_type_it)) {
666
694
                cparam = vala_ccode_formal_parameter_new ("error", "GError**");
667
695
                vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (double) (-1), FALSE)), cparam);
668
696
                if (carg_map != NULL) {
669
 
                        ValaCCodeIdentifier* _tmp27_;
670
 
                        vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (double) (-1), FALSE)), (ValaCCodeExpression*) (_tmp27_ = vala_ccode_identifier_new (vala_ccode_formal_parameter_get_name (cparam))));
671
 
                        _vala_ccode_node_unref0 (_tmp27_);
 
697
                        ValaCCodeIdentifier* _tmp30_;
 
698
                        vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (double) (-1), FALSE)), (ValaCCodeExpression*) (_tmp30_ = vala_ccode_identifier_new (vala_ccode_formal_parameter_get_name (cparam))));
 
699
                        _vala_ccode_node_unref0 (_tmp30_);
672
700
                }
673
701
                _vala_ccode_node_unref0 (cparam);
674
702
        }
682
710
 
683
711
 
684
712
ValaCCodeStatement* vala_ccode_method_module_complete_async (ValaCCodeMethodModule* self) {
685
 
        ValaCCodeStatement* result;
 
713
        ValaCCodeStatement* result = NULL;
686
714
        ValaCCodeBlock* complete_block;
687
715
        ValaCCodeBlock* direct_block;
688
716
        ValaCCodeIdentifier* _tmp0_;
756
784
        char* _tmp2_;
757
785
        ValaCCodeFunction* _tmp3_;
758
786
        ValaCCodeFunction* function;
 
787
        gboolean _tmp4_ = FALSE;
759
788
        ValaHashMap* cparam_map;
760
789
        ValaHashMap* carg_map;
761
 
        ValaSymbol* _tmp4_;
 
790
        ValaSymbol* _tmp5_;
762
791
        ValaClass* cl;
763
 
        gboolean _tmp5_ = FALSE;
764
792
        gboolean _tmp6_ = FALSE;
765
 
        gboolean _tmp9_ = FALSE;
 
793
        gboolean _tmp7_ = FALSE;
 
794
        gboolean _tmp10_ = FALSE;
766
795
        self = (ValaCCodeMethodModule*) base;
767
796
        g_return_if_fail (m != NULL);
768
797
        g_return_if_fail (decl_space != NULL);
774
803
        }
775
804
        function = (_tmp3_ = vala_ccode_function_new (_tmp2_ = vala_method_get_cname (m), "void"), _g_free0 (_tmp2_), _tmp3_);
776
805
        if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
 
806
                _tmp4_ = !vala_symbol_get_external ((ValaSymbol*) m);
 
807
        } else {
 
808
                _tmp4_ = FALSE;
 
809
        }
 
810
        if (_tmp4_) {
777
811
                vala_ccode_function_set_modifiers (function, vala_ccode_function_get_modifiers (function) | VALA_CCODE_MODIFIERS_STATIC);
778
812
                if (vala_method_get_is_inline (m)) {
779
813
                        vala_ccode_function_set_modifiers (function, vala_ccode_function_get_modifiers (function) | VALA_CCODE_MODIFIERS_INLINE);
781
815
        }
782
816
        cparam_map = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
783
817
        carg_map = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
784
 
        cl = _vala_code_node_ref0 ((_tmp4_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m), VALA_IS_CLASS (_tmp4_) ? ((ValaClass*) _tmp4_) : NULL));
 
818
        cl = _vala_code_node_ref0 ((_tmp5_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m), VALA_IS_CLASS (_tmp5_) ? ((ValaClass*) _tmp5_) : NULL));
785
819
        if (VALA_IS_CREATION_METHOD (m)) {
786
 
                _tmp6_ = cl != NULL;
 
820
                _tmp7_ = cl != NULL;
 
821
        } else {
 
822
                _tmp7_ = FALSE;
 
823
        }
 
824
        if (_tmp7_) {
 
825
                _tmp6_ = vala_class_get_is_abstract (cl);
787
826
        } else {
788
827
                _tmp6_ = FALSE;
789
828
        }
790
 
        if (_tmp6_) {
791
 
                _tmp5_ = vala_class_get_is_abstract (cl);
792
 
        } else {
793
 
                _tmp5_ = FALSE;
794
 
        }
795
 
        if (!_tmp5_) {
796
 
                ValaCCodeFunctionCall* _tmp8_;
797
 
                ValaCCodeIdentifier* _tmp7_;
798
 
                vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) cparam_map, function, NULL, (ValaMap*) carg_map, _tmp8_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp7_ = vala_ccode_identifier_new ("fake"))), 3);
 
829
        if (!_tmp6_) {
 
830
                ValaCCodeFunctionCall* _tmp9_;
 
831
                ValaCCodeIdentifier* _tmp8_;
 
832
                vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) cparam_map, function, NULL, (ValaMap*) carg_map, _tmp9_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp8_ = vala_ccode_identifier_new ("fake"))), 3);
 
833
                _vala_ccode_node_unref0 (_tmp9_);
799
834
                _vala_ccode_node_unref0 (_tmp8_);
800
 
                _vala_ccode_node_unref0 (_tmp7_);
801
835
                vala_ccode_declaration_space_add_type_member_declaration (decl_space, (ValaCCodeNode*) function);
802
836
        }
803
837
        if (VALA_IS_CREATION_METHOD (m)) {
804
 
                _tmp9_ = cl != NULL;
 
838
                _tmp10_ = cl != NULL;
805
839
        } else {
806
 
                _tmp9_ = FALSE;
 
840
                _tmp10_ = FALSE;
807
841
        }
808
 
        if (_tmp9_) {
809
 
                ValaCCodeFunction* _tmp11_;
810
 
                char* _tmp10_;
811
 
                ValaHashMap* _tmp12_;
812
 
                function = (_tmp11_ = vala_ccode_function_new (_tmp10_ = vala_method_get_real_cname (m), "void"), _vala_ccode_node_unref0 (function), _tmp11_);
813
 
                _g_free0 (_tmp10_);
 
842
        if (_tmp10_) {
 
843
                ValaCCodeFunction* _tmp12_;
 
844
                char* _tmp11_;
 
845
                ValaHashMap* _tmp13_;
 
846
                function = (_tmp12_ = vala_ccode_function_new (_tmp11_ = vala_method_get_real_cname (m), "void"), _vala_ccode_node_unref0 (function), _tmp12_);
 
847
                _g_free0 (_tmp11_);
814
848
                if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
815
849
                        vala_ccode_function_set_modifiers (function, vala_ccode_function_get_modifiers (function) | VALA_CCODE_MODIFIERS_STATIC);
816
850
                }
817
 
                cparam_map = (_tmp12_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal), _vala_collection_object_unref0 (cparam_map), _tmp12_);
 
851
                cparam_map = (_tmp13_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal), _vala_collection_object_unref0 (cparam_map), _tmp13_);
818
852
                vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) cparam_map, function, NULL, NULL, NULL, 3);
819
853
                vala_ccode_declaration_space_add_type_member_declaration (decl_space, (ValaCCodeNode*) function);
820
854
        }
1007
1041
        ValaArrayList* old_temp_ref_vars;
1008
1042
        ValaMap* old_variable_name_map;
1009
1043
        ValaTryStatement* old_try;
 
1044
        ValaCCodeSwitchStatement* old_state_switch_statement;
1010
1045
        ValaSymbol* _tmp0_;
1011
1046
        ValaArrayList* _tmp1_;
1012
1047
        ValaArrayList* _tmp2_;
1013
1048
        ValaMap* _tmp3_;
1014
1049
        ValaTryStatement* _tmp4_;
 
1050
        ValaCCodeSwitchStatement* _tmp5_;
1015
1051
        gboolean in_gobject_creation_method;
1016
1052
        gboolean in_fundamental_creation_method;
 
1053
        ValaCCodeSwitchStatement* current_state_switch;
1017
1054
        ValaDataType* creturn_type;
1018
 
        gboolean _tmp9_ = FALSE;
 
1055
        gboolean _tmp16_ = FALSE;
1019
1056
        gboolean inner_error;
1020
 
        ValaSymbol* _tmp38_;
1021
 
        ValaArrayList* _tmp39_;
1022
 
        ValaArrayList* _tmp40_;
1023
 
        ValaMap* _tmp41_;
1024
 
        ValaTryStatement* _tmp42_;
1025
 
        gboolean _tmp43_ = FALSE;
1026
 
        gboolean _tmp44_ = FALSE;
1027
 
        ValaCCodeFunction* _tmp47_;
1028
 
        char* _tmp46_;
 
1057
        ValaSymbol* _tmp45_;
 
1058
        ValaArrayList* _tmp46_;
 
1059
        ValaArrayList* _tmp47_;
 
1060
        ValaMap* _tmp48_;
 
1061
        ValaTryStatement* _tmp49_;
 
1062
        ValaCCodeSwitchStatement* _tmp50_;
 
1063
        gboolean _tmp51_ = FALSE;
 
1064
        gboolean _tmp52_ = FALSE;
 
1065
        ValaCCodeFunction* _tmp55_;
 
1066
        char* _tmp54_;
1029
1067
        ValaHashMap* cparam_map;
1030
 
        gboolean _tmp48_ = FALSE;
1031
 
        gboolean _tmp236_ = FALSE;
1032
 
        gboolean _tmp237_ = FALSE;
1033
 
        gboolean _tmp238_ = FALSE;
 
1068
        gboolean _tmp56_ = FALSE;
 
1069
        gboolean _tmp245_ = FALSE;
 
1070
        gboolean _tmp246_ = FALSE;
 
1071
        gboolean _tmp247_ = FALSE;
1034
1072
        self = (ValaCCodeMethodModule*) base;
1035
1073
        g_return_if_fail (m != NULL);
1036
1074
        old_symbol = _vala_code_node_ref0 (((ValaCCodeBaseModule*) self)->current_symbol);
1040
1078
        old_temp_ref_vars = _vala_collection_object_ref0 (((ValaCCodeBaseModule*) self)->temp_ref_vars);
1041
1079
        old_variable_name_map = _vala_collection_object_ref0 (((ValaCCodeBaseModule*) self)->variable_name_map);
1042
1080
        old_try = _vala_code_node_ref0 (((ValaCCodeBaseModule*) self)->current_try);
 
1081
        old_state_switch_statement = _vala_ccode_node_ref0 (((ValaCCodeBaseModule*) self)->state_switch_statement);
1043
1082
        ((ValaCCodeBaseModule*) self)->current_symbol = (_tmp0_ = _vala_code_node_ref0 ((ValaSymbol*) m), _vala_code_node_unref0 (((ValaCCodeBaseModule*) self)->current_symbol), _tmp0_);
1044
1083
        ((ValaCCodeBaseModule*) self)->current_method_inner_error = FALSE;
1045
1084
        ((ValaCCodeBaseModule*) self)->next_temp_var_id = 0;
1047
1086
        ((ValaCCodeBaseModule*) self)->temp_ref_vars = (_tmp2_ = vala_array_list_new (VALA_TYPE_LOCAL_VARIABLE, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->temp_ref_vars), _tmp2_);
1048
1087
        ((ValaCCodeBaseModule*) self)->variable_name_map = (_tmp3_ = (ValaMap*) vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_str_hash, g_str_equal, g_direct_equal), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->variable_name_map), _tmp3_);
1049
1088
        ((ValaCCodeBaseModule*) self)->current_try = (_tmp4_ = NULL, _vala_code_node_unref0 (((ValaCCodeBaseModule*) self)->current_try), _tmp4_);
 
1089
        ((ValaCCodeBaseModule*) self)->state_switch_statement = (_tmp5_ = NULL, _vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->state_switch_statement), _tmp5_);
1050
1090
        in_gobject_creation_method = FALSE;
1051
1091
        in_fundamental_creation_method = FALSE;
1052
1092
        vala_ccode_base_module_check_type ((ValaCCodeBaseModule*) self, vala_method_get_return_type (m));
1053
1093
        if (VALA_IS_CREATION_METHOD (m)) {
1054
 
                ValaTypeSymbol* _tmp5_;
 
1094
                ValaTypeSymbol* _tmp6_;
1055
1095
                ValaClass* cl;
1056
 
                gboolean _tmp6_ = FALSE;
1057
 
                cl = _vala_code_node_ref0 ((_tmp5_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self), VALA_IS_CLASS (_tmp5_) ? ((ValaClass*) _tmp5_) : NULL));
 
1096
                gboolean _tmp7_ = FALSE;
 
1097
                cl = _vala_code_node_ref0 ((_tmp6_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self), VALA_IS_CLASS (_tmp6_) ? ((ValaClass*) _tmp6_) : NULL));
1058
1098
                if (cl != NULL) {
1059
 
                        _tmp6_ = !vala_class_get_is_compact (cl);
 
1099
                        _tmp7_ = !vala_class_get_is_compact (cl);
1060
1100
                } else {
1061
 
                        _tmp6_ = FALSE;
 
1101
                        _tmp7_ = FALSE;
1062
1102
                }
1063
 
                if (_tmp6_) {
 
1103
                if (_tmp7_) {
1064
1104
                        if (vala_class_get_base_class (cl) == NULL) {
1065
1105
                                in_fundamental_creation_method = TRUE;
1066
1106
                        } else {
1067
 
                                gboolean _tmp7_ = FALSE;
 
1107
                                gboolean _tmp8_ = FALSE;
1068
1108
                                if (((ValaCCodeBaseModule*) self)->gobject_type != NULL) {
1069
 
                                        _tmp7_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) cl, ((ValaCCodeBaseModule*) self)->gobject_type);
 
1109
                                        _tmp8_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) cl, ((ValaCCodeBaseModule*) self)->gobject_type);
1070
1110
                                } else {
1071
 
                                        _tmp7_ = FALSE;
 
1111
                                        _tmp8_ = FALSE;
1072
1112
                                }
1073
 
                                if (_tmp7_) {
 
1113
                                if (_tmp8_) {
1074
1114
                                        in_gobject_creation_method = TRUE;
1075
1115
                                }
1076
1116
                        }
1077
1117
                }
1078
1118
                _vala_code_node_unref0 (cl);
1079
1119
        }
 
1120
        if (vala_method_get_coroutine (m)) {
 
1121
                ValaCCodeSwitchStatement* _tmp11_;
 
1122
                ValaCCodeMemberAccess* _tmp10_;
 
1123
                ValaCCodeIdentifier* _tmp9_;
 
1124
                ValaCCodeCaseStatement* _tmp13_;
 
1125
                ValaCCodeConstant* _tmp12_;
 
1126
                ValaCCodeGotoStatement* _tmp14_;
 
1127
                ((ValaCCodeBaseModule*) self)->state_switch_statement = (_tmp11_ = vala_ccode_switch_statement_new ((ValaCCodeExpression*) (_tmp10_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp9_ = vala_ccode_identifier_new ("data")), "_state_"))), _vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->state_switch_statement), _tmp11_);
 
1128
                _vala_ccode_node_unref0 (_tmp10_);
 
1129
                _vala_ccode_node_unref0 (_tmp9_);
 
1130
                vala_ccode_block_add_statement ((ValaCCodeBlock*) ((ValaCCodeBaseModule*) self)->state_switch_statement, (ValaCCodeNode*) (_tmp13_ = vala_ccode_case_statement_new ((ValaCCodeExpression*) (_tmp12_ = vala_ccode_constant_new ("0")))));
 
1131
                _vala_ccode_node_unref0 (_tmp13_);
 
1132
                _vala_ccode_node_unref0 (_tmp12_);
 
1133
                vala_ccode_block_add_statement ((ValaCCodeBlock*) ((ValaCCodeBaseModule*) self)->state_switch_statement, (ValaCCodeNode*) (_tmp14_ = vala_ccode_goto_statement_new ("_state_0")));
 
1134
                _vala_ccode_node_unref0 (_tmp14_);
 
1135
        }
 
1136
        current_state_switch = _vala_ccode_node_ref0 (((ValaCCodeBaseModule*) self)->state_switch_statement);
1080
1137
        creturn_type = _vala_code_node_ref0 (vala_method_get_return_type (m));
1081
1138
        if (vala_data_type_is_real_non_null_struct_type (vala_method_get_return_type (m))) {
1082
 
                ValaDataType* _tmp8_;
1083
 
                creturn_type = (_tmp8_ = (ValaDataType*) vala_void_type_new (NULL), _vala_code_node_unref0 (creturn_type), _tmp8_);
 
1139
                ValaDataType* _tmp15_;
 
1140
                creturn_type = (_tmp15_ = (ValaDataType*) vala_void_type_new (NULL), _vala_code_node_unref0 (creturn_type), _tmp15_);
1084
1141
        }
1085
1142
        if (vala_method_get_binding (m) == MEMBER_BINDING_CLASS) {
1086
 
                _tmp9_ = TRUE;
 
1143
                _tmp16_ = TRUE;
1087
1144
        } else {
1088
 
                _tmp9_ = vala_method_get_binding (m) == MEMBER_BINDING_STATIC;
 
1145
                _tmp16_ = vala_method_get_binding (m) == MEMBER_BINDING_STATIC;
1089
1146
        }
1090
 
        if (_tmp9_) {
 
1147
        if (_tmp16_) {
1091
1148
                ((ValaCCodeBaseModule*) self)->in_static_or_class_context = TRUE;
1092
1149
        }
1093
1150
        vala_code_node_accept_children ((ValaCodeNode*) m, (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
1094
1151
        ((ValaCCodeBaseModule*) self)->in_static_or_class_context = FALSE;
1095
1152
        if (VALA_IS_CREATION_METHOD (m)) {
1096
 
                gboolean _tmp10_ = FALSE;
 
1153
                gboolean _tmp17_ = FALSE;
1097
1154
                if (in_gobject_creation_method) {
1098
 
                        _tmp10_ = vala_method_get_body (m) != NULL;
 
1155
                        _tmp17_ = vala_method_get_body (m) != NULL;
1099
1156
                } else {
1100
 
                        _tmp10_ = FALSE;
 
1157
                        _tmp17_ = FALSE;
1101
1158
                }
1102
 
                if (_tmp10_) {
 
1159
                if (_tmp17_) {
1103
1160
                        if (!vala_creation_method_get_chain_up (VALA_CREATION_METHOD (m))) {
1104
1161
                                ValaCCodeBlock* cblock;
1105
1162
                                ValaCodeNode* last_stmt;
1106
 
                                gboolean _tmp20_ = FALSE;
 
1163
                                gboolean _tmp27_ = FALSE;
1107
1164
                                if (vala_block_get_captured (vala_method_get_body (m))) {
1108
1165
                                        vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) m), "Closures are not supported in GObject-style creation methods");
1109
1166
                                }
1110
1167
                                cblock = vala_ccode_block_new ();
1111
1168
                                last_stmt = NULL;
1112
1169
                                {
1113
 
                                        ValaList* _tmp11_;
1114
 
                                        ValaIterator* _tmp12_;
 
1170
                                        ValaList* _tmp18_;
 
1171
                                        ValaIterator* _tmp19_;
1115
1172
                                        ValaIterator* _stmt_it;
1116
 
                                        _stmt_it = (_tmp12_ = vala_iterable_iterator ((ValaIterable*) (_tmp11_ = vala_block_get_statements (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp11_), _tmp12_);
 
1173
                                        _stmt_it = (_tmp19_ = vala_iterable_iterator ((ValaIterable*) (_tmp18_ = vala_block_get_statements (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp18_), _tmp19_);
1117
1174
                                        while (TRUE) {
1118
1175
                                                ValaCodeNode* stmt;
1119
 
                                                ValaCodeNode* _tmp13_;
 
1176
                                                ValaCodeNode* _tmp20_;
1120
1177
                                                ValaExpressionStatement* expr_stmt;
1121
1178
                                                if (!vala_iterator_next (_stmt_it)) {
1122
1179
                                                        break;
1123
1180
                                                }
1124
1181
                                                stmt = (ValaCodeNode*) ((ValaStatement*) vala_iterator_get (_stmt_it));
1125
 
                                                expr_stmt = _vala_code_node_ref0 ((_tmp13_ = stmt, VALA_IS_EXPRESSION_STATEMENT (_tmp13_) ? ((ValaExpressionStatement*) _tmp13_) : NULL));
 
1182
                                                expr_stmt = _vala_code_node_ref0 ((_tmp20_ = stmt, VALA_IS_EXPRESSION_STATEMENT (_tmp20_) ? ((ValaExpressionStatement*) _tmp20_) : NULL));
1126
1183
                                                if (expr_stmt != NULL) {
1127
1184
                                                        ValaProperty* prop;
1128
 
                                                        gboolean _tmp14_ = FALSE;
 
1185
                                                        gboolean _tmp21_ = FALSE;
1129
1186
                                                        prop = vala_expression_statement_assigned_property (expr_stmt);
1130
1187
                                                        if (prop != NULL) {
1131
 
                                                                _tmp14_ = vala_property_accessor_get_construction (vala_property_get_set_accessor (prop));
 
1188
                                                                _tmp21_ = vala_property_accessor_get_construction (vala_property_get_set_accessor (prop));
1132
1189
                                                        } else {
1133
 
                                                                _tmp14_ = FALSE;
 
1190
                                                                _tmp21_ = FALSE;
1134
1191
                                                        }
1135
 
                                                        if (_tmp14_) {
1136
 
                                                                ValaCodeNode* _tmp15_;
1137
 
                                                                last_stmt = (_tmp15_ = _vala_code_node_ref0 (stmt), _vala_code_node_unref0 (last_stmt), _tmp15_);
 
1192
                                                        if (_tmp21_) {
 
1193
                                                                ValaCodeNode* _tmp22_;
 
1194
                                                                last_stmt = (_tmp22_ = _vala_code_node_ref0 (stmt), _vala_code_node_unref0 (last_stmt), _tmp22_);
1138
1195
                                                        }
1139
1196
                                                        _vala_code_node_unref0 (prop);
1140
1197
                                                }
1145
1202
                                }
1146
1203
                                if (last_stmt != NULL) {
1147
1204
                                        {
1148
 
                                                ValaList* _tmp16_;
1149
 
                                                ValaIterator* _tmp17_;
 
1205
                                                ValaList* _tmp23_;
 
1206
                                                ValaIterator* _tmp24_;
1150
1207
                                                ValaIterator* _stmt_it;
1151
 
                                                _stmt_it = (_tmp17_ = vala_iterable_iterator ((ValaIterable*) (_tmp16_ = vala_block_get_statements (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp16_), _tmp17_);
 
1208
                                                _stmt_it = (_tmp24_ = vala_iterable_iterator ((ValaIterable*) (_tmp23_ = vala_block_get_statements (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp23_), _tmp24_);
1152
1209
                                                while (TRUE) {
1153
1210
                                                        ValaCodeNode* stmt;
1154
1211
                                                        if (!vala_iterator_next (_stmt_it)) {
1157
1214
                                                        stmt = (ValaCodeNode*) ((ValaStatement*) vala_iterator_get (_stmt_it));
1158
1215
                                                        if (VALA_IS_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))) {
1159
1216
                                                                {
1160
 
                                                                        ValaList* _tmp18_;
1161
 
                                                                        ValaIterator* _tmp19_;
 
1217
                                                                        ValaList* _tmp25_;
 
1218
                                                                        ValaIterator* _tmp26_;
1162
1219
                                                                        ValaIterator* _cstmt_it;
1163
 
                                                                        _cstmt_it = (_tmp19_ = vala_iterable_iterator ((ValaIterable*) (_tmp18_ = vala_ccode_fragment_get_children (VALA_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))))), _vala_collection_object_unref0 (_tmp18_), _tmp19_);
 
1220
                                                                        _cstmt_it = (_tmp26_ = vala_iterable_iterator ((ValaIterable*) (_tmp25_ = vala_ccode_fragment_get_children (VALA_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))))), _vala_collection_object_unref0 (_tmp25_), _tmp26_);
1164
1221
                                                                        while (TRUE) {
1165
1222
                                                                                ValaCCodeNode* cstmt;
1166
1223
                                                                                if (!vala_iterator_next (_cstmt_it)) {
1185
1242
                                        }
1186
1243
                                }
1187
1244
                                if (vala_creation_method_get_n_construction_params (VALA_CREATION_METHOD (m)) > 0) {
1188
 
                                        _tmp20_ = TRUE;
 
1245
                                        _tmp27_ = TRUE;
1189
1246
                                } else {
1190
 
                                        ValaList* _tmp21_;
1191
 
                                        _tmp20_ = vala_collection_get_size ((ValaCollection*) (_tmp21_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))) > 0;
1192
 
                                        _vala_collection_object_unref0 (_tmp21_);
 
1247
                                        ValaList* _tmp28_;
 
1248
                                        _tmp27_ = vala_collection_get_size ((ValaCollection*) (_tmp28_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))) > 0;
 
1249
                                        _vala_collection_object_unref0 (_tmp28_);
1193
1250
                                }
1194
 
                                vala_ccode_method_module_add_object_creation (self, cblock, _tmp20_);
 
1251
                                vala_ccode_method_module_add_object_creation (self, cblock, _tmp27_);
1195
1252
                                {
1196
 
                                        ValaList* _tmp22_;
1197
 
                                        ValaIterator* _tmp23_;
 
1253
                                        ValaList* _tmp29_;
 
1254
                                        ValaIterator* _tmp30_;
1198
1255
                                        ValaIterator* _stmt_it;
1199
 
                                        _stmt_it = (_tmp23_ = vala_iterable_iterator ((ValaIterable*) (_tmp22_ = vala_block_get_statements (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp22_), _tmp23_);
 
1256
                                        _stmt_it = (_tmp30_ = vala_iterable_iterator ((ValaIterable*) (_tmp29_ = vala_block_get_statements (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp29_), _tmp30_);
1200
1257
                                        while (TRUE) {
1201
1258
                                                ValaCodeNode* stmt;
1202
1259
                                                if (!vala_iterator_next (_stmt_it)) {
1205
1262
                                                stmt = (ValaCodeNode*) ((ValaStatement*) vala_iterator_get (_stmt_it));
1206
1263
                                                if (last_stmt != NULL) {
1207
1264
                                                        if (last_stmt == stmt) {
1208
 
                                                                ValaCodeNode* _tmp24_;
1209
 
                                                                last_stmt = (_tmp24_ = NULL, _vala_code_node_unref0 (last_stmt), _tmp24_);
 
1265
                                                                ValaCodeNode* _tmp31_;
 
1266
                                                                last_stmt = (_tmp31_ = NULL, _vala_code_node_unref0 (last_stmt), _tmp31_);
1210
1267
                                                        }
1211
1268
                                                        _vala_code_node_unref0 (stmt);
1212
1269
                                                        continue;
1213
1270
                                                }
1214
1271
                                                if (VALA_IS_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))) {
1215
1272
                                                        {
1216
 
                                                                ValaList* _tmp25_;
1217
 
                                                                ValaIterator* _tmp26_;
 
1273
                                                                ValaList* _tmp32_;
 
1274
                                                                ValaIterator* _tmp33_;
1218
1275
                                                                ValaIterator* _cstmt_it;
1219
 
                                                                _cstmt_it = (_tmp26_ = vala_iterable_iterator ((ValaIterable*) (_tmp25_ = vala_ccode_fragment_get_children (VALA_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))))), _vala_collection_object_unref0 (_tmp25_), _tmp26_);
 
1276
                                                                _cstmt_it = (_tmp33_ = vala_iterable_iterator ((ValaIterable*) (_tmp32_ = vala_ccode_fragment_get_children (VALA_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))))), _vala_collection_object_unref0 (_tmp32_), _tmp33_);
1220
1277
                                                                while (TRUE) {
1221
1278
                                                                        ValaCCodeNode* cstmt;
1222
1279
                                                                        if (!vala_iterator_next (_cstmt_it)) {
1236
1293
                                        _vala_collection_object_unref0 (_stmt_it);
1237
1294
                                }
1238
1295
                                {
1239
 
                                        ValaList* _tmp27_;
1240
 
                                        ValaIterator* _tmp28_;
 
1296
                                        ValaList* _tmp34_;
 
1297
                                        ValaIterator* _tmp35_;
1241
1298
                                        ValaIterator* _local_it;
1242
 
                                        _local_it = (_tmp28_ = vala_iterable_iterator ((ValaIterable*) (_tmp27_ = vala_block_get_local_variables (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp27_), _tmp28_);
 
1299
                                        _local_it = (_tmp35_ = vala_iterable_iterator ((ValaIterable*) (_tmp34_ = vala_block_get_local_variables (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp34_), _tmp35_);
1243
1300
                                        while (TRUE) {
1244
1301
                                                ValaLocalVariable* local;
1245
 
                                                gboolean _tmp29_ = FALSE;
 
1302
                                                gboolean _tmp36_ = FALSE;
1246
1303
                                                if (!vala_iterator_next (_local_it)) {
1247
1304
                                                        break;
1248
1305
                                                }
1249
1306
                                                local = (ValaLocalVariable*) vala_iterator_get (_local_it);
1250
1307
                                                if (!vala_local_variable_get_floating (local)) {
1251
 
                                                        _tmp29_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, vala_local_variable_get_variable_type (local));
 
1308
                                                        _tmp36_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, vala_local_variable_get_variable_type (local));
1252
1309
                                                } else {
1253
 
                                                        _tmp29_ = FALSE;
 
1310
                                                        _tmp36_ = FALSE;
1254
1311
                                                }
1255
 
                                                if (_tmp29_) {
 
1312
                                                if (_tmp36_) {
1256
1313
                                                        ValaMemberAccess* ma;
1257
 
                                                        ValaDataType* _tmp30_;
1258
 
                                                        ValaCCodeExpressionStatement* _tmp33_;
1259
 
                                                        ValaCCodeExpression* _tmp32_;
1260
 
                                                        ValaCCodeExpression* _tmp31_;
 
1314
                                                        ValaDataType* _tmp37_;
 
1315
                                                        ValaCCodeExpressionStatement* _tmp40_;
 
1316
                                                        ValaCCodeExpression* _tmp39_;
 
1317
                                                        ValaCCodeExpression* _tmp38_;
1261
1318
                                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
1262
1319
                                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
1263
 
                                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp30_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
1264
 
                                                        _vala_code_node_unref0 (_tmp30_);
1265
 
                                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp33_ = vala_ccode_expression_statement_new (_tmp32_ = vala_ccode_base_module_get_unref_expression ((ValaCCodeBaseModule*) self, _tmp31_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
1266
 
                                                        _vala_ccode_node_unref0 (_tmp33_);
1267
 
                                                        _vala_ccode_node_unref0 (_tmp32_);
1268
 
                                                        _vala_ccode_node_unref0 (_tmp31_);
 
1320
                                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp37_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
1321
                                                        _vala_code_node_unref0 (_tmp37_);
 
1322
                                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp40_ = vala_ccode_expression_statement_new (_tmp39_ = vala_ccode_base_module_get_unref_expression ((ValaCCodeBaseModule*) self, _tmp38_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
1323
                                                        _vala_ccode_node_unref0 (_tmp40_);
 
1324
                                                        _vala_ccode_node_unref0 (_tmp39_);
 
1325
                                                        _vala_ccode_node_unref0 (_tmp38_);
1269
1326
                                                        _vala_code_node_unref0 (ma);
1270
1327
                                                }
1271
1328
                                                _vala_code_node_unref0 (local);
1277
1334
                                _vala_code_node_unref0 (last_stmt);
1278
1335
                        } else {
1279
1336
                                ValaCCodeBlock* cblock;
1280
 
                                char* _tmp35_;
1281
 
                                char* _tmp34_;
1282
 
                                ValaCCodeDeclaration* _tmp36_;
 
1337
                                char* _tmp42_;
 
1338
                                char* _tmp41_;
 
1339
                                ValaCCodeDeclaration* _tmp43_;
1283
1340
                                ValaCCodeDeclaration* cdeclaration;
1284
 
                                ValaCCodeVariableDeclarator* _tmp37_;
 
1341
                                ValaCCodeVariableDeclarator* _tmp44_;
1285
1342
                                cblock = _vala_ccode_node_ref0 (VALA_CCODE_BLOCK (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_method_get_body (m))));
1286
 
                                cdeclaration = (_tmp36_ = vala_ccode_declaration_new (_tmp35_ = g_strdup_printf ("%s *", _tmp34_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) VALA_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self)), FALSE))), _g_free0 (_tmp35_), _g_free0 (_tmp34_), _tmp36_);
1287
 
                                vala_ccode_declaration_add_declarator (cdeclaration, (ValaCCodeDeclarator*) (_tmp37_ = vala_ccode_variable_declarator_new ("self", NULL, NULL)));
1288
 
                                _vala_ccode_node_unref0 (_tmp37_);
 
1343
                                cdeclaration = (_tmp43_ = vala_ccode_declaration_new (_tmp42_ = g_strdup_printf ("%s *", _tmp41_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) VALA_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self)), FALSE))), _g_free0 (_tmp42_), _g_free0 (_tmp41_), _tmp43_);
 
1344
                                vala_ccode_declaration_add_declarator (cdeclaration, (ValaCCodeDeclarator*) (_tmp44_ = vala_ccode_variable_declarator_new ("self", NULL, NULL)));
 
1345
                                _vala_ccode_node_unref0 (_tmp44_);
1289
1346
                                vala_ccode_block_prepend_statement (cblock, (ValaCCodeNode*) cdeclaration);
1290
1347
                                _vala_ccode_node_unref0 (cblock);
1291
1348
                                _vala_ccode_node_unref0 (cdeclaration);
1293
1350
                }
1294
1351
        }
1295
1352
        inner_error = ((ValaCCodeBaseModule*) self)->current_method_inner_error;
1296
 
        ((ValaCCodeBaseModule*) self)->current_symbol = (_tmp38_ = _vala_code_node_ref0 (old_symbol), _vala_code_node_unref0 (((ValaCCodeBaseModule*) self)->current_symbol), _tmp38_);
 
1353
        ((ValaCCodeBaseModule*) self)->current_symbol = (_tmp45_ = _vala_code_node_ref0 (old_symbol), _vala_code_node_unref0 (((ValaCCodeBaseModule*) self)->current_symbol), _tmp45_);
1297
1354
        ((ValaCCodeBaseModule*) self)->current_method_inner_error = old_method_inner_error;
1298
1355
        ((ValaCCodeBaseModule*) self)->next_temp_var_id = old_next_temp_var_id;
1299
 
        ((ValaCCodeBaseModule*) self)->temp_vars = (_tmp39_ = _vala_collection_object_ref0 (old_temp_vars), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->temp_vars), _tmp39_);
1300
 
        ((ValaCCodeBaseModule*) self)->temp_ref_vars = (_tmp40_ = _vala_collection_object_ref0 (old_temp_ref_vars), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->temp_ref_vars), _tmp40_);
1301
 
        ((ValaCCodeBaseModule*) self)->variable_name_map = (_tmp41_ = _vala_collection_object_ref0 (old_variable_name_map), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->variable_name_map), _tmp41_);
1302
 
        ((ValaCCodeBaseModule*) self)->current_try = (_tmp42_ = _vala_code_node_ref0 (old_try), _vala_code_node_unref0 (((ValaCCodeBaseModule*) self)->current_try), _tmp42_);
 
1356
        ((ValaCCodeBaseModule*) self)->temp_vars = (_tmp46_ = _vala_collection_object_ref0 (old_temp_vars), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->temp_vars), _tmp46_);
 
1357
        ((ValaCCodeBaseModule*) self)->temp_ref_vars = (_tmp47_ = _vala_collection_object_ref0 (old_temp_ref_vars), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->temp_ref_vars), _tmp47_);
 
1358
        ((ValaCCodeBaseModule*) self)->variable_name_map = (_tmp48_ = _vala_collection_object_ref0 (old_variable_name_map), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->variable_name_map), _tmp48_);
 
1359
        ((ValaCCodeBaseModule*) self)->current_try = (_tmp49_ = _vala_code_node_ref0 (old_try), _vala_code_node_unref0 (((ValaCCodeBaseModule*) self)->current_try), _tmp49_);
 
1360
        ((ValaCCodeBaseModule*) self)->state_switch_statement = (_tmp50_ = _vala_ccode_node_ref0 (old_state_switch_statement), _vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->state_switch_statement), _tmp50_);
1303
1361
        if (vala_method_get_is_abstract (m)) {
1304
 
                _tmp44_ = TRUE;
 
1362
                _tmp52_ = TRUE;
1305
1363
        } else {
1306
 
                _tmp44_ = vala_method_get_is_virtual (m);
 
1364
                _tmp52_ = vala_method_get_is_virtual (m);
1307
1365
        }
1308
 
        if (_tmp44_) {
1309
 
                _tmp43_ = TRUE;
 
1366
        if (_tmp52_) {
 
1367
                _tmp51_ = TRUE;
1310
1368
        } else {
1311
 
                gboolean _tmp45_ = FALSE;
 
1369
                gboolean _tmp53_ = FALSE;
1312
1370
                if (vala_method_get_base_method (m) == NULL) {
1313
 
                        _tmp45_ = vala_method_get_base_interface_method (m) == NULL;
 
1371
                        _tmp53_ = vala_method_get_base_interface_method (m) == NULL;
1314
1372
                } else {
1315
 
                        _tmp45_ = FALSE;
 
1373
                        _tmp53_ = FALSE;
1316
1374
                }
1317
 
                _tmp43_ = _tmp45_;
 
1375
                _tmp51_ = _tmp53_;
1318
1376
        }
1319
 
        if (_tmp43_) {
 
1377
        if (_tmp51_) {
1320
1378
                vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->source_declarations);
1321
1379
                if (!vala_symbol_is_internal_symbol ((ValaSymbol*) m)) {
1322
1380
                        vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->header_declarations);
1325
1383
                        vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->internal_header_declarations);
1326
1384
                }
1327
1385
        }
1328
 
        ((ValaCCodeBaseModule*) self)->function = (_tmp47_ = vala_ccode_function_new (_tmp46_ = vala_method_get_real_cname (m), "void"), _vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->function), _tmp47_);
1329
 
        _g_free0 (_tmp46_);
 
1386
        ((ValaCCodeBaseModule*) self)->function = (_tmp55_ = vala_ccode_function_new (_tmp54_ = vala_method_get_real_cname (m), "void"), _vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->function), _tmp55_);
 
1387
        _g_free0 (_tmp54_);
1330
1388
        vala_code_node_set_ccodenode ((ValaCodeNode*) m, (ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function);
1331
1389
        if (vala_method_get_is_inline (m)) {
1332
1390
                vala_ccode_function_set_modifiers (((ValaCCodeBaseModule*) self)->function, vala_ccode_function_get_modifiers (((ValaCCodeBaseModule*) self)->function) | VALA_CCODE_MODIFIERS_INLINE);
1334
1392
        cparam_map = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
1335
1393
        vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->source_declarations, (ValaMap*) cparam_map, ((ValaCCodeBaseModule*) self)->function, NULL, NULL, NULL, 3);
1336
1394
        if (!vala_method_get_is_abstract (m)) {
1337
 
                _tmp48_ = TRUE;
 
1395
                _tmp56_ = TRUE;
1338
1396
        } else {
1339
 
                gboolean _tmp49_ = FALSE;
 
1397
                gboolean _tmp57_ = FALSE;
1340
1398
                if (vala_method_get_is_abstract (m)) {
1341
 
                        _tmp49_ = VALA_IS_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self));
 
1399
                        _tmp57_ = VALA_IS_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self));
1342
1400
                } else {
1343
 
                        _tmp49_ = FALSE;
 
1401
                        _tmp57_ = FALSE;
1344
1402
                }
1345
 
                _tmp48_ = _tmp49_;
 
1403
                _tmp56_ = _tmp57_;
1346
1404
        }
1347
 
        if (_tmp48_) {
 
1405
        if (_tmp56_) {
1348
1406
                if (!vala_method_get_coroutine (m)) {
1349
 
                        gboolean _tmp50_ = FALSE;
 
1407
                        gboolean _tmp58_ = FALSE;
1350
1408
                        if (vala_method_get_base_method (m) != NULL) {
1351
 
                                _tmp50_ = TRUE;
 
1409
                                _tmp58_ = TRUE;
1352
1410
                        } else {
1353
 
                                _tmp50_ = vala_method_get_base_interface_method (m) != NULL;
 
1411
                                _tmp58_ = vala_method_get_base_interface_method (m) != NULL;
1354
1412
                        }
1355
 
                        if (_tmp50_) {
1356
 
                                ValaCCodeFunction* _tmp51_;
 
1413
                        if (_tmp58_) {
 
1414
                                ValaCCodeFunction* _tmp59_;
1357
1415
                                vala_ccode_function_set_modifiers (((ValaCCodeBaseModule*) self)->function, vala_ccode_function_get_modifiers (((ValaCCodeBaseModule*) self)->function) | VALA_CCODE_MODIFIERS_STATIC);
1358
 
                                vala_ccode_declaration_space_add_type_member_declaration (((ValaCCodeBaseModule*) self)->source_declarations, (ValaCCodeNode*) (_tmp51_ = vala_ccode_function_copy (((ValaCCodeBaseModule*) self)->function)));
1359
 
                                _vala_ccode_node_unref0 (_tmp51_);
 
1416
                                vala_ccode_declaration_space_add_type_member_declaration (((ValaCCodeBaseModule*) self)->source_declarations, (ValaCCodeNode*) (_tmp59_ = vala_ccode_function_copy (((ValaCCodeBaseModule*) self)->function)));
 
1417
                                _vala_ccode_node_unref0 (_tmp59_);
1360
1418
                        } else {
1361
1419
                                if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
1362
1420
                                        vala_ccode_function_set_modifiers (((ValaCCodeBaseModule*) self)->function, vala_ccode_function_get_modifiers (((ValaCCodeBaseModule*) self)->function) | VALA_CCODE_MODIFIERS_STATIC);
1365
1423
                }
1366
1424
                if (vala_method_get_body (m) != NULL) {
1367
1425
                        ValaCCodeFragment* cinit;
1368
 
                        gboolean _tmp115_ = FALSE;
1369
 
                        gboolean _tmp116_ = FALSE;
1370
 
                        gboolean _tmp219_ = FALSE;
 
1426
                        gboolean _tmp121_ = FALSE;
 
1427
                        gboolean _tmp122_ = FALSE;
 
1428
                        gboolean _tmp228_ = FALSE;
1371
1429
                        vala_ccode_function_set_block (((ValaCCodeBaseModule*) self)->function, VALA_CCODE_BLOCK (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_method_get_body (m))));
1372
1430
                        vala_ccode_node_set_line ((ValaCCodeNode*) vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function), vala_ccode_node_get_line ((ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function));
1373
1431
                        cinit = vala_ccode_fragment_new ();
1374
1432
                        vala_ccode_block_prepend_statement (vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function), (ValaCCodeNode*) cinit);
1375
1433
                        if (vala_method_get_coroutine (m)) {
1376
 
                                char* _tmp53_;
1377
 
                                char* _tmp52_;
1378
 
                                ValaCCodeFunction* _tmp54_;
 
1434
                                char* _tmp61_;
 
1435
                                char* _tmp60_;
 
1436
                                ValaCCodeFunction* _tmp62_;
1379
1437
                                ValaCCodeFunction* co_function;
1380
 
                                ValaCCodeFormalParameter* _tmp58_;
1381
 
                                char* _tmp57_;
1382
 
                                char* _tmp56_;
1383
 
                                char* _tmp55_;
1384
 
                                ValaCCodeFunction* _tmp59_;
1385
 
                                ValaCCodeMemberAccess* _tmp61_;
1386
 
                                ValaCCodeIdentifier* _tmp60_;
1387
 
                                ValaCCodeSwitchStatement* _tmp62_;
1388
 
                                ValaCCodeSwitchStatement* cswitch;
1389
 
                                ValaCCodeLabel* _tmp63_;
1390
 
                                ValaCCodeExpressionStatement* _tmp66_;
1391
 
                                ValaCCodeFunctionCall* _tmp65_;
1392
 
                                ValaCCodeIdentifier* _tmp64_;
1393
 
                                ValaCCodeCaseStatement* _tmp68_;
1394
 
                                ValaCCodeConstant* _tmp67_;
1395
 
                                ValaCCodeStatement* _tmp69_;
1396
 
                                ValaCCodeBlock* _tmp70_;
1397
 
                                co_function = (_tmp54_ = vala_ccode_function_new (_tmp53_ = g_strconcat (_tmp52_ = vala_method_get_real_cname (m), "_co", NULL), "gboolean"), _g_free0 (_tmp53_), _g_free0 (_tmp52_), _tmp54_);
1398
 
                                vala_ccode_function_add_parameter (co_function, _tmp58_ = vala_ccode_formal_parameter_new ("data", _tmp57_ = g_strconcat (_tmp56_ = vala_symbol_lower_case_to_camel_case (_tmp55_ = vala_method_get_cname (m)), "Data*", NULL)));
1399
 
                                _vala_ccode_node_unref0 (_tmp58_);
1400
 
                                _g_free0 (_tmp57_);
1401
 
                                _g_free0 (_tmp56_);
1402
 
                                _g_free0 (_tmp55_);
 
1438
                                ValaCCodeFormalParameter* _tmp66_;
 
1439
                                char* _tmp65_;
 
1440
                                char* _tmp64_;
 
1441
                                char* _tmp63_;
 
1442
                                ValaCCodeFunction* _tmp67_;
 
1443
                                ValaCCodeLabel* _tmp68_;
 
1444
                                ValaCCodeExpressionStatement* _tmp71_;
 
1445
                                ValaCCodeFunctionCall* _tmp70_;
 
1446
                                ValaCCodeIdentifier* _tmp69_;
 
1447
                                ValaCCodeBlock* _tmp72_;
 
1448
                                ValaCCodeLabel* _tmp73_;
 
1449
                                ValaCCodeStatement* _tmp74_;
 
1450
                                co_function = (_tmp62_ = vala_ccode_function_new (_tmp61_ = g_strconcat (_tmp60_ = vala_method_get_real_cname (m), "_co", NULL), "gboolean"), _g_free0 (_tmp61_), _g_free0 (_tmp60_), _tmp62_);
 
1451
                                vala_ccode_function_add_parameter (co_function, _tmp66_ = vala_ccode_formal_parameter_new ("data", _tmp65_ = g_strconcat (_tmp64_ = vala_symbol_lower_case_to_camel_case (_tmp63_ = vala_method_get_cname (m)), "Data*", NULL)));
 
1452
                                _vala_ccode_node_unref0 (_tmp66_);
 
1453
                                _g_free0 (_tmp65_);
 
1454
                                _g_free0 (_tmp64_);
 
1455
                                _g_free0 (_tmp63_);
1403
1456
                                vala_ccode_function_set_modifiers (co_function, vala_ccode_function_get_modifiers (co_function) | VALA_CCODE_MODIFIERS_STATIC);
1404
 
                                vala_ccode_declaration_space_add_type_member_declaration (((ValaCCodeBaseModule*) self)->source_declarations, (ValaCCodeNode*) (_tmp59_ = vala_ccode_function_copy (co_function)));
1405
 
                                _vala_ccode_node_unref0 (_tmp59_);
1406
 
                                cswitch = (_tmp62_ = vala_ccode_switch_statement_new ((ValaCCodeExpression*) (_tmp61_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp60_ = vala_ccode_identifier_new ("data")), "_state_"))), _vala_ccode_node_unref0 (_tmp61_), _vala_ccode_node_unref0 (_tmp60_), _tmp62_);
1407
 
                                vala_ccode_block_add_statement ((ValaCCodeBlock*) cswitch, (ValaCCodeNode*) (_tmp63_ = vala_ccode_label_new ("default")));
1408
 
                                _vala_ccode_node_unref0 (_tmp63_);
1409
 
                                vala_ccode_block_add_statement ((ValaCCodeBlock*) cswitch, (ValaCCodeNode*) (_tmp66_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp65_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp64_ = vala_ccode_identifier_new ("g_assert_not_reached")))))));
1410
 
                                _vala_ccode_node_unref0 (_tmp66_);
1411
 
                                _vala_ccode_node_unref0 (_tmp65_);
1412
 
                                _vala_ccode_node_unref0 (_tmp64_);
1413
 
                                vala_ccode_block_add_statement ((ValaCCodeBlock*) cswitch, (ValaCCodeNode*) (_tmp68_ = vala_ccode_case_statement_new ((ValaCCodeExpression*) (_tmp67_ = vala_ccode_constant_new ("0")))));
 
1457
                                vala_ccode_declaration_space_add_type_member_declaration (((ValaCCodeBaseModule*) self)->source_declarations, (ValaCCodeNode*) (_tmp67_ = vala_ccode_function_copy (co_function)));
 
1458
                                _vala_ccode_node_unref0 (_tmp67_);
 
1459
                                vala_ccode_block_add_statement ((ValaCCodeBlock*) current_state_switch, (ValaCCodeNode*) (_tmp68_ = vala_ccode_label_new ("default")));
1414
1460
                                _vala_ccode_node_unref0 (_tmp68_);
1415
 
                                _vala_ccode_node_unref0 (_tmp67_);
1416
 
                                vala_ccode_block_add_statement ((ValaCCodeBlock*) cswitch, (ValaCCodeNode*) vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function));
1417
 
                                vala_ccode_block_add_statement ((ValaCCodeBlock*) cswitch, (ValaCCodeNode*) (_tmp69_ = vala_ccode_method_module_complete_async (self)));
 
1461
                                vala_ccode_block_add_statement ((ValaCCodeBlock*) current_state_switch, (ValaCCodeNode*) (_tmp71_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp70_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp69_ = vala_ccode_identifier_new ("g_assert_not_reached")))))));
 
1462
                                _vala_ccode_node_unref0 (_tmp71_);
 
1463
                                _vala_ccode_node_unref0 (_tmp70_);
1418
1464
                                _vala_ccode_node_unref0 (_tmp69_);
1419
 
                                vala_ccode_function_set_block (co_function, _tmp70_ = vala_ccode_block_new ());
1420
 
                                _vala_ccode_node_unref0 (_tmp70_);
1421
 
                                vala_ccode_block_add_statement (vala_ccode_function_get_block (co_function), (ValaCCodeNode*) cswitch);
 
1465
                                vala_ccode_function_set_block (co_function, _tmp72_ = vala_ccode_block_new ());
 
1466
                                _vala_ccode_node_unref0 (_tmp72_);
 
1467
                                vala_ccode_block_add_statement (vala_ccode_function_get_block (co_function), (ValaCCodeNode*) current_state_switch);
 
1468
                                vala_ccode_block_add_statement (vala_ccode_function_get_block (co_function), (ValaCCodeNode*) (_tmp73_ = vala_ccode_label_new ("_state_0")));
 
1469
                                _vala_ccode_node_unref0 (_tmp73_);
 
1470
                                vala_ccode_block_add_statement (vala_ccode_function_get_block (co_function), (ValaCCodeNode*) vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function));
 
1471
                                vala_ccode_block_add_statement (vala_ccode_function_get_block (co_function), (ValaCCodeNode*) (_tmp74_ = vala_ccode_method_module_complete_async (self)));
 
1472
                                _vala_ccode_node_unref0 (_tmp74_);
1422
1473
                                vala_ccode_fragment_append (((ValaCCodeBaseModule*) self)->source_type_member_definition, (ValaCCodeNode*) co_function);
1423
1474
                                _vala_ccode_node_unref0 (co_function);
1424
 
                                _vala_ccode_node_unref0 (cswitch);
1425
1475
                        }
1426
1476
                        if (vala_method_get_closure (m)) {
1427
1477
                                ValaBlock* closure_block;
1431
1481
                                while (TRUE) {
1432
1482
                                        ValaBlock* parent_closure_block;
1433
1483
                                        gint parent_block_id;
1434
 
                                        char* _tmp73_;
1435
 
                                        ValaCCodeIdentifier* _tmp72_;
1436
 
                                        char* _tmp71_;
1437
 
                                        ValaCCodeMemberAccess* _tmp74_;
 
1484
                                        char* _tmp77_;
 
1485
                                        ValaCCodeIdentifier* _tmp76_;
 
1486
                                        char* _tmp75_;
 
1487
                                        ValaCCodeMemberAccess* _tmp78_;
1438
1488
                                        ValaCCodeMemberAccess* parent_data;
1439
 
                                        char* _tmp75_;
1440
 
                                        ValaCCodeDeclaration* _tmp76_;
 
1489
                                        char* _tmp79_;
 
1490
                                        ValaCCodeDeclaration* _tmp80_;
1441
1491
                                        ValaCCodeDeclaration* _cdecl_;
1442
 
                                        ValaCCodeVariableDeclarator* _tmp78_;
1443
 
                                        char* _tmp77_;
1444
 
                                        ValaBlock* _tmp79_;
 
1492
                                        ValaCCodeVariableDeclarator* _tmp82_;
 
1493
                                        char* _tmp81_;
 
1494
                                        ValaBlock* _tmp83_;
1445
1495
                                        parent_closure_block = _vala_code_node_ref0 (vala_ccode_base_module_next_closure_block ((ValaCCodeBaseModule*) self, vala_symbol_get_parent_symbol ((ValaSymbol*) closure_block)));
1446
1496
                                        if (parent_closure_block == NULL) {
1447
1497
                                                _vala_code_node_unref0 (parent_closure_block);
1448
1498
                                                break;
1449
1499
                                        }
1450
1500
                                        parent_block_id = vala_ccode_base_module_get_block_id ((ValaCCodeBaseModule*) self, parent_closure_block);
1451
 
                                        parent_data = (_tmp74_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp72_ = vala_ccode_identifier_new (_tmp71_ = g_strdup_printf ("_data%d_", block_id))), _tmp73_ = g_strdup_printf ("_data%d_", parent_block_id)), _g_free0 (_tmp73_), _vala_ccode_node_unref0 (_tmp72_), _g_free0 (_tmp71_), _tmp74_);
1452
 
                                        _cdecl_ = (_tmp76_ = vala_ccode_declaration_new (_tmp75_ = g_strdup_printf ("Block%dData*", parent_block_id)), _g_free0 (_tmp75_), _tmp76_);
1453
 
                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp78_ = vala_ccode_variable_declarator_new (_tmp77_ = g_strdup_printf ("_data%d_", parent_block_id), (ValaCCodeExpression*) parent_data, NULL)));
1454
 
                                        _vala_ccode_node_unref0 (_tmp78_);
1455
 
                                        _g_free0 (_tmp77_);
 
1501
                                        parent_data = (_tmp78_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp76_ = vala_ccode_identifier_new (_tmp75_ = g_strdup_printf ("_data%d_", block_id))), _tmp77_ = g_strdup_printf ("_data%d_", parent_block_id)), _g_free0 (_tmp77_), _vala_ccode_node_unref0 (_tmp76_), _g_free0 (_tmp75_), _tmp78_);
 
1502
                                        _cdecl_ = (_tmp80_ = vala_ccode_declaration_new (_tmp79_ = g_strdup_printf ("Block%dData*", parent_block_id)), _g_free0 (_tmp79_), _tmp80_);
 
1503
                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp82_ = vala_ccode_variable_declarator_new (_tmp81_ = g_strdup_printf ("_data%d_", parent_block_id), (ValaCCodeExpression*) parent_data, NULL)));
 
1504
                                        _vala_ccode_node_unref0 (_tmp82_);
 
1505
                                        _g_free0 (_tmp81_);
1456
1506
                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
1457
 
                                        closure_block = (_tmp79_ = _vala_code_node_ref0 (parent_closure_block), _vala_code_node_unref0 (closure_block), _tmp79_);
 
1507
                                        closure_block = (_tmp83_ = _vala_code_node_ref0 (parent_closure_block), _vala_code_node_unref0 (closure_block), _tmp83_);
1458
1508
                                        block_id = parent_block_id;
1459
1509
                                        _vala_code_node_unref0 (parent_closure_block);
1460
1510
                                        _vala_ccode_node_unref0 (parent_data);
1461
1511
                                        _vala_ccode_node_unref0 (_cdecl_);
1462
1512
                                }
1463
1513
                                if (vala_method_get_binding (m) == MEMBER_BINDING_INSTANCE) {
1464
 
                                        ValaCCodeIdentifier* _tmp81_;
1465
 
                                        char* _tmp80_;
1466
 
                                        ValaCCodeMemberAccess* _tmp82_;
 
1514
                                        ValaCCodeIdentifier* _tmp85_;
 
1515
                                        char* _tmp84_;
 
1516
                                        ValaCCodeMemberAccess* _tmp86_;
1467
1517
                                        ValaCCodeMemberAccess* cself;
1468
 
                                        char* _tmp84_;
1469
 
                                        char* _tmp83_;
1470
 
                                        ValaCCodeDeclaration* _tmp85_;
 
1518
                                        char* _tmp88_;
 
1519
                                        char* _tmp87_;
 
1520
                                        ValaCCodeDeclaration* _tmp89_;
1471
1521
                                        ValaCCodeDeclaration* _cdecl_;
1472
 
                                        ValaCCodeVariableDeclarator* _tmp86_;
1473
 
                                        cself = (_tmp82_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp81_ = vala_ccode_identifier_new (_tmp80_ = g_strdup_printf ("_data%d_", block_id))), "self"), _vala_ccode_node_unref0 (_tmp81_), _g_free0 (_tmp80_), _tmp82_);
1474
 
                                        _cdecl_ = (_tmp85_ = vala_ccode_declaration_new (_tmp84_ = g_strdup_printf ("%s *", _tmp83_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self), FALSE))), _g_free0 (_tmp84_), _g_free0 (_tmp83_), _tmp85_);
1475
 
                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp86_ = vala_ccode_variable_declarator_new ("self", (ValaCCodeExpression*) cself, NULL)));
1476
 
                                        _vala_ccode_node_unref0 (_tmp86_);
 
1522
                                        ValaCCodeVariableDeclarator* _tmp90_;
 
1523
                                        cself = (_tmp86_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp85_ = vala_ccode_identifier_new (_tmp84_ = g_strdup_printf ("_data%d_", block_id))), "self"), _vala_ccode_node_unref0 (_tmp85_), _g_free0 (_tmp84_), _tmp86_);
 
1524
                                        _cdecl_ = (_tmp89_ = vala_ccode_declaration_new (_tmp88_ = g_strdup_printf ("%s *", _tmp87_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self), FALSE))), _g_free0 (_tmp88_), _g_free0 (_tmp87_), _tmp89_);
 
1525
                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp90_ = vala_ccode_variable_declarator_new ("self", (ValaCCodeExpression*) cself, NULL)));
 
1526
                                        _vala_ccode_node_unref0 (_tmp90_);
1477
1527
                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
1478
1528
                                        _vala_ccode_node_unref0 (cself);
1479
1529
                                        _vala_ccode_node_unref0 (_cdecl_);
1480
1530
                                }
1481
1531
                                _vala_code_node_unref0 (closure_block);
1482
1532
                        } else {
1483
 
                                gboolean _tmp87_ = FALSE;
 
1533
                                gboolean _tmp91_ = FALSE;
1484
1534
                                if (VALA_IS_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m))) {
1485
 
                                        _tmp87_ = !vala_method_get_coroutine (m);
 
1535
                                        _tmp91_ = !vala_method_get_coroutine (m);
1486
1536
                                } else {
1487
 
                                        _tmp87_ = FALSE;
 
1537
                                        _tmp91_ = FALSE;
1488
1538
                                }
1489
 
                                if (_tmp87_) {
 
1539
                                if (_tmp91_) {
1490
1540
                                        ValaClass* cl;
1491
 
                                        gboolean _tmp88_ = FALSE;
 
1541
                                        gboolean _tmp92_ = FALSE;
1492
1542
                                        cl = _vala_code_node_ref0 (VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
1493
1543
                                        if (vala_method_get_overrides (m)) {
1494
 
                                                _tmp88_ = TRUE;
 
1544
                                                _tmp92_ = TRUE;
1495
1545
                                        } else {
1496
 
                                                gboolean _tmp89_ = FALSE;
1497
 
                                                gboolean _tmp90_ = FALSE;
 
1546
                                                gboolean _tmp93_ = FALSE;
 
1547
                                                gboolean _tmp94_ = FALSE;
1498
1548
                                                if (vala_method_get_base_interface_method (m) != NULL) {
1499
 
                                                        _tmp90_ = !vala_method_get_is_abstract (m);
1500
 
                                                } else {
1501
 
                                                        _tmp90_ = FALSE;
1502
 
                                                }
1503
 
                                                if (_tmp90_) {
1504
 
                                                        _tmp89_ = !vala_method_get_is_virtual (m);
1505
 
                                                } else {
1506
 
                                                        _tmp89_ = FALSE;
1507
 
                                                }
1508
 
                                                _tmp88_ = _tmp89_;
 
1549
                                                        _tmp94_ = !vala_method_get_is_abstract (m);
 
1550
                                                } else {
 
1551
                                                        _tmp94_ = FALSE;
 
1552
                                                }
 
1553
                                                if (_tmp94_) {
 
1554
                                                        _tmp93_ = !vala_method_get_is_virtual (m);
 
1555
                                                } else {
 
1556
                                                        _tmp93_ = FALSE;
 
1557
                                                }
 
1558
                                                _tmp92_ = _tmp93_;
1509
1559
                                        }
1510
 
                                        if (_tmp88_) {
 
1560
                                        if (_tmp92_) {
1511
1561
                                                ValaMethod* base_method;
1512
1562
                                                ValaReferenceType* base_expression_type;
1513
1563
                                                ValaObjectType* self_target_type;
1514
 
                                                ValaCCodeIdentifier* _tmp95_;
1515
 
                                                ValaCCodeExpression* _tmp96_;
 
1564
                                                ValaCCodeIdentifier* _tmp99_;
 
1565
                                                ValaCCodeExpression* _tmp100_;
1516
1566
                                                ValaCCodeExpression* cself;
1517
 
                                                char* _tmp98_;
1518
 
                                                char* _tmp97_;
1519
 
                                                ValaCCodeDeclaration* _tmp99_;
 
1567
                                                char* _tmp102_;
 
1568
                                                char* _tmp101_;
 
1569
                                                ValaCCodeDeclaration* _tmp103_;
1520
1570
                                                ValaCCodeDeclaration* _cdecl_;
1521
 
                                                ValaCCodeVariableDeclarator* _tmp100_;
 
1571
                                                ValaCCodeVariableDeclarator* _tmp104_;
1522
1572
                                                base_method = NULL;
1523
1573
                                                base_expression_type = NULL;
1524
1574
                                                if (vala_method_get_overrides (m)) {
1525
 
                                                        ValaMethod* _tmp91_;
1526
 
                                                        ValaReferenceType* _tmp92_;
1527
 
                                                        base_method = (_tmp91_ = _vala_code_node_ref0 (vala_method_get_base_method (m)), _vala_code_node_unref0 (base_method), _tmp91_);
1528
 
                                                        base_expression_type = (_tmp92_ = (ValaReferenceType*) vala_object_type_new ((ValaObjectTypeSymbol*) VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) base_method))), _vala_code_node_unref0 (base_expression_type), _tmp92_);
 
1575
                                                        ValaMethod* _tmp95_;
 
1576
                                                        ValaReferenceType* _tmp96_;
 
1577
                                                        base_method = (_tmp95_ = _vala_code_node_ref0 (vala_method_get_base_method (m)), _vala_code_node_unref0 (base_method), _tmp95_);
 
1578
                                                        base_expression_type = (_tmp96_ = (ValaReferenceType*) vala_object_type_new ((ValaObjectTypeSymbol*) VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) base_method))), _vala_code_node_unref0 (base_expression_type), _tmp96_);
1529
1579
                                                } else {
1530
 
                                                        ValaMethod* _tmp93_;
1531
 
                                                        ValaReferenceType* _tmp94_;
1532
 
                                                        base_method = (_tmp93_ = _vala_code_node_ref0 (vala_method_get_base_interface_method (m)), _vala_code_node_unref0 (base_method), _tmp93_);
1533
 
                                                        base_expression_type = (_tmp94_ = (ValaReferenceType*) vala_object_type_new ((ValaObjectTypeSymbol*) VALA_INTERFACE (vala_symbol_get_parent_symbol ((ValaSymbol*) base_method))), _vala_code_node_unref0 (base_expression_type), _tmp94_);
 
1580
                                                        ValaMethod* _tmp97_;
 
1581
                                                        ValaReferenceType* _tmp98_;
 
1582
                                                        base_method = (_tmp97_ = _vala_code_node_ref0 (vala_method_get_base_interface_method (m)), _vala_code_node_unref0 (base_method), _tmp97_);
 
1583
                                                        base_expression_type = (_tmp98_ = (ValaReferenceType*) vala_object_type_new ((ValaObjectTypeSymbol*) VALA_INTERFACE (vala_symbol_get_parent_symbol ((ValaSymbol*) base_method))), _vala_code_node_unref0 (base_expression_type), _tmp98_);
1534
1584
                                                }
1535
1585
                                                self_target_type = vala_object_type_new ((ValaObjectTypeSymbol*) cl);
1536
 
                                                cself = (_tmp96_ = vala_ccode_base_module_transform_expression ((ValaCCodeBaseModule*) self, (ValaCCodeExpression*) (_tmp95_ = vala_ccode_identifier_new ("base")), (ValaDataType*) base_expression_type, (ValaDataType*) self_target_type, NULL), _vala_ccode_node_unref0 (_tmp95_), _tmp96_);
1537
 
                                                _cdecl_ = (_tmp99_ = vala_ccode_declaration_new (_tmp98_ = g_strdup_printf ("%s *", _tmp97_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE))), _g_free0 (_tmp98_), _g_free0 (_tmp97_), _tmp99_);
1538
 
                                                vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp100_ = vala_ccode_variable_declarator_new ("self", cself, NULL)));
1539
 
                                                _vala_ccode_node_unref0 (_tmp100_);
 
1586
                                                cself = (_tmp100_ = vala_ccode_base_module_transform_expression ((ValaCCodeBaseModule*) self, (ValaCCodeExpression*) (_tmp99_ = vala_ccode_identifier_new ("base")), (ValaDataType*) base_expression_type, (ValaDataType*) self_target_type, NULL), _vala_ccode_node_unref0 (_tmp99_), _tmp100_);
 
1587
                                                _cdecl_ = (_tmp103_ = vala_ccode_declaration_new (_tmp102_ = g_strdup_printf ("%s *", _tmp101_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE))), _g_free0 (_tmp102_), _g_free0 (_tmp101_), _tmp103_);
 
1588
                                                vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp104_ = vala_ccode_variable_declarator_new ("self", cself, NULL)));
 
1589
                                                _vala_ccode_node_unref0 (_tmp104_);
1540
1590
                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
1541
1591
                                                _vala_code_node_unref0 (base_method);
1542
1592
                                                _vala_code_node_unref0 (base_expression_type);
1544
1594
                                                _vala_ccode_node_unref0 (cself);
1545
1595
                                                _vala_ccode_node_unref0 (_cdecl_);
1546
1596
                                        } else {
1547
 
                                                gboolean _tmp101_ = FALSE;
 
1597
                                                gboolean _tmp105_ = FALSE;
1548
1598
                                                if (vala_method_get_binding (m) == MEMBER_BINDING_INSTANCE) {
1549
 
                                                        _tmp101_ = !VALA_IS_CREATION_METHOD (m);
 
1599
                                                        _tmp105_ = !VALA_IS_CREATION_METHOD (m);
1550
1600
                                                } else {
1551
 
                                                        _tmp101_ = FALSE;
 
1601
                                                        _tmp105_ = FALSE;
1552
1602
                                                }
1553
 
                                                if (_tmp101_) {
 
1603
                                                if (_tmp105_) {
1554
1604
                                                        ValaCCodeStatement* ccheckstmt;
1555
1605
                                                        ccheckstmt = vala_ccode_method_module_create_method_type_check_statement (self, m, creturn_type, (ValaTypeSymbol*) cl, TRUE, "self");
1556
1606
                                                        if (ccheckstmt != NULL) {
1564
1614
                                }
1565
1615
                        }
1566
1616
                        {
1567
 
                                ValaList* _tmp102_;
1568
 
                                ValaIterator* _tmp103_;
 
1617
                                ValaList* _tmp106_;
 
1618
                                ValaIterator* _tmp107_;
1569
1619
                                ValaIterator* _param_it;
1570
 
                                _param_it = (_tmp103_ = vala_iterable_iterator ((ValaIterable*) (_tmp102_ = vala_method_get_parameters (m))), _vala_collection_object_unref0 (_tmp102_), _tmp103_);
 
1620
                                _param_it = (_tmp107_ = vala_iterable_iterator ((ValaIterable*) (_tmp106_ = vala_method_get_parameters (m))), _vala_collection_object_unref0 (_tmp106_), _tmp107_);
1571
1621
                                while (TRUE) {
1572
1622
                                        ValaFormalParameter* param;
1573
 
                                        ValaTypeSymbol* t;
1574
 
                                        gboolean _tmp104_ = FALSE;
1575
1623
                                        if (!vala_iterator_next (_param_it)) {
1576
1624
                                                break;
1577
1625
                                        }
1580
1628
                                                _vala_code_node_unref0 (param);
1581
1629
                                                break;
1582
1630
                                        }
1583
 
                                        t = _vala_code_node_ref0 (vala_data_type_get_data_type (vala_formal_parameter_get_parameter_type (param)));
1584
 
                                        if (t != NULL) {
1585
 
                                                _tmp104_ = vala_typesymbol_is_reference_type (t);
1586
 
                                        } else {
1587
 
                                                _tmp104_ = FALSE;
1588
 
                                        }
1589
 
                                        if (_tmp104_) {
1590
 
                                                if (vala_formal_parameter_get_direction (param) != VALA_PARAMETER_DIRECTION_OUT) {
1591
 
                                                        char* _tmp105_;
1592
 
                                                        ValaCCodeStatement* _tmp106_;
 
1631
                                        if (vala_formal_parameter_get_direction (param) != VALA_PARAMETER_DIRECTION_OUT) {
 
1632
                                                ValaTypeSymbol* t;
 
1633
                                                gboolean _tmp108_ = FALSE;
 
1634
                                                t = _vala_code_node_ref0 (vala_data_type_get_data_type (vala_formal_parameter_get_parameter_type (param)));
 
1635
                                                if (t != NULL) {
 
1636
                                                        _tmp108_ = vala_typesymbol_is_reference_type (t);
 
1637
                                                } else {
 
1638
                                                        _tmp108_ = FALSE;
 
1639
                                                }
 
1640
                                                if (_tmp108_) {
 
1641
                                                        char* _tmp109_;
 
1642
                                                        ValaCCodeStatement* _tmp110_;
1593
1643
                                                        ValaCCodeStatement* type_check;
1594
 
                                                        type_check = (_tmp106_ = vala_ccode_method_module_create_method_type_check_statement (self, m, creturn_type, t, !vala_data_type_get_nullable (vala_formal_parameter_get_parameter_type (param)), _tmp105_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) param))), _g_free0 (_tmp105_), _tmp106_);
 
1644
                                                        type_check = (_tmp110_ = vala_ccode_method_module_create_method_type_check_statement (self, m, creturn_type, t, !vala_data_type_get_nullable (vala_formal_parameter_get_parameter_type (param)), _tmp109_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) param))), _g_free0 (_tmp109_), _tmp110_);
1595
1645
                                                        if (type_check != NULL) {
1596
1646
                                                                vala_ccode_node_set_line ((ValaCCodeNode*) type_check, vala_ccode_node_get_line ((ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function));
1597
1647
                                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) type_check);
1598
1648
                                                        }
1599
1649
                                                        _vala_ccode_node_unref0 (type_check);
1600
 
                                                } else {
1601
 
                                                        if (!vala_method_get_coroutine (m)) {
1602
 
                                                                ValaCCodeConstant* _tmp109_;
1603
 
                                                                ValaCCodeUnaryExpression* _tmp108_;
1604
 
                                                                ValaCCodeExpression* _tmp107_;
1605
 
                                                                ValaCCodeAssignment* _tmp110_;
 
1650
                                                }
 
1651
                                                _vala_code_node_unref0 (t);
 
1652
                                        } else {
 
1653
                                                if (!vala_method_get_coroutine (m)) {
 
1654
                                                        ValaTypeSymbol* t;
 
1655
                                                        gboolean _tmp111_ = FALSE;
 
1656
                                                        gboolean _tmp112_ = FALSE;
 
1657
                                                        t = _vala_code_node_ref0 (vala_data_type_get_data_type (vala_formal_parameter_get_parameter_type (param)));
 
1658
                                                        if (t != NULL) {
 
1659
                                                                _tmp112_ = vala_typesymbol_is_reference_type (t);
 
1660
                                                        } else {
 
1661
                                                                _tmp112_ = FALSE;
 
1662
                                                        }
 
1663
                                                        if (_tmp112_) {
 
1664
                                                                _tmp111_ = TRUE;
 
1665
                                                        } else {
 
1666
                                                                _tmp111_ = VALA_IS_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param));
 
1667
                                                        }
 
1668
                                                        if (_tmp111_) {
 
1669
                                                                ValaCCodeConstant* _tmp115_;
 
1670
                                                                ValaCCodeUnaryExpression* _tmp114_;
 
1671
                                                                ValaCCodeExpression* _tmp113_;
 
1672
                                                                ValaCCodeAssignment* _tmp116_;
1606
1673
                                                                ValaCCodeAssignment* a;
1607
1674
                                                                ValaCCodeBlock* cblock;
1608
 
                                                                ValaCCodeExpressionStatement* _tmp111_;
1609
 
                                                                ValaCCodeConstant* _tmp113_;
1610
 
                                                                ValaCCodeExpression* _tmp112_;
1611
 
                                                                ValaCCodeBinaryExpression* _tmp114_;
 
1675
                                                                ValaCCodeExpressionStatement* _tmp117_;
 
1676
                                                                ValaCCodeConstant* _tmp119_;
 
1677
                                                                ValaCCodeExpression* _tmp118_;
 
1678
                                                                ValaCCodeBinaryExpression* _tmp120_;
1612
1679
                                                                ValaCCodeBinaryExpression* condition;
1613
1680
                                                                ValaCCodeIfStatement* if_statement;
1614
 
                                                                a = (_tmp110_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp108_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, _tmp107_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) param)))), (ValaCCodeExpression*) (_tmp109_ = vala_ccode_constant_new ("NULL")), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (_tmp109_), _vala_ccode_node_unref0 (_tmp108_), _vala_ccode_node_unref0 (_tmp107_), _tmp110_);
 
1681
                                                                a = (_tmp116_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp114_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, _tmp113_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) param)))), (ValaCCodeExpression*) (_tmp115_ = vala_ccode_constant_new ("NULL")), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (_tmp115_), _vala_ccode_node_unref0 (_tmp114_), _vala_ccode_node_unref0 (_tmp113_), _tmp116_);
1615
1682
                                                                cblock = vala_ccode_block_new ();
1616
 
                                                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp111_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) a)));
1617
 
                                                                _vala_ccode_node_unref0 (_tmp111_);
1618
 
                                                                condition = (_tmp114_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, _tmp112_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) param)), (ValaCCodeExpression*) (_tmp113_ = vala_ccode_constant_new ("NULL"))), _vala_ccode_node_unref0 (_tmp113_), _vala_ccode_node_unref0 (_tmp112_), _tmp114_);
 
1683
                                                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp117_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) a)));
 
1684
                                                                _vala_ccode_node_unref0 (_tmp117_);
 
1685
                                                                condition = (_tmp120_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, _tmp118_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) param)), (ValaCCodeExpression*) (_tmp119_ = vala_ccode_constant_new ("NULL"))), _vala_ccode_node_unref0 (_tmp119_), _vala_ccode_node_unref0 (_tmp118_), _tmp120_);
1619
1686
                                                                if_statement = vala_ccode_if_statement_new ((ValaCCodeExpression*) condition, (ValaCCodeStatement*) cblock, NULL);
1620
1687
                                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) if_statement);
1621
1688
                                                                _vala_ccode_node_unref0 (a);
1623
1690
                                                                _vala_ccode_node_unref0 (condition);
1624
1691
                                                                _vala_ccode_node_unref0 (if_statement);
1625
1692
                                                        }
 
1693
                                                        _vala_code_node_unref0 (t);
1626
1694
                                                }
1627
1695
                                        }
1628
1696
                                        _vala_code_node_unref0 (param);
1629
 
                                        _vala_code_node_unref0 (t);
1630
1697
                                }
1631
1698
                                _vala_collection_object_unref0 (_param_it);
1632
1699
                        }
1633
1700
                        if (!VALA_IS_VOID_TYPE (vala_method_get_return_type (m))) {
1634
 
                                _tmp116_ = !vala_data_type_is_real_non_null_struct_type (vala_method_get_return_type (m));
1635
 
                        } else {
1636
 
                                _tmp116_ = FALSE;
1637
 
                        }
1638
 
                        if (_tmp116_) {
1639
 
                                _tmp115_ = !vala_method_get_coroutine (m);
1640
 
                        } else {
1641
 
                                _tmp115_ = FALSE;
1642
 
                        }
1643
 
                        if (_tmp115_) {
1644
 
                                gboolean _tmp117_ = FALSE;
1645
 
                                if (vala_method_get_exit_block (m) == NULL) {
1646
 
                                        _tmp117_ = TRUE;
 
1701
                                _tmp122_ = !vala_data_type_is_real_non_null_struct_type (vala_method_get_return_type (m));
 
1702
                        } else {
 
1703
                                _tmp122_ = FALSE;
 
1704
                        }
 
1705
                        if (_tmp122_) {
 
1706
                                _tmp121_ = !vala_method_get_coroutine (m);
 
1707
                        } else {
 
1708
                                _tmp121_ = FALSE;
 
1709
                        }
 
1710
                        if (_tmp121_) {
 
1711
                                char* _tmp123_;
 
1712
                                ValaCCodeDeclaration* _tmp124_;
 
1713
                                ValaCCodeDeclaration* _cdecl_;
 
1714
                                ValaCCodeExpression* _tmp125_;
 
1715
                                ValaCCodeVariableDeclarator* _tmp126_;
 
1716
                                ValaCCodeVariableDeclarator* vardecl;
 
1717
                                gboolean _tmp127_ = FALSE;
 
1718
                                _cdecl_ = (_tmp124_ = vala_ccode_declaration_new (_tmp123_ = vala_data_type_get_cname (vala_method_get_return_type (m))), _g_free0 (_tmp123_), _tmp124_);
 
1719
                                vardecl = (_tmp126_ = vala_ccode_variable_declarator_new ("result", _tmp125_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, vala_method_get_return_type (m), TRUE), NULL), _vala_ccode_node_unref0 (_tmp125_), _tmp126_);
 
1720
                                vala_ccode_variable_declarator_set_init0 (vardecl, TRUE);
 
1721
                                vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) vardecl);
 
1722
                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
 
1723
                                if (vala_method_get_exit_block (m) != NULL) {
 
1724
                                        ValaList* _tmp128_;
 
1725
                                        _tmp127_ = vala_collection_get_size ((ValaCollection*) (_tmp128_ = vala_basic_block_get_predecessors (vala_method_get_exit_block (m)))) == 0;
 
1726
                                        _vala_collection_object_unref0 (_tmp128_);
1647
1727
                                } else {
1648
 
                                        ValaList* _tmp118_;
1649
 
                                        _tmp117_ = vala_collection_get_size ((ValaCollection*) (_tmp118_ = vala_basic_block_get_predecessors (vala_method_get_exit_block (m)))) > 0;
1650
 
                                        _vala_collection_object_unref0 (_tmp118_);
1651
 
                                }
1652
 
                                if (_tmp117_) {
1653
 
                                        char* _tmp119_;
1654
 
                                        ValaCCodeDeclaration* _tmp120_;
1655
 
                                        ValaCCodeDeclaration* _cdecl_;
1656
 
                                        ValaCCodeVariableDeclarator* _tmp121_;
1657
 
                                        _cdecl_ = (_tmp120_ = vala_ccode_declaration_new (_tmp119_ = vala_data_type_get_cname (vala_method_get_return_type (m))), _g_free0 (_tmp119_), _tmp120_);
1658
 
                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp121_ = vala_ccode_variable_declarator_new ("result", NULL, NULL)));
1659
 
                                        _vala_ccode_node_unref0 (_tmp121_);
1660
 
                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
1661
 
                                        _vala_ccode_node_unref0 (_cdecl_);
1662
 
                                }
 
1728
                                        _tmp127_ = FALSE;
 
1729
                                }
 
1730
                                if (_tmp127_) {
 
1731
                                        ValaCCodeReturnStatement* _tmp130_;
 
1732
                                        ValaCCodeIdentifier* _tmp129_;
 
1733
                                        vala_ccode_block_add_statement (vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function), (ValaCCodeNode*) (_tmp130_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp129_ = vala_ccode_identifier_new ("result")))));
 
1734
                                        _vala_ccode_node_unref0 (_tmp130_);
 
1735
                                        _vala_ccode_node_unref0 (_tmp129_);
 
1736
                                }
 
1737
                                _vala_ccode_node_unref0 (_cdecl_);
 
1738
                                _vala_ccode_node_unref0 (vardecl);
1663
1739
                        }
1664
1740
                        if (inner_error) {
1665
1741
                                if (vala_method_get_coroutine (m)) {
1666
 
                                        vala_ccode_struct_add_field (((ValaCCodeBaseModule*) self)->closure_struct, "GError *", "_inner_error_");
 
1742
                                        vala_ccode_struct_add_field (((ValaCCodeBaseModule*) self)->closure_struct, "GError *", "_inner_error_", NULL);
1667
1743
                                } else {
1668
1744
                                        ValaCCodeDeclaration* _cdecl_;
1669
 
                                        ValaCCodeVariableDeclarator* _tmp123_;
1670
 
                                        ValaCCodeConstant* _tmp122_;
 
1745
                                        ValaCCodeVariableDeclarator* _tmp132_;
 
1746
                                        ValaCCodeConstant* _tmp131_;
1671
1747
                                        _cdecl_ = vala_ccode_declaration_new ("GError *");
1672
 
                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp123_ = vala_ccode_variable_declarator_new ("_inner_error_", (ValaCCodeExpression*) (_tmp122_ = vala_ccode_constant_new ("NULL")), NULL)));
1673
 
                                        _vala_ccode_node_unref0 (_tmp123_);
1674
 
                                        _vala_ccode_node_unref0 (_tmp122_);
 
1748
                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp132_ = vala_ccode_variable_declarator_new ("_inner_error_", (ValaCCodeExpression*) (_tmp131_ = vala_ccode_constant_new ("NULL")), NULL)));
 
1749
                                        _vala_ccode_node_unref0 (_tmp132_);
 
1750
                                        _vala_ccode_node_unref0 (_tmp131_);
1675
1751
                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
1676
1752
                                        _vala_ccode_node_unref0 (_cdecl_);
1677
1753
                                }
1684
1760
                                        gint n_params;
1685
1761
                                        n_params = vala_creation_method_get_n_construction_params (VALA_CREATION_METHOD (m));
1686
1762
                                        if (!vala_creation_method_get_chain_up (VALA_CREATION_METHOD (m))) {
1687
 
                                                gboolean _tmp124_ = FALSE;
 
1763
                                                gboolean _tmp133_ = FALSE;
1688
1764
                                                if (n_params > 0) {
1689
 
                                                        _tmp124_ = TRUE;
 
1765
                                                        _tmp133_ = TRUE;
1690
1766
                                                } else {
1691
 
                                                        ValaList* _tmp125_;
1692
 
                                                        _tmp124_ = vala_collection_get_size ((ValaCollection*) (_tmp125_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))) > 0;
1693
 
                                                        _vala_collection_object_unref0 (_tmp125_);
 
1767
                                                        ValaList* _tmp134_;
 
1768
                                                        _tmp133_ = vala_collection_get_size ((ValaCollection*) (_tmp134_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))) > 0;
 
1769
                                                        _vala_collection_object_unref0 (_tmp134_);
1694
1770
                                                }
1695
 
                                                if (_tmp124_) {
1696
 
                                                        ValaCCodeIdentifier* _tmp126_;
1697
 
                                                        ValaCCodeFunctionCall* _tmp127_;
 
1771
                                                if (_tmp133_) {
 
1772
                                                        ValaCCodeIdentifier* _tmp135_;
 
1773
                                                        ValaCCodeFunctionCall* _tmp136_;
1698
1774
                                                        ValaCCodeFunctionCall* cparamsinit;
1699
 
                                                        ValaCCodeIdentifier* _tmp128_;
1700
 
                                                        ValaCCodeConstant* _tmp131_;
1701
 
                                                        char* _tmp130_;
1702
 
                                                        ValaList* _tmp129_;
 
1775
                                                        ValaCCodeIdentifier* _tmp137_;
 
1776
                                                        ValaCCodeConstant* _tmp140_;
 
1777
                                                        char* _tmp139_;
 
1778
                                                        ValaList* _tmp138_;
1703
1779
                                                        ValaCCodeDeclaration* _cdecl_;
1704
 
                                                        ValaCCodeVariableDeclarator* _tmp132_;
1705
 
                                                        ValaCCodeDeclaration* _tmp133_;
1706
 
                                                        ValaCCodeVariableDeclarator* _tmp135_;
1707
 
                                                        ValaCCodeIdentifier* _tmp134_;
1708
 
                                                        cparamsinit = (_tmp127_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp126_ = vala_ccode_identifier_new ("g_new0"))), _vala_ccode_node_unref0 (_tmp126_), _tmp127_);
1709
 
                                                        vala_ccode_function_call_add_argument (cparamsinit, (ValaCCodeExpression*) (_tmp128_ = vala_ccode_identifier_new ("GParameter")));
1710
 
                                                        _vala_ccode_node_unref0 (_tmp128_);
1711
 
                                                        vala_ccode_function_call_add_argument (cparamsinit, (ValaCCodeExpression*) (_tmp131_ = vala_ccode_constant_new (_tmp130_ = g_strdup_printf ("%i", n_params + (3 * vala_collection_get_size ((ValaCollection*) (_tmp129_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))))))));
1712
 
                                                        _vala_ccode_node_unref0 (_tmp131_);
1713
 
                                                        _g_free0 (_tmp130_);
1714
 
                                                        _vala_collection_object_unref0 (_tmp129_);
 
1780
                                                        ValaCCodeVariableDeclarator* _tmp141_;
 
1781
                                                        ValaCCodeDeclaration* _tmp142_;
 
1782
                                                        ValaCCodeVariableDeclarator* _tmp144_;
 
1783
                                                        ValaCCodeIdentifier* _tmp143_;
 
1784
                                                        cparamsinit = (_tmp136_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp135_ = vala_ccode_identifier_new ("g_new0"))), _vala_ccode_node_unref0 (_tmp135_), _tmp136_);
 
1785
                                                        vala_ccode_function_call_add_argument (cparamsinit, (ValaCCodeExpression*) (_tmp137_ = vala_ccode_identifier_new ("GParameter")));
 
1786
                                                        _vala_ccode_node_unref0 (_tmp137_);
 
1787
                                                        vala_ccode_function_call_add_argument (cparamsinit, (ValaCCodeExpression*) (_tmp140_ = vala_ccode_constant_new (_tmp139_ = g_strdup_printf ("%i", n_params + (3 * vala_collection_get_size ((ValaCollection*) (_tmp138_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))))))));
 
1788
                                                        _vala_ccode_node_unref0 (_tmp140_);
 
1789
                                                        _g_free0 (_tmp139_);
 
1790
                                                        _vala_collection_object_unref0 (_tmp138_);
1715
1791
                                                        _cdecl_ = vala_ccode_declaration_new ("GParameter *");
1716
 
                                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp132_ = vala_ccode_variable_declarator_new ("__params", (ValaCCodeExpression*) cparamsinit, NULL)));
1717
 
                                                        _vala_ccode_node_unref0 (_tmp132_);
 
1792
                                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp141_ = vala_ccode_variable_declarator_new ("__params", (ValaCCodeExpression*) cparamsinit, NULL)));
 
1793
                                                        _vala_ccode_node_unref0 (_tmp141_);
1718
1794
                                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
1719
 
                                                        _cdecl_ = (_tmp133_ = vala_ccode_declaration_new ("GParameter *"), _vala_ccode_node_unref0 (_cdecl_), _tmp133_);
1720
 
                                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp135_ = vala_ccode_variable_declarator_new ("__params_it", (ValaCCodeExpression*) (_tmp134_ = vala_ccode_identifier_new ("__params")), NULL)));
1721
 
                                                        _vala_ccode_node_unref0 (_tmp135_);
1722
 
                                                        _vala_ccode_node_unref0 (_tmp134_);
 
1795
                                                        _cdecl_ = (_tmp142_ = vala_ccode_declaration_new ("GParameter *"), _vala_ccode_node_unref0 (_cdecl_), _tmp142_);
 
1796
                                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp144_ = vala_ccode_variable_declarator_new ("__params_it", (ValaCCodeExpression*) (_tmp143_ = vala_ccode_identifier_new ("__params")), NULL)));
 
1797
                                                        _vala_ccode_node_unref0 (_tmp144_);
 
1798
                                                        _vala_ccode_node_unref0 (_tmp143_);
1723
1799
                                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
1724
1800
                                                        _vala_ccode_node_unref0 (cparamsinit);
1725
1801
                                                        _vala_ccode_node_unref0 (_cdecl_);
1726
1802
                                                }
1727
1803
                                                {
1728
 
                                                        ValaList* _tmp136_;
1729
 
                                                        ValaIterator* _tmp137_;
 
1804
                                                        ValaList* _tmp145_;
 
1805
                                                        ValaIterator* _tmp146_;
1730
1806
                                                        ValaIterator* _type_param_it;
1731
 
                                                        _type_param_it = (_tmp137_ = vala_iterable_iterator ((ValaIterable*) (_tmp136_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))), _vala_collection_object_unref0 (_tmp136_), _tmp137_);
 
1807
                                                        _type_param_it = (_tmp146_ = vala_iterable_iterator ((ValaIterable*) (_tmp145_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))), _vala_collection_object_unref0 (_tmp145_), _tmp146_);
1732
1808
                                                        while (TRUE) {
1733
1809
                                                                ValaTypeParameter* type_param;
1734
1810
                                                                ValaCCodeConstant* prop_name;
1735
1811
                                                                ValaCCodeIdentifier* param_name;
1736
 
                                                                ValaCCodeConstant* _tmp140_;
1737
 
                                                                char* _tmp139_;
1738
 
                                                                char* _tmp138_;
1739
 
                                                                ValaCCodeIdentifier* _tmp143_;
1740
 
                                                                char* _tmp142_;
1741
 
                                                                char* _tmp141_;
1742
 
                                                                ValaCCodeExpressionStatement* _tmp146_;
1743
 
                                                                ValaCCodeExpression* _tmp145_;
1744
 
                                                                ValaIntegerType* _tmp144_;
1745
1812
                                                                ValaCCodeConstant* _tmp149_;
1746
1813
                                                                char* _tmp148_;
1747
1814
                                                                char* _tmp147_;
1748
1815
                                                                ValaCCodeIdentifier* _tmp152_;
1749
1816
                                                                char* _tmp151_;
1750
1817
                                                                char* _tmp150_;
1751
 
                                                                ValaCCodeExpressionStatement* _tmp156_;
1752
 
                                                                ValaCCodeExpression* _tmp155_;
1753
 
                                                                ValaPointerType* _tmp154_;
1754
 
                                                                ValaVoidType* _tmp153_;
1755
 
                                                                ValaCCodeConstant* _tmp159_;
1756
 
                                                                char* _tmp158_;
 
1818
                                                                ValaCCodeExpressionStatement* _tmp155_;
 
1819
                                                                ValaCCodeExpression* _tmp154_;
 
1820
                                                                ValaIntegerType* _tmp153_;
 
1821
                                                                ValaCCodeConstant* _tmp158_;
1757
1822
                                                                char* _tmp157_;
1758
 
                                                                ValaCCodeIdentifier* _tmp162_;
1759
 
                                                                char* _tmp161_;
 
1823
                                                                char* _tmp156_;
 
1824
                                                                ValaCCodeIdentifier* _tmp161_;
1760
1825
                                                                char* _tmp160_;
1761
 
                                                                ValaCCodeExpressionStatement* _tmp166_;
1762
 
                                                                ValaCCodeExpression* _tmp165_;
1763
 
                                                                ValaPointerType* _tmp164_;
1764
 
                                                                ValaVoidType* _tmp163_;
 
1826
                                                                char* _tmp159_;
 
1827
                                                                ValaCCodeExpressionStatement* _tmp165_;
 
1828
                                                                ValaCCodeExpression* _tmp164_;
 
1829
                                                                ValaPointerType* _tmp163_;
 
1830
                                                                ValaVoidType* _tmp162_;
 
1831
                                                                ValaCCodeConstant* _tmp168_;
 
1832
                                                                char* _tmp167_;
 
1833
                                                                char* _tmp166_;
 
1834
                                                                ValaCCodeIdentifier* _tmp171_;
 
1835
                                                                char* _tmp170_;
 
1836
                                                                char* _tmp169_;
 
1837
                                                                ValaCCodeExpressionStatement* _tmp175_;
 
1838
                                                                ValaCCodeExpression* _tmp174_;
 
1839
                                                                ValaPointerType* _tmp173_;
 
1840
                                                                ValaVoidType* _tmp172_;
1765
1841
                                                                if (!vala_iterator_next (_type_param_it)) {
1766
1842
                                                                        break;
1767
1843
                                                                }
1768
1844
                                                                type_param = (ValaTypeParameter*) vala_iterator_get (_type_param_it);
1769
1845
                                                                prop_name = NULL;
1770
1846
                                                                param_name = NULL;
1771
 
                                                                prop_name = (_tmp140_ = vala_ccode_constant_new (_tmp139_ = g_strdup_printf ("\"%s-type\"", _tmp138_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (prop_name), _tmp140_);
1772
 
                                                                _g_free0 (_tmp139_);
1773
 
                                                                _g_free0 (_tmp138_);
1774
 
                                                                param_name = (_tmp143_ = vala_ccode_identifier_new (_tmp142_ = g_strdup_printf ("%s_type", _tmp141_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp143_);
1775
 
                                                                _g_free0 (_tmp142_);
1776
 
                                                                _g_free0 (_tmp141_);
1777
 
                                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp146_ = vala_ccode_expression_statement_new (_tmp145_ = vala_ccode_module_get_construct_property_assignment ((ValaCCodeModule*) self, prop_name, (ValaDataType*) (_tmp144_ = vala_integer_type_new (VALA_STRUCT (((ValaCCodeBaseModule*) self)->gtype_type), NULL, NULL)), (ValaCCodeExpression*) param_name))));
1778
 
                                                                _vala_ccode_node_unref0 (_tmp146_);
1779
 
                                                                _vala_ccode_node_unref0 (_tmp145_);
1780
 
                                                                _vala_code_node_unref0 (_tmp144_);
1781
 
                                                                prop_name = (_tmp149_ = vala_ccode_constant_new (_tmp148_ = g_strdup_printf ("\"%s-dup-func\"", _tmp147_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (prop_name), _tmp149_);
 
1847
                                                                prop_name = (_tmp149_ = vala_ccode_constant_new (_tmp148_ = g_strdup_printf ("\"%s-type\"", _tmp147_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (prop_name), _tmp149_);
1782
1848
                                                                _g_free0 (_tmp148_);
1783
1849
                                                                _g_free0 (_tmp147_);
1784
 
                                                                param_name = (_tmp152_ = vala_ccode_identifier_new (_tmp151_ = g_strdup_printf ("%s_dup_func", _tmp150_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp152_);
 
1850
                                                                param_name = (_tmp152_ = vala_ccode_identifier_new (_tmp151_ = g_strdup_printf ("%s_type", _tmp150_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp152_);
1785
1851
                                                                _g_free0 (_tmp151_);
1786
1852
                                                                _g_free0 (_tmp150_);
1787
 
                                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp156_ = vala_ccode_expression_statement_new (_tmp155_ = vala_ccode_module_get_construct_property_assignment ((ValaCCodeModule*) self, prop_name, (ValaDataType*) (_tmp154_ = vala_pointer_type_new ((ValaDataType*) (_tmp153_ = vala_void_type_new (NULL)), NULL)), (ValaCCodeExpression*) param_name))));
1788
 
                                                                _vala_ccode_node_unref0 (_tmp156_);
 
1853
                                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp155_ = vala_ccode_expression_statement_new (_tmp154_ = vala_ccode_module_get_construct_property_assignment ((ValaCCodeModule*) self, prop_name, (ValaDataType*) (_tmp153_ = vala_integer_type_new (VALA_STRUCT (((ValaCCodeBaseModule*) self)->gtype_type), NULL, NULL)), (ValaCCodeExpression*) param_name))));
1789
1854
                                                                _vala_ccode_node_unref0 (_tmp155_);
1790
 
                                                                _vala_code_node_unref0 (_tmp154_);
 
1855
                                                                _vala_ccode_node_unref0 (_tmp154_);
1791
1856
                                                                _vala_code_node_unref0 (_tmp153_);
1792
 
                                                                prop_name = (_tmp159_ = vala_ccode_constant_new (_tmp158_ = g_strdup_printf ("\"%s-destroy-func\"", _tmp157_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (prop_name), _tmp159_);
1793
 
                                                                _g_free0 (_tmp158_);
 
1857
                                                                prop_name = (_tmp158_ = vala_ccode_constant_new (_tmp157_ = g_strdup_printf ("\"%s-dup-func\"", _tmp156_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (prop_name), _tmp158_);
1794
1858
                                                                _g_free0 (_tmp157_);
1795
 
                                                                param_name = (_tmp162_ = vala_ccode_identifier_new (_tmp161_ = g_strdup_printf ("%s_destroy_func", _tmp160_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp162_);
1796
 
                                                                _g_free0 (_tmp161_);
 
1859
                                                                _g_free0 (_tmp156_);
 
1860
                                                                param_name = (_tmp161_ = vala_ccode_identifier_new (_tmp160_ = g_strdup_printf ("%s_dup_func", _tmp159_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp161_);
1797
1861
                                                                _g_free0 (_tmp160_);
1798
 
                                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp166_ = vala_ccode_expression_statement_new (_tmp165_ = vala_ccode_module_get_construct_property_assignment ((ValaCCodeModule*) self, prop_name, (ValaDataType*) (_tmp164_ = vala_pointer_type_new ((ValaDataType*) (_tmp163_ = vala_void_type_new (NULL)), NULL)), (ValaCCodeExpression*) param_name))));
1799
 
                                                                _vala_ccode_node_unref0 (_tmp166_);
 
1862
                                                                _g_free0 (_tmp159_);
 
1863
                                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp165_ = vala_ccode_expression_statement_new (_tmp164_ = vala_ccode_module_get_construct_property_assignment ((ValaCCodeModule*) self, prop_name, (ValaDataType*) (_tmp163_ = vala_pointer_type_new ((ValaDataType*) (_tmp162_ = vala_void_type_new (NULL)), NULL)), (ValaCCodeExpression*) param_name))));
1800
1864
                                                                _vala_ccode_node_unref0 (_tmp165_);
1801
 
                                                                _vala_code_node_unref0 (_tmp164_);
 
1865
                                                                _vala_ccode_node_unref0 (_tmp164_);
1802
1866
                                                                _vala_code_node_unref0 (_tmp163_);
 
1867
                                                                _vala_code_node_unref0 (_tmp162_);
 
1868
                                                                prop_name = (_tmp168_ = vala_ccode_constant_new (_tmp167_ = g_strdup_printf ("\"%s-destroy-func\"", _tmp166_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (prop_name), _tmp168_);
 
1869
                                                                _g_free0 (_tmp167_);
 
1870
                                                                _g_free0 (_tmp166_);
 
1871
                                                                param_name = (_tmp171_ = vala_ccode_identifier_new (_tmp170_ = g_strdup_printf ("%s_destroy_func", _tmp169_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp171_);
 
1872
                                                                _g_free0 (_tmp170_);
 
1873
                                                                _g_free0 (_tmp169_);
 
1874
                                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp175_ = vala_ccode_expression_statement_new (_tmp174_ = vala_ccode_module_get_construct_property_assignment ((ValaCCodeModule*) self, prop_name, (ValaDataType*) (_tmp173_ = vala_pointer_type_new ((ValaDataType*) (_tmp172_ = vala_void_type_new (NULL)), NULL)), (ValaCCodeExpression*) param_name))));
 
1875
                                                                _vala_ccode_node_unref0 (_tmp175_);
 
1876
                                                                _vala_ccode_node_unref0 (_tmp174_);
 
1877
                                                                _vala_code_node_unref0 (_tmp173_);
 
1878
                                                                _vala_code_node_unref0 (_tmp172_);
1803
1879
                                                                _vala_code_node_unref0 (type_param);
1804
1880
                                                                _vala_ccode_node_unref0 (prop_name);
1805
1881
                                                                _vala_ccode_node_unref0 (param_name);
1810
1886
                                } else {
1811
1887
                                        if (vala_ccode_method_module_is_gtypeinstance_creation_method (self, m)) {
1812
1888
                                                ValaClass* cl;
1813
 
                                                char* _tmp168_;
1814
 
                                                char* _tmp167_;
1815
 
                                                ValaCCodeDeclaration* _tmp169_;
 
1889
                                                char* _tmp177_;
 
1890
                                                char* _tmp176_;
 
1891
                                                ValaCCodeDeclaration* _tmp178_;
1816
1892
                                                ValaCCodeDeclaration* cdeclaration;
1817
1893
                                                ValaCCodeVariableDeclarator* _cdecl_;
1818
1894
                                                cl = _vala_code_node_ref0 (VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
1819
 
                                                cdeclaration = (_tmp169_ = vala_ccode_declaration_new (_tmp168_ = g_strconcat (_tmp167_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE), "*", NULL)), _g_free0 (_tmp168_), _g_free0 (_tmp167_), _tmp169_);
 
1895
                                                cdeclaration = (_tmp178_ = vala_ccode_declaration_new (_tmp177_ = g_strconcat (_tmp176_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE), "*", NULL)), _g_free0 (_tmp177_), _g_free0 (_tmp176_), _tmp178_);
1820
1896
                                                _cdecl_ = vala_ccode_variable_declarator_new ("self", NULL, NULL);
1821
1897
                                                vala_ccode_declaration_add_declarator (cdeclaration, (ValaCCodeDeclarator*) _cdecl_);
1822
1898
                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) cdeclaration);
1823
1899
                                                if (!vala_creation_method_get_chain_up (VALA_CREATION_METHOD (m))) {
1824
 
                                                        ValaCCodeIdentifier* _tmp170_;
1825
 
                                                        ValaCCodeFunctionCall* _tmp171_;
 
1900
                                                        ValaCCodeIdentifier* _tmp179_;
 
1901
                                                        ValaCCodeFunctionCall* _tmp180_;
1826
1902
                                                        ValaCCodeFunctionCall* ccall;
1827
 
                                                        ValaCCodeIdentifier* _tmp172_;
1828
 
                                                        ValaCCodeCastExpression* _tmp175_;
1829
 
                                                        char* _tmp174_;
1830
 
                                                        char* _tmp173_;
1831
 
                                                        ccall = (_tmp171_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp170_ = vala_ccode_identifier_new ("g_type_create_instance"))), _vala_ccode_node_unref0 (_tmp170_), _tmp171_);
1832
 
                                                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp172_ = vala_ccode_identifier_new ("object_type")));
1833
 
                                                        _vala_ccode_node_unref0 (_tmp172_);
1834
 
                                                        vala_ccode_variable_declarator_set_initializer (_cdecl_, (ValaCCodeExpression*) (_tmp175_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) ccall, _tmp174_ = g_strconcat (_tmp173_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE), "*", NULL))));
1835
 
                                                        _vala_ccode_node_unref0 (_tmp175_);
1836
 
                                                        _g_free0 (_tmp174_);
1837
 
                                                        _g_free0 (_tmp173_);
 
1903
                                                        ValaCCodeIdentifier* _tmp181_;
 
1904
                                                        ValaCCodeCastExpression* _tmp184_;
 
1905
                                                        char* _tmp183_;
 
1906
                                                        char* _tmp182_;
 
1907
                                                        ccall = (_tmp180_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp179_ = vala_ccode_identifier_new ("g_type_create_instance"))), _vala_ccode_node_unref0 (_tmp179_), _tmp180_);
 
1908
                                                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp181_ = vala_ccode_identifier_new ("object_type")));
 
1909
                                                        _vala_ccode_node_unref0 (_tmp181_);
 
1910
                                                        vala_ccode_variable_declarator_set_initializer (_cdecl_, (ValaCCodeExpression*) (_tmp184_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) ccall, _tmp183_ = g_strconcat (_tmp182_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE), "*", NULL))));
 
1911
                                                        _vala_ccode_node_unref0 (_tmp184_);
 
1912
                                                        _g_free0 (_tmp183_);
 
1913
                                                        _g_free0 (_tmp182_);
1838
1914
                                                        {
1839
 
                                                                ValaList* _tmp176_;
1840
 
                                                                ValaIterator* _tmp177_;
 
1915
                                                                ValaList* _tmp185_;
 
1916
                                                                ValaIterator* _tmp186_;
1841
1917
                                                                ValaIterator* _type_param_it;
1842
 
                                                                _type_param_it = (_tmp177_ = vala_iterable_iterator ((ValaIterable*) (_tmp176_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))), _vala_collection_object_unref0 (_tmp176_), _tmp177_);
 
1918
                                                                _type_param_it = (_tmp186_ = vala_iterable_iterator ((ValaIterable*) (_tmp185_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))), _vala_collection_object_unref0 (_tmp185_), _tmp186_);
1843
1919
                                                                while (TRUE) {
1844
1920
                                                                        ValaTypeParameter* type_param;
1845
1921
                                                                        ValaCCodeIdentifier* param_name;
1846
1922
                                                                        ValaCCodeAssignment* assign;
1847
 
                                                                        ValaCCodeIdentifier* _tmp178_;
1848
 
                                                                        ValaCCodeMemberAccess* _tmp179_;
 
1923
                                                                        ValaCCodeIdentifier* _tmp187_;
 
1924
                                                                        ValaCCodeMemberAccess* _tmp188_;
1849
1925
                                                                        ValaCCodeMemberAccess* priv_access;
1850
 
                                                                        ValaCCodeIdentifier* _tmp182_;
1851
 
                                                                        char* _tmp181_;
1852
 
                                                                        char* _tmp180_;
1853
 
                                                                        ValaCCodeAssignment* _tmp184_;
1854
 
                                                                        ValaCCodeMemberAccess* _tmp183_;
1855
 
                                                                        ValaCCodeExpressionStatement* _tmp185_;
1856
 
                                                                        ValaCCodeIdentifier* _tmp188_;
1857
 
                                                                        char* _tmp187_;
1858
 
                                                                        char* _tmp186_;
1859
 
                                                                        ValaCCodeAssignment* _tmp190_;
1860
 
                                                                        ValaCCodeMemberAccess* _tmp189_;
1861
 
                                                                        ValaCCodeExpressionStatement* _tmp191_;
1862
 
                                                                        ValaCCodeIdentifier* _tmp194_;
1863
 
                                                                        char* _tmp193_;
1864
 
                                                                        char* _tmp192_;
1865
 
                                                                        ValaCCodeAssignment* _tmp196_;
1866
 
                                                                        ValaCCodeMemberAccess* _tmp195_;
1867
 
                                                                        ValaCCodeExpressionStatement* _tmp197_;
 
1926
                                                                        ValaCCodeIdentifier* _tmp191_;
 
1927
                                                                        char* _tmp190_;
 
1928
                                                                        char* _tmp189_;
 
1929
                                                                        ValaCCodeAssignment* _tmp193_;
 
1930
                                                                        ValaCCodeMemberAccess* _tmp192_;
 
1931
                                                                        ValaCCodeExpressionStatement* _tmp194_;
 
1932
                                                                        ValaCCodeIdentifier* _tmp197_;
 
1933
                                                                        char* _tmp196_;
 
1934
                                                                        char* _tmp195_;
 
1935
                                                                        ValaCCodeAssignment* _tmp199_;
 
1936
                                                                        ValaCCodeMemberAccess* _tmp198_;
 
1937
                                                                        ValaCCodeExpressionStatement* _tmp200_;
 
1938
                                                                        ValaCCodeIdentifier* _tmp203_;
 
1939
                                                                        char* _tmp202_;
 
1940
                                                                        char* _tmp201_;
 
1941
                                                                        ValaCCodeAssignment* _tmp205_;
 
1942
                                                                        ValaCCodeMemberAccess* _tmp204_;
 
1943
                                                                        ValaCCodeExpressionStatement* _tmp206_;
1868
1944
                                                                        if (!vala_iterator_next (_type_param_it)) {
1869
1945
                                                                                break;
1870
1946
                                                                        }
1871
1947
                                                                        type_param = (ValaTypeParameter*) vala_iterator_get (_type_param_it);
1872
1948
                                                                        param_name = NULL;
1873
1949
                                                                        assign = NULL;
1874
 
                                                                        priv_access = (_tmp179_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp178_ = vala_ccode_identifier_new ("self")), "priv"), _vala_ccode_node_unref0 (_tmp178_), _tmp179_);
1875
 
                                                                        param_name = (_tmp182_ = vala_ccode_identifier_new (_tmp181_ = g_strdup_printf ("%s_type", _tmp180_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp182_);
1876
 
                                                                        _g_free0 (_tmp181_);
1877
 
                                                                        _g_free0 (_tmp180_);
1878
 
                                                                        assign = (_tmp184_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp183_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, vala_ccode_identifier_get_name (param_name))), (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (assign), _tmp184_);
1879
 
                                                                        _vala_ccode_node_unref0 (_tmp183_);
1880
 
                                                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp185_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) assign)));
1881
 
                                                                        _vala_ccode_node_unref0 (_tmp185_);
1882
 
                                                                        param_name = (_tmp188_ = vala_ccode_identifier_new (_tmp187_ = g_strdup_printf ("%s_dup_func", _tmp186_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp188_);
1883
 
                                                                        _g_free0 (_tmp187_);
1884
 
                                                                        _g_free0 (_tmp186_);
1885
 
                                                                        assign = (_tmp190_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp189_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, vala_ccode_identifier_get_name (param_name))), (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (assign), _tmp190_);
1886
 
                                                                        _vala_ccode_node_unref0 (_tmp189_);
1887
 
                                                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp191_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) assign)));
1888
 
                                                                        _vala_ccode_node_unref0 (_tmp191_);
1889
 
                                                                        param_name = (_tmp194_ = vala_ccode_identifier_new (_tmp193_ = g_strdup_printf ("%s_destroy_func", _tmp192_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp194_);
1890
 
                                                                        _g_free0 (_tmp193_);
1891
 
                                                                        _g_free0 (_tmp192_);
1892
 
                                                                        assign = (_tmp196_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp195_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, vala_ccode_identifier_get_name (param_name))), (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (assign), _tmp196_);
1893
 
                                                                        _vala_ccode_node_unref0 (_tmp195_);
1894
 
                                                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp197_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) assign)));
1895
 
                                                                        _vala_ccode_node_unref0 (_tmp197_);
 
1950
                                                                        priv_access = (_tmp188_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp187_ = vala_ccode_identifier_new ("self")), "priv"), _vala_ccode_node_unref0 (_tmp187_), _tmp188_);
 
1951
                                                                        param_name = (_tmp191_ = vala_ccode_identifier_new (_tmp190_ = g_strdup_printf ("%s_type", _tmp189_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp191_);
 
1952
                                                                        _g_free0 (_tmp190_);
 
1953
                                                                        _g_free0 (_tmp189_);
 
1954
                                                                        assign = (_tmp193_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp192_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, vala_ccode_identifier_get_name (param_name))), (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (assign), _tmp193_);
 
1955
                                                                        _vala_ccode_node_unref0 (_tmp192_);
 
1956
                                                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp194_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) assign)));
 
1957
                                                                        _vala_ccode_node_unref0 (_tmp194_);
 
1958
                                                                        param_name = (_tmp197_ = vala_ccode_identifier_new (_tmp196_ = g_strdup_printf ("%s_dup_func", _tmp195_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp197_);
 
1959
                                                                        _g_free0 (_tmp196_);
 
1960
                                                                        _g_free0 (_tmp195_);
 
1961
                                                                        assign = (_tmp199_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp198_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, vala_ccode_identifier_get_name (param_name))), (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (assign), _tmp199_);
 
1962
                                                                        _vala_ccode_node_unref0 (_tmp198_);
 
1963
                                                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp200_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) assign)));
 
1964
                                                                        _vala_ccode_node_unref0 (_tmp200_);
 
1965
                                                                        param_name = (_tmp203_ = vala_ccode_identifier_new (_tmp202_ = g_strdup_printf ("%s_destroy_func", _tmp201_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp203_);
 
1966
                                                                        _g_free0 (_tmp202_);
 
1967
                                                                        _g_free0 (_tmp201_);
 
1968
                                                                        assign = (_tmp205_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp204_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, vala_ccode_identifier_get_name (param_name))), (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (assign), _tmp205_);
 
1969
                                                                        _vala_ccode_node_unref0 (_tmp204_);
 
1970
                                                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp206_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) assign)));
 
1971
                                                                        _vala_ccode_node_unref0 (_tmp206_);
1896
1972
                                                                        _vala_code_node_unref0 (type_param);
1897
1973
                                                                        _vala_ccode_node_unref0 (param_name);
1898
1974
                                                                        _vala_ccode_node_unref0 (assign);
1908
1984
                                        } else {
1909
1985
                                                if (VALA_IS_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self))) {
1910
1986
                                                        ValaClass* cl;
1911
 
                                                        char* _tmp199_;
1912
 
                                                        char* _tmp198_;
1913
 
                                                        ValaCCodeDeclaration* _tmp200_;
 
1987
                                                        char* _tmp208_;
 
1988
                                                        char* _tmp207_;
 
1989
                                                        ValaCCodeDeclaration* _tmp209_;
1914
1990
                                                        ValaCCodeDeclaration* cdeclaration;
1915
1991
                                                        ValaCCodeVariableDeclarator* _cdecl_;
1916
1992
                                                        cl = _vala_code_node_ref0 (VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
1917
 
                                                        cdeclaration = (_tmp200_ = vala_ccode_declaration_new (_tmp199_ = g_strconcat (_tmp198_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE), "*", NULL)), _g_free0 (_tmp199_), _g_free0 (_tmp198_), _tmp200_);
 
1993
                                                        cdeclaration = (_tmp209_ = vala_ccode_declaration_new (_tmp208_ = g_strconcat (_tmp207_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE), "*", NULL)), _g_free0 (_tmp208_), _g_free0 (_tmp207_), _tmp209_);
1918
1994
                                                        _cdecl_ = vala_ccode_variable_declarator_new ("self", NULL, NULL);
1919
1995
                                                        vala_ccode_declaration_add_declarator (cdeclaration, (ValaCCodeDeclarator*) _cdecl_);
1920
1996
                                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) cdeclaration);
1921
1997
                                                        if (!vala_creation_method_get_chain_up (VALA_CREATION_METHOD (m))) {
1922
 
                                                                ValaCCodeIdentifier* _tmp201_;
1923
 
                                                                ValaCCodeFunctionCall* _tmp202_;
 
1998
                                                                ValaCCodeIdentifier* _tmp210_;
 
1999
                                                                ValaCCodeFunctionCall* _tmp211_;
1924
2000
                                                                ValaCCodeFunctionCall* ccall;
1925
 
                                                                ValaCCodeIdentifier* _tmp204_;
1926
 
                                                                char* _tmp203_;
1927
 
                                                                ccall = (_tmp202_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp201_ = vala_ccode_identifier_new ("g_slice_new0"))), _vala_ccode_node_unref0 (_tmp201_), _tmp202_);
1928
 
                                                                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp204_ = vala_ccode_identifier_new (_tmp203_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE))));
1929
 
                                                                _vala_ccode_node_unref0 (_tmp204_);
1930
 
                                                                _g_free0 (_tmp203_);
 
2001
                                                                ValaCCodeIdentifier* _tmp213_;
 
2002
                                                                char* _tmp212_;
 
2003
                                                                ccall = (_tmp211_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp210_ = vala_ccode_identifier_new ("g_slice_new0"))), _vala_ccode_node_unref0 (_tmp210_), _tmp211_);
 
2004
                                                                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp213_ = vala_ccode_identifier_new (_tmp212_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE))));
 
2005
                                                                _vala_ccode_node_unref0 (_tmp213_);
 
2006
                                                                _g_free0 (_tmp212_);
1931
2007
                                                                vala_ccode_variable_declarator_set_initializer (_cdecl_, (ValaCCodeExpression*) ccall);
1932
2008
                                                                _vala_ccode_node_unref0 (ccall);
1933
2009
                                                        }
1934
2010
                                                        if (vala_class_get_base_class (cl) == NULL) {
1935
 
                                                                ValaCCodeIdentifier* _tmp207_;
1936
 
                                                                char* _tmp206_;
1937
 
                                                                char* _tmp205_;
1938
 
                                                                ValaCCodeFunctionCall* _tmp208_;
 
2011
                                                                ValaCCodeIdentifier* _tmp216_;
 
2012
                                                                char* _tmp215_;
 
2013
                                                                char* _tmp214_;
 
2014
                                                                ValaCCodeFunctionCall* _tmp217_;
1939
2015
                                                                ValaCCodeFunctionCall* cinitcall;
1940
 
                                                                ValaCCodeIdentifier* _tmp209_;
1941
 
                                                                ValaCCodeExpressionStatement* _tmp210_;
1942
 
                                                                cinitcall = (_tmp208_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp207_ = vala_ccode_identifier_new (_tmp206_ = g_strdup_printf ("%s_instance_init", _tmp205_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) cl, NULL))))), _vala_ccode_node_unref0 (_tmp207_), _g_free0 (_tmp206_), _g_free0 (_tmp205_), _tmp208_);
1943
 
                                                                vala_ccode_function_call_add_argument (cinitcall, (ValaCCodeExpression*) (_tmp209_ = vala_ccode_identifier_new ("self")));
1944
 
                                                                _vala_ccode_node_unref0 (_tmp209_);
1945
 
                                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp210_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) cinitcall)));
1946
 
                                                                _vala_ccode_node_unref0 (_tmp210_);
 
2016
                                                                ValaCCodeIdentifier* _tmp218_;
 
2017
                                                                ValaCCodeExpressionStatement* _tmp219_;
 
2018
                                                                cinitcall = (_tmp217_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp216_ = vala_ccode_identifier_new (_tmp215_ = g_strdup_printf ("%s_instance_init", _tmp214_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) cl, NULL))))), _vala_ccode_node_unref0 (_tmp216_), _g_free0 (_tmp215_), _g_free0 (_tmp214_), _tmp217_);
 
2019
                                                                vala_ccode_function_call_add_argument (cinitcall, (ValaCCodeExpression*) (_tmp218_ = vala_ccode_identifier_new ("self")));
 
2020
                                                                _vala_ccode_node_unref0 (_tmp218_);
 
2021
                                                                vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp219_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) cinitcall)));
 
2022
                                                                _vala_ccode_node_unref0 (_tmp219_);
1947
2023
                                                                _vala_ccode_node_unref0 (cinitcall);
1948
2024
                                                        }
1949
2025
                                                        _vala_code_node_unref0 (cl);
1951
2027
                                                        _vala_ccode_node_unref0 (_cdecl_);
1952
2028
                                                } else {
1953
2029
                                                        ValaStruct* st;
1954
 
                                                        ValaCCodeIdentifier* _tmp211_;
1955
 
                                                        ValaCCodeFunctionCall* _tmp212_;
 
2030
                                                        ValaCCodeIdentifier* _tmp220_;
 
2031
                                                        ValaCCodeFunctionCall* _tmp221_;
1956
2032
                                                        ValaCCodeFunctionCall* czero;
1957
 
                                                        ValaCCodeIdentifier* _tmp213_;
1958
 
                                                        ValaCCodeConstant* _tmp214_;
1959
 
                                                        ValaCCodeIdentifier* _tmp217_;
1960
 
                                                        char* _tmp216_;
1961
 
                                                        char* _tmp215_;
1962
 
                                                        ValaCCodeExpressionStatement* _tmp218_;
 
2033
                                                        ValaCCodeIdentifier* _tmp222_;
 
2034
                                                        ValaCCodeConstant* _tmp223_;
 
2035
                                                        ValaCCodeIdentifier* _tmp226_;
 
2036
                                                        char* _tmp225_;
 
2037
                                                        char* _tmp224_;
 
2038
                                                        ValaCCodeExpressionStatement* _tmp227_;
1963
2039
                                                        st = _vala_code_node_ref0 (VALA_STRUCT (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
1964
2040
                                                        vala_ccode_declaration_space_add_include (((ValaCCodeBaseModule*) self)->source_declarations, "string.h", FALSE);
1965
 
                                                        czero = (_tmp212_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp211_ = vala_ccode_identifier_new ("memset"))), _vala_ccode_node_unref0 (_tmp211_), _tmp212_);
1966
 
                                                        vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) (_tmp213_ = vala_ccode_identifier_new ("self")));
1967
 
                                                        _vala_ccode_node_unref0 (_tmp213_);
1968
 
                                                        vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) (_tmp214_ = vala_ccode_constant_new ("0")));
1969
 
                                                        _vala_ccode_node_unref0 (_tmp214_);
1970
 
                                                        vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) (_tmp217_ = vala_ccode_identifier_new (_tmp216_ = g_strdup_printf ("sizeof (%s)", _tmp215_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE)))));
1971
 
                                                        _vala_ccode_node_unref0 (_tmp217_);
1972
 
                                                        _g_free0 (_tmp216_);
1973
 
                                                        _g_free0 (_tmp215_);
1974
 
                                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp218_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) czero)));
1975
 
                                                        _vala_ccode_node_unref0 (_tmp218_);
 
2041
                                                        czero = (_tmp221_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp220_ = vala_ccode_identifier_new ("memset"))), _vala_ccode_node_unref0 (_tmp220_), _tmp221_);
 
2042
                                                        vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) (_tmp222_ = vala_ccode_identifier_new ("self")));
 
2043
                                                        _vala_ccode_node_unref0 (_tmp222_);
 
2044
                                                        vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) (_tmp223_ = vala_ccode_constant_new ("0")));
 
2045
                                                        _vala_ccode_node_unref0 (_tmp223_);
 
2046
                                                        vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) (_tmp226_ = vala_ccode_identifier_new (_tmp225_ = g_strdup_printf ("sizeof (%s)", _tmp224_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE)))));
 
2047
                                                        _vala_ccode_node_unref0 (_tmp226_);
 
2048
                                                        _g_free0 (_tmp225_);
 
2049
                                                        _g_free0 (_tmp224_);
 
2050
                                                        vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp227_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) czero)));
 
2051
                                                        _vala_ccode_node_unref0 (_tmp227_);
1976
2052
                                                        _vala_code_node_unref0 (st);
1977
2053
                                                        _vala_ccode_node_unref0 (czero);
1978
2054
                                                }
1980
2056
                                }
1981
2057
                        }
1982
2058
                        if (vala_code_context_get_module_init_method (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self)) == m) {
1983
 
                                _tmp219_ = ((ValaCCodeBaseModule*) self)->in_plugin;
 
2059
                                _tmp228_ = ((ValaCCodeBaseModule*) self)->in_plugin;
1984
2060
                        } else {
1985
 
                                _tmp219_ = FALSE;
 
2061
                                _tmp228_ = FALSE;
1986
2062
                        }
1987
 
                        if (_tmp219_) {
1988
 
                                ValaHashSet* _tmp220_;
1989
 
                                vala_ccode_method_module_register_plugin_types (self, cinit, (ValaSymbol*) vala_code_context_get_root (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self)), (ValaSet*) (_tmp220_ = vala_hash_set_new (VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_hash, g_direct_equal)));
1990
 
                                _vala_collection_object_unref0 (_tmp220_);
 
2063
                        if (_tmp228_) {
 
2064
                                ValaHashSet* _tmp229_;
 
2065
                                vala_ccode_method_module_register_plugin_types (self, cinit, (ValaSymbol*) vala_code_context_get_root (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self)), (ValaSet*) (_tmp229_ = vala_hash_set_new (VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_hash, g_direct_equal)));
 
2066
                                _vala_collection_object_unref0 (_tmp229_);
1991
2067
                        }
1992
2068
                        {
1993
 
                                ValaList* _tmp221_;
1994
 
                                ValaIterator* _tmp222_;
 
2069
                                ValaList* _tmp230_;
 
2070
                                ValaIterator* _tmp231_;
1995
2071
                                ValaIterator* _precondition_it;
1996
 
                                _precondition_it = (_tmp222_ = vala_iterable_iterator ((ValaIterable*) (_tmp221_ = vala_method_get_preconditions (m))), _vala_collection_object_unref0 (_tmp221_), _tmp222_);
 
2072
                                _precondition_it = (_tmp231_ = vala_iterable_iterator ((ValaIterable*) (_tmp230_ = vala_method_get_preconditions (m))), _vala_collection_object_unref0 (_tmp230_), _tmp231_);
1997
2073
                                while (TRUE) {
1998
2074
                                        ValaExpression* precondition;
1999
2075
                                        ValaCCodeStatement* check_stmt;
2015
2091
                        if (vala_method_get_is_abstract (m)) {
2016
2092
                                ValaCCodeBlock* cblock;
2017
2093
                                ValaCCodeStatement* check_stmt;
2018
 
                                ValaCCodeIdentifier* _tmp223_;
2019
 
                                ValaCCodeFunctionCall* _tmp224_;
 
2094
                                ValaCCodeIdentifier* _tmp232_;
 
2095
                                ValaCCodeFunctionCall* _tmp233_;
2020
2096
                                ValaCCodeFunctionCall* type_from_instance_call;
2021
 
                                ValaCCodeIdentifier* _tmp225_;
2022
 
                                ValaCCodeIdentifier* _tmp226_;
2023
 
                                ValaCCodeFunctionCall* _tmp227_;
 
2097
                                ValaCCodeIdentifier* _tmp234_;
 
2098
                                ValaCCodeIdentifier* _tmp235_;
 
2099
                                ValaCCodeFunctionCall* _tmp236_;
2024
2100
                                ValaCCodeFunctionCall* type_name_call;
2025
 
                                char* _tmp228_;
2026
 
                                char* _tmp229_;
 
2101
                                char* _tmp237_;
 
2102
                                char* _tmp238_;
2027
2103
                                char* error_string;
2028
 
                                ValaCCodeIdentifier* _tmp230_;
2029
 
                                ValaCCodeFunctionCall* _tmp231_;
 
2104
                                ValaCCodeIdentifier* _tmp239_;
 
2105
                                ValaCCodeFunctionCall* _tmp240_;
2030
2106
                                ValaCCodeFunctionCall* cerrorcall;
2031
 
                                ValaCCodeConstant* _tmp232_;
2032
 
                                ValaCCodeExpressionStatement* _tmp233_;
2033
 
                                ValaCCodeReturnStatement* _tmp235_;
2034
 
                                ValaCCodeExpression* _tmp234_;
 
2107
                                ValaCCodeConstant* _tmp241_;
 
2108
                                ValaCCodeExpressionStatement* _tmp242_;
 
2109
                                ValaCCodeReturnStatement* _tmp244_;
 
2110
                                ValaCCodeExpression* _tmp243_;
2035
2111
                                cblock = vala_ccode_block_new ();
2036
2112
                                check_stmt = vala_ccode_method_module_create_method_type_check_statement (self, m, creturn_type, vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self), TRUE, "self");
2037
2113
                                if (check_stmt != NULL) {
2038
2114
                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) check_stmt);
2039
2115
                                }
2040
 
                                type_from_instance_call = (_tmp224_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp223_ = vala_ccode_identifier_new ("G_TYPE_FROM_INSTANCE"))), _vala_ccode_node_unref0 (_tmp223_), _tmp224_);
2041
 
                                vala_ccode_function_call_add_argument (type_from_instance_call, (ValaCCodeExpression*) (_tmp225_ = vala_ccode_identifier_new ("self")));
2042
 
                                _vala_ccode_node_unref0 (_tmp225_);
2043
 
                                type_name_call = (_tmp227_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp226_ = vala_ccode_identifier_new ("g_type_name"))), _vala_ccode_node_unref0 (_tmp226_), _tmp227_);
 
2116
                                type_from_instance_call = (_tmp233_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp232_ = vala_ccode_identifier_new ("G_TYPE_FROM_INSTANCE"))), _vala_ccode_node_unref0 (_tmp232_), _tmp233_);
 
2117
                                vala_ccode_function_call_add_argument (type_from_instance_call, (ValaCCodeExpression*) (_tmp234_ = vala_ccode_identifier_new ("self")));
 
2118
                                _vala_ccode_node_unref0 (_tmp234_);
 
2119
                                type_name_call = (_tmp236_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp235_ = vala_ccode_identifier_new ("g_type_name"))), _vala_ccode_node_unref0 (_tmp235_), _tmp236_);
2044
2120
                                vala_ccode_function_call_add_argument (type_name_call, (ValaCCodeExpression*) type_from_instance_call);
2045
 
                                error_string = (_tmp229_ = g_strdup_printf ("\"Type `%%s' does not implement abstract method `%s'\"", _tmp228_ = vala_method_get_cname (m)), _g_free0 (_tmp228_), _tmp229_);
2046
 
                                cerrorcall = (_tmp231_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp230_ = vala_ccode_identifier_new ("g_critical"))), _vala_ccode_node_unref0 (_tmp230_), _tmp231_);
2047
 
                                vala_ccode_function_call_add_argument (cerrorcall, (ValaCCodeExpression*) (_tmp232_ = vala_ccode_constant_new (error_string)));
2048
 
                                _vala_ccode_node_unref0 (_tmp232_);
 
2121
                                error_string = (_tmp238_ = g_strdup_printf ("\"Type `%%s' does not implement abstract method `%s'\"", _tmp237_ = vala_method_get_cname (m)), _g_free0 (_tmp237_), _tmp238_);
 
2122
                                cerrorcall = (_tmp240_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp239_ = vala_ccode_identifier_new ("g_critical"))), _vala_ccode_node_unref0 (_tmp239_), _tmp240_);
 
2123
                                vala_ccode_function_call_add_argument (cerrorcall, (ValaCCodeExpression*) (_tmp241_ = vala_ccode_constant_new (error_string)));
 
2124
                                _vala_ccode_node_unref0 (_tmp241_);
2049
2125
                                vala_ccode_function_call_add_argument (cerrorcall, (ValaCCodeExpression*) type_name_call);
2050
 
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp233_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) cerrorcall)));
2051
 
                                _vala_ccode_node_unref0 (_tmp233_);
2052
 
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp235_ = vala_ccode_return_statement_new (_tmp234_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, creturn_type, FALSE))));
2053
 
                                _vala_ccode_node_unref0 (_tmp235_);
2054
 
                                _vala_ccode_node_unref0 (_tmp234_);
 
2126
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp242_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) cerrorcall)));
 
2127
                                _vala_ccode_node_unref0 (_tmp242_);
 
2128
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp244_ = vala_ccode_return_statement_new (_tmp243_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, creturn_type, FALSE))));
 
2129
                                _vala_ccode_node_unref0 (_tmp244_);
 
2130
                                _vala_ccode_node_unref0 (_tmp243_);
2055
2131
                                vala_ccode_function_set_block (((ValaCCodeBaseModule*) self)->function, cblock);
2056
2132
                                vala_ccode_fragment_append (((ValaCCodeBaseModule*) self)->source_type_member_definition, (ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function);
2057
2133
                                _vala_ccode_node_unref0 (cblock);
2064
2140
                }
2065
2141
        }
2066
2142
        if (vala_method_get_is_abstract (m)) {
2067
 
                _tmp238_ = TRUE;
2068
 
        } else {
2069
 
                _tmp238_ = vala_method_get_is_virtual (m);
2070
 
        }
2071
 
        if (_tmp238_) {
2072
 
                _tmp237_ = !vala_method_get_coroutine (m);
2073
 
        } else {
2074
 
                _tmp237_ = FALSE;
2075
 
        }
2076
 
        if (_tmp237_) {
2077
 
                _tmp236_ = vala_method_get_signal_reference (m) == NULL;
2078
 
        } else {
2079
 
                _tmp236_ = FALSE;
2080
 
        }
2081
 
        if (_tmp236_) {
2082
 
                ValaHashMap* _tmp239_;
 
2143
                _tmp247_ = TRUE;
 
2144
        } else {
 
2145
                _tmp247_ = vala_method_get_is_virtual (m);
 
2146
        }
 
2147
        if (_tmp247_) {
 
2148
                _tmp246_ = !vala_method_get_coroutine (m);
 
2149
        } else {
 
2150
                _tmp246_ = FALSE;
 
2151
        }
 
2152
        if (_tmp246_) {
 
2153
                _tmp245_ = vala_method_get_signal_reference (m) == NULL;
 
2154
        } else {
 
2155
                _tmp245_ = FALSE;
 
2156
        }
 
2157
        if (_tmp245_) {
 
2158
                ValaHashMap* _tmp248_;
2083
2159
                ValaHashMap* carg_map;
2084
 
                cparam_map = (_tmp239_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal), _vala_collection_object_unref0 (cparam_map), _tmp239_);
 
2160
                cparam_map = (_tmp248_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal), _vala_collection_object_unref0 (cparam_map), _tmp248_);
2085
2161
                carg_map = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
2086
2162
                vala_ccode_method_module_generate_vfunc (self, m, creturn_type, (ValaMap*) cparam_map, (ValaMap*) carg_map, "", 3);
2087
2163
                _vala_collection_object_unref0 (carg_map);
2088
2164
        }
2089
2165
        if (vala_method_get_entry_point (m)) {
2090
2166
                ValaCCodeFunction* cmain;
2091
 
                ValaCCodeFormalParameter* _tmp240_;
2092
 
                ValaCCodeFormalParameter* _tmp241_;
 
2167
                ValaCCodeFormalParameter* _tmp249_;
 
2168
                ValaCCodeFormalParameter* _tmp250_;
2093
2169
                ValaCCodeBlock* main_block;
2094
 
                ValaCCodeIdentifier* _tmp253_;
2095
 
                ValaCCodeFunctionCall* _tmp254_;
 
2170
                ValaCCodeIdentifier* _tmp262_;
 
2171
                ValaCCodeFunctionCall* _tmp263_;
2096
2172
                ValaCCodeFunctionCall* main_call;
2097
 
                ValaList* _tmp255_;
2098
 
                gboolean _tmp256_;
 
2173
                ValaList* _tmp264_;
 
2174
                gboolean _tmp265_;
2099
2175
                cmain = vala_ccode_function_new ("main", "int");
2100
2176
                vala_ccode_node_set_line ((ValaCCodeNode*) cmain, vala_ccode_node_get_line ((ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function));
2101
 
                vala_ccode_function_add_parameter (cmain, _tmp240_ = vala_ccode_formal_parameter_new ("argc", "int"));
2102
 
                _vala_ccode_node_unref0 (_tmp240_);
2103
 
                vala_ccode_function_add_parameter (cmain, _tmp241_ = vala_ccode_formal_parameter_new ("argv", "char **"));
2104
 
                _vala_ccode_node_unref0 (_tmp241_);
 
2177
                vala_ccode_function_add_parameter (cmain, _tmp249_ = vala_ccode_formal_parameter_new ("argc", "int"));
 
2178
                _vala_ccode_node_unref0 (_tmp249_);
 
2179
                vala_ccode_function_add_parameter (cmain, _tmp250_ = vala_ccode_formal_parameter_new ("argv", "char **"));
 
2180
                _vala_ccode_node_unref0 (_tmp250_);
2105
2181
                main_block = vala_ccode_block_new ();
2106
2182
                if (vala_code_context_get_profile (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self)) == VALA_PROFILE_GOBJECT) {
2107
 
                        ValaCCodeFunctionCall* _tmp251_;
2108
 
                        ValaCCodeIdentifier* _tmp250_;
2109
 
                        ValaCCodeExpressionStatement* _tmp252_;
 
2183
                        ValaCCodeFunctionCall* _tmp260_;
 
2184
                        ValaCCodeIdentifier* _tmp259_;
 
2185
                        ValaCCodeExpressionStatement* _tmp261_;
2110
2186
                        ValaCCodeExpressionStatement* type_init_call;
 
2187
                        if (vala_code_context_get_mem_profiler (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self))) {
 
2188
                                ValaCCodeIdentifier* _tmp251_;
 
2189
                                ValaCCodeFunctionCall* _tmp252_;
 
2190
                                ValaCCodeFunctionCall* mem_profiler_init_call;
 
2191
                                ValaCCodeConstant* _tmp253_;
 
2192
                                ValaCCodeExpressionStatement* _tmp254_;
 
2193
                                mem_profiler_init_call = (_tmp252_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp251_ = vala_ccode_identifier_new ("g_mem_set_vtable"))), _vala_ccode_node_unref0 (_tmp251_), _tmp252_);
 
2194
                                vala_ccode_node_set_line ((ValaCCodeNode*) mem_profiler_init_call, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
 
2195
                                vala_ccode_function_call_add_argument (mem_profiler_init_call, (ValaCCodeExpression*) (_tmp253_ = vala_ccode_constant_new ("glib_mem_profiler_table")));
 
2196
                                _vala_ccode_node_unref0 (_tmp253_);
 
2197
                                vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) (_tmp254_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) mem_profiler_init_call)));
 
2198
                                _vala_ccode_node_unref0 (_tmp254_);
 
2199
                                _vala_ccode_node_unref0 (mem_profiler_init_call);
 
2200
                        }
2111
2201
                        if (vala_code_context_get_thread (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self))) {
2112
 
                                ValaCCodeIdentifier* _tmp242_;
2113
 
                                ValaCCodeFunctionCall* _tmp243_;
 
2202
                                ValaCCodeIdentifier* _tmp255_;
 
2203
                                ValaCCodeFunctionCall* _tmp256_;
2114
2204
                                ValaCCodeFunctionCall* thread_init_call;
2115
 
                                ValaCCodeConstant* _tmp244_;
2116
 
                                ValaCCodeExpressionStatement* _tmp245_;
2117
 
                                thread_init_call = (_tmp243_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp242_ = vala_ccode_identifier_new ("g_thread_init"))), _vala_ccode_node_unref0 (_tmp242_), _tmp243_);
 
2205
                                ValaCCodeConstant* _tmp257_;
 
2206
                                ValaCCodeExpressionStatement* _tmp258_;
 
2207
                                thread_init_call = (_tmp256_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp255_ = vala_ccode_identifier_new ("g_thread_init"))), _vala_ccode_node_unref0 (_tmp255_), _tmp256_);
2118
2208
                                vala_ccode_node_set_line ((ValaCCodeNode*) thread_init_call, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
2119
 
                                vala_ccode_function_call_add_argument (thread_init_call, (ValaCCodeExpression*) (_tmp244_ = vala_ccode_constant_new ("NULL")));
2120
 
                                _vala_ccode_node_unref0 (_tmp244_);
2121
 
                                vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) (_tmp245_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) thread_init_call)));
2122
 
                                _vala_ccode_node_unref0 (_tmp245_);
 
2209
                                vala_ccode_function_call_add_argument (thread_init_call, (ValaCCodeExpression*) (_tmp257_ = vala_ccode_constant_new ("NULL")));
 
2210
                                _vala_ccode_node_unref0 (_tmp257_);
 
2211
                                vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) (_tmp258_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) thread_init_call)));
 
2212
                                _vala_ccode_node_unref0 (_tmp258_);
2123
2213
                                _vala_ccode_node_unref0 (thread_init_call);
2124
2214
                        }
2125
 
                        if (vala_code_context_get_mem_profiler (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self))) {
2126
 
                                ValaCCodeIdentifier* _tmp246_;
2127
 
                                ValaCCodeFunctionCall* _tmp247_;
2128
 
                                ValaCCodeFunctionCall* mem_profiler_init_call;
2129
 
                                ValaCCodeConstant* _tmp248_;
2130
 
                                ValaCCodeExpressionStatement* _tmp249_;
2131
 
                                mem_profiler_init_call = (_tmp247_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp246_ = vala_ccode_identifier_new ("g_mem_set_vtable"))), _vala_ccode_node_unref0 (_tmp246_), _tmp247_);
2132
 
                                vala_ccode_node_set_line ((ValaCCodeNode*) mem_profiler_init_call, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
2133
 
                                vala_ccode_function_call_add_argument (mem_profiler_init_call, (ValaCCodeExpression*) (_tmp248_ = vala_ccode_constant_new ("glib_mem_profiler_table")));
2134
 
                                _vala_ccode_node_unref0 (_tmp248_);
2135
 
                                vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) (_tmp249_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) mem_profiler_init_call)));
2136
 
                                _vala_ccode_node_unref0 (_tmp249_);
2137
 
                                _vala_ccode_node_unref0 (mem_profiler_init_call);
2138
 
                        }
2139
 
                        type_init_call = (_tmp252_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp251_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp250_ = vala_ccode_identifier_new ("g_type_init"))))), _vala_ccode_node_unref0 (_tmp251_), _vala_ccode_node_unref0 (_tmp250_), _tmp252_);
 
2215
                        type_init_call = (_tmp261_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp260_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp259_ = vala_ccode_identifier_new ("g_type_init"))))), _vala_ccode_node_unref0 (_tmp260_), _vala_ccode_node_unref0 (_tmp259_), _tmp261_);
2140
2216
                        vala_ccode_node_set_line ((ValaCCodeNode*) type_init_call, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
2141
2217
                        vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) type_init_call);
2142
2218
                        _vala_ccode_node_unref0 (type_init_call);
2143
2219
                }
2144
 
                main_call = (_tmp254_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp253_ = vala_ccode_identifier_new (vala_ccode_function_get_name (((ValaCCodeBaseModule*) self)->function)))), _vala_ccode_node_unref0 (_tmp253_), _tmp254_);
2145
 
                if ((_tmp256_ = vala_collection_get_size ((ValaCollection*) (_tmp255_ = vala_method_get_parameters (m))) == 1, _vala_collection_object_unref0 (_tmp255_), _tmp256_)) {
2146
 
                        ValaCCodeIdentifier* _tmp257_;
2147
 
                        ValaCCodeIdentifier* _tmp258_;
2148
 
                        vala_ccode_function_call_add_argument (main_call, (ValaCCodeExpression*) (_tmp257_ = vala_ccode_identifier_new ("argv")));
2149
 
                        _vala_ccode_node_unref0 (_tmp257_);
2150
 
                        vala_ccode_function_call_add_argument (main_call, (ValaCCodeExpression*) (_tmp258_ = vala_ccode_identifier_new ("argc")));
2151
 
                        _vala_ccode_node_unref0 (_tmp258_);
 
2220
                main_call = (_tmp263_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp262_ = vala_ccode_identifier_new (vala_ccode_function_get_name (((ValaCCodeBaseModule*) self)->function)))), _vala_ccode_node_unref0 (_tmp262_), _tmp263_);
 
2221
                if ((_tmp265_ = vala_collection_get_size ((ValaCollection*) (_tmp264_ = vala_method_get_parameters (m))) == 1, _vala_collection_object_unref0 (_tmp264_), _tmp265_)) {
 
2222
                        ValaCCodeIdentifier* _tmp266_;
 
2223
                        ValaCCodeIdentifier* _tmp267_;
 
2224
                        vala_ccode_function_call_add_argument (main_call, (ValaCCodeExpression*) (_tmp266_ = vala_ccode_identifier_new ("argv")));
 
2225
                        _vala_ccode_node_unref0 (_tmp266_);
 
2226
                        vala_ccode_function_call_add_argument (main_call, (ValaCCodeExpression*) (_tmp267_ = vala_ccode_identifier_new ("argc")));
 
2227
                        _vala_ccode_node_unref0 (_tmp267_);
2152
2228
                }
2153
2229
                if (VALA_IS_VOID_TYPE (vala_method_get_return_type (m))) {
2154
2230
                        ValaCCodeExpressionStatement* main_stmt;
2155
 
                        ValaCCodeConstant* _tmp259_;
2156
 
                        ValaCCodeReturnStatement* _tmp260_;
 
2231
                        ValaCCodeConstant* _tmp268_;
 
2232
                        ValaCCodeReturnStatement* _tmp269_;
2157
2233
                        ValaCCodeReturnStatement* ret_stmt;
2158
2234
                        main_stmt = vala_ccode_expression_statement_new ((ValaCCodeExpression*) main_call);
2159
2235
                        vala_ccode_node_set_line ((ValaCCodeNode*) main_stmt, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
2160
2236
                        vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) main_stmt);
2161
 
                        ret_stmt = (_tmp260_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp259_ = vala_ccode_constant_new ("0"))), _vala_ccode_node_unref0 (_tmp259_), _tmp260_);
 
2237
                        ret_stmt = (_tmp269_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp268_ = vala_ccode_constant_new ("0"))), _vala_ccode_node_unref0 (_tmp268_), _tmp269_);
2162
2238
                        vala_ccode_node_set_line ((ValaCCodeNode*) ret_stmt, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
2163
2239
                        vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) ret_stmt);
2164
2240
                        _vala_ccode_node_unref0 (main_stmt);
2181
2257
        _vala_collection_object_unref0 (old_temp_ref_vars);
2182
2258
        _vala_collection_object_unref0 (old_variable_name_map);
2183
2259
        _vala_code_node_unref0 (old_try);
 
2260
        _vala_ccode_node_unref0 (old_state_switch_statement);
 
2261
        _vala_ccode_node_unref0 (current_state_switch);
2184
2262
        _vala_code_node_unref0 (creturn_type);
2185
2263
        _vala_collection_object_unref0 (cparam_map);
2186
2264
}
2784
2862
 
2785
2863
 
2786
2864
static ValaCCodeStatement* vala_ccode_method_module_create_method_type_check_statement (ValaCCodeMethodModule* self, ValaMethod* m, ValaDataType* return_type, ValaTypeSymbol* t, gboolean non_null, const char* var_name) {
2787
 
        ValaCCodeStatement* result;
 
2865
        ValaCCodeStatement* result = NULL;
2788
2866
        g_return_val_if_fail (self != NULL, NULL);
2789
2867
        g_return_val_if_fail (m != NULL, NULL);
2790
2868
        g_return_val_if_fail (return_type != NULL, NULL);
2801
2879
 
2802
2880
 
2803
2881
static ValaCCodeStatement* vala_ccode_method_module_create_precondition_statement (ValaCCodeMethodModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaExpression* precondition) {
2804
 
        ValaCCodeStatement* result;
 
2882
        ValaCCodeStatement* result = NULL;
2805
2883
        ValaCCodeFunctionCall* ccheck;
2806
2884
        g_return_val_if_fail (self != NULL, NULL);
2807
2885
        g_return_val_if_fail (method_node != NULL, NULL);
2845
2923
 
2846
2924
 
2847
2925
static ValaTypeSymbol* vala_ccode_method_module_find_parent_type (ValaCCodeMethodModule* self, ValaSymbol* sym) {
2848
 
        ValaTypeSymbol* result;
 
2926
        ValaTypeSymbol* result = NULL;
2849
2927
        g_return_val_if_fail (self != NULL, NULL);
2850
2928
        g_return_val_if_fail (sym != NULL, NULL);
2851
2929
        while (TRUE) {
3101
3179
 
3102
3180
 
3103
3181
GType vala_ccode_method_module_get_type (void) {
3104
 
        static GType vala_ccode_method_module_type_id = 0;
3105
 
        if (vala_ccode_method_module_type_id == 0) {
 
3182
        static volatile gsize vala_ccode_method_module_type_id__volatile = 0;
 
3183
        if (g_once_init_enter (&vala_ccode_method_module_type_id__volatile)) {
3106
3184
                static const GTypeInfo g_define_type_info = { sizeof (ValaCCodeMethodModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_ccode_method_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCCodeMethodModule), 0, (GInstanceInitFunc) vala_ccode_method_module_instance_init, NULL };
 
3185
                GType vala_ccode_method_module_type_id;
3107
3186
                vala_ccode_method_module_type_id = g_type_register_static (VALA_TYPE_CCODE_STRUCT_MODULE, "ValaCCodeMethodModule", &g_define_type_info, 0);
 
3187
                g_once_init_leave (&vala_ccode_method_module_type_id__volatile, vala_ccode_method_module_type_id);
3108
3188
        }
3109
 
        return vala_ccode_method_module_type_id;
 
3189
        return vala_ccode_method_module_type_id__volatile;
3110
3190
}
3111
3191
 
3112
3192