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

« back to all changes in this revision

Viewing changes to codegen/valaccodebasemodule.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:
85
85
typedef struct _ValaCCodeGenerator ValaCCodeGenerator;
86
86
typedef struct _ValaCCodeGeneratorClass ValaCCodeGeneratorClass;
87
87
#define _vala_source_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_file_unref (var), NULL)))
 
88
#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL)))
88
89
typedef struct _ValaCCodeDeclarationSpacePrivate ValaCCodeDeclarationSpacePrivate;
89
 
#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL)))
90
90
#define _vala_ccode_writer_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_writer_unref (var), NULL)))
91
91
#define _vala_comment_unref0(var) ((var == NULL) ? NULL : (var = (vala_comment_unref (var), NULL)))
92
92
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
140
140
        void (*visit_try_statement) (ValaCCodeModule* self, ValaTryStatement* stmt);
141
141
        void (*visit_catch_clause) (ValaCCodeModule* self, ValaCatchClause* clause);
142
142
        void (*visit_lock_statement) (ValaCCodeModule* self, ValaLockStatement* stmt);
 
143
        void (*visit_unlock_statement) (ValaCCodeModule* self, ValaUnlockStatement* stmt);
143
144
        void (*visit_delete_statement) (ValaCCodeModule* self, ValaDeleteStatement* stmt);
144
145
        void (*visit_expression) (ValaCCodeModule* self, ValaExpression* expr);
145
146
        void (*visit_array_creation_expression) (ValaCCodeModule* self, ValaArrayCreationExpression* expr);
148
149
        void (*visit_integer_literal) (ValaCCodeModule* self, ValaIntegerLiteral* expr);
149
150
        void (*visit_real_literal) (ValaCCodeModule* self, ValaRealLiteral* expr);
150
151
        void (*visit_string_literal) (ValaCCodeModule* self, ValaStringLiteral* expr);
 
152
        void (*visit_list_literal) (ValaCCodeModule* self, ValaListLiteral* expr);
 
153
        void (*visit_set_literal) (ValaCCodeModule* self, ValaSetLiteral* expr);
 
154
        void (*visit_map_literal) (ValaCCodeModule* self, ValaMapLiteral* expr);
 
155
        void (*visit_tuple) (ValaCCodeModule* self, ValaTuple* expr);
 
156
        void (*visit_regex_literal) (ValaCCodeModule* self, ValaRegexLiteral* re);
151
157
        void (*visit_null_literal) (ValaCCodeModule* self, ValaNullLiteral* expr);
152
158
        void (*visit_member_access) (ValaCCodeModule* self, ValaMemberAccess* expr);
153
159
        void (*visit_method_call) (ValaCCodeModule* self, ValaMethodCall* expr);
172
178
        void (*generate_dynamic_method_wrapper) (ValaCCodeModule* self, ValaDynamicMethod* method);
173
179
        gboolean (*method_has_wrapper) (ValaCCodeModule* self, ValaMethod* method);
174
180
        ValaCCodeIdentifier* (*get_value_setter_function) (ValaCCodeModule* self, ValaDataType* type_reference);
 
181
        ValaCCodeIdentifier* (*get_value_taker_function) (ValaCCodeModule* self, ValaDataType* type_reference);
175
182
        ValaCCodeExpression* (*get_construct_property_assignment) (ValaCCodeModule* self, ValaCCodeConstant* canonical_cconstant, ValaDataType* property_type, ValaCCodeExpression* value);
176
183
        ValaCCodeFunctionCall* (*get_param_spec) (ValaCCodeModule* self, ValaProperty* prop);
177
184
        ValaCCodeFunctionCall* (*get_signal_creation) (ValaCCodeModule* self, ValaSignal* sig, ValaTypeSymbol* type);
180
187
        char* (*get_dynamic_property_setter_cname) (ValaCCodeModule* self, ValaDynamicProperty* node);
181
188
        char* (*get_dynamic_signal_cname) (ValaCCodeModule* self, ValaDynamicSignal* node);
182
189
        char* (*get_dynamic_signal_connect_wrapper_name) (ValaCCodeModule* self, ValaDynamicSignal* node);
 
190
        char* (*get_dynamic_signal_connect_after_wrapper_name) (ValaCCodeModule* self, ValaDynamicSignal* node);
183
191
        char* (*get_dynamic_signal_disconnect_wrapper_name) (ValaCCodeModule* self, ValaDynamicSignal* node);
184
192
        void (*generate_marshaller) (ValaCCodeModule* self, ValaList* params, ValaDataType* return_type, gboolean dbus);
185
193
        char* (*get_marshaller_function) (ValaCCodeModule* self, ValaList* params, ValaDataType* return_type, const char* prefix, gboolean dbus);
187
195
        ValaCCodeExpression* (*get_array_length_cexpression) (ValaCCodeModule* self, ValaExpression* array_expr, gint dim);
188
196
        char* (*get_array_size_cname) (ValaCCodeModule* self, const char* array_cname);
189
197
        ValaCCodeExpression* (*get_array_size_cexpression) (ValaCCodeModule* self, ValaExpression* array_expr);
190
 
        void (*add_simple_check) (ValaCCodeModule* self, ValaCodeNode* node, ValaCCodeFragment* cfrag);
 
198
        void (*add_simple_check) (ValaCCodeModule* self, ValaCodeNode* node, ValaCCodeFragment* cfrag, gboolean always_fails);
191
199
};
192
200
 
193
201
struct _ValaCCodeBaseModule {
213
221
        ValaCCodeEnum* prop_enum;
214
222
        ValaCCodeFunction* function;
215
223
        ValaCCodeFragment* pre_statement_fragment;
 
224
        ValaCCodeSwitchStatement* state_switch_statement;
216
225
        ValaArrayList* temp_vars;
217
226
        ValaArrayList* temp_ref_vars;
218
227
        ValaSet* user_marshal_set;
219
228
        ValaSet* predefined_marshal_set;
220
229
        gint next_temp_var_id;
 
230
        gint next_regex_id;
221
231
        gboolean in_constructor;
222
232
        gboolean in_static_or_class_context;
223
233
        gboolean current_method_inner_error;
242
252
        ValaDataType* int64_type;
243
253
        ValaDataType* uint64_type;
244
254
        ValaDataType* string_type;
 
255
        ValaDataType* regex_type;
245
256
        ValaDataType* float_type;
246
257
        ValaDataType* double_type;
247
258
        ValaTypeSymbol* gtype_type;
256
267
        ValaTypeSymbol* gptrarray_type;
257
268
        ValaTypeSymbol* gthreadpool_type;
258
269
        ValaDataType* gquark_type;
 
270
        ValaDataType* genumvalue_type;
259
271
        ValaStruct* gvalue_type;
260
272
        ValaStruct* mutex_type;
261
273
        ValaTypeSymbol* type_module_type;
331
343
void vala_ccode_module_unref (gpointer instance);
332
344
GParamSpec* vala_param_spec_ccode_module (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
333
345
void vala_value_set_ccode_module (GValue* value, gpointer v_object);
 
346
void vala_value_take_ccode_module (GValue* value, gpointer v_object);
334
347
gpointer vala_value_get_ccode_module (const GValue* value);
335
348
GType vala_ccode_module_get_type (void);
336
349
GType vala_ccode_base_module_get_type (void);
338
351
void vala_ccode_declaration_space_unref (gpointer instance);
339
352
GParamSpec* vala_param_spec_ccode_declaration_space (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
340
353
void vala_value_set_ccode_declaration_space (GValue* value, gpointer v_object);
 
354
void vala_value_take_ccode_declaration_space (GValue* value, gpointer v_object);
341
355
gpointer vala_value_get_ccode_declaration_space (const GValue* value);
342
356
GType vala_ccode_declaration_space_get_type (void);
343
357
#define VALA_CCODE_BASE_MODULE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModulePrivate))
357
371
static char* vala_ccode_base_module_get_define_for_filename (const char* filename);
358
372
static void vala_ccode_base_module_real_emit (ValaCCodeModule* base, ValaCodeContext* context);
359
373
static ValaCCodeIdentifier* vala_ccode_base_module_real_get_value_setter_function (ValaCCodeModule* base, ValaDataType* type_reference);
 
374
static ValaCCodeIdentifier* vala_ccode_base_module_real_get_value_taker_function (ValaCCodeModule* base, ValaDataType* type_reference);
360
375
static ValaCCodeIdentifier* vala_ccode_base_module_get_value_getter_function (ValaCCodeBaseModule* self, ValaDataType* type_reference);
361
376
void vala_ccode_base_module_append_vala_array_free (ValaCCodeBaseModule* self);
362
377
static void vala_ccode_base_module_real_append_vala_array_free (ValaCCodeBaseModule* self);
379
394
static void vala_ccode_base_module_real_visit_member (ValaCCodeModule* base, ValaMember* m);
380
395
void vala_ccode_base_module_generate_type_declaration (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeDeclarationSpace* decl_space);
381
396
void vala_ccode_declaration_space_add_constant_declaration (ValaCCodeDeclarationSpace* self, ValaCCodeNode* node);
382
 
void vala_ccode_base_module_generate_constant_declaration (ValaCCodeBaseModule* self, ValaConstant* c, ValaCCodeDeclarationSpace* decl_space);
 
397
void vala_ccode_base_module_generate_constant_declaration (ValaCCodeBaseModule* self, ValaConstant* c, ValaCCodeDeclarationSpace* decl_space, gboolean definition);
383
398
static void vala_ccode_base_module_real_visit_constant (ValaCCodeModule* base, ValaConstant* c);
384
399
ValaCCodeModule* vala_ccode_module_get_head (ValaCCodeModule* self);
385
400
char* vala_ccode_module_get_array_length_cname (ValaCCodeModule* self, const char* array_cname, gint dim);
415
430
void vala_ccode_base_module_generate_cparameters (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction);
416
431
static void vala_ccode_base_module_real_generate_cparameters (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction);
417
432
void vala_ccode_base_module_generate_property_accessor_declaration (ValaCCodeBaseModule* self, ValaPropertyAccessor* acc, ValaCCodeDeclarationSpace* decl_space);
 
433
gboolean vala_ccode_base_module_is_gobject_property (ValaCCodeBaseModule* self, ValaProperty* prop);
418
434
ValaDataType* vala_ccode_base_module_get_current_return_type (ValaCCodeBaseModule* self);
419
435
ValaCCodeExpression* vala_ccode_base_module_transform_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
420
436
static ValaCCodeStatement* vala_ccode_base_module_create_property_type_check_statement (ValaCCodeBaseModule* self, ValaProperty* prop, gboolean check_return_type, ValaTypeSymbol* t, gboolean non_null, const char* var_name);
421
 
gboolean vala_ccode_base_module_is_gobject_property (ValaCCodeBaseModule* self, ValaProperty* prop);
422
437
static void vala_ccode_base_module_real_visit_property_accessor (ValaCCodeModule* base, ValaPropertyAccessor* acc);
423
438
static void vala_ccode_base_module_real_visit_destructor (ValaCCodeModule* base, ValaDestructor* d);
424
439
gint vala_ccode_base_module_get_block_id (ValaCCodeBaseModule* self, ValaBlock* b);
 
440
gboolean vala_ccode_base_module_requires_copy (ValaCCodeBaseModule* self, ValaDataType* type);
 
441
ValaCCodeExpression* vala_ccode_base_module_get_ref_cexpression (ValaCCodeBaseModule* self, ValaDataType* expression_type, ValaCCodeExpression* cexpr, ValaExpression* expr, ValaCodeNode* node);
425
442
ValaMethod* vala_ccode_base_module_get_current_method (ValaCCodeBaseModule* self);
 
443
static void vala_ccode_base_module_capture_parameter (ValaCCodeBaseModule* self, ValaFormalParameter* param, ValaCCodeStruct* data, ValaCCodeBlock* cblock, gint block_id, ValaCCodeBlock* free_block);
 
444
ValaPropertyAccessor* vala_ccode_base_module_get_current_property_accessor (ValaCCodeBaseModule* self);
426
445
ValaClass* vala_ccode_base_module_get_current_class (ValaCCodeBaseModule* self);
427
446
ValaCCodeExpression* vala_ccode_base_module_get_dup_func_expression (ValaCCodeBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup);
428
447
ValaCCodeExpression* vala_ccode_base_module_get_result_cexpression (ValaCCodeBaseModule* self, const char* cname);
429
 
gboolean vala_ccode_base_module_requires_copy (ValaCCodeBaseModule* self, ValaDataType* type);
430
 
ValaCCodeExpression* vala_ccode_base_module_get_ref_cexpression (ValaCCodeBaseModule* self, ValaDataType* expression_type, ValaCCodeExpression* cexpr, ValaExpression* expr, ValaCodeNode* node);
431
448
static void vala_ccode_base_module_real_visit_block (ValaCCodeModule* base, ValaBlock* b);
432
449
static void vala_ccode_base_module_real_visit_empty_statement (ValaCCodeModule* base, ValaEmptyStatement* stmt);
433
450
void vala_ccode_base_module_create_temp_decl (ValaCCodeBaseModule* self, ValaStatement* stmt, ValaList* temp_vars);
434
451
static void vala_ccode_base_module_real_visit_declaration_statement (ValaCCodeModule* base, ValaDeclarationStatement* stmt);
 
452
static gboolean vala_ccode_base_module_has_simple_struct_initializer (ValaCCodeBaseModule* self, ValaLocalVariable* local);
435
453
ValaCCodeExpression* vala_ccode_base_module_get_delegate_target_cexpression (ValaCCodeBaseModule* self, ValaExpression* delegate_expr, ValaCCodeExpression** delegate_target_destroy_notify);
436
 
void vala_ccode_module_add_simple_check (ValaCCodeModule* self, ValaCodeNode* node, ValaCCodeFragment* cfrag);
 
454
void vala_ccode_module_add_simple_check (ValaCCodeModule* self, ValaCodeNode* node, ValaCCodeFragment* cfrag, gboolean always_fails);
437
455
static void vala_ccode_base_module_real_visit_local_variable (ValaCCodeModule* base, ValaLocalVariable* local);
438
456
static void vala_ccode_base_module_real_visit_initializer_list (ValaCCodeModule* base, ValaInitializerList* list);
439
457
static gboolean vala_ccode_base_module_is_in_generic_type (ValaCCodeBaseModule* self, ValaDataType* type);
465
483
void vala_ccode_base_module_create_local_free (ValaCCodeBaseModule* self, ValaCodeNode* stmt, gboolean stop_at_loop);
466
484
gboolean vala_ccode_base_module_variable_accessible_in_finally (ValaCCodeBaseModule* self, ValaLocalVariable* local);
467
485
static gboolean vala_ccode_base_module_real_variable_accessible_in_finally (ValaCCodeBaseModule* self, ValaLocalVariable* local);
468
 
ValaPropertyAccessor* vala_ccode_base_module_get_current_property_accessor (ValaCCodeBaseModule* self);
469
486
ValaCCodeStatement* vala_ccode_base_module_create_postcondition_statement (ValaCCodeBaseModule* self, ValaExpression* postcondition);
470
487
static void vala_ccode_base_module_real_visit_return_statement (ValaCCodeModule* base, ValaReturnStatement* stmt);
 
488
static ValaCCodeExpression* vala_ccode_base_module_get_lock_expression (ValaCCodeBaseModule* self, ValaStatement* stmt, ValaExpression* resource);
471
489
static void vala_ccode_base_module_real_visit_lock_statement (ValaCCodeModule* base, ValaLockStatement* stmt);
 
490
static void vala_ccode_base_module_real_visit_unlock_statement (ValaCCodeModule* base, ValaUnlockStatement* stmt);
472
491
static void vala_ccode_base_module_real_visit_delete_statement (ValaCCodeModule* base, ValaDeleteStatement* stmt);
473
492
ValaCCodeExpression* vala_ccode_base_module_convert_from_generic_pointer (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr, ValaDataType* actual_type);
474
493
ValaCCodeExpression* vala_ccode_base_module_convert_to_generic_pointer (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr, ValaDataType* actual_type);
478
497
static void vala_ccode_base_module_real_visit_integer_literal (ValaCCodeModule* base, ValaIntegerLiteral* expr);
479
498
static void vala_ccode_base_module_real_visit_real_literal (ValaCCodeModule* base, ValaRealLiteral* expr);
480
499
static void vala_ccode_base_module_real_visit_string_literal (ValaCCodeModule* base, ValaStringLiteral* expr);
 
500
static void vala_ccode_base_module_real_visit_regex_literal (ValaCCodeModule* base, ValaRegexLiteral* expr);
481
501
static void vala_ccode_base_module_real_visit_null_literal (ValaCCodeModule* base, ValaNullLiteral* expr);
482
502
static char* vala_ccode_base_module_real_get_delegate_target_cname (ValaCCodeBaseModule* self, const char* delegate_cname);
483
503
static ValaCCodeExpression* vala_ccode_base_module_real_get_delegate_target_cexpression (ValaCCodeBaseModule* self, ValaExpression* delegate_expr, ValaCCodeExpression** delegate_target_destroy_notify);
484
504
static char* vala_ccode_base_module_real_get_delegate_target_destroy_notify_cname (ValaCCodeBaseModule* self, const char* delegate_cname);
485
505
static void vala_ccode_base_module_real_visit_base_access (ValaCCodeModule* base, ValaBaseAccess* expr);
486
506
static ValaMemberAccess* vala_ccode_base_module_find_property_access (ValaCCodeBaseModule* self, ValaExpression* expr);
487
 
ValaCCodeFunctionCall* vala_ccode_base_module_get_property_set_call (ValaCCodeBaseModule* self, ValaProperty* prop, ValaMemberAccess* ma, ValaCCodeExpression* cexpr, ValaExpression* rhs);
 
507
ValaCCodeExpression* vala_ccode_base_module_get_property_set_call (ValaCCodeBaseModule* self, ValaProperty* prop, ValaMemberAccess* ma, ValaCCodeExpression* cexpr, ValaExpression* rhs);
488
508
static void vala_ccode_base_module_real_visit_postfix_expression (ValaCCodeModule* base, ValaPostfixExpression* expr);
489
509
static gboolean vala_ccode_base_module_is_limited_generic_type (ValaCCodeBaseModule* self, ValaDataType* type);
490
510
static gboolean vala_ccode_base_module_is_ref_function_void (ValaCCodeBaseModule* self, ValaDataType* type);
513
533
static void vala_ccode_base_module_real_visit_pointer_indirection (ValaCCodeModule* base, ValaPointerIndirection* expr);
514
534
static void vala_ccode_base_module_real_visit_addressof_expression (ValaCCodeModule* base, ValaAddressofExpression* expr);
515
535
static void vala_ccode_base_module_real_visit_reference_transfer_expression (ValaCCodeModule* base, ValaReferenceTransferExpression* expr);
 
536
static char* vala_ccode_base_module_generate_array_contains_wrapper (ValaCCodeBaseModule* self, ValaArrayType* array_type);
516
537
static void vala_ccode_base_module_real_visit_binary_expression (ValaCCodeModule* base, ValaBinaryExpression* expr);
517
538
char* vala_ccode_base_module_get_type_check_function (ValaCCodeBaseModule* self, ValaTypeSymbol* type);
518
539
static void vala_ccode_base_module_real_visit_type_check (ValaCCodeModule* base, ValaTypeCheck* expr);
519
540
static void vala_ccode_base_module_real_visit_lambda_expression (ValaCCodeModule* base, ValaLambdaExpression* l);
 
541
ValaCCodeIdentifier* vala_ccode_module_get_value_taker_function (ValaCCodeModule* self, ValaDataType* type_reference);
520
542
ValaCCodeIdentifier* vala_ccode_module_get_value_setter_function (ValaCCodeModule* self, ValaDataType* type_reference);
521
543
ValaCCodeExpression* vala_ccode_base_module_get_implicit_cast_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
522
544
static ValaCCodeExpression* vala_ccode_base_module_real_get_implicit_cast_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
532
554
gboolean vala_ccode_declaration_space_add_declaration (ValaCCodeDeclarationSpace* self, const char* name);
533
555
ValaBlock* vala_ccode_base_module_get_current_closure_block (ValaCCodeBaseModule* self);
534
556
static void vala_ccode_base_module_finalize (ValaCCodeModule* obj);
 
557
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
 
558
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
 
559
static gint _vala_array_length (gpointer array);
535
560
static int _vala_strcmp0 (const char * str1, const char * str2);
536
561
 
537
562
 
538
563
 
539
564
ValaBlock* vala_ccode_base_module_next_closure_block (ValaCCodeBaseModule* self, ValaSymbol* sym) {
540
 
        ValaBlock* result;
 
565
        ValaBlock* result = NULL;
541
566
        ValaBlock* block;
542
567
        g_return_val_if_fail (self != NULL, NULL);
543
568
        g_return_val_if_fail (sym != NULL, NULL);
700
725
        ValaStruct* _tmp37_;
701
726
        ValaDataType* _tmp40_;
702
727
        ValaClass* _tmp39_;
 
728
        ValaDataType* _tmp43_;
 
729
        ValaClass* _tmp42_;
 
730
        ValaSymbol* _tmp41_;
703
731
        ValaStruct* unichar_struct;
704
 
        ValaCCodeDeclarationSpace* _tmp62_;
705
 
        ValaCCodeDeclarationSpace* _tmp63_;
 
732
        ValaCCodeDeclarationSpace* _tmp67_;
 
733
        ValaCCodeDeclarationSpace* _tmp68_;
706
734
        ValaList* source_files;
707
735
        self = (ValaCCodeBaseModule*) base;
708
736
        g_return_if_fail (context != NULL);
748
776
        _vala_code_node_unref0 (_tmp37_);
749
777
        self->string_type = (_tmp40_ = (ValaDataType*) vala_object_type_new ((ValaObjectTypeSymbol*) (_tmp39_ = VALA_CLASS (vala_scope_lookup (vala_symbol_get_scope (self->root_symbol), "string")))), _vala_code_node_unref0 (self->string_type), _tmp40_);
750
778
        _vala_code_node_unref0 (_tmp39_);
 
779
        self->regex_type = (_tmp43_ = (ValaDataType*) vala_object_type_new ((ValaObjectTypeSymbol*) (_tmp42_ = VALA_CLASS (vala_scope_lookup (vala_symbol_get_scope (_tmp41_ = vala_scope_lookup (vala_symbol_get_scope (self->root_symbol), "GLib")), "Regex")))), _vala_code_node_unref0 (self->regex_type), _tmp43_);
 
780
        _vala_code_node_unref0 (_tmp42_);
 
781
        _vala_code_node_unref0 (_tmp41_);
751
782
        unichar_struct = VALA_STRUCT (vala_scope_lookup (vala_symbol_get_scope (self->root_symbol), "unichar"));
752
783
        if (unichar_struct != NULL) {
753
 
                ValaDataType* _tmp41_;
754
 
                self->unichar_type = (_tmp41_ = (ValaDataType*) vala_integer_type_new (unichar_struct, NULL, NULL), _vala_code_node_unref0 (self->unichar_type), _tmp41_);
 
784
                ValaDataType* _tmp44_;
 
785
                self->unichar_type = (_tmp44_ = (ValaDataType*) vala_integer_type_new (unichar_struct, NULL, NULL), _vala_code_node_unref0 (self->unichar_type), _tmp44_);
755
786
        }
756
787
        if (vala_code_context_get_profile (context) == VALA_PROFILE_GOBJECT) {
757
788
                ValaSymbol* glib_ns;
758
 
                ValaTypeSymbol* _tmp42_;
759
 
                ValaTypeSymbol* _tmp43_;
760
 
                ValaErrorType* _tmp44_;
761
 
                ValaClass* _tmp45_;
762
 
                ValaClass* _tmp46_;
763
 
                ValaClass* _tmp47_;
764
 
                ValaTypeSymbol* _tmp48_;
765
 
                ValaTypeSymbol* _tmp49_;
766
 
                ValaTypeSymbol* _tmp50_;
 
789
                ValaTypeSymbol* _tmp45_;
 
790
                ValaTypeSymbol* _tmp46_;
 
791
                ValaErrorType* _tmp47_;
 
792
                ValaClass* _tmp48_;
 
793
                ValaClass* _tmp49_;
 
794
                ValaClass* _tmp50_;
767
795
                ValaTypeSymbol* _tmp51_;
768
796
                ValaTypeSymbol* _tmp52_;
769
 
                ValaDataType* _tmp54_;
770
 
                ValaStruct* _tmp53_;
771
 
                ValaStruct* _tmp55_;
 
797
                ValaTypeSymbol* _tmp53_;
 
798
                ValaTypeSymbol* _tmp54_;
 
799
                ValaTypeSymbol* _tmp55_;
 
800
                ValaDataType* _tmp57_;
772
801
                ValaStruct* _tmp56_;
773
 
                ValaTypeSymbol* _tmp57_;
 
802
                ValaDataType* _tmp59_;
 
803
                ValaClass* _tmp58_;
 
804
                ValaStruct* _tmp60_;
 
805
                ValaStruct* _tmp61_;
 
806
                ValaTypeSymbol* _tmp62_;
774
807
                ValaSymbol* dbus_ns;
775
808
                glib_ns = vala_scope_lookup (vala_symbol_get_scope (self->root_symbol), "GLib");
776
 
                self->gtype_type = (_tmp42_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "Type")), _vala_code_node_unref0 (self->gtype_type), _tmp42_);
777
 
                self->gobject_type = (_tmp43_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "Object")), _vala_code_node_unref0 (self->gobject_type), _tmp43_);
778
 
                self->gerror_type = (_tmp44_ = vala_error_type_new (NULL, NULL, NULL), _vala_code_node_unref0 (self->gerror_type), _tmp44_);
779
 
                self->glist_type = (_tmp45_ = VALA_CLASS (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "List")), _vala_code_node_unref0 (self->glist_type), _tmp45_);
780
 
                self->gslist_type = (_tmp46_ = VALA_CLASS (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "SList")), _vala_code_node_unref0 (self->gslist_type), _tmp46_);
781
 
                self->gvaluearray_type = (_tmp47_ = VALA_CLASS (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "ValueArray")), _vala_code_node_unref0 (self->gvaluearray_type), _tmp47_);
782
 
                self->gstringbuilder_type = (_tmp48_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "StringBuilder")), _vala_code_node_unref0 (self->gstringbuilder_type), _tmp48_);
783
 
                self->garray_type = (_tmp49_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "Array")), _vala_code_node_unref0 (self->garray_type), _tmp49_);
784
 
                self->gbytearray_type = (_tmp50_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "ByteArray")), _vala_code_node_unref0 (self->gbytearray_type), _tmp50_);
785
 
                self->gptrarray_type = (_tmp51_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "PtrArray")), _vala_code_node_unref0 (self->gptrarray_type), _tmp51_);
786
 
                self->gthreadpool_type = (_tmp52_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "ThreadPool")), _vala_code_node_unref0 (self->gthreadpool_type), _tmp52_);
787
 
                self->gquark_type = (_tmp54_ = (ValaDataType*) vala_integer_type_new (_tmp53_ = VALA_STRUCT (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "Quark")), NULL, NULL), _vala_code_node_unref0 (self->gquark_type), _tmp54_);
788
 
                _vala_code_node_unref0 (_tmp53_);
789
 
                self->gvalue_type = (_tmp55_ = VALA_STRUCT (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "Value")), _vala_code_node_unref0 (self->gvalue_type), _tmp55_);
790
 
                self->mutex_type = (_tmp56_ = VALA_STRUCT (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "StaticRecMutex")), _vala_code_node_unref0 (self->mutex_type), _tmp56_);
791
 
                self->type_module_type = (_tmp57_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "TypeModule")), _vala_code_node_unref0 (self->type_module_type), _tmp57_);
 
809
                self->gtype_type = (_tmp45_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "Type")), _vala_code_node_unref0 (self->gtype_type), _tmp45_);
 
810
                self->gobject_type = (_tmp46_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "Object")), _vala_code_node_unref0 (self->gobject_type), _tmp46_);
 
811
                self->gerror_type = (_tmp47_ = vala_error_type_new (NULL, NULL, NULL), _vala_code_node_unref0 (self->gerror_type), _tmp47_);
 
812
                self->glist_type = (_tmp48_ = VALA_CLASS (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "List")), _vala_code_node_unref0 (self->glist_type), _tmp48_);
 
813
                self->gslist_type = (_tmp49_ = VALA_CLASS (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "SList")), _vala_code_node_unref0 (self->gslist_type), _tmp49_);
 
814
                self->gvaluearray_type = (_tmp50_ = VALA_CLASS (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "ValueArray")), _vala_code_node_unref0 (self->gvaluearray_type), _tmp50_);
 
815
                self->gstringbuilder_type = (_tmp51_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "StringBuilder")), _vala_code_node_unref0 (self->gstringbuilder_type), _tmp51_);
 
816
                self->garray_type = (_tmp52_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "Array")), _vala_code_node_unref0 (self->garray_type), _tmp52_);
 
817
                self->gbytearray_type = (_tmp53_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "ByteArray")), _vala_code_node_unref0 (self->gbytearray_type), _tmp53_);
 
818
                self->gptrarray_type = (_tmp54_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "PtrArray")), _vala_code_node_unref0 (self->gptrarray_type), _tmp54_);
 
819
                self->gthreadpool_type = (_tmp55_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "ThreadPool")), _vala_code_node_unref0 (self->gthreadpool_type), _tmp55_);
 
820
                self->gquark_type = (_tmp57_ = (ValaDataType*) vala_integer_type_new (_tmp56_ = VALA_STRUCT (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "Quark")), NULL, NULL), _vala_code_node_unref0 (self->gquark_type), _tmp57_);
 
821
                _vala_code_node_unref0 (_tmp56_);
 
822
                self->genumvalue_type = (_tmp59_ = (ValaDataType*) vala_object_type_new ((ValaObjectTypeSymbol*) (_tmp58_ = VALA_CLASS (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "EnumValue")))), _vala_code_node_unref0 (self->genumvalue_type), _tmp59_);
 
823
                _vala_code_node_unref0 (_tmp58_);
 
824
                self->gvalue_type = (_tmp60_ = VALA_STRUCT (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "Value")), _vala_code_node_unref0 (self->gvalue_type), _tmp60_);
 
825
                self->mutex_type = (_tmp61_ = VALA_STRUCT (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "StaticRecMutex")), _vala_code_node_unref0 (self->mutex_type), _tmp61_);
 
826
                self->type_module_type = (_tmp62_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (glib_ns), "TypeModule")), _vala_code_node_unref0 (self->type_module_type), _tmp62_);
792
827
                if (vala_code_context_get_module_init_method (context) != NULL) {
793
828
                        {
794
 
                                ValaList* _tmp58_;
795
 
                                ValaIterator* _tmp59_;
 
829
                                ValaList* _tmp63_;
 
830
                                ValaIterator* _tmp64_;
796
831
                                ValaIterator* _parameter_it;
797
 
                                _parameter_it = (_tmp59_ = vala_iterable_iterator ((ValaIterable*) (_tmp58_ = vala_method_get_parameters (vala_code_context_get_module_init_method (context)))), _vala_collection_object_unref0 (_tmp58_), _tmp59_);
 
832
                                _parameter_it = (_tmp64_ = vala_iterable_iterator ((ValaIterable*) (_tmp63_ = vala_method_get_parameters (vala_code_context_get_module_init_method (context)))), _vala_collection_object_unref0 (_tmp63_), _tmp64_);
798
833
                                while (TRUE) {
799
834
                                        ValaFormalParameter* parameter;
800
835
                                        if (!vala_iterator_next (_parameter_it)) {
802
837
                                        }
803
838
                                        parameter = (ValaFormalParameter*) vala_iterator_get (_parameter_it);
804
839
                                        if (vala_data_type_get_data_type (vala_formal_parameter_get_parameter_type (parameter)) == self->type_module_type) {
805
 
                                                char* _tmp60_;
 
840
                                                char* _tmp65_;
806
841
                                                self->in_plugin = TRUE;
807
 
                                                self->module_init_param_name = (_tmp60_ = g_strdup (vala_symbol_get_name ((ValaSymbol*) parameter)), _g_free0 (self->module_init_param_name), _tmp60_);
 
842
                                                self->module_init_param_name = (_tmp65_ = g_strdup (vala_symbol_get_name ((ValaSymbol*) parameter)), _g_free0 (self->module_init_param_name), _tmp65_);
808
843
                                                _vala_code_node_unref0 (parameter);
809
844
                                                break;
810
845
                                        }
815
850
                }
816
851
                dbus_ns = vala_scope_lookup (vala_symbol_get_scope (self->root_symbol), "DBus");
817
852
                if (dbus_ns != NULL) {
818
 
                        ValaTypeSymbol* _tmp61_;
819
 
                        self->dbus_object_type = (_tmp61_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (dbus_ns), "Object")), _vala_code_node_unref0 (self->dbus_object_type), _tmp61_);
 
853
                        ValaTypeSymbol* _tmp66_;
 
854
                        self->dbus_object_type = (_tmp66_ = VALA_TYPESYMBOL (vala_scope_lookup (vala_symbol_get_scope (dbus_ns), "Object")), _vala_code_node_unref0 (self->dbus_object_type), _tmp66_);
820
855
                }
821
856
                _vala_code_node_unref0 (glib_ns);
822
857
                _vala_code_node_unref0 (dbus_ns);
823
858
        }
824
 
        self->header_declarations = (_tmp62_ = vala_ccode_declaration_space_new (), _vala_ccode_declaration_space_unref0 (self->header_declarations), _tmp62_);
 
859
        self->header_declarations = (_tmp67_ = vala_ccode_declaration_space_new (), _vala_ccode_declaration_space_unref0 (self->header_declarations), _tmp67_);
825
860
        vala_ccode_declaration_space_set_is_header (self->header_declarations, TRUE);
826
 
        self->internal_header_declarations = (_tmp63_ = vala_ccode_declaration_space_new (), _vala_ccode_declaration_space_unref0 (self->internal_header_declarations), _tmp63_);
 
861
        self->internal_header_declarations = (_tmp68_ = vala_ccode_declaration_space_new (), _vala_ccode_declaration_space_unref0 (self->internal_header_declarations), _tmp68_);
827
862
        vala_ccode_declaration_space_set_is_header (self->internal_header_declarations, TRUE);
828
863
        source_files = vala_code_context_get_source_files (context);
829
864
        {
844
879
        }
845
880
        if (vala_code_context_get_symbols_filename (context) != NULL) {
846
881
                FILE* stream;
847
 
                FILE* _tmp66_;
 
882
                FILE* _tmp72_;
848
883
                stream = fopen (vala_code_context_get_symbols_filename (context), "w");
 
884
                if (stream == NULL) {
 
885
                        char* _tmp69_;
 
886
                        vala_report_error (NULL, _tmp69_ = g_strdup_printf ("unable to open `%s' for writing", vala_code_context_get_symbols_filename (context)));
 
887
                        _g_free0 (_tmp69_);
 
888
                        _fclose0 (stream);
 
889
                        _vala_code_node_unref0 (unichar_struct);
 
890
                        _vala_collection_object_unref0 (source_files);
 
891
                        return;
 
892
                }
849
893
                {
850
 
                        ValaList* _tmp64_;
851
 
                        ValaIterator* _tmp65_;
 
894
                        ValaList* _tmp70_;
 
895
                        ValaIterator* _tmp71_;
852
896
                        ValaIterator* _node_it;
853
 
                        _node_it = (_tmp65_ = vala_iterable_iterator ((ValaIterable*) (_tmp64_ = vala_ccode_fragment_get_children (self->header_declarations->type_member_declaration))), _vala_collection_object_unref0 (_tmp64_), _tmp65_);
 
897
                        _node_it = (_tmp71_ = vala_iterable_iterator ((ValaIterable*) (_tmp70_ = vala_ccode_fragment_get_children (self->header_declarations->type_member_declaration))), _vala_collection_object_unref0 (_tmp70_), _tmp71_);
854
898
                        while (TRUE) {
855
899
                                ValaCCodeNode* node;
856
900
                                if (!vala_iterator_next (_node_it)) {
868
912
                        }
869
913
                        _vala_collection_object_unref0 (_node_it);
870
914
                }
871
 
                stream = (_tmp66_ = NULL, _fclose0 (stream), _tmp66_);
 
915
                stream = (_tmp72_ = NULL, _fclose0 (stream), _tmp72_);
872
916
                _fclose0 (stream);
873
917
        }
874
918
        if (vala_code_context_get_header_filename (context) != NULL) {
875
919
                ValaCCodeWriter* writer;
876
 
                char* _tmp68_;
877
 
                ValaCCodeOnceSection* _tmp69_;
 
920
                char* _tmp74_;
 
921
                ValaCCodeOnceSection* _tmp75_;
878
922
                ValaCCodeOnceSection* once;
879
 
                ValaCCodeNewline* _tmp70_;
880
 
                ValaCCodeNewline* _tmp71_;
881
 
                ValaCCodeNewline* _tmp74_;
882
 
                ValaCCodeNewline* _tmp75_;
883
923
                ValaCCodeNewline* _tmp76_;
884
924
                ValaCCodeNewline* _tmp77_;
885
 
                ValaCCodeNewline* _tmp78_;
 
925
                ValaCCodeNewline* _tmp80_;
886
926
                ValaCCodeNewline* _tmp81_;
 
927
                ValaCCodeNewline* _tmp82_;
 
928
                ValaCCodeNewline* _tmp83_;
 
929
                ValaCCodeNewline* _tmp84_;
 
930
                ValaCCodeNewline* _tmp87_;
887
931
                writer = vala_ccode_writer_new (vala_code_context_get_header_filename (context), NULL);
888
 
                if (!vala_ccode_writer_open (writer)) {
889
 
                        char* _tmp67_;
890
 
                        vala_report_error (NULL, _tmp67_ = g_strdup_printf ("unable to open `%s' for writing", vala_ccode_writer_get_filename (writer)));
891
 
                        _g_free0 (_tmp67_);
 
932
                if (!vala_ccode_writer_open (writer, vala_code_context_get_version_header (context))) {
 
933
                        char* _tmp73_;
 
934
                        vala_report_error (NULL, _tmp73_ = g_strdup_printf ("unable to open `%s' for writing", vala_ccode_writer_get_filename (writer)));
 
935
                        _g_free0 (_tmp73_);
892
936
                        _vala_ccode_writer_unref0 (writer);
893
937
                        _vala_code_node_unref0 (unichar_struct);
894
938
                        _vala_collection_object_unref0 (source_files);
895
939
                        return;
896
940
                }
897
941
                vala_ccode_writer_write_newline (writer);
898
 
                once = (_tmp69_ = vala_ccode_once_section_new (_tmp68_ = vala_ccode_base_module_get_define_for_filename (vala_ccode_writer_get_filename (writer))), _g_free0 (_tmp68_), _tmp69_);
899
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp70_ = vala_ccode_newline_new ()));
900
 
                _vala_ccode_node_unref0 (_tmp70_);
901
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->header_declarations->include_directives);
902
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp71_ = vala_ccode_newline_new ()));
903
 
                _vala_ccode_node_unref0 (_tmp71_);
904
 
                if (vala_code_context_get_profile (context) == VALA_PROFILE_GOBJECT) {
905
 
                        ValaCCodeIdentifier* _tmp72_;
906
 
                        ValaCCodeNewline* _tmp73_;
907
 
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp72_ = vala_ccode_identifier_new ("G_BEGIN_DECLS")));
908
 
                        _vala_ccode_node_unref0 (_tmp72_);
909
 
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp73_ = vala_ccode_newline_new ()));
910
 
                        _vala_ccode_node_unref0 (_tmp73_);
911
 
                }
912
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp74_ = vala_ccode_newline_new ()));
913
 
                _vala_ccode_node_unref0 (_tmp74_);
914
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->header_declarations->type_declaration);
915
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp75_ = vala_ccode_newline_new ()));
916
 
                _vala_ccode_node_unref0 (_tmp75_);
917
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->header_declarations->type_definition);
 
942
                once = (_tmp75_ = vala_ccode_once_section_new (_tmp74_ = vala_ccode_base_module_get_define_for_filename (vala_ccode_writer_get_filename (writer))), _g_free0 (_tmp74_), _tmp75_);
918
943
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp76_ = vala_ccode_newline_new ()));
919
944
                _vala_ccode_node_unref0 (_tmp76_);
920
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->header_declarations->type_member_declaration);
 
945
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->header_declarations->include_directives);
921
946
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp77_ = vala_ccode_newline_new ()));
922
947
                _vala_ccode_node_unref0 (_tmp77_);
923
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->header_declarations->constant_declaration);
924
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp78_ = vala_ccode_newline_new ()));
925
 
                _vala_ccode_node_unref0 (_tmp78_);
926
948
                if (vala_code_context_get_profile (context) == VALA_PROFILE_GOBJECT) {
927
 
                        ValaCCodeIdentifier* _tmp79_;
928
 
                        ValaCCodeNewline* _tmp80_;
929
 
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp79_ = vala_ccode_identifier_new ("G_END_DECLS")));
 
949
                        ValaCCodeIdentifier* _tmp78_;
 
950
                        ValaCCodeNewline* _tmp79_;
 
951
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp78_ = vala_ccode_identifier_new ("G_BEGIN_DECLS")));
 
952
                        _vala_ccode_node_unref0 (_tmp78_);
 
953
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp79_ = vala_ccode_newline_new ()));
930
954
                        _vala_ccode_node_unref0 (_tmp79_);
931
 
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp80_ = vala_ccode_newline_new ()));
932
 
                        _vala_ccode_node_unref0 (_tmp80_);
933
955
                }
 
956
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp80_ = vala_ccode_newline_new ()));
 
957
                _vala_ccode_node_unref0 (_tmp80_);
 
958
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->header_declarations->type_declaration);
934
959
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp81_ = vala_ccode_newline_new ()));
935
960
                _vala_ccode_node_unref0 (_tmp81_);
 
961
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->header_declarations->type_definition);
 
962
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp82_ = vala_ccode_newline_new ()));
 
963
                _vala_ccode_node_unref0 (_tmp82_);
 
964
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->header_declarations->type_member_declaration);
 
965
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp83_ = vala_ccode_newline_new ()));
 
966
                _vala_ccode_node_unref0 (_tmp83_);
 
967
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->header_declarations->constant_declaration);
 
968
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp84_ = vala_ccode_newline_new ()));
 
969
                _vala_ccode_node_unref0 (_tmp84_);
 
970
                if (vala_code_context_get_profile (context) == VALA_PROFILE_GOBJECT) {
 
971
                        ValaCCodeIdentifier* _tmp85_;
 
972
                        ValaCCodeNewline* _tmp86_;
 
973
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp85_ = vala_ccode_identifier_new ("G_END_DECLS")));
 
974
                        _vala_ccode_node_unref0 (_tmp85_);
 
975
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp86_ = vala_ccode_newline_new ()));
 
976
                        _vala_ccode_node_unref0 (_tmp86_);
 
977
                }
 
978
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp87_ = vala_ccode_newline_new ()));
 
979
                _vala_ccode_node_unref0 (_tmp87_);
936
980
                vala_ccode_node_write ((ValaCCodeNode*) once, writer);
937
981
                vala_ccode_writer_close (writer);
938
982
                _vala_ccode_writer_unref0 (writer);
940
984
        }
941
985
        if (vala_code_context_get_internal_header_filename (context) != NULL) {
942
986
                ValaCCodeWriter* writer;
943
 
                char* _tmp83_;
944
 
                ValaCCodeOnceSection* _tmp84_;
 
987
                char* _tmp89_;
 
988
                ValaCCodeOnceSection* _tmp90_;
945
989
                ValaCCodeOnceSection* once;
946
 
                ValaCCodeNewline* _tmp85_;
947
 
                ValaCCodeNewline* _tmp86_;
948
 
                ValaCCodeNewline* _tmp89_;
949
 
                ValaCCodeNewline* _tmp90_;
950
990
                ValaCCodeNewline* _tmp91_;
951
991
                ValaCCodeNewline* _tmp92_;
952
 
                ValaCCodeNewline* _tmp93_;
 
992
                ValaCCodeNewline* _tmp95_;
953
993
                ValaCCodeNewline* _tmp96_;
 
994
                ValaCCodeNewline* _tmp97_;
 
995
                ValaCCodeNewline* _tmp98_;
 
996
                ValaCCodeNewline* _tmp99_;
 
997
                ValaCCodeNewline* _tmp102_;
954
998
                writer = vala_ccode_writer_new (vala_code_context_get_internal_header_filename (context), NULL);
955
 
                if (!vala_ccode_writer_open (writer)) {
956
 
                        char* _tmp82_;
957
 
                        vala_report_error (NULL, _tmp82_ = g_strdup_printf ("unable to open `%s' for writing", vala_ccode_writer_get_filename (writer)));
958
 
                        _g_free0 (_tmp82_);
 
999
                if (!vala_ccode_writer_open (writer, vala_code_context_get_version_header (context))) {
 
1000
                        char* _tmp88_;
 
1001
                        vala_report_error (NULL, _tmp88_ = g_strdup_printf ("unable to open `%s' for writing", vala_ccode_writer_get_filename (writer)));
 
1002
                        _g_free0 (_tmp88_);
959
1003
                        _vala_ccode_writer_unref0 (writer);
960
1004
                        _vala_code_node_unref0 (unichar_struct);
961
1005
                        _vala_collection_object_unref0 (source_files);
962
1006
                        return;
963
1007
                }
964
1008
                vala_ccode_writer_write_newline (writer);
965
 
                once = (_tmp84_ = vala_ccode_once_section_new (_tmp83_ = vala_ccode_base_module_get_define_for_filename (vala_ccode_writer_get_filename (writer))), _g_free0 (_tmp83_), _tmp84_);
966
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp85_ = vala_ccode_newline_new ()));
967
 
                _vala_ccode_node_unref0 (_tmp85_);
968
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->internal_header_declarations->include_directives);
969
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp86_ = vala_ccode_newline_new ()));
970
 
                _vala_ccode_node_unref0 (_tmp86_);
971
 
                if (vala_code_context_get_profile (context) == VALA_PROFILE_GOBJECT) {
972
 
                        ValaCCodeIdentifier* _tmp87_;
973
 
                        ValaCCodeNewline* _tmp88_;
974
 
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp87_ = vala_ccode_identifier_new ("G_BEGIN_DECLS")));
975
 
                        _vala_ccode_node_unref0 (_tmp87_);
976
 
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp88_ = vala_ccode_newline_new ()));
977
 
                        _vala_ccode_node_unref0 (_tmp88_);
978
 
                }
979
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp89_ = vala_ccode_newline_new ()));
980
 
                _vala_ccode_node_unref0 (_tmp89_);
981
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->internal_header_declarations->type_declaration);
982
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp90_ = vala_ccode_newline_new ()));
983
 
                _vala_ccode_node_unref0 (_tmp90_);
984
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->internal_header_declarations->type_definition);
 
1009
                once = (_tmp90_ = vala_ccode_once_section_new (_tmp89_ = vala_ccode_base_module_get_define_for_filename (vala_ccode_writer_get_filename (writer))), _g_free0 (_tmp89_), _tmp90_);
985
1010
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp91_ = vala_ccode_newline_new ()));
986
1011
                _vala_ccode_node_unref0 (_tmp91_);
987
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->internal_header_declarations->type_member_declaration);
 
1012
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->internal_header_declarations->include_directives);
988
1013
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp92_ = vala_ccode_newline_new ()));
989
1014
                _vala_ccode_node_unref0 (_tmp92_);
990
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->internal_header_declarations->constant_declaration);
991
 
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp93_ = vala_ccode_newline_new ()));
992
 
                _vala_ccode_node_unref0 (_tmp93_);
993
1015
                if (vala_code_context_get_profile (context) == VALA_PROFILE_GOBJECT) {
994
 
                        ValaCCodeIdentifier* _tmp94_;
995
 
                        ValaCCodeNewline* _tmp95_;
996
 
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp94_ = vala_ccode_identifier_new ("G_END_DECLS")));
 
1016
                        ValaCCodeIdentifier* _tmp93_;
 
1017
                        ValaCCodeNewline* _tmp94_;
 
1018
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp93_ = vala_ccode_identifier_new ("G_BEGIN_DECLS")));
 
1019
                        _vala_ccode_node_unref0 (_tmp93_);
 
1020
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp94_ = vala_ccode_newline_new ()));
997
1021
                        _vala_ccode_node_unref0 (_tmp94_);
998
 
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp95_ = vala_ccode_newline_new ()));
999
 
                        _vala_ccode_node_unref0 (_tmp95_);
1000
1022
                }
 
1023
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp95_ = vala_ccode_newline_new ()));
 
1024
                _vala_ccode_node_unref0 (_tmp95_);
 
1025
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->internal_header_declarations->type_declaration);
1001
1026
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp96_ = vala_ccode_newline_new ()));
1002
1027
                _vala_ccode_node_unref0 (_tmp96_);
 
1028
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->internal_header_declarations->type_definition);
 
1029
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp97_ = vala_ccode_newline_new ()));
 
1030
                _vala_ccode_node_unref0 (_tmp97_);
 
1031
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->internal_header_declarations->type_member_declaration);
 
1032
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp98_ = vala_ccode_newline_new ()));
 
1033
                _vala_ccode_node_unref0 (_tmp98_);
 
1034
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) self->internal_header_declarations->constant_declaration);
 
1035
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp99_ = vala_ccode_newline_new ()));
 
1036
                _vala_ccode_node_unref0 (_tmp99_);
 
1037
                if (vala_code_context_get_profile (context) == VALA_PROFILE_GOBJECT) {
 
1038
                        ValaCCodeIdentifier* _tmp100_;
 
1039
                        ValaCCodeNewline* _tmp101_;
 
1040
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp100_ = vala_ccode_identifier_new ("G_END_DECLS")));
 
1041
                        _vala_ccode_node_unref0 (_tmp100_);
 
1042
                        vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp101_ = vala_ccode_newline_new ()));
 
1043
                        _vala_ccode_node_unref0 (_tmp101_);
 
1044
                }
 
1045
                vala_ccode_fragment_append ((ValaCCodeFragment*) once, (ValaCCodeNode*) (_tmp102_ = vala_ccode_newline_new ()));
 
1046
                _vala_ccode_node_unref0 (_tmp102_);
1003
1047
                vala_ccode_node_write ((ValaCCodeNode*) once, writer);
1004
1048
                vala_ccode_writer_close (writer);
1005
1049
                _vala_ccode_writer_unref0 (writer);
1012
1056
 
1013
1057
static ValaCCodeIdentifier* vala_ccode_base_module_real_get_value_setter_function (ValaCCodeModule* base, ValaDataType* type_reference) {
1014
1058
        ValaCCodeBaseModule * self;
1015
 
        ValaCCodeIdentifier* result;
 
1059
        ValaCCodeIdentifier* result = NULL;
1016
1060
        ValaDataType* _tmp0_;
1017
1061
        ValaArrayType* array_type;
1018
1062
        self = (ValaCCodeBaseModule*) base;
1045
1089
}
1046
1090
 
1047
1091
 
 
1092
static ValaCCodeIdentifier* vala_ccode_base_module_real_get_value_taker_function (ValaCCodeModule* base, ValaDataType* type_reference) {
 
1093
        ValaCCodeBaseModule * self;
 
1094
        ValaCCodeIdentifier* result = NULL;
 
1095
        ValaDataType* _tmp0_;
 
1096
        ValaArrayType* array_type;
 
1097
        self = (ValaCCodeBaseModule*) base;
 
1098
        g_return_val_if_fail (type_reference != NULL, NULL);
 
1099
        array_type = _vala_code_node_ref0 ((_tmp0_ = type_reference, VALA_IS_ARRAY_TYPE (_tmp0_) ? ((ValaArrayType*) _tmp0_) : NULL));
 
1100
        if (vala_data_type_get_data_type (type_reference) != NULL) {
 
1101
                char* _tmp1_;
 
1102
                ValaCCodeIdentifier* _tmp2_;
 
1103
                result = (_tmp2_ = vala_ccode_identifier_new (_tmp1_ = vala_typesymbol_get_take_value_function (vala_data_type_get_data_type (type_reference))), _g_free0 (_tmp1_), _tmp2_);
 
1104
                _vala_code_node_unref0 (array_type);
 
1105
                return result;
 
1106
        } else {
 
1107
                gboolean _tmp3_ = FALSE;
 
1108
                if (array_type != NULL) {
 
1109
                        _tmp3_ = vala_data_type_get_data_type (vala_array_type_get_element_type (array_type)) == vala_data_type_get_data_type (self->string_type);
 
1110
                } else {
 
1111
                        _tmp3_ = FALSE;
 
1112
                }
 
1113
                if (_tmp3_) {
 
1114
                        result = vala_ccode_identifier_new ("g_value_take_boxed");
 
1115
                        _vala_code_node_unref0 (array_type);
 
1116
                        return result;
 
1117
                } else {
 
1118
                        result = vala_ccode_identifier_new ("g_value_set_pointer");
 
1119
                        _vala_code_node_unref0 (array_type);
 
1120
                        return result;
 
1121
                }
 
1122
        }
 
1123
        _vala_code_node_unref0 (array_type);
 
1124
}
 
1125
 
 
1126
 
1048
1127
static ValaCCodeIdentifier* vala_ccode_base_module_get_value_getter_function (ValaCCodeBaseModule* self, ValaDataType* type_reference) {
1049
 
        ValaCCodeIdentifier* result;
 
1128
        ValaCCodeIdentifier* result = NULL;
1050
1129
        ValaDataType* _tmp0_;
1051
1130
        ValaArrayType* array_type;
1052
1131
        g_return_val_if_fail (self != NULL, NULL);
1322
1401
                ValaCCodeIdentifier* _tmp59_;
1323
1402
                ValaCCodeExpressionStatement* _tmp60_;
1324
1403
                dbusvtable = vala_ccode_struct_new ("_DBusObjectVTable");
1325
 
                vala_ccode_struct_add_field (dbusvtable, "void", "(*register_object) (DBusConnection*, const char*, void*)");
 
1404
                vala_ccode_struct_add_field (dbusvtable, "void", "(*register_object) (DBusConnection*, const char*, void*)", NULL);
1326
1405
                vala_ccode_declaration_space_add_type_definition (self->source_declarations, (ValaCCodeNode*) dbusvtable);
1327
1406
                vala_ccode_declaration_space_add_type_declaration (self->source_declarations, (ValaCCodeNode*) (_tmp9_ = vala_ccode_type_definition_new ("struct _DBusObjectVTable", (ValaCCodeDeclarator*) (_tmp8_ = vala_ccode_variable_declarator_new ("_DBusObjectVTable", NULL, NULL)))));
1328
1407
                _vala_ccode_node_unref0 (_tmp9_);
1426
1505
                _vala_ccode_node_unref0 (path_free);
1427
1506
        }
1428
1507
        writer = (_tmp62_ = vala_ccode_writer_new (_tmp61_ = vala_source_file_get_csource_filename (source_file), vala_source_file_get_filename (source_file)), _g_free0 (_tmp61_), _tmp62_);
1429
 
        if (!vala_ccode_writer_open (writer)) {
 
1508
        if (!vala_ccode_writer_open (writer, vala_code_context_get_version_header (self->priv->_context))) {
1430
1509
                char* _tmp63_;
1431
1510
                vala_report_error (NULL, _tmp63_ = g_strdup_printf ("unable to open `%s' for writing", vala_ccode_writer_get_filename (writer)));
1432
1511
                _g_free0 (_tmp63_);
1485
1564
 
1486
1565
 
1487
1566
static char* vala_ccode_base_module_get_define_for_filename (const char* filename) {
1488
 
        char* result;
 
1567
        char* result = NULL;
1489
1568
        GString* define;
1490
1569
        char* i;
1491
1570
        g_return_val_if_fail (filename != NULL, NULL);
1520
1599
 
1521
1600
 
1522
1601
static gboolean vala_ccode_base_module_real_generate_enum_declaration (ValaCCodeBaseModule* self, ValaEnum* en, ValaCCodeDeclarationSpace* decl_space) {
1523
 
        gboolean result;
 
1602
        gboolean result = FALSE;
1524
1603
        char* _tmp0_;
1525
1604
        gboolean _tmp1_;
1526
1605
        char* _tmp2_;
1592
1671
        regfun = vala_ccode_function_new (fun_name, "GType");
1593
1672
        if (vala_symbol_get_access ((ValaSymbol*) en) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
1594
1673
                vala_ccode_function_set_modifiers (regfun, VALA_CCODE_MODIFIERS_STATIC);
 
1674
                vala_ccode_function_set_attributes (regfun, "G_GNUC_UNUSED");
1595
1675
        }
1596
1676
        vala_ccode_declaration_space_add_type_member_declaration (decl_space, (ValaCCodeNode*) regfun);
1597
1677
        result = TRUE;
1610
1690
 
1611
1691
static void vala_ccode_base_module_real_visit_enum (ValaCCodeModule* base, ValaEnum* en) {
1612
1692
        ValaCCodeBaseModule * self;
1613
 
        ValaCCodeInitializerList* clist;
1614
 
        ValaCCodeInitializerList* clist_ev;
1615
 
        ValaCCodeInitializerList* _tmp9_;
1616
 
        ValaCCodeConstant* _tmp10_;
1617
 
        ValaCCodeConstant* _tmp11_;
1618
 
        ValaCCodeConstant* _tmp12_;
1619
 
        ValaCCodeVariableDeclarator* enum_decl;
1620
 
        ValaCCodeDeclaration* _cdecl_;
1621
 
        ValaCCodeBlock* type_init;
1622
 
        char* _tmp15_;
1623
 
        char* _tmp16_;
1624
 
        char* fun_name;
1625
 
        ValaCCodeFunction* regfun;
1626
 
        ValaCCodeBlock* regblock;
1627
 
        ValaCCodeDeclaration* _tmp17_;
1628
 
        char* _tmp18_;
1629
 
        char* _tmp19_;
1630
 
        char* type_id_name;
1631
 
        ValaCCodeVariableDeclarator* _tmp21_;
1632
 
        ValaCCodeConstant* _tmp20_;
1633
 
        ValaCCodeFunctionCall* reg_call;
1634
 
        ValaCCodeConstant* _tmp28_;
1635
 
        char* _tmp27_;
1636
 
        char* _tmp26_;
1637
 
        ValaCCodeIdentifier* _tmp29_;
1638
 
        ValaCCodeExpressionStatement* _tmp32_;
1639
 
        ValaCCodeAssignment* _tmp31_;
1640
 
        ValaCCodeIdentifier* _tmp30_;
1641
 
        ValaCCodeIdentifier* _tmp33_;
1642
 
        ValaCCodeFunctionCall* _tmp34_;
1643
 
        ValaCCodeFunctionCall* cond;
1644
 
        ValaCCodeBinaryExpression* _tmp37_;
1645
 
        ValaCCodeConstant* _tmp36_;
1646
 
        ValaCCodeIdentifier* _tmp35_;
1647
 
        ValaCCodeIfStatement* cif;
1648
 
        ValaCCodeReturnStatement* _tmp39_;
1649
 
        ValaCCodeConstant* _tmp38_;
1650
 
        ValaCCodeNewline* _tmp40_;
1651
1693
        self = (ValaCCodeBaseModule*) base;
1652
1694
        g_return_if_fail (en != NULL);
1653
1695
        vala_code_node_accept_children ((ValaCodeNode*) en, (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
1658
1700
        if (!vala_symbol_is_private_symbol ((ValaSymbol*) en)) {
1659
1701
                vala_ccode_base_module_generate_enum_declaration (self, en, self->internal_header_declarations);
1660
1702
        }
1661
 
        if (!vala_enum_get_has_type_id (en)) {
1662
 
                return;
1663
 
        }
1664
 
        clist = vala_ccode_initializer_list_new ();
1665
 
        clist_ev = NULL;
1666
 
        {
1667
 
                ValaList* _tmp0_;
1668
 
                ValaIterator* _tmp1_;
1669
 
                ValaIterator* _ev_it;
1670
 
                _ev_it = (_tmp1_ = vala_iterable_iterator ((ValaIterable*) (_tmp0_ = vala_enum_get_values (en))), _vala_collection_object_unref0 (_tmp0_), _tmp1_);
1671
 
                while (TRUE) {
1672
 
                        ValaEnumValue* ev;
1673
 
                        ValaCCodeInitializerList* _tmp2_;
1674
 
                        ValaCCodeConstant* _tmp4_;
1675
 
                        char* _tmp3_;
1676
 
                        ValaCCodeIdentifier* _tmp7_;
1677
 
                        char* _tmp6_;
1678
 
                        char* _tmp5_;
1679
 
                        ValaCCodeConstant* _tmp8_;
1680
 
                        if (!vala_iterator_next (_ev_it)) {
1681
 
                                break;
1682
 
                        }
1683
 
                        ev = (ValaEnumValue*) vala_iterator_get (_ev_it);
1684
 
                        clist_ev = (_tmp2_ = vala_ccode_initializer_list_new (), _vala_ccode_node_unref0 (clist_ev), _tmp2_);
1685
 
                        vala_ccode_initializer_list_append (clist_ev, (ValaCCodeExpression*) (_tmp4_ = vala_ccode_constant_new (_tmp3_ = vala_enum_value_get_cname (ev))));
1686
 
                        _vala_ccode_node_unref0 (_tmp4_);
1687
 
                        _g_free0 (_tmp3_);
1688
 
                        vala_ccode_initializer_list_append (clist_ev, (ValaCCodeExpression*) (_tmp7_ = vala_ccode_identifier_new (_tmp6_ = g_strdup_printf ("\"%s\"", _tmp5_ = vala_enum_value_get_cname (ev)))));
1689
 
                        _vala_ccode_node_unref0 (_tmp7_);
1690
 
                        _g_free0 (_tmp6_);
1691
 
                        _g_free0 (_tmp5_);
1692
 
                        vala_ccode_initializer_list_append (clist_ev, (ValaCCodeExpression*) (_tmp8_ = vala_enum_value_get_canonical_cconstant (ev)));
1693
 
                        _vala_ccode_node_unref0 (_tmp8_);
1694
 
                        vala_ccode_initializer_list_append (clist, (ValaCCodeExpression*) clist_ev);
1695
 
                        _vala_code_node_unref0 (ev);
1696
 
                }
1697
 
                _vala_collection_object_unref0 (_ev_it);
1698
 
        }
1699
 
        clist_ev = (_tmp9_ = vala_ccode_initializer_list_new (), _vala_ccode_node_unref0 (clist_ev), _tmp9_);
1700
 
        vala_ccode_initializer_list_append (clist_ev, (ValaCCodeExpression*) (_tmp10_ = vala_ccode_constant_new ("0")));
1701
 
        _vala_ccode_node_unref0 (_tmp10_);
1702
 
        vala_ccode_initializer_list_append (clist_ev, (ValaCCodeExpression*) (_tmp11_ = vala_ccode_constant_new ("NULL")));
1703
 
        _vala_ccode_node_unref0 (_tmp11_);
1704
 
        vala_ccode_initializer_list_append (clist_ev, (ValaCCodeExpression*) (_tmp12_ = vala_ccode_constant_new ("NULL")));
1705
 
        _vala_ccode_node_unref0 (_tmp12_);
1706
 
        vala_ccode_initializer_list_append (clist, (ValaCCodeExpression*) clist_ev);
1707
 
        enum_decl = vala_ccode_variable_declarator_new ("values[]", (ValaCCodeExpression*) clist, NULL);
1708
 
        _cdecl_ = NULL;
1709
 
        if (vala_enum_get_is_flags (en)) {
1710
 
                ValaCCodeDeclaration* _tmp13_;
1711
 
                _cdecl_ = (_tmp13_ = vala_ccode_declaration_new ("const GFlagsValue"), _vala_ccode_node_unref0 (_cdecl_), _tmp13_);
1712
 
        } else {
1713
 
                ValaCCodeDeclaration* _tmp14_;
1714
 
                _cdecl_ = (_tmp14_ = vala_ccode_declaration_new ("const GEnumValue"), _vala_ccode_node_unref0 (_cdecl_), _tmp14_);
1715
 
        }
1716
 
        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) enum_decl);
1717
 
        vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
1718
 
        type_init = vala_ccode_block_new ();
1719
 
        vala_ccode_block_add_statement (type_init, (ValaCCodeNode*) _cdecl_);
1720
 
        fun_name = (_tmp16_ = g_strdup_printf ("%s_get_type", _tmp15_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) en, NULL)), _g_free0 (_tmp15_), _tmp16_);
1721
 
        regfun = vala_ccode_function_new (fun_name, "GType");
1722
 
        regblock = vala_ccode_block_new ();
1723
 
        _cdecl_ = (_tmp17_ = vala_ccode_declaration_new ("GType"), _vala_ccode_node_unref0 (_cdecl_), _tmp17_);
1724
 
        type_id_name = (_tmp19_ = g_strdup_printf ("%s_type_id", _tmp18_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) en, NULL)), _g_free0 (_tmp18_), _tmp19_);
1725
 
        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp21_ = vala_ccode_variable_declarator_new (type_id_name, (ValaCCodeExpression*) (_tmp20_ = vala_ccode_constant_new ("0")), NULL)));
1726
 
        _vala_ccode_node_unref0 (_tmp21_);
1727
 
        _vala_ccode_node_unref0 (_tmp20_);
1728
 
        vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
1729
 
        vala_ccode_block_add_statement (regblock, (ValaCCodeNode*) _cdecl_);
1730
 
        reg_call = NULL;
1731
 
        if (vala_enum_get_is_flags (en)) {
1732
 
                ValaCCodeFunctionCall* _tmp23_;
1733
 
                ValaCCodeIdentifier* _tmp22_;
1734
 
                reg_call = (_tmp23_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp22_ = vala_ccode_identifier_new ("g_flags_register_static"))), _vala_ccode_node_unref0 (reg_call), _tmp23_);
1735
 
                _vala_ccode_node_unref0 (_tmp22_);
1736
 
        } else {
1737
 
                ValaCCodeFunctionCall* _tmp25_;
1738
 
                ValaCCodeIdentifier* _tmp24_;
1739
 
                reg_call = (_tmp25_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp24_ = vala_ccode_identifier_new ("g_enum_register_static"))), _vala_ccode_node_unref0 (reg_call), _tmp25_);
1740
 
                _vala_ccode_node_unref0 (_tmp24_);
1741
 
        }
1742
 
        vala_ccode_function_call_add_argument (reg_call, (ValaCCodeExpression*) (_tmp28_ = vala_ccode_constant_new (_tmp27_ = g_strdup_printf ("\"%s\"", _tmp26_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) en, FALSE)))));
1743
 
        _vala_ccode_node_unref0 (_tmp28_);
1744
 
        _g_free0 (_tmp27_);
1745
 
        _g_free0 (_tmp26_);
1746
 
        vala_ccode_function_call_add_argument (reg_call, (ValaCCodeExpression*) (_tmp29_ = vala_ccode_identifier_new ("values")));
1747
 
        _vala_ccode_node_unref0 (_tmp29_);
1748
 
        vala_ccode_block_add_statement (type_init, (ValaCCodeNode*) (_tmp32_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp31_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp30_ = vala_ccode_identifier_new (type_id_name)), (ValaCCodeExpression*) reg_call, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
1749
 
        _vala_ccode_node_unref0 (_tmp32_);
1750
 
        _vala_ccode_node_unref0 (_tmp31_);
1751
 
        _vala_ccode_node_unref0 (_tmp30_);
1752
 
        cond = (_tmp34_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp33_ = vala_ccode_identifier_new ("G_UNLIKELY"))), _vala_ccode_node_unref0 (_tmp33_), _tmp34_);
1753
 
        vala_ccode_function_call_add_argument (cond, (ValaCCodeExpression*) (_tmp37_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) (_tmp35_ = vala_ccode_identifier_new (type_id_name)), (ValaCCodeExpression*) (_tmp36_ = vala_ccode_constant_new ("0")))));
1754
 
        _vala_ccode_node_unref0 (_tmp37_);
1755
 
        _vala_ccode_node_unref0 (_tmp36_);
1756
 
        _vala_ccode_node_unref0 (_tmp35_);
1757
 
        cif = vala_ccode_if_statement_new ((ValaCCodeExpression*) cond, (ValaCCodeStatement*) type_init, NULL);
1758
 
        vala_ccode_block_add_statement (regblock, (ValaCCodeNode*) cif);
1759
 
        vala_ccode_block_add_statement (regblock, (ValaCCodeNode*) (_tmp39_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp38_ = vala_ccode_constant_new (type_id_name)))));
1760
 
        _vala_ccode_node_unref0 (_tmp39_);
1761
 
        _vala_ccode_node_unref0 (_tmp38_);
1762
 
        if (vala_symbol_get_access ((ValaSymbol*) en) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
1763
 
                vala_ccode_function_set_modifiers (regfun, VALA_CCODE_MODIFIERS_STATIC);
1764
 
        }
1765
 
        vala_ccode_function_set_block (regfun, regblock);
1766
 
        vala_ccode_fragment_append (self->source_type_member_definition, (ValaCCodeNode*) (_tmp40_ = vala_ccode_newline_new ()));
1767
 
        _vala_ccode_node_unref0 (_tmp40_);
1768
 
        vala_ccode_fragment_append (self->source_type_member_definition, (ValaCCodeNode*) regfun);
1769
 
        _vala_ccode_node_unref0 (clist);
1770
 
        _vala_ccode_node_unref0 (clist_ev);
1771
 
        _vala_ccode_node_unref0 (enum_decl);
1772
 
        _vala_ccode_node_unref0 (_cdecl_);
1773
 
        _vala_ccode_node_unref0 (type_init);
1774
 
        _g_free0 (fun_name);
1775
 
        _vala_ccode_node_unref0 (regfun);
1776
 
        _vala_ccode_node_unref0 (regblock);
1777
 
        _g_free0 (type_id_name);
1778
 
        _vala_ccode_node_unref0 (reg_call);
1779
 
        _vala_ccode_node_unref0 (cond);
1780
 
        _vala_ccode_node_unref0 (cif);
1781
1703
}
1782
1704
 
1783
1705
 
1795
1717
                ValaCCodeExpression* l;
1796
1718
                ValaCCodeFragment* init_fragment;
1797
1719
                ValaCCodeFragment* finalize_fragment;
1798
 
                ValaCCodeIdentifier* _tmp17_;
1799
 
                char* _tmp16_;
1800
 
                ValaCCodeFunctionCall* _tmp18_;
 
1720
                ValaCCodeIdentifier* _tmp18_;
 
1721
                char* _tmp17_;
 
1722
                ValaCCodeFunctionCall* _tmp19_;
1801
1723
                ValaCCodeFunctionCall* initf;
1802
 
                ValaCCodeUnaryExpression* _tmp19_;
1803
 
                ValaCCodeExpressionStatement* _tmp20_;
 
1724
                ValaCCodeUnaryExpression* _tmp20_;
 
1725
                ValaCCodeExpressionStatement* _tmp21_;
1804
1726
                l = (ValaCCodeExpression*) vala_ccode_identifier_new ("self");
1805
1727
                init_fragment = _vala_ccode_node_ref0 (self->class_init_fragment);
1806
1728
                finalize_fragment = _vala_ccode_node_ref0 (self->class_finalize_fragment);
1818
1740
                } else {
1819
1741
                        if (vala_symbol_is_class_member ((ValaSymbol*) m)) {
1820
1742
                                ValaTypeSymbol* parent;
1821
 
                                ValaCCodeExpression* _tmp9_;
1822
 
                                char* _tmp8_;
 
1743
                                ValaCCodeIdentifier* _tmp8_;
1823
1744
                                char* _tmp7_;
1824
1745
                                char* _tmp6_;
1825
 
                                ValaCCodeExpression* _tmp11_;
1826
 
                                char* _tmp10_;
 
1746
                                ValaCCodeFunctionCall* _tmp9_;
 
1747
                                ValaCCodeFunctionCall* get_class_private_call;
 
1748
                                ValaCCodeIdentifier* _tmp10_;
 
1749
                                ValaCCodeExpression* _tmp12_;
 
1750
                                char* _tmp11_;
1827
1751
                                parent = _vala_code_node_ref0 (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
1828
 
                                l = (_tmp9_ = (ValaCCodeExpression*) vala_ccode_identifier_new (_tmp8_ = g_strdup_printf ("%s_GET_CLASS_PRIVATE(%s)", _tmp6_ = vala_typesymbol_get_upper_case_cname (parent, NULL), _tmp7_ = vala_typesymbol_get_type_id (parent))), _vala_ccode_node_unref0 (l), _tmp9_);
1829
 
                                _g_free0 (_tmp8_);
1830
 
                                _g_free0 (_tmp7_);
1831
 
                                _g_free0 (_tmp6_);
1832
 
                                l = (_tmp11_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer (l, _tmp10_ = vala_ccode_base_module_get_symbol_lock_name (self, vala_symbol_get_name ((ValaSymbol*) m))), _vala_ccode_node_unref0 (l), _tmp11_);
1833
 
                                _g_free0 (_tmp10_);
 
1752
                                get_class_private_call = (_tmp9_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp8_ = vala_ccode_identifier_new (_tmp7_ = g_strdup_printf ("%s_GET_CLASS_PRIVATE", _tmp6_ = vala_typesymbol_get_upper_case_cname (parent, NULL))))), _vala_ccode_node_unref0 (_tmp8_), _g_free0 (_tmp7_), _g_free0 (_tmp6_), _tmp9_);
 
1753
                                vala_ccode_function_call_add_argument (get_class_private_call, (ValaCCodeExpression*) (_tmp10_ = vala_ccode_identifier_new ("klass")));
 
1754
                                _vala_ccode_node_unref0 (_tmp10_);
 
1755
                                l = (_tmp12_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) get_class_private_call, _tmp11_ = vala_ccode_base_module_get_symbol_lock_name (self, vala_symbol_get_name ((ValaSymbol*) m))), _vala_ccode_node_unref0 (l), _tmp12_);
 
1756
                                _g_free0 (_tmp11_);
1834
1757
                                _vala_code_node_unref0 (parent);
 
1758
                                _vala_ccode_node_unref0 (get_class_private_call);
1835
1759
                        } else {
1836
 
                                ValaCCodeExpression* _tmp15_;
 
1760
                                ValaCCodeExpression* _tmp16_;
 
1761
                                char* _tmp15_;
1837
1762
                                char* _tmp14_;
1838
1763
                                char* _tmp13_;
1839
 
                                char* _tmp12_;
1840
 
                                l = (_tmp15_ = (ValaCCodeExpression*) vala_ccode_identifier_new (_tmp14_ = vala_ccode_base_module_get_symbol_lock_name (self, _tmp13_ = g_strdup_printf ("%s_%s", _tmp12_ = vala_symbol_get_lower_case_cname (vala_symbol_get_parent_symbol ((ValaSymbol*) m), NULL), vala_symbol_get_name ((ValaSymbol*) m)))), _vala_ccode_node_unref0 (l), _tmp15_);
 
1764
                                l = (_tmp16_ = (ValaCCodeExpression*) vala_ccode_identifier_new (_tmp15_ = vala_ccode_base_module_get_symbol_lock_name (self, _tmp14_ = g_strdup_printf ("%s_%s", _tmp13_ = vala_symbol_get_lower_case_cname (vala_symbol_get_parent_symbol ((ValaSymbol*) m), NULL), vala_symbol_get_name ((ValaSymbol*) m)))), _vala_ccode_node_unref0 (l), _tmp16_);
 
1765
                                _g_free0 (_tmp15_);
1841
1766
                                _g_free0 (_tmp14_);
1842
1767
                                _g_free0 (_tmp13_);
1843
 
                                _g_free0 (_tmp12_);
1844
1768
                        }
1845
1769
                }
1846
 
                initf = (_tmp18_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp17_ = vala_ccode_identifier_new (_tmp16_ = vala_method_get_cname (vala_struct_get_default_construction_method (self->mutex_type))))), _vala_ccode_node_unref0 (_tmp17_), _g_free0 (_tmp16_), _tmp18_);
1847
 
                vala_ccode_function_call_add_argument (initf, (ValaCCodeExpression*) (_tmp19_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, l)));
1848
 
                _vala_ccode_node_unref0 (_tmp19_);
1849
 
                vala_ccode_fragment_append (init_fragment, (ValaCCodeNode*) (_tmp20_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) initf)));
 
1770
                initf = (_tmp19_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp18_ = vala_ccode_identifier_new (_tmp17_ = vala_method_get_cname (vala_struct_get_default_construction_method (self->mutex_type))))), _vala_ccode_node_unref0 (_tmp18_), _g_free0 (_tmp17_), _tmp19_);
 
1771
                vala_ccode_function_call_add_argument (initf, (ValaCCodeExpression*) (_tmp20_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, l)));
1850
1772
                _vala_ccode_node_unref0 (_tmp20_);
 
1773
                vala_ccode_fragment_append (init_fragment, (ValaCCodeNode*) (_tmp21_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) initf)));
 
1774
                _vala_ccode_node_unref0 (_tmp21_);
1851
1775
                if (finalize_fragment != NULL) {
1852
 
                        ValaCCodeIdentifier* _tmp21_;
1853
 
                        ValaCCodeFunctionCall* _tmp22_;
 
1776
                        ValaCCodeIdentifier* _tmp22_;
 
1777
                        ValaCCodeFunctionCall* _tmp23_;
1854
1778
                        ValaCCodeFunctionCall* fc;
1855
 
                        ValaCCodeUnaryExpression* _tmp23_;
1856
 
                        ValaCCodeExpressionStatement* _tmp24_;
1857
 
                        fc = (_tmp22_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp21_ = vala_ccode_identifier_new ("g_static_rec_mutex_free"))), _vala_ccode_node_unref0 (_tmp21_), _tmp22_);
1858
 
                        vala_ccode_function_call_add_argument (fc, (ValaCCodeExpression*) (_tmp23_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, l)));
1859
 
                        _vala_ccode_node_unref0 (_tmp23_);
1860
 
                        vala_ccode_fragment_append (finalize_fragment, (ValaCCodeNode*) (_tmp24_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) fc)));
 
1779
                        ValaCCodeUnaryExpression* _tmp24_;
 
1780
                        ValaCCodeExpressionStatement* _tmp25_;
 
1781
                        fc = (_tmp23_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp22_ = vala_ccode_identifier_new ("g_static_rec_mutex_free"))), _vala_ccode_node_unref0 (_tmp22_), _tmp23_);
 
1782
                        vala_ccode_function_call_add_argument (fc, (ValaCCodeExpression*) (_tmp24_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, l)));
1861
1783
                        _vala_ccode_node_unref0 (_tmp24_);
 
1784
                        vala_ccode_fragment_append (finalize_fragment, (ValaCCodeNode*) (_tmp25_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) fc)));
 
1785
                        _vala_ccode_node_unref0 (_tmp25_);
1862
1786
                        _vala_ccode_node_unref0 (fc);
1863
1787
                }
1864
1788
                _vala_ccode_node_unref0 (l);
1869
1793
}
1870
1794
 
1871
1795
 
1872
 
void vala_ccode_base_module_generate_constant_declaration (ValaCCodeBaseModule* self, ValaConstant* c, ValaCCodeDeclarationSpace* decl_space) {
 
1796
void vala_ccode_base_module_generate_constant_declaration (ValaCCodeBaseModule* self, ValaConstant* c, ValaCCodeDeclarationSpace* decl_space, gboolean definition) {
1873
1797
        char* _tmp0_;
1874
1798
        gboolean _tmp1_;
1875
1799
        g_return_if_fail (self != NULL);
1880
1804
        }
1881
1805
        vala_code_node_accept_children ((ValaCodeNode*) c, (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
1882
1806
        if (!vala_symbol_get_external ((ValaSymbol*) c)) {
 
1807
                ValaExpression* _tmp2_;
 
1808
                ValaInitializerList* initializer_list;
1883
1809
                vala_ccode_base_module_generate_type_declaration (self, vala_constant_get_type_reference (c), decl_space);
1884
 
                if (VALA_IS_INITIALIZER_LIST (vala_constant_get_initializer (c))) {
1885
 
                        char* _tmp2_;
1886
 
                        ValaCCodeDeclaration* _tmp3_;
 
1810
                initializer_list = _vala_code_node_ref0 ((_tmp2_ = vala_constant_get_initializer (c), VALA_IS_INITIALIZER_LIST (_tmp2_) ? ((ValaInitializerList*) _tmp2_) : NULL));
 
1811
                if (initializer_list != NULL) {
 
1812
                        char* _tmp3_;
 
1813
                        ValaCCodeDeclaration* _tmp4_;
1887
1814
                        ValaCCodeDeclaration* _cdecl_;
1888
1815
                        char* arr;
1889
 
                        ValaCCodeVariableDeclarator* _tmp7_;
1890
 
                        char* _tmp6_;
1891
 
                        char* _tmp5_;
1892
 
                        _cdecl_ = (_tmp3_ = vala_ccode_declaration_new (_tmp2_ = vala_data_type_get_const_cname (vala_constant_get_type_reference (c))), _g_free0 (_tmp2_), _tmp3_);
 
1816
                        ValaCCodeExpression* cinitializer;
 
1817
                        ValaCCodeVariableDeclarator* _tmp9_;
 
1818
                        char* _tmp8_;
 
1819
                        char* _tmp7_;
 
1820
                        _cdecl_ = (_tmp4_ = vala_ccode_declaration_new (_tmp3_ = vala_data_type_get_const_cname (vala_constant_get_type_reference (c))), _g_free0 (_tmp3_), _tmp4_);
1893
1821
                        arr = g_strdup ("");
1894
1822
                        if (VALA_IS_ARRAY_TYPE (vala_constant_get_type_reference (c))) {
1895
 
                                char* _tmp4_;
1896
 
                                arr = (_tmp4_ = g_strdup ("[]"), _g_free0 (arr), _tmp4_);
1897
 
                        }
1898
 
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp7_ = vala_ccode_variable_declarator_new (_tmp6_ = g_strdup_printf ("%s%s", _tmp5_ = vala_constant_get_cname (c), arr), VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_constant_get_initializer (c))), NULL)));
1899
 
                        _vala_ccode_node_unref0 (_tmp7_);
1900
 
                        _g_free0 (_tmp6_);
1901
 
                        _g_free0 (_tmp5_);
1902
 
                        vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
 
1823
                                char* _tmp5_;
 
1824
                                arr = (_tmp5_ = g_strdup_printf ("[%d]", vala_initializer_list_get_size (initializer_list)), _g_free0 (arr), _tmp5_);
 
1825
                        }
 
1826
                        cinitializer = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_constant_get_initializer (c))));
 
1827
                        if (!definition) {
 
1828
                                ValaCCodeExpression* _tmp6_;
 
1829
                                cinitializer = (_tmp6_ = NULL, _vala_ccode_node_unref0 (cinitializer), _tmp6_);
 
1830
                        }
 
1831
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp9_ = vala_ccode_variable_declarator_new (_tmp8_ = g_strdup_printf ("%s%s", _tmp7_ = vala_constant_get_cname (c), arr), cinitializer, NULL)));
 
1832
                        _vala_ccode_node_unref0 (_tmp9_);
 
1833
                        _g_free0 (_tmp8_);
 
1834
                        _g_free0 (_tmp7_);
 
1835
                        if (vala_symbol_is_private_symbol ((ValaSymbol*) c)) {
 
1836
                                vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
 
1837
                        } else {
 
1838
                                vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_EXTERN);
 
1839
                        }
1903
1840
                        vala_ccode_declaration_space_add_constant_declaration (decl_space, (ValaCCodeNode*) _cdecl_);
1904
1841
                        _vala_ccode_node_unref0 (_cdecl_);
1905
1842
                        _g_free0 (arr);
 
1843
                        _vala_ccode_node_unref0 (cinitializer);
1906
1844
                } else {
1907
 
                        char* _tmp8_;
1908
 
                        ValaCCodeMacroReplacement* _tmp9_;
 
1845
                        char* _tmp10_;
 
1846
                        ValaCCodeMacroReplacement* _tmp11_;
1909
1847
                        ValaCCodeMacroReplacement* cdefine;
1910
 
                        cdefine = (_tmp9_ = vala_ccode_macro_replacement_new_with_expression (_tmp8_ = vala_constant_get_cname (c), VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_constant_get_initializer (c)))), _g_free0 (_tmp8_), _tmp9_);
 
1848
                        cdefine = (_tmp11_ = vala_ccode_macro_replacement_new_with_expression (_tmp10_ = vala_constant_get_cname (c), VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_constant_get_initializer (c)))), _g_free0 (_tmp10_), _tmp11_);
1911
1849
                        vala_ccode_declaration_space_add_type_member_declaration (decl_space, (ValaCCodeNode*) cdefine);
1912
1850
                        _vala_ccode_node_unref0 (cdefine);
1913
1851
                }
 
1852
                _vala_code_node_unref0 (initializer_list);
1914
1853
        }
1915
1854
}
1916
1855
 
1919
1858
        ValaCCodeBaseModule * self;
1920
1859
        self = (ValaCCodeBaseModule*) base;
1921
1860
        g_return_if_fail (c != NULL);
1922
 
        vala_ccode_base_module_generate_constant_declaration (self, c, self->source_declarations);
 
1861
        vala_ccode_base_module_generate_constant_declaration (self, c, self->source_declarations, TRUE);
1923
1862
        if (!vala_symbol_is_internal_symbol ((ValaSymbol*) c)) {
1924
 
                vala_ccode_base_module_generate_constant_declaration (self, c, self->header_declarations);
 
1863
                vala_ccode_base_module_generate_constant_declaration (self, c, self->header_declarations, FALSE);
1925
1864
        }
1926
1865
        if (!vala_symbol_is_private_symbol ((ValaSymbol*) c)) {
1927
 
                vala_ccode_base_module_generate_constant_declaration (self, c, self->internal_header_declarations);
 
1866
                vala_ccode_base_module_generate_constant_declaration (self, c, self->internal_header_declarations, FALSE);
1928
1867
        }
1929
1868
}
1930
1869
 
1934
1873
        gboolean _tmp1_;
1935
1874
        char* field_ctype;
1936
1875
        ValaCCodeDeclaration* _cdecl_;
1937
 
        ValaCCodeVariableDeclarator* _tmp4_;
 
1876
        ValaCCodeVariableDeclarator* _tmp5_;
 
1877
        char* _tmp4_;
1938
1878
        char* _tmp3_;
1939
 
        gboolean _tmp11_ = FALSE;
 
1879
        gboolean _tmp12_ = FALSE;
1940
1880
        g_return_if_fail (self != NULL);
1941
1881
        g_return_if_fail (f != NULL);
1942
1882
        g_return_if_fail (decl_space != NULL);
1950
1890
                field_ctype = (_tmp2_ = g_strconcat ("volatile ", field_ctype, NULL), _g_free0 (field_ctype), _tmp2_);
1951
1891
        }
1952
1892
        _cdecl_ = vala_ccode_declaration_new (field_ctype);
1953
 
        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp4_ = vala_ccode_variable_declarator_new (_tmp3_ = vala_field_get_cname (f), NULL, NULL)));
1954
 
        _vala_ccode_node_unref0 (_tmp4_);
 
1893
        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp5_ = vala_ccode_variable_declarator_new (_tmp3_ = vala_field_get_cname (f), NULL, _tmp4_ = vala_data_type_get_cdeclarator_suffix (vala_field_get_field_type (f)))));
 
1894
        _vala_ccode_node_unref0 (_tmp5_);
 
1895
        _g_free0 (_tmp4_);
1955
1896
        _g_free0 (_tmp3_);
1956
1897
        if (vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
1957
1898
                vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
1960
1901
        }
1961
1902
        vala_ccode_declaration_space_add_type_member_declaration (decl_space, (ValaCCodeNode*) _cdecl_);
1962
1903
        if (vala_lockable_get_lock_used ((ValaLockable*) f)) {
1963
 
                char* _tmp5_;
1964
 
                ValaCCodeDeclaration* _tmp6_;
 
1904
                char* _tmp6_;
 
1905
                ValaCCodeDeclaration* _tmp7_;
1965
1906
                ValaCCodeDeclaration* flock;
1966
 
                ValaCCodeConstant* _tmp9_;
 
1907
                ValaCCodeConstant* _tmp10_;
 
1908
                char* _tmp9_;
1967
1909
                char* _tmp8_;
1968
 
                char* _tmp7_;
1969
 
                ValaCCodeVariableDeclarator* _tmp10_;
 
1910
                ValaCCodeVariableDeclarator* _tmp11_;
1970
1911
                ValaCCodeVariableDeclarator* flock_decl;
1971
 
                flock = (_tmp6_ = vala_ccode_declaration_new (_tmp5_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) self->mutex_type, FALSE)), _g_free0 (_tmp5_), _tmp6_);
1972
 
                flock_decl = (_tmp10_ = vala_ccode_variable_declarator_new (_tmp8_ = vala_ccode_base_module_get_symbol_lock_name (self, _tmp7_ = vala_field_get_cname (f)), (ValaCCodeExpression*) (_tmp9_ = vala_ccode_constant_new ("{0}")), NULL), _vala_ccode_node_unref0 (_tmp9_), _g_free0 (_tmp8_), _g_free0 (_tmp7_), _tmp10_);
 
1912
                flock = (_tmp7_ = vala_ccode_declaration_new (_tmp6_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) self->mutex_type, FALSE)), _g_free0 (_tmp6_), _tmp7_);
 
1913
                flock_decl = (_tmp11_ = vala_ccode_variable_declarator_new (_tmp9_ = vala_ccode_base_module_get_symbol_lock_name (self, _tmp8_ = vala_field_get_cname (f)), (ValaCCodeExpression*) (_tmp10_ = vala_ccode_constant_new ("{0}")), NULL), _vala_ccode_node_unref0 (_tmp10_), _g_free0 (_tmp9_), _g_free0 (_tmp8_), _tmp11_);
1973
1914
                vala_ccode_declaration_add_declarator (flock, (ValaCCodeDeclarator*) flock_decl);
1974
1915
                if (vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
1975
1916
                        vala_ccode_declaration_set_modifiers (flock, VALA_CCODE_MODIFIERS_STATIC);
1981
1922
                _vala_ccode_node_unref0 (flock_decl);
1982
1923
        }
1983
1924
        if (VALA_IS_ARRAY_TYPE (vala_field_get_field_type (f))) {
1984
 
                _tmp11_ = !vala_field_get_no_array_length (f);
 
1925
                _tmp12_ = !vala_field_get_no_array_length (f);
1985
1926
        } else {
1986
 
                _tmp11_ = FALSE;
 
1927
                _tmp12_ = FALSE;
1987
1928
        }
1988
 
        if (_tmp11_) {
 
1929
        if (_tmp12_) {
1989
1930
                ValaArrayType* array_type;
1990
1931
                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
1991
 
                {
1992
 
                        gint dim;
1993
 
                        dim = 1;
 
1932
                if (!vala_array_type_get_fixed_length (array_type)) {
1994
1933
                        {
1995
 
                                gboolean _tmp12_;
1996
 
                                _tmp12_ = TRUE;
1997
 
                                while (TRUE) {
1998
 
                                        ValaDataType* len_type;
1999
 
                                        ValaCCodeDeclaration* _tmp14_;
2000
 
                                        char* _tmp13_;
2001
 
                                        ValaCCodeVariableDeclarator* _tmp17_;
2002
 
                                        char* _tmp16_;
2003
 
                                        char* _tmp15_;
2004
 
                                        if (!_tmp12_) {
2005
 
                                                dim++;
2006
 
                                        }
2007
 
                                        _tmp12_ = FALSE;
2008
 
                                        if (!(dim <= vala_array_type_get_rank (array_type))) {
2009
 
                                                break;
2010
 
                                        }
2011
 
                                        len_type = vala_data_type_copy (self->int_type);
2012
 
                                        _cdecl_ = (_tmp14_ = vala_ccode_declaration_new (_tmp13_ = vala_data_type_get_cname (len_type)), _vala_ccode_node_unref0 (_cdecl_), _tmp14_);
2013
 
                                        _g_free0 (_tmp13_);
2014
 
                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp17_ = vala_ccode_variable_declarator_new (_tmp16_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp15_ = vala_field_get_cname (f), dim), NULL, NULL)));
2015
 
                                        _vala_ccode_node_unref0 (_tmp17_);
2016
 
                                        _g_free0 (_tmp16_);
2017
 
                                        _g_free0 (_tmp15_);
2018
 
                                        if (vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
2019
 
                                                vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
2020
 
                                        } else {
2021
 
                                                vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_EXTERN);
2022
 
                                        }
2023
 
                                        vala_ccode_declaration_space_add_type_member_declaration (decl_space, (ValaCCodeNode*) _cdecl_);
2024
 
                                        _vala_code_node_unref0 (len_type);
 
1934
                                gint dim;
 
1935
                                dim = 1;
 
1936
                                {
 
1937
                                        gboolean _tmp13_;
 
1938
                                        _tmp13_ = TRUE;
 
1939
                                        while (TRUE) {
 
1940
                                                ValaDataType* len_type;
 
1941
                                                ValaCCodeDeclaration* _tmp15_;
 
1942
                                                char* _tmp14_;
 
1943
                                                ValaCCodeVariableDeclarator* _tmp18_;
 
1944
                                                char* _tmp17_;
 
1945
                                                char* _tmp16_;
 
1946
                                                if (!_tmp13_) {
 
1947
                                                        dim++;
 
1948
                                                }
 
1949
                                                _tmp13_ = FALSE;
 
1950
                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
 
1951
                                                        break;
 
1952
                                                }
 
1953
                                                len_type = vala_data_type_copy (self->int_type);
 
1954
                                                _cdecl_ = (_tmp15_ = vala_ccode_declaration_new (_tmp14_ = vala_data_type_get_cname (len_type)), _vala_ccode_node_unref0 (_cdecl_), _tmp15_);
 
1955
                                                _g_free0 (_tmp14_);
 
1956
                                                vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp18_ = vala_ccode_variable_declarator_new (_tmp17_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp16_ = vala_field_get_cname (f), dim), NULL, NULL)));
 
1957
                                                _vala_ccode_node_unref0 (_tmp18_);
 
1958
                                                _g_free0 (_tmp17_);
 
1959
                                                _g_free0 (_tmp16_);
 
1960
                                                if (vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
 
1961
                                                        vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
 
1962
                                                } else {
 
1963
                                                        vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_EXTERN);
 
1964
                                                }
 
1965
                                                vala_ccode_declaration_space_add_type_member_declaration (decl_space, (ValaCCodeNode*) _cdecl_);
 
1966
                                                _vala_code_node_unref0 (len_type);
 
1967
                                        }
2025
1968
                                }
2026
1969
                        }
2027
1970
                }
2031
1974
                        ValaDelegateType* delegate_type;
2032
1975
                        delegate_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_field_get_field_type (f)));
2033
1976
                        if (vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (delegate_type))) {
2034
 
                                ValaCCodeDeclaration* _tmp18_;
2035
 
                                ValaCCodeVariableDeclarator* _tmp21_;
 
1977
                                ValaCCodeDeclaration* _tmp19_;
 
1978
                                ValaCCodeVariableDeclarator* _tmp22_;
 
1979
                                char* _tmp21_;
2036
1980
                                char* _tmp20_;
2037
 
                                char* _tmp19_;
2038
 
                                _cdecl_ = (_tmp18_ = vala_ccode_declaration_new ("gpointer"), _vala_ccode_node_unref0 (_cdecl_), _tmp18_);
2039
 
                                vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp21_ = vala_ccode_variable_declarator_new (_tmp20_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp19_ = vala_field_get_cname (f)), NULL, NULL)));
2040
 
                                _vala_ccode_node_unref0 (_tmp21_);
 
1981
                                _cdecl_ = (_tmp19_ = vala_ccode_declaration_new ("gpointer"), _vala_ccode_node_unref0 (_cdecl_), _tmp19_);
 
1982
                                vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp22_ = vala_ccode_variable_declarator_new (_tmp21_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp20_ = vala_field_get_cname (f)), NULL, NULL)));
 
1983
                                _vala_ccode_node_unref0 (_tmp22_);
 
1984
                                _g_free0 (_tmp21_);
2041
1985
                                _g_free0 (_tmp20_);
2042
 
                                _g_free0 (_tmp19_);
2043
1986
                                if (vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
2044
1987
                                        vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
2045
1988
                                } else {
2047
1990
                                }
2048
1991
                                vala_ccode_declaration_space_add_type_member_declaration (decl_space, (ValaCCodeNode*) _cdecl_);
2049
1992
                                if (vala_data_type_get_value_owned ((ValaDataType*) delegate_type)) {
2050
 
                                        ValaCCodeDeclaration* _tmp22_;
2051
 
                                        ValaCCodeVariableDeclarator* _tmp25_;
 
1993
                                        ValaCCodeDeclaration* _tmp23_;
 
1994
                                        ValaCCodeVariableDeclarator* _tmp26_;
 
1995
                                        char* _tmp25_;
2052
1996
                                        char* _tmp24_;
2053
 
                                        char* _tmp23_;
2054
 
                                        _cdecl_ = (_tmp22_ = vala_ccode_declaration_new ("GDestroyNotify"), _vala_ccode_node_unref0 (_cdecl_), _tmp22_);
2055
 
                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp25_ = vala_ccode_variable_declarator_new (_tmp24_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp23_ = vala_field_get_cname (f)), NULL, NULL)));
2056
 
                                        _vala_ccode_node_unref0 (_tmp25_);
 
1997
                                        _cdecl_ = (_tmp23_ = vala_ccode_declaration_new ("GDestroyNotify"), _vala_ccode_node_unref0 (_cdecl_), _tmp23_);
 
1998
                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp26_ = vala_ccode_variable_declarator_new (_tmp25_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp24_ = vala_field_get_cname (f)), NULL, NULL)));
 
1999
                                        _vala_ccode_node_unref0 (_tmp26_);
 
2000
                                        _g_free0 (_tmp25_);
2057
2001
                                        _g_free0 (_tmp24_);
2058
 
                                        _g_free0 (_tmp23_);
2059
2002
                                        if (vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
2060
2003
                                                vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
2061
2004
                                        } else {
2099
2042
        }
2100
2043
        if (vala_field_get_binding (f) == MEMBER_BINDING_INSTANCE) {
2101
2044
                gboolean _tmp3_ = FALSE;
2102
 
                gboolean _tmp26_ = FALSE;
 
2045
                gboolean _tmp27_ = FALSE;
2103
2046
                if (is_gtypeinstance) {
2104
2047
                        _tmp3_ = vala_symbol_get_access ((ValaSymbol*) f) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
2105
2048
                } else {
2149
2092
                                ValaCCodeIdentifier* _tmp16_;
2150
2093
                                ValaMemberAccess* ma;
2151
2094
                                ValaList* sizes;
 
2095
                                gboolean _tmp20_ = FALSE;
2152
2096
                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
2153
2097
                                this_access = vala_member_access_new_simple ("this", NULL);
2154
2098
                                vala_expression_set_value_type ((ValaExpression*) this_access, _tmp15_ = vala_ccode_base_module_get_data_type_for_symbol (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) f))));
2187
2131
                                        }
2188
2132
                                }
2189
2133
                                if (vala_array_type_get_rank (array_type) == 1) {
 
2134
                                        _tmp20_ = vala_symbol_is_internal_symbol ((ValaSymbol*) f);
 
2135
                                } else {
 
2136
                                        _tmp20_ = FALSE;
 
2137
                                }
 
2138
                                if (_tmp20_) {
2190
2139
                                        ValaCCodeExpression* lhs_array_size;
2191
2140
                                        ValaCCodeExpression* rhs_array_len;
2192
 
                                        ValaCCodeExpressionStatement* _tmp21_;
2193
 
                                        ValaCCodeAssignment* _tmp20_;
 
2141
                                        ValaCCodeExpressionStatement* _tmp22_;
 
2142
                                        ValaCCodeAssignment* _tmp21_;
2194
2143
                                        lhs_array_size = vala_ccode_module_get_array_size_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), (ValaExpression*) ma);
2195
2144
                                        rhs_array_len = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), (ValaExpression*) ma, 1);
2196
 
                                        vala_ccode_fragment_append (self->instance_init_fragment, (ValaCCodeNode*) (_tmp21_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp20_ = vala_ccode_assignment_new (lhs_array_size, rhs_array_len, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
2145
                                        vala_ccode_fragment_append (self->instance_init_fragment, (ValaCCodeNode*) (_tmp22_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp21_ = vala_ccode_assignment_new (lhs_array_size, rhs_array_len, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
2146
                                        _vala_ccode_node_unref0 (_tmp22_);
2197
2147
                                        _vala_ccode_node_unref0 (_tmp21_);
2198
 
                                        _vala_ccode_node_unref0 (_tmp20_);
2199
2148
                                        _vala_ccode_node_unref0 (lhs_array_size);
2200
2149
                                        _vala_ccode_node_unref0 (rhs_array_len);
2201
2150
                                }
2211
2160
                                while (TRUE) {
2212
2161
                                        ValaLocalVariable* local;
2213
2162
                                        ValaMemberAccess* ma;
2214
 
                                        ValaDataType* _tmp22_;
2215
 
                                        ValaCCodeExpressionStatement* _tmp25_;
 
2163
                                        ValaDataType* _tmp23_;
 
2164
                                        ValaCCodeExpressionStatement* _tmp26_;
 
2165
                                        ValaCCodeExpression* _tmp25_;
2216
2166
                                        ValaCCodeExpression* _tmp24_;
2217
 
                                        ValaCCodeExpression* _tmp23_;
2218
2167
                                        if (!vala_iterator_next (_local_it)) {
2219
2168
                                                break;
2220
2169
                                        }
2221
2170
                                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
2222
2171
                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
2223
2172
                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
2224
 
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp22_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
2225
 
                                        _vala_code_node_unref0 (_tmp22_);
2226
 
                                        vala_ccode_fragment_append (self->instance_init_fragment, (ValaCCodeNode*) (_tmp25_ = vala_ccode_expression_statement_new (_tmp24_ = vala_ccode_base_module_get_unref_expression (self, _tmp23_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
2173
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp23_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
2174
                                        _vala_code_node_unref0 (_tmp23_);
 
2175
                                        vala_ccode_fragment_append (self->instance_init_fragment, (ValaCCodeNode*) (_tmp26_ = vala_ccode_expression_statement_new (_tmp25_ = vala_ccode_base_module_get_unref_expression (self, _tmp24_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
2176
                                        _vala_ccode_node_unref0 (_tmp26_);
2227
2177
                                        _vala_ccode_node_unref0 (_tmp25_);
2228
2178
                                        _vala_ccode_node_unref0 (_tmp24_);
2229
 
                                        _vala_ccode_node_unref0 (_tmp23_);
2230
2179
                                        _vala_code_node_unref0 (local);
2231
2180
                                        _vala_code_node_unref0 (ma);
2232
2181
                                }
2237
2186
                        _vala_ccode_node_unref0 (rhs);
2238
2187
                }
2239
2188
                if (vala_ccode_base_module_requires_destroy (self, vala_field_get_field_type (f))) {
2240
 
                        _tmp26_ = self->instance_finalize_fragment != NULL;
 
2189
                        _tmp27_ = self->instance_finalize_fragment != NULL;
2241
2190
                } else {
2242
 
                        _tmp26_ = FALSE;
 
2191
                        _tmp27_ = FALSE;
2243
2192
                }
2244
 
                if (_tmp26_) {
 
2193
                if (_tmp27_) {
2245
2194
                        ValaMemberAccess* this_access;
2246
 
                        ValaDataType* _tmp27_;
2247
 
                        ValaSymbol* _tmp28_;
 
2195
                        ValaDataType* _tmp28_;
 
2196
                        ValaSymbol* _tmp29_;
2248
2197
                        ValaStruct* field_st;
2249
 
                        gboolean _tmp29_ = FALSE;
 
2198
                        gboolean _tmp30_ = FALSE;
2250
2199
                        ValaMemberAccess* ma;
2251
 
                        ValaDataType* _tmp32_;
2252
 
                        ValaCCodeExpressionStatement* _tmp34_;
2253
 
                        ValaCCodeExpression* _tmp33_;
 
2200
                        ValaDataType* _tmp33_;
 
2201
                        ValaCCodeExpressionStatement* _tmp35_;
 
2202
                        ValaCCodeExpression* _tmp34_;
2254
2203
                        this_access = vala_member_access_new_simple ("this", NULL);
2255
 
                        vala_expression_set_value_type ((ValaExpression*) this_access, _tmp27_ = vala_ccode_base_module_get_data_type_for_symbol (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) f))));
2256
 
                        _vala_code_node_unref0 (_tmp27_);
2257
 
                        field_st = _vala_code_node_ref0 ((_tmp28_ = vala_symbol_get_parent_symbol ((ValaSymbol*) f), VALA_IS_STRUCT (_tmp28_) ? ((ValaStruct*) _tmp28_) : NULL));
 
2204
                        vala_expression_set_value_type ((ValaExpression*) this_access, _tmp28_ = vala_ccode_base_module_get_data_type_for_symbol (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) f))));
 
2205
                        _vala_code_node_unref0 (_tmp28_);
 
2206
                        field_st = _vala_code_node_ref0 ((_tmp29_ = vala_symbol_get_parent_symbol ((ValaSymbol*) f), VALA_IS_STRUCT (_tmp29_) ? ((ValaStruct*) _tmp29_) : NULL));
2258
2207
                        if (field_st != NULL) {
2259
 
                                _tmp29_ = !vala_struct_is_simple_type (field_st);
 
2208
                                _tmp30_ = !vala_struct_is_simple_type (field_st);
2260
2209
                        } else {
2261
 
                                _tmp29_ = FALSE;
 
2210
                                _tmp30_ = FALSE;
2262
2211
                        }
2263
 
                        if (_tmp29_) {
2264
 
                                ValaCCodeIdentifier* _tmp30_;
2265
 
                                vala_code_node_set_ccodenode ((ValaCodeNode*) this_access, (ValaCCodeNode*) (_tmp30_ = vala_ccode_identifier_new ("(*self)")));
2266
 
                                _vala_ccode_node_unref0 (_tmp30_);
2267
 
                        } else {
 
2212
                        if (_tmp30_) {
2268
2213
                                ValaCCodeIdentifier* _tmp31_;
2269
 
                                vala_code_node_set_ccodenode ((ValaCodeNode*) this_access, (ValaCCodeNode*) (_tmp31_ = vala_ccode_identifier_new ("self")));
 
2214
                                vala_code_node_set_ccodenode ((ValaCodeNode*) this_access, (ValaCCodeNode*) (_tmp31_ = vala_ccode_identifier_new ("(*self)")));
2270
2215
                                _vala_ccode_node_unref0 (_tmp31_);
 
2216
                        } else {
 
2217
                                ValaCCodeIdentifier* _tmp32_;
 
2218
                                vala_code_node_set_ccodenode ((ValaCodeNode*) this_access, (ValaCCodeNode*) (_tmp32_ = vala_ccode_identifier_new ("self")));
 
2219
                                _vala_ccode_node_unref0 (_tmp32_);
2271
2220
                        }
2272
2221
                        ma = vala_member_access_new ((ValaExpression*) this_access, vala_symbol_get_name ((ValaSymbol*) f), NULL);
2273
2222
                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) f);
2274
 
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp32_ = vala_data_type_copy (vala_field_get_field_type (f)));
2275
 
                        _vala_code_node_unref0 (_tmp32_);
2276
 
                        vala_ccode_fragment_append (self->instance_finalize_fragment, (ValaCCodeNode*) (_tmp34_ = vala_ccode_expression_statement_new (_tmp33_ = vala_ccode_base_module_get_unref_expression (self, lhs, vala_field_get_field_type (f), (ValaExpression*) ma, FALSE))));
 
2223
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp33_ = vala_data_type_copy (vala_field_get_field_type (f)));
 
2224
                        _vala_code_node_unref0 (_tmp33_);
 
2225
                        vala_ccode_fragment_append (self->instance_finalize_fragment, (ValaCCodeNode*) (_tmp35_ = vala_ccode_expression_statement_new (_tmp34_ = vala_ccode_base_module_get_unref_expression (self, lhs, vala_field_get_field_type (f), (ValaExpression*) ma, FALSE))));
 
2226
                        _vala_ccode_node_unref0 (_tmp35_);
2277
2227
                        _vala_ccode_node_unref0 (_tmp34_);
2278
 
                        _vala_ccode_node_unref0 (_tmp33_);
2279
2228
                        _vala_code_node_unref0 (this_access);
2280
2229
                        _vala_code_node_unref0 (field_st);
2281
2230
                        _vala_code_node_unref0 (ma);
2290
2239
                                _g_free0 (field_ctype);
2291
2240
                                return;
2292
2241
                        }
 
2242
                        if (vala_symbol_get_access ((ValaSymbol*) f) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
 
2243
                                ValaCCodeIdentifier* _tmp38_;
 
2244
                                char* _tmp37_;
 
2245
                                char* _tmp36_;
 
2246
                                ValaCCodeFunctionCall* _tmp39_;
 
2247
                                ValaCCodeFunctionCall* ccall;
 
2248
                                ValaCCodeIdentifier* _tmp40_;
 
2249
                                ValaCCodeExpression* _tmp42_;
 
2250
                                char* _tmp41_;
 
2251
                                ccall = (_tmp39_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp38_ = vala_ccode_identifier_new (_tmp37_ = g_strdup_printf ("%s_GET_CLASS_PRIVATE", _tmp36_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) cl, NULL))))), _vala_ccode_node_unref0 (_tmp38_), _g_free0 (_tmp37_), _g_free0 (_tmp36_), _tmp39_);
 
2252
                                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp40_ = vala_ccode_identifier_new ("klass")));
 
2253
                                _vala_ccode_node_unref0 (_tmp40_);
 
2254
                                lhs = (_tmp42_ = (ValaCCodeExpression*) vala_ccode_member_access_new ((ValaCCodeExpression*) ccall, _tmp41_ = vala_field_get_cname (f), TRUE), _vala_ccode_node_unref0 (lhs), _tmp42_);
 
2255
                                _g_free0 (_tmp41_);
 
2256
                                _vala_ccode_node_unref0 (ccall);
 
2257
                        } else {
 
2258
                                ValaCCodeExpression* _tmp45_;
 
2259
                                char* _tmp44_;
 
2260
                                ValaCCodeIdentifier* _tmp43_;
 
2261
                                lhs = (_tmp45_ = (ValaCCodeExpression*) vala_ccode_member_access_new ((ValaCCodeExpression*) (_tmp43_ = vala_ccode_identifier_new ("klass")), _tmp44_ = vala_field_get_cname (f), TRUE), _vala_ccode_node_unref0 (lhs), _tmp45_);
 
2262
                                _g_free0 (_tmp44_);
 
2263
                                _vala_ccode_node_unref0 (_tmp43_);
 
2264
                        }
 
2265
                        if (vala_field_get_initializer (f) != NULL) {
 
2266
                                ValaCCodeExpression* rhs;
 
2267
                                ValaCCodeExpressionStatement* _tmp47_;
 
2268
                                ValaCCodeAssignment* _tmp46_;
 
2269
                                rhs = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_field_get_initializer (f))));
 
2270
                                vala_ccode_fragment_append (self->class_init_fragment, (ValaCCodeNode*) (_tmp47_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp46_ = vala_ccode_assignment_new (lhs, rhs, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
2271
                                _vala_ccode_node_unref0 (_tmp47_);
 
2272
                                _vala_ccode_node_unref0 (_tmp46_);
 
2273
                                vala_ccode_base_module_append_temp_decl (self, self->class_init_fragment, (ValaList*) self->temp_vars);
 
2274
                                {
 
2275
                                        ValaIterator* _local_it;
 
2276
                                        _local_it = vala_iterable_iterator ((ValaIterable*) self->temp_ref_vars);
 
2277
                                        while (TRUE) {
 
2278
                                                ValaLocalVariable* local;
 
2279
                                                ValaMemberAccess* ma;
 
2280
                                                ValaDataType* _tmp48_;
 
2281
                                                ValaCCodeExpressionStatement* _tmp51_;
 
2282
                                                ValaCCodeExpression* _tmp50_;
 
2283
                                                ValaCCodeExpression* _tmp49_;
 
2284
                                                if (!vala_iterator_next (_local_it)) {
 
2285
                                                        break;
 
2286
                                                }
 
2287
                                                local = (ValaLocalVariable*) vala_iterator_get (_local_it);
 
2288
                                                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
 
2289
                                                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
 
2290
                                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp48_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
2291
                                                _vala_code_node_unref0 (_tmp48_);
 
2292
                                                vala_ccode_fragment_append (self->class_init_fragment, (ValaCCodeNode*) (_tmp51_ = vala_ccode_expression_statement_new (_tmp50_ = vala_ccode_base_module_get_unref_expression (self, _tmp49_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
2293
                                                _vala_ccode_node_unref0 (_tmp51_);
 
2294
                                                _vala_ccode_node_unref0 (_tmp50_);
 
2295
                                                _vala_ccode_node_unref0 (_tmp49_);
 
2296
                                                _vala_code_node_unref0 (local);
 
2297
                                                _vala_code_node_unref0 (ma);
 
2298
                                        }
 
2299
                                        _vala_collection_object_unref0 (_local_it);
 
2300
                                }
 
2301
                                vala_collection_clear ((ValaCollection*) self->temp_vars);
 
2302
                                vala_collection_clear ((ValaCollection*) self->temp_ref_vars);
 
2303
                                _vala_ccode_node_unref0 (rhs);
 
2304
                        }
2293
2305
                } else {
2294
 
                        ValaCCodeExpression* _tmp36_;
2295
 
                        char* _tmp35_;
2296
 
                        char* _tmp37_;
2297
 
                        ValaCCodeVariableDeclarator* _tmp38_;
 
2306
                        ValaCCodeExpression* _tmp53_;
 
2307
                        char* _tmp52_;
 
2308
                        char* _tmp55_;
 
2309
                        char* _tmp54_;
 
2310
                        ValaCCodeVariableDeclarator* _tmp56_;
2298
2311
                        ValaCCodeVariableDeclarator* var_decl;
2299
 
                        ValaCCodeExpression* _tmp39_;
 
2312
                        ValaCCodeExpression* _tmp57_;
2300
2313
                        ValaCCodeDeclaration* var_def;
2301
 
                        gboolean _tmp40_ = FALSE;
 
2314
                        gboolean _tmp58_ = FALSE;
2302
2315
                        vala_ccode_base_module_generate_field_declaration (self, f, self->source_declarations);
2303
2316
                        if (!vala_symbol_is_internal_symbol ((ValaSymbol*) f)) {
2304
2317
                                vala_ccode_base_module_generate_field_declaration (self, f, self->header_declarations);
2306
2319
                        if (!vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
2307
2320
                                vala_ccode_base_module_generate_field_declaration (self, f, self->internal_header_declarations);
2308
2321
                        }
2309
 
                        lhs = (_tmp36_ = (ValaCCodeExpression*) vala_ccode_identifier_new (_tmp35_ = vala_field_get_cname (f)), _vala_ccode_node_unref0 (lhs), _tmp36_);
2310
 
                        _g_free0 (_tmp35_);
2311
 
                        var_decl = (_tmp38_ = vala_ccode_variable_declarator_new (_tmp37_ = vala_field_get_cname (f), NULL, NULL), _g_free0 (_tmp37_), _tmp38_);
2312
 
                        vala_ccode_variable_declarator_set_initializer (var_decl, _tmp39_ = vala_ccode_base_module_default_value_for_type (self, vala_field_get_field_type (f), TRUE));
2313
 
                        _vala_ccode_node_unref0 (_tmp39_);
 
2322
                        lhs = (_tmp53_ = (ValaCCodeExpression*) vala_ccode_identifier_new (_tmp52_ = vala_field_get_cname (f)), _vala_ccode_node_unref0 (lhs), _tmp53_);
 
2323
                        _g_free0 (_tmp52_);
 
2324
                        var_decl = (_tmp56_ = vala_ccode_variable_declarator_new (_tmp54_ = vala_field_get_cname (f), NULL, _tmp55_ = vala_data_type_get_cdeclarator_suffix (vala_field_get_field_type (f))), _g_free0 (_tmp55_), _g_free0 (_tmp54_), _tmp56_);
 
2325
                        vala_ccode_variable_declarator_set_initializer (var_decl, _tmp57_ = vala_ccode_base_module_default_value_for_type (self, vala_field_get_field_type (f), TRUE));
 
2326
                        _vala_ccode_node_unref0 (_tmp57_);
2314
2327
                        if (vala_field_get_initializer (f) != NULL) {
2315
2328
                                ValaCCodeExpression* init;
2316
2329
                                init = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_field_get_initializer (f))));
2328
2341
                        }
2329
2342
                        vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) var_def);
2330
2343
                        if (VALA_IS_ARRAY_TYPE (vala_field_get_field_type (f))) {
2331
 
                                _tmp40_ = !vala_field_get_no_array_length (f);
 
2344
                                _tmp58_ = !vala_field_get_no_array_length (f);
2332
2345
                        } else {
2333
 
                                _tmp40_ = FALSE;
 
2346
                                _tmp58_ = FALSE;
2334
2347
                        }
2335
 
                        if (_tmp40_) {
 
2348
                        if (_tmp58_) {
2336
2349
                                ValaArrayType* array_type;
2337
 
                                gboolean _tmp48_ = FALSE;
2338
2350
                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
2339
 
                                {
2340
 
                                        gint dim;
2341
 
                                        dim = 1;
 
2351
                                if (!vala_array_type_get_fixed_length (array_type)) {
 
2352
                                        gboolean _tmp66_ = FALSE;
2342
2353
                                        {
2343
 
                                                gboolean _tmp41_;
2344
 
                                                _tmp41_ = TRUE;
2345
 
                                                while (TRUE) {
2346
 
                                                        ValaDataType* len_type;
2347
 
                                                        char* _tmp42_;
2348
 
                                                        ValaCCodeDeclaration* _tmp43_;
2349
 
                                                        ValaCCodeDeclaration* len_def;
2350
 
                                                        ValaCCodeVariableDeclarator* _tmp47_;
2351
 
                                                        ValaCCodeConstant* _tmp46_;
2352
 
                                                        char* _tmp45_;
2353
 
                                                        char* _tmp44_;
2354
 
                                                        if (!_tmp41_) {
2355
 
                                                                dim++;
2356
 
                                                        }
2357
 
                                                        _tmp41_ = FALSE;
2358
 
                                                        if (!(dim <= vala_array_type_get_rank (array_type))) {
2359
 
                                                                break;
2360
 
                                                        }
2361
 
                                                        len_type = vala_data_type_copy (self->int_type);
2362
 
                                                        len_def = (_tmp43_ = vala_ccode_declaration_new (_tmp42_ = vala_data_type_get_cname (len_type)), _g_free0 (_tmp42_), _tmp43_);
2363
 
                                                        vala_ccode_declaration_add_declarator (len_def, (ValaCCodeDeclarator*) (_tmp47_ = vala_ccode_variable_declarator_new (_tmp45_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp44_ = vala_field_get_cname (f), dim), (ValaCCodeExpression*) (_tmp46_ = vala_ccode_constant_new ("0")), NULL)));
2364
 
                                                        _vala_ccode_node_unref0 (_tmp47_);
2365
 
                                                        _vala_ccode_node_unref0 (_tmp46_);
2366
 
                                                        _g_free0 (_tmp45_);
2367
 
                                                        _g_free0 (_tmp44_);
2368
 
                                                        if (!vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
2369
 
                                                                vala_ccode_declaration_set_modifiers (len_def, VALA_CCODE_MODIFIERS_EXTERN);
2370
 
                                                        } else {
2371
 
                                                                vala_ccode_declaration_set_modifiers (len_def, VALA_CCODE_MODIFIERS_STATIC);
2372
 
                                                        }
2373
 
                                                        vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) len_def);
2374
 
                                                        _vala_code_node_unref0 (len_type);
2375
 
                                                        _vala_ccode_node_unref0 (len_def);
 
2354
                                                gint dim;
 
2355
                                                dim = 1;
 
2356
                                                {
 
2357
                                                        gboolean _tmp59_;
 
2358
                                                        _tmp59_ = TRUE;
 
2359
                                                        while (TRUE) {
 
2360
                                                                ValaDataType* len_type;
 
2361
                                                                char* _tmp60_;
 
2362
                                                                ValaCCodeDeclaration* _tmp61_;
 
2363
                                                                ValaCCodeDeclaration* len_def;
 
2364
                                                                ValaCCodeVariableDeclarator* _tmp65_;
 
2365
                                                                ValaCCodeConstant* _tmp64_;
 
2366
                                                                char* _tmp63_;
 
2367
                                                                char* _tmp62_;
 
2368
                                                                if (!_tmp59_) {
 
2369
                                                                        dim++;
 
2370
                                                                }
 
2371
                                                                _tmp59_ = FALSE;
 
2372
                                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
 
2373
                                                                        break;
 
2374
                                                                }
 
2375
                                                                len_type = vala_data_type_copy (self->int_type);
 
2376
                                                                len_def = (_tmp61_ = vala_ccode_declaration_new (_tmp60_ = vala_data_type_get_cname (len_type)), _g_free0 (_tmp60_), _tmp61_);
 
2377
                                                                vala_ccode_declaration_add_declarator (len_def, (ValaCCodeDeclarator*) (_tmp65_ = vala_ccode_variable_declarator_new (_tmp63_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp62_ = vala_field_get_cname (f), dim), (ValaCCodeExpression*) (_tmp64_ = vala_ccode_constant_new ("0")), NULL)));
 
2378
                                                                _vala_ccode_node_unref0 (_tmp65_);
 
2379
                                                                _vala_ccode_node_unref0 (_tmp64_);
 
2380
                                                                _g_free0 (_tmp63_);
 
2381
                                                                _g_free0 (_tmp62_);
 
2382
                                                                if (!vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
 
2383
                                                                        vala_ccode_declaration_set_modifiers (len_def, VALA_CCODE_MODIFIERS_EXTERN);
 
2384
                                                                } else {
 
2385
                                                                        vala_ccode_declaration_set_modifiers (len_def, VALA_CCODE_MODIFIERS_STATIC);
 
2386
                                                                }
 
2387
                                                                vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) len_def);
 
2388
                                                                _vala_code_node_unref0 (len_type);
 
2389
                                                                _vala_ccode_node_unref0 (len_def);
 
2390
                                                        }
2376
2391
                                                }
2377
2392
                                        }
2378
 
                                }
2379
 
                                if (vala_array_type_get_rank (array_type) == 1) {
2380
 
                                        _tmp48_ = vala_symbol_is_internal_symbol ((ValaSymbol*) f);
2381
 
                                } else {
2382
 
                                        _tmp48_ = FALSE;
2383
 
                                }
2384
 
                                if (_tmp48_) {
2385
 
                                        ValaDataType* len_type;
2386
 
                                        char* _tmp49_;
2387
 
                                        ValaCCodeDeclaration* _tmp50_;
2388
 
                                        ValaCCodeDeclaration* _cdecl_;
2389
 
                                        ValaCCodeVariableDeclarator* _tmp54_;
2390
 
                                        ValaCCodeConstant* _tmp53_;
2391
 
                                        char* _tmp52_;
2392
 
                                        char* _tmp51_;
2393
 
                                        len_type = vala_data_type_copy (self->int_type);
2394
 
                                        _cdecl_ = (_tmp50_ = vala_ccode_declaration_new (_tmp49_ = vala_data_type_get_cname (len_type)), _g_free0 (_tmp49_), _tmp50_);
2395
 
                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp54_ = vala_ccode_variable_declarator_new (_tmp52_ = vala_ccode_module_get_array_size_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp51_ = vala_field_get_cname (f)), (ValaCCodeExpression*) (_tmp53_ = vala_ccode_constant_new ("0")), NULL)));
2396
 
                                        _vala_ccode_node_unref0 (_tmp54_);
2397
 
                                        _vala_ccode_node_unref0 (_tmp53_);
2398
 
                                        _g_free0 (_tmp52_);
2399
 
                                        _g_free0 (_tmp51_);
2400
 
                                        vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
2401
 
                                        vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) _cdecl_);
2402
 
                                        _vala_code_node_unref0 (len_type);
2403
 
                                        _vala_ccode_node_unref0 (_cdecl_);
 
2393
                                        if (vala_array_type_get_rank (array_type) == 1) {
 
2394
                                                _tmp66_ = vala_symbol_is_internal_symbol ((ValaSymbol*) f);
 
2395
                                        } else {
 
2396
                                                _tmp66_ = FALSE;
 
2397
                                        }
 
2398
                                        if (_tmp66_) {
 
2399
                                                ValaDataType* len_type;
 
2400
                                                char* _tmp67_;
 
2401
                                                ValaCCodeDeclaration* _tmp68_;
 
2402
                                                ValaCCodeDeclaration* _cdecl_;
 
2403
                                                ValaCCodeVariableDeclarator* _tmp72_;
 
2404
                                                ValaCCodeConstant* _tmp71_;
 
2405
                                                char* _tmp70_;
 
2406
                                                char* _tmp69_;
 
2407
                                                len_type = vala_data_type_copy (self->int_type);
 
2408
                                                _cdecl_ = (_tmp68_ = vala_ccode_declaration_new (_tmp67_ = vala_data_type_get_cname (len_type)), _g_free0 (_tmp67_), _tmp68_);
 
2409
                                                vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp72_ = vala_ccode_variable_declarator_new (_tmp70_ = vala_ccode_module_get_array_size_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp69_ = vala_field_get_cname (f)), (ValaCCodeExpression*) (_tmp71_ = vala_ccode_constant_new ("0")), NULL)));
 
2410
                                                _vala_ccode_node_unref0 (_tmp72_);
 
2411
                                                _vala_ccode_node_unref0 (_tmp71_);
 
2412
                                                _g_free0 (_tmp70_);
 
2413
                                                _g_free0 (_tmp69_);
 
2414
                                                vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
 
2415
                                                vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) _cdecl_);
 
2416
                                                _vala_code_node_unref0 (len_type);
 
2417
                                                _vala_ccode_node_unref0 (_cdecl_);
 
2418
                                        }
2404
2419
                                }
2405
2420
                                _vala_code_node_unref0 (array_type);
2406
2421
                        } else {
2409
2424
                                        delegate_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_field_get_field_type (f)));
2410
2425
                                        if (vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (delegate_type))) {
2411
2426
                                                ValaCCodeDeclaration* target_def;
2412
 
                                                ValaCCodeVariableDeclarator* _tmp58_;
2413
 
                                                ValaCCodeConstant* _tmp57_;
2414
 
                                                char* _tmp56_;
2415
 
                                                char* _tmp55_;
 
2427
                                                ValaCCodeVariableDeclarator* _tmp76_;
 
2428
                                                ValaCCodeConstant* _tmp75_;
 
2429
                                                char* _tmp74_;
 
2430
                                                char* _tmp73_;
2416
2431
                                                target_def = vala_ccode_declaration_new ("gpointer");
2417
 
                                                vala_ccode_declaration_add_declarator (target_def, (ValaCCodeDeclarator*) (_tmp58_ = vala_ccode_variable_declarator_new (_tmp56_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp55_ = vala_field_get_cname (f)), (ValaCCodeExpression*) (_tmp57_ = vala_ccode_constant_new ("NULL")), NULL)));
2418
 
                                                _vala_ccode_node_unref0 (_tmp58_);
2419
 
                                                _vala_ccode_node_unref0 (_tmp57_);
2420
 
                                                _g_free0 (_tmp56_);
2421
 
                                                _g_free0 (_tmp55_);
 
2432
                                                vala_ccode_declaration_add_declarator (target_def, (ValaCCodeDeclarator*) (_tmp76_ = vala_ccode_variable_declarator_new (_tmp74_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp73_ = vala_field_get_cname (f)), (ValaCCodeExpression*) (_tmp75_ = vala_ccode_constant_new ("NULL")), NULL)));
 
2433
                                                _vala_ccode_node_unref0 (_tmp76_);
 
2434
                                                _vala_ccode_node_unref0 (_tmp75_);
 
2435
                                                _g_free0 (_tmp74_);
 
2436
                                                _g_free0 (_tmp73_);
2422
2437
                                                if (!vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
2423
2438
                                                        vala_ccode_declaration_set_modifiers (target_def, VALA_CCODE_MODIFIERS_EXTERN);
2424
2439
                                                } else {
2427
2442
                                                vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) target_def);
2428
2443
                                                if (vala_data_type_get_value_owned ((ValaDataType*) delegate_type)) {
2429
2444
                                                        ValaCCodeDeclaration* target_destroy_notify_def;
2430
 
                                                        ValaCCodeVariableDeclarator* _tmp62_;
2431
 
                                                        ValaCCodeConstant* _tmp61_;
2432
 
                                                        char* _tmp60_;
2433
 
                                                        char* _tmp59_;
 
2445
                                                        ValaCCodeVariableDeclarator* _tmp80_;
 
2446
                                                        ValaCCodeConstant* _tmp79_;
 
2447
                                                        char* _tmp78_;
 
2448
                                                        char* _tmp77_;
2434
2449
                                                        target_destroy_notify_def = vala_ccode_declaration_new ("GDestroyNotify");
2435
 
                                                        vala_ccode_declaration_add_declarator (target_destroy_notify_def, (ValaCCodeDeclarator*) (_tmp62_ = vala_ccode_variable_declarator_new (_tmp60_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp59_ = vala_field_get_cname (f)), (ValaCCodeExpression*) (_tmp61_ = vala_ccode_constant_new ("NULL")), NULL)));
2436
 
                                                        _vala_ccode_node_unref0 (_tmp62_);
2437
 
                                                        _vala_ccode_node_unref0 (_tmp61_);
2438
 
                                                        _g_free0 (_tmp60_);
2439
 
                                                        _g_free0 (_tmp59_);
 
2450
                                                        vala_ccode_declaration_add_declarator (target_destroy_notify_def, (ValaCCodeDeclarator*) (_tmp80_ = vala_ccode_variable_declarator_new (_tmp78_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp77_ = vala_field_get_cname (f)), (ValaCCodeExpression*) (_tmp79_ = vala_ccode_constant_new ("NULL")), NULL)));
 
2451
                                                        _vala_ccode_node_unref0 (_tmp80_);
 
2452
                                                        _vala_ccode_node_unref0 (_tmp79_);
 
2453
                                                        _g_free0 (_tmp78_);
 
2454
                                                        _g_free0 (_tmp77_);
2440
2455
                                                        if (!vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
2441
2456
                                                                vala_ccode_declaration_set_modifiers (target_destroy_notify_def, VALA_CCODE_MODIFIERS_EXTERN);
2442
2457
                                                        } else {
2455
2470
                                rhs = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_field_get_initializer (f))));
2456
2471
                                if (!vala_ccode_base_module_is_constant_ccode_expression (self, rhs)) {
2457
2472
                                        if (VALA_IS_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) f))) {
2458
 
                                                gboolean _tmp71_ = FALSE;
2459
 
                                                gboolean _tmp72_ = FALSE;
 
2473
                                                gboolean _tmp89_ = FALSE;
 
2474
                                                gboolean _tmp90_ = FALSE;
2460
2475
                                                if (VALA_IS_INITIALIZER_LIST (vala_field_get_initializer (f))) {
2461
2476
                                                        ValaCCodeBlock* block;
2462
2477
                                                        ValaCCodeFragment* frag;
2463
2478
                                                        ValaLocalVariable* temp_decl;
2464
 
                                                        char* _tmp63_;
2465
 
                                                        ValaCCodeDeclaration* _tmp64_;
 
2479
                                                        char* _tmp81_;
 
2480
                                                        ValaCCodeDeclaration* _tmp82_;
2466
2481
                                                        ValaCCodeDeclaration* _cdecl_;
2467
2482
                                                        ValaCCodeVariableDeclarator* vardecl;
2468
 
                                                        char* _tmp65_;
2469
 
                                                        ValaCCodeExpression* _tmp66_;
 
2483
                                                        char* _tmp83_;
 
2484
                                                        ValaCCodeExpression* _tmp84_;
2470
2485
                                                        ValaCCodeExpression* tmp;
2471
 
                                                        ValaCCodeExpressionStatement* _tmp68_;
2472
 
                                                        ValaCCodeAssignment* _tmp67_;
 
2486
                                                        ValaCCodeExpressionStatement* _tmp86_;
 
2487
                                                        ValaCCodeAssignment* _tmp85_;
2473
2488
                                                        block = vala_ccode_block_new ();
2474
2489
                                                        frag = vala_ccode_fragment_new ();
2475
2490
                                                        temp_decl = vala_ccode_base_module_get_temp_variable (self, vala_field_get_field_type (f), TRUE, NULL, TRUE);
2476
 
                                                        _cdecl_ = (_tmp64_ = vala_ccode_declaration_new (_tmp63_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (temp_decl))), _g_free0 (_tmp63_), _tmp64_);
 
2491
                                                        _cdecl_ = (_tmp82_ = vala_ccode_declaration_new (_tmp81_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (temp_decl))), _g_free0 (_tmp81_), _tmp82_);
2477
2492
                                                        vardecl = vala_ccode_variable_declarator_new (vala_symbol_get_name ((ValaSymbol*) temp_decl), rhs, NULL);
2478
2493
                                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) vardecl);
2479
2494
                                                        vala_ccode_variable_declarator_set_init0 (vardecl, TRUE);
2480
2495
                                                        vala_ccode_fragment_append (frag, (ValaCCodeNode*) _cdecl_);
2481
 
                                                        tmp = (_tmp66_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp65_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) temp_decl))), _g_free0 (_tmp65_), _tmp66_);
2482
 
                                                        vala_ccode_fragment_append (frag, (ValaCCodeNode*) (_tmp68_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp67_ = vala_ccode_assignment_new (lhs, tmp, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
2483
 
                                                        _vala_ccode_node_unref0 (_tmp68_);
2484
 
                                                        _vala_ccode_node_unref0 (_tmp67_);
 
2496
                                                        tmp = (_tmp84_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp83_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) temp_decl))), _g_free0 (_tmp83_), _tmp84_);
 
2497
                                                        vala_ccode_fragment_append (frag, (ValaCCodeNode*) (_tmp86_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp85_ = vala_ccode_assignment_new (lhs, tmp, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
2498
                                                        _vala_ccode_node_unref0 (_tmp86_);
 
2499
                                                        _vala_ccode_node_unref0 (_tmp85_);
2485
2500
                                                        vala_ccode_block_add_statement (block, (ValaCCodeNode*) frag);
2486
2501
                                                        vala_ccode_fragment_append (self->class_init_fragment, (ValaCCodeNode*) block);
2487
2502
                                                        _vala_ccode_node_unref0 (block);
2491
2506
                                                        _vala_ccode_node_unref0 (vardecl);
2492
2507
                                                        _vala_ccode_node_unref0 (tmp);
2493
2508
                                                } else {
2494
 
                                                        ValaCCodeExpressionStatement* _tmp70_;
2495
 
                                                        ValaCCodeAssignment* _tmp69_;
2496
 
                                                        vala_ccode_fragment_append (self->class_init_fragment, (ValaCCodeNode*) (_tmp70_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp69_ = vala_ccode_assignment_new (lhs, rhs, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
2497
 
                                                        _vala_ccode_node_unref0 (_tmp70_);
2498
 
                                                        _vala_ccode_node_unref0 (_tmp69_);
 
2509
                                                        ValaCCodeExpressionStatement* _tmp88_;
 
2510
                                                        ValaCCodeAssignment* _tmp87_;
 
2511
                                                        vala_ccode_fragment_append (self->class_init_fragment, (ValaCCodeNode*) (_tmp88_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp87_ = vala_ccode_assignment_new (lhs, rhs, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
2512
                                                        _vala_ccode_node_unref0 (_tmp88_);
 
2513
                                                        _vala_ccode_node_unref0 (_tmp87_);
2499
2514
                                                }
2500
2515
                                                if (VALA_IS_ARRAY_TYPE (vala_field_get_field_type (f))) {
2501
 
                                                        _tmp72_ = !vala_field_get_no_array_length (f);
2502
 
                                                } else {
2503
 
                                                        _tmp72_ = FALSE;
2504
 
                                                }
2505
 
                                                if (_tmp72_) {
2506
 
                                                        _tmp71_ = VALA_IS_ARRAY_CREATION_EXPRESSION (vala_field_get_initializer (f));
2507
 
                                                } else {
2508
 
                                                        _tmp71_ = FALSE;
2509
 
                                                }
2510
 
                                                if (_tmp71_) {
 
2516
                                                        _tmp90_ = !vala_field_get_no_array_length (f);
 
2517
                                                } else {
 
2518
                                                        _tmp90_ = FALSE;
 
2519
                                                }
 
2520
                                                if (_tmp90_) {
 
2521
                                                        _tmp89_ = VALA_IS_ARRAY_CREATION_EXPRESSION (vala_field_get_initializer (f));
 
2522
                                                } else {
 
2523
                                                        _tmp89_ = FALSE;
 
2524
                                                }
 
2525
                                                if (_tmp89_) {
2511
2526
                                                        ValaArrayType* array_type;
2512
2527
                                                        ValaMemberAccess* ma;
2513
2528
                                                        ValaList* sizes;
2519
2534
                                                                gint dim;
2520
2535
                                                                dim = 1;
2521
2536
                                                                {
2522
 
                                                                        gboolean _tmp73_;
2523
 
                                                                        _tmp73_ = TRUE;
 
2537
                                                                        gboolean _tmp91_;
 
2538
                                                                        _tmp91_ = TRUE;
2524
2539
                                                                        while (TRUE) {
2525
2540
                                                                                ValaCCodeExpression* array_len_lhs;
2526
2541
                                                                                ValaExpression* size;
2527
 
                                                                                ValaCCodeExpressionStatement* _tmp75_;
2528
 
                                                                                ValaCCodeAssignment* _tmp74_;
2529
 
                                                                                if (!_tmp73_) {
 
2542
                                                                                ValaCCodeExpressionStatement* _tmp93_;
 
2543
                                                                                ValaCCodeAssignment* _tmp92_;
 
2544
                                                                                if (!_tmp91_) {
2530
2545
                                                                                        dim++;
2531
2546
                                                                                }
2532
 
                                                                                _tmp73_ = FALSE;
 
2547
                                                                                _tmp91_ = FALSE;
2533
2548
                                                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
2534
2549
                                                                                        break;
2535
2550
                                                                                }
2536
2551
                                                                                array_len_lhs = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), (ValaExpression*) ma, dim);
2537
2552
                                                                                size = (ValaExpression*) vala_list_get (sizes, dim - 1);
2538
 
                                                                                vala_ccode_fragment_append (self->class_init_fragment, (ValaCCodeNode*) (_tmp75_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp74_ = vala_ccode_assignment_new (array_len_lhs, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) size)), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
2539
 
                                                                                _vala_ccode_node_unref0 (_tmp75_);
2540
 
                                                                                _vala_ccode_node_unref0 (_tmp74_);
 
2553
                                                                                vala_ccode_fragment_append (self->class_init_fragment, (ValaCCodeNode*) (_tmp93_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp92_ = vala_ccode_assignment_new (array_len_lhs, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) size)), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
2554
                                                                                _vala_ccode_node_unref0 (_tmp93_);
 
2555
                                                                                _vala_ccode_node_unref0 (_tmp92_);
2541
2556
                                                                                _vala_ccode_node_unref0 (array_len_lhs);
2542
2557
                                                                                _vala_code_node_unref0 (size);
2543
2558
                                                                        }
2574
2589
 
2575
2590
 
2576
2591
gboolean vala_ccode_base_module_is_constant_ccode_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr) {
2577
 
        gboolean result;
 
2592
        gboolean result = FALSE;
2578
2593
        ValaCCodeExpression* _tmp1_;
2579
2594
        ValaCCodeParenthesizedExpression* cparenthesized;
2580
2595
        gboolean _tmp2_ = FALSE;
2619
2634
 
2620
2635
 
2621
2636
gboolean vala_ccode_base_module_is_pure_ccode_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr) {
2622
 
        gboolean result;
 
2637
        gboolean result = FALSE;
2623
2638
        gboolean _tmp0_ = FALSE;
2624
2639
        g_return_val_if_fail (self != NULL, FALSE);
2625
2640
        g_return_val_if_fail (cexpr != NULL, FALSE);
2716
2731
        ValaCCodeBaseModule * self;
2717
2732
        self = (ValaCCodeBaseModule*) base;
2718
2733
        g_return_if_fail (p != NULL);
2719
 
        vala_ccode_base_module_check_type (self, vala_formal_parameter_get_parameter_type (p));
 
2734
        if (!vala_formal_parameter_get_ellipsis (p)) {
 
2735
                vala_ccode_base_module_check_type (self, vala_formal_parameter_get_parameter_type (p));
 
2736
        }
2720
2737
}
2721
2738
 
2722
2739
 
3101
3118
        gboolean returns_real_struct;
3102
3119
        ValaTypeSymbol* t;
3103
3120
        gboolean _tmp2_ = FALSE;
3104
 
        gboolean _tmp3_ = FALSE;
3105
3121
        gboolean _tmp4_ = FALSE;
 
3122
        gboolean _tmp5_ = FALSE;
3106
3123
        ValaDataType* this_type;
3107
 
        char* _tmp10_;
3108
 
        ValaCCodeFormalParameter* _tmp11_;
 
3124
        char* _tmp11_;
 
3125
        ValaCCodeFormalParameter* _tmp12_;
3109
3126
        ValaCCodeFormalParameter* cselfparam;
3110
3127
        ValaCCodeFormalParameter* cvalueparam;
3111
 
        gboolean _tmp22_ = FALSE;
3112
 
        ValaSymbol* _tmp128_;
 
3128
        gboolean _tmp23_ = FALSE;
 
3129
        ValaSymbol* _tmp129_;
3113
3130
        self = (ValaCCodeBaseModule*) base;
3114
3131
        g_return_if_fail (acc != NULL);
3115
3132
        old_symbol = _vala_code_node_ref0 (self->current_symbol);
3137
3154
                _vala_code_node_unref0 (prop);
3138
3155
                _vala_code_node_unref0 (t);
3139
3156
                return;
 
3157
        } else {
 
3158
                gboolean _tmp3_ = FALSE;
 
3159
                if (vala_property_accessor_get_construction (acc)) {
 
3160
                        _tmp3_ = !vala_ccode_base_module_is_gobject_property (self, prop);
 
3161
                } else {
 
3162
                        _tmp3_ = FALSE;
 
3163
                }
 
3164
                if (_tmp3_) {
 
3165
                        vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) acc), "construct properties not supported for specified property type");
 
3166
                        vala_code_node_set_error ((ValaCodeNode*) acc, TRUE);
 
3167
                        _vala_code_node_unref0 (old_symbol);
 
3168
                        _vala_code_node_unref0 (prop);
 
3169
                        _vala_code_node_unref0 (t);
 
3170
                        return;
 
3171
                }
3140
3172
        }
3141
3173
        if (vala_property_get_is_abstract (prop)) {
 
3174
                _tmp5_ = TRUE;
 
3175
        } else {
 
3176
                _tmp5_ = vala_property_get_is_virtual (prop);
 
3177
        }
 
3178
        if (_tmp5_) {
3142
3179
                _tmp4_ = TRUE;
3143
3180
        } else {
3144
 
                _tmp4_ = vala_property_get_is_virtual (prop);
3145
 
        }
3146
 
        if (_tmp4_) {
3147
 
                _tmp3_ = TRUE;
3148
 
        } else {
3149
 
                gboolean _tmp5_ = FALSE;
 
3181
                gboolean _tmp6_ = FALSE;
3150
3182
                if (vala_property_get_base_property (prop) == NULL) {
3151
 
                        _tmp5_ = vala_property_get_base_interface_property (prop) == NULL;
 
3183
                        _tmp6_ = vala_property_get_base_interface_property (prop) == NULL;
3152
3184
                } else {
3153
 
                        _tmp5_ = FALSE;
 
3185
                        _tmp6_ = FALSE;
3154
3186
                }
3155
 
                _tmp3_ = _tmp5_;
 
3187
                _tmp4_ = _tmp6_;
3156
3188
        }
3157
 
        if (_tmp3_) {
3158
 
                gboolean _tmp6_ = FALSE;
 
3189
        if (_tmp4_) {
 
3190
                gboolean _tmp7_ = FALSE;
3159
3191
                vala_ccode_base_module_generate_property_accessor_declaration (self, acc, self->source_declarations);
3160
3192
                if (vala_property_accessor_get_readable (acc)) {
3161
 
                        _tmp6_ = TRUE;
 
3193
                        _tmp7_ = TRUE;
3162
3194
                } else {
3163
 
                        _tmp6_ = vala_property_accessor_get_writable (acc);
 
3195
                        _tmp7_ = vala_property_accessor_get_writable (acc);
3164
3196
                }
3165
 
                if (_tmp6_) {
3166
 
                        gboolean _tmp7_ = FALSE;
3167
 
                        gboolean _tmp9_ = FALSE;
 
3197
                if (_tmp7_) {
 
3198
                        gboolean _tmp8_ = FALSE;
 
3199
                        gboolean _tmp10_ = FALSE;
3168
3200
                        if (!vala_symbol_is_internal_symbol ((ValaSymbol*) prop)) {
3169
 
                                gboolean _tmp8_ = FALSE;
 
3201
                                gboolean _tmp9_ = FALSE;
3170
3202
                                if (vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PUBLIC) {
3171
 
                                        _tmp8_ = TRUE;
 
3203
                                        _tmp9_ = TRUE;
3172
3204
                                } else {
3173
 
                                        _tmp8_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PROTECTED;
 
3205
                                        _tmp9_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PROTECTED;
3174
3206
                                }
3175
 
                                _tmp7_ = _tmp8_;
 
3207
                                _tmp8_ = _tmp9_;
3176
3208
                        } else {
3177
 
                                _tmp7_ = FALSE;
 
3209
                                _tmp8_ = FALSE;
3178
3210
                        }
3179
 
                        if (_tmp7_) {
 
3211
                        if (_tmp8_) {
3180
3212
                                vala_ccode_base_module_generate_property_accessor_declaration (self, acc, self->header_declarations);
3181
3213
                        }
3182
3214
                        if (!vala_symbol_is_private_symbol ((ValaSymbol*) prop)) {
3183
 
                                _tmp9_ = vala_symbol_get_access ((ValaSymbol*) acc) != VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
 
3215
                                _tmp10_ = vala_symbol_get_access ((ValaSymbol*) acc) != VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3184
3216
                        } else {
3185
 
                                _tmp9_ = FALSE;
 
3217
                                _tmp10_ = FALSE;
3186
3218
                        }
3187
 
                        if (_tmp9_) {
 
3219
                        if (_tmp10_) {
3188
3220
                                vala_ccode_base_module_generate_property_accessor_declaration (self, acc, self->internal_header_declarations);
3189
3221
                        }
3190
3222
                }
3191
3223
        }
3192
3224
        this_type = vala_ccode_base_module_get_data_type_for_symbol (t);
3193
 
        cselfparam = (_tmp11_ = vala_ccode_formal_parameter_new ("self", _tmp10_ = vala_data_type_get_cname (this_type)), _g_free0 (_tmp10_), _tmp11_);
 
3225
        cselfparam = (_tmp12_ = vala_ccode_formal_parameter_new ("self", _tmp11_ = vala_data_type_get_cname (this_type)), _g_free0 (_tmp11_), _tmp12_);
3194
3226
        if (VALA_IS_STRUCT (t)) {
3195
 
                char* _tmp12_;
3196
 
                vala_ccode_formal_parameter_set_type_name (cselfparam, _tmp12_ = g_strconcat (vala_ccode_formal_parameter_get_type_name (cselfparam), "*", NULL));
3197
 
                _g_free0 (_tmp12_);
 
3227
                char* _tmp13_;
 
3228
                vala_ccode_formal_parameter_set_type_name (cselfparam, _tmp13_ = g_strconcat (vala_ccode_formal_parameter_get_type_name (cselfparam), "*", NULL));
 
3229
                _g_free0 (_tmp13_);
3198
3230
        }
3199
3231
        cvalueparam = NULL;
3200
3232
        if (returns_real_struct) {
3201
 
                ValaCCodeFormalParameter* _tmp15_;
 
3233
                ValaCCodeFormalParameter* _tmp16_;
 
3234
                char* _tmp15_;
3202
3235
                char* _tmp14_;
3203
 
                char* _tmp13_;
3204
 
                cvalueparam = (_tmp15_ = vala_ccode_formal_parameter_new ("result", _tmp14_ = g_strconcat (_tmp13_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc)), "*", NULL)), _vala_ccode_node_unref0 (cvalueparam), _tmp15_);
 
3236
                cvalueparam = (_tmp16_ = vala_ccode_formal_parameter_new ("result", _tmp15_ = g_strconcat (_tmp14_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc)), "*", NULL)), _vala_ccode_node_unref0 (cvalueparam), _tmp16_);
 
3237
                _g_free0 (_tmp15_);
3205
3238
                _g_free0 (_tmp14_);
3206
 
                _g_free0 (_tmp13_);
3207
3239
        } else {
3208
 
                gboolean _tmp16_ = FALSE;
 
3240
                gboolean _tmp17_ = FALSE;
3209
3241
                if (!vala_property_accessor_get_readable (acc)) {
3210
 
                        _tmp16_ = vala_data_type_is_real_non_null_struct_type (vala_property_get_property_type (prop));
 
3242
                        _tmp17_ = vala_data_type_is_real_non_null_struct_type (vala_property_get_property_type (prop));
3211
3243
                } else {
3212
 
                        _tmp16_ = FALSE;
 
3244
                        _tmp17_ = FALSE;
3213
3245
                }
3214
 
                if (_tmp16_) {
3215
 
                        ValaCCodeFormalParameter* _tmp19_;
 
3246
                if (_tmp17_) {
 
3247
                        ValaCCodeFormalParameter* _tmp20_;
 
3248
                        char* _tmp19_;
3216
3249
                        char* _tmp18_;
3217
 
                        char* _tmp17_;
3218
 
                        cvalueparam = (_tmp19_ = vala_ccode_formal_parameter_new ("value", _tmp18_ = g_strconcat (_tmp17_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc)), "*", NULL)), _vala_ccode_node_unref0 (cvalueparam), _tmp19_);
 
3250
                        cvalueparam = (_tmp20_ = vala_ccode_formal_parameter_new ("value", _tmp19_ = g_strconcat (_tmp18_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc)), "*", NULL)), _vala_ccode_node_unref0 (cvalueparam), _tmp20_);
 
3251
                        _g_free0 (_tmp19_);
3219
3252
                        _g_free0 (_tmp18_);
3220
 
                        _g_free0 (_tmp17_);
3221
3253
                } else {
3222
 
                        ValaCCodeFormalParameter* _tmp21_;
3223
 
                        char* _tmp20_;
3224
 
                        cvalueparam = (_tmp21_ = vala_ccode_formal_parameter_new ("value", _tmp20_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc))), _vala_ccode_node_unref0 (cvalueparam), _tmp21_);
3225
 
                        _g_free0 (_tmp20_);
 
3254
                        ValaCCodeFormalParameter* _tmp22_;
 
3255
                        char* _tmp21_;
 
3256
                        cvalueparam = (_tmp22_ = vala_ccode_formal_parameter_new ("value", _tmp21_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc))), _vala_ccode_node_unref0 (cvalueparam), _tmp22_);
 
3257
                        _g_free0 (_tmp21_);
3226
3258
                }
3227
3259
        }
3228
3260
        if (vala_property_get_is_abstract (prop)) {
3229
 
                _tmp22_ = TRUE;
 
3261
                _tmp23_ = TRUE;
3230
3262
        } else {
3231
 
                _tmp22_ = vala_property_get_is_virtual (prop);
 
3263
                _tmp23_ = vala_property_get_is_virtual (prop);
3232
3264
        }
3233
 
        if (_tmp22_) {
3234
 
                gboolean _tmp23_ = FALSE;
3235
 
                gboolean _tmp29_ = FALSE;
 
3265
        if (_tmp23_) {
 
3266
                gboolean _tmp24_ = FALSE;
3236
3267
                gboolean _tmp30_ = FALSE;
3237
 
                gboolean _tmp41_ = FALSE;
 
3268
                gboolean _tmp31_ = FALSE;
3238
3269
                gboolean _tmp42_ = FALSE;
 
3270
                gboolean _tmp43_ = FALSE;
3239
3271
                ValaCCodeBlock* block;
3240
3272
                ValaCCodeFunctionCall* vcast;
3241
 
                ValaCCodeIdentifier* _tmp52_;
 
3273
                ValaCCodeIdentifier* _tmp53_;
3242
3274
                if (vala_property_accessor_get_readable (acc)) {
3243
 
                        _tmp23_ = !returns_real_struct;
 
3275
                        _tmp24_ = !returns_real_struct;
3244
3276
                } else {
3245
 
                        _tmp23_ = FALSE;
 
3277
                        _tmp24_ = FALSE;
3246
3278
                }
3247
 
                if (_tmp23_) {
3248
 
                        ValaCCodeFunction* _tmp26_;
 
3279
                if (_tmp24_) {
 
3280
                        ValaCCodeFunction* _tmp27_;
 
3281
                        char* _tmp26_;
3249
3282
                        char* _tmp25_;
3250
 
                        char* _tmp24_;
3251
 
                        self->function = (_tmp26_ = vala_ccode_function_new (_tmp24_ = vala_property_accessor_get_cname (acc), _tmp25_ = vala_data_type_get_cname (vala_ccode_base_module_get_current_return_type (self))), _vala_ccode_node_unref0 (self->function), _tmp26_);
 
3283
                        self->function = (_tmp27_ = vala_ccode_function_new (_tmp25_ = vala_property_accessor_get_cname (acc), _tmp26_ = vala_data_type_get_cname (vala_ccode_base_module_get_current_return_type (self))), _vala_ccode_node_unref0 (self->function), _tmp27_);
 
3284
                        _g_free0 (_tmp26_);
3252
3285
                        _g_free0 (_tmp25_);
3253
 
                        _g_free0 (_tmp24_);
3254
3286
                } else {
3255
 
                        ValaCCodeFunction* _tmp28_;
3256
 
                        char* _tmp27_;
3257
 
                        self->function = (_tmp28_ = vala_ccode_function_new (_tmp27_ = vala_property_accessor_get_cname (acc), "void"), _vala_ccode_node_unref0 (self->function), _tmp28_);
3258
 
                        _g_free0 (_tmp27_);
 
3287
                        ValaCCodeFunction* _tmp29_;
 
3288
                        char* _tmp28_;
 
3289
                        self->function = (_tmp29_ = vala_ccode_function_new (_tmp28_ = vala_property_accessor_get_cname (acc), "void"), _vala_ccode_node_unref0 (self->function), _tmp29_);
 
3290
                        _g_free0 (_tmp28_);
3259
3291
                }
3260
3292
                vala_ccode_function_add_parameter (self->function, cselfparam);
3261
3293
                if (vala_property_accessor_get_writable (acc)) {
 
3294
                        _tmp31_ = TRUE;
 
3295
                } else {
 
3296
                        _tmp31_ = vala_property_accessor_get_construction (acc);
 
3297
                }
 
3298
                if (_tmp31_) {
3262
3299
                        _tmp30_ = TRUE;
3263
3300
                } else {
3264
 
                        _tmp30_ = vala_property_accessor_get_construction (acc);
 
3301
                        _tmp30_ = returns_real_struct;
3265
3302
                }
3266
3303
                if (_tmp30_) {
3267
 
                        _tmp29_ = TRUE;
3268
 
                } else {
3269
 
                        _tmp29_ = returns_real_struct;
3270
 
                }
3271
 
                if (_tmp29_) {
3272
3304
                        vala_ccode_function_add_parameter (self->function, cvalueparam);
3273
3305
                }
3274
3306
                if (VALA_IS_ARRAY_TYPE (vala_property_accessor_get_value_type (acc))) {
3277
3309
                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_property_accessor_get_value_type (acc)));
3278
3310
                        length_ctype = g_strdup ("int");
3279
3311
                        if (vala_property_accessor_get_readable (acc)) {
3280
 
                                char* _tmp31_;
3281
 
                                length_ctype = (_tmp31_ = g_strdup ("int*"), _g_free0 (length_ctype), _tmp31_);
 
3312
                                char* _tmp32_;
 
3313
                                length_ctype = (_tmp32_ = g_strdup ("int*"), _g_free0 (length_ctype), _tmp32_);
3282
3314
                        }
3283
3315
                        {
3284
3316
                                gint dim;
3285
3317
                                dim = 1;
3286
3318
                                {
3287
 
                                        gboolean _tmp32_;
3288
 
                                        _tmp32_ = TRUE;
 
3319
                                        gboolean _tmp33_;
 
3320
                                        _tmp33_ = TRUE;
3289
3321
                                        while (TRUE) {
3290
 
                                                const char* _tmp33_;
3291
 
                                                ValaCCodeFormalParameter* _tmp35_;
3292
 
                                                char* _tmp34_;
3293
 
                                                if (!_tmp32_) {
 
3322
                                                const char* _tmp34_;
 
3323
                                                ValaCCodeFormalParameter* _tmp36_;
 
3324
                                                char* _tmp35_;
 
3325
                                                if (!_tmp33_) {
3294
3326
                                                        dim++;
3295
3327
                                                }
3296
 
                                                _tmp32_ = FALSE;
 
3328
                                                _tmp33_ = FALSE;
3297
3329
                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
3298
3330
                                                        break;
3299
3331
                                                }
3300
 
                                                _tmp33_ = NULL;
 
3332
                                                _tmp34_ = NULL;
3301
3333
                                                if (vala_property_accessor_get_readable (acc)) {
3302
 
                                                        _tmp33_ = "result";
 
3334
                                                        _tmp34_ = "result";
3303
3335
                                                } else {
3304
 
                                                        _tmp33_ = "value";
 
3336
                                                        _tmp34_ = "value";
3305
3337
                                                }
3306
 
                                                vala_ccode_function_add_parameter (self->function, _tmp35_ = vala_ccode_formal_parameter_new (_tmp34_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp33_, dim), length_ctype));
3307
 
                                                _vala_ccode_node_unref0 (_tmp35_);
3308
 
                                                _g_free0 (_tmp34_);
 
3338
                                                vala_ccode_function_add_parameter (self->function, _tmp36_ = vala_ccode_formal_parameter_new (_tmp35_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp34_, dim), length_ctype));
 
3339
                                                _vala_ccode_node_unref0 (_tmp36_);
 
3340
                                                _g_free0 (_tmp35_);
3309
3341
                                        }
3310
3342
                                }
3311
3343
                        }
3312
3344
                        _vala_code_node_unref0 (array_type);
3313
3345
                        _g_free0 (length_ctype);
3314
3346
                } else {
3315
 
                        gboolean _tmp36_ = FALSE;
 
3347
                        gboolean _tmp37_ = FALSE;
3316
3348
                        if (VALA_IS_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))) {
3317
 
                                _tmp36_ = vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))));
 
3349
                                _tmp37_ = vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))));
3318
3350
                        } else {
3319
 
                                _tmp36_ = FALSE;
 
3351
                                _tmp37_ = FALSE;
3320
3352
                        }
3321
 
                        if (_tmp36_) {
3322
 
                                const char* _tmp37_;
 
3353
                        if (_tmp37_) {
3323
3354
                                const char* _tmp38_;
3324
 
                                ValaCCodeFormalParameter* _tmp40_;
3325
 
                                char* _tmp39_;
3326
 
                                _tmp37_ = NULL;
3327
 
                                if (vala_property_accessor_get_readable (acc)) {
3328
 
                                        _tmp37_ = "result";
3329
 
                                } else {
3330
 
                                        _tmp37_ = "value";
3331
 
                                }
 
3355
                                const char* _tmp39_;
 
3356
                                ValaCCodeFormalParameter* _tmp41_;
 
3357
                                char* _tmp40_;
3332
3358
                                _tmp38_ = NULL;
3333
3359
                                if (vala_property_accessor_get_readable (acc)) {
3334
 
                                        _tmp38_ = "gpointer*";
3335
 
                                } else {
3336
 
                                        _tmp38_ = "gpointer";
3337
 
                                }
3338
 
                                vala_ccode_function_add_parameter (self->function, _tmp40_ = vala_ccode_formal_parameter_new (_tmp39_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp37_), _tmp38_));
3339
 
                                _vala_ccode_node_unref0 (_tmp40_);
3340
 
                                _g_free0 (_tmp39_);
 
3360
                                        _tmp38_ = "result";
 
3361
                                } else {
 
3362
                                        _tmp38_ = "value";
 
3363
                                }
 
3364
                                _tmp39_ = NULL;
 
3365
                                if (vala_property_accessor_get_readable (acc)) {
 
3366
                                        _tmp39_ = "gpointer*";
 
3367
                                } else {
 
3368
                                        _tmp39_ = "gpointer";
 
3369
                                }
 
3370
                                vala_ccode_function_add_parameter (self->function, _tmp41_ = vala_ccode_formal_parameter_new (_tmp40_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp38_), _tmp39_));
 
3371
                                _vala_ccode_node_unref0 (_tmp41_);
 
3372
                                _g_free0 (_tmp40_);
3341
3373
                        }
3342
3374
                }
3343
3375
                if (vala_symbol_is_private_symbol ((ValaSymbol*) prop)) {
3344
 
                        _tmp42_ = TRUE;
 
3376
                        _tmp43_ = TRUE;
3345
3377
                } else {
3346
 
                        gboolean _tmp43_ = FALSE;
 
3378
                        gboolean _tmp44_ = FALSE;
3347
3379
                        if (vala_property_accessor_get_readable (acc)) {
3348
 
                                _tmp43_ = TRUE;
 
3380
                                _tmp44_ = TRUE;
3349
3381
                        } else {
3350
 
                                _tmp43_ = vala_property_accessor_get_writable (acc);
 
3382
                                _tmp44_ = vala_property_accessor_get_writable (acc);
3351
3383
                        }
3352
 
                        _tmp42_ = !_tmp43_;
 
3384
                        _tmp43_ = !_tmp44_;
 
3385
                }
 
3386
                if (_tmp43_) {
 
3387
                        _tmp42_ = TRUE;
 
3388
                } else {
 
3389
                        _tmp42_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3353
3390
                }
3354
3391
                if (_tmp42_) {
3355
 
                        _tmp41_ = TRUE;
3356
 
                } else {
3357
 
                        _tmp41_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3358
 
                }
3359
 
                if (_tmp41_) {
3360
3392
                        vala_ccode_function_set_modifiers (self->function, vala_ccode_function_get_modifiers (self->function) | VALA_CCODE_MODIFIERS_STATIC);
3361
3393
                }
3362
3394
                block = vala_ccode_block_new ();
3364
3396
                vcast = NULL;
3365
3397
                if (VALA_IS_INTERFACE (vala_symbol_get_parent_symbol ((ValaSymbol*) prop))) {
3366
3398
                        ValaInterface* iface;
3367
 
                        ValaCCodeFunctionCall* _tmp47_;
3368
 
                        ValaCCodeIdentifier* _tmp46_;
 
3399
                        ValaCCodeFunctionCall* _tmp48_;
 
3400
                        ValaCCodeIdentifier* _tmp47_;
 
3401
                        char* _tmp46_;
3369
3402
                        char* _tmp45_;
3370
 
                        char* _tmp44_;
3371
3403
                        iface = _vala_code_node_ref0 (VALA_INTERFACE (vala_symbol_get_parent_symbol ((ValaSymbol*) prop)));
3372
 
                        vcast = (_tmp47_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp46_ = vala_ccode_identifier_new (_tmp45_ = g_strdup_printf ("%s_GET_INTERFACE", _tmp44_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) iface, NULL))))), _vala_ccode_node_unref0 (vcast), _tmp47_);
3373
 
                        _vala_ccode_node_unref0 (_tmp46_);
 
3404
                        vcast = (_tmp48_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp47_ = vala_ccode_identifier_new (_tmp46_ = g_strdup_printf ("%s_GET_INTERFACE", _tmp45_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) iface, NULL))))), _vala_ccode_node_unref0 (vcast), _tmp48_);
 
3405
                        _vala_ccode_node_unref0 (_tmp47_);
 
3406
                        _g_free0 (_tmp46_);
3374
3407
                        _g_free0 (_tmp45_);
3375
 
                        _g_free0 (_tmp44_);
3376
3408
                        _vala_code_node_unref0 (iface);
3377
3409
                } else {
3378
3410
                        ValaClass* cl;
3379
 
                        ValaCCodeFunctionCall* _tmp51_;
3380
 
                        ValaCCodeIdentifier* _tmp50_;
 
3411
                        ValaCCodeFunctionCall* _tmp52_;
 
3412
                        ValaCCodeIdentifier* _tmp51_;
 
3413
                        char* _tmp50_;
3381
3414
                        char* _tmp49_;
3382
 
                        char* _tmp48_;
3383
3415
                        cl = _vala_code_node_ref0 (VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) prop)));
3384
 
                        vcast = (_tmp51_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp50_ = vala_ccode_identifier_new (_tmp49_ = g_strdup_printf ("%s_GET_CLASS", _tmp48_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) cl, NULL))))), _vala_ccode_node_unref0 (vcast), _tmp51_);
3385
 
                        _vala_ccode_node_unref0 (_tmp50_);
 
3416
                        vcast = (_tmp52_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp51_ = vala_ccode_identifier_new (_tmp50_ = g_strdup_printf ("%s_GET_CLASS", _tmp49_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) cl, NULL))))), _vala_ccode_node_unref0 (vcast), _tmp52_);
 
3417
                        _vala_ccode_node_unref0 (_tmp51_);
 
3418
                        _g_free0 (_tmp50_);
3386
3419
                        _g_free0 (_tmp49_);
3387
 
                        _g_free0 (_tmp48_);
3388
3420
                        _vala_code_node_unref0 (cl);
3389
3421
                }
3390
 
                vala_ccode_function_call_add_argument (vcast, (ValaCCodeExpression*) (_tmp52_ = vala_ccode_identifier_new ("self")));
3391
 
                _vala_ccode_node_unref0 (_tmp52_);
 
3422
                vala_ccode_function_call_add_argument (vcast, (ValaCCodeExpression*) (_tmp53_ = vala_ccode_identifier_new ("self")));
 
3423
                _vala_ccode_node_unref0 (_tmp53_);
3392
3424
                if (vala_property_accessor_get_readable (acc)) {
3393
 
                        ValaCCodeMemberAccess* _tmp54_;
3394
 
                        char* _tmp53_;
3395
 
                        ValaCCodeFunctionCall* _tmp55_;
 
3425
                        ValaCCodeMemberAccess* _tmp55_;
 
3426
                        char* _tmp54_;
 
3427
                        ValaCCodeFunctionCall* _tmp56_;
3396
3428
                        ValaCCodeFunctionCall* vcall;
3397
 
                        ValaCCodeIdentifier* _tmp56_;
3398
 
                        vcall = (_tmp55_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp54_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) vcast, _tmp53_ = g_strdup_printf ("get_%s", vala_symbol_get_name ((ValaSymbol*) prop))))), _vala_ccode_node_unref0 (_tmp54_), _g_free0 (_tmp53_), _tmp55_);
3399
 
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp56_ = vala_ccode_identifier_new ("self")));
3400
 
                        _vala_ccode_node_unref0 (_tmp56_);
 
3429
                        ValaCCodeIdentifier* _tmp57_;
 
3430
                        vcall = (_tmp56_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp55_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) vcast, _tmp54_ = g_strdup_printf ("get_%s", vala_symbol_get_name ((ValaSymbol*) prop))))), _vala_ccode_node_unref0 (_tmp55_), _g_free0 (_tmp54_), _tmp56_);
 
3431
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp57_ = vala_ccode_identifier_new ("self")));
 
3432
                        _vala_ccode_node_unref0 (_tmp57_);
3401
3433
                        if (returns_real_struct) {
3402
 
                                ValaCCodeIdentifier* _tmp57_;
3403
 
                                ValaCCodeExpressionStatement* _tmp58_;
3404
 
                                vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp57_ = vala_ccode_identifier_new ("result")));
3405
 
                                _vala_ccode_node_unref0 (_tmp57_);
3406
 
                                vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp58_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) vcall)));
 
3434
                                ValaCCodeIdentifier* _tmp58_;
 
3435
                                ValaCCodeExpressionStatement* _tmp59_;
 
3436
                                vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp58_ = vala_ccode_identifier_new ("result")));
3407
3437
                                _vala_ccode_node_unref0 (_tmp58_);
 
3438
                                vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp59_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) vcall)));
 
3439
                                _vala_ccode_node_unref0 (_tmp59_);
3408
3440
                        } else {
3409
 
                                ValaCCodeReturnStatement* _tmp62_;
 
3441
                                ValaCCodeReturnStatement* _tmp63_;
3410
3442
                                if (VALA_IS_ARRAY_TYPE (vala_property_accessor_get_value_type (acc))) {
3411
3443
                                        ValaArrayType* array_type;
3412
3444
                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_property_accessor_get_value_type (acc)));
3414
3446
                                                gint dim;
3415
3447
                                                dim = 1;
3416
3448
                                                {
3417
 
                                                        gboolean _tmp59_;
3418
 
                                                        _tmp59_ = TRUE;
 
3449
                                                        gboolean _tmp60_;
 
3450
                                                        _tmp60_ = TRUE;
3419
3451
                                                        while (TRUE) {
3420
 
                                                                char* _tmp60_;
3421
 
                                                                ValaCCodeIdentifier* _tmp61_;
 
3452
                                                                char* _tmp61_;
 
3453
                                                                ValaCCodeIdentifier* _tmp62_;
3422
3454
                                                                ValaCCodeIdentifier* len_expr;
3423
 
                                                                if (!_tmp59_) {
 
3455
                                                                if (!_tmp60_) {
3424
3456
                                                                        dim++;
3425
3457
                                                                }
3426
 
                                                                _tmp59_ = FALSE;
 
3458
                                                                _tmp60_ = FALSE;
3427
3459
                                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
3428
3460
                                                                        break;
3429
3461
                                                                }
3430
 
                                                                len_expr = (_tmp61_ = vala_ccode_identifier_new (_tmp60_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), "result", dim)), _g_free0 (_tmp60_), _tmp61_);
 
3462
                                                                len_expr = (_tmp62_ = vala_ccode_identifier_new (_tmp61_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), "result", dim)), _g_free0 (_tmp61_), _tmp62_);
3431
3463
                                                                vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) len_expr);
3432
3464
                                                                _vala_ccode_node_unref0 (len_expr);
3433
3465
                                                        }
3435
3467
                                        }
3436
3468
                                        _vala_code_node_unref0 (array_type);
3437
3469
                                }
3438
 
                                vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp62_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) vcall)));
3439
 
                                _vala_ccode_node_unref0 (_tmp62_);
 
3470
                                vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp63_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) vcall)));
 
3471
                                _vala_ccode_node_unref0 (_tmp63_);
3440
3472
                        }
3441
3473
                        _vala_ccode_node_unref0 (vcall);
3442
3474
                } else {
3443
 
                        ValaCCodeMemberAccess* _tmp64_;
3444
 
                        char* _tmp63_;
3445
 
                        ValaCCodeFunctionCall* _tmp65_;
 
3475
                        ValaCCodeMemberAccess* _tmp65_;
 
3476
                        char* _tmp64_;
 
3477
                        ValaCCodeFunctionCall* _tmp66_;
3446
3478
                        ValaCCodeFunctionCall* vcall;
3447
 
                        ValaCCodeIdentifier* _tmp66_;
3448
3479
                        ValaCCodeIdentifier* _tmp67_;
3449
 
                        ValaCCodeExpressionStatement* _tmp71_;
3450
 
                        vcall = (_tmp65_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp64_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) vcast, _tmp63_ = g_strdup_printf ("set_%s", vala_symbol_get_name ((ValaSymbol*) prop))))), _vala_ccode_node_unref0 (_tmp64_), _g_free0 (_tmp63_), _tmp65_);
3451
 
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp66_ = vala_ccode_identifier_new ("self")));
3452
 
                        _vala_ccode_node_unref0 (_tmp66_);
3453
 
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp67_ = vala_ccode_identifier_new ("value")));
 
3480
                        ValaCCodeIdentifier* _tmp68_;
 
3481
                        ValaCCodeExpressionStatement* _tmp72_;
 
3482
                        vcall = (_tmp66_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp65_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) vcast, _tmp64_ = g_strdup_printf ("set_%s", vala_symbol_get_name ((ValaSymbol*) prop))))), _vala_ccode_node_unref0 (_tmp65_), _g_free0 (_tmp64_), _tmp66_);
 
3483
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp67_ = vala_ccode_identifier_new ("self")));
3454
3484
                        _vala_ccode_node_unref0 (_tmp67_);
 
3485
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp68_ = vala_ccode_identifier_new ("value")));
 
3486
                        _vala_ccode_node_unref0 (_tmp68_);
3455
3487
                        if (VALA_IS_ARRAY_TYPE (vala_property_accessor_get_value_type (acc))) {
3456
3488
                                ValaArrayType* array_type;
3457
3489
                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_property_accessor_get_value_type (acc)));
3459
3491
                                        gint dim;
3460
3492
                                        dim = 1;
3461
3493
                                        {
3462
 
                                                gboolean _tmp68_;
3463
 
                                                _tmp68_ = TRUE;
 
3494
                                                gboolean _tmp69_;
 
3495
                                                _tmp69_ = TRUE;
3464
3496
                                                while (TRUE) {
3465
 
                                                        char* _tmp69_;
3466
 
                                                        ValaCCodeIdentifier* _tmp70_;
 
3497
                                                        char* _tmp70_;
 
3498
                                                        ValaCCodeIdentifier* _tmp71_;
3467
3499
                                                        ValaCCodeIdentifier* len_expr;
3468
 
                                                        if (!_tmp68_) {
 
3500
                                                        if (!_tmp69_) {
3469
3501
                                                                dim++;
3470
3502
                                                        }
3471
 
                                                        _tmp68_ = FALSE;
 
3503
                                                        _tmp69_ = FALSE;
3472
3504
                                                        if (!(dim <= vala_array_type_get_rank (array_type))) {
3473
3505
                                                                break;
3474
3506
                                                        }
3475
 
                                                        len_expr = (_tmp70_ = vala_ccode_identifier_new (_tmp69_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), "value", dim)), _g_free0 (_tmp69_), _tmp70_);
 
3507
                                                        len_expr = (_tmp71_ = vala_ccode_identifier_new (_tmp70_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), "value", dim)), _g_free0 (_tmp70_), _tmp71_);
3476
3508
                                                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) len_expr);
3477
3509
                                                        _vala_ccode_node_unref0 (len_expr);
3478
3510
                                                }
3480
3512
                                }
3481
3513
                                _vala_code_node_unref0 (array_type);
3482
3514
                        }
3483
 
                        vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp71_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) vcall)));
3484
 
                        _vala_ccode_node_unref0 (_tmp71_);
 
3515
                        vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp72_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) vcall)));
 
3516
                        _vala_ccode_node_unref0 (_tmp72_);
3485
3517
                        _vala_ccode_node_unref0 (vcall);
3486
3518
                }
3487
3519
                vala_ccode_fragment_append (self->source_type_member_definition, (ValaCCodeNode*) self->function);
3489
3521
                _vala_ccode_node_unref0 (vcast);
3490
3522
        }
3491
3523
        if (!vala_property_get_is_abstract (prop)) {
3492
 
                gboolean _tmp72_ = FALSE;
 
3524
                gboolean _tmp73_ = FALSE;
3493
3525
                gboolean is_virtual;
3494
3526
                char* cname;
3495
 
                gboolean _tmp78_ = FALSE;
3496
3527
                gboolean _tmp79_ = FALSE;
 
3528
                gboolean _tmp80_ = FALSE;
3497
3529
                ValaObjectType* base_type;
3498
 
                gboolean _tmp87_ = FALSE;
3499
3530
                gboolean _tmp88_ = FALSE;
3500
 
                gboolean _tmp107_ = FALSE;
3501
 
                gboolean _tmp115_ = FALSE;
3502
 
                gboolean _tmp119_ = FALSE;
 
3531
                gboolean _tmp89_ = FALSE;
 
3532
                gboolean _tmp108_ = FALSE;
 
3533
                gboolean _tmp116_ = FALSE;
3503
3534
                gboolean _tmp120_ = FALSE;
 
3535
                gboolean _tmp121_ = FALSE;
3504
3536
                if (vala_property_get_base_property (prop) != NULL) {
3505
 
                        _tmp72_ = TRUE;
 
3537
                        _tmp73_ = TRUE;
3506
3538
                } else {
3507
 
                        _tmp72_ = vala_property_get_base_interface_property (prop) != NULL;
 
3539
                        _tmp73_ = vala_property_get_base_interface_property (prop) != NULL;
3508
3540
                }
3509
 
                is_virtual = _tmp72_;
 
3541
                is_virtual = _tmp73_;
3510
3542
                cname = NULL;
3511
3543
                if (is_virtual) {
3512
3544
                        if (vala_property_accessor_get_readable (acc)) {
 
3545
                                char* _tmp75_;
3513
3546
                                char* _tmp74_;
3514
 
                                char* _tmp73_;
3515
 
                                cname = (_tmp74_ = g_strdup_printf ("%s_real_get_%s", _tmp73_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) t, NULL), vala_symbol_get_name ((ValaSymbol*) prop)), _g_free0 (cname), _tmp74_);
3516
 
                                _g_free0 (_tmp73_);
 
3547
                                cname = (_tmp75_ = g_strdup_printf ("%s_real_get_%s", _tmp74_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) t, NULL), vala_symbol_get_name ((ValaSymbol*) prop)), _g_free0 (cname), _tmp75_);
 
3548
                                _g_free0 (_tmp74_);
3517
3549
                        } else {
 
3550
                                char* _tmp77_;
3518
3551
                                char* _tmp76_;
3519
 
                                char* _tmp75_;
3520
 
                                cname = (_tmp76_ = g_strdup_printf ("%s_real_set_%s", _tmp75_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) t, NULL), vala_symbol_get_name ((ValaSymbol*) prop)), _g_free0 (cname), _tmp76_);
3521
 
                                _g_free0 (_tmp75_);
 
3552
                                cname = (_tmp77_ = g_strdup_printf ("%s_real_set_%s", _tmp76_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) t, NULL), vala_symbol_get_name ((ValaSymbol*) prop)), _g_free0 (cname), _tmp77_);
 
3553
                                _g_free0 (_tmp76_);
3522
3554
                        }
3523
3555
                } else {
3524
 
                        char* _tmp77_;
3525
 
                        cname = (_tmp77_ = vala_property_accessor_get_cname (acc), _g_free0 (cname), _tmp77_);
 
3556
                        char* _tmp78_;
 
3557
                        cname = (_tmp78_ = vala_property_accessor_get_cname (acc), _g_free0 (cname), _tmp78_);
3526
3558
                }
3527
3559
                if (vala_property_accessor_get_writable (acc)) {
 
3560
                        _tmp80_ = TRUE;
 
3561
                } else {
 
3562
                        _tmp80_ = vala_property_accessor_get_construction (acc);
 
3563
                }
 
3564
                if (_tmp80_) {
3528
3565
                        _tmp79_ = TRUE;
3529
3566
                } else {
3530
 
                        _tmp79_ = vala_property_accessor_get_construction (acc);
 
3567
                        _tmp79_ = returns_real_struct;
3531
3568
                }
3532
3569
                if (_tmp79_) {
3533
 
                        _tmp78_ = TRUE;
3534
 
                } else {
3535
 
                        _tmp78_ = returns_real_struct;
3536
 
                }
3537
 
                if (_tmp78_) {
3538
 
                        ValaCCodeFunction* _tmp80_;
3539
 
                        self->function = (_tmp80_ = vala_ccode_function_new (cname, "void"), _vala_ccode_node_unref0 (self->function), _tmp80_);
3540
 
                } else {
3541
 
                        ValaCCodeFunction* _tmp82_;
3542
 
                        char* _tmp81_;
3543
 
                        self->function = (_tmp82_ = vala_ccode_function_new (cname, _tmp81_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc))), _vala_ccode_node_unref0 (self->function), _tmp82_);
3544
 
                        _g_free0 (_tmp81_);
 
3570
                        ValaCCodeFunction* _tmp81_;
 
3571
                        self->function = (_tmp81_ = vala_ccode_function_new (cname, "void"), _vala_ccode_node_unref0 (self->function), _tmp81_);
 
3572
                } else {
 
3573
                        ValaCCodeFunction* _tmp83_;
 
3574
                        char* _tmp82_;
 
3575
                        self->function = (_tmp83_ = vala_ccode_function_new (cname, _tmp82_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc))), _vala_ccode_node_unref0 (self->function), _tmp83_);
 
3576
                        _g_free0 (_tmp82_);
3545
3577
                }
3546
3578
                base_type = NULL;
3547
3579
                if (vala_property_get_binding (prop) == MEMBER_BINDING_INSTANCE) {
3548
3580
                        if (is_virtual) {
3549
 
                                ValaCCodeFormalParameter* _tmp86_;
3550
 
                                char* _tmp85_;
 
3581
                                ValaCCodeFormalParameter* _tmp87_;
 
3582
                                char* _tmp86_;
3551
3583
                                if (vala_property_get_base_property (prop) != NULL) {
3552
 
                                        ValaObjectType* _tmp83_;
3553
 
                                        base_type = (_tmp83_ = vala_object_type_new (VALA_OBJECT_TYPE_SYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) vala_property_get_base_property (prop)))), _vala_code_node_unref0 (base_type), _tmp83_);
 
3584
                                        ValaObjectType* _tmp84_;
 
3585
                                        base_type = (_tmp84_ = vala_object_type_new (VALA_OBJECT_TYPE_SYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) vala_property_get_base_property (prop)))), _vala_code_node_unref0 (base_type), _tmp84_);
3554
3586
                                } else {
3555
3587
                                        if (vala_property_get_base_interface_property (prop) != NULL) {
3556
 
                                                ValaObjectType* _tmp84_;
3557
 
                                                base_type = (_tmp84_ = vala_object_type_new (VALA_OBJECT_TYPE_SYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) vala_property_get_base_interface_property (prop)))), _vala_code_node_unref0 (base_type), _tmp84_);
 
3588
                                                ValaObjectType* _tmp85_;
 
3589
                                                base_type = (_tmp85_ = vala_object_type_new (VALA_OBJECT_TYPE_SYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) vala_property_get_base_interface_property (prop)))), _vala_code_node_unref0 (base_type), _tmp85_);
3558
3590
                                        }
3559
3591
                                }
3560
3592
                                vala_ccode_function_set_modifiers (self->function, vala_ccode_function_get_modifiers (self->function) | VALA_CCODE_MODIFIERS_STATIC);
3561
 
                                vala_ccode_function_add_parameter (self->function, _tmp86_ = vala_ccode_formal_parameter_new ("base", _tmp85_ = vala_data_type_get_cname ((ValaDataType*) base_type)));
3562
 
                                _vala_ccode_node_unref0 (_tmp86_);
3563
 
                                _g_free0 (_tmp85_);
 
3593
                                vala_ccode_function_add_parameter (self->function, _tmp87_ = vala_ccode_formal_parameter_new ("base", _tmp86_ = vala_data_type_get_cname ((ValaDataType*) base_type)));
 
3594
                                _vala_ccode_node_unref0 (_tmp87_);
 
3595
                                _g_free0 (_tmp86_);
3564
3596
                        } else {
3565
3597
                                vala_ccode_function_add_parameter (self->function, cselfparam);
3566
3598
                        }
3567
3599
                }
3568
3600
                if (vala_property_accessor_get_writable (acc)) {
 
3601
                        _tmp89_ = TRUE;
 
3602
                } else {
 
3603
                        _tmp89_ = vala_property_accessor_get_construction (acc);
 
3604
                }
 
3605
                if (_tmp89_) {
3569
3606
                        _tmp88_ = TRUE;
3570
3607
                } else {
3571
 
                        _tmp88_ = vala_property_accessor_get_construction (acc);
 
3608
                        _tmp88_ = returns_real_struct;
3572
3609
                }
3573
3610
                if (_tmp88_) {
3574
 
                        _tmp87_ = TRUE;
3575
 
                } else {
3576
 
                        _tmp87_ = returns_real_struct;
3577
 
                }
3578
 
                if (_tmp87_) {
3579
3611
                        vala_ccode_function_add_parameter (self->function, cvalueparam);
3580
3612
                }
3581
3613
                if (VALA_IS_ARRAY_TYPE (vala_property_accessor_get_value_type (acc))) {
3584
3616
                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_property_accessor_get_value_type (acc)));
3585
3617
                        length_ctype = g_strdup ("int");
3586
3618
                        if (vala_property_accessor_get_readable (acc)) {
3587
 
                                char* _tmp89_;
3588
 
                                length_ctype = (_tmp89_ = g_strdup ("int*"), _g_free0 (length_ctype), _tmp89_);
 
3619
                                char* _tmp90_;
 
3620
                                length_ctype = (_tmp90_ = g_strdup ("int*"), _g_free0 (length_ctype), _tmp90_);
3589
3621
                        }
3590
3622
                        {
3591
3623
                                gint dim;
3592
3624
                                dim = 1;
3593
3625
                                {
3594
 
                                        gboolean _tmp90_;
3595
 
                                        _tmp90_ = TRUE;
 
3626
                                        gboolean _tmp91_;
 
3627
                                        _tmp91_ = TRUE;
3596
3628
                                        while (TRUE) {
3597
 
                                                const char* _tmp91_;
3598
 
                                                ValaCCodeFormalParameter* _tmp93_;
3599
 
                                                char* _tmp92_;
3600
 
                                                if (!_tmp90_) {
 
3629
                                                const char* _tmp92_;
 
3630
                                                ValaCCodeFormalParameter* _tmp94_;
 
3631
                                                char* _tmp93_;
 
3632
                                                if (!_tmp91_) {
3601
3633
                                                        dim++;
3602
3634
                                                }
3603
 
                                                _tmp90_ = FALSE;
 
3635
                                                _tmp91_ = FALSE;
3604
3636
                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
3605
3637
                                                        break;
3606
3638
                                                }
3607
 
                                                _tmp91_ = NULL;
 
3639
                                                _tmp92_ = NULL;
3608
3640
                                                if (vala_property_accessor_get_readable (acc)) {
3609
 
                                                        _tmp91_ = "result";
 
3641
                                                        _tmp92_ = "result";
3610
3642
                                                } else {
3611
 
                                                        _tmp91_ = "value";
 
3643
                                                        _tmp92_ = "value";
3612
3644
                                                }
3613
 
                                                vala_ccode_function_add_parameter (self->function, _tmp93_ = vala_ccode_formal_parameter_new (_tmp92_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp91_, dim), length_ctype));
3614
 
                                                _vala_ccode_node_unref0 (_tmp93_);
3615
 
                                                _g_free0 (_tmp92_);
 
3645
                                                vala_ccode_function_add_parameter (self->function, _tmp94_ = vala_ccode_formal_parameter_new (_tmp93_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp92_, dim), length_ctype));
 
3646
                                                _vala_ccode_node_unref0 (_tmp94_);
 
3647
                                                _g_free0 (_tmp93_);
3616
3648
                                        }
3617
3649
                                }
3618
3650
                        }
3619
3651
                        _vala_code_node_unref0 (array_type);
3620
3652
                        _g_free0 (length_ctype);
3621
3653
                } else {
3622
 
                        gboolean _tmp94_ = FALSE;
 
3654
                        gboolean _tmp95_ = FALSE;
3623
3655
                        if (VALA_IS_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))) {
3624
 
                                _tmp94_ = vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))));
 
3656
                                _tmp95_ = vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))));
3625
3657
                        } else {
3626
 
                                _tmp94_ = FALSE;
 
3658
                                _tmp95_ = FALSE;
3627
3659
                        }
3628
 
                        if (_tmp94_) {
3629
 
                                const char* _tmp95_;
 
3660
                        if (_tmp95_) {
3630
3661
                                const char* _tmp96_;
3631
 
                                ValaCCodeFormalParameter* _tmp98_;
3632
 
                                char* _tmp97_;
3633
 
                                _tmp95_ = NULL;
3634
 
                                if (vala_property_accessor_get_readable (acc)) {
3635
 
                                        _tmp95_ = "result";
3636
 
                                } else {
3637
 
                                        _tmp95_ = "value";
3638
 
                                }
 
3662
                                const char* _tmp97_;
 
3663
                                ValaCCodeFormalParameter* _tmp99_;
 
3664
                                char* _tmp98_;
3639
3665
                                _tmp96_ = NULL;
3640
3666
                                if (vala_property_accessor_get_readable (acc)) {
3641
 
                                        _tmp96_ = "gpointer*";
3642
 
                                } else {
3643
 
                                        _tmp96_ = "gpointer";
3644
 
                                }
3645
 
                                vala_ccode_function_add_parameter (self->function, _tmp98_ = vala_ccode_formal_parameter_new (_tmp97_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp95_), _tmp96_));
3646
 
                                _vala_ccode_node_unref0 (_tmp98_);
3647
 
                                _g_free0 (_tmp97_);
 
3667
                                        _tmp96_ = "result";
 
3668
                                } else {
 
3669
                                        _tmp96_ = "value";
 
3670
                                }
 
3671
                                _tmp97_ = NULL;
 
3672
                                if (vala_property_accessor_get_readable (acc)) {
 
3673
                                        _tmp97_ = "gpointer*";
 
3674
                                } else {
 
3675
                                        _tmp97_ = "gpointer";
 
3676
                                }
 
3677
                                vala_ccode_function_add_parameter (self->function, _tmp99_ = vala_ccode_formal_parameter_new (_tmp98_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp96_), _tmp97_));
 
3678
                                _vala_ccode_node_unref0 (_tmp99_);
 
3679
                                _g_free0 (_tmp98_);
3648
3680
                        }
3649
3681
                }
3650
3682
                if (!is_virtual) {
3651
 
                        gboolean _tmp99_ = FALSE;
3652
3683
                        gboolean _tmp100_ = FALSE;
 
3684
                        gboolean _tmp101_ = FALSE;
3653
3685
                        if (vala_symbol_is_private_symbol ((ValaSymbol*) prop)) {
 
3686
                                _tmp101_ = TRUE;
 
3687
                        } else {
 
3688
                                gboolean _tmp102_ = FALSE;
 
3689
                                if (vala_property_accessor_get_readable (acc)) {
 
3690
                                        _tmp102_ = TRUE;
 
3691
                                } else {
 
3692
                                        _tmp102_ = vala_property_accessor_get_writable (acc);
 
3693
                                }
 
3694
                                _tmp101_ = !_tmp102_;
 
3695
                        }
 
3696
                        if (_tmp101_) {
3654
3697
                                _tmp100_ = TRUE;
3655
3698
                        } else {
3656
 
                                gboolean _tmp101_ = FALSE;
3657
 
                                if (vala_property_accessor_get_readable (acc)) {
3658
 
                                        _tmp101_ = TRUE;
3659
 
                                } else {
3660
 
                                        _tmp101_ = vala_property_accessor_get_writable (acc);
3661
 
                                }
3662
 
                                _tmp100_ = !_tmp101_;
 
3699
                                _tmp100_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3663
3700
                        }
3664
3701
                        if (_tmp100_) {
3665
 
                                _tmp99_ = TRUE;
3666
 
                        } else {
3667
 
                                _tmp99_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3668
 
                        }
3669
 
                        if (_tmp99_) {
3670
3702
                                vala_ccode_function_set_modifiers (self->function, vala_ccode_function_get_modifiers (self->function) | VALA_CCODE_MODIFIERS_STATIC);
3671
3703
                        }
3672
3704
                }
3673
3705
                vala_ccode_function_set_block (self->function, VALA_CCODE_BLOCK (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_property_accessor_get_body (acc))));
3674
3706
                if (is_virtual) {
3675
 
                        char* _tmp102_;
3676
 
                        ValaCCodeDeclaration* _tmp103_;
 
3707
                        char* _tmp103_;
 
3708
                        ValaCCodeDeclaration* _tmp104_;
3677
3709
                        ValaCCodeDeclaration* _cdecl_;
3678
 
                        ValaCCodeVariableDeclarator* _tmp106_;
3679
 
                        ValaCCodeExpression* _tmp105_;
3680
 
                        ValaCCodeIdentifier* _tmp104_;
3681
 
                        _cdecl_ = (_tmp103_ = vala_ccode_declaration_new (_tmp102_ = vala_data_type_get_cname (this_type)), _g_free0 (_tmp102_), _tmp103_);
3682
 
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp106_ = vala_ccode_variable_declarator_new ("self", _tmp105_ = vala_ccode_base_module_transform_expression (self, (ValaCCodeExpression*) (_tmp104_ = vala_ccode_identifier_new ("base")), (ValaDataType*) base_type, this_type, NULL), NULL)));
 
3710
                        ValaCCodeVariableDeclarator* _tmp107_;
 
3711
                        ValaCCodeExpression* _tmp106_;
 
3712
                        ValaCCodeIdentifier* _tmp105_;
 
3713
                        _cdecl_ = (_tmp104_ = vala_ccode_declaration_new (_tmp103_ = vala_data_type_get_cname (this_type)), _g_free0 (_tmp103_), _tmp104_);
 
3714
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp107_ = vala_ccode_variable_declarator_new ("self", _tmp106_ = vala_ccode_base_module_transform_expression (self, (ValaCCodeExpression*) (_tmp105_ = vala_ccode_identifier_new ("base")), (ValaDataType*) base_type, this_type, NULL), NULL)));
 
3715
                        _vala_ccode_node_unref0 (_tmp107_);
3683
3716
                        _vala_ccode_node_unref0 (_tmp106_);
3684
3717
                        _vala_ccode_node_unref0 (_tmp105_);
3685
 
                        _vala_ccode_node_unref0 (_tmp104_);
3686
3718
                        vala_ccode_block_prepend_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) _cdecl_);
3687
3719
                        _vala_ccode_node_unref0 (_cdecl_);
3688
3720
                }
3689
3721
                if (vala_property_accessor_get_readable (acc)) {
3690
 
                        _tmp107_ = !returns_real_struct;
 
3722
                        _tmp108_ = !returns_real_struct;
3691
3723
                } else {
3692
 
                        _tmp107_ = FALSE;
 
3724
                        _tmp108_ = FALSE;
3693
3725
                }
3694
 
                if (_tmp107_) {
3695
 
                        gboolean _tmp108_ = FALSE;
 
3726
                if (_tmp108_) {
 
3727
                        gboolean _tmp109_ = FALSE;
3696
3728
                        if (vala_property_accessor_get_exit_block (acc) == NULL) {
3697
 
                                _tmp108_ = TRUE;
 
3729
                                _tmp109_ = TRUE;
3698
3730
                        } else {
3699
 
                                ValaList* _tmp109_;
3700
 
                                _tmp108_ = vala_collection_get_size ((ValaCollection*) (_tmp109_ = vala_basic_block_get_predecessors (vala_property_accessor_get_exit_block (acc)))) > 0;
3701
 
                                _vala_collection_object_unref0 (_tmp109_);
 
3731
                                ValaList* _tmp110_;
 
3732
                                _tmp109_ = vala_collection_get_size ((ValaCollection*) (_tmp110_ = vala_basic_block_get_predecessors (vala_property_accessor_get_exit_block (acc)))) > 0;
 
3733
                                _vala_collection_object_unref0 (_tmp110_);
3702
3734
                        }
3703
 
                        if (_tmp108_) {
3704
 
                                char* _tmp110_;
3705
 
                                ValaCCodeDeclaration* _tmp111_;
 
3735
                        if (_tmp109_) {
 
3736
                                char* _tmp111_;
 
3737
                                ValaCCodeDeclaration* _tmp112_;
3706
3738
                                ValaCCodeDeclaration* _cdecl_;
3707
 
                                ValaCCodeVariableDeclarator* _tmp112_;
3708
 
                                _cdecl_ = (_tmp111_ = vala_ccode_declaration_new (_tmp110_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc))), _g_free0 (_tmp110_), _tmp111_);
3709
 
                                vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp112_ = vala_ccode_variable_declarator_new ("result", NULL, NULL)));
3710
 
                                _vala_ccode_node_unref0 (_tmp112_);
 
3739
                                ValaCCodeVariableDeclarator* _tmp113_;
 
3740
                                _cdecl_ = (_tmp112_ = vala_ccode_declaration_new (_tmp111_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc))), _g_free0 (_tmp111_), _tmp112_);
 
3741
                                vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp113_ = vala_ccode_variable_declarator_new ("result", NULL, NULL)));
 
3742
                                _vala_ccode_node_unref0 (_tmp113_);
3711
3743
                                vala_ccode_block_prepend_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) _cdecl_);
3712
3744
                                _vala_ccode_node_unref0 (_cdecl_);
3713
3745
                        }
3714
3746
                }
3715
3747
                if (self->current_method_inner_error) {
3716
3748
                        ValaCCodeDeclaration* _cdecl_;
3717
 
                        ValaCCodeVariableDeclarator* _tmp114_;
3718
 
                        ValaCCodeConstant* _tmp113_;
 
3749
                        ValaCCodeVariableDeclarator* _tmp115_;
 
3750
                        ValaCCodeConstant* _tmp114_;
3719
3751
                        _cdecl_ = vala_ccode_declaration_new ("GError *");
3720
 
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp114_ = vala_ccode_variable_declarator_new ("_inner_error_", (ValaCCodeExpression*) (_tmp113_ = vala_ccode_constant_new ("NULL")), NULL)));
 
3752
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp115_ = vala_ccode_variable_declarator_new ("_inner_error_", (ValaCCodeExpression*) (_tmp114_ = vala_ccode_constant_new ("NULL")), NULL)));
 
3753
                        _vala_ccode_node_unref0 (_tmp115_);
3721
3754
                        _vala_ccode_node_unref0 (_tmp114_);
3722
 
                        _vala_ccode_node_unref0 (_tmp113_);
3723
3755
                        vala_ccode_block_prepend_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) _cdecl_);
3724
3756
                        _vala_ccode_node_unref0 (_cdecl_);
3725
3757
                }
3726
3758
                if (vala_property_get_binding (prop) == MEMBER_BINDING_INSTANCE) {
3727
 
                        _tmp115_ = !is_virtual;
 
3759
                        _tmp116_ = !is_virtual;
3728
3760
                } else {
3729
 
                        _tmp115_ = FALSE;
 
3761
                        _tmp116_ = FALSE;
3730
3762
                }
3731
 
                if (_tmp115_) {
 
3763
                if (_tmp116_) {
3732
3764
                        ValaCCodeStatement* check_stmt;
3733
 
                        gboolean _tmp116_ = FALSE;
 
3765
                        gboolean _tmp117_ = FALSE;
3734
3766
                        check_stmt = NULL;
3735
3767
                        if (!vala_property_accessor_get_readable (acc)) {
3736
 
                                _tmp116_ = TRUE;
 
3768
                                _tmp117_ = TRUE;
3737
3769
                        } else {
3738
 
                                _tmp116_ = returns_real_struct;
 
3770
                                _tmp117_ = returns_real_struct;
3739
3771
                        }
3740
 
                        if (_tmp116_) {
3741
 
                                ValaCCodeStatement* _tmp117_;
3742
 
                                check_stmt = (_tmp117_ = vala_ccode_base_module_create_property_type_check_statement (self, prop, FALSE, t, TRUE, "self"), _vala_ccode_node_unref0 (check_stmt), _tmp117_);
3743
 
                        } else {
 
3772
                        if (_tmp117_) {
3744
3773
                                ValaCCodeStatement* _tmp118_;
3745
 
                                check_stmt = (_tmp118_ = vala_ccode_base_module_create_property_type_check_statement (self, prop, TRUE, t, TRUE, "self"), _vala_ccode_node_unref0 (check_stmt), _tmp118_);
 
3774
                                check_stmt = (_tmp118_ = vala_ccode_base_module_create_property_type_check_statement (self, prop, FALSE, t, TRUE, "self"), _vala_ccode_node_unref0 (check_stmt), _tmp118_);
 
3775
                        } else {
 
3776
                                ValaCCodeStatement* _tmp119_;
 
3777
                                check_stmt = (_tmp119_ = vala_ccode_base_module_create_property_type_check_statement (self, prop, TRUE, t, TRUE, "self"), _vala_ccode_node_unref0 (check_stmt), _tmp119_);
3746
3778
                        }
3747
3779
                        if (check_stmt != NULL) {
3748
3780
                                vala_ccode_block_prepend_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) check_stmt);
3750
3782
                        _vala_ccode_node_unref0 (check_stmt);
3751
3783
                }
3752
3784
                if (vala_ccode_base_module_is_gobject_property (self, prop)) {
3753
 
                        _tmp120_ = vala_property_get_notify (prop);
 
3785
                        _tmp121_ = vala_property_get_notify (prop);
 
3786
                } else {
 
3787
                        _tmp121_ = FALSE;
 
3788
                }
 
3789
                if (_tmp121_) {
 
3790
                        gboolean _tmp122_ = FALSE;
 
3791
                        if (vala_property_accessor_get_writable (acc)) {
 
3792
                                _tmp122_ = TRUE;
 
3793
                        } else {
 
3794
                                _tmp122_ = vala_property_accessor_get_construction (acc);
 
3795
                        }
 
3796
                        _tmp120_ = _tmp122_;
3754
3797
                } else {
3755
3798
                        _tmp120_ = FALSE;
3756
3799
                }
3757
3800
                if (_tmp120_) {
3758
 
                        gboolean _tmp121_ = FALSE;
3759
 
                        if (vala_property_accessor_get_writable (acc)) {
3760
 
                                _tmp121_ = TRUE;
3761
 
                        } else {
3762
 
                                _tmp121_ = vala_property_accessor_get_construction (acc);
3763
 
                        }
3764
 
                        _tmp119_ = _tmp121_;
3765
 
                } else {
3766
 
                        _tmp119_ = FALSE;
3767
 
                }
3768
 
                if (_tmp119_) {
3769
 
                        ValaCCodeIdentifier* _tmp122_;
3770
 
                        ValaCCodeFunctionCall* _tmp123_;
 
3801
                        ValaCCodeIdentifier* _tmp123_;
 
3802
                        ValaCCodeFunctionCall* _tmp124_;
3771
3803
                        ValaCCodeFunctionCall* notify_call;
3772
 
                        ValaCCodeCastExpression* _tmp125_;
3773
 
                        ValaCCodeIdentifier* _tmp124_;
3774
 
                        ValaCCodeConstant* _tmp126_;
3775
 
                        ValaCCodeExpressionStatement* _tmp127_;
3776
 
                        notify_call = (_tmp123_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp122_ = vala_ccode_identifier_new ("g_object_notify"))), _vala_ccode_node_unref0 (_tmp122_), _tmp123_);
3777
 
                        vala_ccode_function_call_add_argument (notify_call, (ValaCCodeExpression*) (_tmp125_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) (_tmp124_ = vala_ccode_identifier_new ("self")), "GObject *")));
 
3804
                        ValaCCodeCastExpression* _tmp126_;
 
3805
                        ValaCCodeIdentifier* _tmp125_;
 
3806
                        ValaCCodeConstant* _tmp127_;
 
3807
                        ValaCCodeExpressionStatement* _tmp128_;
 
3808
                        notify_call = (_tmp124_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp123_ = vala_ccode_identifier_new ("g_object_notify"))), _vala_ccode_node_unref0 (_tmp123_), _tmp124_);
 
3809
                        vala_ccode_function_call_add_argument (notify_call, (ValaCCodeExpression*) (_tmp126_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) (_tmp125_ = vala_ccode_identifier_new ("self")), "GObject *")));
 
3810
                        _vala_ccode_node_unref0 (_tmp126_);
3778
3811
                        _vala_ccode_node_unref0 (_tmp125_);
3779
 
                        _vala_ccode_node_unref0 (_tmp124_);
3780
 
                        vala_ccode_function_call_add_argument (notify_call, (ValaCCodeExpression*) (_tmp126_ = vala_property_get_canonical_cconstant (prop)));
3781
 
                        _vala_ccode_node_unref0 (_tmp126_);
3782
 
                        vala_ccode_block_add_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) (_tmp127_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) notify_call)));
 
3812
                        vala_ccode_function_call_add_argument (notify_call, (ValaCCodeExpression*) (_tmp127_ = vala_property_get_canonical_cconstant (prop)));
3783
3813
                        _vala_ccode_node_unref0 (_tmp127_);
 
3814
                        vala_ccode_block_add_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) (_tmp128_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) notify_call)));
 
3815
                        _vala_ccode_node_unref0 (_tmp128_);
3784
3816
                        _vala_ccode_node_unref0 (notify_call);
3785
3817
                }
3786
3818
                vala_ccode_fragment_append (self->source_type_member_definition, (ValaCCodeNode*) self->function);
3787
3819
                _g_free0 (cname);
3788
3820
                _vala_code_node_unref0 (base_type);
3789
3821
        }
3790
 
        self->current_symbol = (_tmp128_ = _vala_code_node_ref0 (old_symbol), _vala_code_node_unref0 (self->current_symbol), _tmp128_);
 
3822
        self->current_symbol = (_tmp129_ = _vala_code_node_ref0 (old_symbol), _vala_code_node_unref0 (self->current_symbol), _tmp129_);
3791
3823
        self->current_method_inner_error = old_method_inner_error;
3792
3824
        _vala_code_node_unref0 (old_symbol);
3793
3825
        _vala_code_node_unref0 (prop);
3838
3870
 
3839
3871
 
3840
3872
gint vala_ccode_base_module_get_block_id (ValaCCodeBaseModule* self, ValaBlock* b) {
3841
 
        gint result;
 
3873
        gint result = 0;
3842
3874
        gint _result_;
3843
3875
        g_return_val_if_fail (self != NULL, 0);
3844
3876
        g_return_val_if_fail (b != NULL, 0);
3852
3884
}
3853
3885
 
3854
3886
 
 
3887
static void vala_ccode_base_module_capture_parameter (ValaCCodeBaseModule* self, ValaFormalParameter* param, ValaCCodeStruct* data, ValaCCodeBlock* cblock, gint block_id, ValaCCodeBlock* free_block) {
 
3888
        ValaDataType* param_type;
 
3889
        char* _tmp1_;
 
3890
        char* _tmp0_;
 
3891
        gboolean _tmp2_ = FALSE;
 
3892
        gboolean is_unowned_delegate;
 
3893
        ValaCCodeExpression* cparam;
 
3894
        gboolean _tmp3_ = FALSE;
 
3895
        gboolean _tmp4_ = FALSE;
 
3896
        ValaCCodeExpressionStatement* _tmp12_;
 
3897
        ValaCCodeAssignment* _tmp11_;
 
3898
        ValaCCodeMemberAccess* _tmp10_;
 
3899
        char* _tmp9_;
 
3900
        ValaCCodeExpression* _tmp8_;
 
3901
        char* _tmp7_;
 
3902
        gboolean _tmp50_ = FALSE;
 
3903
        g_return_if_fail (self != NULL);
 
3904
        g_return_if_fail (param != NULL);
 
3905
        g_return_if_fail (data != NULL);
 
3906
        g_return_if_fail (cblock != NULL);
 
3907
        g_return_if_fail (free_block != NULL);
 
3908
        param_type = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param));
 
3909
        vala_data_type_set_value_owned (param_type, TRUE);
 
3910
        vala_ccode_struct_add_field (data, _tmp0_ = vala_data_type_get_cname (param_type), _tmp1_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)), NULL);
 
3911
        _g_free0 (_tmp1_);
 
3912
        _g_free0 (_tmp0_);
 
3913
        if (VALA_IS_DELEGATE_TYPE (vala_formal_parameter_get_parameter_type (param))) {
 
3914
                _tmp2_ = !vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param));
 
3915
        } else {
 
3916
                _tmp2_ = FALSE;
 
3917
        }
 
3918
        is_unowned_delegate = _tmp2_;
 
3919
        cparam = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) param));
 
3920
        if (vala_ccode_base_module_requires_copy (self, param_type)) {
 
3921
                _tmp4_ = !vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param));
 
3922
        } else {
 
3923
                _tmp4_ = FALSE;
 
3924
        }
 
3925
        if (_tmp4_) {
 
3926
                _tmp3_ = !is_unowned_delegate;
 
3927
        } else {
 
3928
                _tmp3_ = FALSE;
 
3929
        }
 
3930
        if (_tmp3_) {
 
3931
                ValaMemberAccess* ma;
 
3932
                ValaDataType* _tmp5_;
 
3933
                ValaCCodeExpression* _tmp6_;
 
3934
                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) param), NULL);
 
3935
                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
 
3936
                vala_expression_set_value_type ((ValaExpression*) ma, _tmp5_ = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param)));
 
3937
                _vala_code_node_unref0 (_tmp5_);
 
3938
                vala_formal_parameter_set_captured (param, FALSE);
 
3939
                cparam = (_tmp6_ = vala_ccode_base_module_get_ref_cexpression (self, vala_formal_parameter_get_parameter_type (param), cparam, (ValaExpression*) ma, (ValaCodeNode*) param), _vala_ccode_node_unref0 (cparam), _tmp6_);
 
3940
                vala_formal_parameter_set_captured (param, TRUE);
 
3941
                _vala_code_node_unref0 (ma);
 
3942
        }
 
3943
        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp12_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp11_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp10_ = vala_ccode_member_access_new_pointer (_tmp8_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp7_ = g_strdup_printf ("_data%d_", block_id)), _tmp9_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)))), cparam, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
3944
        _vala_ccode_node_unref0 (_tmp12_);
 
3945
        _vala_ccode_node_unref0 (_tmp11_);
 
3946
        _vala_ccode_node_unref0 (_tmp10_);
 
3947
        _g_free0 (_tmp9_);
 
3948
        _vala_ccode_node_unref0 (_tmp8_);
 
3949
        _g_free0 (_tmp7_);
 
3950
        if (VALA_IS_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param))) {
 
3951
                ValaArrayType* array_type;
 
3952
                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param)));
 
3953
                {
 
3954
                        gint dim;
 
3955
                        dim = 1;
 
3956
                        {
 
3957
                                gboolean _tmp13_;
 
3958
                                _tmp13_ = TRUE;
 
3959
                                while (TRUE) {
 
3960
                                        char* _tmp15_;
 
3961
                                        char* _tmp14_;
 
3962
                                        ValaCCodeExpressionStatement* _tmp25_;
 
3963
                                        ValaCCodeAssignment* _tmp24_;
 
3964
                                        ValaCCodeIdentifier* _tmp23_;
 
3965
                                        char* _tmp22_;
 
3966
                                        char* _tmp21_;
 
3967
                                        ValaCCodeMemberAccess* _tmp20_;
 
3968
                                        char* _tmp19_;
 
3969
                                        char* _tmp18_;
 
3970
                                        ValaCCodeExpression* _tmp17_;
 
3971
                                        char* _tmp16_;
 
3972
                                        if (!_tmp13_) {
 
3973
                                                dim++;
 
3974
                                        }
 
3975
                                        _tmp13_ = FALSE;
 
3976
                                        if (!(dim <= vala_array_type_get_rank (array_type))) {
 
3977
                                                break;
 
3978
                                        }
 
3979
                                        vala_ccode_struct_add_field (data, "gint", _tmp15_ = vala_ccode_module_get_array_length_cname ((ValaCCodeModule*) self, _tmp14_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)), dim), NULL);
 
3980
                                        _g_free0 (_tmp15_);
 
3981
                                        _g_free0 (_tmp14_);
 
3982
                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp25_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp24_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp20_ = vala_ccode_member_access_new_pointer (_tmp17_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp16_ = g_strdup_printf ("_data%d_", block_id)), _tmp19_ = vala_ccode_module_get_array_length_cname ((ValaCCodeModule*) self, _tmp18_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)), dim))), (ValaCCodeExpression*) (_tmp23_ = vala_ccode_identifier_new (_tmp22_ = vala_ccode_module_get_array_length_cname ((ValaCCodeModule*) self, _tmp21_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)), dim))), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
3983
                                        _vala_ccode_node_unref0 (_tmp25_);
 
3984
                                        _vala_ccode_node_unref0 (_tmp24_);
 
3985
                                        _vala_ccode_node_unref0 (_tmp23_);
 
3986
                                        _g_free0 (_tmp22_);
 
3987
                                        _g_free0 (_tmp21_);
 
3988
                                        _vala_ccode_node_unref0 (_tmp20_);
 
3989
                                        _g_free0 (_tmp19_);
 
3990
                                        _g_free0 (_tmp18_);
 
3991
                                        _vala_ccode_node_unref0 (_tmp17_);
 
3992
                                        _g_free0 (_tmp16_);
 
3993
                                }
 
3994
                        }
 
3995
                }
 
3996
                _vala_code_node_unref0 (array_type);
 
3997
        } else {
 
3998
                if (VALA_IS_DELEGATE_TYPE (vala_formal_parameter_get_parameter_type (param))) {
 
3999
                        char* _tmp27_;
 
4000
                        char* _tmp26_;
 
4001
                        ValaCCodeExpressionStatement* _tmp37_;
 
4002
                        ValaCCodeAssignment* _tmp36_;
 
4003
                        ValaCCodeIdentifier* _tmp35_;
 
4004
                        char* _tmp34_;
 
4005
                        char* _tmp33_;
 
4006
                        ValaCCodeMemberAccess* _tmp32_;
 
4007
                        char* _tmp31_;
 
4008
                        char* _tmp30_;
 
4009
                        ValaCCodeExpression* _tmp29_;
 
4010
                        char* _tmp28_;
 
4011
                        vala_ccode_struct_add_field (data, "gpointer", _tmp27_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp26_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))), NULL);
 
4012
                        _g_free0 (_tmp27_);
 
4013
                        _g_free0 (_tmp26_);
 
4014
                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp37_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp36_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp32_ = vala_ccode_member_access_new_pointer (_tmp29_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp28_ = g_strdup_printf ("_data%d_", block_id)), _tmp31_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp30_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))))), (ValaCCodeExpression*) (_tmp35_ = vala_ccode_identifier_new (_tmp34_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp33_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))))), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
4015
                        _vala_ccode_node_unref0 (_tmp37_);
 
4016
                        _vala_ccode_node_unref0 (_tmp36_);
 
4017
                        _vala_ccode_node_unref0 (_tmp35_);
 
4018
                        _g_free0 (_tmp34_);
 
4019
                        _g_free0 (_tmp33_);
 
4020
                        _vala_ccode_node_unref0 (_tmp32_);
 
4021
                        _g_free0 (_tmp31_);
 
4022
                        _g_free0 (_tmp30_);
 
4023
                        _vala_ccode_node_unref0 (_tmp29_);
 
4024
                        _g_free0 (_tmp28_);
 
4025
                        if (vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param))) {
 
4026
                                char* _tmp39_;
 
4027
                                char* _tmp38_;
 
4028
                                ValaCCodeExpressionStatement* _tmp49_;
 
4029
                                ValaCCodeAssignment* _tmp48_;
 
4030
                                ValaCCodeIdentifier* _tmp47_;
 
4031
                                char* _tmp46_;
 
4032
                                char* _tmp45_;
 
4033
                                ValaCCodeMemberAccess* _tmp44_;
 
4034
                                char* _tmp43_;
 
4035
                                char* _tmp42_;
 
4036
                                ValaCCodeExpression* _tmp41_;
 
4037
                                char* _tmp40_;
 
4038
                                vala_ccode_struct_add_field (data, "GDestroyNotify", _tmp39_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp38_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))), NULL);
 
4039
                                _g_free0 (_tmp39_);
 
4040
                                _g_free0 (_tmp38_);
 
4041
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp49_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp48_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp44_ = vala_ccode_member_access_new_pointer (_tmp41_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp40_ = g_strdup_printf ("_data%d_", block_id)), _tmp43_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp42_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))))), (ValaCCodeExpression*) (_tmp47_ = vala_ccode_identifier_new (_tmp46_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp45_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))))), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
4042
                                _vala_ccode_node_unref0 (_tmp49_);
 
4043
                                _vala_ccode_node_unref0 (_tmp48_);
 
4044
                                _vala_ccode_node_unref0 (_tmp47_);
 
4045
                                _g_free0 (_tmp46_);
 
4046
                                _g_free0 (_tmp45_);
 
4047
                                _vala_ccode_node_unref0 (_tmp44_);
 
4048
                                _g_free0 (_tmp43_);
 
4049
                                _g_free0 (_tmp42_);
 
4050
                                _vala_ccode_node_unref0 (_tmp41_);
 
4051
                                _g_free0 (_tmp40_);
 
4052
                        }
 
4053
                }
 
4054
        }
 
4055
        if (vala_ccode_base_module_requires_destroy (self, param_type)) {
 
4056
                _tmp50_ = !is_unowned_delegate;
 
4057
        } else {
 
4058
                _tmp50_ = FALSE;
 
4059
        }
 
4060
        if (_tmp50_) {
 
4061
                gboolean old_coroutine;
 
4062
                ValaMemberAccess* ma;
 
4063
                ValaDataType* _tmp51_;
 
4064
                ValaCCodeExpressionStatement* _tmp57_;
 
4065
                ValaCCodeExpression* _tmp56_;
 
4066
                ValaCCodeMemberAccess* _tmp55_;
 
4067
                char* _tmp54_;
 
4068
                ValaCCodeIdentifier* _tmp53_;
 
4069
                char* _tmp52_;
 
4070
                old_coroutine = FALSE;
 
4071
                if (vala_ccode_base_module_get_current_method (self) != NULL) {
 
4072
                        old_coroutine = vala_method_get_coroutine (vala_ccode_base_module_get_current_method (self));
 
4073
                        vala_method_set_coroutine (vala_ccode_base_module_get_current_method (self), FALSE);
 
4074
                }
 
4075
                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) param), NULL);
 
4076
                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
 
4077
                vala_expression_set_value_type ((ValaExpression*) ma, _tmp51_ = vala_data_type_copy (param_type));
 
4078
                _vala_code_node_unref0 (_tmp51_);
 
4079
                vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp57_ = vala_ccode_expression_statement_new (_tmp56_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp55_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp53_ = vala_ccode_identifier_new (_tmp52_ = g_strdup_printf ("_data%d_", block_id))), _tmp54_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)))), vala_formal_parameter_get_parameter_type (param), (ValaExpression*) ma, FALSE))));
 
4080
                _vala_ccode_node_unref0 (_tmp57_);
 
4081
                _vala_ccode_node_unref0 (_tmp56_);
 
4082
                _vala_ccode_node_unref0 (_tmp55_);
 
4083
                _g_free0 (_tmp54_);
 
4084
                _vala_ccode_node_unref0 (_tmp53_);
 
4085
                _g_free0 (_tmp52_);
 
4086
                if (old_coroutine) {
 
4087
                        vala_method_set_coroutine (vala_ccode_base_module_get_current_method (self), TRUE);
 
4088
                }
 
4089
                _vala_code_node_unref0 (ma);
 
4090
        }
 
4091
        _vala_code_node_unref0 (param_type);
 
4092
        _vala_ccode_node_unref0 (cparam);
 
4093
}
 
4094
 
 
4095
 
3855
4096
static void vala_ccode_base_module_real_visit_block (ValaCCodeModule* base, ValaBlock* b) {
3856
4097
        ValaCCodeBaseModule * self;
3857
4098
        ValaSymbol* old_symbol;
3858
4099
        ValaSymbol* _tmp0_;
3859
4100
        ValaList* local_vars;
3860
4101
        ValaCCodeBlock* cblock;
3861
 
        ValaSymbol* _tmp212_;
 
4102
        ValaSymbol* _tmp166_;
3862
4103
        self = (ValaCCodeBaseModule*) base;
3863
4104
        g_return_if_fail (b != NULL);
3864
4105
        old_symbol = _vala_code_node_ref0 (self->current_symbol);
3888
4129
                char* _tmp1_;
3889
4130
                ValaCCodeStruct* _tmp2_;
3890
4131
                ValaCCodeStruct* data;
3891
 
                ValaCCodeVariableDeclarator* _tmp42_;
3892
 
                char* _tmp41_;
3893
 
                ValaCCodeTypeDefinition* _tmp43_;
 
4132
                ValaCCodeVariableDeclarator* _tmp46_;
 
4133
                char* _tmp45_;
 
4134
                ValaCCodeTypeDefinition* _tmp47_;
3894
4135
                ValaCCodeTypeDefinition* _typedef_;
3895
 
                ValaCCodeIdentifier* _tmp44_;
3896
 
                ValaCCodeFunctionCall* _tmp45_;
 
4136
                ValaCCodeIdentifier* _tmp48_;
 
4137
                ValaCCodeFunctionCall* _tmp49_;
3897
4138
                ValaCCodeFunctionCall* data_alloc;
3898
 
                ValaCCodeIdentifier* _tmp46_;
3899
 
                gboolean _tmp47_ = FALSE;
3900
 
                ValaCCodeExpressionStatement* _tmp63_;
3901
 
                ValaCCodeAssignment* _tmp62_;
3902
 
                ValaCCodeIdentifier* _tmp61_;
3903
 
                ValaCCodeMemberAccess* _tmp60_;
3904
 
                ValaCCodeExpression* _tmp59_;
3905
 
                char* _tmp58_;
3906
 
                ValaCCodeIdentifier* _tmp152_;
3907
 
                ValaCCodeFunctionCall* _tmp153_;
 
4139
                ValaCCodeIdentifier* _tmp50_;
 
4140
                gboolean _tmp51_ = FALSE;
 
4141
                ValaCCodeExpressionStatement* _tmp67_;
 
4142
                ValaCCodeAssignment* _tmp66_;
 
4143
                ValaCCodeIdentifier* _tmp65_;
 
4144
                ValaCCodeMemberAccess* _tmp64_;
 
4145
                ValaCCodeExpression* _tmp63_;
 
4146
                char* _tmp62_;
 
4147
                ValaCCodeIdentifier* _tmp103_;
 
4148
                ValaCCodeFunctionCall* _tmp104_;
3908
4149
                ValaCCodeFunctionCall* data_free;
3909
 
                ValaCCodeIdentifier* _tmp154_;
3910
 
                ValaCCodeIdentifier* _tmp156_;
3911
 
                char* _tmp155_;
3912
 
                ValaCCodeExpressionStatement* _tmp157_;
3913
 
                char* _tmp159_;
3914
 
                char* _tmp158_;
3915
 
                ValaCCodeFunction* _tmp160_;
 
4150
                ValaCCodeIdentifier* _tmp105_;
 
4151
                ValaCCodeIdentifier* _tmp107_;
 
4152
                char* _tmp106_;
 
4153
                ValaCCodeExpressionStatement* _tmp108_;
 
4154
                char* _tmp110_;
 
4155
                char* _tmp109_;
 
4156
                ValaCCodeFunction* _tmp111_;
3916
4157
                ValaCCodeFunction* ref_fun;
3917
 
                ValaCCodeFormalParameter* _tmp163_;
3918
 
                char* _tmp162_;
3919
 
                char* _tmp161_;
3920
 
                ValaCCodeFunction* _tmp164_;
3921
 
                ValaCCodeBlock* _tmp165_;
3922
 
                ValaCCodeExpressionStatement* _tmp170_;
3923
 
                ValaCCodeUnaryExpression* _tmp169_;
3924
 
                ValaCCodeMemberAccess* _tmp168_;
3925
 
                ValaCCodeIdentifier* _tmp167_;
3926
 
                char* _tmp166_;
3927
 
                ValaCCodeReturnStatement* _tmp173_;
3928
 
                ValaCCodeIdentifier* _tmp172_;
3929
 
                char* _tmp171_;
3930
 
                char* _tmp174_;
3931
 
                ValaCCodeFunction* _tmp175_;
 
4158
                ValaCCodeFormalParameter* _tmp114_;
 
4159
                char* _tmp113_;
 
4160
                char* _tmp112_;
 
4161
                ValaCCodeFunction* _tmp115_;
 
4162
                ValaCCodeBlock* _tmp116_;
 
4163
                ValaCCodeExpressionStatement* _tmp121_;
 
4164
                ValaCCodeUnaryExpression* _tmp120_;
 
4165
                ValaCCodeMemberAccess* _tmp119_;
 
4166
                ValaCCodeIdentifier* _tmp118_;
 
4167
                char* _tmp117_;
 
4168
                ValaCCodeReturnStatement* _tmp124_;
 
4169
                ValaCCodeIdentifier* _tmp123_;
 
4170
                char* _tmp122_;
 
4171
                char* _tmp125_;
 
4172
                ValaCCodeFunction* _tmp126_;
3932
4173
                ValaCCodeFunction* unref_fun;
3933
 
                ValaCCodeFormalParameter* _tmp178_;
3934
 
                char* _tmp177_;
3935
 
                char* _tmp176_;
3936
 
                ValaCCodeFunction* _tmp179_;
3937
 
                ValaCCodeBlock* _tmp180_;
3938
 
                ValaCCodeConstant* _tmp185_;
3939
 
                ValaCCodeUnaryExpression* _tmp184_;
3940
 
                ValaCCodeMemberAccess* _tmp183_;
3941
 
                ValaCCodeIdentifier* _tmp182_;
3942
 
                char* _tmp181_;
3943
 
                ValaCCodeBinaryExpression* _tmp186_;
 
4174
                ValaCCodeFormalParameter* _tmp129_;
 
4175
                char* _tmp128_;
 
4176
                char* _tmp127_;
 
4177
                ValaCCodeFunction* _tmp130_;
 
4178
                ValaCCodeBlock* _tmp131_;
 
4179
                ValaCCodeConstant* _tmp136_;
 
4180
                ValaCCodeUnaryExpression* _tmp135_;
 
4181
                ValaCCodeMemberAccess* _tmp134_;
 
4182
                ValaCCodeIdentifier* _tmp133_;
 
4183
                char* _tmp132_;
 
4184
                ValaCCodeBinaryExpression* _tmp137_;
3944
4185
                ValaCCodeBinaryExpression* dec;
3945
 
                ValaCCodeIfStatement* _tmp187_;
 
4186
                ValaCCodeIfStatement* _tmp138_;
3946
4187
                parent_block = _vala_code_node_ref0 (vala_ccode_base_module_next_closure_block (self, vala_symbol_get_parent_symbol ((ValaSymbol*) b)));
3947
4188
                block_id = vala_ccode_base_module_get_block_id (self, b);
3948
4189
                struct_name = g_strdup_printf ("Block%dData", block_id);
3949
4190
                free_block = vala_ccode_block_new ();
3950
4191
                data = (_tmp2_ = vala_ccode_struct_new (_tmp1_ = g_strconcat ("_", struct_name, NULL)), _g_free0 (_tmp1_), _tmp2_);
3951
 
                vala_ccode_struct_add_field (data, "int", "_ref_count_");
 
4192
                vala_ccode_struct_add_field (data, "int", "_ref_count_", NULL);
3952
4193
                if (parent_block != NULL) {
3953
4194
                        gint parent_block_id;
3954
4195
                        char* _tmp4_;
3963
4204
                        char* _tmp8_;
3964
4205
                        ValaCCodeExpressionStatement* _tmp12_;
3965
4206
                        parent_block_id = vala_ccode_base_module_get_block_id (self, parent_block);
3966
 
                        vala_ccode_struct_add_field (data, _tmp3_ = g_strdup_printf ("Block%dData *", parent_block_id), _tmp4_ = g_strdup_printf ("_data%d_", parent_block_id));
 
4207
                        vala_ccode_struct_add_field (data, _tmp3_ = g_strdup_printf ("Block%dData *", parent_block_id), _tmp4_ = g_strdup_printf ("_data%d_", parent_block_id), NULL);
3967
4208
                        _g_free0 (_tmp4_);
3968
4209
                        _g_free0 (_tmp3_);
3969
4210
                        unref_call = (_tmp7_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp6_ = vala_ccode_identifier_new (_tmp5_ = g_strdup_printf ("block%d_data_unref", parent_block_id)))), _vala_ccode_node_unref0 (_tmp6_), _g_free0 (_tmp5_), _tmp7_);
3977
4218
                        _vala_ccode_node_unref0 (unref_call);
3978
4219
                } else {
3979
4220
                        gboolean _tmp13_ = FALSE;
 
4221
                        gboolean _tmp14_ = FALSE;
3980
4222
                        if (self->in_constructor) {
 
4223
                                _tmp14_ = TRUE;
 
4224
                        } else {
 
4225
                                gboolean _tmp15_ = FALSE;
 
4226
                                if (vala_ccode_base_module_get_current_method (self) != NULL) {
 
4227
                                        _tmp15_ = vala_method_get_binding (vala_ccode_base_module_get_current_method (self)) == MEMBER_BINDING_INSTANCE;
 
4228
                                } else {
 
4229
                                        _tmp15_ = FALSE;
 
4230
                                }
 
4231
                                _tmp14_ = _tmp15_;
 
4232
                        }
 
4233
                        if (_tmp14_) {
3981
4234
                                _tmp13_ = TRUE;
3982
4235
                        } else {
3983
 
                                gboolean _tmp14_ = FALSE;
3984
 
                                if (vala_ccode_base_module_get_current_method (self) != NULL) {
3985
 
                                        _tmp14_ = vala_method_get_binding (vala_ccode_base_module_get_current_method (self)) == MEMBER_BINDING_INSTANCE;
 
4236
                                gboolean _tmp16_ = FALSE;
 
4237
                                if (vala_ccode_base_module_get_current_property_accessor (self) != NULL) {
 
4238
                                        _tmp16_ = vala_property_get_binding (vala_property_accessor_get_prop (vala_ccode_base_module_get_current_property_accessor (self))) == MEMBER_BINDING_INSTANCE;
3986
4239
                                } else {
3987
 
                                        _tmp14_ = FALSE;
 
4240
                                        _tmp16_ = FALSE;
3988
4241
                                }
3989
 
                                _tmp13_ = _tmp14_;
 
4242
                                _tmp13_ = _tmp16_;
3990
4243
                        }
3991
4244
                        if (_tmp13_) {
3992
 
                                char* _tmp16_;
3993
 
                                char* _tmp15_;
3994
 
                                ValaMemberAccess* ma;
3995
 
                                ValaCCodeExpressionStatement* _tmp22_;
3996
 
                                ValaCCodeExpression* _tmp21_;
3997
 
                                ValaObjectType* _tmp20_;
3998
 
                                ValaCCodeMemberAccess* _tmp19_;
3999
 
                                ValaCCodeIdentifier* _tmp18_;
 
4245
                                char* _tmp18_;
4000
4246
                                char* _tmp17_;
4001
 
                                vala_ccode_struct_add_field (data, _tmp16_ = g_strdup_printf ("%s *", _tmp15_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) vala_ccode_base_module_get_current_class (self), FALSE)), "self");
4002
 
                                _g_free0 (_tmp16_);
4003
 
                                _g_free0 (_tmp15_);
 
4247
                                ValaMemberAccess* ma;
 
4248
                                ValaCCodeExpressionStatement* _tmp24_;
 
4249
                                ValaCCodeExpression* _tmp23_;
 
4250
                                ValaObjectType* _tmp22_;
 
4251
                                ValaCCodeMemberAccess* _tmp21_;
 
4252
                                ValaCCodeIdentifier* _tmp20_;
 
4253
                                char* _tmp19_;
 
4254
                                vala_ccode_struct_add_field (data, _tmp18_ = g_strdup_printf ("%s *", _tmp17_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) vala_ccode_base_module_get_current_class (self), FALSE)), "self", NULL);
 
4255
                                _g_free0 (_tmp18_);
 
4256
                                _g_free0 (_tmp17_);
4004
4257
                                ma = vala_member_access_new_simple ("this", NULL);
4005
4258
                                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) vala_ccode_base_module_get_current_class (self));
4006
 
                                vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp22_ = vala_ccode_expression_statement_new (_tmp21_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp19_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp18_ = vala_ccode_identifier_new (_tmp17_ = g_strdup_printf ("_data%d_", block_id))), "self")), (ValaDataType*) (_tmp20_ = vala_object_type_new ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class (self))), (ValaExpression*) ma, FALSE))));
4007
 
                                _vala_ccode_node_unref0 (_tmp22_);
 
4259
                                vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp24_ = vala_ccode_expression_statement_new (_tmp23_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp21_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp20_ = vala_ccode_identifier_new (_tmp19_ = g_strdup_printf ("_data%d_", block_id))), "self")), (ValaDataType*) (_tmp22_ = vala_object_type_new ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class (self))), (ValaExpression*) ma, FALSE))));
 
4260
                                _vala_ccode_node_unref0 (_tmp24_);
 
4261
                                _vala_ccode_node_unref0 (_tmp23_);
 
4262
                                _vala_code_node_unref0 (_tmp22_);
4008
4263
                                _vala_ccode_node_unref0 (_tmp21_);
4009
 
                                _vala_code_node_unref0 (_tmp20_);
4010
 
                                _vala_ccode_node_unref0 (_tmp19_);
4011
 
                                _vala_ccode_node_unref0 (_tmp18_);
4012
 
                                _g_free0 (_tmp17_);
 
4264
                                _vala_ccode_node_unref0 (_tmp20_);
 
4265
                                _g_free0 (_tmp19_);
4013
4266
                                _vala_code_node_unref0 (ma);
4014
4267
                        }
4015
4268
                }
4023
4276
                                }
4024
4277
                                local = (ValaLocalVariable*) vala_iterator_get (_local_it);
4025
4278
                                if (vala_local_variable_get_captured (local)) {
 
4279
                                        char* _tmp28_;
 
4280
                                        char* _tmp27_;
4026
4281
                                        char* _tmp26_;
4027
4282
                                        char* _tmp25_;
4028
 
                                        char* _tmp24_;
4029
 
                                        char* _tmp23_;
4030
 
                                        vala_ccode_struct_add_field (data, _tmp23_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local)), _tmp26_ = g_strconcat (_tmp24_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), _tmp25_ = vala_data_type_get_cdeclarator_suffix (vala_local_variable_get_variable_type (local)), NULL));
 
4283
                                        vala_ccode_struct_add_field (data, _tmp25_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local)), _tmp28_ = g_strconcat (_tmp26_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), _tmp27_ = vala_data_type_get_cdeclarator_suffix (vala_local_variable_get_variable_type (local)), NULL), NULL);
 
4284
                                        _g_free0 (_tmp28_);
 
4285
                                        _g_free0 (_tmp27_);
4031
4286
                                        _g_free0 (_tmp26_);
4032
4287
                                        _g_free0 (_tmp25_);
4033
 
                                        _g_free0 (_tmp24_);
4034
 
                                        _g_free0 (_tmp23_);
4035
4288
                                        if (VALA_IS_ARRAY_TYPE (vala_local_variable_get_variable_type (local))) {
4036
4289
                                                ValaArrayType* array_type;
 
4290
                                                char* _tmp33_;
 
4291
                                                char* _tmp32_;
4037
4292
                                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_local_variable_get_variable_type (local)));
4038
4293
                                                {
4039
4294
                                                        gint dim;
4040
4295
                                                        dim = 1;
4041
4296
                                                        {
4042
 
                                                                gboolean _tmp27_;
4043
 
                                                                _tmp27_ = TRUE;
 
4297
                                                                gboolean _tmp29_;
 
4298
                                                                _tmp29_ = TRUE;
4044
4299
                                                                while (TRUE) {
4045
 
                                                                        char* _tmp29_;
4046
 
                                                                        char* _tmp28_;
4047
 
                                                                        if (!_tmp27_) {
 
4300
                                                                        char* _tmp31_;
 
4301
                                                                        char* _tmp30_;
 
4302
                                                                        if (!_tmp29_) {
4048
4303
                                                                                dim++;
4049
4304
                                                                        }
4050
 
                                                                        _tmp27_ = FALSE;
 
4305
                                                                        _tmp29_ = FALSE;
4051
4306
                                                                        if (!(dim <= vala_array_type_get_rank (array_type))) {
4052
4307
                                                                                break;
4053
4308
                                                                        }
4054
 
                                                                        vala_ccode_struct_add_field (data, "gint", _tmp29_ = vala_ccode_module_get_array_length_cname ((ValaCCodeModule*) self, _tmp28_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), dim));
4055
 
                                                                        _g_free0 (_tmp29_);
4056
 
                                                                        _g_free0 (_tmp28_);
 
4309
                                                                        vala_ccode_struct_add_field (data, "gint", _tmp31_ = vala_ccode_module_get_array_length_cname ((ValaCCodeModule*) self, _tmp30_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), dim), NULL);
 
4310
                                                                        _g_free0 (_tmp31_);
 
4311
                                                                        _g_free0 (_tmp30_);
4057
4312
                                                                }
4058
4313
                                                        }
4059
4314
                                                }
 
4315
                                                vala_ccode_struct_add_field (data, "gint", _tmp33_ = vala_ccode_module_get_array_size_cname ((ValaCCodeModule*) self, _tmp32_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local))), NULL);
 
4316
                                                _g_free0 (_tmp33_);
 
4317
                                                _g_free0 (_tmp32_);
4060
4318
                                                _vala_code_node_unref0 (array_type);
4061
4319
                                        } else {
4062
4320
                                                if (VALA_IS_DELEGATE_TYPE (vala_local_variable_get_variable_type (local))) {
4063
 
                                                        char* _tmp31_;
4064
 
                                                        char* _tmp30_;
4065
 
                                                        vala_ccode_struct_add_field (data, "gpointer", _tmp31_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp30_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local))));
4066
 
                                                        _g_free0 (_tmp31_);
4067
 
                                                        _g_free0 (_tmp30_);
 
4321
                                                        char* _tmp35_;
 
4322
                                                        char* _tmp34_;
 
4323
                                                        vala_ccode_struct_add_field (data, "gpointer", _tmp35_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp34_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local))), NULL);
 
4324
                                                        _g_free0 (_tmp35_);
 
4325
                                                        _g_free0 (_tmp34_);
4068
4326
                                                        if (vala_data_type_get_value_owned (vala_local_variable_get_variable_type (local))) {
4069
 
                                                                char* _tmp33_;
4070
 
                                                                char* _tmp32_;
4071
 
                                                                vala_ccode_struct_add_field (data, "GDestroyNotify", _tmp33_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp32_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local))));
4072
 
                                                                _g_free0 (_tmp33_);
4073
 
                                                                _g_free0 (_tmp32_);
 
4327
                                                                char* _tmp37_;
 
4328
                                                                char* _tmp36_;
 
4329
                                                                vala_ccode_struct_add_field (data, "GDestroyNotify", _tmp37_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp36_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local))), NULL);
 
4330
                                                                _g_free0 (_tmp37_);
 
4331
                                                                _g_free0 (_tmp36_);
4074
4332
                                                        }
4075
4333
                                                }
4076
4334
                                        }
4077
4335
                                        if (vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local))) {
4078
4336
                                                gboolean old_coroutine;
4079
4337
                                                ValaMemberAccess* ma;
4080
 
                                                ValaDataType* _tmp34_;
4081
 
                                                ValaCCodeExpressionStatement* _tmp40_;
4082
 
                                                ValaCCodeExpression* _tmp39_;
4083
 
                                                ValaCCodeMemberAccess* _tmp38_;
4084
 
                                                char* _tmp37_;
4085
 
                                                ValaCCodeIdentifier* _tmp36_;
4086
 
                                                char* _tmp35_;
 
4338
                                                ValaDataType* _tmp38_;
 
4339
                                                ValaCCodeExpressionStatement* _tmp44_;
 
4340
                                                ValaCCodeExpression* _tmp43_;
 
4341
                                                ValaCCodeMemberAccess* _tmp42_;
 
4342
                                                char* _tmp41_;
 
4343
                                                ValaCCodeIdentifier* _tmp40_;
 
4344
                                                char* _tmp39_;
4087
4345
                                                old_coroutine = FALSE;
4088
4346
                                                if (vala_ccode_base_module_get_current_method (self) != NULL) {
4089
4347
                                                        old_coroutine = vala_method_get_coroutine (vala_ccode_base_module_get_current_method (self));
4091
4349
                                                }
4092
4350
                                                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
4093
4351
                                                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
4094
 
                                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp34_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
4095
 
                                                _vala_code_node_unref0 (_tmp34_);
4096
 
                                                vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp40_ = vala_ccode_expression_statement_new (_tmp39_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp38_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp36_ = vala_ccode_identifier_new (_tmp35_ = g_strdup_printf ("_data%d_", block_id))), _tmp37_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)))), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
4352
                                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp38_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
4353
                                                _vala_code_node_unref0 (_tmp38_);
 
4354
                                                vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp44_ = vala_ccode_expression_statement_new (_tmp43_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp42_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp40_ = vala_ccode_identifier_new (_tmp39_ = g_strdup_printf ("_data%d_", block_id))), _tmp41_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)))), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
4355
                                                _vala_ccode_node_unref0 (_tmp44_);
 
4356
                                                _vala_ccode_node_unref0 (_tmp43_);
 
4357
                                                _vala_ccode_node_unref0 (_tmp42_);
 
4358
                                                _g_free0 (_tmp41_);
4097
4359
                                                _vala_ccode_node_unref0 (_tmp40_);
4098
 
                                                _vala_ccode_node_unref0 (_tmp39_);
4099
 
                                                _vala_ccode_node_unref0 (_tmp38_);
4100
 
                                                _g_free0 (_tmp37_);
4101
 
                                                _vala_ccode_node_unref0 (_tmp36_);
4102
 
                                                _g_free0 (_tmp35_);
 
4360
                                                _g_free0 (_tmp39_);
4103
4361
                                                if (old_coroutine) {
4104
4362
                                                        vala_method_set_coroutine (vala_ccode_base_module_get_current_method (self), TRUE);
4105
4363
                                                }
4110
4368
                        }
4111
4369
                        _vala_collection_object_unref0 (_local_it);
4112
4370
                }
4113
 
                _typedef_ = (_tmp43_ = vala_ccode_type_definition_new (_tmp41_ = g_strconcat ("struct _", struct_name, NULL), (ValaCCodeDeclarator*) (_tmp42_ = vala_ccode_variable_declarator_new (struct_name, NULL, NULL))), _vala_ccode_node_unref0 (_tmp42_), _g_free0 (_tmp41_), _tmp43_);
 
4371
                _typedef_ = (_tmp47_ = vala_ccode_type_definition_new (_tmp45_ = g_strconcat ("struct _", struct_name, NULL), (ValaCCodeDeclarator*) (_tmp46_ = vala_ccode_variable_declarator_new (struct_name, NULL, NULL))), _vala_ccode_node_unref0 (_tmp46_), _g_free0 (_tmp45_), _tmp47_);
4114
4372
                vala_ccode_declaration_space_add_type_declaration (self->source_declarations, (ValaCCodeNode*) _typedef_);
4115
4373
                vala_ccode_declaration_space_add_type_definition (self->source_declarations, (ValaCCodeNode*) data);
4116
 
                data_alloc = (_tmp45_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp44_ = vala_ccode_identifier_new ("g_slice_new0"))), _vala_ccode_node_unref0 (_tmp44_), _tmp45_);
4117
 
                vala_ccode_function_call_add_argument (data_alloc, (ValaCCodeExpression*) (_tmp46_ = vala_ccode_identifier_new (struct_name)));
4118
 
                _vala_ccode_node_unref0 (_tmp46_);
 
4374
                data_alloc = (_tmp49_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp48_ = vala_ccode_identifier_new ("g_slice_new0"))), _vala_ccode_node_unref0 (_tmp48_), _tmp49_);
 
4375
                vala_ccode_function_call_add_argument (data_alloc, (ValaCCodeExpression*) (_tmp50_ = vala_ccode_identifier_new (struct_name)));
 
4376
                _vala_ccode_node_unref0 (_tmp50_);
4119
4377
                if (vala_ccode_base_module_get_current_method (self) != NULL) {
4120
 
                        _tmp47_ = vala_method_get_coroutine (vala_ccode_base_module_get_current_method (self));
 
4378
                        _tmp51_ = vala_method_get_coroutine (vala_ccode_base_module_get_current_method (self));
4121
4379
                } else {
4122
 
                        _tmp47_ = FALSE;
 
4380
                        _tmp51_ = FALSE;
4123
4381
                }
4124
 
                if (_tmp47_) {
4125
 
                        char* _tmp49_;
4126
 
                        char* _tmp48_;
4127
 
                        ValaCCodeExpressionStatement* _tmp53_;
4128
 
                        ValaCCodeAssignment* _tmp52_;
4129
 
                        ValaCCodeExpression* _tmp51_;
4130
 
                        char* _tmp50_;
4131
 
                        vala_ccode_struct_add_field (self->closure_struct, _tmp48_ = g_strconcat (struct_name, "*", NULL), _tmp49_ = g_strdup_printf ("_data%d_", block_id));
4132
 
                        _g_free0 (_tmp49_);
4133
 
                        _g_free0 (_tmp48_);
4134
 
                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp53_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp52_ = vala_ccode_assignment_new (_tmp51_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp50_ = g_strdup_printf ("_data%d_", block_id)), (ValaCCodeExpression*) data_alloc, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
4135
 
                        _vala_ccode_node_unref0 (_tmp53_);
4136
 
                        _vala_ccode_node_unref0 (_tmp52_);
4137
 
                        _vala_ccode_node_unref0 (_tmp51_);
4138
 
                        _g_free0 (_tmp50_);
4139
 
                } else {
 
4382
                if (_tmp51_) {
 
4383
                        char* _tmp53_;
 
4384
                        char* _tmp52_;
 
4385
                        ValaCCodeExpressionStatement* _tmp57_;
 
4386
                        ValaCCodeAssignment* _tmp56_;
 
4387
                        ValaCCodeExpression* _tmp55_;
4140
4388
                        char* _tmp54_;
4141
 
                        ValaCCodeDeclaration* _tmp55_;
 
4389
                        vala_ccode_struct_add_field (self->closure_struct, _tmp52_ = g_strconcat (struct_name, "*", NULL), _tmp53_ = g_strdup_printf ("_data%d_", block_id), NULL);
 
4390
                        _g_free0 (_tmp53_);
 
4391
                        _g_free0 (_tmp52_);
 
4392
                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp57_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp56_ = vala_ccode_assignment_new (_tmp55_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp54_ = g_strdup_printf ("_data%d_", block_id)), (ValaCCodeExpression*) data_alloc, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
4393
                        _vala_ccode_node_unref0 (_tmp57_);
 
4394
                        _vala_ccode_node_unref0 (_tmp56_);
 
4395
                        _vala_ccode_node_unref0 (_tmp55_);
 
4396
                        _g_free0 (_tmp54_);
 
4397
                } else {
 
4398
                        char* _tmp58_;
 
4399
                        ValaCCodeDeclaration* _tmp59_;
4142
4400
                        ValaCCodeDeclaration* data_decl;
4143
 
                        ValaCCodeVariableDeclarator* _tmp57_;
4144
 
                        char* _tmp56_;
4145
 
                        data_decl = (_tmp55_ = vala_ccode_declaration_new (_tmp54_ = g_strconcat (struct_name, "*", NULL)), _g_free0 (_tmp54_), _tmp55_);
4146
 
                        vala_ccode_declaration_add_declarator (data_decl, (ValaCCodeDeclarator*) (_tmp57_ = vala_ccode_variable_declarator_new (_tmp56_ = g_strdup_printf ("_data%d_", block_id), (ValaCCodeExpression*) data_alloc, NULL)));
4147
 
                        _vala_ccode_node_unref0 (_tmp57_);
4148
 
                        _g_free0 (_tmp56_);
 
4401
                        ValaCCodeVariableDeclarator* _tmp61_;
 
4402
                        char* _tmp60_;
 
4403
                        data_decl = (_tmp59_ = vala_ccode_declaration_new (_tmp58_ = g_strconcat (struct_name, "*", NULL)), _g_free0 (_tmp58_), _tmp59_);
 
4404
                        vala_ccode_declaration_add_declarator (data_decl, (ValaCCodeDeclarator*) (_tmp61_ = vala_ccode_variable_declarator_new (_tmp60_ = g_strdup_printf ("_data%d_", block_id), (ValaCCodeExpression*) data_alloc, NULL)));
 
4405
                        _vala_ccode_node_unref0 (_tmp61_);
 
4406
                        _g_free0 (_tmp60_);
4149
4407
                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) data_decl);
4150
4408
                        _vala_ccode_node_unref0 (data_decl);
4151
4409
                }
4152
 
                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp63_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp62_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp60_ = vala_ccode_member_access_new_pointer (_tmp59_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp58_ = g_strdup_printf ("_data%d_", block_id)), "_ref_count_")), (ValaCCodeExpression*) (_tmp61_ = vala_ccode_identifier_new ("1")), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
4410
                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp67_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp66_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp64_ = vala_ccode_member_access_new_pointer (_tmp63_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp62_ = g_strdup_printf ("_data%d_", block_id)), "_ref_count_")), (ValaCCodeExpression*) (_tmp65_ = vala_ccode_identifier_new ("1")), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
4411
                _vala_ccode_node_unref0 (_tmp67_);
 
4412
                _vala_ccode_node_unref0 (_tmp66_);
 
4413
                _vala_ccode_node_unref0 (_tmp65_);
 
4414
                _vala_ccode_node_unref0 (_tmp64_);
4153
4415
                _vala_ccode_node_unref0 (_tmp63_);
4154
 
                _vala_ccode_node_unref0 (_tmp62_);
4155
 
                _vala_ccode_node_unref0 (_tmp61_);
4156
 
                _vala_ccode_node_unref0 (_tmp60_);
4157
 
                _vala_ccode_node_unref0 (_tmp59_);
4158
 
                _g_free0 (_tmp58_);
 
4416
                _g_free0 (_tmp62_);
4159
4417
                if (parent_block != NULL) {
4160
4418
                        gint parent_block_id;
4161
 
                        ValaCCodeIdentifier* _tmp65_;
4162
 
                        char* _tmp64_;
4163
 
                        ValaCCodeFunctionCall* _tmp66_;
 
4419
                        ValaCCodeIdentifier* _tmp69_;
 
4420
                        char* _tmp68_;
 
4421
                        ValaCCodeFunctionCall* _tmp70_;
4164
4422
                        ValaCCodeFunctionCall* ref_call;
4165
 
                        ValaCCodeExpression* _tmp68_;
4166
 
                        char* _tmp67_;
4167
 
                        ValaCCodeExpressionStatement* _tmp74_;
4168
 
                        ValaCCodeAssignment* _tmp73_;
4169
 
                        ValaCCodeMemberAccess* _tmp72_;
 
4423
                        ValaCCodeExpression* _tmp72_;
4170
4424
                        char* _tmp71_;
4171
 
                        ValaCCodeExpression* _tmp70_;
4172
 
                        char* _tmp69_;
 
4425
                        ValaCCodeExpressionStatement* _tmp78_;
 
4426
                        ValaCCodeAssignment* _tmp77_;
 
4427
                        ValaCCodeMemberAccess* _tmp76_;
 
4428
                        char* _tmp75_;
 
4429
                        ValaCCodeExpression* _tmp74_;
 
4430
                        char* _tmp73_;
4173
4431
                        parent_block_id = vala_ccode_base_module_get_block_id (self, parent_block);
4174
 
                        ref_call = (_tmp66_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp65_ = vala_ccode_identifier_new (_tmp64_ = g_strdup_printf ("block%d_data_ref", parent_block_id)))), _vala_ccode_node_unref0 (_tmp65_), _g_free0 (_tmp64_), _tmp66_);
4175
 
                        vala_ccode_function_call_add_argument (ref_call, _tmp68_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp67_ = g_strdup_printf ("_data%d_", parent_block_id)));
4176
 
                        _vala_ccode_node_unref0 (_tmp68_);
4177
 
                        _g_free0 (_tmp67_);
4178
 
                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp74_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp73_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp72_ = vala_ccode_member_access_new_pointer (_tmp70_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp69_ = g_strdup_printf ("_data%d_", block_id)), _tmp71_ = g_strdup_printf ("_data%d_", parent_block_id))), (ValaCCodeExpression*) ref_call, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
4179
 
                        _vala_ccode_node_unref0 (_tmp74_);
4180
 
                        _vala_ccode_node_unref0 (_tmp73_);
 
4432
                        ref_call = (_tmp70_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp69_ = vala_ccode_identifier_new (_tmp68_ = g_strdup_printf ("block%d_data_ref", parent_block_id)))), _vala_ccode_node_unref0 (_tmp69_), _g_free0 (_tmp68_), _tmp70_);
 
4433
                        vala_ccode_function_call_add_argument (ref_call, _tmp72_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp71_ = g_strdup_printf ("_data%d_", parent_block_id)));
4181
4434
                        _vala_ccode_node_unref0 (_tmp72_);
4182
4435
                        _g_free0 (_tmp71_);
4183
 
                        _vala_ccode_node_unref0 (_tmp70_);
4184
 
                        _g_free0 (_tmp69_);
 
4436
                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp78_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp77_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp76_ = vala_ccode_member_access_new_pointer (_tmp74_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp73_ = g_strdup_printf ("_data%d_", block_id)), _tmp75_ = g_strdup_printf ("_data%d_", parent_block_id))), (ValaCCodeExpression*) ref_call, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
4437
                        _vala_ccode_node_unref0 (_tmp78_);
 
4438
                        _vala_ccode_node_unref0 (_tmp77_);
 
4439
                        _vala_ccode_node_unref0 (_tmp76_);
 
4440
                        _g_free0 (_tmp75_);
 
4441
                        _vala_ccode_node_unref0 (_tmp74_);
 
4442
                        _g_free0 (_tmp73_);
4185
4443
                        _vala_ccode_node_unref0 (ref_call);
4186
4444
                } else {
4187
 
                        gboolean _tmp75_ = FALSE;
 
4445
                        gboolean _tmp79_ = FALSE;
 
4446
                        gboolean _tmp80_ = FALSE;
4188
4447
                        if (self->in_constructor) {
4189
 
                                _tmp75_ = TRUE;
 
4448
                                _tmp80_ = TRUE;
4190
4449
                        } else {
4191
 
                                gboolean _tmp76_ = FALSE;
 
4450
                                gboolean _tmp81_ = FALSE;
 
4451
                                gboolean _tmp82_ = FALSE;
4192
4452
                                if (vala_ccode_base_module_get_current_method (self) != NULL) {
4193
 
                                        _tmp76_ = vala_method_get_binding (vala_ccode_base_module_get_current_method (self)) == MEMBER_BINDING_INSTANCE;
4194
 
                                } else {
4195
 
                                        _tmp76_ = FALSE;
4196
 
                                }
4197
 
                                _tmp75_ = _tmp76_;
4198
 
                        }
4199
 
                        if (_tmp75_) {
4200
 
                                ValaCCodeExpression* _tmp78_;
4201
 
                                ValaObjectType* _tmp77_;
4202
 
                                ValaCCodeFunctionCall* _tmp79_;
 
4453
                                        _tmp82_ = vala_method_get_binding (vala_ccode_base_module_get_current_method (self)) == MEMBER_BINDING_INSTANCE;
 
4454
                                } else {
 
4455
                                        _tmp82_ = FALSE;
 
4456
                                }
 
4457
                                if (_tmp82_) {
 
4458
                                        gboolean _tmp83_ = FALSE;
 
4459
                                        if (!VALA_IS_CREATION_METHOD (vala_ccode_base_module_get_current_method (self))) {
 
4460
                                                _tmp83_ = TRUE;
 
4461
                                        } else {
 
4462
                                                _tmp83_ = vala_method_get_body (vala_ccode_base_module_get_current_method (self)) != b;
 
4463
                                        }
 
4464
                                        _tmp81_ = _tmp83_;
 
4465
                                } else {
 
4466
                                        _tmp81_ = FALSE;
 
4467
                                }
 
4468
                                _tmp80_ = _tmp81_;
 
4469
                        }
 
4470
                        if (_tmp80_) {
 
4471
                                _tmp79_ = TRUE;
 
4472
                        } else {
 
4473
                                gboolean _tmp84_ = FALSE;
 
4474
                                if (vala_ccode_base_module_get_current_property_accessor (self) != NULL) {
 
4475
                                        _tmp84_ = vala_property_get_binding (vala_property_accessor_get_prop (vala_ccode_base_module_get_current_property_accessor (self))) == MEMBER_BINDING_INSTANCE;
 
4476
                                } else {
 
4477
                                        _tmp84_ = FALSE;
 
4478
                                }
 
4479
                                _tmp79_ = _tmp84_;
 
4480
                        }
 
4481
                        if (_tmp79_) {
 
4482
                                ValaCCodeExpression* _tmp86_;
 
4483
                                ValaObjectType* _tmp85_;
 
4484
                                ValaCCodeFunctionCall* _tmp87_;
4203
4485
                                ValaCCodeFunctionCall* ref_call;
4204
 
                                ValaCCodeExpression* _tmp80_;
4205
 
                                ValaCCodeExpressionStatement* _tmp85_;
4206
 
                                ValaCCodeAssignment* _tmp84_;
4207
 
                                ValaCCodeMemberAccess* _tmp83_;
4208
 
                                ValaCCodeExpression* _tmp82_;
4209
 
                                char* _tmp81_;
4210
 
                                ref_call = (_tmp79_ = vala_ccode_function_call_new (_tmp78_ = vala_ccode_base_module_get_dup_func_expression (self, (ValaDataType*) (_tmp77_ = vala_object_type_new ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class (self))), vala_code_node_get_source_reference ((ValaCodeNode*) b), FALSE)), _vala_ccode_node_unref0 (_tmp78_), _vala_code_node_unref0 (_tmp77_), _tmp79_);
4211
 
                                vala_ccode_function_call_add_argument (ref_call, _tmp80_ = vala_ccode_base_module_get_result_cexpression (self, "self"));
4212
 
                                _vala_ccode_node_unref0 (_tmp80_);
4213
 
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp85_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp84_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp83_ = vala_ccode_member_access_new_pointer (_tmp82_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp81_ = g_strdup_printf ("_data%d_", block_id)), "self")), (ValaCCodeExpression*) ref_call, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
4214
 
                                _vala_ccode_node_unref0 (_tmp85_);
4215
 
                                _vala_ccode_node_unref0 (_tmp84_);
4216
 
                                _vala_ccode_node_unref0 (_tmp83_);
4217
 
                                _vala_ccode_node_unref0 (_tmp82_);
4218
 
                                _g_free0 (_tmp81_);
 
4486
                                ValaCCodeExpression* _tmp88_;
 
4487
                                ValaCCodeExpressionStatement* _tmp93_;
 
4488
                                ValaCCodeAssignment* _tmp92_;
 
4489
                                ValaCCodeMemberAccess* _tmp91_;
 
4490
                                ValaCCodeExpression* _tmp90_;
 
4491
                                char* _tmp89_;
 
4492
                                ref_call = (_tmp87_ = vala_ccode_function_call_new (_tmp86_ = vala_ccode_base_module_get_dup_func_expression (self, (ValaDataType*) (_tmp85_ = vala_object_type_new ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class (self))), vala_code_node_get_source_reference ((ValaCodeNode*) b), FALSE)), _vala_ccode_node_unref0 (_tmp86_), _vala_code_node_unref0 (_tmp85_), _tmp87_);
 
4493
                                vala_ccode_function_call_add_argument (ref_call, _tmp88_ = vala_ccode_base_module_get_result_cexpression (self, "self"));
 
4494
                                _vala_ccode_node_unref0 (_tmp88_);
 
4495
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp93_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp92_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp91_ = vala_ccode_member_access_new_pointer (_tmp90_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp89_ = g_strdup_printf ("_data%d_", block_id)), "self")), (ValaCCodeExpression*) ref_call, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
4496
                                _vala_ccode_node_unref0 (_tmp93_);
 
4497
                                _vala_ccode_node_unref0 (_tmp92_);
 
4498
                                _vala_ccode_node_unref0 (_tmp91_);
 
4499
                                _vala_ccode_node_unref0 (_tmp90_);
 
4500
                                _g_free0 (_tmp89_);
4219
4501
                                _vala_ccode_node_unref0 (ref_call);
4220
4502
                        }
4221
4503
                }
4224
4506
                        ValaCCodeFragment* cfrag;
4225
4507
                        m = _vala_code_node_ref0 (VALA_METHOD (vala_symbol_get_parent_symbol ((ValaSymbol*) b)));
4226
4508
                        {
4227
 
                                ValaList* _tmp86_;
4228
 
                                ValaIterator* _tmp87_;
 
4509
                                ValaList* _tmp94_;
 
4510
                                ValaIterator* _tmp95_;
4229
4511
                                ValaIterator* _param_it;
4230
 
                                _param_it = (_tmp87_ = vala_iterable_iterator ((ValaIterable*) (_tmp86_ = vala_method_get_parameters (m))), _vala_collection_object_unref0 (_tmp86_), _tmp87_);
 
4512
                                _param_it = (_tmp95_ = vala_iterable_iterator ((ValaIterable*) (_tmp94_ = vala_method_get_parameters (m))), _vala_collection_object_unref0 (_tmp94_), _tmp95_);
4231
4513
                                while (TRUE) {
4232
4514
                                        ValaFormalParameter* param;
4233
4515
                                        if (!vala_iterator_next (_param_it)) {
4235
4517
                                        }
4236
4518
                                        param = (ValaFormalParameter*) vala_iterator_get (_param_it);
4237
4519
                                        if (vala_formal_parameter_get_captured (param)) {
4238
 
                                                ValaDataType* param_type;
4239
 
                                                char* _tmp89_;
4240
 
                                                char* _tmp88_;
4241
 
                                                gboolean _tmp90_ = FALSE;
4242
 
                                                gboolean is_unowned_delegate;
4243
 
                                                ValaCCodeExpression* cparam;
4244
 
                                                gboolean _tmp91_ = FALSE;
4245
 
                                                gboolean _tmp92_ = FALSE;
4246
 
                                                ValaCCodeExpressionStatement* _tmp100_;
4247
 
                                                ValaCCodeAssignment* _tmp99_;
4248
 
                                                ValaCCodeMemberAccess* _tmp98_;
4249
 
                                                char* _tmp97_;
4250
 
                                                ValaCCodeExpression* _tmp96_;
4251
 
                                                char* _tmp95_;
4252
 
                                                gboolean _tmp138_ = FALSE;
4253
 
                                                param_type = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param));
4254
 
                                                vala_data_type_set_value_owned (param_type, TRUE);
4255
 
                                                vala_ccode_struct_add_field (data, _tmp88_ = vala_data_type_get_cname (param_type), _tmp89_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)));
4256
 
                                                _g_free0 (_tmp89_);
4257
 
                                                _g_free0 (_tmp88_);
4258
 
                                                if (VALA_IS_DELEGATE_TYPE (vala_formal_parameter_get_parameter_type (param))) {
4259
 
                                                        _tmp90_ = !vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param));
4260
 
                                                } else {
4261
 
                                                        _tmp90_ = FALSE;
4262
 
                                                }
4263
 
                                                is_unowned_delegate = _tmp90_;
4264
 
                                                cparam = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) param));
4265
 
                                                if (vala_ccode_base_module_requires_copy (self, param_type)) {
4266
 
                                                        _tmp92_ = !vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param));
4267
 
                                                } else {
4268
 
                                                        _tmp92_ = FALSE;
4269
 
                                                }
4270
 
                                                if (_tmp92_) {
4271
 
                                                        _tmp91_ = !is_unowned_delegate;
4272
 
                                                } else {
4273
 
                                                        _tmp91_ = FALSE;
4274
 
                                                }
4275
 
                                                if (_tmp91_) {
4276
 
                                                        ValaMemberAccess* ma;
4277
 
                                                        ValaDataType* _tmp93_;
4278
 
                                                        ValaCCodeExpression* _tmp94_;
4279
 
                                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) param), NULL);
4280
 
                                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
4281
 
                                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp93_ = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param)));
4282
 
                                                        _vala_code_node_unref0 (_tmp93_);
4283
 
                                                        vala_formal_parameter_set_captured (param, FALSE);
4284
 
                                                        cparam = (_tmp94_ = vala_ccode_base_module_get_ref_cexpression (self, vala_formal_parameter_get_parameter_type (param), cparam, (ValaExpression*) ma, (ValaCodeNode*) param), _vala_ccode_node_unref0 (cparam), _tmp94_);
4285
 
                                                        vala_formal_parameter_set_captured (param, TRUE);
4286
 
                                                        _vala_code_node_unref0 (ma);
4287
 
                                                }
4288
 
                                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp100_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp99_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp98_ = vala_ccode_member_access_new_pointer (_tmp96_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp95_ = g_strdup_printf ("_data%d_", block_id)), _tmp97_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)))), cparam, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
4289
 
                                                _vala_ccode_node_unref0 (_tmp100_);
4290
 
                                                _vala_ccode_node_unref0 (_tmp99_);
4291
 
                                                _vala_ccode_node_unref0 (_tmp98_);
4292
 
                                                _g_free0 (_tmp97_);
4293
 
                                                _vala_ccode_node_unref0 (_tmp96_);
4294
 
                                                _g_free0 (_tmp95_);
4295
 
                                                if (VALA_IS_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param))) {
4296
 
                                                        ValaArrayType* array_type;
4297
 
                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param)));
4298
 
                                                        {
4299
 
                                                                gint dim;
4300
 
                                                                dim = 1;
4301
 
                                                                {
4302
 
                                                                        gboolean _tmp101_;
4303
 
                                                                        _tmp101_ = TRUE;
4304
 
                                                                        while (TRUE) {
4305
 
                                                                                char* _tmp103_;
4306
 
                                                                                char* _tmp102_;
4307
 
                                                                                ValaCCodeExpressionStatement* _tmp113_;
4308
 
                                                                                ValaCCodeAssignment* _tmp112_;
4309
 
                                                                                ValaCCodeIdentifier* _tmp111_;
4310
 
                                                                                char* _tmp110_;
4311
 
                                                                                char* _tmp109_;
4312
 
                                                                                ValaCCodeMemberAccess* _tmp108_;
4313
 
                                                                                char* _tmp107_;
4314
 
                                                                                char* _tmp106_;
4315
 
                                                                                ValaCCodeExpression* _tmp105_;
4316
 
                                                                                char* _tmp104_;
4317
 
                                                                                if (!_tmp101_) {
4318
 
                                                                                        dim++;
4319
 
                                                                                }
4320
 
                                                                                _tmp101_ = FALSE;
4321
 
                                                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
4322
 
                                                                                        break;
4323
 
                                                                                }
4324
 
                                                                                vala_ccode_struct_add_field (data, "gint", _tmp103_ = vala_ccode_module_get_array_length_cname ((ValaCCodeModule*) self, _tmp102_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)), dim));
4325
 
                                                                                _g_free0 (_tmp103_);
4326
 
                                                                                _g_free0 (_tmp102_);
4327
 
                                                                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp113_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp112_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp108_ = vala_ccode_member_access_new_pointer (_tmp105_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp104_ = g_strdup_printf ("_data%d_", block_id)), _tmp107_ = vala_ccode_module_get_array_length_cname ((ValaCCodeModule*) self, _tmp106_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)), dim))), (ValaCCodeExpression*) (_tmp111_ = vala_ccode_identifier_new (_tmp110_ = vala_ccode_module_get_array_length_cname ((ValaCCodeModule*) self, _tmp109_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)), dim))), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
4328
 
                                                                                _vala_ccode_node_unref0 (_tmp113_);
4329
 
                                                                                _vala_ccode_node_unref0 (_tmp112_);
4330
 
                                                                                _vala_ccode_node_unref0 (_tmp111_);
4331
 
                                                                                _g_free0 (_tmp110_);
4332
 
                                                                                _g_free0 (_tmp109_);
4333
 
                                                                                _vala_ccode_node_unref0 (_tmp108_);
4334
 
                                                                                _g_free0 (_tmp107_);
4335
 
                                                                                _g_free0 (_tmp106_);
4336
 
                                                                                _vala_ccode_node_unref0 (_tmp105_);
4337
 
                                                                                _g_free0 (_tmp104_);
4338
 
                                                                        }
4339
 
                                                                }
4340
 
                                                        }
4341
 
                                                        _vala_code_node_unref0 (array_type);
4342
 
                                                } else {
4343
 
                                                        if (VALA_IS_DELEGATE_TYPE (vala_formal_parameter_get_parameter_type (param))) {
4344
 
                                                                char* _tmp115_;
4345
 
                                                                char* _tmp114_;
4346
 
                                                                ValaCCodeExpressionStatement* _tmp125_;
4347
 
                                                                ValaCCodeAssignment* _tmp124_;
4348
 
                                                                ValaCCodeIdentifier* _tmp123_;
4349
 
                                                                char* _tmp122_;
4350
 
                                                                char* _tmp121_;
4351
 
                                                                ValaCCodeMemberAccess* _tmp120_;
4352
 
                                                                char* _tmp119_;
4353
 
                                                                char* _tmp118_;
4354
 
                                                                ValaCCodeExpression* _tmp117_;
4355
 
                                                                char* _tmp116_;
4356
 
                                                                vala_ccode_struct_add_field (data, "gpointer", _tmp115_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp114_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))));
4357
 
                                                                _g_free0 (_tmp115_);
4358
 
                                                                _g_free0 (_tmp114_);
4359
 
                                                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp125_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp124_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp120_ = vala_ccode_member_access_new_pointer (_tmp117_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp116_ = g_strdup_printf ("_data%d_", block_id)), _tmp119_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp118_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))))), (ValaCCodeExpression*) (_tmp123_ = vala_ccode_identifier_new (_tmp122_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp121_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))))), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
4360
 
                                                                _vala_ccode_node_unref0 (_tmp125_);
4361
 
                                                                _vala_ccode_node_unref0 (_tmp124_);
4362
 
                                                                _vala_ccode_node_unref0 (_tmp123_);
4363
 
                                                                _g_free0 (_tmp122_);
4364
 
                                                                _g_free0 (_tmp121_);
4365
 
                                                                _vala_ccode_node_unref0 (_tmp120_);
4366
 
                                                                _g_free0 (_tmp119_);
4367
 
                                                                _g_free0 (_tmp118_);
4368
 
                                                                _vala_ccode_node_unref0 (_tmp117_);
4369
 
                                                                _g_free0 (_tmp116_);
4370
 
                                                                if (vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param))) {
4371
 
                                                                        char* _tmp127_;
4372
 
                                                                        char* _tmp126_;
4373
 
                                                                        ValaCCodeExpressionStatement* _tmp137_;
4374
 
                                                                        ValaCCodeAssignment* _tmp136_;
4375
 
                                                                        ValaCCodeIdentifier* _tmp135_;
4376
 
                                                                        char* _tmp134_;
4377
 
                                                                        char* _tmp133_;
4378
 
                                                                        ValaCCodeMemberAccess* _tmp132_;
4379
 
                                                                        char* _tmp131_;
4380
 
                                                                        char* _tmp130_;
4381
 
                                                                        ValaCCodeExpression* _tmp129_;
4382
 
                                                                        char* _tmp128_;
4383
 
                                                                        vala_ccode_struct_add_field (data, "GDestroyNotify", _tmp127_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp126_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))));
4384
 
                                                                        _g_free0 (_tmp127_);
4385
 
                                                                        _g_free0 (_tmp126_);
4386
 
                                                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp137_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp136_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp132_ = vala_ccode_member_access_new_pointer (_tmp129_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp128_ = g_strdup_printf ("_data%d_", block_id)), _tmp131_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp130_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))))), (ValaCCodeExpression*) (_tmp135_ = vala_ccode_identifier_new (_tmp134_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, _tmp133_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param))))), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
4387
 
                                                                        _vala_ccode_node_unref0 (_tmp137_);
4388
 
                                                                        _vala_ccode_node_unref0 (_tmp136_);
4389
 
                                                                        _vala_ccode_node_unref0 (_tmp135_);
4390
 
                                                                        _g_free0 (_tmp134_);
4391
 
                                                                        _g_free0 (_tmp133_);
4392
 
                                                                        _vala_ccode_node_unref0 (_tmp132_);
4393
 
                                                                        _g_free0 (_tmp131_);
4394
 
                                                                        _g_free0 (_tmp130_);
4395
 
                                                                        _vala_ccode_node_unref0 (_tmp129_);
4396
 
                                                                        _g_free0 (_tmp128_);
4397
 
                                                                }
4398
 
                                                        }
4399
 
                                                }
4400
 
                                                if (vala_ccode_base_module_requires_destroy (self, param_type)) {
4401
 
                                                        _tmp138_ = !is_unowned_delegate;
4402
 
                                                } else {
4403
 
                                                        _tmp138_ = FALSE;
4404
 
                                                }
4405
 
                                                if (_tmp138_) {
4406
 
                                                        gboolean old_coroutine;
4407
 
                                                        ValaMemberAccess* ma;
4408
 
                                                        ValaDataType* _tmp139_;
4409
 
                                                        ValaCCodeExpressionStatement* _tmp145_;
4410
 
                                                        ValaCCodeExpression* _tmp144_;
4411
 
                                                        ValaCCodeMemberAccess* _tmp143_;
4412
 
                                                        char* _tmp142_;
4413
 
                                                        ValaCCodeIdentifier* _tmp141_;
4414
 
                                                        char* _tmp140_;
4415
 
                                                        old_coroutine = FALSE;
4416
 
                                                        if (vala_ccode_base_module_get_current_method (self) != NULL) {
4417
 
                                                                old_coroutine = vala_method_get_coroutine (vala_ccode_base_module_get_current_method (self));
4418
 
                                                                vala_method_set_coroutine (vala_ccode_base_module_get_current_method (self), FALSE);
4419
 
                                                        }
4420
 
                                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) param), NULL);
4421
 
                                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
4422
 
                                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp139_ = vala_data_type_copy (param_type));
4423
 
                                                        _vala_code_node_unref0 (_tmp139_);
4424
 
                                                        vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp145_ = vala_ccode_expression_statement_new (_tmp144_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp143_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp141_ = vala_ccode_identifier_new (_tmp140_ = g_strdup_printf ("_data%d_", block_id))), _tmp142_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)))), vala_formal_parameter_get_parameter_type (param), (ValaExpression*) ma, FALSE))));
4425
 
                                                        _vala_ccode_node_unref0 (_tmp145_);
4426
 
                                                        _vala_ccode_node_unref0 (_tmp144_);
4427
 
                                                        _vala_ccode_node_unref0 (_tmp143_);
4428
 
                                                        _g_free0 (_tmp142_);
4429
 
                                                        _vala_ccode_node_unref0 (_tmp141_);
4430
 
                                                        _g_free0 (_tmp140_);
4431
 
                                                        if (old_coroutine) {
4432
 
                                                                vala_method_set_coroutine (vala_ccode_base_module_get_current_method (self), TRUE);
4433
 
                                                        }
4434
 
                                                        _vala_code_node_unref0 (ma);
4435
 
                                                }
4436
 
                                                _vala_code_node_unref0 (param_type);
4437
 
                                                _vala_ccode_node_unref0 (cparam);
 
4520
                                                vala_ccode_base_module_capture_parameter (self, param, data, cblock, block_id, free_block);
4438
4521
                                        }
4439
4522
                                        _vala_code_node_unref0 (param);
4440
4523
                                }
4441
4524
                                _vala_collection_object_unref0 (_param_it);
4442
4525
                        }
4443
4526
                        if (vala_method_get_coroutine (m)) {
4444
 
                                ValaCCodeExpressionStatement* _tmp151_;
4445
 
                                ValaCCodeAssignment* _tmp150_;
4446
 
                                ValaCCodeIdentifier* _tmp149_;
4447
 
                                ValaCCodeMemberAccess* _tmp148_;
4448
 
                                ValaCCodeExpression* _tmp147_;
4449
 
                                char* _tmp146_;
4450
 
                                vala_ccode_struct_add_field (data, "gpointer", "_async_data_");
4451
 
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp151_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp150_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp148_ = vala_ccode_member_access_new_pointer (_tmp147_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp146_ = g_strdup_printf ("_data%d_", block_id)), "_async_data_")), (ValaCCodeExpression*) (_tmp149_ = vala_ccode_identifier_new ("data")), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
4452
 
                                _vala_ccode_node_unref0 (_tmp151_);
4453
 
                                _vala_ccode_node_unref0 (_tmp150_);
4454
 
                                _vala_ccode_node_unref0 (_tmp149_);
4455
 
                                _vala_ccode_node_unref0 (_tmp148_);
4456
 
                                _vala_ccode_node_unref0 (_tmp147_);
4457
 
                                _g_free0 (_tmp146_);
 
4527
                                ValaCCodeExpressionStatement* _tmp101_;
 
4528
                                ValaCCodeAssignment* _tmp100_;
 
4529
                                ValaCCodeIdentifier* _tmp99_;
 
4530
                                ValaCCodeMemberAccess* _tmp98_;
 
4531
                                ValaCCodeExpression* _tmp97_;
 
4532
                                char* _tmp96_;
 
4533
                                vala_ccode_struct_add_field (data, "gpointer", "_async_data_", NULL);
 
4534
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp101_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp100_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp98_ = vala_ccode_member_access_new_pointer (_tmp97_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp96_ = g_strdup_printf ("_data%d_", block_id)), "_async_data_")), (ValaCCodeExpression*) (_tmp99_ = vala_ccode_identifier_new ("data")), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
4535
                                _vala_ccode_node_unref0 (_tmp101_);
 
4536
                                _vala_ccode_node_unref0 (_tmp100_);
 
4537
                                _vala_ccode_node_unref0 (_tmp99_);
 
4538
                                _vala_ccode_node_unref0 (_tmp98_);
 
4539
                                _vala_ccode_node_unref0 (_tmp97_);
 
4540
                                _g_free0 (_tmp96_);
4458
4541
                        }
4459
4542
                        cfrag = vala_ccode_fragment_new ();
4460
4543
                        vala_ccode_base_module_append_temp_decl (self, cfrag, (ValaList*) self->temp_vars);
4462
4545
                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) cfrag);
4463
4546
                        _vala_code_node_unref0 (m);
4464
4547
                        _vala_ccode_node_unref0 (cfrag);
 
4548
                } else {
 
4549
                        if (VALA_IS_PROPERTY_ACCESSOR (vala_symbol_get_parent_symbol ((ValaSymbol*) b))) {
 
4550
                                ValaPropertyAccessor* acc;
 
4551
                                gboolean _tmp102_ = FALSE;
 
4552
                                ValaCCodeFragment* cfrag;
 
4553
                                acc = _vala_code_node_ref0 (VALA_PROPERTY_ACCESSOR (vala_symbol_get_parent_symbol ((ValaSymbol*) b)));
 
4554
                                if (!vala_property_accessor_get_readable (acc)) {
 
4555
                                        _tmp102_ = vala_formal_parameter_get_captured (vala_property_accessor_get_value_parameter (acc));
 
4556
                                } else {
 
4557
                                        _tmp102_ = FALSE;
 
4558
                                }
 
4559
                                if (_tmp102_) {
 
4560
                                        vala_ccode_base_module_capture_parameter (self, vala_property_accessor_get_value_parameter (acc), data, cblock, block_id, free_block);
 
4561
                                }
 
4562
                                cfrag = vala_ccode_fragment_new ();
 
4563
                                vala_ccode_base_module_append_temp_decl (self, cfrag, (ValaList*) self->temp_vars);
 
4564
                                vala_collection_clear ((ValaCollection*) self->temp_vars);
 
4565
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) cfrag);
 
4566
                                _vala_code_node_unref0 (acc);
 
4567
                                _vala_ccode_node_unref0 (cfrag);
 
4568
                        }
4465
4569
                }
4466
 
                data_free = (_tmp153_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp152_ = vala_ccode_identifier_new ("g_slice_free"))), _vala_ccode_node_unref0 (_tmp152_), _tmp153_);
4467
 
                vala_ccode_function_call_add_argument (data_free, (ValaCCodeExpression*) (_tmp154_ = vala_ccode_identifier_new (struct_name)));
4468
 
                _vala_ccode_node_unref0 (_tmp154_);
4469
 
                vala_ccode_function_call_add_argument (data_free, (ValaCCodeExpression*) (_tmp156_ = vala_ccode_identifier_new (_tmp155_ = g_strdup_printf ("_data%d_", block_id))));
4470
 
                _vala_ccode_node_unref0 (_tmp156_);
4471
 
                _g_free0 (_tmp155_);
4472
 
                vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp157_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) data_free)));
4473
 
                _vala_ccode_node_unref0 (_tmp157_);
4474
 
                ref_fun = (_tmp160_ = vala_ccode_function_new (_tmp158_ = g_strdup_printf ("block%d_data_ref", block_id), _tmp159_ = g_strconcat (struct_name, "*", NULL)), _g_free0 (_tmp159_), _g_free0 (_tmp158_), _tmp160_);
4475
 
                vala_ccode_function_add_parameter (ref_fun, _tmp163_ = vala_ccode_formal_parameter_new (_tmp161_ = g_strdup_printf ("_data%d_", block_id), _tmp162_ = g_strconcat (struct_name, "*", NULL)));
4476
 
                _vala_ccode_node_unref0 (_tmp163_);
4477
 
                _g_free0 (_tmp162_);
4478
 
                _g_free0 (_tmp161_);
 
4570
                data_free = (_tmp104_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp103_ = vala_ccode_identifier_new ("g_slice_free"))), _vala_ccode_node_unref0 (_tmp103_), _tmp104_);
 
4571
                vala_ccode_function_call_add_argument (data_free, (ValaCCodeExpression*) (_tmp105_ = vala_ccode_identifier_new (struct_name)));
 
4572
                _vala_ccode_node_unref0 (_tmp105_);
 
4573
                vala_ccode_function_call_add_argument (data_free, (ValaCCodeExpression*) (_tmp107_ = vala_ccode_identifier_new (_tmp106_ = g_strdup_printf ("_data%d_", block_id))));
 
4574
                _vala_ccode_node_unref0 (_tmp107_);
 
4575
                _g_free0 (_tmp106_);
 
4576
                vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp108_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) data_free)));
 
4577
                _vala_ccode_node_unref0 (_tmp108_);
 
4578
                ref_fun = (_tmp111_ = vala_ccode_function_new (_tmp109_ = g_strdup_printf ("block%d_data_ref", block_id), _tmp110_ = g_strconcat (struct_name, "*", NULL)), _g_free0 (_tmp110_), _g_free0 (_tmp109_), _tmp111_);
 
4579
                vala_ccode_function_add_parameter (ref_fun, _tmp114_ = vala_ccode_formal_parameter_new (_tmp112_ = g_strdup_printf ("_data%d_", block_id), _tmp113_ = g_strconcat (struct_name, "*", NULL)));
 
4580
                _vala_ccode_node_unref0 (_tmp114_);
 
4581
                _g_free0 (_tmp113_);
 
4582
                _g_free0 (_tmp112_);
4479
4583
                vala_ccode_function_set_modifiers (ref_fun, VALA_CCODE_MODIFIERS_STATIC);
4480
 
                vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) (_tmp164_ = vala_ccode_function_copy (ref_fun)));
4481
 
                _vala_ccode_node_unref0 (_tmp164_);
4482
 
                vala_ccode_function_set_block (ref_fun, _tmp165_ = vala_ccode_block_new ());
4483
 
                _vala_ccode_node_unref0 (_tmp165_);
4484
 
                vala_ccode_block_add_statement (vala_ccode_function_get_block (ref_fun), (ValaCCodeNode*) (_tmp170_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp169_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_PREFIX_INCREMENT, (ValaCCodeExpression*) (_tmp168_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp167_ = vala_ccode_identifier_new (_tmp166_ = g_strdup_printf ("_data%d_", block_id))), "_ref_count_")))))));
4485
 
                _vala_ccode_node_unref0 (_tmp170_);
4486
 
                _vala_ccode_node_unref0 (_tmp169_);
4487
 
                _vala_ccode_node_unref0 (_tmp168_);
4488
 
                _vala_ccode_node_unref0 (_tmp167_);
4489
 
                _g_free0 (_tmp166_);
4490
 
                vala_ccode_block_add_statement (vala_ccode_function_get_block (ref_fun), (ValaCCodeNode*) (_tmp173_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp172_ = vala_ccode_identifier_new (_tmp171_ = g_strdup_printf ("_data%d_", block_id))))));
4491
 
                _vala_ccode_node_unref0 (_tmp173_);
4492
 
                _vala_ccode_node_unref0 (_tmp172_);
4493
 
                _g_free0 (_tmp171_);
 
4584
                vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) (_tmp115_ = vala_ccode_function_copy (ref_fun)));
 
4585
                _vala_ccode_node_unref0 (_tmp115_);
 
4586
                vala_ccode_function_set_block (ref_fun, _tmp116_ = vala_ccode_block_new ());
 
4587
                _vala_ccode_node_unref0 (_tmp116_);
 
4588
                vala_ccode_block_add_statement (vala_ccode_function_get_block (ref_fun), (ValaCCodeNode*) (_tmp121_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp120_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_PREFIX_INCREMENT, (ValaCCodeExpression*) (_tmp119_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp118_ = vala_ccode_identifier_new (_tmp117_ = g_strdup_printf ("_data%d_", block_id))), "_ref_count_")))))));
 
4589
                _vala_ccode_node_unref0 (_tmp121_);
 
4590
                _vala_ccode_node_unref0 (_tmp120_);
 
4591
                _vala_ccode_node_unref0 (_tmp119_);
 
4592
                _vala_ccode_node_unref0 (_tmp118_);
 
4593
                _g_free0 (_tmp117_);
 
4594
                vala_ccode_block_add_statement (vala_ccode_function_get_block (ref_fun), (ValaCCodeNode*) (_tmp124_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp123_ = vala_ccode_identifier_new (_tmp122_ = g_strdup_printf ("_data%d_", block_id))))));
 
4595
                _vala_ccode_node_unref0 (_tmp124_);
 
4596
                _vala_ccode_node_unref0 (_tmp123_);
 
4597
                _g_free0 (_tmp122_);
4494
4598
                vala_ccode_fragment_append (self->source_type_member_definition, (ValaCCodeNode*) ref_fun);
4495
 
                unref_fun = (_tmp175_ = vala_ccode_function_new (_tmp174_ = g_strdup_printf ("block%d_data_unref", block_id), "void"), _g_free0 (_tmp174_), _tmp175_);
4496
 
                vala_ccode_function_add_parameter (unref_fun, _tmp178_ = vala_ccode_formal_parameter_new (_tmp176_ = g_strdup_printf ("_data%d_", block_id), _tmp177_ = g_strconcat (struct_name, "*", NULL)));
4497
 
                _vala_ccode_node_unref0 (_tmp178_);
4498
 
                _g_free0 (_tmp177_);
4499
 
                _g_free0 (_tmp176_);
 
4599
                unref_fun = (_tmp126_ = vala_ccode_function_new (_tmp125_ = g_strdup_printf ("block%d_data_unref", block_id), "void"), _g_free0 (_tmp125_), _tmp126_);
 
4600
                vala_ccode_function_add_parameter (unref_fun, _tmp129_ = vala_ccode_formal_parameter_new (_tmp127_ = g_strdup_printf ("_data%d_", block_id), _tmp128_ = g_strconcat (struct_name, "*", NULL)));
 
4601
                _vala_ccode_node_unref0 (_tmp129_);
 
4602
                _g_free0 (_tmp128_);
 
4603
                _g_free0 (_tmp127_);
4500
4604
                vala_ccode_function_set_modifiers (unref_fun, VALA_CCODE_MODIFIERS_STATIC);
4501
 
                vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) (_tmp179_ = vala_ccode_function_copy (unref_fun)));
4502
 
                _vala_ccode_node_unref0 (_tmp179_);
4503
 
                vala_ccode_function_set_block (unref_fun, _tmp180_ = vala_ccode_block_new ());
4504
 
                _vala_ccode_node_unref0 (_tmp180_);
4505
 
                dec = (_tmp186_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) (_tmp184_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_PREFIX_DECREMENT, (ValaCCodeExpression*) (_tmp183_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp182_ = vala_ccode_identifier_new (_tmp181_ = g_strdup_printf ("_data%d_", block_id))), "_ref_count_")))), (ValaCCodeExpression*) (_tmp185_ = vala_ccode_constant_new ("0"))), _vala_ccode_node_unref0 (_tmp185_), _vala_ccode_node_unref0 (_tmp184_), _vala_ccode_node_unref0 (_tmp183_), _vala_ccode_node_unref0 (_tmp182_), _g_free0 (_tmp181_), _tmp186_);
4506
 
                vala_ccode_block_add_statement (vala_ccode_function_get_block (unref_fun), (ValaCCodeNode*) (_tmp187_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) dec, (ValaCCodeStatement*) free_block, NULL)));
4507
 
                _vala_ccode_node_unref0 (_tmp187_);
 
4605
                vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) (_tmp130_ = vala_ccode_function_copy (unref_fun)));
 
4606
                _vala_ccode_node_unref0 (_tmp130_);
 
4607
                vala_ccode_function_set_block (unref_fun, _tmp131_ = vala_ccode_block_new ());
 
4608
                _vala_ccode_node_unref0 (_tmp131_);
 
4609
                dec = (_tmp137_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) (_tmp135_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_PREFIX_DECREMENT, (ValaCCodeExpression*) (_tmp134_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp133_ = vala_ccode_identifier_new (_tmp132_ = g_strdup_printf ("_data%d_", block_id))), "_ref_count_")))), (ValaCCodeExpression*) (_tmp136_ = vala_ccode_constant_new ("0"))), _vala_ccode_node_unref0 (_tmp136_), _vala_ccode_node_unref0 (_tmp135_), _vala_ccode_node_unref0 (_tmp134_), _vala_ccode_node_unref0 (_tmp133_), _g_free0 (_tmp132_), _tmp137_);
 
4610
                vala_ccode_block_add_statement (vala_ccode_function_get_block (unref_fun), (ValaCCodeNode*) (_tmp138_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) dec, (ValaCCodeStatement*) free_block, NULL)));
 
4611
                _vala_ccode_node_unref0 (_tmp138_);
4508
4612
                vala_ccode_fragment_append (self->source_type_member_definition, (ValaCCodeNode*) unref_fun);
4509
4613
                _vala_code_node_unref0 (parent_block);
4510
4614
                _g_free0 (struct_name);
4518
4622
                _vala_ccode_node_unref0 (dec);
4519
4623
        }
4520
4624
        {
4521
 
                ValaList* _tmp188_;
4522
 
                ValaIterator* _tmp189_;
 
4625
                ValaList* _tmp139_;
 
4626
                ValaIterator* _tmp140_;
4523
4627
                ValaIterator* _stmt_it;
4524
 
                _stmt_it = (_tmp189_ = vala_iterable_iterator ((ValaIterable*) (_tmp188_ = vala_block_get_statements (b))), _vala_collection_object_unref0 (_tmp188_), _tmp189_);
 
4628
                _stmt_it = (_tmp140_ = vala_iterable_iterator ((ValaIterable*) (_tmp139_ = vala_block_get_statements (b))), _vala_collection_object_unref0 (_tmp139_), _tmp140_);
4525
4629
                while (TRUE) {
4526
4630
                        ValaCodeNode* stmt;
 
4631
                        gboolean _tmp141_ = FALSE;
4527
4632
                        if (!vala_iterator_next (_stmt_it)) {
4528
4633
                                break;
4529
4634
                        }
4530
4635
                        stmt = (ValaCodeNode*) ((ValaStatement*) vala_iterator_get (_stmt_it));
4531
4636
                        if (vala_code_node_get_error (stmt)) {
 
4637
                                _tmp141_ = TRUE;
 
4638
                        } else {
 
4639
                                _tmp141_ = vala_code_node_get_unreachable (stmt);
 
4640
                        }
 
4641
                        if (_tmp141_) {
4532
4642
                                _vala_code_node_unref0 (stmt);
4533
4643
                                continue;
4534
4644
                        }
4535
4645
                        if (VALA_IS_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))) {
4536
4646
                                {
4537
 
                                        ValaList* _tmp190_;
4538
 
                                        ValaIterator* _tmp191_;
 
4647
                                        ValaList* _tmp142_;
 
4648
                                        ValaIterator* _tmp143_;
4539
4649
                                        ValaIterator* _cstmt_it;
4540
 
                                        _cstmt_it = (_tmp191_ = vala_iterable_iterator ((ValaIterable*) (_tmp190_ = vala_ccode_fragment_get_children (VALA_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))))), _vala_collection_object_unref0 (_tmp190_), _tmp191_);
 
4650
                                        _cstmt_it = (_tmp143_ = vala_iterable_iterator ((ValaIterable*) (_tmp142_ = vala_ccode_fragment_get_children (VALA_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))))), _vala_collection_object_unref0 (_tmp142_), _tmp143_);
4541
4651
                                        while (TRUE) {
4542
4652
                                                ValaCCodeNode* cstmt;
4543
4653
                                                if (!vala_iterator_next (_cstmt_it)) {
4561
4671
                _local_it = vala_iterable_iterator ((ValaIterable*) local_vars);
4562
4672
                while (TRUE) {
4563
4673
                        ValaLocalVariable* local;
4564
 
                        gboolean _tmp192_ = FALSE;
4565
 
                        gboolean _tmp193_ = FALSE;
 
4674
                        gboolean _tmp144_ = FALSE;
 
4675
                        gboolean _tmp145_ = FALSE;
 
4676
                        gboolean _tmp146_ = FALSE;
4566
4677
                        if (!vala_iterator_next (_local_it)) {
4567
4678
                                break;
4568
4679
                        }
4569
4680
                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
4570
 
                        if (!vala_local_variable_get_floating (local)) {
4571
 
                                _tmp193_ = !vala_local_variable_get_captured (local);
4572
 
                        } else {
4573
 
                                _tmp193_ = FALSE;
4574
 
                        }
4575
 
                        if (_tmp193_) {
4576
 
                                _tmp192_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
4577
 
                        } else {
4578
 
                                _tmp192_ = FALSE;
4579
 
                        }
4580
 
                        if (_tmp192_) {
 
4681
                        if (!vala_code_node_get_unreachable ((ValaCodeNode*) local)) {
 
4682
                                _tmp146_ = !vala_local_variable_get_floating (local);
 
4683
                        } else {
 
4684
                                _tmp146_ = FALSE;
 
4685
                        }
 
4686
                        if (_tmp146_) {
 
4687
                                _tmp145_ = !vala_local_variable_get_captured (local);
 
4688
                        } else {
 
4689
                                _tmp145_ = FALSE;
 
4690
                        }
 
4691
                        if (_tmp145_) {
 
4692
                                _tmp144_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
 
4693
                        } else {
 
4694
                                _tmp144_ = FALSE;
 
4695
                        }
 
4696
                        if (_tmp144_) {
4581
4697
                                ValaMemberAccess* ma;
4582
 
                                ValaDataType* _tmp194_;
4583
 
                                ValaCCodeExpressionStatement* _tmp197_;
4584
 
                                ValaCCodeExpression* _tmp196_;
4585
 
                                ValaCCodeExpression* _tmp195_;
 
4698
                                ValaDataType* _tmp147_;
 
4699
                                ValaCCodeExpressionStatement* _tmp150_;
 
4700
                                ValaCCodeExpression* _tmp149_;
 
4701
                                ValaCCodeExpression* _tmp148_;
4586
4702
                                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
4587
4703
                                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
4588
 
                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp194_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
4589
 
                                _vala_code_node_unref0 (_tmp194_);
4590
 
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp197_ = vala_ccode_expression_statement_new (_tmp196_ = vala_ccode_base_module_get_unref_expression (self, _tmp195_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
4591
 
                                _vala_ccode_node_unref0 (_tmp197_);
4592
 
                                _vala_ccode_node_unref0 (_tmp196_);
4593
 
                                _vala_ccode_node_unref0 (_tmp195_);
 
4704
                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp147_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
4705
                                _vala_code_node_unref0 (_tmp147_);
 
4706
                                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp150_ = vala_ccode_expression_statement_new (_tmp149_ = vala_ccode_base_module_get_unref_expression (self, _tmp148_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
4707
                                _vala_ccode_node_unref0 (_tmp150_);
 
4708
                                _vala_ccode_node_unref0 (_tmp149_);
 
4709
                                _vala_ccode_node_unref0 (_tmp148_);
4594
4710
                                _vala_code_node_unref0 (ma);
4595
4711
                        }
4596
4712
                        _vala_code_node_unref0 (local);
4601
4717
                ValaMethod* m;
4602
4718
                m = _vala_code_node_ref0 (VALA_METHOD (vala_symbol_get_parent_symbol ((ValaSymbol*) b)));
4603
4719
                {
4604
 
                        ValaList* _tmp198_;
4605
 
                        ValaIterator* _tmp199_;
 
4720
                        ValaList* _tmp151_;
 
4721
                        ValaIterator* _tmp152_;
4606
4722
                        ValaIterator* _param_it;
4607
 
                        _param_it = (_tmp199_ = vala_iterable_iterator ((ValaIterable*) (_tmp198_ = vala_method_get_parameters (m))), _vala_collection_object_unref0 (_tmp198_), _tmp199_);
 
4723
                        _param_it = (_tmp152_ = vala_iterable_iterator ((ValaIterable*) (_tmp151_ = vala_method_get_parameters (m))), _vala_collection_object_unref0 (_tmp151_), _tmp152_);
4608
4724
                        while (TRUE) {
4609
4725
                                ValaFormalParameter* param;
4610
 
                                gboolean _tmp200_ = FALSE;
4611
 
                                gboolean _tmp201_ = FALSE;
 
4726
                                gboolean _tmp153_ = FALSE;
 
4727
                                gboolean _tmp154_ = FALSE;
 
4728
                                gboolean _tmp155_ = FALSE;
4612
4729
                                if (!vala_iterator_next (_param_it)) {
4613
4730
                                        break;
4614
4731
                                }
4615
4732
                                param = (ValaFormalParameter*) vala_iterator_get (_param_it);
4616
4733
                                if (!vala_formal_parameter_get_captured (param)) {
4617
 
                                        _tmp201_ = vala_ccode_base_module_requires_destroy (self, vala_formal_parameter_get_parameter_type (param));
4618
 
                                } else {
4619
 
                                        _tmp201_ = FALSE;
4620
 
                                }
4621
 
                                if (_tmp201_) {
4622
 
                                        _tmp200_ = vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_IN;
4623
 
                                } else {
4624
 
                                        _tmp200_ = FALSE;
4625
 
                                }
4626
 
                                if (_tmp200_) {
 
4734
                                        _tmp155_ = !vala_formal_parameter_get_ellipsis (param);
 
4735
                                } else {
 
4736
                                        _tmp155_ = FALSE;
 
4737
                                }
 
4738
                                if (_tmp155_) {
 
4739
                                        _tmp154_ = vala_ccode_base_module_requires_destroy (self, vala_formal_parameter_get_parameter_type (param));
 
4740
                                } else {
 
4741
                                        _tmp154_ = FALSE;
 
4742
                                }
 
4743
                                if (_tmp154_) {
 
4744
                                        _tmp153_ = vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_IN;
 
4745
                                } else {
 
4746
                                        _tmp153_ = FALSE;
 
4747
                                }
 
4748
                                if (_tmp153_) {
4627
4749
                                        ValaMemberAccess* ma;
4628
 
                                        ValaDataType* _tmp202_;
4629
 
                                        ValaCCodeExpressionStatement* _tmp205_;
4630
 
                                        ValaCCodeExpression* _tmp204_;
4631
 
                                        ValaCCodeExpression* _tmp203_;
 
4750
                                        ValaDataType* _tmp156_;
 
4751
                                        ValaCCodeExpressionStatement* _tmp159_;
 
4752
                                        ValaCCodeExpression* _tmp158_;
 
4753
                                        ValaCCodeExpression* _tmp157_;
4632
4754
                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) param), NULL);
4633
4755
                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
4634
 
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp202_ = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param)));
4635
 
                                        _vala_code_node_unref0 (_tmp202_);
4636
 
                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp205_ = vala_ccode_expression_statement_new (_tmp204_ = vala_ccode_base_module_get_unref_expression (self, _tmp203_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) param)), vala_formal_parameter_get_parameter_type (param), (ValaExpression*) ma, FALSE))));
4637
 
                                        _vala_ccode_node_unref0 (_tmp205_);
4638
 
                                        _vala_ccode_node_unref0 (_tmp204_);
4639
 
                                        _vala_ccode_node_unref0 (_tmp203_);
 
4756
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp156_ = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param)));
 
4757
                                        _vala_code_node_unref0 (_tmp156_);
 
4758
                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp159_ = vala_ccode_expression_statement_new (_tmp158_ = vala_ccode_base_module_get_unref_expression (self, _tmp157_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) param)), vala_formal_parameter_get_parameter_type (param), (ValaExpression*) ma, FALSE))));
 
4759
                                        _vala_ccode_node_unref0 (_tmp159_);
 
4760
                                        _vala_ccode_node_unref0 (_tmp158_);
 
4761
                                        _vala_ccode_node_unref0 (_tmp157_);
4640
4762
                                        _vala_code_node_unref0 (ma);
4641
4763
                                }
4642
4764
                                _vala_code_node_unref0 (param);
4647
4769
        }
4648
4770
        if (vala_block_get_captured (b)) {
4649
4771
                gint block_id;
4650
 
                ValaCCodeIdentifier* _tmp207_;
4651
 
                char* _tmp206_;
4652
 
                ValaCCodeFunctionCall* _tmp208_;
 
4772
                ValaCCodeIdentifier* _tmp161_;
 
4773
                char* _tmp160_;
 
4774
                ValaCCodeFunctionCall* _tmp162_;
4653
4775
                ValaCCodeFunctionCall* data_unref;
4654
 
                ValaCCodeExpression* _tmp210_;
4655
 
                char* _tmp209_;
4656
 
                ValaCCodeExpressionStatement* _tmp211_;
 
4776
                ValaCCodeExpression* _tmp164_;
 
4777
                char* _tmp163_;
 
4778
                ValaCCodeExpressionStatement* _tmp165_;
4657
4779
                block_id = vala_ccode_base_module_get_block_id (self, b);
4658
 
                data_unref = (_tmp208_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp207_ = vala_ccode_identifier_new (_tmp206_ = g_strdup_printf ("block%d_data_unref", block_id)))), _vala_ccode_node_unref0 (_tmp207_), _g_free0 (_tmp206_), _tmp208_);
4659
 
                vala_ccode_function_call_add_argument (data_unref, _tmp210_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp209_ = g_strdup_printf ("_data%d_", block_id)));
4660
 
                _vala_ccode_node_unref0 (_tmp210_);
4661
 
                _g_free0 (_tmp209_);
4662
 
                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp211_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) data_unref)));
4663
 
                _vala_ccode_node_unref0 (_tmp211_);
 
4780
                data_unref = (_tmp162_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp161_ = vala_ccode_identifier_new (_tmp160_ = g_strdup_printf ("block%d_data_unref", block_id)))), _vala_ccode_node_unref0 (_tmp161_), _g_free0 (_tmp160_), _tmp162_);
 
4781
                vala_ccode_function_call_add_argument (data_unref, _tmp164_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp163_ = g_strdup_printf ("_data%d_", block_id)));
 
4782
                _vala_ccode_node_unref0 (_tmp164_);
 
4783
                _g_free0 (_tmp163_);
 
4784
                vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp165_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) data_unref)));
 
4785
                _vala_ccode_node_unref0 (_tmp165_);
4664
4786
                _vala_ccode_node_unref0 (data_unref);
4665
4787
        }
4666
4788
        vala_code_node_set_ccodenode ((ValaCodeNode*) b, (ValaCCodeNode*) cblock);
4667
 
        self->current_symbol = (_tmp212_ = _vala_code_node_ref0 (old_symbol), _vala_code_node_unref0 (self->current_symbol), _tmp212_);
 
4789
        self->current_symbol = (_tmp166_ = _vala_code_node_ref0 (old_symbol), _vala_code_node_unref0 (self->current_symbol), _tmp166_);
4668
4790
        _vala_code_node_unref0 (old_symbol);
4669
4791
        _vala_collection_object_unref0 (local_vars);
4670
4792
        _vala_ccode_node_unref0 (cblock);
4706
4828
 
4707
4829
 
4708
4830
ValaCCodeExpression* vala_ccode_base_module_get_variable_cexpression (ValaCCodeBaseModule* self, const char* name) {
4709
 
        ValaCCodeExpression* result;
 
4831
        ValaCCodeExpression* result = NULL;
4710
4832
        gboolean _tmp0_ = FALSE;
4711
4833
        g_return_val_if_fail (self != NULL, NULL);
4712
4834
        g_return_val_if_fail (name != NULL, NULL);
4731
4853
 
4732
4854
 
4733
4855
char* vala_ccode_base_module_get_variable_cname (ValaCCodeBaseModule* self, const char* name) {
4734
 
        char* result;
 
4856
        char* result = NULL;
4735
4857
        g_return_val_if_fail (self != NULL, NULL);
4736
4858
        g_return_val_if_fail (name != NULL, NULL);
4737
4859
        if (g_utf8_get_char (g_utf8_offset_to_pointer (name, 0)) == '.') {
4760
4882
 
4761
4883
 
4762
4884
ValaCCodeExpression* vala_ccode_base_module_get_result_cexpression (ValaCCodeBaseModule* self, const char* cname) {
4763
 
        ValaCCodeExpression* result;
 
4885
        ValaCCodeExpression* result = NULL;
4764
4886
        gboolean _tmp0_ = FALSE;
4765
4887
        g_return_val_if_fail (self != NULL, NULL);
4766
4888
        g_return_val_if_fail (cname != NULL, NULL);
4781
4903
}
4782
4904
 
4783
4905
 
 
4906
static gboolean vala_ccode_base_module_has_simple_struct_initializer (ValaCCodeBaseModule* self, ValaLocalVariable* local) {
 
4907
        gboolean result = FALSE;
 
4908
        ValaTypeSymbol* _tmp0_;
 
4909
        ValaStruct* st;
 
4910
        ValaExpression* _tmp1_;
 
4911
        ValaObjectCreationExpression* initializer;
 
4912
        gboolean _tmp2_ = FALSE;
 
4913
        gboolean _tmp3_ = FALSE;
 
4914
        gboolean _tmp4_ = FALSE;
 
4915
        gboolean _tmp5_ = FALSE;
 
4916
        g_return_val_if_fail (self != NULL, FALSE);
 
4917
        g_return_val_if_fail (local != NULL, FALSE);
 
4918
        st = _vala_code_node_ref0 ((_tmp0_ = vala_data_type_get_data_type (vala_local_variable_get_variable_type (local)), VALA_IS_STRUCT (_tmp0_) ? ((ValaStruct*) _tmp0_) : NULL));
 
4919
        initializer = _vala_code_node_ref0 ((_tmp1_ = vala_local_variable_get_initializer (local), VALA_IS_OBJECT_CREATION_EXPRESSION (_tmp1_) ? ((ValaObjectCreationExpression*) _tmp1_) : NULL));
 
4920
        if (st != NULL) {
 
4921
                gboolean _tmp6_ = FALSE;
 
4922
                if (!vala_struct_is_simple_type (st)) {
 
4923
                        _tmp6_ = TRUE;
 
4924
                } else {
 
4925
                        char* _tmp7_;
 
4926
                        _tmp6_ = _vala_strcmp0 (_tmp7_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE), "va_list") == 0;
 
4927
                        _g_free0 (_tmp7_);
 
4928
                }
 
4929
                _tmp5_ = _tmp6_;
 
4930
        } else {
 
4931
                _tmp5_ = FALSE;
 
4932
        }
 
4933
        if (_tmp5_) {
 
4934
                _tmp4_ = !vala_data_type_get_nullable (vala_local_variable_get_variable_type (local));
 
4935
        } else {
 
4936
                _tmp4_ = FALSE;
 
4937
        }
 
4938
        if (_tmp4_) {
 
4939
                _tmp3_ = initializer != NULL;
 
4940
        } else {
 
4941
                _tmp3_ = FALSE;
 
4942
        }
 
4943
        if (_tmp3_) {
 
4944
                ValaList* _tmp8_;
 
4945
                _tmp2_ = vala_collection_get_size ((ValaCollection*) (_tmp8_ = vala_object_creation_expression_get_object_initializer (initializer))) == 0;
 
4946
                _vala_collection_object_unref0 (_tmp8_);
 
4947
        } else {
 
4948
                _tmp2_ = FALSE;
 
4949
        }
 
4950
        if (_tmp2_) {
 
4951
                result = TRUE;
 
4952
                _vala_code_node_unref0 (st);
 
4953
                _vala_code_node_unref0 (initializer);
 
4954
                return result;
 
4955
        } else {
 
4956
                result = FALSE;
 
4957
                _vala_code_node_unref0 (st);
 
4958
                _vala_code_node_unref0 (initializer);
 
4959
                return result;
 
4960
        }
 
4961
        _vala_code_node_unref0 (st);
 
4962
        _vala_code_node_unref0 (initializer);
 
4963
}
 
4964
 
 
4965
 
4784
4966
static void vala_ccode_base_module_real_visit_local_variable (ValaCCodeModule* base, ValaLocalVariable* local) {
4785
4967
        ValaCCodeBaseModule * self;
4786
4968
        ValaCCodeExpression* rhs;
4787
4969
        gboolean _tmp20_ = FALSE;
4788
4970
        ValaCCodeFragment* cfrag;
4789
 
        gboolean _tmp84_ = FALSE;
4790
 
        gboolean _tmp96_ = FALSE;
 
4971
        gboolean _tmp87_ = FALSE;
 
4972
        gboolean _tmp99_ = FALSE;
4791
4973
        self = (ValaCCodeBaseModule*) base;
4792
4974
        g_return_if_fail (local != NULL);
4793
4975
        vala_ccode_base_module_check_type (self, vala_local_variable_get_variable_type (local));
5119
5301
                        char* _tmp71_;
5120
5302
                        char* _tmp70_;
5121
5303
                        char* _tmp69_;
5122
 
                        vala_ccode_struct_add_field (self->closure_struct, _tmp69_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local)), _tmp72_ = g_strconcat (_tmp70_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), _tmp71_ = vala_data_type_get_cdeclarator_suffix (vala_local_variable_get_variable_type (local)), NULL));
 
5304
                        vala_ccode_struct_add_field (self->closure_struct, _tmp69_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local)), _tmp72_ = g_strconcat (_tmp70_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), _tmp71_ = vala_data_type_get_cdeclarator_suffix (vala_local_variable_get_variable_type (local)), NULL), NULL);
5123
5305
                        _g_free0 (_tmp72_);
5124
5306
                        _g_free0 (_tmp71_);
5125
5307
                        _g_free0 (_tmp70_);
5126
5308
                        _g_free0 (_tmp69_);
5127
5309
                        if (vala_local_variable_get_initializer (local) != NULL) {
5128
 
                                ValaCCodeExpressionStatement* _tmp77_;
5129
 
                                ValaCCodeAssignment* _tmp76_;
5130
 
                                ValaCCodeMemberAccess* _tmp75_;
5131
 
                                char* _tmp74_;
5132
 
                                ValaCCodeIdentifier* _tmp73_;
5133
 
                                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp77_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp76_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp75_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp73_ = vala_ccode_identifier_new ("data")), _tmp74_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)))), rhs, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
5134
 
                                _vala_ccode_node_unref0 (_tmp77_);
5135
 
                                _vala_ccode_node_unref0 (_tmp76_);
5136
 
                                _vala_ccode_node_unref0 (_tmp75_);
5137
 
                                _g_free0 (_tmp74_);
5138
 
                                _vala_ccode_node_unref0 (_tmp73_);
 
5310
                                if (vala_ccode_base_module_has_simple_struct_initializer (self, local)) {
 
5311
                                        ValaCCodeExpressionStatement* _tmp73_;
 
5312
                                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp73_ = vala_ccode_expression_statement_new (rhs)));
 
5313
                                        _vala_ccode_node_unref0 (_tmp73_);
 
5314
                                } else {
 
5315
                                        ValaCCodeExpressionStatement* _tmp78_;
 
5316
                                        ValaCCodeAssignment* _tmp77_;
 
5317
                                        ValaCCodeMemberAccess* _tmp76_;
 
5318
                                        char* _tmp75_;
 
5319
                                        ValaCCodeIdentifier* _tmp74_;
 
5320
                                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp78_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp77_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp76_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp74_ = vala_ccode_identifier_new ("data")), _tmp75_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)))), rhs, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
5321
                                        _vala_ccode_node_unref0 (_tmp78_);
 
5322
                                        _vala_ccode_node_unref0 (_tmp77_);
 
5323
                                        _vala_ccode_node_unref0 (_tmp76_);
 
5324
                                        _g_free0 (_tmp75_);
 
5325
                                        _vala_ccode_node_unref0 (_tmp74_);
 
5326
                                }
5139
5327
                        }
5140
5328
                } else {
5141
 
                        char* _tmp79_;
5142
 
                        char* _tmp78_;
5143
 
                        ValaCCodeVariableDeclarator* _tmp80_;
 
5329
                        ValaCCodeStatement* post_stmt;
 
5330
                        char* _tmp82_;
 
5331
                        char* _tmp81_;
 
5332
                        ValaCCodeVariableDeclarator* _tmp83_;
5144
5333
                        ValaCCodeVariableDeclarator* cvar;
5145
 
                        char* _tmp81_;
5146
 
                        ValaCCodeDeclaration* _tmp82_;
 
5334
                        char* _tmp84_;
 
5335
                        ValaCCodeDeclaration* _tmp85_;
5147
5336
                        ValaCCodeDeclaration* _cdecl_;
5148
 
                        cvar = (_tmp80_ = vala_ccode_variable_declarator_new (_tmp78_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), rhs, _tmp79_ = vala_data_type_get_cdeclarator_suffix (vala_local_variable_get_variable_type (local))), _g_free0 (_tmp79_), _g_free0 (_tmp78_), _tmp80_);
 
5337
                        post_stmt = NULL;
 
5338
                        if (vala_ccode_base_module_has_simple_struct_initializer (self, local)) {
 
5339
                                ValaCCodeStatement* _tmp79_;
 
5340
                                ValaCCodeExpression* _tmp80_;
 
5341
                                post_stmt = (_tmp79_ = (ValaCCodeStatement*) vala_ccode_expression_statement_new (rhs), _vala_ccode_node_unref0 (post_stmt), _tmp79_);
 
5342
                                rhs = (_tmp80_ = NULL, _vala_ccode_node_unref0 (rhs), _tmp80_);
 
5343
                        }
 
5344
                        cvar = (_tmp83_ = vala_ccode_variable_declarator_new (_tmp81_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), rhs, _tmp82_ = vala_data_type_get_cdeclarator_suffix (vala_local_variable_get_variable_type (local))), _g_free0 (_tmp82_), _g_free0 (_tmp81_), _tmp83_);
5149
5345
                        if (rhs != NULL) {
5150
5346
                                vala_ccode_node_set_line ((ValaCCodeNode*) cvar, vala_ccode_node_get_line ((ValaCCodeNode*) rhs));
5151
5347
                        }
5152
 
                        _cdecl_ = (_tmp82_ = vala_ccode_declaration_new (_tmp81_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local))), _g_free0 (_tmp81_), _tmp82_);
 
5348
                        _cdecl_ = (_tmp85_ = vala_ccode_declaration_new (_tmp84_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local))), _g_free0 (_tmp84_), _tmp85_);
5153
5349
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) cvar);
5154
5350
                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) _cdecl_);
5155
5351
                        if (vala_ccode_variable_declarator_get_initializer (cvar) == NULL) {
5156
 
                                ValaCCodeExpression* _tmp83_;
5157
 
                                vala_ccode_variable_declarator_set_initializer (cvar, _tmp83_ = vala_ccode_base_module_default_value_for_type (self, vala_local_variable_get_variable_type (local), TRUE));
5158
 
                                _vala_ccode_node_unref0 (_tmp83_);
 
5352
                                ValaCCodeExpression* _tmp86_;
 
5353
                                vala_ccode_variable_declarator_set_initializer (cvar, _tmp86_ = vala_ccode_base_module_default_value_for_type (self, vala_local_variable_get_variable_type (local), TRUE));
 
5354
                                _vala_ccode_node_unref0 (_tmp86_);
5159
5355
                                vala_ccode_variable_declarator_set_init0 (cvar, TRUE);
5160
5356
                        }
 
5357
                        if (post_stmt != NULL) {
 
5358
                                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) post_stmt);
 
5359
                        }
 
5360
                        _vala_ccode_node_unref0 (post_stmt);
5161
5361
                        _vala_ccode_node_unref0 (cvar);
5162
5362
                        _vala_ccode_node_unref0 (_cdecl_);
5163
5363
                }
5164
5364
        }
5165
5365
        if (vala_local_variable_get_initializer (local) != NULL) {
5166
 
                _tmp84_ = VALA_IS_ARRAY_TYPE (vala_local_variable_get_variable_type (local));
 
5366
                _tmp87_ = VALA_IS_ARRAY_TYPE (vala_local_variable_get_variable_type (local));
5167
5367
        } else {
5168
 
                _tmp84_ = FALSE;
 
5368
                _tmp87_ = FALSE;
5169
5369
        }
5170
 
        if (_tmp84_) {
 
5370
        if (_tmp87_) {
5171
5371
                ValaArrayType* array_type;
5172
5372
                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_local_variable_get_variable_type (local)));
5173
5373
                if (vala_array_type_get_fixed_length (array_type)) {
5174
 
                        ValaCCodeIdentifier* _tmp85_;
5175
 
                        ValaCCodeFunctionCall* _tmp86_;
5176
 
                        ValaCCodeFunctionCall* sizeof_call;
5177
5374
                        ValaCCodeIdentifier* _tmp88_;
5178
 
                        char* _tmp87_;
5179
 
                        ValaCCodeConstant* _tmp90_;
5180
 
                        char* _tmp89_;
5181
 
                        ValaCCodeBinaryExpression* _tmp91_;
 
5375
                        ValaCCodeFunctionCall* _tmp89_;
 
5376
                        ValaCCodeFunctionCall* sizeof_call;
 
5377
                        ValaCCodeIdentifier* _tmp91_;
 
5378
                        char* _tmp90_;
 
5379
                        ValaCCodeConstant* _tmp93_;
 
5380
                        char* _tmp92_;
 
5381
                        ValaCCodeBinaryExpression* _tmp94_;
5182
5382
                        ValaCCodeBinaryExpression* size;
5183
 
                        ValaCCodeIdentifier* _tmp92_;
5184
 
                        ValaCCodeFunctionCall* _tmp93_;
 
5383
                        ValaCCodeIdentifier* _tmp95_;
 
5384
                        ValaCCodeFunctionCall* _tmp96_;
5185
5385
                        ValaCCodeFunctionCall* ccopy;
5186
 
                        ValaCCodeExpression* _tmp94_;
5187
 
                        ValaCCodeExpressionStatement* _tmp95_;
 
5386
                        ValaCCodeExpression* _tmp97_;
 
5387
                        ValaCCodeExpressionStatement* _tmp98_;
5188
5388
                        vala_ccode_declaration_space_add_include (self->source_declarations, "string.h", FALSE);
5189
 
                        sizeof_call = (_tmp86_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp85_ = vala_ccode_identifier_new ("sizeof"))), _vala_ccode_node_unref0 (_tmp85_), _tmp86_);
5190
 
                        vala_ccode_function_call_add_argument (sizeof_call, (ValaCCodeExpression*) (_tmp88_ = vala_ccode_identifier_new (_tmp87_ = vala_data_type_get_cname (vala_array_type_get_element_type (array_type)))));
5191
 
                        _vala_ccode_node_unref0 (_tmp88_);
5192
 
                        _g_free0 (_tmp87_);
5193
 
                        size = (_tmp91_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) (_tmp90_ = vala_ccode_constant_new (_tmp89_ = g_strdup_printf ("%d", vala_array_type_get_length (array_type)))), (ValaCCodeExpression*) sizeof_call), _vala_ccode_node_unref0 (_tmp90_), _g_free0 (_tmp89_), _tmp91_);
5194
 
                        ccopy = (_tmp93_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp92_ = vala_ccode_identifier_new ("memcpy"))), _vala_ccode_node_unref0 (_tmp92_), _tmp93_);
5195
 
                        vala_ccode_function_call_add_argument (ccopy, _tmp94_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)));
5196
 
                        _vala_ccode_node_unref0 (_tmp94_);
 
5389
                        sizeof_call = (_tmp89_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp88_ = vala_ccode_identifier_new ("sizeof"))), _vala_ccode_node_unref0 (_tmp88_), _tmp89_);
 
5390
                        vala_ccode_function_call_add_argument (sizeof_call, (ValaCCodeExpression*) (_tmp91_ = vala_ccode_identifier_new (_tmp90_ = vala_data_type_get_cname (vala_array_type_get_element_type (array_type)))));
 
5391
                        _vala_ccode_node_unref0 (_tmp91_);
 
5392
                        _g_free0 (_tmp90_);
 
5393
                        size = (_tmp94_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) (_tmp93_ = vala_ccode_constant_new (_tmp92_ = g_strdup_printf ("%d", vala_array_type_get_length (array_type)))), (ValaCCodeExpression*) sizeof_call), _vala_ccode_node_unref0 (_tmp93_), _g_free0 (_tmp92_), _tmp94_);
 
5394
                        ccopy = (_tmp96_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp95_ = vala_ccode_identifier_new ("memcpy"))), _vala_ccode_node_unref0 (_tmp95_), _tmp96_);
 
5395
                        vala_ccode_function_call_add_argument (ccopy, _tmp97_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)));
 
5396
                        _vala_ccode_node_unref0 (_tmp97_);
5197
5397
                        vala_ccode_function_call_add_argument (ccopy, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_local_variable_get_initializer (local))));
5198
5398
                        vala_ccode_function_call_add_argument (ccopy, (ValaCCodeExpression*) size);
5199
 
                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp95_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) ccopy)));
5200
 
                        _vala_ccode_node_unref0 (_tmp95_);
 
5399
                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp98_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) ccopy)));
 
5400
                        _vala_ccode_node_unref0 (_tmp98_);
5201
5401
                        _vala_ccode_node_unref0 (sizeof_call);
5202
5402
                        _vala_ccode_node_unref0 (size);
5203
5403
                        _vala_ccode_node_unref0 (ccopy);
5205
5405
                _vala_code_node_unref0 (array_type);
5206
5406
        }
5207
5407
        if (vala_local_variable_get_initializer (local) != NULL) {
5208
 
                _tmp96_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) vala_local_variable_get_initializer (local));
 
5408
                _tmp99_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) vala_local_variable_get_initializer (local));
5209
5409
        } else {
5210
 
                _tmp96_ = FALSE;
 
5410
                _tmp99_ = FALSE;
5211
5411
        }
5212
 
        if (_tmp96_) {
5213
 
                vala_ccode_module_add_simple_check (vala_ccode_module_get_head ((ValaCCodeModule*) self), (ValaCodeNode*) vala_local_variable_get_initializer (local), cfrag);
 
5412
        if (_tmp99_) {
 
5413
                vala_ccode_module_add_simple_check (vala_ccode_module_get_head ((ValaCCodeModule*) self), (ValaCodeNode*) vala_local_variable_get_initializer (local), cfrag, FALSE);
5214
5414
        }
5215
5415
        vala_code_node_set_ccodenode ((ValaCodeNode*) local, (ValaCCodeNode*) cfrag);
5216
5416
        vala_symbol_set_active ((ValaSymbol*) local, TRUE);
5387
5587
 
5388
5588
 
5389
5589
ValaLocalVariable* vala_ccode_base_module_get_temp_variable (ValaCCodeBaseModule* self, ValaDataType* type, gboolean value_owned, ValaCodeNode* node_reference, gboolean init) {
5390
 
        ValaLocalVariable* result;
 
5590
        ValaLocalVariable* result = NULL;
5391
5591
        ValaDataType* var_type;
5392
5592
        char* _tmp0_;
5393
5593
        ValaLocalVariable* _tmp1_;
5409
5609
 
5410
5610
 
5411
5611
static gboolean vala_ccode_base_module_is_in_generic_type (ValaCCodeBaseModule* self, ValaDataType* type) {
5412
 
        gboolean result;
 
5612
        gboolean result = FALSE;
5413
5613
        gboolean _tmp0_ = FALSE;
 
5614
        gboolean _tmp1_ = FALSE;
5414
5615
        g_return_val_if_fail (self != NULL, FALSE);
5415
5616
        g_return_val_if_fail (type != NULL, FALSE);
5416
 
        if (VALA_IS_TYPESYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) vala_data_type_get_type_parameter (type)))) {
5417
 
                gboolean _tmp1_ = FALSE;
 
5617
        if (self->current_symbol != NULL) {
 
5618
                _tmp1_ = VALA_IS_TYPESYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) vala_data_type_get_type_parameter (type)));
 
5619
        } else {
 
5620
                _tmp1_ = FALSE;
 
5621
        }
 
5622
        if (_tmp1_) {
 
5623
                gboolean _tmp2_ = FALSE;
5418
5624
                if (vala_ccode_base_module_get_current_method (self) == NULL) {
5419
 
                        _tmp1_ = TRUE;
 
5625
                        _tmp2_ = TRUE;
5420
5626
                } else {
5421
 
                        _tmp1_ = vala_method_get_binding (vala_ccode_base_module_get_current_method (self)) == MEMBER_BINDING_INSTANCE;
 
5627
                        _tmp2_ = vala_method_get_binding (vala_ccode_base_module_get_current_method (self)) == MEMBER_BINDING_INSTANCE;
5422
5628
                }
5423
 
                _tmp0_ = _tmp1_;
 
5629
                _tmp0_ = _tmp2_;
5424
5630
        } else {
5425
5631
                _tmp0_ = FALSE;
5426
5632
        }
5435
5641
 
5436
5642
 
5437
5643
static ValaCCodeExpression* vala_ccode_base_module_get_type_id_expression (ValaCCodeBaseModule* self, ValaDataType* type, gboolean is_chainup) {
5438
 
        ValaCCodeExpression* result;
 
5644
        ValaCCodeExpression* result = NULL;
5439
5645
        g_return_val_if_fail (self != NULL, NULL);
5440
5646
        g_return_val_if_fail (type != NULL, NULL);
5441
5647
        if (VALA_IS_GENERIC_TYPE (type)) {
5485
5691
 
5486
5692
 
5487
5693
static ValaCCodeExpression* vala_ccode_base_module_real_get_dup_func_expression (ValaCCodeBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup) {
5488
 
        ValaCCodeExpression* result;
 
5694
        ValaCCodeExpression* result = NULL;
5489
5695
        g_return_val_if_fail (self != NULL, NULL);
5490
5696
        g_return_val_if_fail (type != NULL, NULL);
5491
5697
        if (VALA_IS_ERROR_TYPE (type)) {
5510
5716
                                if (_tmp2_) {
5511
5717
                                        char* _tmp4_;
5512
5718
                                        char* _tmp3_;
5513
 
                                        vala_report_error (source_reference, _tmp4_ = g_strdup_printf ("missing class prerequisite for interface `%s', add GLib.Object to interface declaration if unsure", _tmp3_ = vala_symbol_get_full_name ((ValaSymbol*) vala_data_type_get_data_type (type))));
 
5719
                                        vala_report_error (source_reference, _tmp4_ = g_strdup_printf ("missing class prerequisite for interface `%s', add GLib.Object to inte" \
 
5720
"rface declaration if unsure", _tmp3_ = vala_symbol_get_full_name ((ValaSymbol*) vala_data_type_get_data_type (type))));
5514
5721
                                        _g_free0 (_tmp4_);
5515
5722
                                        _g_free0 (_tmp3_);
5516
5723
                                        result = NULL;
5553
5760
                                                }
5554
5761
                                        } else {
5555
5762
                                                char* _tmp12_;
5556
 
                                                vala_report_error (source_reference, _tmp12_ = g_strdup_printf ("duplicating %s instance, use unowned variable or explicitly invoke copy method", vala_symbol_get_name ((ValaSymbol*) vala_data_type_get_data_type (type))));
 
5763
                                                vala_report_error (source_reference, _tmp12_ = g_strdup_printf ("duplicating %s instance, use unowned variable or explicitly invoke cop" \
 
5764
"y method", vala_symbol_get_name ((ValaSymbol*) vala_data_type_get_data_type (type))));
5557
5765
                                                _g_free0 (_tmp12_);
5558
5766
                                                result = NULL;
5559
5767
                                                _g_free0 (dup_function);
5739
5947
 
5740
5948
 
5741
5949
static char* vala_ccode_base_module_generate_struct_equal_function (ValaCCodeBaseModule* self, ValaStruct* st) {
5742
 
        char* result;
 
5950
        char* result = NULL;
5743
5951
        char* _tmp0_;
5744
5952
        char* _tmp1_;
5745
5953
        char* equal_func;
5925
6133
 
5926
6134
 
5927
6135
static char* vala_ccode_base_module_generate_numeric_equal_function (ValaCCodeBaseModule* self, ValaStruct* st) {
5928
 
        char* result;
 
6136
        char* result = NULL;
5929
6137
        char* _tmp0_;
5930
6138
        char* _tmp1_;
5931
6139
        char* equal_func;
6034
6242
 
6035
6243
 
6036
6244
static char* vala_ccode_base_module_generate_struct_dup_wrapper (ValaCCodeBaseModule* self, ValaValueType* value_type) {
6037
 
        char* result;
 
6245
        char* result = NULL;
6038
6246
        char* _tmp0_;
6039
6247
        char* _tmp1_;
6040
6248
        char* dup_func;
6178
6386
 
6179
6387
 
6180
6388
char* vala_ccode_base_module_generate_destroy_func_wrapper (ValaCCodeBaseModule* self, ValaDataType* type) {
6181
 
        char* result;
 
6389
        char* result = NULL;
6182
6390
        char* _tmp0_;
6183
6391
        char* _tmp1_;
6184
6392
        char* destroy_func;
6202
6410
                return result;
6203
6411
        }
6204
6412
        function = vala_ccode_function_new (destroy_func, "void");
 
6413
        vala_ccode_function_set_modifiers (function, VALA_CCODE_MODIFIERS_STATIC);
6205
6414
        vala_ccode_function_add_parameter (function, _tmp3_ = vala_ccode_formal_parameter_new ("self", _tmp2_ = vala_data_type_get_cname (type)));
6206
6415
        _vala_ccode_node_unref0 (_tmp3_);
6207
6416
        _g_free0 (_tmp2_);
6225
6434
 
6226
6435
 
6227
6436
ValaCCodeExpression* vala_ccode_base_module_get_destroy_func_expression (ValaCCodeBaseModule* self, ValaDataType* type, gboolean is_chainup) {
6228
 
        ValaCCodeExpression* result;
 
6437
        ValaCCodeExpression* result = NULL;
6229
6438
        gboolean _tmp0_ = FALSE;
6230
6439
        g_return_val_if_fail (self != NULL, NULL);
6231
6440
        g_return_val_if_fail (type != NULL, NULL);
6306
6515
                                                if (_tmp11_) {
6307
6516
                                                        char* _tmp13_;
6308
6517
                                                        char* _tmp12_;
6309
 
                                                        vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) type), _tmp13_ = g_strdup_printf ("missing class prerequisite for interface `%s', add GLib.Object to interface declaration if unsure", _tmp12_ = vala_symbol_get_full_name ((ValaSymbol*) vala_data_type_get_data_type (type))));
 
6518
                                                        vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) type), _tmp13_ = g_strdup_printf ("missing class prerequisite for interface `%s', add GLib.Object to inte" \
 
6519
"rface declaration if unsure", _tmp12_ = vala_symbol_get_full_name ((ValaSymbol*) vala_data_type_get_data_type (type))));
6310
6520
                                                        _g_free0 (_tmp13_);
6311
6521
                                                        _g_free0 (_tmp12_);
6312
6522
                                                        result = NULL;
6427
6637
 
6428
6638
 
6429
6639
static char* vala_ccode_base_module_generate_glist_free_wrapper (ValaCCodeBaseModule* self, ValaDataType* list_type, ValaCCodeIdentifier* element_destroy_func_expression) {
6430
 
        char* result;
 
6640
        char* result = NULL;
6431
6641
        char* _tmp0_;
6432
6642
        char* _tmp1_;
6433
6643
        char* destroy_func;
6500
6710
 
6501
6711
 
6502
6712
static char* vala_ccode_base_module_real_append_struct_array_free (ValaCCodeBaseModule* self, ValaStruct* st) {
6503
 
        char* result;
 
6713
        char* result = NULL;
6504
6714
        g_return_val_if_fail (self != NULL, NULL);
6505
6715
        g_return_val_if_fail (st != NULL, NULL);
6506
6716
        result = NULL;
6514
6724
 
6515
6725
 
6516
6726
static ValaCCodeExpression* vala_ccode_base_module_real_get_unref_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* cvar, ValaDataType* type, ValaExpression* expr, gboolean is_macro_definition) {
6517
 
        ValaCCodeExpression* result;
 
6727
        ValaCCodeExpression* result = NULL;
6518
6728
        ValaCCodeExpression* _tmp13_;
6519
6729
        ValaCCodeFunctionCall* _tmp14_;
6520
6730
        ValaCCodeFunctionCall* ccall;
6521
6731
        gboolean _tmp15_ = FALSE;
6522
 
        gboolean _tmp24_ = FALSE;
6523
 
        gboolean _tmp25_ = FALSE;
6524
 
        ValaCCodeConstant* _tmp32_;
6525
 
        ValaCCodeBinaryExpression* _tmp33_;
 
6732
        gboolean _tmp26_ = FALSE;
 
6733
        gboolean _tmp27_ = FALSE;
 
6734
        ValaCCodeConstant* _tmp34_;
 
6735
        ValaCCodeBinaryExpression* _tmp35_;
6526
6736
        ValaCCodeBinaryExpression* cisnull;
6527
6737
        ValaCCodeCommaExpression* ccomma;
6528
 
        ValaCCodeConstant* _tmp56_;
 
6738
        ValaCCodeConstant* _tmp58_;
6529
6739
        ValaCCodeAssignment* cassign;
6530
 
        gboolean _tmp57_ = FALSE;
6531
 
        gboolean _tmp58_ = FALSE;
 
6740
        gboolean _tmp59_ = FALSE;
 
6741
        gboolean _tmp60_ = FALSE;
6532
6742
        gboolean uses_gfree;
6533
 
        gboolean _tmp60_ = FALSE;
6534
 
        ValaCCodeConstant* _tmp61_;
6535
 
        ValaCCodeExpression* _tmp62_;
 
6743
        gboolean _tmp62_ = FALSE;
 
6744
        ValaCCodeConstant* _tmp63_;
 
6745
        ValaCCodeExpression* _tmp64_;
6536
6746
        g_return_val_if_fail (self != NULL, NULL);
6537
6747
        g_return_val_if_fail (cvar != NULL, NULL);
6538
6748
        g_return_val_if_fail (type != NULL, NULL);
6539
 
        g_return_val_if_fail (expr != NULL, NULL);
6540
6749
        if (VALA_IS_DELEGATE_TYPE (type)) {
6541
6750
                ValaCCodeExpression* delegate_target_destroy_notify;
6542
6751
                ValaCCodeExpression* _tmp2_;
6588
6797
                _tmp15_ = FALSE;
6589
6798
        }
6590
6799
        if (_tmp15_) {
6591
 
                ValaCCodeUnaryExpression* _tmp16_;
 
6800
                ValaTypeSymbol* _tmp16_;
 
6801
                ValaStruct* st;
6592
6802
                gboolean _tmp17_ = FALSE;
6593
 
                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp16_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cvar)));
6594
 
                _vala_ccode_node_unref0 (_tmp16_);
6595
 
                if (self->gvalue_type != NULL) {
6596
 
                        _tmp17_ = vala_data_type_get_data_type (type) == VALA_TYPESYMBOL (self->gvalue_type);
 
6803
                gboolean _tmp19_ = FALSE;
 
6804
                st = _vala_code_node_ref0 ((_tmp16_ = vala_data_type_get_data_type (type), VALA_IS_STRUCT (_tmp16_) ? ((ValaStruct*) _tmp16_) : NULL));
 
6805
                if (st != NULL) {
 
6806
                        _tmp17_ = vala_struct_is_simple_type (st);
6597
6807
                } else {
6598
6808
                        _tmp17_ = FALSE;
6599
6809
                }
6600
6810
                if (_tmp17_) {
6601
 
                        ValaCCodeIdentifier* _tmp18_;
6602
 
                        ValaCCodeFunctionCall* _tmp19_;
 
6811
                        vala_ccode_function_call_add_argument (ccall, cvar);
 
6812
                } else {
 
6813
                        ValaCCodeUnaryExpression* _tmp18_;
 
6814
                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp18_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cvar)));
 
6815
                        _vala_ccode_node_unref0 (_tmp18_);
 
6816
                }
 
6817
                if (self->gvalue_type != NULL) {
 
6818
                        _tmp19_ = vala_data_type_get_data_type (type) == VALA_TYPESYMBOL (self->gvalue_type);
 
6819
                } else {
 
6820
                        _tmp19_ = FALSE;
 
6821
                }
 
6822
                if (_tmp19_) {
 
6823
                        ValaCCodeIdentifier* _tmp20_;
 
6824
                        ValaCCodeFunctionCall* _tmp21_;
6603
6825
                        ValaCCodeFunctionCall* cisvalid;
6604
 
                        ValaCCodeUnaryExpression* _tmp20_;
 
6826
                        ValaCCodeUnaryExpression* _tmp22_;
6605
6827
                        ValaCCodeCommaExpression* ccomma;
6606
 
                        ValaCCodeConstant* _tmp21_;
6607
 
                        ValaCCodeConstant* _tmp22_;
6608
 
                        ValaCCodeExpression* _tmp23_;
6609
 
                        cisvalid = (_tmp19_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp18_ = vala_ccode_identifier_new ("G_IS_VALUE"))), _vala_ccode_node_unref0 (_tmp18_), _tmp19_);
6610
 
                        vala_ccode_function_call_add_argument (cisvalid, (ValaCCodeExpression*) (_tmp20_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cvar)));
6611
 
                        _vala_ccode_node_unref0 (_tmp20_);
 
6828
                        ValaCCodeConstant* _tmp23_;
 
6829
                        ValaCCodeConstant* _tmp24_;
 
6830
                        ValaCCodeExpression* _tmp25_;
 
6831
                        cisvalid = (_tmp21_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp20_ = vala_ccode_identifier_new ("G_IS_VALUE"))), _vala_ccode_node_unref0 (_tmp20_), _tmp21_);
 
6832
                        vala_ccode_function_call_add_argument (cisvalid, (ValaCCodeExpression*) (_tmp22_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cvar)));
 
6833
                        _vala_ccode_node_unref0 (_tmp22_);
6612
6834
                        ccomma = vala_ccode_comma_expression_new ();
6613
6835
                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) ccall);
6614
 
                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp21_ = vala_ccode_constant_new ("NULL")));
6615
 
                        _vala_ccode_node_unref0 (_tmp21_);
6616
 
                        result = (_tmp23_ = (ValaCCodeExpression*) vala_ccode_conditional_expression_new ((ValaCCodeExpression*) cisvalid, (ValaCCodeExpression*) ccomma, (ValaCCodeExpression*) (_tmp22_ = vala_ccode_constant_new ("NULL"))), _vala_ccode_node_unref0 (_tmp22_), _tmp23_);
 
6836
                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp23_ = vala_ccode_constant_new ("NULL")));
 
6837
                        _vala_ccode_node_unref0 (_tmp23_);
 
6838
                        result = (_tmp25_ = (ValaCCodeExpression*) vala_ccode_conditional_expression_new ((ValaCCodeExpression*) cisvalid, (ValaCCodeExpression*) ccomma, (ValaCCodeExpression*) (_tmp24_ = vala_ccode_constant_new ("NULL"))), _vala_ccode_node_unref0 (_tmp24_), _tmp25_);
6617
6839
                        _vala_ccode_node_unref0 (cisvalid);
6618
6840
                        _vala_ccode_node_unref0 (ccomma);
 
6841
                        _vala_code_node_unref0 (st);
6619
6842
                        _vala_ccode_node_unref0 (ccall);
6620
6843
                        return result;
6621
6844
                        _vala_ccode_node_unref0 (cisvalid);
6622
6845
                        _vala_ccode_node_unref0 (ccomma);
6623
6846
                } else {
6624
6847
                        result = (ValaCCodeExpression*) ccall;
 
6848
                        _vala_code_node_unref0 (st);
6625
6849
                        return result;
6626
6850
                }
 
6851
                _vala_code_node_unref0 (st);
6627
6852
        }
6628
6853
        if (VALA_IS_CCODE_IDENTIFIER (vala_ccode_function_call_get_call (ccall))) {
6629
 
                _tmp25_ = !VALA_IS_ARRAY_TYPE (type);
6630
 
        } else {
6631
 
                _tmp25_ = FALSE;
6632
 
        }
6633
 
        if (_tmp25_) {
6634
 
                _tmp24_ = !is_macro_definition;
6635
 
        } else {
6636
 
                _tmp24_ = FALSE;
6637
 
        }
6638
 
        if (_tmp24_) {
 
6854
                _tmp27_ = !VALA_IS_ARRAY_TYPE (type);
 
6855
        } else {
 
6856
                _tmp27_ = FALSE;
 
6857
        }
 
6858
        if (_tmp27_) {
 
6859
                _tmp26_ = !is_macro_definition;
 
6860
        } else {
 
6861
                _tmp26_ = FALSE;
 
6862
        }
 
6863
        if (_tmp26_) {
6639
6864
                ValaCCodeIdentifier* freeid;
6640
6865
                char* free0_func;
6641
 
                ValaCCodeFunctionCall* _tmp31_;
6642
 
                ValaCCodeIdentifier* _tmp30_;
 
6866
                ValaCCodeFunctionCall* _tmp33_;
 
6867
                ValaCCodeIdentifier* _tmp32_;
6643
6868
                freeid = _vala_ccode_node_ref0 (VALA_CCODE_IDENTIFIER (vala_ccode_function_call_get_call (ccall)));
6644
6869
                free0_func = g_strdup_printf ("_%s0", vala_ccode_identifier_get_name (freeid));
6645
6870
                if (vala_ccode_base_module_add_wrapper (self, free0_func)) {
6646
 
                        ValaCCodeIdentifier* _tmp26_;
6647
 
                        ValaCCodeExpression* _tmp27_;
 
6871
                        ValaCCodeIdentifier* _tmp28_;
 
6872
                        ValaCCodeExpression* _tmp29_;
6648
6873
                        ValaCCodeExpression* macro;
6649
 
                        ValaCCodeMacroReplacement* _tmp29_;
6650
 
                        char* _tmp28_;
6651
 
                        macro = (_tmp27_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp26_ = vala_ccode_identifier_new ("var")), type, expr, TRUE), _vala_ccode_node_unref0 (_tmp26_), _tmp27_);
6652
 
                        vala_ccode_declaration_space_add_type_declaration (self->source_declarations, (ValaCCodeNode*) (_tmp29_ = vala_ccode_macro_replacement_new_with_expression (_tmp28_ = g_strdup_printf ("%s(var)", free0_func), macro)));
6653
 
                        _vala_ccode_node_unref0 (_tmp29_);
6654
 
                        _g_free0 (_tmp28_);
 
6874
                        ValaCCodeMacroReplacement* _tmp31_;
 
6875
                        char* _tmp30_;
 
6876
                        macro = (_tmp29_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp28_ = vala_ccode_identifier_new ("var")), type, expr, TRUE), _vala_ccode_node_unref0 (_tmp28_), _tmp29_);
 
6877
                        vala_ccode_declaration_space_add_type_declaration (self->source_declarations, (ValaCCodeNode*) (_tmp31_ = vala_ccode_macro_replacement_new_with_expression (_tmp30_ = g_strdup_printf ("%s(var)", free0_func), macro)));
 
6878
                        _vala_ccode_node_unref0 (_tmp31_);
 
6879
                        _g_free0 (_tmp30_);
6655
6880
                        _vala_ccode_node_unref0 (macro);
6656
6881
                }
6657
 
                ccall = (_tmp31_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp30_ = vala_ccode_identifier_new (free0_func))), _vala_ccode_node_unref0 (ccall), _tmp31_);
6658
 
                _vala_ccode_node_unref0 (_tmp30_);
 
6882
                ccall = (_tmp33_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp32_ = vala_ccode_identifier_new (free0_func))), _vala_ccode_node_unref0 (ccall), _tmp33_);
 
6883
                _vala_ccode_node_unref0 (_tmp32_);
6659
6884
                vala_ccode_function_call_add_argument (ccall, cvar);
6660
6885
                result = (ValaCCodeExpression*) ccall;
6661
6886
                _vala_ccode_node_unref0 (freeid);
6662
6887
                _g_free0 (free0_func);
6663
6888
                return result;
6664
6889
        }
6665
 
        cisnull = (_tmp33_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, cvar, (ValaCCodeExpression*) (_tmp32_ = vala_ccode_constant_new ("NULL"))), _vala_ccode_node_unref0 (_tmp32_), _tmp33_);
 
6890
        cisnull = (_tmp35_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, cvar, (ValaCCodeExpression*) (_tmp34_ = vala_ccode_constant_new ("NULL"))), _vala_ccode_node_unref0 (_tmp34_), _tmp35_);
6666
6891
        if (vala_data_type_get_type_parameter (type) != NULL) {
6667
 
                gboolean _tmp34_ = FALSE;
6668
 
                ValaCCodeConstant* _tmp36_;
6669
 
                ValaCCodeExpression* _tmp35_;
6670
 
                ValaCCodeBinaryExpression* _tmp37_;
 
6892
                gboolean _tmp36_ = FALSE;
 
6893
                ValaCCodeConstant* _tmp38_;
 
6894
                ValaCCodeExpression* _tmp37_;
 
6895
                ValaCCodeBinaryExpression* _tmp39_;
6671
6896
                ValaCCodeBinaryExpression* cunrefisnull;
6672
 
                ValaCCodeBinaryExpression* _tmp38_;
 
6897
                ValaCCodeBinaryExpression* _tmp40_;
6673
6898
                if (!VALA_IS_CLASS (vala_ccode_base_module_get_current_type_symbol (self))) {
6674
 
                        _tmp34_ = TRUE;
 
6899
                        _tmp36_ = TRUE;
6675
6900
                } else {
6676
 
                        _tmp34_ = vala_class_get_is_compact (vala_ccode_base_module_get_current_class (self));
 
6901
                        _tmp36_ = vala_class_get_is_compact (vala_ccode_base_module_get_current_class (self));
6677
6902
                }
6678
 
                if (_tmp34_) {
 
6903
                if (_tmp36_) {
6679
6904
                        result = (ValaCCodeExpression*) vala_ccode_constant_new ("NULL");
6680
6905
                        _vala_ccode_node_unref0 (ccall);
6681
6906
                        _vala_ccode_node_unref0 (cisnull);
6682
6907
                        return result;
6683
6908
                }
6684
 
                cunrefisnull = (_tmp37_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, _tmp35_ = vala_ccode_base_module_get_destroy_func_expression (self, type, FALSE), (ValaCCodeExpression*) (_tmp36_ = vala_ccode_constant_new ("NULL"))), _vala_ccode_node_unref0 (_tmp36_), _vala_ccode_node_unref0 (_tmp35_), _tmp37_);
6685
 
                cisnull = (_tmp38_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_OR, (ValaCCodeExpression*) cisnull, (ValaCCodeExpression*) cunrefisnull), _vala_ccode_node_unref0 (cisnull), _tmp38_);
 
6909
                cunrefisnull = (_tmp39_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, _tmp37_ = vala_ccode_base_module_get_destroy_func_expression (self, type, FALSE), (ValaCCodeExpression*) (_tmp38_ = vala_ccode_constant_new ("NULL"))), _vala_ccode_node_unref0 (_tmp38_), _vala_ccode_node_unref0 (_tmp37_), _tmp39_);
 
6910
                cisnull = (_tmp40_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_OR, (ValaCCodeExpression*) cisnull, (ValaCCodeExpression*) cunrefisnull), _vala_ccode_node_unref0 (cisnull), _tmp40_);
6686
6911
                _vala_ccode_node_unref0 (cunrefisnull);
6687
6912
        }
6688
6913
        vala_ccode_function_call_add_argument (ccall, cvar);
6689
6914
        ccomma = vala_ccode_comma_expression_new ();
6690
6915
        if (vala_code_context_get_profile (self->priv->_context) == VALA_PROFILE_GOBJECT) {
6691
 
                gboolean _tmp39_ = FALSE;
6692
 
                gboolean _tmp40_ = FALSE;
6693
6916
                gboolean _tmp41_ = FALSE;
 
6917
                gboolean _tmp42_ = FALSE;
 
6918
                gboolean _tmp43_ = FALSE;
6694
6919
                if (vala_data_type_get_data_type (type) == self->gstringbuilder_type) {
 
6920
                        _tmp43_ = TRUE;
 
6921
                } else {
 
6922
                        _tmp43_ = vala_data_type_get_data_type (type) == self->garray_type;
 
6923
                }
 
6924
                if (_tmp43_) {
 
6925
                        _tmp42_ = TRUE;
 
6926
                } else {
 
6927
                        _tmp42_ = vala_data_type_get_data_type (type) == self->gbytearray_type;
 
6928
                }
 
6929
                if (_tmp42_) {
6695
6930
                        _tmp41_ = TRUE;
6696
6931
                } else {
6697
 
                        _tmp41_ = vala_data_type_get_data_type (type) == self->garray_type;
 
6932
                        _tmp41_ = vala_data_type_get_data_type (type) == self->gptrarray_type;
6698
6933
                }
6699
6934
                if (_tmp41_) {
6700
 
                        _tmp40_ = TRUE;
6701
 
                } else {
6702
 
                        _tmp40_ = vala_data_type_get_data_type (type) == self->gbytearray_type;
6703
 
                }
6704
 
                if (_tmp40_) {
6705
 
                        _tmp39_ = TRUE;
6706
 
                } else {
6707
 
                        _tmp39_ = vala_data_type_get_data_type (type) == self->gptrarray_type;
6708
 
                }
6709
 
                if (_tmp39_) {
6710
 
                        ValaCCodeConstant* _tmp42_;
6711
 
                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp42_ = vala_ccode_constant_new ("TRUE")));
6712
 
                        _vala_ccode_node_unref0 (_tmp42_);
 
6935
                        ValaCCodeConstant* _tmp44_;
 
6936
                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp44_ = vala_ccode_constant_new ("TRUE")));
 
6937
                        _vala_ccode_node_unref0 (_tmp44_);
6713
6938
                } else {
6714
6939
                        if (vala_data_type_get_data_type (type) == self->gthreadpool_type) {
6715
 
                                ValaCCodeConstant* _tmp43_;
6716
 
                                ValaCCodeConstant* _tmp44_;
6717
 
                                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp43_ = vala_ccode_constant_new ("FALSE")));
6718
 
                                _vala_ccode_node_unref0 (_tmp43_);
6719
 
                                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp44_ = vala_ccode_constant_new ("TRUE")));
6720
 
                                _vala_ccode_node_unref0 (_tmp44_);
 
6940
                                ValaCCodeConstant* _tmp45_;
 
6941
                                ValaCCodeConstant* _tmp46_;
 
6942
                                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp45_ = vala_ccode_constant_new ("FALSE")));
 
6943
                                _vala_ccode_node_unref0 (_tmp45_);
 
6944
                                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp46_ = vala_ccode_constant_new ("TRUE")));
 
6945
                                _vala_ccode_node_unref0 (_tmp46_);
6721
6946
                        } else {
6722
6947
                                if (VALA_IS_ARRAY_TYPE (type)) {
6723
6948
                                        ValaArrayType* array_type;
6725
6950
                                        if (vala_ccode_base_module_requires_destroy (self, vala_array_type_get_element_type (array_type))) {
6726
6951
                                                ValaCCodeExpression* csizeexpr;
6727
6952
                                                gboolean first;
6728
 
                                                ValaTypeSymbol* _tmp49_;
 
6953
                                                ValaTypeSymbol* _tmp51_;
6729
6954
                                                ValaStruct* st;
6730
 
                                                gboolean _tmp50_ = FALSE;
 
6955
                                                gboolean _tmp52_ = FALSE;
6731
6956
                                                csizeexpr = NULL;
6732
6957
                                                first = TRUE;
6733
6958
                                                {
6734
6959
                                                        gint dim;
6735
6960
                                                        dim = 1;
6736
6961
                                                        {
6737
 
                                                                gboolean _tmp45_;
6738
 
                                                                _tmp45_ = TRUE;
 
6962
                                                                gboolean _tmp47_;
 
6963
                                                                _tmp47_ = TRUE;
6739
6964
                                                                while (TRUE) {
6740
 
                                                                        if (!_tmp45_) {
 
6965
                                                                        if (!_tmp47_) {
6741
6966
                                                                                dim++;
6742
6967
                                                                        }
6743
 
                                                                        _tmp45_ = FALSE;
 
6968
                                                                        _tmp47_ = FALSE;
6744
6969
                                                                        if (!(dim <= vala_array_type_get_rank (array_type))) {
6745
6970
                                                                                break;
6746
6971
                                                                        }
6747
6972
                                                                        if (first) {
6748
 
                                                                                ValaCCodeExpression* _tmp46_;
6749
 
                                                                                csizeexpr = (_tmp46_ = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), expr, dim), _vala_ccode_node_unref0 (csizeexpr), _tmp46_);
 
6973
                                                                                ValaCCodeExpression* _tmp48_;
 
6974
                                                                                csizeexpr = (_tmp48_ = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), expr, dim), _vala_ccode_node_unref0 (csizeexpr), _tmp48_);
6750
6975
                                                                                first = FALSE;
6751
6976
                                                                        } else {
6752
 
                                                                                ValaCCodeExpression* _tmp48_;
6753
 
                                                                                ValaCCodeExpression* _tmp47_;
6754
 
                                                                                csizeexpr = (_tmp48_ = (ValaCCodeExpression*) vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, csizeexpr, _tmp47_ = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), expr, dim)), _vala_ccode_node_unref0 (csizeexpr), _tmp48_);
6755
 
                                                                                _vala_ccode_node_unref0 (_tmp47_);
 
6977
                                                                                ValaCCodeExpression* _tmp50_;
 
6978
                                                                                ValaCCodeExpression* _tmp49_;
 
6979
                                                                                csizeexpr = (_tmp50_ = (ValaCCodeExpression*) vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, csizeexpr, _tmp49_ = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), expr, dim)), _vala_ccode_node_unref0 (csizeexpr), _tmp50_);
 
6980
                                                                                _vala_ccode_node_unref0 (_tmp49_);
6756
6981
                                                                        }
6757
6982
                                                                }
6758
6983
                                                        }
6759
6984
                                                }
6760
 
                                                st = _vala_code_node_ref0 ((_tmp49_ = vala_data_type_get_data_type (vala_array_type_get_element_type (array_type)), VALA_IS_STRUCT (_tmp49_) ? ((ValaStruct*) _tmp49_) : NULL));
 
6985
                                                st = _vala_code_node_ref0 ((_tmp51_ = vala_data_type_get_data_type (vala_array_type_get_element_type (array_type)), VALA_IS_STRUCT (_tmp51_) ? ((ValaStruct*) _tmp51_) : NULL));
6761
6986
                                                if (st != NULL) {
6762
 
                                                        _tmp50_ = !vala_data_type_get_nullable (vala_array_type_get_element_type (array_type));
 
6987
                                                        _tmp52_ = !vala_data_type_get_nullable (vala_array_type_get_element_type (array_type));
6763
6988
                                                } else {
6764
 
                                                        _tmp50_ = FALSE;
 
6989
                                                        _tmp52_ = FALSE;
6765
6990
                                                }
6766
 
                                                if (_tmp50_) {
6767
 
                                                        ValaCCodeIdentifier* _tmp52_;
6768
 
                                                        char* _tmp51_;
6769
 
                                                        vala_ccode_function_call_set_call (ccall, (ValaCCodeExpression*) (_tmp52_ = vala_ccode_identifier_new (_tmp51_ = vala_ccode_base_module_append_struct_array_free (self, st))));
6770
 
                                                        _vala_ccode_node_unref0 (_tmp52_);
6771
 
                                                        _g_free0 (_tmp51_);
 
6991
                                                if (_tmp52_) {
 
6992
                                                        ValaCCodeIdentifier* _tmp54_;
 
6993
                                                        char* _tmp53_;
 
6994
                                                        vala_ccode_function_call_set_call (ccall, (ValaCCodeExpression*) (_tmp54_ = vala_ccode_identifier_new (_tmp53_ = vala_ccode_base_module_append_struct_array_free (self, st))));
 
6995
                                                        _vala_ccode_node_unref0 (_tmp54_);
 
6996
                                                        _g_free0 (_tmp53_);
6772
6997
                                                        vala_ccode_function_call_add_argument (ccall, csizeexpr);
6773
6998
                                                } else {
6774
 
                                                        ValaCCodeIdentifier* _tmp53_;
6775
 
                                                        ValaCCodeCastExpression* _tmp55_;
6776
 
                                                        ValaCCodeExpression* _tmp54_;
 
6999
                                                        ValaCCodeIdentifier* _tmp55_;
 
7000
                                                        ValaCCodeCastExpression* _tmp57_;
 
7001
                                                        ValaCCodeExpression* _tmp56_;
6777
7002
                                                        self->requires_array_free = TRUE;
6778
 
                                                        vala_ccode_function_call_set_call (ccall, (ValaCCodeExpression*) (_tmp53_ = vala_ccode_identifier_new ("_vala_array_free")));
6779
 
                                                        _vala_ccode_node_unref0 (_tmp53_);
6780
 
                                                        vala_ccode_function_call_add_argument (ccall, csizeexpr);
6781
 
                                                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp55_ = vala_ccode_cast_expression_new (_tmp54_ = vala_ccode_base_module_get_destroy_func_expression (self, vala_array_type_get_element_type (array_type), FALSE), "GDestroyNotify")));
 
7003
                                                        vala_ccode_function_call_set_call (ccall, (ValaCCodeExpression*) (_tmp55_ = vala_ccode_identifier_new ("_vala_array_free")));
6782
7004
                                                        _vala_ccode_node_unref0 (_tmp55_);
6783
 
                                                        _vala_ccode_node_unref0 (_tmp54_);
 
7005
                                                        vala_ccode_function_call_add_argument (ccall, csizeexpr);
 
7006
                                                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp57_ = vala_ccode_cast_expression_new (_tmp56_ = vala_ccode_base_module_get_destroy_func_expression (self, vala_array_type_get_element_type (array_type), FALSE), "GDestroyNotify")));
 
7007
                                                        _vala_ccode_node_unref0 (_tmp57_);
 
7008
                                                        _vala_ccode_node_unref0 (_tmp56_);
6784
7009
                                                }
6785
7010
                                                _vala_ccode_node_unref0 (csizeexpr);
6786
7011
                                                _vala_code_node_unref0 (st);
6791
7016
                }
6792
7017
        }
6793
7018
        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) ccall);
6794
 
        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp56_ = vala_ccode_constant_new ("NULL")));
6795
 
        _vala_ccode_node_unref0 (_tmp56_);
 
7019
        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp58_ = vala_ccode_constant_new ("NULL")));
 
7020
        _vala_ccode_node_unref0 (_tmp58_);
6796
7021
        cassign = vala_ccode_assignment_new (cvar, (ValaCCodeExpression*) ccomma, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
6797
7022
        if (vala_data_type_get_data_type (type) != NULL) {
6798
 
                _tmp58_ = !vala_typesymbol_is_reference_counting (vala_data_type_get_data_type (type));
6799
 
        } else {
6800
 
                _tmp58_ = FALSE;
6801
 
        }
6802
 
        if (_tmp58_) {
6803
 
                char* _tmp59_;
6804
 
                _tmp57_ = _vala_strcmp0 (_tmp59_ = vala_typesymbol_get_free_function (vala_data_type_get_data_type (type)), "g_free") == 0;
6805
 
                _g_free0 (_tmp59_);
6806
 
        } else {
6807
 
                _tmp57_ = FALSE;
6808
 
        }
6809
 
        uses_gfree = _tmp57_;
 
7023
                _tmp60_ = !vala_typesymbol_is_reference_counting (vala_data_type_get_data_type (type));
 
7024
        } else {
 
7025
                _tmp60_ = FALSE;
 
7026
        }
 
7027
        if (_tmp60_) {
 
7028
                char* _tmp61_;
 
7029
                _tmp59_ = _vala_strcmp0 (_tmp61_ = vala_typesymbol_get_free_function (vala_data_type_get_data_type (type)), "g_free") == 0;
 
7030
                _g_free0 (_tmp61_);
 
7031
        } else {
 
7032
                _tmp59_ = FALSE;
 
7033
        }
 
7034
        uses_gfree = _tmp59_;
6810
7035
        if (uses_gfree) {
6811
 
                _tmp60_ = TRUE;
 
7036
                _tmp62_ = TRUE;
6812
7037
        } else {
6813
 
                _tmp60_ = VALA_IS_ARRAY_TYPE (type);
 
7038
                _tmp62_ = VALA_IS_ARRAY_TYPE (type);
6814
7039
        }
6815
 
        uses_gfree = _tmp60_;
 
7040
        uses_gfree = _tmp62_;
6816
7041
        if (uses_gfree) {
6817
7042
                result = (ValaCCodeExpression*) cassign;
6818
7043
                _vala_ccode_node_unref0 (ccall);
6820
7045
                _vala_ccode_node_unref0 (ccomma);
6821
7046
                return result;
6822
7047
        }
6823
 
        result = (_tmp62_ = (ValaCCodeExpression*) vala_ccode_conditional_expression_new ((ValaCCodeExpression*) cisnull, (ValaCCodeExpression*) (_tmp61_ = vala_ccode_constant_new ("NULL")), (ValaCCodeExpression*) cassign), _vala_ccode_node_unref0 (_tmp61_), _tmp62_);
 
7048
        result = (_tmp64_ = (ValaCCodeExpression*) vala_ccode_conditional_expression_new ((ValaCCodeExpression*) cisnull, (ValaCCodeExpression*) (_tmp63_ = vala_ccode_constant_new ("NULL")), (ValaCCodeExpression*) cassign), _vala_ccode_node_unref0 (_tmp63_), _tmp64_);
6824
7049
        _vala_ccode_node_unref0 (ccall);
6825
7050
        _vala_ccode_node_unref0 (cisnull);
6826
7051
        _vala_ccode_node_unref0 (ccomma);
6840
7065
 
6841
7066
static void vala_ccode_base_module_real_visit_end_full_expression (ValaCCodeModule* base, ValaExpression* expr) {
6842
7067
        ValaCCodeBaseModule * self;
6843
 
        ValaDataType* expr_type;
 
7068
        ValaCCodeCommaExpression* expr_list;
6844
7069
        ValaLocalVariable* full_expr_var;
6845
 
        ValaCCodeCommaExpression* expr_list;
6846
 
        ValaCCodeAssignment* _tmp2_;
6847
 
        ValaCCodeExpression* _tmp1_;
6848
 
        ValaCCodeExpression* _tmp6_;
 
7070
        ValaCodeNode* _tmp0_;
 
7071
        ValaLocalVariable* local_decl;
 
7072
        gboolean _tmp1_ = FALSE;
6849
7073
        self = (ValaCCodeBaseModule*) base;
6850
7074
        g_return_if_fail (expr != NULL);
6851
7075
        vala_collection_clear ((ValaCollection*) expr->temp_vars);
6867
7091
        if (vala_collection_get_size ((ValaCollection*) VALA_LIST (self->temp_ref_vars)) == 0) {
6868
7092
                return;
6869
7093
        }
6870
 
        expr_type = _vala_code_node_ref0 (vala_expression_get_value_type (expr));
6871
 
        if (vala_expression_get_target_type (expr) != NULL) {
6872
 
                ValaDataType* _tmp0_;
6873
 
                expr_type = (_tmp0_ = _vala_code_node_ref0 (vala_expression_get_target_type (expr)), _vala_code_node_unref0 (expr_type), _tmp0_);
6874
 
        }
6875
 
        full_expr_var = vala_ccode_base_module_get_temp_variable (self, expr_type, TRUE, (ValaCodeNode*) expr, FALSE);
6876
 
        vala_collection_add ((ValaCollection*) expr->temp_vars, full_expr_var);
6877
7094
        expr_list = vala_ccode_comma_expression_new ();
6878
 
        vala_ccode_comma_expression_append_expression (expr_list, (ValaCCodeExpression*) (_tmp2_ = vala_ccode_assignment_new (_tmp1_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) full_expr_var)), VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr)), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
6879
 
        _vala_ccode_node_unref0 (_tmp2_);
6880
 
        _vala_ccode_node_unref0 (_tmp1_);
 
7095
        full_expr_var = NULL;
 
7096
        local_decl = _vala_code_node_ref0 ((_tmp0_ = vala_code_node_get_parent_node ((ValaCodeNode*) expr), VALA_IS_LOCAL_VARIABLE (_tmp0_) ? ((ValaLocalVariable*) _tmp0_) : NULL));
 
7097
        if (local_decl != NULL) {
 
7098
                _tmp1_ = vala_ccode_base_module_has_simple_struct_initializer (self, local_decl);
 
7099
        } else {
 
7100
                _tmp1_ = FALSE;
 
7101
        }
 
7102
        if (_tmp1_) {
 
7103
                vala_ccode_comma_expression_append_expression (expr_list, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr)));
 
7104
        } else {
 
7105
                ValaDataType* expr_type;
 
7106
                ValaLocalVariable* _tmp3_;
 
7107
                ValaCCodeAssignment* _tmp5_;
 
7108
                ValaCCodeExpression* _tmp4_;
 
7109
                expr_type = _vala_code_node_ref0 (vala_expression_get_value_type (expr));
 
7110
                if (vala_expression_get_target_type (expr) != NULL) {
 
7111
                        ValaDataType* _tmp2_;
 
7112
                        expr_type = (_tmp2_ = _vala_code_node_ref0 (vala_expression_get_target_type (expr)), _vala_code_node_unref0 (expr_type), _tmp2_);
 
7113
                }
 
7114
                full_expr_var = (_tmp3_ = vala_ccode_base_module_get_temp_variable (self, expr_type, TRUE, (ValaCodeNode*) expr, FALSE), _vala_code_node_unref0 (full_expr_var), _tmp3_);
 
7115
                vala_collection_add ((ValaCollection*) expr->temp_vars, full_expr_var);
 
7116
                vala_ccode_comma_expression_append_expression (expr_list, (ValaCCodeExpression*) (_tmp5_ = vala_ccode_assignment_new (_tmp4_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) full_expr_var)), VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr)), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
7117
                _vala_ccode_node_unref0 (_tmp5_);
 
7118
                _vala_ccode_node_unref0 (_tmp4_);
 
7119
                _vala_code_node_unref0 (expr_type);
 
7120
        }
6881
7121
        {
6882
7122
                ValaIterator* _local_it;
6883
7123
                _local_it = vala_iterable_iterator ((ValaIterable*) self->temp_ref_vars);
6884
7124
                while (TRUE) {
6885
7125
                        ValaLocalVariable* local;
6886
7126
                        ValaMemberAccess* ma;
6887
 
                        ValaDataType* _tmp3_;
6888
 
                        ValaCCodeExpression* _tmp5_;
6889
 
                        ValaCCodeExpression* _tmp4_;
 
7127
                        ValaDataType* _tmp6_;
 
7128
                        ValaCCodeExpression* _tmp8_;
 
7129
                        ValaCCodeExpression* _tmp7_;
6890
7130
                        if (!vala_iterator_next (_local_it)) {
6891
7131
                                break;
6892
7132
                        }
6893
7133
                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
6894
7134
                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
6895
7135
                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
6896
 
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp3_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
6897
 
                        _vala_code_node_unref0 (_tmp3_);
6898
 
                        vala_ccode_comma_expression_append_expression (expr_list, _tmp5_ = vala_ccode_base_module_get_unref_expression (self, _tmp4_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE));
6899
 
                        _vala_ccode_node_unref0 (_tmp5_);
6900
 
                        _vala_ccode_node_unref0 (_tmp4_);
 
7136
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp6_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
7137
                        _vala_code_node_unref0 (_tmp6_);
 
7138
                        vala_ccode_comma_expression_append_expression (expr_list, _tmp8_ = vala_ccode_base_module_get_unref_expression (self, _tmp7_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE));
 
7139
                        _vala_ccode_node_unref0 (_tmp8_);
 
7140
                        _vala_ccode_node_unref0 (_tmp7_);
6901
7141
                        _vala_code_node_unref0 (local);
6902
7142
                        _vala_code_node_unref0 (ma);
6903
7143
                }
6904
7144
                _vala_collection_object_unref0 (_local_it);
6905
7145
        }
6906
 
        vala_ccode_comma_expression_append_expression (expr_list, _tmp6_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) full_expr_var)));
6907
 
        _vala_ccode_node_unref0 (_tmp6_);
 
7146
        if (full_expr_var != NULL) {
 
7147
                ValaCCodeExpression* _tmp9_;
 
7148
                vala_ccode_comma_expression_append_expression (expr_list, _tmp9_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) full_expr_var)));
 
7149
                _vala_ccode_node_unref0 (_tmp9_);
 
7150
        }
6908
7151
        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) expr_list);
6909
7152
        vala_collection_clear ((ValaCollection*) self->temp_ref_vars);
6910
 
        _vala_code_node_unref0 (expr_type);
 
7153
        _vala_ccode_node_unref0 (expr_list);
6911
7154
        _vala_code_node_unref0 (full_expr_var);
6912
 
        _vala_ccode_node_unref0 (expr_list);
 
7155
        _vala_code_node_unref0 (local_decl);
6913
7156
}
6914
7157
 
6915
7158
 
7009
7252
                        }
7010
7253
                        if (_tmp14_) {
7011
7254
                                char* _tmp15_;
7012
 
                                vala_ccode_struct_add_field (self->closure_struct, _tmp15_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local)), vala_symbol_get_name ((ValaSymbol*) local));
 
7255
                                vala_ccode_struct_add_field (self->closure_struct, _tmp15_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local)), vala_symbol_get_name ((ValaSymbol*) local), NULL);
7013
7256
                                _g_free0 (_tmp15_);
7014
7257
                                if (VALA_IS_CCODE_INITIALIZER_LIST (vala_ccode_variable_declarator_get_initializer (vardecl))) {
7015
7258
                                        ValaCCodeIdentifier* _tmp16_;
7067
7310
        gboolean _tmp1_ = FALSE;
7068
7311
        gboolean _tmp2_ = FALSE;
7069
7312
        ValaCCodeFragment* cfrag;
 
7313
        gboolean _tmp9_ = FALSE;
7070
7314
        self = (ValaCCodeBaseModule*) base;
7071
7315
        g_return_if_fail (stmt != NULL);
7072
7316
        vala_code_node_accept_children ((ValaCodeNode*) stmt, (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
7076
7320
        }
7077
7321
        vala_code_node_set_ccodenode ((ValaCodeNode*) stmt, (ValaCCodeNode*) (_tmp0_ = vala_ccode_expression_statement_new (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_expression_statement_get_expression (stmt))))));
7078
7322
        _vala_ccode_node_unref0 (_tmp0_);
7079
 
        if (vala_code_node_get_tree_can_fail ((ValaCodeNode*) stmt)) {
7080
 
                _tmp1_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) vala_expression_statement_get_expression (stmt));
7081
 
        } else {
7082
 
                _tmp1_ = FALSE;
7083
 
        }
7084
 
        if (_tmp1_) {
7085
 
                ValaCCodeFragment* cfrag;
7086
 
                cfrag = vala_ccode_fragment_new ();
7087
 
                vala_ccode_fragment_append (cfrag, vala_code_node_get_ccodenode ((ValaCodeNode*) stmt));
7088
 
                vala_ccode_module_add_simple_check (vala_ccode_module_get_head ((ValaCCodeModule*) self), (ValaCodeNode*) vala_expression_statement_get_expression (stmt), cfrag);
7089
 
                vala_code_node_set_ccodenode ((ValaCodeNode*) stmt, (ValaCCodeNode*) cfrag);
7090
 
                _vala_ccode_node_unref0 (cfrag);
7091
 
        }
7092
7323
        if (vala_collection_get_size ((ValaCollection*) VALA_LIST (self->temp_vars)) == 0) {
7093
7324
                _tmp2_ = self->pre_statement_fragment == NULL;
7094
7325
        } else {
7095
7326
                _tmp2_ = FALSE;
7096
7327
        }
7097
7328
        if (_tmp2_) {
 
7329
                gboolean _tmp3_ = FALSE;
 
7330
                if (!vala_code_node_get_tree_can_fail ((ValaCodeNode*) stmt)) {
 
7331
                        _tmp3_ = TRUE;
 
7332
                } else {
 
7333
                        _tmp3_ = !vala_code_node_get_tree_can_fail ((ValaCodeNode*) vala_expression_statement_get_expression (stmt));
 
7334
                }
 
7335
                _tmp1_ = _tmp3_;
 
7336
        } else {
 
7337
                _tmp1_ = FALSE;
 
7338
        }
 
7339
        if (_tmp1_) {
7098
7340
                return;
7099
7341
        }
7100
7342
        cfrag = vala_ccode_fragment_new ();
7101
7343
        vala_ccode_base_module_append_temp_decl (self, cfrag, (ValaList*) self->temp_vars);
7102
7344
        if (self->pre_statement_fragment != NULL) {
7103
 
                ValaCCodeFragment* _tmp3_;
 
7345
                ValaCCodeFragment* _tmp4_;
7104
7346
                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) self->pre_statement_fragment);
7105
 
                self->pre_statement_fragment = (_tmp3_ = NULL, _vala_ccode_node_unref0 (self->pre_statement_fragment), _tmp3_);
 
7347
                self->pre_statement_fragment = (_tmp4_ = NULL, _vala_ccode_node_unref0 (self->pre_statement_fragment), _tmp4_);
7106
7348
        }
7107
7349
        vala_ccode_fragment_append (cfrag, vala_code_node_get_ccodenode ((ValaCodeNode*) stmt));
7108
7350
        {
7111
7353
                while (TRUE) {
7112
7354
                        ValaLocalVariable* local;
7113
7355
                        ValaMemberAccess* ma;
7114
 
                        ValaDataType* _tmp4_;
7115
 
                        ValaCCodeExpressionStatement* _tmp7_;
 
7356
                        ValaDataType* _tmp5_;
 
7357
                        ValaCCodeExpressionStatement* _tmp8_;
 
7358
                        ValaCCodeExpression* _tmp7_;
7116
7359
                        ValaCCodeExpression* _tmp6_;
7117
 
                        ValaCCodeExpression* _tmp5_;
7118
7360
                        if (!vala_iterator_next (_local_it)) {
7119
7361
                                break;
7120
7362
                        }
7121
7363
                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
7122
7364
                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
7123
7365
                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
7124
 
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp4_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
7125
 
                        _vala_code_node_unref0 (_tmp4_);
7126
 
                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp7_ = vala_ccode_expression_statement_new (_tmp6_ = vala_ccode_base_module_get_unref_expression (self, _tmp5_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
7366
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp5_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
7367
                        _vala_code_node_unref0 (_tmp5_);
 
7368
                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp8_ = vala_ccode_expression_statement_new (_tmp7_ = vala_ccode_base_module_get_unref_expression (self, _tmp6_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
7369
                        _vala_ccode_node_unref0 (_tmp8_);
7127
7370
                        _vala_ccode_node_unref0 (_tmp7_);
7128
7371
                        _vala_ccode_node_unref0 (_tmp6_);
7129
 
                        _vala_ccode_node_unref0 (_tmp5_);
7130
7372
                        _vala_code_node_unref0 (local);
7131
7373
                        _vala_code_node_unref0 (ma);
7132
7374
                }
7133
7375
                _vala_collection_object_unref0 (_local_it);
7134
7376
        }
 
7377
        if (vala_code_node_get_tree_can_fail ((ValaCodeNode*) stmt)) {
 
7378
                _tmp9_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) vala_expression_statement_get_expression (stmt));
 
7379
        } else {
 
7380
                _tmp9_ = FALSE;
 
7381
        }
 
7382
        if (_tmp9_) {
 
7383
                vala_ccode_module_add_simple_check (vala_ccode_module_get_head ((ValaCCodeModule*) self), (ValaCodeNode*) vala_expression_statement_get_expression (stmt), cfrag, FALSE);
 
7384
        }
7135
7385
        vala_code_node_set_ccodenode ((ValaCodeNode*) stmt, (ValaCCodeNode*) cfrag);
7136
7386
        vala_collection_clear ((ValaCollection*) self->temp_vars);
7137
7387
        vala_collection_clear ((ValaCollection*) self->temp_ref_vars);
7171
7421
                        gboolean _tmp0_ = FALSE;
7172
7422
                        gboolean _tmp1_ = FALSE;
7173
7423
                        gboolean _tmp2_ = FALSE;
7174
 
                        if (!vala_iterator_next (_local_it)) {
7175
 
                                break;
7176
 
                        }
7177
 
                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
7178
 
                        if (vala_symbol_get_active ((ValaSymbol*) local)) {
7179
 
                                _tmp2_ = !vala_local_variable_get_floating (local);
7180
 
                        } else {
7181
 
                                _tmp2_ = FALSE;
7182
 
                        }
7183
 
                        if (_tmp2_) {
7184
 
                                _tmp1_ = !vala_local_variable_get_captured (local);
7185
 
                        } else {
7186
 
                                _tmp1_ = FALSE;
7187
 
                        }
7188
 
                        if (_tmp1_) {
7189
 
                                _tmp0_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
7190
 
                        } else {
7191
 
                                _tmp0_ = FALSE;
7192
 
                        }
7193
 
                        if (_tmp0_) {
7194
 
                                ValaMemberAccess* ma;
7195
 
                                ValaDataType* _tmp3_;
 
7424
                        gboolean _tmp3_ = FALSE;
 
7425
                        if (!vala_iterator_next (_local_it)) {
 
7426
                                break;
 
7427
                        }
 
7428
                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
 
7429
                        if (!vala_code_node_get_unreachable ((ValaCodeNode*) local)) {
 
7430
                                _tmp3_ = vala_symbol_get_active ((ValaSymbol*) local);
 
7431
                        } else {
 
7432
                                _tmp3_ = FALSE;
 
7433
                        }
 
7434
                        if (_tmp3_) {
 
7435
                                _tmp2_ = !vala_local_variable_get_floating (local);
 
7436
                        } else {
 
7437
                                _tmp2_ = FALSE;
 
7438
                        }
 
7439
                        if (_tmp2_) {
 
7440
                                _tmp1_ = !vala_local_variable_get_captured (local);
 
7441
                        } else {
 
7442
                                _tmp1_ = FALSE;
 
7443
                        }
 
7444
                        if (_tmp1_) {
 
7445
                                _tmp0_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
 
7446
                        } else {
 
7447
                                _tmp0_ = FALSE;
 
7448
                        }
 
7449
                        if (_tmp0_) {
 
7450
                                ValaMemberAccess* ma;
 
7451
                                ValaDataType* _tmp4_;
 
7452
                                ValaCCodeExpressionStatement* _tmp7_;
 
7453
                                ValaCCodeExpression* _tmp6_;
 
7454
                                ValaCCodeExpression* _tmp5_;
 
7455
                                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
 
7456
                                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
 
7457
                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp4_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
7458
                                _vala_code_node_unref0 (_tmp4_);
 
7459
                                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp7_ = vala_ccode_expression_statement_new (_tmp6_ = vala_ccode_base_module_get_unref_expression (self, _tmp5_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
7460
                                _vala_ccode_node_unref0 (_tmp7_);
 
7461
                                _vala_ccode_node_unref0 (_tmp6_);
 
7462
                                _vala_ccode_node_unref0 (_tmp5_);
 
7463
                                _vala_code_node_unref0 (ma);
 
7464
                        }
 
7465
                        _vala_code_node_unref0 (local);
 
7466
                }
 
7467
                _vala_collection_object_unref0 (_local_it);
 
7468
        }
 
7469
        if (vala_block_get_captured (b)) {
 
7470
                gint block_id;
 
7471
                ValaCCodeIdentifier* _tmp9_;
 
7472
                char* _tmp8_;
 
7473
                ValaCCodeFunctionCall* _tmp10_;
 
7474
                ValaCCodeFunctionCall* data_unref;
 
7475
                ValaCCodeExpression* _tmp12_;
 
7476
                char* _tmp11_;
 
7477
                ValaCCodeExpressionStatement* _tmp13_;
 
7478
                block_id = vala_ccode_base_module_get_block_id (self, b);
 
7479
                data_unref = (_tmp10_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp9_ = vala_ccode_identifier_new (_tmp8_ = g_strdup_printf ("block%d_data_unref", block_id)))), _vala_ccode_node_unref0 (_tmp9_), _g_free0 (_tmp8_), _tmp10_);
 
7480
                vala_ccode_function_call_add_argument (data_unref, _tmp12_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp11_ = g_strdup_printf ("_data%d_", block_id)));
 
7481
                _vala_ccode_node_unref0 (_tmp12_);
 
7482
                _g_free0 (_tmp11_);
 
7483
                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp13_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) data_unref)));
 
7484
                _vala_ccode_node_unref0 (_tmp13_);
 
7485
                _vala_ccode_node_unref0 (data_unref);
 
7486
        }
 
7487
        if (stop_at_loop) {
 
7488
                gboolean _tmp14_ = FALSE;
 
7489
                gboolean _tmp15_ = FALSE;
 
7490
                if (VALA_IS_LOOP (vala_code_node_get_parent_node ((ValaCodeNode*) b))) {
 
7491
                        _tmp15_ = TRUE;
 
7492
                } else {
 
7493
                        _tmp15_ = VALA_IS_FOREACH_STATEMENT (vala_code_node_get_parent_node ((ValaCodeNode*) b));
 
7494
                }
 
7495
                if (_tmp15_) {
 
7496
                        _tmp14_ = TRUE;
 
7497
                } else {
 
7498
                        _tmp14_ = VALA_IS_SWITCH_STATEMENT (vala_code_node_get_parent_node ((ValaCodeNode*) b));
 
7499
                }
 
7500
                if (_tmp14_) {
 
7501
                        _vala_code_node_unref0 (b);
 
7502
                        _vala_collection_object_unref0 (local_vars);
 
7503
                        return;
 
7504
                }
 
7505
        }
 
7506
        if (VALA_IS_BLOCK (vala_symbol_get_parent_symbol (sym))) {
 
7507
                vala_ccode_base_module_append_local_free (self, vala_symbol_get_parent_symbol (sym), cfrag, stop_at_loop);
 
7508
        } else {
 
7509
                if (VALA_IS_METHOD (vala_symbol_get_parent_symbol (sym))) {
 
7510
                        vala_ccode_base_module_append_param_free (self, VALA_METHOD (vala_symbol_get_parent_symbol (sym)), cfrag);
 
7511
                }
 
7512
        }
 
7513
        _vala_code_node_unref0 (b);
 
7514
        _vala_collection_object_unref0 (local_vars);
 
7515
}
 
7516
 
 
7517
 
 
7518
void vala_ccode_base_module_append_local_free (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCCodeFragment* cfrag, gboolean stop_at_loop) {
 
7519
        VALA_CCODE_BASE_MODULE_GET_CLASS (self)->append_local_free (self, sym, cfrag, stop_at_loop);
 
7520
}
 
7521
 
 
7522
 
 
7523
void vala_ccode_base_module_append_error_free (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCCodeFragment* cfrag, ValaTryStatement* current_try) {
 
7524
        ValaBlock* b;
 
7525
        ValaList* local_vars;
 
7526
        g_return_if_fail (self != NULL);
 
7527
        g_return_if_fail (sym != NULL);
 
7528
        g_return_if_fail (cfrag != NULL);
 
7529
        g_return_if_fail (current_try != NULL);
 
7530
        b = _vala_code_node_ref0 (VALA_BLOCK (sym));
 
7531
        local_vars = vala_block_get_local_variables (b);
 
7532
        {
 
7533
                ValaIterator* _local_it;
 
7534
                _local_it = vala_iterable_iterator ((ValaIterable*) local_vars);
 
7535
                while (TRUE) {
 
7536
                        ValaLocalVariable* local;
 
7537
                        gboolean _tmp0_ = FALSE;
 
7538
                        gboolean _tmp1_ = FALSE;
 
7539
                        gboolean _tmp2_ = FALSE;
 
7540
                        gboolean _tmp3_ = FALSE;
 
7541
                        if (!vala_iterator_next (_local_it)) {
 
7542
                                break;
 
7543
                        }
 
7544
                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
 
7545
                        if (!vala_code_node_get_unreachable ((ValaCodeNode*) local)) {
 
7546
                                _tmp3_ = vala_symbol_get_active ((ValaSymbol*) local);
 
7547
                        } else {
 
7548
                                _tmp3_ = FALSE;
 
7549
                        }
 
7550
                        if (_tmp3_) {
 
7551
                                _tmp2_ = !vala_local_variable_get_floating (local);
 
7552
                        } else {
 
7553
                                _tmp2_ = FALSE;
 
7554
                        }
 
7555
                        if (_tmp2_) {
 
7556
                                _tmp1_ = !vala_local_variable_get_captured (local);
 
7557
                        } else {
 
7558
                                _tmp1_ = FALSE;
 
7559
                        }
 
7560
                        if (_tmp1_) {
 
7561
                                _tmp0_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
 
7562
                        } else {
 
7563
                                _tmp0_ = FALSE;
 
7564
                        }
 
7565
                        if (_tmp0_) {
 
7566
                                ValaMemberAccess* ma;
7196
7567
                                ValaCCodeExpressionStatement* _tmp6_;
7197
7568
                                ValaCCodeExpression* _tmp5_;
7198
7569
                                ValaCCodeExpression* _tmp4_;
7199
7570
                                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
7200
7571
                                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
7201
 
                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp3_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
7202
 
                                _vala_code_node_unref0 (_tmp3_);
7203
7572
                                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp6_ = vala_ccode_expression_statement_new (_tmp5_ = vala_ccode_base_module_get_unref_expression (self, _tmp4_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
7204
7573
                                _vala_ccode_node_unref0 (_tmp6_);
7205
7574
                                _vala_ccode_node_unref0 (_tmp5_);
7228
7597
                _vala_ccode_node_unref0 (_tmp12_);
7229
7598
                _vala_ccode_node_unref0 (data_unref);
7230
7599
        }
7231
 
        if (stop_at_loop) {
7232
 
                gboolean _tmp13_ = FALSE;
7233
 
                gboolean _tmp14_ = FALSE;
7234
 
                if (VALA_IS_LOOP (vala_code_node_get_parent_node ((ValaCodeNode*) b))) {
7235
 
                        _tmp14_ = TRUE;
7236
 
                } else {
7237
 
                        _tmp14_ = VALA_IS_FOREACH_STATEMENT (vala_code_node_get_parent_node ((ValaCodeNode*) b));
7238
 
                }
7239
 
                if (_tmp14_) {
7240
 
                        _tmp13_ = TRUE;
7241
 
                } else {
7242
 
                        _tmp13_ = VALA_IS_SWITCH_STATEMENT (vala_code_node_get_parent_node ((ValaCodeNode*) b));
7243
 
                }
7244
 
                if (_tmp13_) {
7245
 
                        _vala_code_node_unref0 (b);
7246
 
                        _vala_collection_object_unref0 (local_vars);
7247
 
                        return;
7248
 
                }
7249
 
        }
7250
 
        if (VALA_IS_BLOCK (vala_symbol_get_parent_symbol (sym))) {
7251
 
                vala_ccode_base_module_append_local_free (self, vala_symbol_get_parent_symbol (sym), cfrag, stop_at_loop);
7252
 
        } else {
7253
 
                if (VALA_IS_METHOD (vala_symbol_get_parent_symbol (sym))) {
7254
 
                        vala_ccode_base_module_append_param_free (self, VALA_METHOD (vala_symbol_get_parent_symbol (sym)), cfrag);
7255
 
                }
7256
 
        }
7257
 
        _vala_code_node_unref0 (b);
7258
 
        _vala_collection_object_unref0 (local_vars);
7259
 
}
7260
 
 
7261
 
 
7262
 
void vala_ccode_base_module_append_local_free (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCCodeFragment* cfrag, gboolean stop_at_loop) {
7263
 
        VALA_CCODE_BASE_MODULE_GET_CLASS (self)->append_local_free (self, sym, cfrag, stop_at_loop);
7264
 
}
7265
 
 
7266
 
 
7267
 
void vala_ccode_base_module_append_error_free (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCCodeFragment* cfrag, ValaTryStatement* current_try) {
7268
 
        ValaBlock* b;
7269
 
        ValaList* local_vars;
7270
 
        g_return_if_fail (self != NULL);
7271
 
        g_return_if_fail (sym != NULL);
7272
 
        g_return_if_fail (cfrag != NULL);
7273
 
        g_return_if_fail (current_try != NULL);
7274
 
        b = _vala_code_node_ref0 (VALA_BLOCK (sym));
7275
 
        local_vars = vala_block_get_local_variables (b);
7276
 
        {
7277
 
                ValaIterator* _local_it;
7278
 
                _local_it = vala_iterable_iterator ((ValaIterable*) local_vars);
7279
 
                while (TRUE) {
7280
 
                        ValaLocalVariable* local;
7281
 
                        gboolean _tmp0_ = FALSE;
7282
 
                        gboolean _tmp1_ = FALSE;
7283
 
                        if (!vala_iterator_next (_local_it)) {
7284
 
                                break;
7285
 
                        }
7286
 
                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
7287
 
                        if (vala_symbol_get_active ((ValaSymbol*) local)) {
7288
 
                                _tmp1_ = !vala_local_variable_get_floating (local);
7289
 
                        } else {
7290
 
                                _tmp1_ = FALSE;
7291
 
                        }
7292
 
                        if (_tmp1_) {
7293
 
                                _tmp0_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
7294
 
                        } else {
7295
 
                                _tmp0_ = FALSE;
7296
 
                        }
7297
 
                        if (_tmp0_) {
7298
 
                                ValaMemberAccess* ma;
7299
 
                                ValaCCodeExpressionStatement* _tmp4_;
7300
 
                                ValaCCodeExpression* _tmp3_;
7301
 
                                ValaCCodeExpression* _tmp2_;
7302
 
                                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
7303
 
                                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
7304
 
                                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp4_ = vala_ccode_expression_statement_new (_tmp3_ = vala_ccode_base_module_get_unref_expression (self, _tmp2_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
7305
 
                                _vala_ccode_node_unref0 (_tmp4_);
7306
 
                                _vala_ccode_node_unref0 (_tmp3_);
7307
 
                                _vala_ccode_node_unref0 (_tmp2_);
7308
 
                                _vala_code_node_unref0 (ma);
7309
 
                        }
7310
 
                        _vala_code_node_unref0 (local);
7311
 
                }
7312
 
                _vala_collection_object_unref0 (_local_it);
7313
 
        }
7314
7600
        if (sym == VALA_SYMBOL (vala_try_statement_get_body (current_try))) {
7315
7601
                _vala_code_node_unref0 (b);
7316
7602
                _vala_collection_object_unref0 (local_vars);
7340
7626
                while (TRUE) {
7341
7627
                        ValaFormalParameter* param;
7342
7628
                        gboolean _tmp2_ = FALSE;
 
7629
                        gboolean _tmp3_ = FALSE;
7343
7630
                        if (!vala_iterator_next (_param_it)) {
7344
7631
                                break;
7345
7632
                        }
7346
7633
                        param = (ValaFormalParameter*) vala_iterator_get (_param_it);
7347
 
                        if (vala_ccode_base_module_requires_destroy (self, vala_formal_parameter_get_parameter_type (param))) {
 
7634
                        if (!vala_formal_parameter_get_ellipsis (param)) {
 
7635
                                _tmp3_ = vala_ccode_base_module_requires_destroy (self, vala_formal_parameter_get_parameter_type (param));
 
7636
                        } else {
 
7637
                                _tmp3_ = FALSE;
 
7638
                        }
 
7639
                        if (_tmp3_) {
7348
7640
                                _tmp2_ = vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_IN;
7349
7641
                        } else {
7350
7642
                                _tmp2_ = FALSE;
7351
7643
                        }
7352
7644
                        if (_tmp2_) {
7353
7645
                                ValaMemberAccess* ma;
7354
 
                                ValaDataType* _tmp3_;
7355
 
                                ValaCCodeExpressionStatement* _tmp6_;
 
7646
                                ValaDataType* _tmp4_;
 
7647
                                ValaCCodeExpressionStatement* _tmp7_;
 
7648
                                ValaCCodeExpression* _tmp6_;
7356
7649
                                ValaCCodeExpression* _tmp5_;
7357
 
                                ValaCCodeExpression* _tmp4_;
7358
7650
                                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) param), NULL);
7359
7651
                                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
7360
 
                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp3_ = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param)));
7361
 
                                _vala_code_node_unref0 (_tmp3_);
7362
 
                                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp6_ = vala_ccode_expression_statement_new (_tmp5_ = vala_ccode_base_module_get_unref_expression (self, _tmp4_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) param)), vala_formal_parameter_get_parameter_type (param), (ValaExpression*) ma, FALSE))));
 
7652
                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp4_ = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param)));
 
7653
                                _vala_code_node_unref0 (_tmp4_);
 
7654
                                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp7_ = vala_ccode_expression_statement_new (_tmp6_ = vala_ccode_base_module_get_unref_expression (self, _tmp5_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) param)), vala_formal_parameter_get_parameter_type (param), (ValaExpression*) ma, FALSE))));
 
7655
                                _vala_ccode_node_unref0 (_tmp7_);
7363
7656
                                _vala_ccode_node_unref0 (_tmp6_);
7364
7657
                                _vala_ccode_node_unref0 (_tmp5_);
7365
 
                                _vala_ccode_node_unref0 (_tmp4_);
7366
7658
                                _vala_code_node_unref0 (ma);
7367
7659
                        }
7368
7660
                        _vala_code_node_unref0 (param);
7385
7677
 
7386
7678
 
7387
7679
static gboolean vala_ccode_base_module_real_variable_accessible_in_finally (ValaCCodeBaseModule* self, ValaLocalVariable* local) {
7388
 
        gboolean result;
 
7680
        gboolean result = FALSE;
7389
7681
        ValaSymbol* sym;
7390
7682
        g_return_val_if_fail (self != NULL, FALSE);
7391
7683
        g_return_val_if_fail (local != NULL, FALSE);
7780
8072
 
7781
8073
 
7782
8074
char* vala_ccode_base_module_get_symbol_lock_name (ValaCCodeBaseModule* self, const char* symname) {
7783
 
        char* result;
 
8075
        char* result = NULL;
7784
8076
        g_return_val_if_fail (self != NULL, NULL);
7785
8077
        g_return_val_if_fail (symname != NULL, NULL);
7786
8078
        result = g_strdup_printf ("__lock_%s", symname);
7788
8080
}
7789
8081
 
7790
8082
 
7791
 
static void vala_ccode_base_module_real_visit_lock_statement (ValaCCodeModule* base, ValaLockStatement* stmt) {
7792
 
        ValaCCodeBaseModule * self;
7793
 
        ValaCCodeFragment* cn;
 
8083
static ValaCCodeExpression* vala_ccode_base_module_get_lock_expression (ValaCCodeBaseModule* self, ValaStatement* stmt, ValaExpression* resource) {
 
8084
        ValaCCodeExpression* result = NULL;
7794
8085
        ValaCCodeExpression* l;
7795
 
        ValaCCodeFunctionCall* fc;
7796
8086
        ValaExpression* inner_node;
7797
8087
        ValaMember* member;
7798
8088
        ValaTypeSymbol* parent;
7799
 
        ValaCCodeFunctionCall* _tmp19_;
7800
 
        ValaCCodeIdentifier* _tmp18_;
7801
 
        char* _tmp17_;
7802
 
        ValaMethod* _tmp16_;
7803
 
        ValaCCodeUnaryExpression* _tmp20_;
7804
 
        ValaCCodeExpressionStatement* _tmp21_;
7805
 
        ValaCCodeFunctionCall* _tmp25_;
7806
 
        ValaCCodeIdentifier* _tmp24_;
7807
 
        char* _tmp23_;
7808
 
        ValaMethod* _tmp22_;
7809
 
        ValaCCodeUnaryExpression* _tmp26_;
7810
 
        ValaCCodeExpressionStatement* _tmp27_;
7811
 
        self = (ValaCCodeBaseModule*) base;
7812
 
        g_return_if_fail (stmt != NULL);
7813
 
        cn = vala_ccode_fragment_new ();
 
8089
        g_return_val_if_fail (self != NULL, NULL);
 
8090
        g_return_val_if_fail (stmt != NULL, NULL);
 
8091
        g_return_val_if_fail (resource != NULL, NULL);
7814
8092
        l = NULL;
7815
 
        fc = NULL;
7816
 
        inner_node = _vala_code_node_ref0 (vala_member_access_get_inner (VALA_MEMBER_ACCESS (vala_lock_statement_get_resource (stmt))));
7817
 
        member = _vala_code_node_ref0 (VALA_MEMBER (vala_expression_get_symbol_reference (vala_lock_statement_get_resource (stmt))));
7818
 
        parent = _vala_code_node_ref0 (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol (vala_expression_get_symbol_reference (vala_lock_statement_get_resource (stmt)))));
 
8093
        inner_node = _vala_code_node_ref0 (vala_member_access_get_inner (VALA_MEMBER_ACCESS (resource)));
 
8094
        member = _vala_code_node_ref0 (VALA_MEMBER (vala_expression_get_symbol_reference (resource)));
 
8095
        parent = _vala_code_node_ref0 (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol (vala_expression_get_symbol_reference (resource))));
7819
8096
        if (vala_symbol_is_instance_member ((ValaSymbol*) member)) {
7820
8097
                ValaCCodeExpression* _tmp5_;
7821
8098
                char* _tmp4_;
7824
8101
                        ValaCCodeExpression* _tmp0_;
7825
8102
                        l = (_tmp0_ = (ValaCCodeExpression*) vala_ccode_identifier_new ("self"), _vala_ccode_node_unref0 (l), _tmp0_);
7826
8103
                } else {
7827
 
                        if (vala_symbol_get_parent_symbol (vala_expression_get_symbol_reference (vala_lock_statement_get_resource (stmt))) != VALA_SYMBOL (vala_ccode_base_module_get_current_type_symbol (self))) {
 
8104
                        if (vala_symbol_get_parent_symbol (vala_expression_get_symbol_reference (resource)) != VALA_SYMBOL (vala_ccode_base_module_get_current_type_symbol (self))) {
7828
8105
                                ValaCCodeExpression* _tmp1_;
7829
8106
                                l = (_tmp1_ = (ValaCCodeExpression*) vala_ccode_base_module_generate_instance_cast (self, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) inner_node)), parent), _vala_ccode_node_unref0 (l), _tmp1_);
7830
8107
                        } else {
7832
8109
                                l = (_tmp2_ = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) inner_node))), _vala_ccode_node_unref0 (l), _tmp2_);
7833
8110
                        }
7834
8111
                }
7835
 
                l = (_tmp5_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp3_ = vala_ccode_member_access_new_pointer (l, "priv")), _tmp4_ = vala_ccode_base_module_get_symbol_lock_name (self, vala_symbol_get_name (vala_expression_get_symbol_reference (vala_lock_statement_get_resource (stmt))))), _vala_ccode_node_unref0 (l), _tmp5_);
 
8112
                l = (_tmp5_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp3_ = vala_ccode_member_access_new_pointer (l, "priv")), _tmp4_ = vala_ccode_base_module_get_symbol_lock_name (self, vala_symbol_get_name (vala_expression_get_symbol_reference (resource)))), _vala_ccode_node_unref0 (l), _tmp5_);
7836
8113
                _g_free0 (_tmp4_);
7837
8114
                _vala_ccode_node_unref0 (_tmp3_);
7838
8115
        } else {
7839
8116
                if (vala_symbol_is_class_member ((ValaSymbol*) member)) {
7840
 
                        ValaCCodeExpression* _tmp9_;
7841
 
                        char* _tmp8_;
7842
 
                        char* _tmp7_;
7843
 
                        char* _tmp6_;
7844
 
                        ValaCCodeExpression* _tmp11_;
7845
 
                        char* _tmp10_;
7846
 
                        l = (_tmp9_ = (ValaCCodeExpression*) vala_ccode_identifier_new (_tmp8_ = g_strdup_printf ("%s_GET_CLASS_PRIVATE(%s)", _tmp6_ = vala_typesymbol_get_upper_case_cname (parent, NULL), _tmp7_ = vala_typesymbol_get_type_id (parent))), _vala_ccode_node_unref0 (l), _tmp9_);
7847
 
                        _g_free0 (_tmp8_);
7848
 
                        _g_free0 (_tmp7_);
7849
 
                        _g_free0 (_tmp6_);
7850
 
                        l = (_tmp11_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer (l, _tmp10_ = vala_ccode_base_module_get_symbol_lock_name (self, vala_symbol_get_name (vala_expression_get_symbol_reference (vala_lock_statement_get_resource (stmt))))), _vala_ccode_node_unref0 (l), _tmp11_);
7851
 
                        _g_free0 (_tmp10_);
 
8117
                        ValaCCodeExpression* klass;
 
8118
                        gboolean _tmp6_ = FALSE;
 
8119
                        gboolean _tmp7_ = FALSE;
 
8120
                        gboolean _tmp8_ = FALSE;
 
8121
                        ValaCCodeIdentifier* _tmp18_;
 
8122
                        char* _tmp17_;
 
8123
                        char* _tmp16_;
 
8124
                        ValaCCodeFunctionCall* _tmp19_;
 
8125
                        ValaCCodeFunctionCall* get_class_private_call;
 
8126
                        ValaCCodeExpression* _tmp21_;
 
8127
                        char* _tmp20_;
 
8128
                        klass = NULL;
 
8129
                        if (vala_ccode_base_module_get_current_method (self) != NULL) {
 
8130
                                _tmp8_ = vala_method_get_binding (vala_ccode_base_module_get_current_method (self)) == MEMBER_BINDING_INSTANCE;
 
8131
                        } else {
 
8132
                                _tmp8_ = FALSE;
 
8133
                        }
 
8134
                        if (_tmp8_) {
 
8135
                                _tmp7_ = TRUE;
 
8136
                        } else {
 
8137
                                gboolean _tmp9_ = FALSE;
 
8138
                                if (vala_ccode_base_module_get_current_property_accessor (self) != NULL) {
 
8139
                                        _tmp9_ = vala_property_get_binding (vala_property_accessor_get_prop (vala_ccode_base_module_get_current_property_accessor (self))) == MEMBER_BINDING_INSTANCE;
 
8140
                                } else {
 
8141
                                        _tmp9_ = FALSE;
 
8142
                                }
 
8143
                                _tmp7_ = _tmp9_;
 
8144
                        }
 
8145
                        if (_tmp7_) {
 
8146
                                _tmp6_ = TRUE;
 
8147
                        } else {
 
8148
                                gboolean _tmp10_ = FALSE;
 
8149
                                if (self->in_constructor) {
 
8150
                                        _tmp10_ = !self->in_static_or_class_context;
 
8151
                                } else {
 
8152
                                        _tmp10_ = FALSE;
 
8153
                                }
 
8154
                                _tmp6_ = _tmp10_;
 
8155
                        }
 
8156
                        if (_tmp6_) {
 
8157
                                ValaCCodeIdentifier* _tmp11_;
 
8158
                                ValaCCodeFunctionCall* _tmp12_;
 
8159
                                ValaCCodeFunctionCall* k;
 
8160
                                ValaCCodeIdentifier* _tmp13_;
 
8161
                                ValaCCodeExpression* _tmp14_;
 
8162
                                k = (_tmp12_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp11_ = vala_ccode_identifier_new ("G_OBJECT_GET_CLASS"))), _vala_ccode_node_unref0 (_tmp11_), _tmp12_);
 
8163
                                vala_ccode_function_call_add_argument (k, (ValaCCodeExpression*) (_tmp13_ = vala_ccode_identifier_new ("self")));
 
8164
                                _vala_ccode_node_unref0 (_tmp13_);
 
8165
                                klass = (_tmp14_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) k), _vala_ccode_node_unref0 (klass), _tmp14_);
 
8166
                                _vala_ccode_node_unref0 (k);
 
8167
                        } else {
 
8168
                                ValaCCodeExpression* _tmp15_;
 
8169
                                klass = (_tmp15_ = (ValaCCodeExpression*) vala_ccode_identifier_new ("klass"), _vala_ccode_node_unref0 (klass), _tmp15_);
 
8170
                        }
 
8171
                        get_class_private_call = (_tmp19_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp18_ = vala_ccode_identifier_new (_tmp17_ = g_strdup_printf ("%s_GET_CLASS_PRIVATE", _tmp16_ = vala_typesymbol_get_upper_case_cname (parent, NULL))))), _vala_ccode_node_unref0 (_tmp18_), _g_free0 (_tmp17_), _g_free0 (_tmp16_), _tmp19_);
 
8172
                        vala_ccode_function_call_add_argument (get_class_private_call, klass);
 
8173
                        l = (_tmp21_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) get_class_private_call, _tmp20_ = vala_ccode_base_module_get_symbol_lock_name (self, vala_symbol_get_name (vala_expression_get_symbol_reference (resource)))), _vala_ccode_node_unref0 (l), _tmp21_);
 
8174
                        _g_free0 (_tmp20_);
 
8175
                        _vala_ccode_node_unref0 (klass);
 
8176
                        _vala_ccode_node_unref0 (get_class_private_call);
7852
8177
                } else {
7853
 
                        char* _tmp12_;
7854
 
                        char* _tmp13_;
 
8178
                        char* _tmp22_;
 
8179
                        char* _tmp23_;
7855
8180
                        char* lock_name;
7856
 
                        ValaCCodeExpression* _tmp15_;
7857
 
                        char* _tmp14_;
7858
 
                        lock_name = (_tmp13_ = g_strdup_printf ("%s_%s", _tmp12_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) parent, NULL), vala_symbol_get_name (vala_expression_get_symbol_reference (vala_lock_statement_get_resource (stmt)))), _g_free0 (_tmp12_), _tmp13_);
7859
 
                        l = (_tmp15_ = (ValaCCodeExpression*) vala_ccode_identifier_new (_tmp14_ = vala_ccode_base_module_get_symbol_lock_name (self, lock_name)), _vala_ccode_node_unref0 (l), _tmp15_);
7860
 
                        _g_free0 (_tmp14_);
 
8181
                        ValaCCodeExpression* _tmp25_;
 
8182
                        char* _tmp24_;
 
8183
                        lock_name = (_tmp23_ = g_strdup_printf ("%s_%s", _tmp22_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) parent, NULL), vala_symbol_get_name (vala_expression_get_symbol_reference (resource))), _g_free0 (_tmp22_), _tmp23_);
 
8184
                        l = (_tmp25_ = (ValaCCodeExpression*) vala_ccode_identifier_new (_tmp24_ = vala_ccode_base_module_get_symbol_lock_name (self, lock_name)), _vala_ccode_node_unref0 (l), _tmp25_);
 
8185
                        _g_free0 (_tmp24_);
7861
8186
                        _g_free0 (lock_name);
7862
8187
                }
7863
8188
        }
7864
 
        fc = (_tmp19_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp18_ = vala_ccode_identifier_new (_tmp17_ = vala_method_get_cname (_tmp16_ = VALA_METHOD (vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) self->mutex_type), "lock")))))), _vala_ccode_node_unref0 (fc), _tmp19_);
7865
 
        _vala_ccode_node_unref0 (_tmp18_);
7866
 
        _g_free0 (_tmp17_);
7867
 
        _vala_code_node_unref0 (_tmp16_);
7868
 
        vala_ccode_function_call_add_argument (fc, (ValaCCodeExpression*) (_tmp20_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, l)));
7869
 
        _vala_ccode_node_unref0 (_tmp20_);
7870
 
        vala_ccode_fragment_append (cn, (ValaCCodeNode*) (_tmp21_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) fc)));
7871
 
        _vala_ccode_node_unref0 (_tmp21_);
7872
 
        vala_ccode_fragment_append (cn, vala_code_node_get_ccodenode ((ValaCodeNode*) vala_lock_statement_get_body (stmt)));
7873
 
        fc = (_tmp25_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp24_ = vala_ccode_identifier_new (_tmp23_ = vala_method_get_cname (_tmp22_ = VALA_METHOD (vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) self->mutex_type), "unlock")))))), _vala_ccode_node_unref0 (fc), _tmp25_);
7874
 
        _vala_ccode_node_unref0 (_tmp24_);
7875
 
        _g_free0 (_tmp23_);
7876
 
        _vala_code_node_unref0 (_tmp22_);
7877
 
        vala_ccode_function_call_add_argument (fc, (ValaCCodeExpression*) (_tmp26_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, l)));
7878
 
        _vala_ccode_node_unref0 (_tmp26_);
7879
 
        vala_ccode_fragment_append (cn, (ValaCCodeNode*) (_tmp27_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) fc)));
7880
 
        _vala_ccode_node_unref0 (_tmp27_);
7881
 
        vala_code_node_set_ccodenode ((ValaCodeNode*) stmt, (ValaCCodeNode*) cn);
7882
 
        _vala_ccode_node_unref0 (cn);
7883
 
        _vala_ccode_node_unref0 (l);
7884
 
        _vala_ccode_node_unref0 (fc);
 
8189
        result = l;
7885
8190
        _vala_code_node_unref0 (inner_node);
7886
8191
        _vala_code_node_unref0 (member);
7887
8192
        _vala_code_node_unref0 (parent);
 
8193
        return result;
 
8194
}
 
8195
 
 
8196
 
 
8197
static void vala_ccode_base_module_real_visit_lock_statement (ValaCCodeModule* base, ValaLockStatement* stmt) {
 
8198
        ValaCCodeBaseModule * self;
 
8199
        ValaCCodeExpression* l;
 
8200
        ValaCCodeIdentifier* _tmp2_;
 
8201
        char* _tmp1_;
 
8202
        ValaMethod* _tmp0_;
 
8203
        ValaCCodeFunctionCall* _tmp3_;
 
8204
        ValaCCodeFunctionCall* fc;
 
8205
        ValaCCodeUnaryExpression* _tmp4_;
 
8206
        ValaCCodeFragment* cn;
 
8207
        ValaCCodeExpressionStatement* _tmp5_;
 
8208
        self = (ValaCCodeBaseModule*) base;
 
8209
        g_return_if_fail (stmt != NULL);
 
8210
        l = vala_ccode_base_module_get_lock_expression (self, (ValaStatement*) stmt, vala_lock_statement_get_resource (stmt));
 
8211
        fc = (_tmp3_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp2_ = vala_ccode_identifier_new (_tmp1_ = vala_method_get_cname (_tmp0_ = VALA_METHOD (vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) self->mutex_type), "lock")))))), _vala_ccode_node_unref0 (_tmp2_), _g_free0 (_tmp1_), _vala_code_node_unref0 (_tmp0_), _tmp3_);
 
8212
        vala_ccode_function_call_add_argument (fc, (ValaCCodeExpression*) (_tmp4_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, l)));
 
8213
        _vala_ccode_node_unref0 (_tmp4_);
 
8214
        cn = vala_ccode_fragment_new ();
 
8215
        vala_ccode_fragment_append (cn, (ValaCCodeNode*) (_tmp5_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) fc)));
 
8216
        _vala_ccode_node_unref0 (_tmp5_);
 
8217
        vala_code_node_set_ccodenode ((ValaCodeNode*) stmt, (ValaCCodeNode*) cn);
 
8218
        _vala_ccode_node_unref0 (l);
 
8219
        _vala_ccode_node_unref0 (fc);
 
8220
        _vala_ccode_node_unref0 (cn);
 
8221
}
 
8222
 
 
8223
 
 
8224
static void vala_ccode_base_module_real_visit_unlock_statement (ValaCCodeModule* base, ValaUnlockStatement* stmt) {
 
8225
        ValaCCodeBaseModule * self;
 
8226
        ValaCCodeExpression* l;
 
8227
        ValaCCodeIdentifier* _tmp2_;
 
8228
        char* _tmp1_;
 
8229
        ValaMethod* _tmp0_;
 
8230
        ValaCCodeFunctionCall* _tmp3_;
 
8231
        ValaCCodeFunctionCall* fc;
 
8232
        ValaCCodeUnaryExpression* _tmp4_;
 
8233
        ValaCCodeFragment* cn;
 
8234
        ValaCCodeExpressionStatement* _tmp5_;
 
8235
        self = (ValaCCodeBaseModule*) base;
 
8236
        g_return_if_fail (stmt != NULL);
 
8237
        l = vala_ccode_base_module_get_lock_expression (self, (ValaStatement*) stmt, vala_unlock_statement_get_resource (stmt));
 
8238
        fc = (_tmp3_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp2_ = vala_ccode_identifier_new (_tmp1_ = vala_method_get_cname (_tmp0_ = VALA_METHOD (vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) self->mutex_type), "unlock")))))), _vala_ccode_node_unref0 (_tmp2_), _g_free0 (_tmp1_), _vala_code_node_unref0 (_tmp0_), _tmp3_);
 
8239
        vala_ccode_function_call_add_argument (fc, (ValaCCodeExpression*) (_tmp4_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, l)));
 
8240
        _vala_ccode_node_unref0 (_tmp4_);
 
8241
        cn = vala_ccode_fragment_new ();
 
8242
        vala_ccode_fragment_append (cn, (ValaCCodeNode*) (_tmp5_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) fc)));
 
8243
        _vala_ccode_node_unref0 (_tmp5_);
 
8244
        vala_code_node_set_ccodenode ((ValaCodeNode*) stmt, (ValaCCodeNode*) cn);
 
8245
        _vala_ccode_node_unref0 (l);
 
8246
        _vala_ccode_node_unref0 (fc);
 
8247
        _vala_ccode_node_unref0 (cn);
7888
8248
}
7889
8249
 
7890
8250
 
7933
8293
        }
7934
8294
        if (_tmp0_) {
7935
8295
                gboolean _tmp1_ = FALSE;
7936
 
                ValaCCodeExpression* _tmp3_;
7937
 
                gboolean _tmp4_ = FALSE;
 
8296
                ValaCCodeExpression* _tmp7_;
 
8297
                gboolean _tmp8_ = FALSE;
7938
8298
                if (VALA_IS_GENERIC_TYPE (vala_expression_get_formal_value_type (expr))) {
7939
8299
                        _tmp1_ = !VALA_IS_GENERIC_TYPE (vala_expression_get_value_type (expr));
7940
8300
                } else {
7941
8301
                        _tmp1_ = FALSE;
7942
8302
                }
7943
8303
                if (_tmp1_) {
 
8304
                        ValaSymbol* _tmp2_;
 
8305
                        ValaStruct* st;
 
8306
                        gboolean _tmp3_ = FALSE;
 
8307
                        st = _vala_code_node_ref0 ((_tmp2_ = vala_symbol_get_parent_symbol (vala_symbol_get_parent_symbol ((ValaSymbol*) vala_data_type_get_type_parameter (vala_expression_get_formal_value_type (expr)))), VALA_IS_STRUCT (_tmp2_) ? ((ValaStruct*) _tmp2_) : NULL));
7944
8308
                        if (vala_symbol_get_parent_symbol ((ValaSymbol*) vala_data_type_get_type_parameter (vala_expression_get_formal_value_type (expr))) != VALA_SYMBOL (self->garray_type)) {
7945
 
                                ValaCCodeExpression* _tmp2_;
7946
 
                                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp2_ = vala_ccode_base_module_convert_from_generic_pointer (self, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr)), vala_expression_get_value_type (expr))));
7947
 
                                _vala_ccode_node_unref0 (_tmp2_);
7948
 
                        }
 
8309
                                gboolean _tmp4_ = FALSE;
 
8310
                                if (st == NULL) {
 
8311
                                        _tmp4_ = TRUE;
 
8312
                                } else {
 
8313
                                        char* _tmp5_;
 
8314
                                        _tmp4_ = _vala_strcmp0 (_tmp5_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE), "va_list") != 0;
 
8315
                                        _g_free0 (_tmp5_);
 
8316
                                }
 
8317
                                _tmp3_ = _tmp4_;
 
8318
                        } else {
 
8319
                                _tmp3_ = FALSE;
 
8320
                        }
 
8321
                        if (_tmp3_) {
 
8322
                                ValaCCodeExpression* _tmp6_;
 
8323
                                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp6_ = vala_ccode_base_module_convert_from_generic_pointer (self, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr)), vala_expression_get_value_type (expr))));
 
8324
                                _vala_ccode_node_unref0 (_tmp6_);
 
8325
                        }
 
8326
                        _vala_code_node_unref0 (st);
7949
8327
                }
7950
 
                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp3_ = vala_ccode_base_module_transform_expression (self, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr)), vala_expression_get_value_type (expr), vala_expression_get_target_type (expr), expr)));
7951
 
                _vala_ccode_node_unref0 (_tmp3_);
 
8328
                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp7_ = vala_ccode_base_module_transform_expression (self, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr)), vala_expression_get_value_type (expr), vala_expression_get_target_type (expr), expr)));
 
8329
                _vala_ccode_node_unref0 (_tmp7_);
7952
8330
                if (VALA_IS_GENERIC_TYPE (vala_expression_get_formal_target_type (expr))) {
7953
 
                        _tmp4_ = !VALA_IS_GENERIC_TYPE (vala_expression_get_target_type (expr));
 
8331
                        _tmp8_ = !VALA_IS_GENERIC_TYPE (vala_expression_get_target_type (expr));
7954
8332
                } else {
7955
 
                        _tmp4_ = FALSE;
 
8333
                        _tmp8_ = FALSE;
7956
8334
                }
7957
 
                if (_tmp4_) {
 
8335
                if (_tmp8_) {
7958
8336
                        if (vala_symbol_get_parent_symbol ((ValaSymbol*) vala_data_type_get_type_parameter (vala_expression_get_formal_target_type (expr))) != VALA_SYMBOL (self->garray_type)) {
7959
 
                                ValaCCodeExpression* _tmp5_;
7960
 
                                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp5_ = vala_ccode_base_module_convert_to_generic_pointer (self, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr)), vala_expression_get_target_type (expr))));
7961
 
                                _vala_ccode_node_unref0 (_tmp5_);
 
8337
                                ValaCCodeExpression* _tmp9_;
 
8338
                                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp9_ = vala_ccode_base_module_convert_to_generic_pointer (self, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr)), vala_expression_get_target_type (expr))));
 
8339
                                _vala_ccode_node_unref0 (_tmp9_);
7962
8340
                        }
7963
8341
                }
7964
8342
        }
8022
8400
 
8023
8401
static void vala_ccode_base_module_real_visit_integer_literal (ValaCCodeModule* base, ValaIntegerLiteral* expr) {
8024
8402
        ValaCCodeBaseModule * self;
8025
 
        ValaCCodeConstant* _tmp0_;
 
8403
        ValaCCodeConstant* _tmp1_;
 
8404
        char* _tmp0_;
8026
8405
        self = (ValaCCodeBaseModule*) base;
8027
8406
        g_return_if_fail (expr != NULL);
8028
 
        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp0_ = vala_ccode_constant_new (vala_integer_literal_get_value (expr))));
8029
 
        _vala_ccode_node_unref0 (_tmp0_);
 
8407
        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp1_ = vala_ccode_constant_new (_tmp0_ = g_strconcat (vala_integer_literal_get_value (expr), vala_integer_literal_get_type_suffix (expr), NULL))));
 
8408
        _vala_ccode_node_unref0 (_tmp1_);
 
8409
        _g_free0 (_tmp0_);
8030
8410
}
8031
8411
 
8032
8412
 
8033
8413
static char* string_substring (const char* self, glong offset, glong len) {
8034
 
        char* result;
 
8414
        char* result = NULL;
8035
8415
        glong string_length;
8036
8416
        const char* start;
8037
8417
        g_return_val_if_fail (self != NULL, NULL);
8061
8441
 
8062
8442
 
8063
8443
static gboolean string_contains (const char* self, const char* needle) {
8064
 
        gboolean result;
 
8444
        gboolean result = FALSE;
8065
8445
        g_return_val_if_fail (self != NULL, FALSE);
8066
8446
        g_return_val_if_fail (needle != NULL, FALSE);
8067
8447
        result = strstr (self, needle) != NULL;
8126
8506
        ValaCCodeConstant* _tmp0_;
8127
8507
        self = (ValaCCodeBaseModule*) base;
8128
8508
        g_return_if_fail (expr != NULL);
8129
 
        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp0_ = vala_ccode_constant_new (vala_string_literal_get_value (expr))));
 
8509
        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp0_ = vala_ccode_constant_new_string (vala_string_literal_get_value (expr))));
8130
8510
        _vala_ccode_node_unref0 (_tmp0_);
8131
8511
}
8132
8512
 
8133
8513
 
 
8514
static void vala_ccode_base_module_real_visit_regex_literal (ValaCCodeModule* base, ValaRegexLiteral* expr) {
 
8515
        ValaCCodeBaseModule * self;
 
8516
        char** _tmp1_;
 
8517
        gint _parts_size_;
 
8518
        gint parts_length1;
 
8519
        char** _tmp0_;
 
8520
        char** parts;
 
8521
        char* re;
 
8522
        char* flags;
 
8523
        ValaLocalVariable* regex_var;
 
8524
        ValaCCodeDeclaration* _cdecl_;
 
8525
        char* _tmp7_;
 
8526
        char* _tmp6_;
 
8527
        char* _tmp8_;
 
8528
        char* cname;
 
8529
        ValaCCodeVariableDeclarator* _tmp33_;
 
8530
        char* _tmp32_;
 
8531
        char* _tmp34_;
 
8532
        ValaCCodeConstant* _tmp35_;
 
8533
        ValaCCodeConstant* regex_const;
 
8534
        self = (ValaCCodeBaseModule*) base;
 
8535
        g_return_if_fail (expr != NULL);
 
8536
        parts = (_tmp1_ = _tmp0_ = g_strsplit (vala_regex_literal_get_value (expr), "/", 3), parts_length1 = _vala_array_length (_tmp0_), _parts_size_ = parts_length1, _tmp1_);
 
8537
        re = g_strescape (parts[2], "");
 
8538
        flags = g_strdup ("0");
 
8539
        if (string_contains (parts[1], "i")) {
 
8540
                char* _tmp2_;
 
8541
                flags = (_tmp2_ = g_strconcat (flags, " | G_REGEX_CASELESS", NULL), _g_free0 (flags), _tmp2_);
 
8542
        }
 
8543
        if (string_contains (parts[1], "m")) {
 
8544
                char* _tmp3_;
 
8545
                flags = (_tmp3_ = g_strconcat (flags, " | G_REGEX_MULTILINE", NULL), _g_free0 (flags), _tmp3_);
 
8546
        }
 
8547
        if (string_contains (parts[1], "s")) {
 
8548
                char* _tmp4_;
 
8549
                flags = (_tmp4_ = g_strconcat (flags, " | G_REGEX_DOTALL", NULL), _g_free0 (flags), _tmp4_);
 
8550
        }
 
8551
        if (string_contains (parts[1], "x")) {
 
8552
                char* _tmp5_;
 
8553
                flags = (_tmp5_ = g_strconcat (flags, " | G_REGEX_EXTENDED", NULL), _g_free0 (flags), _tmp5_);
 
8554
        }
 
8555
        regex_var = vala_ccode_base_module_get_temp_variable (self, self->regex_type, TRUE, (ValaCodeNode*) expr, FALSE);
 
8556
        vala_collection_add ((ValaCollection*) ((ValaExpression*) expr)->temp_vars, regex_var);
 
8557
        _cdecl_ = vala_ccode_declaration_new ("GRegex*");
 
8558
        cname = (_tmp8_ = g_strconcat (_tmp6_ = g_strconcat (vala_symbol_get_name ((ValaSymbol*) regex_var), "regex_", NULL), _tmp7_ = g_strdup_printf ("%i", self->next_regex_id), NULL), _g_free0 (_tmp7_), _g_free0 (_tmp6_), _tmp8_);
 
8559
        if (self->next_regex_id == 0) {
 
8560
                ValaCCodeFunction* fun;
 
8561
                ValaCCodeFormalParameter* _tmp9_;
 
8562
                ValaCCodeFormalParameter* _tmp10_;
 
8563
                ValaCCodeFormalParameter* _tmp11_;
 
8564
                ValaCCodeBlock* _tmp12_;
 
8565
                ValaCCodeIdentifier* _tmp13_;
 
8566
                ValaCCodeFunctionCall* _tmp14_;
 
8567
                ValaCCodeFunctionCall* once_enter_call;
 
8568
                ValaCCodeConstant* _tmp15_;
 
8569
                ValaCCodeBlock* if_block;
 
8570
                ValaCCodeIdentifier* _tmp16_;
 
8571
                ValaCCodeFunctionCall* _tmp17_;
 
8572
                ValaCCodeFunctionCall* regex_new_call;
 
8573
                ValaCCodeConstant* _tmp18_;
 
8574
                ValaCCodeConstant* _tmp19_;
 
8575
                ValaCCodeConstant* _tmp20_;
 
8576
                ValaCCodeConstant* _tmp21_;
 
8577
                ValaCCodeExpressionStatement* _tmp24_;
 
8578
                ValaCCodeAssignment* _tmp23_;
 
8579
                ValaCCodeIdentifier* _tmp22_;
 
8580
                ValaCCodeIdentifier* _tmp25_;
 
8581
                ValaCCodeFunctionCall* _tmp26_;
 
8582
                ValaCCodeFunctionCall* once_leave_call;
 
8583
                ValaCCodeConstant* _tmp27_;
 
8584
                ValaCCodeConstant* _tmp28_;
 
8585
                ValaCCodeExpressionStatement* _tmp29_;
 
8586
                ValaCCodeIfStatement* if_stat;
 
8587
                ValaCCodeReturnStatement* _tmp31_;
 
8588
                ValaCCodeIdentifier* _tmp30_;
 
8589
                fun = vala_ccode_function_new ("_thread_safe_regex_init", "GRegex*");
 
8590
                vala_ccode_function_set_modifiers (fun, VALA_CCODE_MODIFIERS_STATIC | VALA_CCODE_MODIFIERS_INLINE);
 
8591
                vala_ccode_function_add_parameter (fun, _tmp9_ = vala_ccode_formal_parameter_new ("re", "GRegex**"));
 
8592
                _vala_ccode_node_unref0 (_tmp9_);
 
8593
                vala_ccode_function_add_parameter (fun, _tmp10_ = vala_ccode_formal_parameter_new ("pattern", "const gchar *"));
 
8594
                _vala_ccode_node_unref0 (_tmp10_);
 
8595
                vala_ccode_function_add_parameter (fun, _tmp11_ = vala_ccode_formal_parameter_new ("match_options", "GRegexMatchFlags"));
 
8596
                _vala_ccode_node_unref0 (_tmp11_);
 
8597
                vala_ccode_function_set_block (fun, _tmp12_ = vala_ccode_block_new ());
 
8598
                _vala_ccode_node_unref0 (_tmp12_);
 
8599
                once_enter_call = (_tmp14_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp13_ = vala_ccode_identifier_new ("g_once_init_enter"))), _vala_ccode_node_unref0 (_tmp13_), _tmp14_);
 
8600
                vala_ccode_function_call_add_argument (once_enter_call, (ValaCCodeExpression*) (_tmp15_ = vala_ccode_constant_new ("(volatile gsize*) re")));
 
8601
                _vala_ccode_node_unref0 (_tmp15_);
 
8602
                if_block = vala_ccode_block_new ();
 
8603
                regex_new_call = (_tmp17_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp16_ = vala_ccode_identifier_new ("g_regex_new"))), _vala_ccode_node_unref0 (_tmp16_), _tmp17_);
 
8604
                vala_ccode_function_call_add_argument (regex_new_call, (ValaCCodeExpression*) (_tmp18_ = vala_ccode_constant_new ("pattern")));
 
8605
                _vala_ccode_node_unref0 (_tmp18_);
 
8606
                vala_ccode_function_call_add_argument (regex_new_call, (ValaCCodeExpression*) (_tmp19_ = vala_ccode_constant_new ("match_options")));
 
8607
                _vala_ccode_node_unref0 (_tmp19_);
 
8608
                vala_ccode_function_call_add_argument (regex_new_call, (ValaCCodeExpression*) (_tmp20_ = vala_ccode_constant_new ("0")));
 
8609
                _vala_ccode_node_unref0 (_tmp20_);
 
8610
                vala_ccode_function_call_add_argument (regex_new_call, (ValaCCodeExpression*) (_tmp21_ = vala_ccode_constant_new ("NULL")));
 
8611
                _vala_ccode_node_unref0 (_tmp21_);
 
8612
                vala_ccode_block_add_statement (if_block, (ValaCCodeNode*) (_tmp24_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp23_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp22_ = vala_ccode_identifier_new ("GRegex* val")), (ValaCCodeExpression*) regex_new_call, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
 
8613
                _vala_ccode_node_unref0 (_tmp24_);
 
8614
                _vala_ccode_node_unref0 (_tmp23_);
 
8615
                _vala_ccode_node_unref0 (_tmp22_);
 
8616
                once_leave_call = (_tmp26_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp25_ = vala_ccode_identifier_new ("g_once_init_leave"))), _vala_ccode_node_unref0 (_tmp25_), _tmp26_);
 
8617
                vala_ccode_function_call_add_argument (once_leave_call, (ValaCCodeExpression*) (_tmp27_ = vala_ccode_constant_new ("(volatile gsize*) re")));
 
8618
                _vala_ccode_node_unref0 (_tmp27_);
 
8619
                vala_ccode_function_call_add_argument (once_leave_call, (ValaCCodeExpression*) (_tmp28_ = vala_ccode_constant_new ("(gsize) val")));
 
8620
                _vala_ccode_node_unref0 (_tmp28_);
 
8621
                vala_ccode_block_add_statement (if_block, (ValaCCodeNode*) (_tmp29_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) once_leave_call)));
 
8622
                _vala_ccode_node_unref0 (_tmp29_);
 
8623
                if_stat = vala_ccode_if_statement_new ((ValaCCodeExpression*) once_enter_call, (ValaCCodeStatement*) if_block, NULL);
 
8624
                vala_ccode_block_add_statement (vala_ccode_function_get_block (fun), (ValaCCodeNode*) if_stat);
 
8625
                vala_ccode_block_add_statement (vala_ccode_function_get_block (fun), (ValaCCodeNode*) (_tmp31_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp30_ = vala_ccode_identifier_new ("*re")))));
 
8626
                _vala_ccode_node_unref0 (_tmp31_);
 
8627
                _vala_ccode_node_unref0 (_tmp30_);
 
8628
                vala_ccode_fragment_append (self->source_type_member_definition, (ValaCCodeNode*) fun);
 
8629
                _vala_ccode_node_unref0 (fun);
 
8630
                _vala_ccode_node_unref0 (once_enter_call);
 
8631
                _vala_ccode_node_unref0 (if_block);
 
8632
                _vala_ccode_node_unref0 (regex_new_call);
 
8633
                _vala_ccode_node_unref0 (once_leave_call);
 
8634
                _vala_ccode_node_unref0 (if_stat);
 
8635
        }
 
8636
        self->next_regex_id++;
 
8637
        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp33_ = vala_ccode_variable_declarator_new (_tmp32_ = g_strconcat (cname, " = NULL", NULL), NULL, NULL)));
 
8638
        _vala_ccode_node_unref0 (_tmp33_);
 
8639
        _g_free0 (_tmp32_);
 
8640
        vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
 
8641
        regex_const = (_tmp35_ = vala_ccode_constant_new (_tmp34_ = g_strdup_printf ("_thread_safe_regex_init (&%s, \"%s\", %s)", cname, re, flags)), _g_free0 (_tmp34_), _tmp35_);
 
8642
        vala_ccode_declaration_space_add_constant_declaration (self->source_declarations, (ValaCCodeNode*) _cdecl_);
 
8643
        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) regex_const);
 
8644
        parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
 
8645
        _g_free0 (re);
 
8646
        _g_free0 (flags);
 
8647
        _vala_code_node_unref0 (regex_var);
 
8648
        _vala_ccode_node_unref0 (_cdecl_);
 
8649
        _g_free0 (cname);
 
8650
        _vala_ccode_node_unref0 (regex_const);
 
8651
}
 
8652
 
 
8653
 
8134
8654
static void vala_ccode_base_module_real_visit_null_literal (ValaCCodeModule* base, ValaNullLiteral* expr) {
8135
8655
        ValaCCodeBaseModule * self;
8136
8656
        ValaCCodeConstant* _tmp0_;
8145
8665
 
8146
8666
 
8147
8667
static char* vala_ccode_base_module_real_get_delegate_target_cname (ValaCCodeBaseModule* self, const char* delegate_cname) {
 
8668
        char* result = NULL;
8148
8669
        g_return_val_if_fail (self != NULL, NULL);
8149
8670
        g_return_val_if_fail (delegate_cname != NULL, NULL);
8150
8671
        g_assert_not_reached ();
 
8672
        return result;
8151
8673
}
8152
8674
 
8153
8675
 
8157
8679
 
8158
8680
 
8159
8681
static ValaCCodeExpression* vala_ccode_base_module_real_get_delegate_target_cexpression (ValaCCodeBaseModule* self, ValaExpression* delegate_expr, ValaCCodeExpression** delegate_target_destroy_notify) {
 
8682
        ValaCCodeExpression* result = NULL;
8160
8683
        g_return_val_if_fail (self != NULL, NULL);
8161
8684
        g_return_val_if_fail (delegate_expr != NULL, NULL);
8162
8685
        if (delegate_target_destroy_notify != NULL) {
8163
8686
                *delegate_target_destroy_notify = NULL;
8164
8687
        }
8165
8688
        g_assert_not_reached ();
 
8689
        return result;
8166
8690
}
8167
8691
 
8168
8692
 
8172
8696
 
8173
8697
 
8174
8698
static char* vala_ccode_base_module_real_get_delegate_target_destroy_notify_cname (ValaCCodeBaseModule* self, const char* delegate_cname) {
 
8699
        char* result = NULL;
8175
8700
        g_return_val_if_fail (self != NULL, NULL);
8176
8701
        g_return_val_if_fail (delegate_cname != NULL, NULL);
8177
8702
        g_assert_not_reached ();
 
8703
        return result;
8178
8704
}
8179
8705
 
8180
8706
 
8232
8758
                ValaCCodeExpression* _tmp3_;
8233
8759
                ValaCCodeBinaryExpression* _tmp5_;
8234
8760
                ValaCCodeBinaryExpression* cexpr;
8235
 
                ValaCCodeFunctionCall* ccall;
 
8761
                ValaCCodeExpression* ccall;
8236
8762
                ValaCCodeExpression* _tmp6_;
8237
8763
                prop = _vala_code_node_ref0 (VALA_PROPERTY (vala_expression_get_symbol_reference ((ValaExpression*) ma)));
8238
8764
                ccomma = vala_ccode_comma_expression_new ();
8249
8775
                op = _tmp2_;
8250
8776
                cexpr = (_tmp5_ = vala_ccode_binary_expression_new (op, _tmp3_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) temp_decl)), (ValaCCodeExpression*) (_tmp4_ = vala_ccode_constant_new ("1"))), _vala_ccode_node_unref0 (_tmp4_), _vala_ccode_node_unref0 (_tmp3_), _tmp5_);
8251
8777
                ccall = vala_ccode_base_module_get_property_set_call (self, prop, ma, (ValaCCodeExpression*) cexpr, NULL);
8252
 
                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) ccall);
 
8778
                vala_ccode_comma_expression_append_expression (ccomma, ccall);
8253
8779
                vala_ccode_comma_expression_append_expression (ccomma, _tmp6_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) temp_decl)));
8254
8780
                _vala_ccode_node_unref0 (_tmp6_);
8255
8781
                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) ccomma);
8274
8800
 
8275
8801
 
8276
8802
static ValaMemberAccess* vala_ccode_base_module_find_property_access (ValaCCodeBaseModule* self, ValaExpression* expr) {
8277
 
        ValaMemberAccess* result;
 
8803
        ValaMemberAccess* result = NULL;
8278
8804
        ValaMemberAccess* ma;
8279
8805
        g_return_val_if_fail (self != NULL, NULL);
8280
8806
        g_return_val_if_fail (expr != NULL, NULL);
8294
8820
 
8295
8821
 
8296
8822
static gboolean vala_ccode_base_module_is_limited_generic_type (ValaCCodeBaseModule* self, ValaDataType* type) {
8297
 
        gboolean result;
 
8823
        gboolean result = FALSE;
8298
8824
        ValaSymbol* _tmp0_;
8299
8825
        ValaClass* cl;
8300
8826
        ValaSymbol* _tmp1_;
8329
8855
 
8330
8856
 
8331
8857
gboolean vala_ccode_base_module_requires_copy (ValaCCodeBaseModule* self, ValaDataType* type) {
8332
 
        gboolean result;
 
8858
        gboolean result = FALSE;
8333
8859
        ValaTypeSymbol* _tmp0_;
8334
8860
        ValaClass* cl;
8335
8861
        gboolean _tmp1_ = FALSE;
8372
8898
 
8373
8899
 
8374
8900
gboolean vala_ccode_base_module_requires_destroy (ValaCCodeBaseModule* self, ValaDataType* type) {
8375
 
        gboolean result;
 
8901
        gboolean result = FALSE;
8376
8902
        ValaDataType* _tmp0_;
8377
8903
        ValaArrayType* array_type;
8378
8904
        gboolean _tmp1_ = FALSE;
8432
8958
 
8433
8959
 
8434
8960
static gboolean vala_ccode_base_module_is_ref_function_void (ValaCCodeBaseModule* self, ValaDataType* type) {
8435
 
        gboolean result;
 
8961
        gboolean result = FALSE;
8436
8962
        ValaTypeSymbol* _tmp0_;
8437
8963
        ValaClass* cl;
8438
8964
        gboolean _tmp1_ = FALSE;
8458
8984
 
8459
8985
 
8460
8986
static ValaCCodeExpression* vala_ccode_base_module_real_get_ref_cexpression (ValaCCodeBaseModule* self, ValaDataType* expression_type, ValaCCodeExpression* cexpr, ValaExpression* expr, ValaCodeNode* node) {
8461
 
        ValaCCodeExpression* result;
 
8987
        ValaCCodeExpression* result = NULL;
8462
8988
        gboolean _tmp0_ = FALSE;
8463
8989
        ValaCCodeExpression* dupexpr;
8464
8990
        gboolean _tmp18_ = FALSE;
8676
9202
                ValaCCodeBinaryExpression* _tmp36_;
8677
9203
                ValaCCodeBinaryExpression* cisnull;
8678
9204
                ValaCCodeCommaExpression* ccomma;
8679
 
                ValaCCodeAssignment* _tmp46_;
 
9205
                ValaCCodeAssignment* _tmp47_;
8680
9206
                ValaCCodeExpression* cifnull;
8681
 
                ValaCCodeConditionalExpression* _tmp49_;
 
9207
                ValaCCodeConditionalExpression* _tmp50_;
8682
9208
                decl = vala_ccode_base_module_get_temp_variable (self, expression_type, FALSE, node, FALSE);
8683
9209
                vala_list_insert ((ValaList*) self->temp_vars, 0, decl);
8684
9210
                ctemp = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl));
8735
9261
                                }
8736
9262
                        }
8737
9263
                        vala_ccode_function_call_add_argument (ccall, csizeexpr);
 
9264
                        if (VALA_IS_GENERIC_TYPE (vala_array_type_get_element_type (array_type))) {
 
9265
                                ValaCCodeExpression* elem_dupexpr;
 
9266
                                elem_dupexpr = vala_ccode_base_module_get_dup_func_expression (self, vala_array_type_get_element_type (array_type), vala_code_node_get_source_reference (node), FALSE);
 
9267
                                if (elem_dupexpr == NULL) {
 
9268
                                        ValaCCodeExpression* _tmp46_;
 
9269
                                        elem_dupexpr = (_tmp46_ = (ValaCCodeExpression*) vala_ccode_constant_new ("NULL"), _vala_ccode_node_unref0 (elem_dupexpr), _tmp46_);
 
9270
                                }
 
9271
                                vala_ccode_function_call_add_argument (ccall, elem_dupexpr);
 
9272
                                _vala_ccode_node_unref0 (elem_dupexpr);
 
9273
                        }
8738
9274
                        _vala_code_node_unref0 (array_type);
8739
9275
                        _vala_ccode_node_unref0 (csizeexpr);
8740
9276
                }
8741
9277
                ccomma = vala_ccode_comma_expression_new ();
8742
 
                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp46_ = vala_ccode_assignment_new (ctemp, cexpr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
8743
 
                _vala_ccode_node_unref0 (_tmp46_);
 
9278
                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp47_ = vala_ccode_assignment_new (ctemp, cexpr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
9279
                _vala_ccode_node_unref0 (_tmp47_);
8744
9280
                cifnull = NULL;
8745
9281
                if (vala_data_type_get_data_type (expression_type) != NULL) {
8746
 
                        ValaCCodeExpression* _tmp47_;
8747
 
                        cifnull = (_tmp47_ = (ValaCCodeExpression*) vala_ccode_constant_new ("NULL"), _vala_ccode_node_unref0 (cifnull), _tmp47_);
8748
 
                } else {
8749
9282
                        ValaCCodeExpression* _tmp48_;
8750
 
                        cifnull = (_tmp48_ = (ValaCCodeExpression*) vala_ccode_cast_expression_new (ctemp, "gpointer"), _vala_ccode_node_unref0 (cifnull), _tmp48_);
 
9283
                        cifnull = (_tmp48_ = (ValaCCodeExpression*) vala_ccode_constant_new ("NULL"), _vala_ccode_node_unref0 (cifnull), _tmp48_);
 
9284
                } else {
 
9285
                        ValaCCodeExpression* _tmp49_;
 
9286
                        cifnull = (_tmp49_ = (ValaCCodeExpression*) vala_ccode_cast_expression_new (ctemp, "gpointer"), _vala_ccode_node_unref0 (cifnull), _tmp49_);
8751
9287
                }
8752
 
                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp49_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) cisnull, cifnull, (ValaCCodeExpression*) ccall)));
8753
 
                _vala_ccode_node_unref0 (_tmp49_);
 
9288
                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp50_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) cisnull, cifnull, (ValaCCodeExpression*) ccall)));
 
9289
                _vala_ccode_node_unref0 (_tmp50_);
8754
9290
                if (vala_ccode_base_module_is_ref_function_void (self, expression_type)) {
8755
9291
                        vala_ccode_comma_expression_append_expression (ccomma, ctemp);
8756
9292
                }
8774
9310
 
8775
9311
 
8776
9312
static gboolean vala_ccode_base_module_is_reference_type_argument (ValaCCodeBaseModule* self, ValaDataType* type_arg) {
8777
 
        gboolean result;
 
9313
        gboolean result = FALSE;
8778
9314
        gboolean _tmp0_ = FALSE;
8779
9315
        g_return_val_if_fail (self != NULL, FALSE);
8780
9316
        g_return_val_if_fail (type_arg != NULL, FALSE);
8794
9330
 
8795
9331
 
8796
9332
static gboolean vala_ccode_base_module_is_nullable_value_type_argument (ValaCCodeBaseModule* self, ValaDataType* type_arg) {
8797
 
        gboolean result;
 
9333
        gboolean result = FALSE;
8798
9334
        gboolean _tmp0_ = FALSE;
8799
9335
        g_return_val_if_fail (self != NULL, FALSE);
8800
9336
        g_return_val_if_fail (type_arg != NULL, FALSE);
8814
9350
 
8815
9351
 
8816
9352
static gboolean vala_ccode_base_module_is_signed_integer_type_argument (ValaCCodeBaseModule* self, ValaDataType* type_arg) {
8817
 
        gboolean result;
 
9353
        gboolean result = FALSE;
8818
9354
        ValaTypeSymbol* _tmp0_;
8819
9355
        ValaStruct* st;
8820
9356
        g_return_val_if_fail (self != NULL, FALSE);
8906
9442
 
8907
9443
 
8908
9444
static gboolean vala_ccode_base_module_is_unsigned_integer_type_argument (ValaCCodeBaseModule* self, ValaDataType* type_arg) {
8909
 
        gboolean result;
 
9445
        gboolean result = FALSE;
8910
9446
        ValaTypeSymbol* _tmp0_;
8911
9447
        ValaStruct* st;
8912
9448
        g_return_val_if_fail (self != NULL, FALSE);
9042
9578
                } else {
9043
9579
                        char* _tmp6_;
9044
9580
                        char* _tmp5_;
9045
 
                        vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) type_arg), _tmp6_ = g_strdup_printf ("`%s' is not a supported generic type argument, use `?' to box value types", _tmp5_ = vala_code_node_to_string ((ValaCodeNode*) type_arg)));
 
9581
                        vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) type_arg), _tmp6_ = g_strdup_printf ("`%s' is not a supported generic type argument, use `?' to box value ty" \
 
9582
"pes", _tmp5_ = vala_code_node_to_string ((ValaCodeNode*) type_arg)));
9046
9583
                        _g_free0 (_tmp6_);
9047
9584
                        _g_free0 (_tmp5_);
9048
9585
                }
9163
9700
        ValaStruct* st;
9164
9701
        gboolean _tmp1_ = FALSE;
9165
9702
        gboolean _tmp2_ = FALSE;
 
9703
        ValaCodeNode* _tmp88_;
 
9704
        ValaLocalVariable* local;
 
9705
        gboolean _tmp89_ = FALSE;
9166
9706
        self = (ValaCCodeBaseModule*) base;
9167
9707
        g_return_if_fail (expr != NULL);
9168
9708
        vala_code_node_accept_children ((ValaCodeNode*) expr, (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
9171
9711
        vala_ccode_base_module_check_type (self, vala_object_creation_expression_get_type_reference (expr));
9172
9712
        st = _vala_code_node_ref0 ((_tmp0_ = vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)), VALA_IS_STRUCT (_tmp0_) ? ((ValaStruct*) _tmp0_) : NULL));
9173
9713
        if (st != NULL) {
9174
 
                _tmp2_ = !vala_struct_is_simple_type (st);
 
9714
                gboolean _tmp3_ = FALSE;
 
9715
                if (!vala_struct_is_simple_type (st)) {
 
9716
                        _tmp3_ = TRUE;
 
9717
                } else {
 
9718
                        char* _tmp4_;
 
9719
                        _tmp3_ = _vala_strcmp0 (_tmp4_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE), "va_list") == 0;
 
9720
                        _g_free0 (_tmp4_);
 
9721
                }
 
9722
                _tmp2_ = _tmp3_;
9175
9723
        } else {
9176
9724
                _tmp2_ = FALSE;
9177
9725
        }
9178
9726
        if (_tmp2_) {
9179
9727
                _tmp1_ = TRUE;
9180
9728
        } else {
9181
 
                ValaList* _tmp3_;
9182
 
                _tmp1_ = vala_collection_get_size ((ValaCollection*) (_tmp3_ = vala_object_creation_expression_get_object_initializer (expr))) > 0;
9183
 
                _vala_collection_object_unref0 (_tmp3_);
 
9729
                ValaList* _tmp5_;
 
9730
                _tmp1_ = vala_collection_get_size ((ValaCollection*) (_tmp5_ = vala_object_creation_expression_get_object_initializer (expr))) > 0;
 
9731
                _vala_collection_object_unref0 (_tmp5_);
9184
9732
        }
9185
9733
        if (_tmp1_) {
9186
 
                ValaLocalVariable* temp_decl;
9187
 
                ValaCCodeExpression* _tmp5_;
9188
 
                char* _tmp4_;
9189
 
                temp_decl = vala_ccode_base_module_get_temp_variable (self, vala_object_creation_expression_get_type_reference (expr), FALSE, (ValaCodeNode*) expr, TRUE);
9190
 
                vala_collection_add ((ValaCollection*) self->temp_vars, temp_decl);
9191
 
                instance = (_tmp5_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp4_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) temp_decl))), _vala_ccode_node_unref0 (instance), _tmp5_);
9192
 
                _g_free0 (_tmp4_);
9193
 
                _vala_code_node_unref0 (temp_decl);
 
9734
                ValaCodeNode* _tmp6_;
 
9735
                ValaLocalVariable* local;
 
9736
                gboolean _tmp7_ = FALSE;
 
9737
                local = _vala_code_node_ref0 ((_tmp6_ = vala_code_node_get_parent_node ((ValaCodeNode*) expr), VALA_IS_LOCAL_VARIABLE (_tmp6_) ? ((ValaLocalVariable*) _tmp6_) : NULL));
 
9738
                if (local != NULL) {
 
9739
                        _tmp7_ = vala_ccode_base_module_has_simple_struct_initializer (self, local);
 
9740
                } else {
 
9741
                        _tmp7_ = FALSE;
 
9742
                }
 
9743
                if (_tmp7_) {
 
9744
                        ValaCCodeExpression* _tmp9_;
 
9745
                        char* _tmp8_;
 
9746
                        instance = (_tmp9_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp8_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local))), _vala_ccode_node_unref0 (instance), _tmp9_);
 
9747
                        _g_free0 (_tmp8_);
 
9748
                } else {
 
9749
                        ValaLocalVariable* temp_decl;
 
9750
                        ValaCCodeExpression* _tmp11_;
 
9751
                        char* _tmp10_;
 
9752
                        temp_decl = vala_ccode_base_module_get_temp_variable (self, vala_object_creation_expression_get_type_reference (expr), FALSE, (ValaCodeNode*) expr, TRUE);
 
9753
                        vala_collection_add ((ValaCollection*) self->temp_vars, temp_decl);
 
9754
                        instance = (_tmp11_ = vala_ccode_base_module_get_variable_cexpression (self, _tmp10_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) temp_decl))), _vala_ccode_node_unref0 (instance), _tmp11_);
 
9755
                        _g_free0 (_tmp10_);
 
9756
                        _vala_code_node_unref0 (temp_decl);
 
9757
                }
 
9758
                _vala_code_node_unref0 (local);
9194
9759
        }
9195
9760
        if (vala_expression_get_symbol_reference ((ValaExpression*) expr) == NULL) {
9196
9761
                if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
9197
 
                        ValaCCodeIdentifier* _tmp6_;
9198
 
                        ValaCCodeFunctionCall* _tmp7_;
 
9762
                        ValaCCodeIdentifier* _tmp12_;
 
9763
                        ValaCCodeFunctionCall* _tmp13_;
9199
9764
                        ValaCCodeFunctionCall* creation_call;
9200
 
                        ValaCCodeUnaryExpression* _tmp8_;
9201
 
                        ValaCCodeConstant* _tmp9_;
9202
 
                        ValaCCodeIdentifier* _tmp12_;
9203
 
                        char* _tmp11_;
9204
 
                        char* _tmp10_;
9205
 
                        ValaCCodeExpression* _tmp13_;
 
9765
                        ValaCCodeUnaryExpression* _tmp14_;
 
9766
                        ValaCCodeConstant* _tmp15_;
 
9767
                        ValaCCodeIdentifier* _tmp18_;
 
9768
                        char* _tmp17_;
 
9769
                        char* _tmp16_;
 
9770
                        ValaCCodeExpression* _tmp19_;
9206
9771
                        vala_ccode_declaration_space_add_include (self->source_declarations, "string.h", FALSE);
9207
 
                        creation_call = (_tmp7_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp6_ = vala_ccode_identifier_new ("memset"))), _vala_ccode_node_unref0 (_tmp6_), _tmp7_);
9208
 
                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp8_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, instance)));
9209
 
                        _vala_ccode_node_unref0 (_tmp8_);
9210
 
                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp9_ = vala_ccode_constant_new ("0")));
9211
 
                        _vala_ccode_node_unref0 (_tmp9_);
9212
 
                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp12_ = vala_ccode_identifier_new (_tmp11_ = g_strdup_printf ("sizeof (%s)", _tmp10_ = vala_data_type_get_cname (vala_object_creation_expression_get_type_reference (expr))))));
9213
 
                        _vala_ccode_node_unref0 (_tmp12_);
9214
 
                        _g_free0 (_tmp11_);
9215
 
                        _g_free0 (_tmp10_);
9216
 
                        creation_expr = (_tmp13_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) creation_call), _vala_ccode_node_unref0 (creation_expr), _tmp13_);
 
9772
                        creation_call = (_tmp13_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp12_ = vala_ccode_identifier_new ("memset"))), _vala_ccode_node_unref0 (_tmp12_), _tmp13_);
 
9773
                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp14_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, instance)));
 
9774
                        _vala_ccode_node_unref0 (_tmp14_);
 
9775
                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp15_ = vala_ccode_constant_new ("0")));
 
9776
                        _vala_ccode_node_unref0 (_tmp15_);
 
9777
                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp18_ = vala_ccode_identifier_new (_tmp17_ = g_strdup_printf ("sizeof (%s)", _tmp16_ = vala_data_type_get_cname (vala_object_creation_expression_get_type_reference (expr))))));
 
9778
                        _vala_ccode_node_unref0 (_tmp18_);
 
9779
                        _g_free0 (_tmp17_);
 
9780
                        _g_free0 (_tmp16_);
 
9781
                        creation_expr = (_tmp19_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) creation_call), _vala_ccode_node_unref0 (creation_expr), _tmp19_);
9217
9782
                        _vala_ccode_node_unref0 (creation_call);
9218
9783
                }
9219
9784
        } else {
9220
 
                gboolean _tmp14_ = FALSE;
 
9785
                gboolean _tmp20_ = FALSE;
9221
9786
                if (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)) == VALA_TYPESYMBOL (self->glist_type)) {
9222
 
                        _tmp14_ = TRUE;
 
9787
                        _tmp20_ = TRUE;
9223
9788
                } else {
9224
 
                        _tmp14_ = vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)) == VALA_TYPESYMBOL (self->gslist_type);
 
9789
                        _tmp20_ = vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)) == VALA_TYPESYMBOL (self->gslist_type);
9225
9790
                }
9226
 
                if (_tmp14_) {
9227
 
                        ValaCCodeConstant* _tmp15_;
9228
 
                        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp15_ = vala_ccode_constant_new ("NULL")));
9229
 
                        _vala_ccode_node_unref0 (_tmp15_);
 
9791
                if (_tmp20_) {
 
9792
                        ValaCCodeConstant* _tmp21_;
 
9793
                        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp21_ = vala_ccode_constant_new ("NULL")));
 
9794
                        _vala_ccode_node_unref0 (_tmp21_);
9230
9795
                } else {
9231
9796
                        if (VALA_IS_METHOD (vala_expression_get_symbol_reference ((ValaExpression*) expr))) {
9232
9797
                                ValaMethod* m;
9233
9798
                                ValaList* params;
9234
9799
                                ValaCCodeFunctionCall* creation_call;
9235
 
                                ValaTypeSymbol* _tmp16_;
 
9800
                                ValaTypeSymbol* _tmp22_;
9236
9801
                                ValaClass* cl;
9237
 
                                gboolean _tmp25_ = FALSE;
9238
 
                                gboolean _tmp26_ = FALSE;
 
9802
                                gboolean _tmp31_ = FALSE;
 
9803
                                gboolean _tmp32_ = FALSE;
9239
9804
                                ValaHashMap* carg_map;
9240
 
                                gboolean _tmp28_ = FALSE;
 
9805
                                gboolean _tmp43_ = FALSE;
9241
9806
                                gboolean ellipsis;
9242
9807
                                gint i;
9243
9808
                                gint arg_pos = 0;
9244
9809
                                ValaIterator* params_it;
9245
9810
                                gint last_pos;
9246
9811
                                gint min_pos = 0;
9247
 
                                gboolean _tmp47_ = FALSE;
9248
 
                                gboolean _tmp48_ = FALSE;
9249
 
                                ValaCCodeExpression* _tmp55_;
9250
 
                                char* _tmp56_;
9251
 
                                gboolean _tmp57_;
 
9812
                                gboolean _tmp62_ = FALSE;
 
9813
                                gboolean _tmp63_ = FALSE;
 
9814
                                ValaCCodeExpression* _tmp70_;
 
9815
                                char* _tmp71_;
 
9816
                                gboolean _tmp72_;
9252
9817
                                m = _vala_code_node_ref0 (VALA_METHOD (vala_expression_get_symbol_reference ((ValaExpression*) expr)));
9253
9818
                                params = vala_method_get_parameters (m);
9254
9819
                                creation_call = NULL;
9255
9820
                                vala_ccode_base_module_generate_method_declaration (self, m, self->source_declarations);
9256
 
                                cl = _vala_code_node_ref0 ((_tmp16_ = vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)), VALA_IS_CLASS (_tmp16_) ? ((ValaClass*) _tmp16_) : NULL));
 
9821
                                cl = _vala_code_node_ref0 ((_tmp22_ = vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)), VALA_IS_CLASS (_tmp22_) ? ((ValaClass*) _tmp22_) : NULL));
9257
9822
                                if (!vala_method_get_has_new_function (m)) {
9258
 
                                        ValaCCodeFunctionCall* _tmp19_;
9259
 
                                        ValaCCodeIdentifier* _tmp18_;
9260
 
                                        char* _tmp17_;
9261
 
                                        ValaCCodeIdentifier* _tmp21_;
9262
 
                                        char* _tmp20_;
9263
 
                                        creation_call = (_tmp19_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp18_ = vala_ccode_identifier_new (_tmp17_ = vala_method_get_real_cname (m)))), _vala_ccode_node_unref0 (creation_call), _tmp19_);
9264
 
                                        _vala_ccode_node_unref0 (_tmp18_);
9265
 
                                        _g_free0 (_tmp17_);
9266
 
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp21_ = vala_ccode_identifier_new (_tmp20_ = vala_typesymbol_get_type_id ((ValaTypeSymbol*) cl))));
9267
 
                                        _vala_ccode_node_unref0 (_tmp21_);
9268
 
                                        _g_free0 (_tmp20_);
 
9823
                                        ValaCCodeFunctionCall* _tmp25_;
 
9824
                                        ValaCCodeIdentifier* _tmp24_;
 
9825
                                        char* _tmp23_;
 
9826
                                        ValaCCodeIdentifier* _tmp27_;
 
9827
                                        char* _tmp26_;
 
9828
                                        creation_call = (_tmp25_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp24_ = vala_ccode_identifier_new (_tmp23_ = vala_method_get_real_cname (m)))), _vala_ccode_node_unref0 (creation_call), _tmp25_);
 
9829
                                        _vala_ccode_node_unref0 (_tmp24_);
 
9830
                                        _g_free0 (_tmp23_);
 
9831
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp27_ = vala_ccode_identifier_new (_tmp26_ = vala_typesymbol_get_type_id ((ValaTypeSymbol*) cl))));
 
9832
                                        _vala_ccode_node_unref0 (_tmp27_);
 
9833
                                        _g_free0 (_tmp26_);
9269
9834
                                } else {
9270
 
                                        ValaCCodeFunctionCall* _tmp24_;
9271
 
                                        ValaCCodeIdentifier* _tmp23_;
9272
 
                                        char* _tmp22_;
9273
 
                                        creation_call = (_tmp24_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp23_ = vala_ccode_identifier_new (_tmp22_ = vala_method_get_cname (m)))), _vala_ccode_node_unref0 (creation_call), _tmp24_);
9274
 
                                        _vala_ccode_node_unref0 (_tmp23_);
9275
 
                                        _g_free0 (_tmp22_);
 
9835
                                        ValaCCodeFunctionCall* _tmp30_;
 
9836
                                        ValaCCodeIdentifier* _tmp29_;
 
9837
                                        char* _tmp28_;
 
9838
                                        creation_call = (_tmp30_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp29_ = vala_ccode_identifier_new (_tmp28_ = vala_method_get_cname (m)))), _vala_ccode_node_unref0 (creation_call), _tmp30_);
 
9839
                                        _vala_ccode_node_unref0 (_tmp29_);
 
9840
                                        _g_free0 (_tmp28_);
9276
9841
                                }
9277
9842
                                if (st != NULL) {
9278
 
                                        _tmp26_ = !vala_struct_is_simple_type (st);
9279
 
                                } else {
9280
 
                                        _tmp26_ = FALSE;
9281
 
                                }
9282
 
                                if (_tmp26_) {
9283
 
                                        _tmp25_ = !(vala_method_get_cinstance_parameter_position (m) < 0);
9284
 
                                } else {
9285
 
                                        _tmp25_ = FALSE;
9286
 
                                }
9287
 
                                if (_tmp25_) {
9288
 
                                        ValaCCodeUnaryExpression* _tmp27_;
9289
 
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp27_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, instance)));
9290
 
                                        _vala_ccode_node_unref0 (_tmp27_);
 
9843
                                        _tmp32_ = !vala_struct_is_simple_type (st);
 
9844
                                } else {
 
9845
                                        _tmp32_ = FALSE;
 
9846
                                }
 
9847
                                if (_tmp32_) {
 
9848
                                        _tmp31_ = !(vala_method_get_cinstance_parameter_position (m) < 0);
 
9849
                                } else {
 
9850
                                        _tmp31_ = FALSE;
 
9851
                                }
 
9852
                                if (_tmp31_) {
 
9853
                                        ValaCCodeUnaryExpression* _tmp33_;
 
9854
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp33_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, instance)));
 
9855
                                        _vala_ccode_node_unref0 (_tmp33_);
 
9856
                                } else {
 
9857
                                        gboolean _tmp34_ = FALSE;
 
9858
                                        if (st != NULL) {
 
9859
                                                char* _tmp35_;
 
9860
                                                _tmp34_ = _vala_strcmp0 (_tmp35_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE), "va_list") == 0;
 
9861
                                                _g_free0 (_tmp35_);
 
9862
                                        } else {
 
9863
                                                _tmp34_ = FALSE;
 
9864
                                        }
 
9865
                                        if (_tmp34_) {
 
9866
                                                char* _tmp36_;
 
9867
                                                gboolean _tmp37_;
 
9868
                                                vala_ccode_function_call_add_argument (creation_call, instance);
 
9869
                                                if ((_tmp37_ = _vala_strcmp0 (_tmp36_ = vala_method_get_cname (m), "va_start") == 0, _g_free0 (_tmp36_), _tmp37_)) {
 
9870
                                                        ValaFormalParameter* last_param;
 
9871
                                                        ValaCCodeIdentifier* _tmp42_;
 
9872
                                                        char* _tmp41_;
 
9873
                                                        last_param = NULL;
 
9874
                                                        {
 
9875
                                                                ValaList* _tmp38_;
 
9876
                                                                ValaIterator* _tmp39_;
 
9877
                                                                ValaIterator* _param_it;
 
9878
                                                                _param_it = (_tmp39_ = vala_iterable_iterator ((ValaIterable*) (_tmp38_ = vala_method_get_parameters (vala_ccode_base_module_get_current_method (self)))), _vala_collection_object_unref0 (_tmp38_), _tmp39_);
 
9879
                                                                while (TRUE) {
 
9880
                                                                        ValaFormalParameter* param;
 
9881
                                                                        ValaFormalParameter* _tmp40_;
 
9882
                                                                        if (!vala_iterator_next (_param_it)) {
 
9883
                                                                                break;
 
9884
                                                                        }
 
9885
                                                                        param = (ValaFormalParameter*) vala_iterator_get (_param_it);
 
9886
                                                                        if (vala_formal_parameter_get_ellipsis (param)) {
 
9887
                                                                                _vala_code_node_unref0 (param);
 
9888
                                                                                break;
 
9889
                                                                        }
 
9890
                                                                        last_param = (_tmp40_ = _vala_code_node_ref0 (param), _vala_code_node_unref0 (last_param), _tmp40_);
 
9891
                                                                        _vala_code_node_unref0 (param);
 
9892
                                                                }
 
9893
                                                                _vala_collection_object_unref0 (_param_it);
 
9894
                                                        }
 
9895
                                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp42_ = vala_ccode_identifier_new (_tmp41_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) last_param)))));
 
9896
                                                        _vala_ccode_node_unref0 (_tmp42_);
 
9897
                                                        _g_free0 (_tmp41_);
 
9898
                                                        _vala_code_node_unref0 (last_param);
 
9899
                                                }
 
9900
                                        }
9291
9901
                                }
9292
9902
                                vala_ccode_base_module_generate_type_declaration (self, vala_object_creation_expression_get_type_reference (expr), self->source_declarations);
9293
9903
                                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);
9294
9904
                                if (cl != NULL) {
9295
 
                                        _tmp28_ = !vala_class_get_is_compact (cl);
 
9905
                                        _tmp43_ = !vala_class_get_is_compact (cl);
9296
9906
                                } else {
9297
 
                                        _tmp28_ = FALSE;
 
9907
                                        _tmp43_ = FALSE;
9298
9908
                                }
9299
 
                                if (_tmp28_) {
9300
 
                                        ValaList* _tmp29_;
9301
 
                                        vala_ccode_base_module_add_generic_type_arguments (self, (ValaMap*) carg_map, _tmp29_ = vala_data_type_get_type_arguments (vala_object_creation_expression_get_type_reference (expr)), (ValaCodeNode*) expr, FALSE);
9302
 
                                        _vala_collection_object_unref0 (_tmp29_);
 
9909
                                if (_tmp43_) {
 
9910
                                        ValaList* _tmp44_;
 
9911
                                        vala_ccode_base_module_add_generic_type_arguments (self, (ValaMap*) carg_map, _tmp44_ = vala_data_type_get_type_arguments (vala_object_creation_expression_get_type_reference (expr)), (ValaCodeNode*) expr, FALSE);
 
9912
                                        _vala_collection_object_unref0 (_tmp44_);
9303
9913
                                }
9304
9914
                                ellipsis = FALSE;
9305
9915
                                i = 1;
9306
9916
                                params_it = vala_iterable_iterator ((ValaIterable*) params);
9307
9917
                                {
9308
 
                                        ValaList* _tmp30_;
9309
 
                                        ValaIterator* _tmp31_;
 
9918
                                        ValaList* _tmp45_;
 
9919
                                        ValaIterator* _tmp46_;
9310
9920
                                        ValaIterator* _arg_it;
9311
 
                                        _arg_it = (_tmp31_ = vala_iterable_iterator ((ValaIterable*) (_tmp30_ = vala_object_creation_expression_get_argument_list (expr))), _vala_collection_object_unref0 (_tmp30_), _tmp31_);
 
9921
                                        _arg_it = (_tmp46_ = vala_iterable_iterator ((ValaIterable*) (_tmp45_ = vala_object_creation_expression_get_argument_list (expr))), _vala_collection_object_unref0 (_tmp45_), _tmp46_);
9312
9922
                                        while (TRUE) {
9313
9923
                                                ValaExpression* arg;
9314
9924
                                                ValaCCodeExpression* cexpr;
9320
9930
                                                cexpr = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) arg)));
9321
9931
                                                param = NULL;
9322
9932
                                                if (vala_iterator_next (params_it)) {
9323
 
                                                        ValaFormalParameter* _tmp32_;
9324
 
                                                        param = (_tmp32_ = (ValaFormalParameter*) vala_iterator_get (params_it), _vala_code_node_unref0 (param), _tmp32_);
 
9933
                                                        ValaFormalParameter* _tmp47_;
 
9934
                                                        param = (_tmp47_ = (ValaFormalParameter*) vala_iterator_get (params_it), _vala_code_node_unref0 (param), _tmp47_);
9325
9935
                                                        ellipsis = vala_formal_parameter_get_ellipsis (param);
9326
9936
                                                        if (!ellipsis) {
9327
 
                                                                gboolean _tmp33_ = FALSE;
9328
 
                                                                ValaCCodeExpression* _tmp39_;
 
9937
                                                                gboolean _tmp48_ = FALSE;
 
9938
                                                                ValaCCodeExpression* _tmp54_;
9329
9939
                                                                if (!vala_formal_parameter_get_no_array_length (param)) {
9330
 
                                                                        _tmp33_ = VALA_IS_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param));
 
9940
                                                                        _tmp48_ = VALA_IS_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param));
9331
9941
                                                                } else {
9332
 
                                                                        _tmp33_ = FALSE;
 
9942
                                                                        _tmp48_ = FALSE;
9333
9943
                                                                }
9334
 
                                                                if (_tmp33_) {
 
9944
                                                                if (_tmp48_) {
9335
9945
                                                                        ValaArrayType* array_type;
9336
9946
                                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param)));
9337
9947
                                                                        {
9338
9948
                                                                                gint dim;
9339
9949
                                                                                dim = 1;
9340
9950
                                                                                {
9341
 
                                                                                        gboolean _tmp34_;
9342
 
                                                                                        _tmp34_ = TRUE;
 
9951
                                                                                        gboolean _tmp49_;
 
9952
                                                                                        _tmp49_ = TRUE;
9343
9953
                                                                                        while (TRUE) {
9344
 
                                                                                                ValaCCodeExpression* _tmp35_;
9345
 
                                                                                                if (!_tmp34_) {
 
9954
                                                                                                ValaCCodeExpression* _tmp50_;
 
9955
                                                                                                if (!_tmp49_) {
9346
9956
                                                                                                        dim++;
9347
9957
                                                                                                }
9348
 
                                                                                                _tmp34_ = FALSE;
 
9958
                                                                                                _tmp49_ = FALSE;
9349
9959
                                                                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
9350
9960
                                                                                                        break;
9351
9961
                                                                                                }
9352
 
                                                                                                vala_map_set ((ValaMap*) carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos (self, vala_formal_parameter_get_carray_length_parameter_position (param) + (0.01 * dim), FALSE)), _tmp35_ = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), arg, dim));
9353
 
                                                                                                _vala_ccode_node_unref0 (_tmp35_);
 
9962
                                                                                                vala_map_set ((ValaMap*) carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos (self, vala_formal_parameter_get_carray_length_parameter_position (param) + (0.01 * dim), FALSE)), _tmp50_ = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), arg, dim));
 
9963
                                                                                                _vala_ccode_node_unref0 (_tmp50_);
9354
9964
                                                                                        }
9355
9965
                                                                                }
9356
9966
                                                                        }
9363
9973
                                                                                d = _vala_code_node_ref0 (vala_delegate_type_get_delegate_symbol (deleg_type));
9364
9974
                                                                                if (vala_delegate_get_has_target (d)) {
9365
9975
                                                                                        ValaCCodeExpression* delegate_target_destroy_notify;
9366
 
                                                                                        ValaCCodeExpression* _tmp38_;
9367
 
                                                                                        ValaCCodeExpression* _tmp37_;
9368
 
                                                                                        ValaCCodeExpression* _tmp36_ = NULL;
 
9976
                                                                                        ValaCCodeExpression* _tmp53_;
 
9977
                                                                                        ValaCCodeExpression* _tmp52_;
 
9978
                                                                                        ValaCCodeExpression* _tmp51_ = NULL;
9369
9979
                                                                                        ValaCCodeExpression* delegate_target;
9370
9980
                                                                                        delegate_target_destroy_notify = NULL;
9371
 
                                                                                        delegate_target = (_tmp37_ = vala_ccode_base_module_get_delegate_target_cexpression (self, arg, &_tmp36_), delegate_target_destroy_notify = (_tmp38_ = _tmp36_, _vala_ccode_node_unref0 (delegate_target_destroy_notify), _tmp38_), _tmp37_);
 
9981
                                                                                        delegate_target = (_tmp52_ = vala_ccode_base_module_get_delegate_target_cexpression (self, arg, &_tmp51_), delegate_target_destroy_notify = (_tmp53_ = _tmp51_, _vala_ccode_node_unref0 (delegate_target_destroy_notify), _tmp53_), _tmp52_);
9372
9982
                                                                                        vala_map_set ((ValaMap*) carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos (self, vala_formal_parameter_get_cdelegate_target_parameter_position (param), FALSE)), delegate_target);
9373
9983
                                                                                        if (vala_data_type_get_value_owned ((ValaDataType*) deleg_type)) {
9374
9984
                                                                                                vala_map_set ((ValaMap*) carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos (self, vala_formal_parameter_get_cdelegate_target_parameter_position (param) + 0.01, FALSE)), delegate_target_destroy_notify);
9380
9990
                                                                                _vala_code_node_unref0 (d);
9381
9991
                                                                        }
9382
9992
                                                                }
9383
 
                                                                cexpr = (_tmp39_ = vala_ccode_base_module_handle_struct_argument (self, param, arg, cexpr), _vala_ccode_node_unref0 (cexpr), _tmp39_);
 
9993
                                                                cexpr = (_tmp54_ = vala_ccode_base_module_handle_struct_argument (self, param, arg, cexpr), _vala_ccode_node_unref0 (cexpr), _tmp54_);
9384
9994
                                                                if (vala_formal_parameter_get_ctype (param) != NULL) {
9385
 
                                                                        ValaCCodeExpression* _tmp40_;
9386
 
                                                                        cexpr = (_tmp40_ = (ValaCCodeExpression*) vala_ccode_cast_expression_new (cexpr, vala_formal_parameter_get_ctype (param)), _vala_ccode_node_unref0 (cexpr), _tmp40_);
 
9995
                                                                        ValaCCodeExpression* _tmp55_;
 
9996
                                                                        cexpr = (_tmp55_ = (ValaCCodeExpression*) vala_ccode_cast_expression_new (cexpr, vala_formal_parameter_get_ctype (param)), _vala_ccode_node_unref0 (cexpr), _tmp55_);
9387
9997
                                                                }
9388
9998
                                                        }
9389
9999
                                                        arg_pos = vala_ccode_base_module_get_param_pos (self, vala_formal_parameter_get_cparameter_position (param), ellipsis);
9410
10020
                                                break;
9411
10021
                                        }
9412
10022
                                        if (vala_formal_parameter_get_default_expression (param) == NULL) {
9413
 
                                                char* _tmp41_;
9414
 
                                                vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) expr), _tmp41_ = g_strdup_printf ("no default expression for argument %d", i));
9415
 
                                                _g_free0 (_tmp41_);
 
10023
                                                char* _tmp56_;
 
10024
                                                vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) expr), _tmp56_ = g_strdup_printf ("no default expression for argument %d", i));
 
10025
                                                _g_free0 (_tmp56_);
9416
10026
                                                _vala_code_node_unref0 (param);
9417
10027
                                                _vala_code_node_unref0 (m);
9418
10028
                                                _vala_collection_object_unref0 (params);
9432
10042
                                }
9433
10043
                                last_pos = -1;
9434
10044
                                while (TRUE) {
9435
 
                                        ValaCCodeExpression* _tmp46_;
 
10045
                                        ValaCCodeExpression* _tmp61_;
9436
10046
                                        min_pos = -1;
9437
10047
                                        {
9438
 
                                                ValaSet* _tmp42_;
9439
 
                                                ValaIterator* _tmp43_;
 
10048
                                                ValaSet* _tmp57_;
 
10049
                                                ValaIterator* _tmp58_;
9440
10050
                                                ValaIterator* _pos_it;
9441
 
                                                _pos_it = (_tmp43_ = vala_iterable_iterator ((ValaIterable*) (_tmp42_ = vala_map_get_keys ((ValaMap*) carg_map))), _vala_collection_object_unref0 (_tmp42_), _tmp43_);
 
10051
                                                _pos_it = (_tmp58_ = vala_iterable_iterator ((ValaIterable*) (_tmp57_ = vala_map_get_keys ((ValaMap*) carg_map))), _vala_collection_object_unref0 (_tmp57_), _tmp58_);
9442
10052
                                                while (TRUE) {
9443
10053
                                                        gint pos;
9444
 
                                                        gboolean _tmp44_ = FALSE;
 
10054
                                                        gboolean _tmp59_ = FALSE;
9445
10055
                                                        if (!vala_iterator_next (_pos_it)) {
9446
10056
                                                                break;
9447
10057
                                                        }
9448
10058
                                                        pos = GPOINTER_TO_INT (vala_iterator_get (_pos_it));
9449
10059
                                                        if (pos > last_pos) {
9450
 
                                                                gboolean _tmp45_ = FALSE;
 
10060
                                                                gboolean _tmp60_ = FALSE;
9451
10061
                                                                if (min_pos == (-1)) {
9452
 
                                                                        _tmp45_ = TRUE;
 
10062
                                                                        _tmp60_ = TRUE;
9453
10063
                                                                } else {
9454
 
                                                                        _tmp45_ = pos < min_pos;
 
10064
                                                                        _tmp60_ = pos < min_pos;
9455
10065
                                                                }
9456
 
                                                                _tmp44_ = _tmp45_;
 
10066
                                                                _tmp59_ = _tmp60_;
9457
10067
                                                        } else {
9458
 
                                                                _tmp44_ = FALSE;
 
10068
                                                                _tmp59_ = FALSE;
9459
10069
                                                        }
9460
 
                                                        if (_tmp44_) {
 
10070
                                                        if (_tmp59_) {
9461
10071
                                                                min_pos = pos;
9462
10072
                                                        }
9463
10073
                                                }
9466
10076
                                        if (min_pos == (-1)) {
9467
10077
                                                break;
9468
10078
                                        }
9469
 
                                        vala_ccode_function_call_add_argument (creation_call, _tmp46_ = (ValaCCodeExpression*) vala_map_get ((ValaMap*) carg_map, GINT_TO_POINTER (min_pos)));
9470
 
                                        _vala_ccode_node_unref0 (_tmp46_);
 
10079
                                        vala_ccode_function_call_add_argument (creation_call, _tmp61_ = (ValaCCodeExpression*) vala_map_get ((ValaMap*) carg_map, GINT_TO_POINTER (min_pos)));
 
10080
                                        _vala_ccode_node_unref0 (_tmp61_);
9471
10081
                                        last_pos = min_pos;
9472
10082
                                }
9473
10083
                                if (st != NULL) {
9474
 
                                        _tmp48_ = !vala_struct_is_simple_type (st);
9475
 
                                } else {
9476
 
                                        _tmp48_ = FALSE;
9477
 
                                }
9478
 
                                if (_tmp48_) {
9479
 
                                        _tmp47_ = vala_method_get_cinstance_parameter_position (m) < 0;
9480
 
                                } else {
9481
 
                                        _tmp47_ = FALSE;
9482
 
                                }
9483
 
                                if (_tmp47_) {
9484
 
                                        ValaCCodeUnaryExpression* _tmp49_;
9485
 
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp49_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, instance)));
9486
 
                                        _vala_ccode_node_unref0 (_tmp49_);
 
10084
                                        _tmp63_ = !vala_struct_is_simple_type (st);
 
10085
                                } else {
 
10086
                                        _tmp63_ = FALSE;
 
10087
                                }
 
10088
                                if (_tmp63_) {
 
10089
                                        _tmp62_ = vala_method_get_cinstance_parameter_position (m) < 0;
 
10090
                                } else {
 
10091
                                        _tmp62_ = FALSE;
 
10092
                                }
 
10093
                                if (_tmp62_) {
 
10094
                                        ValaCCodeUnaryExpression* _tmp64_;
 
10095
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp64_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, instance)));
 
10096
                                        _vala_ccode_node_unref0 (_tmp64_);
9487
10097
                                }
9488
10098
                                if (vala_code_node_get_tree_can_fail ((ValaCodeNode*) expr)) {
9489
 
                                        ValaCCodeUnaryExpression* _tmp51_;
9490
 
                                        ValaCCodeExpression* _tmp50_;
 
10099
                                        ValaCCodeUnaryExpression* _tmp66_;
 
10100
                                        ValaCCodeExpression* _tmp65_;
9491
10101
                                        self->current_method_inner_error = TRUE;
9492
 
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp51_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp50_ = vala_ccode_base_module_get_variable_cexpression (self, "_inner_error_"))));
9493
 
                                        _vala_ccode_node_unref0 (_tmp51_);
9494
 
                                        _vala_ccode_node_unref0 (_tmp50_);
 
10102
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp66_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp65_ = vala_ccode_base_module_get_variable_cexpression (self, "_inner_error_"))));
 
10103
                                        _vala_ccode_node_unref0 (_tmp66_);
 
10104
                                        _vala_ccode_node_unref0 (_tmp65_);
9495
10105
                                }
9496
10106
                                if (ellipsis) {
9497
 
                                        gboolean _tmp52_ = FALSE;
9498
 
                                        gboolean _tmp53_ = FALSE;
 
10107
                                        gboolean _tmp67_ = FALSE;
 
10108
                                        gboolean _tmp68_ = FALSE;
9499
10109
                                        if (!vala_method_get_printf_format (m)) {
9500
 
                                                _tmp53_ = !vala_method_get_scanf_format (m);
9501
 
                                        } else {
9502
 
                                                _tmp53_ = FALSE;
9503
 
                                        }
9504
 
                                        if (_tmp53_) {
9505
 
                                                _tmp52_ = _vala_strcmp0 (vala_method_get_sentinel (m), "") != 0;
9506
 
                                        } else {
9507
 
                                                _tmp52_ = FALSE;
9508
 
                                        }
9509
 
                                        if (_tmp52_) {
9510
 
                                                ValaCCodeConstant* _tmp54_;
9511
 
                                                vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp54_ = vala_ccode_constant_new (vala_method_get_sentinel (m))));
9512
 
                                                _vala_ccode_node_unref0 (_tmp54_);
 
10110
                                                _tmp68_ = !vala_method_get_scanf_format (m);
 
10111
                                        } else {
 
10112
                                                _tmp68_ = FALSE;
 
10113
                                        }
 
10114
                                        if (_tmp68_) {
 
10115
                                                _tmp67_ = _vala_strcmp0 (vala_method_get_sentinel (m), "") != 0;
 
10116
                                        } else {
 
10117
                                                _tmp67_ = FALSE;
 
10118
                                        }
 
10119
                                        if (_tmp67_) {
 
10120
                                                ValaCCodeConstant* _tmp69_;
 
10121
                                                vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp69_ = vala_ccode_constant_new (vala_method_get_sentinel (m))));
 
10122
                                                _vala_ccode_node_unref0 (_tmp69_);
9513
10123
                                        }
9514
10124
                                }
9515
 
                                creation_expr = (_tmp55_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) creation_call), _vala_ccode_node_unref0 (creation_expr), _tmp55_);
9516
 
                                if ((_tmp57_ = (_tmp56_ = vala_ccode_module_get_custom_creturn_type (vala_ccode_module_get_head ((ValaCCodeModule*) self), m)) != NULL, _g_free0 (_tmp56_), _tmp57_)) {
9517
 
                                        ValaCCodeExpression* _tmp59_;
9518
 
                                        char* _tmp58_;
9519
 
                                        creation_expr = (_tmp59_ = (ValaCCodeExpression*) vala_ccode_cast_expression_new (creation_expr, _tmp58_ = vala_data_type_get_cname (vala_object_creation_expression_get_type_reference (expr))), _vala_ccode_node_unref0 (creation_expr), _tmp59_);
9520
 
                                        _g_free0 (_tmp58_);
 
10125
                                creation_expr = (_tmp70_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) creation_call), _vala_ccode_node_unref0 (creation_expr), _tmp70_);
 
10126
                                if ((_tmp72_ = (_tmp71_ = vala_ccode_module_get_custom_creturn_type (vala_ccode_module_get_head ((ValaCCodeModule*) self), m)) != NULL, _g_free0 (_tmp71_), _tmp72_)) {
 
10127
                                        ValaCCodeExpression* _tmp74_;
 
10128
                                        char* _tmp73_;
 
10129
                                        creation_expr = (_tmp74_ = (ValaCCodeExpression*) vala_ccode_cast_expression_new (creation_expr, _tmp73_ = vala_data_type_get_cname (vala_object_creation_expression_get_type_reference (expr))), _vala_ccode_node_unref0 (creation_expr), _tmp74_);
 
10130
                                        _g_free0 (_tmp73_);
9521
10131
                                }
9522
10132
                                _vala_code_node_unref0 (m);
9523
10133
                                _vala_collection_object_unref0 (params);
9530
10140
                                        ValaErrorCode* ecode;
9531
10141
                                        ValaErrorDomain* edomain;
9532
10142
                                        ValaCCodeFunctionCall* creation_call;
9533
 
                                        ValaList* _tmp60_;
9534
 
                                        gboolean _tmp61_;
9535
 
                                        ValaCCodeIdentifier* _tmp67_;
9536
 
                                        char* _tmp66_;
9537
 
                                        ValaCCodeIdentifier* _tmp69_;
9538
 
                                        char* _tmp68_;
9539
 
                                        ValaCCodeExpression* _tmp72_;
 
10143
                                        ValaList* _tmp75_;
 
10144
                                        gboolean _tmp76_;
 
10145
                                        ValaCCodeIdentifier* _tmp82_;
 
10146
                                        char* _tmp81_;
 
10147
                                        ValaCCodeIdentifier* _tmp84_;
 
10148
                                        char* _tmp83_;
 
10149
                                        ValaCCodeExpression* _tmp87_;
9540
10150
                                        ecode = _vala_code_node_ref0 (VALA_ERROR_CODE (vala_expression_get_symbol_reference ((ValaExpression*) expr)));
9541
10151
                                        edomain = _vala_code_node_ref0 (VALA_ERROR_DOMAIN (vala_symbol_get_parent_symbol ((ValaSymbol*) ecode)));
9542
10152
                                        creation_call = NULL;
9543
10153
                                        vala_ccode_base_module_generate_error_domain_declaration (self, edomain, self->source_declarations);
9544
 
                                        if ((_tmp61_ = vala_collection_get_size ((ValaCollection*) (_tmp60_ = vala_object_creation_expression_get_argument_list (expr))) == 1, _vala_collection_object_unref0 (_tmp60_), _tmp61_)) {
9545
 
                                                ValaCCodeFunctionCall* _tmp63_;
9546
 
                                                ValaCCodeIdentifier* _tmp62_;
9547
 
                                                creation_call = (_tmp63_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp62_ = vala_ccode_identifier_new ("g_error_new_literal"))), _vala_ccode_node_unref0 (creation_call), _tmp63_);
9548
 
                                                _vala_ccode_node_unref0 (_tmp62_);
 
10154
                                        if ((_tmp76_ = vala_collection_get_size ((ValaCollection*) (_tmp75_ = vala_object_creation_expression_get_argument_list (expr))) == 1, _vala_collection_object_unref0 (_tmp75_), _tmp76_)) {
 
10155
                                                ValaCCodeFunctionCall* _tmp78_;
 
10156
                                                ValaCCodeIdentifier* _tmp77_;
 
10157
                                                creation_call = (_tmp78_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp77_ = vala_ccode_identifier_new ("g_error_new_literal"))), _vala_ccode_node_unref0 (creation_call), _tmp78_);
 
10158
                                                _vala_ccode_node_unref0 (_tmp77_);
9549
10159
                                        } else {
9550
 
                                                ValaCCodeFunctionCall* _tmp65_;
9551
 
                                                ValaCCodeIdentifier* _tmp64_;
9552
 
                                                creation_call = (_tmp65_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp64_ = vala_ccode_identifier_new ("g_error_new"))), _vala_ccode_node_unref0 (creation_call), _tmp65_);
9553
 
                                                _vala_ccode_node_unref0 (_tmp64_);
 
10160
                                                ValaCCodeFunctionCall* _tmp80_;
 
10161
                                                ValaCCodeIdentifier* _tmp79_;
 
10162
                                                creation_call = (_tmp80_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp79_ = vala_ccode_identifier_new ("g_error_new"))), _vala_ccode_node_unref0 (creation_call), _tmp80_);
 
10163
                                                _vala_ccode_node_unref0 (_tmp79_);
9554
10164
                                        }
9555
 
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp67_ = vala_ccode_identifier_new (_tmp66_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) edomain, NULL))));
9556
 
                                        _vala_ccode_node_unref0 (_tmp67_);
9557
 
                                        _g_free0 (_tmp66_);
9558
 
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp69_ = vala_ccode_identifier_new (_tmp68_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) ecode, FALSE))));
9559
 
                                        _vala_ccode_node_unref0 (_tmp69_);
9560
 
                                        _g_free0 (_tmp68_);
 
10165
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp82_ = vala_ccode_identifier_new (_tmp81_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) edomain, NULL))));
 
10166
                                        _vala_ccode_node_unref0 (_tmp82_);
 
10167
                                        _g_free0 (_tmp81_);
 
10168
                                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) (_tmp84_ = vala_ccode_identifier_new (_tmp83_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) ecode, FALSE))));
 
10169
                                        _vala_ccode_node_unref0 (_tmp84_);
 
10170
                                        _g_free0 (_tmp83_);
9561
10171
                                        {
9562
 
                                                ValaList* _tmp70_;
9563
 
                                                ValaIterator* _tmp71_;
 
10172
                                                ValaList* _tmp85_;
 
10173
                                                ValaIterator* _tmp86_;
9564
10174
                                                ValaIterator* _arg_it;
9565
 
                                                _arg_it = (_tmp71_ = vala_iterable_iterator ((ValaIterable*) (_tmp70_ = vala_object_creation_expression_get_argument_list (expr))), _vala_collection_object_unref0 (_tmp70_), _tmp71_);
 
10175
                                                _arg_it = (_tmp86_ = vala_iterable_iterator ((ValaIterable*) (_tmp85_ = vala_object_creation_expression_get_argument_list (expr))), _vala_collection_object_unref0 (_tmp85_), _tmp86_);
9566
10176
                                                while (TRUE) {
9567
10177
                                                        ValaExpression* arg;
9568
10178
                                                        if (!vala_iterator_next (_arg_it)) {
9574
10184
                                                }
9575
10185
                                                _vala_collection_object_unref0 (_arg_it);
9576
10186
                                        }
9577
 
                                        creation_expr = (_tmp72_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) creation_call), _vala_ccode_node_unref0 (creation_expr), _tmp72_);
 
10187
                                        creation_expr = (_tmp87_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) creation_call), _vala_ccode_node_unref0 (creation_expr), _tmp87_);
9578
10188
                                        _vala_code_node_unref0 (ecode);
9579
10189
                                        _vala_code_node_unref0 (edomain);
9580
10190
                                        _vala_ccode_node_unref0 (creation_call);
9584
10194
                        }
9585
10195
                }
9586
10196
        }
9587
 
        if (instance != NULL) {
9588
 
                ValaCCodeCommaExpression* ccomma;
9589
 
                ccomma = vala_ccode_comma_expression_new ();
9590
 
                if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
9591
 
                        vala_ccode_comma_expression_append_expression (ccomma, creation_expr);
9592
 
                } else {
9593
 
                        ValaCCodeAssignment* _tmp73_;
9594
 
                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp73_ = vala_ccode_assignment_new (instance, creation_expr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
9595
 
                        _vala_ccode_node_unref0 (_tmp73_);
9596
 
                }
9597
 
                {
9598
 
                        ValaList* _tmp74_;
9599
 
                        ValaIterator* _tmp75_;
9600
 
                        ValaIterator* _init_it;
9601
 
                        _init_it = (_tmp75_ = vala_iterable_iterator ((ValaIterable*) (_tmp74_ = vala_object_creation_expression_get_object_initializer (expr))), _vala_collection_object_unref0 (_tmp74_), _tmp75_);
9602
 
                        while (TRUE) {
9603
 
                                ValaMemberInitializer* init;
9604
 
                                if (!vala_iterator_next (_init_it)) {
9605
 
                                        break;
9606
 
                                }
9607
 
                                init = (ValaMemberInitializer*) vala_iterator_get (_init_it);
9608
 
                                if (VALA_IS_FIELD (vala_member_initializer_get_symbol_reference (init))) {
9609
 
                                        ValaField* f;
9610
 
                                        ValaDataType* instance_target_type;
9611
 
                                        ValaCCodeExpression* typed_inst;
9612
 
                                        ValaCCodeExpression* lhs;
9613
 
                                        ValaCCodeAssignment* _tmp80_;
9614
 
                                        gboolean _tmp81_ = FALSE;
9615
 
                                        ValaSymbol* _tmp101_;
9616
 
                                        ValaClass* cl;
9617
 
                                        f = _vala_code_node_ref0 (VALA_FIELD (vala_member_initializer_get_symbol_reference (init)));
9618
 
                                        instance_target_type = vala_ccode_base_module_get_data_type_for_symbol (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) f)));
9619
 
                                        typed_inst = vala_ccode_base_module_transform_expression (self, instance, vala_object_creation_expression_get_type_reference (expr), instance_target_type, NULL);
9620
 
                                        lhs = NULL;
9621
 
                                        if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
9622
 
                                                ValaCCodeExpression* _tmp77_;
9623
 
                                                char* _tmp76_;
9624
 
                                                lhs = (_tmp77_ = (ValaCCodeExpression*) vala_ccode_member_access_new (typed_inst, _tmp76_ = vala_field_get_cname (f), FALSE), _vala_ccode_node_unref0 (lhs), _tmp77_);
9625
 
                                                _g_free0 (_tmp76_);
9626
 
                                        } else {
9627
 
                                                ValaCCodeExpression* _tmp79_;
9628
 
                                                char* _tmp78_;
9629
 
                                                lhs = (_tmp79_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer (typed_inst, _tmp78_ = vala_field_get_cname (f)), _vala_ccode_node_unref0 (lhs), _tmp79_);
9630
 
                                                _g_free0 (_tmp78_);
9631
 
                                        }
9632
 
                                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp80_ = vala_ccode_assignment_new (lhs, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_member_initializer_get_initializer (init))), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
9633
 
                                        _vala_ccode_node_unref0 (_tmp80_);
9634
 
                                        if (VALA_IS_ARRAY_TYPE (vala_field_get_field_type (f))) {
9635
 
                                                _tmp81_ = !vala_field_get_no_array_length (f);
9636
 
                                        } else {
9637
 
                                                _tmp81_ = FALSE;
9638
 
                                        }
9639
 
                                        if (_tmp81_) {
9640
 
                                                ValaArrayType* array_type;
9641
 
                                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
9642
 
                                                {
9643
 
                                                        gint dim;
9644
 
                                                        dim = 1;
 
10197
        local = _vala_code_node_ref0 ((_tmp88_ = vala_code_node_get_parent_node ((ValaCodeNode*) expr), VALA_IS_LOCAL_VARIABLE (_tmp88_) ? ((ValaLocalVariable*) _tmp88_) : NULL));
 
10198
        if (local != NULL) {
 
10199
                _tmp89_ = vala_ccode_base_module_has_simple_struct_initializer (self, local);
 
10200
        } else {
 
10201
                _tmp89_ = FALSE;
 
10202
        }
 
10203
        if (_tmp89_) {
 
10204
                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) creation_expr);
 
10205
        } else {
 
10206
                if (instance != NULL) {
 
10207
                        ValaCCodeCommaExpression* ccomma;
 
10208
                        ccomma = vala_ccode_comma_expression_new ();
 
10209
                        if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
 
10210
                                vala_ccode_comma_expression_append_expression (ccomma, creation_expr);
 
10211
                        } else {
 
10212
                                ValaCCodeAssignment* _tmp90_;
 
10213
                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp90_ = vala_ccode_assignment_new (instance, creation_expr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
10214
                                _vala_ccode_node_unref0 (_tmp90_);
 
10215
                        }
 
10216
                        {
 
10217
                                ValaList* _tmp91_;
 
10218
                                ValaIterator* _tmp92_;
 
10219
                                ValaIterator* _init_it;
 
10220
                                _init_it = (_tmp92_ = vala_iterable_iterator ((ValaIterable*) (_tmp91_ = vala_object_creation_expression_get_object_initializer (expr))), _vala_collection_object_unref0 (_tmp91_), _tmp92_);
 
10221
                                while (TRUE) {
 
10222
                                        ValaMemberInitializer* init;
 
10223
                                        if (!vala_iterator_next (_init_it)) {
 
10224
                                                break;
 
10225
                                        }
 
10226
                                        init = (ValaMemberInitializer*) vala_iterator_get (_init_it);
 
10227
                                        if (VALA_IS_FIELD (vala_member_initializer_get_symbol_reference (init))) {
 
10228
                                                ValaField* f;
 
10229
                                                ValaDataType* instance_target_type;
 
10230
                                                ValaCCodeExpression* typed_inst;
 
10231
                                                ValaCCodeExpression* lhs;
 
10232
                                                ValaCCodeAssignment* _tmp97_;
 
10233
                                                gboolean _tmp98_ = FALSE;
 
10234
                                                ValaSymbol* _tmp118_;
 
10235
                                                ValaClass* cl;
 
10236
                                                f = _vala_code_node_ref0 (VALA_FIELD (vala_member_initializer_get_symbol_reference (init)));
 
10237
                                                instance_target_type = vala_ccode_base_module_get_data_type_for_symbol (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) f)));
 
10238
                                                typed_inst = vala_ccode_base_module_transform_expression (self, instance, vala_object_creation_expression_get_type_reference (expr), instance_target_type, NULL);
 
10239
                                                lhs = NULL;
 
10240
                                                if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
 
10241
                                                        ValaCCodeExpression* _tmp94_;
 
10242
                                                        char* _tmp93_;
 
10243
                                                        lhs = (_tmp94_ = (ValaCCodeExpression*) vala_ccode_member_access_new (typed_inst, _tmp93_ = vala_field_get_cname (f), FALSE), _vala_ccode_node_unref0 (lhs), _tmp94_);
 
10244
                                                        _g_free0 (_tmp93_);
 
10245
                                                } else {
 
10246
                                                        ValaCCodeExpression* _tmp96_;
 
10247
                                                        char* _tmp95_;
 
10248
                                                        lhs = (_tmp96_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer (typed_inst, _tmp95_ = vala_field_get_cname (f)), _vala_ccode_node_unref0 (lhs), _tmp96_);
 
10249
                                                        _g_free0 (_tmp95_);
 
10250
                                                }
 
10251
                                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp97_ = vala_ccode_assignment_new (lhs, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_member_initializer_get_initializer (init))), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
10252
                                                _vala_ccode_node_unref0 (_tmp97_);
 
10253
                                                if (VALA_IS_ARRAY_TYPE (vala_field_get_field_type (f))) {
 
10254
                                                        _tmp98_ = !vala_field_get_no_array_length (f);
 
10255
                                                } else {
 
10256
                                                        _tmp98_ = FALSE;
 
10257
                                                }
 
10258
                                                if (_tmp98_) {
 
10259
                                                        ValaArrayType* array_type;
 
10260
                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
9645
10261
                                                        {
9646
 
                                                                gboolean _tmp82_;
9647
 
                                                                _tmp82_ = TRUE;
9648
 
                                                                while (TRUE) {
9649
 
                                                                        ValaCCodeExpression* rhs_array_len;
9650
 
                                                                        ValaCCodeAssignment* _tmp89_;
9651
 
                                                                        if (!_tmp82_) {
9652
 
                                                                                dim++;
9653
 
                                                                        }
9654
 
                                                                        _tmp82_ = FALSE;
9655
 
                                                                        if (!(dim <= vala_array_type_get_rank (array_type))) {
9656
 
                                                                                break;
9657
 
                                                                        }
9658
 
                                                                        if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
9659
 
                                                                                ValaCCodeExpression* _tmp85_;
9660
 
                                                                                char* _tmp84_;
9661
 
                                                                                char* _tmp83_;
9662
 
                                                                                lhs = (_tmp85_ = (ValaCCodeExpression*) vala_ccode_member_access_new (typed_inst, _tmp84_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp83_ = vala_field_get_cname (f), dim), FALSE), _vala_ccode_node_unref0 (lhs), _tmp85_);
9663
 
                                                                                _g_free0 (_tmp84_);
9664
 
                                                                                _g_free0 (_tmp83_);
9665
 
                                                                        } else {
9666
 
                                                                                ValaCCodeExpression* _tmp88_;
9667
 
                                                                                char* _tmp87_;
9668
 
                                                                                char* _tmp86_;
9669
 
                                                                                lhs = (_tmp88_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer (typed_inst, _tmp87_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp86_ = vala_field_get_cname (f), dim)), _vala_ccode_node_unref0 (lhs), _tmp88_);
9670
 
                                                                                _g_free0 (_tmp87_);
9671
 
                                                                                _g_free0 (_tmp86_);
9672
 
                                                                        }
9673
 
                                                                        rhs_array_len = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), vala_member_initializer_get_initializer (init), dim);
9674
 
                                                                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp89_ = vala_ccode_assignment_new (lhs, rhs_array_len, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
9675
 
                                                                        _vala_ccode_node_unref0 (_tmp89_);
9676
 
                                                                        _vala_ccode_node_unref0 (rhs_array_len);
 
10262
                                                                gint dim;
 
10263
                                                                dim = 1;
 
10264
                                                                {
 
10265
                                                                        gboolean _tmp99_;
 
10266
                                                                        _tmp99_ = TRUE;
 
10267
                                                                        while (TRUE) {
 
10268
                                                                                ValaCCodeExpression* rhs_array_len;
 
10269
                                                                                ValaCCodeAssignment* _tmp106_;
 
10270
                                                                                if (!_tmp99_) {
 
10271
                                                                                        dim++;
 
10272
                                                                                }
 
10273
                                                                                _tmp99_ = FALSE;
 
10274
                                                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
 
10275
                                                                                        break;
 
10276
                                                                                }
 
10277
                                                                                if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
 
10278
                                                                                        ValaCCodeExpression* _tmp102_;
 
10279
                                                                                        char* _tmp101_;
 
10280
                                                                                        char* _tmp100_;
 
10281
                                                                                        lhs = (_tmp102_ = (ValaCCodeExpression*) vala_ccode_member_access_new (typed_inst, _tmp101_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp100_ = vala_field_get_cname (f), dim), FALSE), _vala_ccode_node_unref0 (lhs), _tmp102_);
 
10282
                                                                                        _g_free0 (_tmp101_);
 
10283
                                                                                        _g_free0 (_tmp100_);
 
10284
                                                                                } else {
 
10285
                                                                                        ValaCCodeExpression* _tmp105_;
 
10286
                                                                                        char* _tmp104_;
 
10287
                                                                                        char* _tmp103_;
 
10288
                                                                                        lhs = (_tmp105_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer (typed_inst, _tmp104_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp103_ = vala_field_get_cname (f), dim)), _vala_ccode_node_unref0 (lhs), _tmp105_);
 
10289
                                                                                        _g_free0 (_tmp104_);
 
10290
                                                                                        _g_free0 (_tmp103_);
 
10291
                                                                                }
 
10292
                                                                                rhs_array_len = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), vala_member_initializer_get_initializer (init), dim);
 
10293
                                                                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp106_ = vala_ccode_assignment_new (lhs, rhs_array_len, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
10294
                                                                                _vala_ccode_node_unref0 (_tmp106_);
 
10295
                                                                                _vala_ccode_node_unref0 (rhs_array_len);
 
10296
                                                                        }
9677
10297
                                                                }
9678
10298
                                                        }
9679
 
                                                }
9680
 
                                                _vala_code_node_unref0 (array_type);
9681
 
                                        } else {
9682
 
                                                gboolean _tmp90_ = FALSE;
9683
 
                                                if (VALA_IS_DELEGATE_TYPE (vala_field_get_field_type (f))) {
9684
 
                                                        _tmp90_ = !vala_field_get_no_delegate_target (f);
 
10299
                                                        _vala_code_node_unref0 (array_type);
9685
10300
                                                } else {
9686
 
                                                        _tmp90_ = FALSE;
9687
 
                                                }
9688
 
                                                if (_tmp90_) {
9689
 
                                                        ValaCCodeExpression* rhs_delegate_target_destroy_notify;
9690
 
                                                        ValaCCodeExpression* _tmp99_;
9691
 
                                                        ValaCCodeExpression* _tmp98_;
9692
 
                                                        ValaCCodeExpression* _tmp97_ = NULL;
9693
 
                                                        ValaCCodeExpression* rhs_delegate_target;
9694
 
                                                        ValaCCodeAssignment* _tmp100_;
9695
 
                                                        if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
9696
 
                                                                ValaCCodeExpression* _tmp93_;
9697
 
                                                                char* _tmp92_;
9698
 
                                                                char* _tmp91_;
9699
 
                                                                lhs = (_tmp93_ = (ValaCCodeExpression*) vala_ccode_member_access_new (typed_inst, _tmp92_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp91_ = vala_field_get_cname (f)), FALSE), _vala_ccode_node_unref0 (lhs), _tmp93_);
9700
 
                                                                _g_free0 (_tmp92_);
9701
 
                                                                _g_free0 (_tmp91_);
 
10301
                                                        gboolean _tmp107_ = FALSE;
 
10302
                                                        if (VALA_IS_DELEGATE_TYPE (vala_field_get_field_type (f))) {
 
10303
                                                                _tmp107_ = !vala_field_get_no_delegate_target (f);
9702
10304
                                                        } else {
9703
 
                                                                ValaCCodeExpression* _tmp96_;
9704
 
                                                                char* _tmp95_;
9705
 
                                                                char* _tmp94_;
9706
 
                                                                lhs = (_tmp96_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer (typed_inst, _tmp95_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp94_ = vala_field_get_cname (f))), _vala_ccode_node_unref0 (lhs), _tmp96_);
9707
 
                                                                _g_free0 (_tmp95_);
9708
 
                                                                _g_free0 (_tmp94_);
9709
 
                                                        }
9710
 
                                                        rhs_delegate_target_destroy_notify = NULL;
9711
 
                                                        rhs_delegate_target = (_tmp98_ = vala_ccode_base_module_get_delegate_target_cexpression (self, vala_member_initializer_get_initializer (init), &_tmp97_), rhs_delegate_target_destroy_notify = (_tmp99_ = _tmp97_, _vala_ccode_node_unref0 (rhs_delegate_target_destroy_notify), _tmp99_), _tmp98_);
9712
 
                                                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp100_ = vala_ccode_assignment_new (lhs, rhs_delegate_target, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
9713
 
                                                        _vala_ccode_node_unref0 (_tmp100_);
9714
 
                                                        _vala_ccode_node_unref0 (rhs_delegate_target_destroy_notify);
9715
 
                                                        _vala_ccode_node_unref0 (rhs_delegate_target);
9716
 
                                                }
9717
 
                                        }
9718
 
                                        cl = _vala_code_node_ref0 ((_tmp101_ = vala_symbol_get_parent_symbol ((ValaSymbol*) f), VALA_IS_CLASS (_tmp101_) ? ((ValaClass*) _tmp101_) : NULL));
9719
 
                                        if (cl != NULL) {
9720
 
                                                vala_ccode_base_module_generate_class_struct_declaration (self, cl, self->source_declarations);
9721
 
                                        }
9722
 
                                        _vala_code_node_unref0 (f);
9723
 
                                        _vala_code_node_unref0 (instance_target_type);
9724
 
                                        _vala_ccode_node_unref0 (typed_inst);
9725
 
                                        _vala_ccode_node_unref0 (lhs);
9726
 
                                        _vala_code_node_unref0 (cl);
9727
 
                                } else {
9728
 
                                        if (VALA_IS_PROPERTY (vala_member_initializer_get_symbol_reference (init))) {
9729
 
                                                ValaMemberAccess* inst_ma;
9730
 
                                                ValaMemberAccess* ma;
9731
 
                                                ValaCCodeFunctionCall* _tmp102_;
9732
 
                                                inst_ma = vala_member_access_new_simple ("new", NULL);
9733
 
                                                vala_expression_set_value_type ((ValaExpression*) inst_ma, vala_object_creation_expression_get_type_reference (expr));
9734
 
                                                vala_code_node_set_ccodenode ((ValaCodeNode*) inst_ma, (ValaCCodeNode*) instance);
9735
 
                                                ma = vala_member_access_new ((ValaExpression*) inst_ma, vala_member_initializer_get_name (init), NULL);
9736
 
                                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp102_ = vala_ccode_base_module_get_property_set_call (self, VALA_PROPERTY (vala_member_initializer_get_symbol_reference (init)), ma, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_member_initializer_get_initializer (init))), NULL)));
9737
 
                                                _vala_ccode_node_unref0 (_tmp102_);
9738
 
                                                _vala_code_node_unref0 (inst_ma);
9739
 
                                                _vala_code_node_unref0 (ma);
9740
 
                                        }
 
10305
                                                                _tmp107_ = FALSE;
 
10306
                                                        }
 
10307
                                                        if (_tmp107_) {
 
10308
                                                                ValaCCodeExpression* rhs_delegate_target_destroy_notify;
 
10309
                                                                ValaCCodeExpression* _tmp116_;
 
10310
                                                                ValaCCodeExpression* _tmp115_;
 
10311
                                                                ValaCCodeExpression* _tmp114_ = NULL;
 
10312
                                                                ValaCCodeExpression* rhs_delegate_target;
 
10313
                                                                ValaCCodeAssignment* _tmp117_;
 
10314
                                                                if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
 
10315
                                                                        ValaCCodeExpression* _tmp110_;
 
10316
                                                                        char* _tmp109_;
 
10317
                                                                        char* _tmp108_;
 
10318
                                                                        lhs = (_tmp110_ = (ValaCCodeExpression*) vala_ccode_member_access_new (typed_inst, _tmp109_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp108_ = vala_field_get_cname (f)), FALSE), _vala_ccode_node_unref0 (lhs), _tmp110_);
 
10319
                                                                        _g_free0 (_tmp109_);
 
10320
                                                                        _g_free0 (_tmp108_);
 
10321
                                                                } else {
 
10322
                                                                        ValaCCodeExpression* _tmp113_;
 
10323
                                                                        char* _tmp112_;
 
10324
                                                                        char* _tmp111_;
 
10325
                                                                        lhs = (_tmp113_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer (typed_inst, _tmp112_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp111_ = vala_field_get_cname (f))), _vala_ccode_node_unref0 (lhs), _tmp113_);
 
10326
                                                                        _g_free0 (_tmp112_);
 
10327
                                                                        _g_free0 (_tmp111_);
 
10328
                                                                }
 
10329
                                                                rhs_delegate_target_destroy_notify = NULL;
 
10330
                                                                rhs_delegate_target = (_tmp115_ = vala_ccode_base_module_get_delegate_target_cexpression (self, vala_member_initializer_get_initializer (init), &_tmp114_), rhs_delegate_target_destroy_notify = (_tmp116_ = _tmp114_, _vala_ccode_node_unref0 (rhs_delegate_target_destroy_notify), _tmp116_), _tmp115_);
 
10331
                                                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp117_ = vala_ccode_assignment_new (lhs, rhs_delegate_target, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
10332
                                                                _vala_ccode_node_unref0 (_tmp117_);
 
10333
                                                                _vala_ccode_node_unref0 (rhs_delegate_target_destroy_notify);
 
10334
                                                                _vala_ccode_node_unref0 (rhs_delegate_target);
 
10335
                                                        }
 
10336
                                                }
 
10337
                                                cl = _vala_code_node_ref0 ((_tmp118_ = vala_symbol_get_parent_symbol ((ValaSymbol*) f), VALA_IS_CLASS (_tmp118_) ? ((ValaClass*) _tmp118_) : NULL));
 
10338
                                                if (cl != NULL) {
 
10339
                                                        vala_ccode_base_module_generate_class_struct_declaration (self, cl, self->source_declarations);
 
10340
                                                }
 
10341
                                                _vala_code_node_unref0 (f);
 
10342
                                                _vala_code_node_unref0 (instance_target_type);
 
10343
                                                _vala_ccode_node_unref0 (typed_inst);
 
10344
                                                _vala_ccode_node_unref0 (lhs);
 
10345
                                                _vala_code_node_unref0 (cl);
 
10346
                                        } else {
 
10347
                                                if (VALA_IS_PROPERTY (vala_member_initializer_get_symbol_reference (init))) {
 
10348
                                                        ValaMemberAccess* inst_ma;
 
10349
                                                        ValaMemberAccess* ma;
 
10350
                                                        ValaCCodeExpression* _tmp119_;
 
10351
                                                        inst_ma = vala_member_access_new_simple ("new", NULL);
 
10352
                                                        vala_expression_set_value_type ((ValaExpression*) inst_ma, vala_object_creation_expression_get_type_reference (expr));
 
10353
                                                        vala_code_node_set_ccodenode ((ValaCodeNode*) inst_ma, (ValaCCodeNode*) instance);
 
10354
                                                        ma = vala_member_access_new ((ValaExpression*) inst_ma, vala_member_initializer_get_name (init), NULL);
 
10355
                                                        vala_ccode_comma_expression_append_expression (ccomma, _tmp119_ = vala_ccode_base_module_get_property_set_call (self, VALA_PROPERTY (vala_member_initializer_get_symbol_reference (init)), ma, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_member_initializer_get_initializer (init))), NULL));
 
10356
                                                        _vala_ccode_node_unref0 (_tmp119_);
 
10357
                                                        _vala_code_node_unref0 (inst_ma);
 
10358
                                                        _vala_code_node_unref0 (ma);
 
10359
                                                }
 
10360
                                        }
 
10361
                                        _vala_code_node_unref0 (init);
9741
10362
                                }
9742
 
                                _vala_code_node_unref0 (init);
9743
 
                        }
9744
 
                        _vala_collection_object_unref0 (_init_it);
9745
 
                }
9746
 
                vala_ccode_comma_expression_append_expression (ccomma, instance);
9747
 
                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) ccomma);
9748
 
                _vala_ccode_node_unref0 (ccomma);
9749
 
        } else {
9750
 
                if (creation_expr != NULL) {
9751
 
                        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) creation_expr);
 
10363
                                _vala_collection_object_unref0 (_init_it);
 
10364
                        }
 
10365
                        vala_ccode_comma_expression_append_expression (ccomma, instance);
 
10366
                        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) ccomma);
 
10367
                        _vala_ccode_node_unref0 (ccomma);
 
10368
                } else {
 
10369
                        if (creation_expr != NULL) {
 
10370
                                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) creation_expr);
 
10371
                        }
9752
10372
                }
9753
10373
        }
9754
10374
        _vala_ccode_node_unref0 (instance);
9755
10375
        _vala_ccode_node_unref0 (creation_expr);
9756
10376
        _vala_code_node_unref0 (st);
 
10377
        _vala_code_node_unref0 (local);
9757
10378
}
9758
10379
 
9759
10380
 
9760
10381
ValaCCodeExpression* vala_ccode_base_module_handle_struct_argument (ValaCCodeBaseModule* self, ValaFormalParameter* param, ValaExpression* arg, ValaCCodeExpression* cexpr) {
9761
 
        ValaCCodeExpression* result;
 
10382
        ValaCCodeExpression* result = NULL;
9762
10383
        gboolean _tmp0_ = FALSE;
9763
10384
        gboolean _tmp1_ = FALSE;
9764
10385
        g_return_val_if_fail (self != NULL, NULL);
9911
10532
 
9912
10533
 
9913
10534
ValaCCodeExpression* vala_ccode_base_module_try_cast_value_to_type (ValaCCodeBaseModule* self, ValaCCodeExpression* ccodeexpr, ValaDataType* from, ValaDataType* to, ValaExpression* expr) {
9914
 
        ValaCCodeExpression* result;
 
10535
        ValaCCodeExpression* result = NULL;
9915
10536
        gboolean _tmp0_ = FALSE;
9916
10537
        gboolean _tmp1_ = FALSE;
9917
10538
        gboolean _tmp2_ = FALSE;
10035
10656
        gboolean _tmp2_ = FALSE;
10036
10657
        self = (ValaCCodeBaseModule*) base;
10037
10658
        g_return_if_fail (expr != NULL);
10038
 
        if (vala_cast_expression_get_is_non_null_cast (expr)) {
10039
 
                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, vala_code_node_get_ccodenode ((ValaCodeNode*) vala_cast_expression_get_inner (expr)));
10040
 
                return;
10041
 
        }
10042
10659
        valuecast = vala_ccode_base_module_try_cast_value_to_type (self, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_cast_expression_get_inner (expr))), vala_expression_get_value_type (vala_cast_expression_get_inner (expr)), vala_cast_expression_get_type_reference (expr), (ValaExpression*) expr);
10043
10660
        if (valuecast != NULL) {
10044
10661
                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) valuecast);
10200
10817
 
10201
10818
static void vala_ccode_base_module_real_visit_addressof_expression (ValaCCodeModule* base, ValaAddressofExpression* expr) {
10202
10819
        ValaCCodeBaseModule * self;
10203
 
        ValaCCodeUnaryExpression* _tmp0_;
10204
10820
        self = (ValaCCodeBaseModule*) base;
10205
10821
        g_return_if_fail (expr != NULL);
10206
 
        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp0_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_addressof_expression_get_inner (expr))))));
10207
 
        _vala_ccode_node_unref0 (_tmp0_);
 
10822
        if (VALA_IS_CCODE_COMMA_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_addressof_expression_get_inner (expr)))) {
 
10823
                ValaCCodeNode* _tmp0_;
 
10824
                ValaCCodeCommaExpression* ccomma;
 
10825
                ValaList* inner;
 
10826
                ValaCCodeExpression* last;
 
10827
                ValaCCodeUnaryExpression* _tmp1_;
 
10828
                ccomma = _vala_ccode_node_ref0 ((_tmp0_ = vala_code_node_get_ccodenode ((ValaCodeNode*) vala_addressof_expression_get_inner (expr)), VALA_IS_CCODE_COMMA_EXPRESSION (_tmp0_) ? ((ValaCCodeCommaExpression*) _tmp0_) : NULL));
 
10829
                inner = vala_ccode_comma_expression_get_inner (ccomma);
 
10830
                last = (ValaCCodeExpression*) vala_list_get (inner, vala_collection_get_size ((ValaCollection*) inner) - 1);
 
10831
                vala_ccode_comma_expression_set_expression (ccomma, vala_collection_get_size ((ValaCollection*) inner) - 1, (ValaCCodeExpression*) (_tmp1_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, VALA_CCODE_EXPRESSION (last))));
 
10832
                _vala_ccode_node_unref0 (_tmp1_);
 
10833
                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) ccomma);
 
10834
                _vala_ccode_node_unref0 (ccomma);
 
10835
                _vala_collection_object_unref0 (inner);
 
10836
                _vala_ccode_node_unref0 (last);
 
10837
        } else {
 
10838
                ValaCCodeUnaryExpression* _tmp2_;
 
10839
                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp2_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_addressof_expression_get_inner (expr))))));
 
10840
                _vala_ccode_node_unref0 (_tmp2_);
 
10841
        }
10208
10842
}
10209
10843
 
10210
10844
 
10240
10874
        ValaCCodeBaseModule * self;
10241
10875
        ValaCCodeExpression* cleft;
10242
10876
        ValaCCodeExpression* cright;
 
10877
        ValaCCodeExpression* left_chain;
10243
10878
        ValaCCodeBinaryOperator op = 0;
10244
 
        gboolean _tmp2_ = FALSE;
10245
 
        gboolean _tmp21_ = FALSE;
10246
 
        gboolean _tmp22_ = FALSE;
10247
 
        gboolean _tmp23_ = FALSE;
10248
 
        ValaCCodeBinaryExpression* _tmp56_;
 
10879
        gboolean _tmp16_ = FALSE;
 
10880
        gboolean _tmp35_ = FALSE;
 
10881
        gboolean _tmp36_ = FALSE;
 
10882
        gboolean _tmp37_ = FALSE;
 
10883
        ValaCCodeBinaryExpression* _tmp70_;
10249
10884
        self = (ValaCCodeBaseModule*) base;
10250
10885
        g_return_if_fail (expr != NULL);
10251
10886
        vala_code_node_accept_children ((ValaCodeNode*) expr, (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
10252
10887
        cleft = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_binary_expression_get_left (expr))));
10253
10888
        cright = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_binary_expression_get_right (expr))));
 
10889
        left_chain = NULL;
 
10890
        if (expr->chained) {
 
10891
                ValaBinaryExpression* lbe;
 
10892
                ValaLocalVariable* temp_decl;
 
10893
                ValaCCodeExpression* cvar;
 
10894
                ValaCCodeCommaExpression* ccomma;
 
10895
                ValaCCodeBinaryExpression* clbe;
 
10896
                ValaCCodeAssignment* _tmp1_;
 
10897
                ValaCCodeExpression* _tmp2_;
 
10898
                ValaCCodeExpression* _tmp3_;
 
10899
                ValaCCodeExpression* _tmp4_;
 
10900
                lbe = _vala_code_node_ref0 (VALA_BINARY_EXPRESSION (vala_binary_expression_get_left (expr)));
 
10901
                temp_decl = vala_ccode_base_module_get_temp_variable (self, vala_expression_get_value_type (vala_binary_expression_get_right (lbe)), TRUE, NULL, FALSE);
 
10902
                vala_list_insert ((ValaList*) self->temp_vars, 0, temp_decl);
 
10903
                cvar = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) temp_decl));
 
10904
                ccomma = vala_ccode_comma_expression_new ();
 
10905
                clbe = _vala_ccode_node_ref0 (VALA_CCODE_BINARY_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) lbe)));
 
10906
                if (lbe->chained) {
 
10907
                        ValaCCodeBinaryExpression* _tmp0_;
 
10908
                        clbe = (_tmp0_ = _vala_ccode_node_ref0 (VALA_CCODE_BINARY_EXPRESSION (vala_ccode_binary_expression_get_right (clbe))), _vala_ccode_node_unref0 (clbe), _tmp0_);
 
10909
                }
 
10910
                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp1_ = vala_ccode_assignment_new (cvar, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_binary_expression_get_right (lbe))), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
10911
                _vala_ccode_node_unref0 (_tmp1_);
 
10912
                vala_ccode_binary_expression_set_right (clbe, _tmp2_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) temp_decl)));
 
10913
                _vala_ccode_node_unref0 (_tmp2_);
 
10914
                vala_ccode_comma_expression_append_expression (ccomma, cleft);
 
10915
                cleft = (_tmp3_ = _vala_ccode_node_ref0 (cvar), _vala_ccode_node_unref0 (cleft), _tmp3_);
 
10916
                left_chain = (_tmp4_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccomma), _vala_ccode_node_unref0 (left_chain), _tmp4_);
 
10917
                _vala_code_node_unref0 (lbe);
 
10918
                _vala_code_node_unref0 (temp_decl);
 
10919
                _vala_ccode_node_unref0 (cvar);
 
10920
                _vala_ccode_node_unref0 (ccomma);
 
10921
                _vala_ccode_node_unref0 (clbe);
 
10922
        }
10254
10923
        if (vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_PLUS) {
10255
10924
                op = VALA_CCODE_BINARY_OPERATOR_PLUS;
10256
10925
        } else {
10264
10933
                                        op = VALA_CCODE_BINARY_OPERATOR_DIV;
10265
10934
                                } else {
10266
10935
                                        if (vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_MOD) {
10267
 
                                                op = VALA_CCODE_BINARY_OPERATOR_MOD;
 
10936
                                                if (vala_data_type_equals (vala_expression_get_value_type ((ValaExpression*) expr), self->double_type)) {
 
10937
                                                        ValaCCodeIdentifier* _tmp5_;
 
10938
                                                        ValaCCodeFunctionCall* _tmp6_;
 
10939
                                                        ValaCCodeFunctionCall* ccall;
 
10940
                                                        vala_ccode_declaration_space_add_include (self->source_declarations, "math.h", FALSE);
 
10941
                                                        ccall = (_tmp6_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp5_ = vala_ccode_identifier_new ("fmod"))), _vala_ccode_node_unref0 (_tmp5_), _tmp6_);
 
10942
                                                        vala_ccode_function_call_add_argument (ccall, cleft);
 
10943
                                                        vala_ccode_function_call_add_argument (ccall, cright);
 
10944
                                                        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) ccall);
 
10945
                                                        _vala_ccode_node_unref0 (ccall);
 
10946
                                                        _vala_ccode_node_unref0 (cleft);
 
10947
                                                        _vala_ccode_node_unref0 (cright);
 
10948
                                                        _vala_ccode_node_unref0 (left_chain);
 
10949
                                                        return;
 
10950
                                                } else {
 
10951
                                                        if (vala_data_type_equals (vala_expression_get_value_type ((ValaExpression*) expr), self->float_type)) {
 
10952
                                                                ValaCCodeIdentifier* _tmp7_;
 
10953
                                                                ValaCCodeFunctionCall* _tmp8_;
 
10954
                                                                ValaCCodeFunctionCall* ccall;
 
10955
                                                                vala_ccode_declaration_space_add_include (self->source_declarations, "math.h", FALSE);
 
10956
                                                                ccall = (_tmp8_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp7_ = vala_ccode_identifier_new ("fmodf"))), _vala_ccode_node_unref0 (_tmp7_), _tmp8_);
 
10957
                                                                vala_ccode_function_call_add_argument (ccall, cleft);
 
10958
                                                                vala_ccode_function_call_add_argument (ccall, cright);
 
10959
                                                                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) ccall);
 
10960
                                                                _vala_ccode_node_unref0 (ccall);
 
10961
                                                                _vala_ccode_node_unref0 (cleft);
 
10962
                                                                _vala_ccode_node_unref0 (cright);
 
10963
                                                                _vala_ccode_node_unref0 (left_chain);
 
10964
                                                                return;
 
10965
                                                        } else {
 
10966
                                                                op = VALA_CCODE_BINARY_OPERATOR_MOD;
 
10967
                                                        }
 
10968
                                                }
10268
10969
                                        } else {
10269
10970
                                                if (vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_SHIFT_LEFT) {
10270
10971
                                                        op = VALA_CCODE_BINARY_OPERATOR_SHIFT_LEFT;
10306
11007
                                                                                                                                                        op = VALA_CCODE_BINARY_OPERATOR_OR;
10307
11008
                                                                                                                                                } else {
10308
11009
                                                                                                                                                        if (vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_IN) {
10309
 
                                                                                                                                                                ValaCCodeBinaryExpression* _tmp1_;
10310
 
                                                                                                                                                                ValaCCodeBinaryExpression* _tmp0_;
10311
 
                                                                                                                                                                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp1_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) (_tmp0_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_BITWISE_AND, cright, cleft)), cleft)));
10312
 
                                                                                                                                                                _vala_ccode_node_unref0 (_tmp1_);
10313
 
                                                                                                                                                                _vala_ccode_node_unref0 (_tmp0_);
 
11010
                                                                                                                                                                if (VALA_IS_ARRAY_TYPE (vala_expression_get_value_type (vala_binary_expression_get_right (expr)))) {
 
11011
                                                                                                                                                                        ValaArrayType* array_type;
 
11012
                                                                                                                                                                        ValaCCodeIdentifier* _tmp10_;
 
11013
                                                                                                                                                                        char* _tmp9_;
 
11014
                                                                                                                                                                        ValaCCodeFunctionCall* _tmp11_;
 
11015
                                                                                                                                                                        ValaCCodeFunctionCall* node;
 
11016
                                                                                                                                                                        ValaCCodeExpression* _tmp12_;
 
11017
                                                                                                                                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_expression_get_value_type (vala_binary_expression_get_right (expr))));
 
11018
                                                                                                                                                                        node = (_tmp11_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp10_ = vala_ccode_identifier_new (_tmp9_ = vala_ccode_base_module_generate_array_contains_wrapper (self, array_type)))), _vala_ccode_node_unref0 (_tmp10_), _g_free0 (_tmp9_), _tmp11_);
 
11019
                                                                                                                                                                        vala_ccode_function_call_add_argument (node, cright);
 
11020
                                                                                                                                                                        vala_ccode_function_call_add_argument (node, _tmp12_ = vala_ccode_module_get_array_length_cexpression ((ValaCCodeModule*) self, vala_binary_expression_get_right (expr), -1));
 
11021
                                                                                                                                                                        _vala_ccode_node_unref0 (_tmp12_);
 
11022
                                                                                                                                                                        if (VALA_IS_STRUCT_VALUE_TYPE (vala_array_type_get_element_type (array_type))) {
 
11023
                                                                                                                                                                                ValaCCodeUnaryExpression* _tmp13_;
 
11024
                                                                                                                                                                                vala_ccode_function_call_add_argument (node, (ValaCCodeExpression*) (_tmp13_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cleft)));
 
11025
                                                                                                                                                                                _vala_ccode_node_unref0 (_tmp13_);
 
11026
                                                                                                                                                                        } else {
 
11027
                                                                                                                                                                                vala_ccode_function_call_add_argument (node, cleft);
 
11028
                                                                                                                                                                        }
 
11029
                                                                                                                                                                        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) node);
 
11030
                                                                                                                                                                        _vala_code_node_unref0 (array_type);
 
11031
                                                                                                                                                                        _vala_ccode_node_unref0 (node);
 
11032
                                                                                                                                                                } else {
 
11033
                                                                                                                                                                        ValaCCodeBinaryExpression* _tmp15_;
 
11034
                                                                                                                                                                        ValaCCodeBinaryExpression* _tmp14_;
 
11035
                                                                                                                                                                        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp15_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) (_tmp14_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_BITWISE_AND, cright, cleft)), cleft)));
 
11036
                                                                                                                                                                        _vala_ccode_node_unref0 (_tmp15_);
 
11037
                                                                                                                                                                        _vala_ccode_node_unref0 (_tmp14_);
 
11038
                                                                                                                                                                }
10314
11039
                                                                                                                                                                _vala_ccode_node_unref0 (cleft);
10315
11040
                                                                                                                                                                _vala_ccode_node_unref0 (cright);
 
11041
                                                                                                                                                                _vala_ccode_node_unref0 (left_chain);
10316
11042
                                                                                                                                                                return;
10317
11043
                                                                                                                                                        } else {
10318
11044
                                                                                                                                                                g_assert_not_reached ();
10336
11062
                }
10337
11063
        }
10338
11064
        if (vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_EQUALITY) {
10339
 
                _tmp2_ = TRUE;
 
11065
                _tmp16_ = TRUE;
10340
11066
        } else {
10341
 
                _tmp2_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_INEQUALITY;
 
11067
                _tmp16_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_INEQUALITY;
10342
11068
        }
10343
 
        if (_tmp2_) {
 
11069
        if (_tmp16_) {
10344
11070
                ValaDataType* left_type;
10345
11071
                ValaDataType* right_type;
10346
 
                gboolean _tmp3_ = FALSE;
 
11072
                gboolean _tmp17_ = FALSE;
10347
11073
                left_type = _vala_code_node_ref0 (vala_expression_get_target_type (vala_binary_expression_get_left (expr)));
10348
11074
                right_type = _vala_code_node_ref0 (vala_expression_get_target_type (vala_binary_expression_get_right (expr)));
10349
11075
                vala_ccode_base_module_make_comparable_cexpression (self, &left_type, &cleft, &right_type, &cright);
10350
11076
                if (VALA_IS_STRUCT_VALUE_TYPE (left_type)) {
10351
 
                        _tmp3_ = VALA_IS_STRUCT_VALUE_TYPE (right_type);
 
11077
                        _tmp17_ = VALA_IS_STRUCT_VALUE_TYPE (right_type);
10352
11078
                } else {
10353
 
                        _tmp3_ = FALSE;
 
11079
                        _tmp17_ = FALSE;
10354
11080
                }
10355
 
                if (_tmp3_) {
10356
 
                        ValaStruct* _tmp4_;
 
11081
                if (_tmp17_) {
 
11082
                        ValaStruct* _tmp18_;
10357
11083
                        char* equalfunc;
10358
 
                        ValaCCodeIdentifier* _tmp5_;
10359
 
                        ValaCCodeFunctionCall* _tmp6_;
 
11084
                        ValaCCodeIdentifier* _tmp19_;
 
11085
                        ValaCCodeFunctionCall* _tmp20_;
10360
11086
                        ValaCCodeFunctionCall* ccall;
10361
 
                        ValaCCodeExpression* _tmp7_;
10362
 
                        ValaCCodeExpression* _tmp8_;
10363
 
                        equalfunc = vala_ccode_base_module_generate_struct_equal_function (self, (_tmp4_ = VALA_STRUCT (vala_data_type_get_data_type (left_type)), VALA_IS_STRUCT (_tmp4_) ? ((ValaStruct*) _tmp4_) : NULL));
10364
 
                        ccall = (_tmp6_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp5_ = vala_ccode_identifier_new (equalfunc))), _vala_ccode_node_unref0 (_tmp5_), _tmp6_);
 
11087
                        ValaCCodeExpression* _tmp21_;
 
11088
                        ValaCCodeExpression* _tmp22_;
 
11089
                        equalfunc = vala_ccode_base_module_generate_struct_equal_function (self, (_tmp18_ = VALA_STRUCT (vala_data_type_get_data_type (left_type)), VALA_IS_STRUCT (_tmp18_) ? ((ValaStruct*) _tmp18_) : NULL));
 
11090
                        ccall = (_tmp20_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp19_ = vala_ccode_identifier_new (equalfunc))), _vala_ccode_node_unref0 (_tmp19_), _tmp20_);
10365
11091
                        vala_ccode_function_call_add_argument (ccall, cleft);
10366
11092
                        vala_ccode_function_call_add_argument (ccall, cright);
10367
 
                        cleft = (_tmp7_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccall), _vala_ccode_node_unref0 (cleft), _tmp7_);
10368
 
                        cright = (_tmp8_ = (ValaCCodeExpression*) vala_ccode_constant_new ("TRUE"), _vala_ccode_node_unref0 (cright), _tmp8_);
 
11093
                        cleft = (_tmp21_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccall), _vala_ccode_node_unref0 (cleft), _tmp21_);
 
11094
                        cright = (_tmp22_ = (ValaCCodeExpression*) vala_ccode_constant_new ("TRUE"), _vala_ccode_node_unref0 (cright), _tmp22_);
10369
11095
                        _g_free0 (equalfunc);
10370
11096
                        _vala_ccode_node_unref0 (ccall);
10371
11097
                } else {
10372
 
                        gboolean _tmp9_ = FALSE;
10373
 
                        gboolean _tmp10_ = FALSE;
10374
 
                        gboolean _tmp11_ = FALSE;
10375
 
                        gboolean _tmp12_ = FALSE;
10376
 
                        gboolean _tmp13_ = FALSE;
 
11098
                        gboolean _tmp23_ = FALSE;
 
11099
                        gboolean _tmp24_ = FALSE;
 
11100
                        gboolean _tmp25_ = FALSE;
 
11101
                        gboolean _tmp26_ = FALSE;
 
11102
                        gboolean _tmp27_ = FALSE;
10377
11103
                        if (VALA_IS_INTEGER_TYPE (left_type)) {
10378
 
                                _tmp13_ = TRUE;
10379
 
                        } else {
10380
 
                                _tmp13_ = VALA_IS_FLOATING_TYPE (left_type);
10381
 
                        }
10382
 
                        if (_tmp13_) {
10383
 
                                _tmp12_ = TRUE;
10384
 
                        } else {
10385
 
                                _tmp12_ = VALA_IS_BOOLEAN_TYPE (left_type);
10386
 
                        }
10387
 
                        if (_tmp12_) {
10388
 
                                _tmp11_ = vala_data_type_get_nullable (left_type);
10389
 
                        } else {
10390
 
                                _tmp11_ = FALSE;
10391
 
                        }
10392
 
                        if (_tmp11_) {
10393
 
                                gboolean _tmp14_ = FALSE;
10394
 
                                gboolean _tmp15_ = FALSE;
 
11104
                                _tmp27_ = TRUE;
 
11105
                        } else {
 
11106
                                _tmp27_ = VALA_IS_FLOATING_TYPE (left_type);
 
11107
                        }
 
11108
                        if (_tmp27_) {
 
11109
                                _tmp26_ = TRUE;
 
11110
                        } else {
 
11111
                                _tmp26_ = VALA_IS_BOOLEAN_TYPE (left_type);
 
11112
                        }
 
11113
                        if (_tmp26_) {
 
11114
                                _tmp25_ = vala_data_type_get_nullable (left_type);
 
11115
                        } else {
 
11116
                                _tmp25_ = FALSE;
 
11117
                        }
 
11118
                        if (_tmp25_) {
 
11119
                                gboolean _tmp28_ = FALSE;
 
11120
                                gboolean _tmp29_ = FALSE;
10395
11121
                                if (VALA_IS_INTEGER_TYPE (right_type)) {
10396
 
                                        _tmp15_ = TRUE;
10397
 
                                } else {
10398
 
                                        _tmp15_ = VALA_IS_FLOATING_TYPE (right_type);
10399
 
                                }
10400
 
                                if (_tmp15_) {
10401
 
                                        _tmp14_ = TRUE;
10402
 
                                } else {
10403
 
                                        _tmp14_ = VALA_IS_BOOLEAN_TYPE (right_type);
10404
 
                                }
10405
 
                                _tmp10_ = _tmp14_;
10406
 
                        } else {
10407
 
                                _tmp10_ = FALSE;
10408
 
                        }
10409
 
                        if (_tmp10_) {
10410
 
                                _tmp9_ = vala_data_type_get_nullable (right_type);
10411
 
                        } else {
10412
 
                                _tmp9_ = FALSE;
10413
 
                        }
10414
 
                        if (_tmp9_) {
10415
 
                                ValaStruct* _tmp16_;
 
11122
                                        _tmp29_ = TRUE;
 
11123
                                } else {
 
11124
                                        _tmp29_ = VALA_IS_FLOATING_TYPE (right_type);
 
11125
                                }
 
11126
                                if (_tmp29_) {
 
11127
                                        _tmp28_ = TRUE;
 
11128
                                } else {
 
11129
                                        _tmp28_ = VALA_IS_BOOLEAN_TYPE (right_type);
 
11130
                                }
 
11131
                                _tmp24_ = _tmp28_;
 
11132
                        } else {
 
11133
                                _tmp24_ = FALSE;
 
11134
                        }
 
11135
                        if (_tmp24_) {
 
11136
                                _tmp23_ = vala_data_type_get_nullable (right_type);
 
11137
                        } else {
 
11138
                                _tmp23_ = FALSE;
 
11139
                        }
 
11140
                        if (_tmp23_) {
 
11141
                                ValaStruct* _tmp30_;
10416
11142
                                char* equalfunc;
10417
 
                                ValaCCodeIdentifier* _tmp17_;
10418
 
                                ValaCCodeFunctionCall* _tmp18_;
 
11143
                                ValaCCodeIdentifier* _tmp31_;
 
11144
                                ValaCCodeFunctionCall* _tmp32_;
10419
11145
                                ValaCCodeFunctionCall* ccall;
10420
 
                                ValaCCodeExpression* _tmp19_;
10421
 
                                ValaCCodeExpression* _tmp20_;
10422
 
                                equalfunc = vala_ccode_base_module_generate_numeric_equal_function (self, (_tmp16_ = VALA_STRUCT (vala_data_type_get_data_type (left_type)), VALA_IS_STRUCT (_tmp16_) ? ((ValaStruct*) _tmp16_) : NULL));
10423
 
                                ccall = (_tmp18_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp17_ = vala_ccode_identifier_new (equalfunc))), _vala_ccode_node_unref0 (_tmp17_), _tmp18_);
 
11146
                                ValaCCodeExpression* _tmp33_;
 
11147
                                ValaCCodeExpression* _tmp34_;
 
11148
                                equalfunc = vala_ccode_base_module_generate_numeric_equal_function (self, (_tmp30_ = VALA_STRUCT (vala_data_type_get_data_type (left_type)), VALA_IS_STRUCT (_tmp30_) ? ((ValaStruct*) _tmp30_) : NULL));
 
11149
                                ccall = (_tmp32_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp31_ = vala_ccode_identifier_new (equalfunc))), _vala_ccode_node_unref0 (_tmp31_), _tmp32_);
10424
11150
                                vala_ccode_function_call_add_argument (ccall, cleft);
10425
11151
                                vala_ccode_function_call_add_argument (ccall, cright);
10426
 
                                cleft = (_tmp19_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccall), _vala_ccode_node_unref0 (cleft), _tmp19_);
10427
 
                                cright = (_tmp20_ = (ValaCCodeExpression*) vala_ccode_constant_new ("TRUE"), _vala_ccode_node_unref0 (cright), _tmp20_);
 
11152
                                cleft = (_tmp33_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccall), _vala_ccode_node_unref0 (cleft), _tmp33_);
 
11153
                                cright = (_tmp34_ = (ValaCCodeExpression*) vala_ccode_constant_new ("TRUE"), _vala_ccode_node_unref0 (cright), _tmp34_);
10428
11154
                                _g_free0 (equalfunc);
10429
11155
                                _vala_ccode_node_unref0 (ccall);
10430
11156
                        }
10433
11159
                _vala_code_node_unref0 (right_type);
10434
11160
        }
10435
11161
        if (!VALA_IS_NULL_TYPE (vala_expression_get_value_type (vala_binary_expression_get_left (expr)))) {
10436
 
                _tmp23_ = vala_data_type_compatible (vala_expression_get_value_type (vala_binary_expression_get_left (expr)), self->string_type);
10437
 
        } else {
10438
 
                _tmp23_ = FALSE;
10439
 
        }
10440
 
        if (_tmp23_) {
10441
 
                _tmp22_ = !VALA_IS_NULL_TYPE (vala_expression_get_value_type (vala_binary_expression_get_right (expr)));
10442
 
        } else {
10443
 
                _tmp22_ = FALSE;
10444
 
        }
10445
 
        if (_tmp22_) {
10446
 
                _tmp21_ = vala_data_type_compatible (vala_expression_get_value_type (vala_binary_expression_get_right (expr)), self->string_type);
10447
 
        } else {
10448
 
                _tmp21_ = FALSE;
10449
 
        }
10450
 
        if (_tmp21_) {
 
11162
                _tmp37_ = vala_data_type_compatible (vala_expression_get_value_type (vala_binary_expression_get_left (expr)), self->string_type);
 
11163
        } else {
 
11164
                _tmp37_ = FALSE;
 
11165
        }
 
11166
        if (_tmp37_) {
 
11167
                _tmp36_ = !VALA_IS_NULL_TYPE (vala_expression_get_value_type (vala_binary_expression_get_right (expr)));
 
11168
        } else {
 
11169
                _tmp36_ = FALSE;
 
11170
        }
 
11171
        if (_tmp36_) {
 
11172
                _tmp35_ = vala_data_type_compatible (vala_expression_get_value_type (vala_binary_expression_get_right (expr)), self->string_type);
 
11173
        } else {
 
11174
                _tmp35_ = FALSE;
 
11175
        }
 
11176
        if (_tmp35_) {
10451
11177
                if (vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_PLUS) {
10452
 
                        gboolean _tmp24_ = FALSE;
 
11178
                        gboolean _tmp38_ = FALSE;
10453
11179
                        if (vala_expression_is_constant (vala_binary_expression_get_left (expr))) {
10454
 
                                _tmp24_ = vala_expression_is_constant (vala_binary_expression_get_right (expr));
 
11180
                                _tmp38_ = vala_expression_is_constant (vala_binary_expression_get_right (expr));
10455
11181
                        } else {
10456
 
                                _tmp24_ = FALSE;
 
11182
                                _tmp38_ = FALSE;
10457
11183
                        }
10458
 
                        if (_tmp24_) {
 
11184
                        if (_tmp38_) {
10459
11185
                                char* left;
10460
11186
                                char* right;
10461
 
                                ValaCCodeConstant* _tmp30_;
10462
 
                                char* _tmp29_;
 
11187
                                ValaCCodeConstant* _tmp44_;
 
11188
                                char* _tmp43_;
10463
11189
                                left = NULL;
10464
11190
                                right = NULL;
10465
11191
                                if (VALA_IS_CCODE_IDENTIFIER (cleft)) {
10466
 
                                        char* _tmp25_;
10467
 
                                        left = (_tmp25_ = g_strdup (vala_ccode_identifier_get_name (VALA_CCODE_IDENTIFIER (cleft))), _g_free0 (left), _tmp25_);
 
11192
                                        char* _tmp39_;
 
11193
                                        left = (_tmp39_ = g_strdup (vala_ccode_identifier_get_name (VALA_CCODE_IDENTIFIER (cleft))), _g_free0 (left), _tmp39_);
10468
11194
                                } else {
10469
11195
                                        if (VALA_IS_CCODE_CONSTANT (cleft)) {
10470
 
                                                char* _tmp26_;
10471
 
                                                left = (_tmp26_ = g_strdup (vala_ccode_constant_get_name (VALA_CCODE_CONSTANT (cleft))), _g_free0 (left), _tmp26_);
 
11196
                                                char* _tmp40_;
 
11197
                                                left = (_tmp40_ = g_strdup (vala_ccode_constant_get_name (VALA_CCODE_CONSTANT (cleft))), _g_free0 (left), _tmp40_);
10472
11198
                                        } else {
10473
11199
                                                g_assert_not_reached ();
10474
11200
                                        }
10475
11201
                                }
10476
11202
                                if (VALA_IS_CCODE_IDENTIFIER (cright)) {
10477
 
                                        char* _tmp27_;
10478
 
                                        right = (_tmp27_ = g_strdup (vala_ccode_identifier_get_name (VALA_CCODE_IDENTIFIER (cright))), _g_free0 (right), _tmp27_);
 
11203
                                        char* _tmp41_;
 
11204
                                        right = (_tmp41_ = g_strdup (vala_ccode_identifier_get_name (VALA_CCODE_IDENTIFIER (cright))), _g_free0 (right), _tmp41_);
10479
11205
                                } else {
10480
11206
                                        if (VALA_IS_CCODE_CONSTANT (cright)) {
10481
 
                                                char* _tmp28_;
10482
 
                                                right = (_tmp28_ = g_strdup (vala_ccode_constant_get_name (VALA_CCODE_CONSTANT (cright))), _g_free0 (right), _tmp28_);
 
11207
                                                char* _tmp42_;
 
11208
                                                right = (_tmp42_ = g_strdup (vala_ccode_constant_get_name (VALA_CCODE_CONSTANT (cright))), _g_free0 (right), _tmp42_);
10483
11209
                                        } else {
10484
11210
                                                g_assert_not_reached ();
10485
11211
                                        }
10486
11212
                                }
10487
 
                                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp30_ = vala_ccode_constant_new (_tmp29_ = g_strdup_printf ("%s %s", left, right))));
10488
 
                                _vala_ccode_node_unref0 (_tmp30_);
10489
 
                                _g_free0 (_tmp29_);
 
11213
                                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp44_ = vala_ccode_constant_new (_tmp43_ = g_strdup_printf ("%s %s", left, right))));
 
11214
                                _vala_ccode_node_unref0 (_tmp44_);
 
11215
                                _g_free0 (_tmp43_);
10490
11216
                                _g_free0 (left);
10491
11217
                                _g_free0 (right);
10492
11218
                                _vala_ccode_node_unref0 (cleft);
10493
11219
                                _vala_ccode_node_unref0 (cright);
 
11220
                                _vala_ccode_node_unref0 (left_chain);
10494
11221
                                return;
10495
11222
                        } else {
10496
11223
                                if (vala_code_context_get_profile (self->priv->_context) == VALA_PROFILE_POSIX) {
10497
 
                                        ValaCCodeIdentifier* _tmp31_;
10498
 
                                        ValaCCodeFunctionCall* _tmp32_;
 
11224
                                        ValaCCodeIdentifier* _tmp45_;
 
11225
                                        ValaCCodeFunctionCall* _tmp46_;
10499
11226
                                        ValaCCodeFunctionCall* strcat;
10500
 
                                        ValaCCodeIdentifier* _tmp33_;
10501
 
                                        ValaCCodeFunctionCall* _tmp34_;
 
11227
                                        ValaCCodeIdentifier* _tmp47_;
 
11228
                                        ValaCCodeFunctionCall* _tmp48_;
10502
11229
                                        ValaCCodeFunctionCall* strcpy;
10503
 
                                        ValaCCodeIdentifier* _tmp35_;
10504
 
                                        ValaCCodeFunctionCall* _tmp36_;
 
11230
                                        ValaCCodeIdentifier* _tmp49_;
 
11231
                                        ValaCCodeFunctionCall* _tmp50_;
10505
11232
                                        ValaCCodeFunctionCall* malloc;
10506
 
                                        ValaCCodeIdentifier* _tmp37_;
10507
 
                                        ValaCCodeFunctionCall* _tmp38_;
 
11233
                                        ValaCCodeIdentifier* _tmp51_;
 
11234
                                        ValaCCodeFunctionCall* _tmp52_;
10508
11235
                                        ValaCCodeFunctionCall* strlen_a;
10509
 
                                        ValaCCodeIdentifier* _tmp39_;
10510
 
                                        ValaCCodeFunctionCall* _tmp40_;
 
11236
                                        ValaCCodeIdentifier* _tmp53_;
 
11237
                                        ValaCCodeFunctionCall* _tmp54_;
10511
11238
                                        ValaCCodeFunctionCall* strlen_b;
10512
 
                                        ValaCCodeBinaryExpression* _tmp42_;
10513
 
                                        ValaCCodeIdentifier* _tmp41_;
10514
 
                                        ValaCCodeBinaryExpression* _tmp43_;
 
11239
                                        ValaCCodeBinaryExpression* _tmp56_;
 
11240
                                        ValaCCodeIdentifier* _tmp55_;
 
11241
                                        ValaCCodeBinaryExpression* _tmp57_;
10515
11242
                                        ValaCCodeBinaryExpression* newlength;
10516
 
                                        strcat = (_tmp32_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp31_ = vala_ccode_identifier_new ("strcat"))), _vala_ccode_node_unref0 (_tmp31_), _tmp32_);
10517
 
                                        strcpy = (_tmp34_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp33_ = vala_ccode_identifier_new ("strcpy"))), _vala_ccode_node_unref0 (_tmp33_), _tmp34_);
10518
 
                                        malloc = (_tmp36_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp35_ = vala_ccode_identifier_new ("malloc"))), _vala_ccode_node_unref0 (_tmp35_), _tmp36_);
10519
 
                                        strlen_a = (_tmp38_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp37_ = vala_ccode_identifier_new ("strlen"))), _vala_ccode_node_unref0 (_tmp37_), _tmp38_);
 
11243
                                        strcat = (_tmp46_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp45_ = vala_ccode_identifier_new ("strcat"))), _vala_ccode_node_unref0 (_tmp45_), _tmp46_);
 
11244
                                        strcpy = (_tmp48_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp47_ = vala_ccode_identifier_new ("strcpy"))), _vala_ccode_node_unref0 (_tmp47_), _tmp48_);
 
11245
                                        malloc = (_tmp50_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp49_ = vala_ccode_identifier_new ("malloc"))), _vala_ccode_node_unref0 (_tmp49_), _tmp50_);
 
11246
                                        strlen_a = (_tmp52_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp51_ = vala_ccode_identifier_new ("strlen"))), _vala_ccode_node_unref0 (_tmp51_), _tmp52_);
10520
11247
                                        vala_ccode_function_call_add_argument (strlen_a, cleft);
10521
 
                                        strlen_b = (_tmp40_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp39_ = vala_ccode_identifier_new ("strlen"))), _vala_ccode_node_unref0 (_tmp39_), _tmp40_);
 
11248
                                        strlen_b = (_tmp54_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp53_ = vala_ccode_identifier_new ("strlen"))), _vala_ccode_node_unref0 (_tmp53_), _tmp54_);
10522
11249
                                        vala_ccode_function_call_add_argument (strlen_b, cright);
10523
 
                                        newlength = (_tmp43_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) (_tmp41_ = vala_ccode_identifier_new ("1")), (ValaCCodeExpression*) (_tmp42_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) strlen_a, (ValaCCodeExpression*) strlen_b))), _vala_ccode_node_unref0 (_tmp42_), _vala_ccode_node_unref0 (_tmp41_), _tmp43_);
 
11250
                                        newlength = (_tmp57_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) (_tmp55_ = vala_ccode_identifier_new ("1")), (ValaCCodeExpression*) (_tmp56_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) strlen_a, (ValaCCodeExpression*) strlen_b))), _vala_ccode_node_unref0 (_tmp56_), _vala_ccode_node_unref0 (_tmp55_), _tmp57_);
10524
11251
                                        vala_ccode_function_call_add_argument (malloc, (ValaCCodeExpression*) newlength);
10525
11252
                                        vala_ccode_function_call_add_argument (strcpy, (ValaCCodeExpression*) malloc);
10526
11253
                                        vala_ccode_function_call_add_argument (strcpy, cleft);
10534
11261
                                        _vala_ccode_node_unref0 (strlen_b);
10535
11262
                                        _vala_ccode_node_unref0 (newlength);
10536
11263
                                } else {
10537
 
                                        ValaCCodeIdentifier* _tmp44_;
10538
 
                                        ValaCCodeFunctionCall* _tmp45_;
 
11264
                                        ValaCCodeIdentifier* _tmp58_;
 
11265
                                        ValaCCodeFunctionCall* _tmp59_;
10539
11266
                                        ValaCCodeFunctionCall* ccall;
10540
 
                                        ValaCCodeConstant* _tmp46_;
10541
 
                                        ccall = (_tmp45_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp44_ = vala_ccode_identifier_new ("g_strconcat"))), _vala_ccode_node_unref0 (_tmp44_), _tmp45_);
 
11267
                                        ValaCCodeConstant* _tmp60_;
 
11268
                                        ccall = (_tmp59_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp58_ = vala_ccode_identifier_new ("g_strconcat"))), _vala_ccode_node_unref0 (_tmp58_), _tmp59_);
10542
11269
                                        vala_ccode_function_call_add_argument (ccall, cleft);
10543
11270
                                        vala_ccode_function_call_add_argument (ccall, cright);
10544
 
                                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp46_ = vala_ccode_constant_new ("NULL")));
10545
 
                                        _vala_ccode_node_unref0 (_tmp46_);
 
11271
                                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp60_ = vala_ccode_constant_new ("NULL")));
 
11272
                                        _vala_ccode_node_unref0 (_tmp60_);
10546
11273
                                        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) ccall);
10547
11274
                                        _vala_ccode_node_unref0 (ccall);
10548
11275
                                }
10549
11276
                                _vala_ccode_node_unref0 (cleft);
10550
11277
                                _vala_ccode_node_unref0 (cright);
 
11278
                                _vala_ccode_node_unref0 (left_chain);
10551
11279
                                return;
10552
11280
                        }
10553
11281
                } else {
10554
 
                        gboolean _tmp47_ = FALSE;
10555
 
                        gboolean _tmp48_ = FALSE;
10556
 
                        gboolean _tmp49_ = FALSE;
10557
 
                        gboolean _tmp50_ = FALSE;
10558
 
                        gboolean _tmp51_ = FALSE;
 
11282
                        gboolean _tmp61_ = FALSE;
 
11283
                        gboolean _tmp62_ = FALSE;
 
11284
                        gboolean _tmp63_ = FALSE;
 
11285
                        gboolean _tmp64_ = FALSE;
 
11286
                        gboolean _tmp65_ = FALSE;
10559
11287
                        if (vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_EQUALITY) {
10560
 
                                _tmp51_ = TRUE;
10561
 
                        } else {
10562
 
                                _tmp51_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_INEQUALITY;
10563
 
                        }
10564
 
                        if (_tmp51_) {
10565
 
                                _tmp50_ = TRUE;
10566
 
                        } else {
10567
 
                                _tmp50_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_LESS_THAN;
10568
 
                        }
10569
 
                        if (_tmp50_) {
10570
 
                                _tmp49_ = TRUE;
10571
 
                        } else {
10572
 
                                _tmp49_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_GREATER_THAN;
10573
 
                        }
10574
 
                        if (_tmp49_) {
10575
 
                                _tmp48_ = TRUE;
10576
 
                        } else {
10577
 
                                _tmp48_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_LESS_THAN_OR_EQUAL;
10578
 
                        }
10579
 
                        if (_tmp48_) {
10580
 
                                _tmp47_ = TRUE;
10581
 
                        } else {
10582
 
                                _tmp47_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_GREATER_THAN_OR_EQUAL;
10583
 
                        }
10584
 
                        if (_tmp47_) {
10585
 
                                ValaCCodeIdentifier* _tmp52_;
10586
 
                                ValaCCodeFunctionCall* _tmp53_;
 
11288
                                _tmp65_ = TRUE;
 
11289
                        } else {
 
11290
                                _tmp65_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_INEQUALITY;
 
11291
                        }
 
11292
                        if (_tmp65_) {
 
11293
                                _tmp64_ = TRUE;
 
11294
                        } else {
 
11295
                                _tmp64_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_LESS_THAN;
 
11296
                        }
 
11297
                        if (_tmp64_) {
 
11298
                                _tmp63_ = TRUE;
 
11299
                        } else {
 
11300
                                _tmp63_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_GREATER_THAN;
 
11301
                        }
 
11302
                        if (_tmp63_) {
 
11303
                                _tmp62_ = TRUE;
 
11304
                        } else {
 
11305
                                _tmp62_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_LESS_THAN_OR_EQUAL;
 
11306
                        }
 
11307
                        if (_tmp62_) {
 
11308
                                _tmp61_ = TRUE;
 
11309
                        } else {
 
11310
                                _tmp61_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_GREATER_THAN_OR_EQUAL;
 
11311
                        }
 
11312
                        if (_tmp61_) {
 
11313
                                ValaCCodeIdentifier* _tmp66_;
 
11314
                                ValaCCodeFunctionCall* _tmp67_;
10587
11315
                                ValaCCodeFunctionCall* ccall;
10588
 
                                ValaCCodeExpression* _tmp54_;
10589
 
                                ValaCCodeExpression* _tmp55_;
 
11316
                                ValaCCodeExpression* _tmp68_;
 
11317
                                ValaCCodeExpression* _tmp69_;
10590
11318
                                self->requires_strcmp0 = TRUE;
10591
 
                                ccall = (_tmp53_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp52_ = vala_ccode_identifier_new ("_vala_strcmp0"))), _vala_ccode_node_unref0 (_tmp52_), _tmp53_);
 
11319
                                ccall = (_tmp67_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp66_ = vala_ccode_identifier_new ("_vala_strcmp0"))), _vala_ccode_node_unref0 (_tmp66_), _tmp67_);
10592
11320
                                vala_ccode_function_call_add_argument (ccall, cleft);
10593
11321
                                vala_ccode_function_call_add_argument (ccall, cright);
10594
 
                                cleft = (_tmp54_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccall), _vala_ccode_node_unref0 (cleft), _tmp54_);
10595
 
                                cright = (_tmp55_ = (ValaCCodeExpression*) vala_ccode_constant_new ("0"), _vala_ccode_node_unref0 (cright), _tmp55_);
 
11322
                                cleft = (_tmp68_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccall), _vala_ccode_node_unref0 (cleft), _tmp68_);
 
11323
                                cright = (_tmp69_ = (ValaCCodeExpression*) vala_ccode_constant_new ("0"), _vala_ccode_node_unref0 (cright), _tmp69_);
10596
11324
                                _vala_ccode_node_unref0 (ccall);
10597
11325
                        }
10598
11326
                }
10599
11327
        }
10600
 
        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp56_ = vala_ccode_binary_expression_new (op, cleft, cright)));
10601
 
        _vala_ccode_node_unref0 (_tmp56_);
 
11328
        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp70_ = vala_ccode_binary_expression_new (op, cleft, cright)));
 
11329
        _vala_ccode_node_unref0 (_tmp70_);
 
11330
        if (left_chain != NULL) {
 
11331
                ValaCCodeBinaryExpression* _tmp71_;
 
11332
                vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp71_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_AND, left_chain, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr)))));
 
11333
                _vala_ccode_node_unref0 (_tmp71_);
 
11334
        }
10602
11335
        _vala_ccode_node_unref0 (cleft);
10603
11336
        _vala_ccode_node_unref0 (cright);
 
11337
        _vala_ccode_node_unref0 (left_chain);
10604
11338
}
10605
11339
 
10606
11340
 
10607
11341
char* vala_ccode_base_module_get_type_check_function (ValaCCodeBaseModule* self, ValaTypeSymbol* type) {
10608
 
        char* result;
 
11342
        char* result = NULL;
10609
11343
        ValaTypeSymbol* _tmp0_;
10610
11344
        ValaClass* cl;
10611
11345
        gboolean _tmp1_ = FALSE;
10661
11395
 
10662
11396
 
10663
11397
static ValaCCodeExpression* vala_ccode_base_module_create_type_check (ValaCCodeBaseModule* self, ValaCCodeNode* ccodenode, ValaDataType* type) {
10664
 
        ValaCCodeExpression* result;
 
11398
        ValaCCodeExpression* result = NULL;
10665
11399
        ValaDataType* _tmp0_;
10666
11400
        ValaErrorType* et;
10667
11401
        gboolean _tmp1_ = FALSE;
10736
11470
}
10737
11471
 
10738
11472
 
 
11473
static char* vala_ccode_base_module_generate_array_contains_wrapper (ValaCCodeBaseModule* self, ValaArrayType* array_type) {
 
11474
        char* result = NULL;
 
11475
        char* _tmp0_;
 
11476
        char* _tmp1_;
 
11477
        char* array_contains_func;
 
11478
        ValaCCodeFunction* function;
 
11479
        ValaCCodeFormalParameter* _tmp3_;
 
11480
        char* _tmp2_;
 
11481
        ValaCCodeFormalParameter* _tmp4_;
 
11482
        ValaCCodeBlock* block;
 
11483
        ValaCCodeDeclaration* idx_decl;
 
11484
        ValaCCodeVariableDeclarator* _tmp10_;
 
11485
        ValaCCodeIdentifier* _tmp12_;
 
11486
        ValaCCodeIdentifier* _tmp11_;
 
11487
        ValaCCodeElementAccess* _tmp13_;
 
11488
        ValaCCodeElementAccess* celement;
 
11489
        ValaCCodeIdentifier* cneedle;
 
11490
        ValaCCodeBinaryExpression* cif_condition;
 
11491
        ValaCCodeBlock* cif_found;
 
11492
        ValaCCodeReturnStatement* _tmp26_;
 
11493
        ValaCCodeConstant* _tmp25_;
 
11494
        ValaCCodeBlock* cloop_body;
 
11495
        ValaCCodeIfStatement* _tmp27_;
 
11496
        ValaCCodeIdentifier* _tmp29_;
 
11497
        ValaCCodeIdentifier* _tmp28_;
 
11498
        ValaCCodeBinaryExpression* _tmp30_;
 
11499
        ValaCCodeBinaryExpression* cloop_condition;
 
11500
        ValaCCodeForStatement* cloop;
 
11501
        ValaCCodeAssignment* _tmp33_;
 
11502
        ValaCCodeConstant* _tmp32_;
 
11503
        ValaCCodeIdentifier* _tmp31_;
 
11504
        ValaCCodeUnaryExpression* _tmp35_;
 
11505
        ValaCCodeIdentifier* _tmp34_;
 
11506
        ValaCCodeReturnStatement* _tmp37_;
 
11507
        ValaCCodeConstant* _tmp36_;
 
11508
        ValaCCodeFunction* _tmp38_;
 
11509
        g_return_val_if_fail (self != NULL, NULL);
 
11510
        g_return_val_if_fail (array_type != NULL, NULL);
 
11511
        array_contains_func = (_tmp1_ = g_strdup_printf ("_vala_%s_array_contains", _tmp0_ = vala_data_type_get_lower_case_cname (vala_array_type_get_element_type (array_type), NULL)), _g_free0 (_tmp0_), _tmp1_);
 
11512
        if (!vala_ccode_base_module_add_wrapper (self, array_contains_func)) {
 
11513
                result = array_contains_func;
 
11514
                return result;
 
11515
        }
 
11516
        function = vala_ccode_function_new (array_contains_func, "gboolean");
 
11517
        vala_ccode_function_set_modifiers (function, VALA_CCODE_MODIFIERS_STATIC);
 
11518
        vala_ccode_function_add_parameter (function, _tmp3_ = vala_ccode_formal_parameter_new ("stack", _tmp2_ = vala_data_type_get_cname ((ValaDataType*) array_type)));
 
11519
        _vala_ccode_node_unref0 (_tmp3_);
 
11520
        _g_free0 (_tmp2_);
 
11521
        vala_ccode_function_add_parameter (function, _tmp4_ = vala_ccode_formal_parameter_new ("stack_length", "int"));
 
11522
        _vala_ccode_node_unref0 (_tmp4_);
 
11523
        if (VALA_IS_STRUCT_VALUE_TYPE (vala_array_type_get_element_type (array_type))) {
 
11524
                ValaCCodeFormalParameter* _tmp7_;
 
11525
                char* _tmp6_;
 
11526
                char* _tmp5_;
 
11527
                vala_ccode_function_add_parameter (function, _tmp7_ = vala_ccode_formal_parameter_new ("needle", _tmp6_ = g_strconcat (_tmp5_ = vala_data_type_get_cname (vala_array_type_get_element_type (array_type)), "*", NULL)));
 
11528
                _vala_ccode_node_unref0 (_tmp7_);
 
11529
                _g_free0 (_tmp6_);
 
11530
                _g_free0 (_tmp5_);
 
11531
        } else {
 
11532
                ValaCCodeFormalParameter* _tmp9_;
 
11533
                char* _tmp8_;
 
11534
                vala_ccode_function_add_parameter (function, _tmp9_ = vala_ccode_formal_parameter_new ("needle", _tmp8_ = vala_data_type_get_cname (vala_array_type_get_element_type (array_type))));
 
11535
                _vala_ccode_node_unref0 (_tmp9_);
 
11536
                _g_free0 (_tmp8_);
 
11537
        }
 
11538
        block = vala_ccode_block_new ();
 
11539
        idx_decl = vala_ccode_declaration_new ("int");
 
11540
        vala_ccode_declaration_add_declarator (idx_decl, (ValaCCodeDeclarator*) (_tmp10_ = vala_ccode_variable_declarator_new ("i", NULL, NULL)));
 
11541
        _vala_ccode_node_unref0 (_tmp10_);
 
11542
        vala_ccode_block_add_statement (block, (ValaCCodeNode*) idx_decl);
 
11543
        celement = (_tmp13_ = vala_ccode_element_access_new ((ValaCCodeExpression*) (_tmp11_ = vala_ccode_identifier_new ("stack")), (ValaCCodeExpression*) (_tmp12_ = vala_ccode_identifier_new ("i"))), _vala_ccode_node_unref0 (_tmp12_), _vala_ccode_node_unref0 (_tmp11_), _tmp13_);
 
11544
        cneedle = vala_ccode_identifier_new ("needle");
 
11545
        cif_condition = NULL;
 
11546
        if (vala_data_type_compatible (vala_array_type_get_element_type (array_type), self->string_type)) {
 
11547
                ValaCCodeIdentifier* _tmp14_;
 
11548
                ValaCCodeFunctionCall* _tmp15_;
 
11549
                ValaCCodeFunctionCall* ccall;
 
11550
                ValaCCodeBinaryExpression* _tmp17_;
 
11551
                ValaCCodeConstant* _tmp16_;
 
11552
                self->requires_strcmp0 = TRUE;
 
11553
                ccall = (_tmp15_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp14_ = vala_ccode_identifier_new ("_vala_strcmp0"))), _vala_ccode_node_unref0 (_tmp14_), _tmp15_);
 
11554
                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) celement);
 
11555
                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) cneedle);
 
11556
                cif_condition = (_tmp17_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) ccall, (ValaCCodeExpression*) (_tmp16_ = vala_ccode_constant_new ("0"))), _vala_ccode_node_unref0 (cif_condition), _tmp17_);
 
11557
                _vala_ccode_node_unref0 (_tmp16_);
 
11558
                _vala_ccode_node_unref0 (ccall);
 
11559
        } else {
 
11560
                if (VALA_IS_STRUCT_VALUE_TYPE (vala_array_type_get_element_type (array_type))) {
 
11561
                        ValaStruct* _tmp18_;
 
11562
                        char* equalfunc;
 
11563
                        ValaCCodeIdentifier* _tmp19_;
 
11564
                        ValaCCodeFunctionCall* _tmp20_;
 
11565
                        ValaCCodeFunctionCall* ccall;
 
11566
                        ValaCCodeUnaryExpression* _tmp21_;
 
11567
                        ValaCCodeBinaryExpression* _tmp23_;
 
11568
                        ValaCCodeConstant* _tmp22_;
 
11569
                        equalfunc = vala_ccode_base_module_generate_struct_equal_function (self, (_tmp18_ = VALA_STRUCT (vala_data_type_get_data_type (vala_array_type_get_element_type (array_type))), VALA_IS_STRUCT (_tmp18_) ? ((ValaStruct*) _tmp18_) : NULL));
 
11570
                        ccall = (_tmp20_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp19_ = vala_ccode_identifier_new (equalfunc))), _vala_ccode_node_unref0 (_tmp19_), _tmp20_);
 
11571
                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp21_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) celement)));
 
11572
                        _vala_ccode_node_unref0 (_tmp21_);
 
11573
                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) cneedle);
 
11574
                        cif_condition = (_tmp23_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) ccall, (ValaCCodeExpression*) (_tmp22_ = vala_ccode_constant_new ("TRUE"))), _vala_ccode_node_unref0 (cif_condition), _tmp23_);
 
11575
                        _vala_ccode_node_unref0 (_tmp22_);
 
11576
                        _g_free0 (equalfunc);
 
11577
                        _vala_ccode_node_unref0 (ccall);
 
11578
                } else {
 
11579
                        ValaCCodeBinaryExpression* _tmp24_;
 
11580
                        cif_condition = (_tmp24_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) cneedle, (ValaCCodeExpression*) celement), _vala_ccode_node_unref0 (cif_condition), _tmp24_);
 
11581
                }
 
11582
        }
 
11583
        cif_found = vala_ccode_block_new ();
 
11584
        vala_ccode_block_add_statement (cif_found, (ValaCCodeNode*) (_tmp26_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp25_ = vala_ccode_constant_new ("TRUE")))));
 
11585
        _vala_ccode_node_unref0 (_tmp26_);
 
11586
        _vala_ccode_node_unref0 (_tmp25_);
 
11587
        cloop_body = vala_ccode_block_new ();
 
11588
        vala_ccode_block_add_statement (cloop_body, (ValaCCodeNode*) (_tmp27_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) cif_condition, (ValaCCodeStatement*) cif_found, NULL)));
 
11589
        _vala_ccode_node_unref0 (_tmp27_);
 
11590
        cloop_condition = (_tmp30_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) (_tmp28_ = vala_ccode_identifier_new ("i")), (ValaCCodeExpression*) (_tmp29_ = vala_ccode_identifier_new ("stack_length"))), _vala_ccode_node_unref0 (_tmp29_), _vala_ccode_node_unref0 (_tmp28_), _tmp30_);
 
11591
        cloop = vala_ccode_for_statement_new ((ValaCCodeExpression*) cloop_condition, (ValaCCodeStatement*) cloop_body);
 
11592
        vala_ccode_for_statement_add_initializer (cloop, (ValaCCodeExpression*) (_tmp33_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp31_ = vala_ccode_identifier_new ("i")), (ValaCCodeExpression*) (_tmp32_ = vala_ccode_constant_new ("0")), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
11593
        _vala_ccode_node_unref0 (_tmp33_);
 
11594
        _vala_ccode_node_unref0 (_tmp32_);
 
11595
        _vala_ccode_node_unref0 (_tmp31_);
 
11596
        vala_ccode_for_statement_add_iterator (cloop, (ValaCCodeExpression*) (_tmp35_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) (_tmp34_ = vala_ccode_identifier_new ("i")))));
 
11597
        _vala_ccode_node_unref0 (_tmp35_);
 
11598
        _vala_ccode_node_unref0 (_tmp34_);
 
11599
        vala_ccode_block_add_statement (block, (ValaCCodeNode*) cloop);
 
11600
        vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp37_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp36_ = vala_ccode_constant_new ("FALSE")))));
 
11601
        _vala_ccode_node_unref0 (_tmp37_);
 
11602
        _vala_ccode_node_unref0 (_tmp36_);
 
11603
        vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) (_tmp38_ = vala_ccode_function_copy (function)));
 
11604
        _vala_ccode_node_unref0 (_tmp38_);
 
11605
        vala_ccode_function_set_block (function, block);
 
11606
        vala_ccode_fragment_append (self->source_type_member_definition, (ValaCCodeNode*) function);
 
11607
        result = array_contains_func;
 
11608
        _vala_ccode_node_unref0 (function);
 
11609
        _vala_ccode_node_unref0 (block);
 
11610
        _vala_ccode_node_unref0 (idx_decl);
 
11611
        _vala_ccode_node_unref0 (celement);
 
11612
        _vala_ccode_node_unref0 (cneedle);
 
11613
        _vala_ccode_node_unref0 (cif_condition);
 
11614
        _vala_ccode_node_unref0 (cif_found);
 
11615
        _vala_ccode_node_unref0 (cloop_body);
 
11616
        _vala_ccode_node_unref0 (cloop_condition);
 
11617
        _vala_ccode_node_unref0 (cloop);
 
11618
        return result;
 
11619
}
 
11620
 
 
11621
 
10739
11622
static void vala_ccode_base_module_real_visit_type_check (ValaCCodeModule* base, ValaTypeCheck* expr) {
10740
11623
        ValaCCodeBaseModule * self;
10741
11624
        ValaCCodeExpression* _tmp0_;
10745
11628
        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp0_ = vala_ccode_base_module_create_type_check (self, vala_code_node_get_ccodenode ((ValaCodeNode*) vala_typecheck_get_expression (expr)), vala_typecheck_get_type_reference (expr))));
10746
11629
        _vala_ccode_node_unref0 (_tmp0_);
10747
11630
        if (VALA_IS_CCODE_INVALID_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr))) {
10748
 
                vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) expr), "type check expressions not supported for compact classes, structs, and enums");
 
11631
                vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) expr), "type check expressions not supported for compact classes, structs, and" \
 
11632
" enums");
10749
11633
        }
10750
11634
}
10751
11635
 
10782
11666
 
10783
11667
 
10784
11668
ValaCCodeExpression* vala_ccode_base_module_convert_from_generic_pointer (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr, ValaDataType* actual_type) {
10785
 
        ValaCCodeExpression* result;
 
11669
        ValaCCodeExpression* result = NULL;
10786
11670
        ValaCCodeExpression* _result_;
10787
11671
        gboolean _tmp0_ = FALSE;
10788
11672
        g_return_val_if_fail (self != NULL, NULL);
10828
11712
 
10829
11713
 
10830
11714
ValaCCodeExpression* vala_ccode_base_module_convert_to_generic_pointer (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr, ValaDataType* actual_type) {
10831
 
        ValaCCodeExpression* result;
 
11715
        ValaCCodeExpression* result = NULL;
10832
11716
        ValaCCodeExpression* _result_;
10833
11717
        g_return_val_if_fail (self != NULL, NULL);
10834
11718
        g_return_val_if_fail (cexpr != NULL, NULL);
10861
11745
 
10862
11746
 
10863
11747
ValaCCodeExpression* vala_ccode_base_module_transform_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr) {
10864
 
        ValaCCodeExpression* result;
 
11748
        ValaCCodeExpression* result = NULL;
10865
11749
        ValaCCodeExpression* cexpr;
10866
11750
        gboolean _tmp0_ = FALSE;
10867
11751
        gboolean _tmp9_ = FALSE;
10878
11762
        gboolean _tmp18_ = FALSE;
10879
11763
        gboolean gvalue_boxing;
10880
11764
        gboolean _tmp20_ = FALSE;
10881
 
        gboolean _tmp92_ = FALSE;
 
11765
        gboolean _tmp93_ = FALSE;
10882
11766
        g_return_val_if_fail (self != NULL, NULL);
10883
11767
        g_return_val_if_fail (source_cexpr != NULL, NULL);
10884
11768
        cexpr = _vala_ccode_node_ref0 (source_cexpr);
10983
11867
                gboolean _tmp21_ = FALSE;
10984
11868
                gboolean _tmp22_ = FALSE;
10985
11869
                gboolean _tmp23_ = FALSE;
10986
 
                gboolean _tmp24_ = FALSE;
10987
11870
                if (target_type == NULL) {
10988
 
                        _tmp24_ = TRUE;
10989
 
                } else {
10990
 
                        _tmp24_ = !vala_data_type_get_value_owned (target_type);
10991
 
                }
10992
 
                if (_tmp24_) {
10993
11871
                        _tmp23_ = TRUE;
10994
11872
                } else {
10995
 
                        _tmp23_ = boxing;
 
11873
                        _tmp23_ = !vala_data_type_get_value_owned (target_type);
10996
11874
                }
10997
11875
                if (_tmp23_) {
10998
11876
                        _tmp22_ = TRUE;
10999
11877
                } else {
11000
 
                        _tmp22_ = unboxing;
 
11878
                        _tmp22_ = boxing;
11001
11879
                }
11002
11880
                if (_tmp22_) {
11003
11881
                        _tmp21_ = TRUE;
11004
11882
                } else {
11005
 
                        _tmp21_ = gvalue_boxing;
 
11883
                        _tmp21_ = unboxing;
11006
11884
                }
11007
11885
                _tmp20_ = _tmp21_;
11008
11886
        } else {
11009
11887
                _tmp20_ = FALSE;
11010
11888
        }
11011
11889
        if (_tmp20_) {
11012
 
                ValaDataType* _tmp25_;
 
11890
                ValaDataType* _tmp24_;
11013
11891
                ValaPointerType* pointer_type;
11014
 
                gboolean _tmp26_ = FALSE;
11015
 
                pointer_type = _vala_code_node_ref0 ((_tmp25_ = target_type, VALA_IS_POINTER_TYPE (_tmp25_) ? ((ValaPointerType*) _tmp25_) : NULL));
 
11892
                gboolean _tmp25_ = FALSE;
 
11893
                pointer_type = _vala_code_node_ref0 ((_tmp24_ = target_type, VALA_IS_POINTER_TYPE (_tmp24_) ? ((ValaPointerType*) _tmp24_) : NULL));
11016
11894
                if (pointer_type != NULL) {
11017
 
                        _tmp26_ = !VALA_IS_VOID_TYPE (vala_pointer_type_get_base_type (pointer_type));
 
11895
                        _tmp25_ = !VALA_IS_VOID_TYPE (vala_pointer_type_get_base_type (pointer_type));
11018
11896
                } else {
11019
 
                        _tmp26_ = FALSE;
 
11897
                        _tmp25_ = FALSE;
11020
11898
                }
11021
 
                if (_tmp26_) {
 
11899
                if (_tmp25_) {
11022
11900
                } else {
11023
11901
                        if (vala_ccode_base_module_requires_destroy (self, expression_type)) {
11024
11902
                                ValaLocalVariable* decl;
11025
 
                                ValaCCodeExpression* _tmp28_;
11026
11903
                                ValaCCodeExpression* _tmp27_;
11027
 
                                gboolean _tmp29_ = FALSE;
 
11904
                                ValaCCodeExpression* _tmp26_;
 
11905
                                gboolean _tmp28_ = FALSE;
11028
11906
                                decl = vala_ccode_base_module_get_temp_variable (self, expression_type, TRUE, (ValaCodeNode*) expression_type, FALSE);
11029
11907
                                vala_list_insert ((ValaList*) self->temp_vars, 0, decl);
11030
11908
                                vala_list_insert ((ValaList*) self->temp_ref_vars, 0, decl);
11031
 
                                cexpr = (_tmp28_ = (ValaCCodeExpression*) vala_ccode_assignment_new (_tmp27_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)), cexpr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (cexpr), _tmp28_);
11032
 
                                _vala_ccode_node_unref0 (_tmp27_);
 
11909
                                cexpr = (_tmp27_ = (ValaCCodeExpression*) vala_ccode_assignment_new (_tmp26_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)), cexpr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (cexpr), _tmp27_);
 
11910
                                _vala_ccode_node_unref0 (_tmp26_);
11033
11911
                                if (VALA_IS_ARRAY_TYPE (expression_type)) {
11034
 
                                        _tmp29_ = expr != NULL;
 
11912
                                        _tmp28_ = expr != NULL;
11035
11913
                                } else {
11036
 
                                        _tmp29_ = FALSE;
 
11914
                                        _tmp28_ = FALSE;
11037
11915
                                }
11038
 
                                if (_tmp29_) {
 
11916
                                if (_tmp28_) {
11039
11917
                                        ValaArrayType* array_type;
11040
11918
                                        ValaCCodeCommaExpression* ccomma;
 
11919
                                        ValaCCodeExpression* _tmp36_;
11041
11920
                                        ValaCCodeExpression* _tmp37_;
11042
 
                                        ValaCCodeExpression* _tmp38_;
11043
11921
                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (expression_type));
11044
11922
                                        ccomma = vala_ccode_comma_expression_new ();
11045
11923
                                        vala_ccode_comma_expression_append_expression (ccomma, cexpr);
11047
11925
                                                gint dim;
11048
11926
                                                dim = 1;
11049
11927
                                                {
11050
 
                                                        gboolean _tmp30_;
11051
 
                                                        _tmp30_ = TRUE;
 
11928
                                                        gboolean _tmp29_;
 
11929
                                                        _tmp29_ = TRUE;
11052
11930
                                                        while (TRUE) {
11053
 
                                                                char* _tmp32_;
11054
 
                                                                ValaDataType* _tmp31_;
11055
 
                                                                ValaLocalVariable* _tmp33_;
 
11931
                                                                char* _tmp31_;
 
11932
                                                                ValaDataType* _tmp30_;
 
11933
                                                                ValaLocalVariable* _tmp32_;
11056
11934
                                                                ValaLocalVariable* len_decl;
11057
 
                                                                ValaCCodeAssignment* _tmp36_;
11058
 
                                                                ValaCCodeExpression* _tmp35_;
 
11935
                                                                ValaCCodeAssignment* _tmp35_;
11059
11936
                                                                ValaCCodeExpression* _tmp34_;
11060
 
                                                                if (!_tmp30_) {
 
11937
                                                                ValaCCodeExpression* _tmp33_;
 
11938
                                                                if (!_tmp29_) {
11061
11939
                                                                        dim++;
11062
11940
                                                                }
11063
 
                                                                _tmp30_ = FALSE;
 
11941
                                                                _tmp29_ = FALSE;
11064
11942
                                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
11065
11943
                                                                        break;
11066
11944
                                                                }
11067
 
                                                                len_decl = (_tmp33_ = vala_local_variable_new (_tmp31_ = vala_data_type_copy (self->int_type), _tmp32_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), vala_symbol_get_name ((ValaSymbol*) decl), dim), NULL, NULL), _g_free0 (_tmp32_), _vala_code_node_unref0 (_tmp31_), _tmp33_);
 
11945
                                                                len_decl = (_tmp32_ = vala_local_variable_new (_tmp30_ = vala_data_type_copy (self->int_type), _tmp31_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), vala_symbol_get_name ((ValaSymbol*) decl), dim), NULL, NULL), _g_free0 (_tmp31_), _vala_code_node_unref0 (_tmp30_), _tmp32_);
11068
11946
                                                                vala_list_insert ((ValaList*) self->temp_vars, 0, len_decl);
11069
 
                                                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp36_ = vala_ccode_assignment_new (_tmp34_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) len_decl)), _tmp35_ = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), expr, dim), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
11070
 
                                                                _vala_ccode_node_unref0 (_tmp36_);
 
11947
                                                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp35_ = vala_ccode_assignment_new (_tmp33_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) len_decl)), _tmp34_ = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), expr, dim), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
11071
11948
                                                                _vala_ccode_node_unref0 (_tmp35_);
11072
11949
                                                                _vala_ccode_node_unref0 (_tmp34_);
 
11950
                                                                _vala_ccode_node_unref0 (_tmp33_);
11073
11951
                                                                _vala_code_node_unref0 (len_decl);
11074
11952
                                                        }
11075
11953
                                                }
11076
11954
                                        }
11077
 
                                        vala_ccode_comma_expression_append_expression (ccomma, _tmp37_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)));
11078
 
                                        _vala_ccode_node_unref0 (_tmp37_);
11079
 
                                        cexpr = (_tmp38_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccomma), _vala_ccode_node_unref0 (cexpr), _tmp38_);
 
11955
                                        vala_ccode_comma_expression_append_expression (ccomma, _tmp36_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)));
 
11956
                                        _vala_ccode_node_unref0 (_tmp36_);
 
11957
                                        cexpr = (_tmp37_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccomma), _vala_ccode_node_unref0 (cexpr), _tmp37_);
11080
11958
                                        _vala_code_node_unref0 (array_type);
11081
11959
                                        _vala_ccode_node_unref0 (ccomma);
11082
11960
                                } else {
11083
 
                                        gboolean _tmp39_ = FALSE;
 
11961
                                        gboolean _tmp38_ = FALSE;
11084
11962
                                        if (VALA_IS_DELEGATE_TYPE (expression_type)) {
11085
 
                                                _tmp39_ = expr != NULL;
 
11963
                                                _tmp38_ = expr != NULL;
11086
11964
                                        } else {
11087
 
                                                _tmp39_ = FALSE;
 
11965
                                                _tmp38_ = FALSE;
11088
11966
                                        }
11089
 
                                        if (_tmp39_) {
 
11967
                                        if (_tmp38_) {
11090
11968
                                                ValaCCodeCommaExpression* ccomma;
11091
 
                                                char* _tmp42_;
11092
 
                                                ValaPointerType* _tmp41_;
11093
 
                                                ValaVoidType* _tmp40_;
11094
 
                                                ValaLocalVariable* _tmp43_;
 
11969
                                                char* _tmp41_;
 
11970
                                                ValaPointerType* _tmp40_;
 
11971
                                                ValaVoidType* _tmp39_;
 
11972
                                                ValaLocalVariable* _tmp42_;
11095
11973
                                                ValaLocalVariable* target_decl;
11096
 
                                                char* _tmp47_;
11097
 
                                                ValaDelegateType* _tmp46_;
11098
 
                                                ValaDelegate* _tmp45_;
11099
 
                                                ValaSymbol* _tmp44_;
11100
 
                                                ValaLocalVariable* _tmp48_;
 
11974
                                                char* _tmp46_;
 
11975
                                                ValaDelegateType* _tmp45_;
 
11976
                                                ValaDelegate* _tmp44_;
 
11977
                                                ValaSymbol* _tmp43_;
 
11978
                                                ValaLocalVariable* _tmp47_;
11101
11979
                                                ValaLocalVariable* target_destroy_notify_decl;
11102
11980
                                                ValaCCodeExpression* target_destroy_notify;
11103
 
                                                ValaCCodeAssignment* _tmp54_;
11104
 
                                                ValaCCodeExpression* _tmp53_;
 
11981
                                                ValaCCodeAssignment* _tmp53_;
11105
11982
                                                ValaCCodeExpression* _tmp52_;
11106
11983
                                                ValaCCodeExpression* _tmp51_;
11107
 
                                                ValaCCodeExpression* _tmp50_ = NULL;
11108
 
                                                ValaCCodeExpression* _tmp49_;
11109
 
                                                ValaCCodeAssignment* _tmp56_;
11110
 
                                                ValaCCodeExpression* _tmp55_;
 
11984
                                                ValaCCodeExpression* _tmp50_;
 
11985
                                                ValaCCodeExpression* _tmp49_ = NULL;
 
11986
                                                ValaCCodeExpression* _tmp48_;
 
11987
                                                ValaCCodeAssignment* _tmp55_;
 
11988
                                                ValaCCodeExpression* _tmp54_;
 
11989
                                                ValaCCodeExpression* _tmp56_;
11111
11990
                                                ValaCCodeExpression* _tmp57_;
11112
 
                                                ValaCCodeExpression* _tmp58_;
11113
11991
                                                ccomma = vala_ccode_comma_expression_new ();
11114
11992
                                                vala_ccode_comma_expression_append_expression (ccomma, cexpr);
11115
 
                                                target_decl = (_tmp43_ = vala_local_variable_new ((ValaDataType*) (_tmp41_ = vala_pointer_type_new ((ValaDataType*) (_tmp40_ = vala_void_type_new (NULL)), NULL)), _tmp42_ = vala_ccode_base_module_get_delegate_target_cname (self, vala_symbol_get_name ((ValaSymbol*) decl)), NULL, NULL), _g_free0 (_tmp42_), _vala_code_node_unref0 (_tmp41_), _vala_code_node_unref0 (_tmp40_), _tmp43_);
 
11993
                                                target_decl = (_tmp42_ = vala_local_variable_new ((ValaDataType*) (_tmp40_ = vala_pointer_type_new ((ValaDataType*) (_tmp39_ = vala_void_type_new (NULL)), NULL)), _tmp41_ = vala_ccode_base_module_get_delegate_target_cname (self, vala_symbol_get_name ((ValaSymbol*) decl)), NULL, NULL), _g_free0 (_tmp41_), _vala_code_node_unref0 (_tmp40_), _vala_code_node_unref0 (_tmp39_), _tmp42_);
11116
11994
                                                vala_list_insert ((ValaList*) self->temp_vars, 0, target_decl);
11117
 
                                                target_destroy_notify_decl = (_tmp48_ = vala_local_variable_new ((ValaDataType*) (_tmp46_ = vala_delegate_type_new (_tmp45_ = VALA_DELEGATE (vala_scope_lookup (vala_symbol_get_scope (_tmp44_ = vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) vala_code_context_get_root (self->priv->_context)), "GLib")), "DestroyNotify")))), _tmp47_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, vala_symbol_get_name ((ValaSymbol*) decl)), NULL, NULL), _g_free0 (_tmp47_), _vala_code_node_unref0 (_tmp46_), _vala_code_node_unref0 (_tmp45_), _vala_code_node_unref0 (_tmp44_), _tmp48_);
 
11995
                                                target_destroy_notify_decl = (_tmp47_ = vala_local_variable_new ((ValaDataType*) (_tmp45_ = vala_delegate_type_new (_tmp44_ = VALA_DELEGATE (vala_scope_lookup (vala_symbol_get_scope (_tmp43_ = vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) vala_code_context_get_root (self->priv->_context)), "GLib")), "DestroyNotify")))), _tmp46_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname (self, vala_symbol_get_name ((ValaSymbol*) decl)), NULL, NULL), _g_free0 (_tmp46_), _vala_code_node_unref0 (_tmp45_), _vala_code_node_unref0 (_tmp44_), _vala_code_node_unref0 (_tmp43_), _tmp47_);
11118
11996
                                                vala_list_insert ((ValaList*) self->temp_vars, 0, target_destroy_notify_decl);
11119
11997
                                                target_destroy_notify = NULL;
11120
 
                                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp54_ = vala_ccode_assignment_new (_tmp49_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) target_decl)), _tmp53_ = (_tmp51_ = vala_ccode_base_module_get_delegate_target_cexpression (self, expr, &_tmp50_), target_destroy_notify = (_tmp52_ = _tmp50_, _vala_ccode_node_unref0 (target_destroy_notify), _tmp52_), _tmp51_), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
11121
 
                                                _vala_ccode_node_unref0 (_tmp54_);
 
11998
                                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp53_ = vala_ccode_assignment_new (_tmp48_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) target_decl)), _tmp52_ = (_tmp50_ = vala_ccode_base_module_get_delegate_target_cexpression (self, expr, &_tmp49_), target_destroy_notify = (_tmp51_ = _tmp49_, _vala_ccode_node_unref0 (target_destroy_notify), _tmp51_), _tmp50_), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
11122
11999
                                                _vala_ccode_node_unref0 (_tmp53_);
11123
 
                                                _vala_ccode_node_unref0 (_tmp49_);
11124
 
                                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp56_ = vala_ccode_assignment_new (_tmp55_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) target_destroy_notify_decl)), target_destroy_notify, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
12000
                                                _vala_ccode_node_unref0 (_tmp52_);
 
12001
                                                _vala_ccode_node_unref0 (_tmp48_);
 
12002
                                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp55_ = vala_ccode_assignment_new (_tmp54_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) target_destroy_notify_decl)), target_destroy_notify, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
12003
                                                _vala_ccode_node_unref0 (_tmp55_);
 
12004
                                                _vala_ccode_node_unref0 (_tmp54_);
 
12005
                                                vala_ccode_comma_expression_append_expression (ccomma, _tmp56_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)));
11125
12006
                                                _vala_ccode_node_unref0 (_tmp56_);
11126
 
                                                _vala_ccode_node_unref0 (_tmp55_);
11127
 
                                                vala_ccode_comma_expression_append_expression (ccomma, _tmp57_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)));
11128
 
                                                _vala_ccode_node_unref0 (_tmp57_);
11129
 
                                                cexpr = (_tmp58_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccomma), _vala_ccode_node_unref0 (cexpr), _tmp58_);
 
12007
                                                cexpr = (_tmp57_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccomma), _vala_ccode_node_unref0 (cexpr), _tmp57_);
11130
12008
                                                _vala_ccode_node_unref0 (ccomma);
11131
12009
                                                _vala_code_node_unref0 (target_decl);
11132
12010
                                                _vala_code_node_unref0 (target_destroy_notify_decl);
11145
12023
        if (gvalue_boxing) {
11146
12024
                ValaLocalVariable* decl;
11147
12025
                ValaCCodeCommaExpression* ccomma;
11148
 
                ValaCCodeIdentifier* _tmp65_;
11149
 
                ValaCCodeFunctionCall* _tmp66_;
 
12026
                ValaCCodeIdentifier* _tmp64_;
 
12027
                ValaCCodeFunctionCall* _tmp65_;
11150
12028
                ValaCCodeFunctionCall* ccall;
11151
 
                ValaCCodeIdentifier* _tmp71_;
11152
 
                char* _tmp70_;
11153
 
                ValaCCodeFunctionCall* _tmp73_;
11154
 
                ValaCCodeIdentifier* _tmp72_;
11155
 
                ValaCCodeExpression* _tmp78_;
 
12029
                ValaCCodeIdentifier* _tmp70_;
 
12030
                char* _tmp69_;
11156
12031
                ValaCCodeExpression* _tmp79_;
 
12032
                ValaCCodeExpression* _tmp80_;
11157
12033
                decl = vala_ccode_base_module_get_temp_variable (self, target_type, TRUE, (ValaCodeNode*) target_type, TRUE);
11158
12034
                vala_list_insert ((ValaList*) self->temp_vars, 0, decl);
11159
12035
                ccomma = vala_ccode_comma_expression_new ();
11160
12036
                if (vala_data_type_get_nullable (target_type)) {
11161
 
                        ValaCCodeIdentifier* _tmp59_;
11162
 
                        ValaCCodeFunctionCall* _tmp60_;
 
12037
                        ValaCCodeIdentifier* _tmp58_;
 
12038
                        ValaCCodeFunctionCall* _tmp59_;
11163
12039
                        ValaCCodeFunctionCall* newcall;
 
12040
                        ValaCCodeConstant* _tmp60_;
11164
12041
                        ValaCCodeConstant* _tmp61_;
11165
 
                        ValaCCodeConstant* _tmp62_;
11166
 
                        ValaCCodeExpression* _tmp63_;
11167
 
                        ValaCCodeAssignment* _tmp64_;
 
12042
                        ValaCCodeExpression* _tmp62_;
 
12043
                        ValaCCodeAssignment* _tmp63_;
11168
12044
                        ValaCCodeAssignment* newassignment;
11169
 
                        newcall = (_tmp60_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp59_ = vala_ccode_identifier_new ("g_new0"))), _vala_ccode_node_unref0 (_tmp59_), _tmp60_);
11170
 
                        vala_ccode_function_call_add_argument (newcall, (ValaCCodeExpression*) (_tmp61_ = vala_ccode_constant_new ("GValue")));
 
12045
                        newcall = (_tmp59_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp58_ = vala_ccode_identifier_new ("g_new0"))), _vala_ccode_node_unref0 (_tmp58_), _tmp59_);
 
12046
                        vala_ccode_function_call_add_argument (newcall, (ValaCCodeExpression*) (_tmp60_ = vala_ccode_constant_new ("GValue")));
 
12047
                        _vala_ccode_node_unref0 (_tmp60_);
 
12048
                        vala_ccode_function_call_add_argument (newcall, (ValaCCodeExpression*) (_tmp61_ = vala_ccode_constant_new ("1")));
11171
12049
                        _vala_ccode_node_unref0 (_tmp61_);
11172
 
                        vala_ccode_function_call_add_argument (newcall, (ValaCCodeExpression*) (_tmp62_ = vala_ccode_constant_new ("1")));
11173
 
                        _vala_ccode_node_unref0 (_tmp62_);
11174
 
                        newassignment = (_tmp64_ = vala_ccode_assignment_new (_tmp63_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)), (ValaCCodeExpression*) newcall, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (_tmp63_), _tmp64_);
 
12050
                        newassignment = (_tmp63_ = vala_ccode_assignment_new (_tmp62_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)), (ValaCCodeExpression*) newcall, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (_tmp62_), _tmp63_);
11175
12051
                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) newassignment);
11176
12052
                        _vala_ccode_node_unref0 (newcall);
11177
12053
                        _vala_ccode_node_unref0 (newassignment);
11178
12054
                }
11179
 
                ccall = (_tmp66_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp65_ = vala_ccode_identifier_new ("g_value_init"))), _vala_ccode_node_unref0 (_tmp65_), _tmp66_);
 
12055
                ccall = (_tmp65_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp64_ = vala_ccode_identifier_new ("g_value_init"))), _vala_ccode_node_unref0 (_tmp64_), _tmp65_);
11180
12056
                if (vala_data_type_get_nullable (target_type)) {
 
12057
                        ValaCCodeExpression* _tmp66_;
 
12058
                        vala_ccode_function_call_add_argument (ccall, _tmp66_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)));
 
12059
                        _vala_ccode_node_unref0 (_tmp66_);
 
12060
                } else {
 
12061
                        ValaCCodeUnaryExpression* _tmp68_;
11181
12062
                        ValaCCodeExpression* _tmp67_;
11182
 
                        vala_ccode_function_call_add_argument (ccall, _tmp67_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)));
 
12063
                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp68_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp67_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)))));
 
12064
                        _vala_ccode_node_unref0 (_tmp68_);
11183
12065
                        _vala_ccode_node_unref0 (_tmp67_);
11184
 
                } else {
11185
 
                        ValaCCodeUnaryExpression* _tmp69_;
11186
 
                        ValaCCodeExpression* _tmp68_;
11187
 
                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp69_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp68_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)))));
11188
 
                        _vala_ccode_node_unref0 (_tmp69_);
11189
 
                        _vala_ccode_node_unref0 (_tmp68_);
11190
12066
                }
11191
 
                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp71_ = vala_ccode_identifier_new (_tmp70_ = vala_data_type_get_type_id (expression_type))));
11192
 
                _vala_ccode_node_unref0 (_tmp71_);
11193
 
                _g_free0 (_tmp70_);
 
12067
                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp70_ = vala_ccode_identifier_new (_tmp69_ = vala_data_type_get_type_id (expression_type))));
 
12068
                _vala_ccode_node_unref0 (_tmp70_);
 
12069
                _g_free0 (_tmp69_);
11194
12070
                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) ccall);
11195
 
                ccall = (_tmp73_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp72_ = vala_ccode_module_get_value_setter_function ((ValaCCodeModule*) self, expression_type))), _vala_ccode_node_unref0 (ccall), _tmp73_);
11196
 
                _vala_ccode_node_unref0 (_tmp72_);
 
12071
                if (vala_ccode_base_module_requires_destroy (self, expression_type)) {
 
12072
                        ValaCCodeFunctionCall* _tmp72_;
 
12073
                        ValaCCodeIdentifier* _tmp71_;
 
12074
                        ccall = (_tmp72_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp71_ = vala_ccode_module_get_value_taker_function ((ValaCCodeModule*) self, expression_type))), _vala_ccode_node_unref0 (ccall), _tmp72_);
 
12075
                        _vala_ccode_node_unref0 (_tmp71_);
 
12076
                } else {
 
12077
                        ValaCCodeFunctionCall* _tmp74_;
 
12078
                        ValaCCodeIdentifier* _tmp73_;
 
12079
                        ccall = (_tmp74_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp73_ = vala_ccode_module_get_value_setter_function ((ValaCCodeModule*) self, expression_type))), _vala_ccode_node_unref0 (ccall), _tmp74_);
 
12080
                        _vala_ccode_node_unref0 (_tmp73_);
 
12081
                }
11197
12082
                if (vala_data_type_get_nullable (target_type)) {
11198
 
                        ValaCCodeExpression* _tmp74_;
11199
 
                        vala_ccode_function_call_add_argument (ccall, _tmp74_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)));
11200
 
                        _vala_ccode_node_unref0 (_tmp74_);
11201
 
                } else {
11202
 
                        ValaCCodeUnaryExpression* _tmp76_;
11203
12083
                        ValaCCodeExpression* _tmp75_;
11204
 
                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp76_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp75_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)))));
11205
 
                        _vala_ccode_node_unref0 (_tmp76_);
 
12084
                        vala_ccode_function_call_add_argument (ccall, _tmp75_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)));
11206
12085
                        _vala_ccode_node_unref0 (_tmp75_);
 
12086
                } else {
 
12087
                        ValaCCodeUnaryExpression* _tmp77_;
 
12088
                        ValaCCodeExpression* _tmp76_;
 
12089
                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp77_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp76_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)))));
 
12090
                        _vala_ccode_node_unref0 (_tmp77_);
 
12091
                        _vala_ccode_node_unref0 (_tmp76_);
11207
12092
                }
11208
12093
                if (vala_data_type_is_real_non_null_struct_type (expression_type)) {
11209
 
                        ValaCCodeUnaryExpression* _tmp77_;
11210
 
                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp77_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cexpr)));
11211
 
                        _vala_ccode_node_unref0 (_tmp77_);
 
12094
                        ValaCCodeUnaryExpression* _tmp78_;
 
12095
                        vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp78_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cexpr)));
 
12096
                        _vala_ccode_node_unref0 (_tmp78_);
11212
12097
                } else {
11213
12098
                        vala_ccode_function_call_add_argument (ccall, cexpr);
11214
12099
                }
11215
12100
                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) ccall);
11216
 
                vala_ccode_comma_expression_append_expression (ccomma, _tmp78_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)));
11217
 
                _vala_ccode_node_unref0 (_tmp78_);
11218
 
                cexpr = (_tmp79_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccomma), _vala_ccode_node_unref0 (cexpr), _tmp79_);
 
12101
                vala_ccode_comma_expression_append_expression (ccomma, _tmp79_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)));
 
12102
                _vala_ccode_node_unref0 (_tmp79_);
 
12103
                cexpr = (_tmp80_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccomma), _vala_ccode_node_unref0 (cexpr), _tmp80_);
11219
12104
                result = cexpr;
11220
12105
                _vala_code_node_unref0 (decl);
11221
12106
                _vala_ccode_node_unref0 (ccomma);
11223
12108
                return result;
11224
12109
        } else {
11225
12110
                if (boxing) {
11226
 
                        ValaCCodeExpression* _tmp80_;
 
12111
                        ValaCCodeExpression* _tmp81_;
11227
12112
                        ValaCCodeUnaryExpression* unary;
11228
 
                        gboolean _tmp81_ = FALSE;
11229
 
                        unary = _vala_ccode_node_ref0 ((_tmp80_ = cexpr, VALA_IS_CCODE_UNARY_EXPRESSION (_tmp80_) ? ((ValaCCodeUnaryExpression*) _tmp80_) : NULL));
 
12113
                        gboolean _tmp82_ = FALSE;
 
12114
                        unary = _vala_ccode_node_ref0 ((_tmp81_ = cexpr, VALA_IS_CCODE_UNARY_EXPRESSION (_tmp81_) ? ((ValaCCodeUnaryExpression*) _tmp81_) : NULL));
11230
12115
                        if (unary != NULL) {
11231
 
                                _tmp81_ = vala_ccode_unary_expression_get_operator (unary) == VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION;
 
12116
                                _tmp82_ = vala_ccode_unary_expression_get_operator (unary) == VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION;
11232
12117
                        } else {
11233
 
                                _tmp81_ = FALSE;
 
12118
                                _tmp82_ = FALSE;
11234
12119
                        }
11235
 
                        if (_tmp81_) {
11236
 
                                ValaCCodeExpression* _tmp82_;
11237
 
                                cexpr = (_tmp82_ = _vala_ccode_node_ref0 (vala_ccode_unary_expression_get_inner (unary)), _vala_ccode_node_unref0 (cexpr), _tmp82_);
 
12120
                        if (_tmp82_) {
 
12121
                                ValaCCodeExpression* _tmp83_;
 
12122
                                cexpr = (_tmp83_ = _vala_ccode_node_ref0 (vala_ccode_unary_expression_get_inner (unary)), _vala_ccode_node_unref0 (cexpr), _tmp83_);
11238
12123
                        } else {
11239
 
                                gboolean _tmp83_ = FALSE;
 
12124
                                gboolean _tmp84_ = FALSE;
11240
12125
                                if (VALA_IS_CCODE_IDENTIFIER (cexpr)) {
11241
 
                                        _tmp83_ = TRUE;
 
12126
                                        _tmp84_ = TRUE;
11242
12127
                                } else {
11243
 
                                        _tmp83_ = VALA_IS_CCODE_MEMBER_ACCESS (cexpr);
 
12128
                                        _tmp84_ = VALA_IS_CCODE_MEMBER_ACCESS (cexpr);
11244
12129
                                }
11245
 
                                if (_tmp83_) {
11246
 
                                        ValaCCodeExpression* _tmp84_;
11247
 
                                        cexpr = (_tmp84_ = (ValaCCodeExpression*) vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cexpr), _vala_ccode_node_unref0 (cexpr), _tmp84_);
 
12130
                                if (_tmp84_) {
 
12131
                                        ValaCCodeExpression* _tmp85_;
 
12132
                                        cexpr = (_tmp85_ = (ValaCCodeExpression*) vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cexpr), _vala_ccode_node_unref0 (cexpr), _tmp85_);
11248
12133
                                } else {
11249
12134
                                        ValaLocalVariable* decl;
11250
12135
                                        ValaCCodeCommaExpression* ccomma;
11251
 
                                        ValaCCodeAssignment* _tmp86_;
11252
 
                                        ValaCCodeExpression* _tmp85_;
11253
 
                                        ValaCCodeUnaryExpression* _tmp88_;
11254
 
                                        ValaCCodeExpression* _tmp87_;
11255
 
                                        ValaCCodeExpression* _tmp89_;
 
12136
                                        ValaCCodeAssignment* _tmp87_;
 
12137
                                        ValaCCodeExpression* _tmp86_;
 
12138
                                        ValaCCodeUnaryExpression* _tmp89_;
 
12139
                                        ValaCCodeExpression* _tmp88_;
 
12140
                                        ValaCCodeExpression* _tmp90_;
11256
12141
                                        decl = vala_ccode_base_module_get_temp_variable (self, expression_type, vala_data_type_get_value_owned (expression_type), (ValaCodeNode*) expression_type, FALSE);
11257
12142
                                        vala_list_insert ((ValaList*) self->temp_vars, 0, decl);
11258
12143
                                        ccomma = vala_ccode_comma_expression_new ();
11259
 
                                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp86_ = vala_ccode_assignment_new (_tmp85_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)), cexpr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
12144
                                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp87_ = vala_ccode_assignment_new (_tmp86_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)), cexpr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
12145
                                        _vala_ccode_node_unref0 (_tmp87_);
11260
12146
                                        _vala_ccode_node_unref0 (_tmp86_);
11261
 
                                        _vala_ccode_node_unref0 (_tmp85_);
11262
 
                                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp88_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp87_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)))));
 
12147
                                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp89_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp88_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) decl)))));
 
12148
                                        _vala_ccode_node_unref0 (_tmp89_);
11263
12149
                                        _vala_ccode_node_unref0 (_tmp88_);
11264
 
                                        _vala_ccode_node_unref0 (_tmp87_);
11265
 
                                        cexpr = (_tmp89_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccomma), _vala_ccode_node_unref0 (cexpr), _tmp89_);
 
12150
                                        cexpr = (_tmp90_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccomma), _vala_ccode_node_unref0 (cexpr), _tmp90_);
11266
12151
                                        _vala_code_node_unref0 (decl);
11267
12152
                                        _vala_ccode_node_unref0 (ccomma);
11268
12153
                                }
11270
12155
                        _vala_ccode_node_unref0 (unary);
11271
12156
                } else {
11272
12157
                        if (unboxing) {
11273
 
                                ValaCCodeExpression* _tmp90_;
11274
 
                                cexpr = (_tmp90_ = (ValaCCodeExpression*) vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, cexpr), _vala_ccode_node_unref0 (cexpr), _tmp90_);
11275
 
                        } else {
11276
12158
                                ValaCCodeExpression* _tmp91_;
11277
 
                                cexpr = (_tmp91_ = vala_ccode_base_module_get_implicit_cast_expression (self, cexpr, expression_type, target_type, expr), _vala_ccode_node_unref0 (cexpr), _tmp91_);
 
12159
                                cexpr = (_tmp91_ = (ValaCCodeExpression*) vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, cexpr), _vala_ccode_node_unref0 (cexpr), _tmp91_);
 
12160
                        } else {
 
12161
                                ValaCCodeExpression* _tmp92_;
 
12162
                                cexpr = (_tmp92_ = vala_ccode_base_module_get_implicit_cast_expression (self, cexpr, expression_type, target_type, expr), _vala_ccode_node_unref0 (cexpr), _tmp92_);
11278
12163
                        }
11279
12164
                }
11280
12165
        }
11281
12166
        if (vala_data_type_get_value_owned (target_type)) {
11282
 
                gboolean _tmp93_ = FALSE;
11283
12167
                gboolean _tmp94_ = FALSE;
 
12168
                gboolean _tmp95_ = FALSE;
11284
12169
                if (!vala_data_type_get_value_owned (expression_type)) {
 
12170
                        _tmp95_ = TRUE;
 
12171
                } else {
 
12172
                        _tmp95_ = boxing;
 
12173
                }
 
12174
                if (_tmp95_) {
11285
12175
                        _tmp94_ = TRUE;
11286
12176
                } else {
11287
 
                        _tmp94_ = boxing;
11288
 
                }
11289
 
                if (_tmp94_) {
11290
 
                        _tmp93_ = TRUE;
11291
 
                } else {
11292
 
                        _tmp93_ = unboxing;
11293
 
                }
11294
 
                _tmp92_ = _tmp93_;
 
12177
                        _tmp94_ = unboxing;
 
12178
                }
 
12179
                _tmp93_ = _tmp94_;
11295
12180
        } else {
11296
 
                _tmp92_ = FALSE;
 
12181
                _tmp93_ = FALSE;
11297
12182
        }
11298
 
        if (_tmp92_) {
11299
 
                gboolean _tmp95_ = FALSE;
 
12183
        if (_tmp93_) {
 
12184
                gboolean _tmp96_ = FALSE;
11300
12185
                if (vala_ccode_base_module_requires_copy (self, target_type)) {
11301
 
                        _tmp95_ = !VALA_IS_NULL_TYPE (expression_type);
 
12186
                        _tmp96_ = !VALA_IS_NULL_TYPE (expression_type);
11302
12187
                } else {
11303
 
                        _tmp95_ = FALSE;
 
12188
                        _tmp96_ = FALSE;
11304
12189
                }
11305
 
                if (_tmp95_) {
 
12190
                if (_tmp96_) {
11306
12191
                        ValaCodeNode* node;
11307
 
                        ValaCCodeExpression* _tmp97_;
 
12192
                        ValaCCodeExpression* _tmp98_;
11308
12193
                        node = _vala_code_node_ref0 ((ValaCodeNode*) expr);
11309
12194
                        if (node == NULL) {
11310
 
                                ValaCodeNode* _tmp96_;
11311
 
                                node = (_tmp96_ = _vala_code_node_ref0 ((ValaCodeNode*) expression_type), _vala_code_node_unref0 (node), _tmp96_);
 
12195
                                ValaCodeNode* _tmp97_;
 
12196
                                node = (_tmp97_ = _vala_code_node_ref0 ((ValaCodeNode*) expression_type), _vala_code_node_unref0 (node), _tmp97_);
11312
12197
                        }
11313
 
                        cexpr = (_tmp97_ = vala_ccode_base_module_get_ref_cexpression (self, target_type, cexpr, expr, node), _vala_ccode_node_unref0 (cexpr), _tmp97_);
 
12198
                        cexpr = (_tmp98_ = vala_ccode_base_module_get_ref_cexpression (self, target_type, cexpr, expr, node), _vala_ccode_node_unref0 (cexpr), _tmp98_);
11314
12199
                        _vala_code_node_unref0 (node);
11315
12200
                }
11316
12201
        }
11320
12205
 
11321
12206
 
11322
12207
static ValaCCodeExpression* vala_ccode_base_module_real_get_implicit_cast_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr) {
11323
 
        ValaCCodeExpression* result;
 
12208
        ValaCCodeExpression* result = NULL;
11324
12209
        ValaCCodeExpression* cexpr;
11325
12210
        gboolean _tmp0_ = FALSE;
11326
12211
        ValaTypeSymbol* _tmp1_;
11432
12317
}
11433
12318
 
11434
12319
 
11435
 
ValaCCodeFunctionCall* vala_ccode_base_module_get_property_set_call (ValaCCodeBaseModule* self, ValaProperty* prop, ValaMemberAccess* ma, ValaCCodeExpression* cexpr, ValaExpression* rhs) {
11436
 
        ValaCCodeFunctionCall* result;
 
12320
ValaCCodeExpression* vala_ccode_base_module_get_property_set_call (ValaCCodeBaseModule* self, ValaProperty* prop, ValaMemberAccess* ma, ValaCCodeExpression* cexpr, ValaExpression* rhs) {
 
12321
        ValaCCodeExpression* result = NULL;
11437
12322
        char* set_func;
11438
12323
        ValaProperty* base_property;
11439
12324
        ValaCCodeIdentifier* _tmp23_;
11441
12326
        ValaCCodeFunctionCall* ccall;
11442
12327
        ValaDataType* _tmp36_;
11443
12328
        ValaArrayType* array_type;
 
12329
        ValaCCodeExpression* rv;
11444
12330
        gboolean _tmp37_ = FALSE;
11445
 
        gboolean _tmp38_ = FALSE;
 
12331
        gboolean _tmp43_ = FALSE;
 
12332
        gboolean _tmp44_ = FALSE;
11446
12333
        g_return_val_if_fail (self != NULL, NULL);
11447
12334
        g_return_val_if_fail (prop != NULL, NULL);
11448
12335
        g_return_val_if_fail (ma != NULL, NULL);
11473
12360
                        vala_ccode_function_call_add_argument (ccall, _tmp10_ = VALA_CCODE_EXPRESSION (vala_ccode_base_module_get_ccodenode (self, (ValaCodeNode*) vala_member_access_get_inner (ma))));
11474
12361
                        _vala_ccode_node_unref0 (_tmp10_);
11475
12362
                        vala_ccode_function_call_add_argument (ccall, cexpr);
11476
 
                        result = ccall;
 
12363
                        result = (ValaCCodeExpression*) ccall;
11477
12364
                        _vala_code_node_unref0 (base_class);
11478
12365
                        _vala_ccode_node_unref0 (vcast);
11479
12366
                        return result;
11496
12383
                                vala_ccode_function_call_add_argument (ccall, _tmp18_ = VALA_CCODE_EXPRESSION (vala_ccode_base_module_get_ccodenode (self, (ValaCodeNode*) vala_member_access_get_inner (ma))));
11497
12384
                                _vala_ccode_node_unref0 (_tmp18_);
11498
12385
                                vala_ccode_function_call_add_argument (ccall, cexpr);
11499
 
                                result = ccall;
 
12386
                                result = (ValaCCodeExpression*) ccall;
11500
12387
                                _vala_code_node_unref0 (base_iface);
11501
12388
                                _g_free0 (parent_iface_var);
11502
12389
                                return result;
11583
12470
                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp35_ = vala_property_get_canonical_cconstant (prop)));
11584
12471
                _vala_ccode_node_unref0 (_tmp35_);
11585
12472
        }
11586
 
        vala_ccode_function_call_add_argument (ccall, cexpr);
11587
12473
        array_type = _vala_code_node_ref0 ((_tmp36_ = vala_property_get_property_type (prop), VALA_IS_ARRAY_TYPE (_tmp36_) ? ((ValaArrayType*) _tmp36_) : NULL));
 
12474
        rv = NULL;
11588
12475
        if (array_type != NULL) {
11589
 
                _tmp38_ = !vala_property_get_no_array_length (prop);
11590
 
        } else {
11591
 
                _tmp38_ = FALSE;
11592
 
        }
11593
 
        if (_tmp38_) {
11594
 
                _tmp37_ = rhs != NULL;
 
12476
                _tmp37_ = !vala_property_get_no_array_length (prop);
11595
12477
        } else {
11596
12478
                _tmp37_ = FALSE;
11597
12479
        }
11598
12480
        if (_tmp37_) {
 
12481
                ValaLocalVariable* temp_var;
 
12482
                ValaCCodeCommaExpression* ccomma;
 
12483
                ValaCCodeAssignment* _tmp39_;
 
12484
                ValaCCodeExpression* _tmp38_;
 
12485
                ValaCCodeExpression* _tmp40_;
 
12486
                ValaCCodeExpression* _tmp41_;
 
12487
                temp_var = vala_ccode_base_module_get_temp_variable (self, vala_property_get_property_type (prop), TRUE, NULL, FALSE);
 
12488
                vala_list_insert ((ValaList*) self->temp_vars, 0, temp_var);
 
12489
                ccomma = vala_ccode_comma_expression_new ();
 
12490
                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp39_ = vala_ccode_assignment_new (_tmp38_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) temp_var)), cexpr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
12491
                _vala_ccode_node_unref0 (_tmp39_);
 
12492
                _vala_ccode_node_unref0 (_tmp38_);
 
12493
                vala_ccode_function_call_add_argument (ccall, _tmp40_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) temp_var)));
 
12494
                _vala_ccode_node_unref0 (_tmp40_);
 
12495
                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) ccall);
 
12496
                rv = (_tmp41_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccomma), _vala_ccode_node_unref0 (rv), _tmp41_);
 
12497
                _vala_code_node_unref0 (temp_var);
 
12498
                _vala_ccode_node_unref0 (ccomma);
 
12499
        } else {
 
12500
                ValaCCodeExpression* _tmp42_;
 
12501
                vala_ccode_function_call_add_argument (ccall, cexpr);
 
12502
                rv = (_tmp42_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccall), _vala_ccode_node_unref0 (rv), _tmp42_);
 
12503
        }
 
12504
        if (array_type != NULL) {
 
12505
                _tmp44_ = !vala_property_get_no_array_length (prop);
 
12506
        } else {
 
12507
                _tmp44_ = FALSE;
 
12508
        }
 
12509
        if (_tmp44_) {
 
12510
                _tmp43_ = rhs != NULL;
 
12511
        } else {
 
12512
                _tmp43_ = FALSE;
 
12513
        }
 
12514
        if (_tmp43_) {
11599
12515
                {
11600
12516
                        gint dim;
11601
12517
                        dim = 1;
11602
12518
                        {
11603
 
                                gboolean _tmp39_;
11604
 
                                _tmp39_ = TRUE;
 
12519
                                gboolean _tmp45_;
 
12520
                                _tmp45_ = TRUE;
11605
12521
                                while (TRUE) {
11606
 
                                        ValaCCodeExpression* _tmp40_;
11607
 
                                        if (!_tmp39_) {
 
12522
                                        ValaCCodeExpression* _tmp46_;
 
12523
                                        if (!_tmp45_) {
11608
12524
                                                dim++;
11609
12525
                                        }
11610
 
                                        _tmp39_ = FALSE;
 
12526
                                        _tmp45_ = FALSE;
11611
12527
                                        if (!(dim <= vala_array_type_get_rank (array_type))) {
11612
12528
                                                break;
11613
12529
                                        }
11614
 
                                        vala_ccode_function_call_add_argument (ccall, _tmp40_ = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), rhs, dim));
11615
 
                                        _vala_ccode_node_unref0 (_tmp40_);
 
12530
                                        vala_ccode_function_call_add_argument (ccall, _tmp46_ = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), rhs, dim));
 
12531
                                        _vala_ccode_node_unref0 (_tmp46_);
11616
12532
                                }
11617
12533
                        }
11618
12534
                }
11619
12535
        } else {
11620
 
                gboolean _tmp41_ = FALSE;
 
12536
                gboolean _tmp47_ = FALSE;
11621
12537
                if (VALA_IS_DELEGATE_TYPE (vala_property_get_property_type (prop))) {
11622
 
                        _tmp41_ = rhs != NULL;
 
12538
                        _tmp47_ = rhs != NULL;
11623
12539
                } else {
11624
 
                        _tmp41_ = FALSE;
 
12540
                        _tmp47_ = FALSE;
11625
12541
                }
11626
 
                if (_tmp41_) {
 
12542
                if (_tmp47_) {
11627
12543
                        ValaDelegateType* delegate_type;
11628
12544
                        delegate_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_property_get_property_type (prop)));
11629
12545
                        if (vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (delegate_type))) {
11630
12546
                                ValaCCodeExpression* delegate_target_destroy_notify;
11631
 
                                ValaCCodeExpression* _tmp45_;
11632
 
                                ValaCCodeExpression* _tmp44_;
11633
 
                                ValaCCodeExpression* _tmp43_;
11634
 
                                ValaCCodeExpression* _tmp42_ = NULL;
 
12547
                                ValaCCodeExpression* _tmp51_;
 
12548
                                ValaCCodeExpression* _tmp50_;
 
12549
                                ValaCCodeExpression* _tmp49_;
 
12550
                                ValaCCodeExpression* _tmp48_ = NULL;
11635
12551
                                delegate_target_destroy_notify = NULL;
11636
 
                                vala_ccode_function_call_add_argument (ccall, _tmp45_ = (_tmp43_ = vala_ccode_base_module_get_delegate_target_cexpression (self, rhs, &_tmp42_), delegate_target_destroy_notify = (_tmp44_ = _tmp42_, _vala_ccode_node_unref0 (delegate_target_destroy_notify), _tmp44_), _tmp43_));
11637
 
                                _vala_ccode_node_unref0 (_tmp45_);
 
12552
                                vala_ccode_function_call_add_argument (ccall, _tmp51_ = (_tmp49_ = vala_ccode_base_module_get_delegate_target_cexpression (self, rhs, &_tmp48_), delegate_target_destroy_notify = (_tmp50_ = _tmp48_, _vala_ccode_node_unref0 (delegate_target_destroy_notify), _tmp50_), _tmp49_));
 
12553
                                _vala_ccode_node_unref0 (_tmp51_);
11638
12554
                                _vala_ccode_node_unref0 (delegate_target_destroy_notify);
11639
12555
                        }
11640
12556
                        _vala_code_node_unref0 (delegate_type);
11641
12557
                }
11642
12558
        }
11643
12559
        if (vala_property_get_no_accessor_method (prop)) {
11644
 
                ValaCCodeConstant* _tmp46_;
11645
 
                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp46_ = vala_ccode_constant_new ("NULL")));
11646
 
                _vala_ccode_node_unref0 (_tmp46_);
 
12560
                ValaCCodeConstant* _tmp52_;
 
12561
                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp52_ = vala_ccode_constant_new ("NULL")));
 
12562
                _vala_ccode_node_unref0 (_tmp52_);
11647
12563
        }
11648
 
        result = ccall;
 
12564
        result = rv;
11649
12565
        _g_free0 (set_func);
11650
12566
        _vala_code_node_unref0 (base_property);
 
12567
        _vala_ccode_node_unref0 (ccall);
11651
12568
        _vala_code_node_unref0 (array_type);
11652
12569
        return result;
11653
12570
}
11654
12571
 
11655
12572
 
11656
12573
gboolean vala_ccode_base_module_is_address_of_possible (ValaCCodeBaseModule* self, ValaExpression* e) {
11657
 
        gboolean result;
 
12574
        gboolean result = FALSE;
11658
12575
        ValaExpression* _tmp0_;
11659
12576
        ValaMemberAccess* ma;
11660
12577
        g_return_val_if_fail (self != NULL, FALSE);
11692
12609
 
11693
12610
 
11694
12611
ValaCCodeExpression* vala_ccode_base_module_get_address_of_expression (ValaCCodeBaseModule* self, ValaExpression* e, ValaCCodeExpression* ce) {
11695
 
        ValaCCodeExpression* result;
 
12612
        ValaCCodeExpression* result = NULL;
11696
12613
        ValaCCodeCommaExpression* ccomma;
11697
12614
        ValaLocalVariable* temp_decl;
11698
12615
        ValaCCodeExpression* ctemp;
11721
12638
 
11722
12639
 
11723
12640
gboolean vala_ccode_base_module_add_wrapper (ValaCCodeBaseModule* self, const char* wrapper_name) {
11724
 
        gboolean result;
 
12641
        gboolean result = FALSE;
11725
12642
        g_return_val_if_fail (self != NULL, FALSE);
11726
12643
        g_return_val_if_fail (wrapper_name != NULL, FALSE);
11727
12644
        result = vala_collection_add ((ValaCollection*) self->wrappers, wrapper_name);
11730
12647
 
11731
12648
 
11732
12649
gboolean vala_ccode_base_module_add_generated_external_symbol (ValaCCodeBaseModule* self, ValaSymbol* external_symbol) {
11733
 
        gboolean result;
 
12650
        gboolean result = FALSE;
11734
12651
        g_return_val_if_fail (self != NULL, FALSE);
11735
12652
        g_return_val_if_fail (external_symbol != NULL, FALSE);
11736
12653
        result = vala_collection_add ((ValaCollection*) self->priv->generated_external_symbols, external_symbol);
11739
12656
 
11740
12657
 
11741
12658
ValaDataType* vala_ccode_base_module_get_data_type_for_symbol (ValaTypeSymbol* sym) {
11742
 
        ValaDataType* result;
 
12659
        ValaDataType* result = NULL;
11743
12660
        ValaDataType* type;
11744
12661
        g_return_val_if_fail (sym != NULL, NULL);
11745
12662
        type = NULL;
11805
12722
 
11806
12723
 
11807
12724
ValaCCodeExpression* vala_ccode_base_module_default_value_for_type (ValaCCodeBaseModule* self, ValaDataType* type, gboolean initializer_expression) {
11808
 
        ValaCCodeExpression* result;
 
12725
        ValaCCodeExpression* result = NULL;
11809
12726
        ValaTypeSymbol* _tmp0_;
11810
12727
        ValaStruct* st;
11811
12728
        ValaDataType* _tmp1_;
11937
12854
 
11938
12855
 
11939
12856
static ValaCCodeStatement* vala_ccode_base_module_create_property_type_check_statement (ValaCCodeBaseModule* self, ValaProperty* prop, gboolean check_return_type, ValaTypeSymbol* t, gboolean non_null, const char* var_name) {
11940
 
        ValaCCodeStatement* result;
 
12857
        ValaCCodeStatement* result = NULL;
11941
12858
        g_return_val_if_fail (self != NULL, NULL);
11942
12859
        g_return_val_if_fail (prop != NULL, NULL);
11943
12860
        g_return_val_if_fail (t != NULL, NULL);
11955
12872
 
11956
12873
 
11957
12874
ValaCCodeStatement* vala_ccode_base_module_create_type_check_statement (ValaCCodeBaseModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaTypeSymbol* t, gboolean non_null, const char* var_name) {
11958
 
        ValaCCodeStatement* result;
 
12875
        ValaCCodeStatement* result = NULL;
11959
12876
        ValaCCodeFunctionCall* ccheck;
11960
12877
        ValaCodeNode* _tmp15_;
11961
12878
        ValaCreationMethod* cm;
12085
13002
 
12086
13003
 
12087
13004
gint vala_ccode_base_module_get_param_pos (ValaCCodeBaseModule* self, double param_pos, gboolean ellipsis) {
12088
 
        gint result;
 
13005
        gint result = 0;
12089
13006
        g_return_val_if_fail (self != NULL, 0);
12090
13007
        if (!ellipsis) {
12091
13008
                if (param_pos >= 0) {
12108
13025
 
12109
13026
 
12110
13027
ValaCCodeNode* vala_ccode_base_module_get_ccodenode (ValaCCodeBaseModule* self, ValaCodeNode* node) {
12111
 
        ValaCCodeNode* result;
 
13028
        ValaCCodeNode* result = NULL;
12112
13029
        g_return_val_if_fail (self != NULL, NULL);
12113
13030
        g_return_val_if_fail (node != NULL, NULL);
12114
13031
        if (vala_code_node_get_ccodenode (node) == NULL) {
12127
13044
 
12128
13045
 
12129
13046
ValaCCodeStatement* vala_ccode_base_module_create_postcondition_statement (ValaCCodeBaseModule* self, ValaExpression* postcondition) {
12130
 
        ValaCCodeStatement* result;
 
13047
        ValaCCodeStatement* result = NULL;
12131
13048
        ValaCCodeIdentifier* _tmp0_;
12132
13049
        ValaCCodeFunctionCall* _tmp1_;
12133
13050
        ValaCCodeFunctionCall* cassert;
12142
13059
 
12143
13060
 
12144
13061
static gboolean vala_ccode_base_module_real_is_gobject_property (ValaCCodeBaseModule* self, ValaProperty* prop) {
12145
 
        gboolean result;
 
13062
        gboolean result = FALSE;
12146
13063
        g_return_val_if_fail (self != NULL, FALSE);
12147
13064
        g_return_val_if_fail (prop != NULL, FALSE);
12148
13065
        result = FALSE;
12156
13073
 
12157
13074
 
12158
13075
ValaDataType* vala_ccode_base_module_get_this_type (ValaCCodeBaseModule* self) {
12159
 
        ValaDataType* result;
 
13076
        ValaDataType* result = NULL;
12160
13077
        gboolean _tmp0_ = FALSE;
12161
13078
        g_return_val_if_fail (self != NULL, NULL);
12162
13079
        if (vala_ccode_base_module_get_current_method (self) != NULL) {
12185
13102
 
12186
13103
 
12187
13104
ValaCCodeFunctionCall* vala_ccode_base_module_generate_instance_cast (ValaCCodeBaseModule* self, ValaCCodeExpression* expr, ValaTypeSymbol* type) {
12188
 
        ValaCCodeFunctionCall* result;
 
13105
        ValaCCodeFunctionCall* result = NULL;
12189
13106
        ValaCCodeIdentifier* _tmp1_;
12190
13107
        char* _tmp0_;
12191
13108
        ValaCCodeFunctionCall* _tmp2_;
12625
13542
        g_type_class_add_private (klass, sizeof (ValaCCodeBaseModulePrivate));
12626
13543
        VALA_CCODE_MODULE_CLASS (klass)->emit = vala_ccode_base_module_real_emit;
12627
13544
        VALA_CCODE_MODULE_CLASS (klass)->get_value_setter_function = vala_ccode_base_module_real_get_value_setter_function;
 
13545
        VALA_CCODE_MODULE_CLASS (klass)->get_value_taker_function = vala_ccode_base_module_real_get_value_taker_function;
12628
13546
        VALA_CCODE_BASE_MODULE_CLASS (klass)->append_vala_array_free = vala_ccode_base_module_real_append_vala_array_free;
12629
13547
        VALA_CCODE_BASE_MODULE_CLASS (klass)->append_vala_array_move = vala_ccode_base_module_real_append_vala_array_move;
12630
13548
        VALA_CCODE_BASE_MODULE_CLASS (klass)->append_vala_array_length = vala_ccode_base_module_real_append_vala_array_length;
12656
13574
        VALA_CCODE_BASE_MODULE_CLASS (klass)->variable_accessible_in_finally = vala_ccode_base_module_real_variable_accessible_in_finally;
12657
13575
        VALA_CCODE_MODULE_CLASS (klass)->visit_return_statement = vala_ccode_base_module_real_visit_return_statement;
12658
13576
        VALA_CCODE_MODULE_CLASS (klass)->visit_lock_statement = vala_ccode_base_module_real_visit_lock_statement;
 
13577
        VALA_CCODE_MODULE_CLASS (klass)->visit_unlock_statement = vala_ccode_base_module_real_visit_unlock_statement;
12659
13578
        VALA_CCODE_MODULE_CLASS (klass)->visit_delete_statement = vala_ccode_base_module_real_visit_delete_statement;
12660
13579
        VALA_CCODE_MODULE_CLASS (klass)->visit_expression = vala_ccode_base_module_real_visit_expression;
12661
13580
        VALA_CCODE_MODULE_CLASS (klass)->visit_boolean_literal = vala_ccode_base_module_real_visit_boolean_literal;
12663
13582
        VALA_CCODE_MODULE_CLASS (klass)->visit_integer_literal = vala_ccode_base_module_real_visit_integer_literal;
12664
13583
        VALA_CCODE_MODULE_CLASS (klass)->visit_real_literal = vala_ccode_base_module_real_visit_real_literal;
12665
13584
        VALA_CCODE_MODULE_CLASS (klass)->visit_string_literal = vala_ccode_base_module_real_visit_string_literal;
 
13585
        VALA_CCODE_MODULE_CLASS (klass)->visit_regex_literal = vala_ccode_base_module_real_visit_regex_literal;
12666
13586
        VALA_CCODE_MODULE_CLASS (klass)->visit_null_literal = vala_ccode_base_module_real_visit_null_literal;
12667
13587
        VALA_CCODE_BASE_MODULE_CLASS (klass)->get_delegate_target_cname = vala_ccode_base_module_real_get_delegate_target_cname;
12668
13588
        VALA_CCODE_BASE_MODULE_CLASS (klass)->get_delegate_target_cexpression = vala_ccode_base_module_real_get_delegate_target_cexpression;
12697
13617
        self->temp_vars = vala_array_list_new (VALA_TYPE_LOCAL_VARIABLE, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal);
12698
13618
        self->temp_ref_vars = vala_array_list_new (VALA_TYPE_LOCAL_VARIABLE, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal);
12699
13619
        self->next_temp_var_id = 0;
 
13620
        self->next_regex_id = 0;
12700
13621
        self->in_constructor = FALSE;
12701
13622
        self->in_static_or_class_context = FALSE;
12702
13623
        self->current_method_inner_error = FALSE;
12733
13654
        _vala_ccode_node_unref0 (self->prop_enum);
12734
13655
        _vala_ccode_node_unref0 (self->function);
12735
13656
        _vala_ccode_node_unref0 (self->pre_statement_fragment);
 
13657
        _vala_ccode_node_unref0 (self->state_switch_statement);
12736
13658
        _vala_collection_object_unref0 (self->temp_vars);
12737
13659
        _vala_collection_object_unref0 (self->temp_ref_vars);
12738
13660
        _vala_collection_object_unref0 (self->user_marshal_set);
12759
13681
        _vala_code_node_unref0 (self->int64_type);
12760
13682
        _vala_code_node_unref0 (self->uint64_type);
12761
13683
        _vala_code_node_unref0 (self->string_type);
 
13684
        _vala_code_node_unref0 (self->regex_type);
12762
13685
        _vala_code_node_unref0 (self->float_type);
12763
13686
        _vala_code_node_unref0 (self->double_type);
12764
13687
        _vala_code_node_unref0 (self->gtype_type);
12773
13696
        _vala_code_node_unref0 (self->gptrarray_type);
12774
13697
        _vala_code_node_unref0 (self->gthreadpool_type);
12775
13698
        _vala_code_node_unref0 (self->gquark_type);
 
13699
        _vala_code_node_unref0 (self->genumvalue_type);
12776
13700
        _vala_code_node_unref0 (self->gvalue_type);
12777
13701
        _vala_code_node_unref0 (self->mutex_type);
12778
13702
        _vala_code_node_unref0 (self->type_module_type);
12786
13710
 
12787
13711
 
12788
13712
GType vala_ccode_base_module_get_type (void) {
12789
 
        static GType vala_ccode_base_module_type_id = 0;
12790
 
        if (vala_ccode_base_module_type_id == 0) {
 
13713
        static volatile gsize vala_ccode_base_module_type_id__volatile = 0;
 
13714
        if (g_once_init_enter (&vala_ccode_base_module_type_id__volatile)) {
12791
13715
                static const GTypeInfo g_define_type_info = { sizeof (ValaCCodeBaseModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_ccode_base_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCCodeBaseModule), 0, (GInstanceInitFunc) vala_ccode_base_module_instance_init, NULL };
 
13716
                GType vala_ccode_base_module_type_id;
12792
13717
                vala_ccode_base_module_type_id = g_type_register_static (VALA_TYPE_CCODE_MODULE, "ValaCCodeBaseModule", &g_define_type_info, 0);
12793
 
        }
12794
 
        return vala_ccode_base_module_type_id;
 
13718
                g_once_init_leave (&vala_ccode_base_module_type_id__volatile, vala_ccode_base_module_type_id);
 
13719
        }
 
13720
        return vala_ccode_base_module_type_id__volatile;
 
13721
}
 
13722
 
 
13723
 
 
13724
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
 
13725
        if ((array != NULL) && (destroy_func != NULL)) {
 
13726
                int i;
 
13727
                for (i = 0; i < array_length; i = i + 1) {
 
13728
                        if (((gpointer*) array)[i] != NULL) {
 
13729
                                destroy_func (((gpointer*) array)[i]);
 
13730
                        }
 
13731
                }
 
13732
        }
 
13733
}
 
13734
 
 
13735
 
 
13736
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
 
13737
        _vala_array_destroy (array, array_length, destroy_func);
 
13738
        g_free (array);
 
13739
}
 
13740
 
 
13741
 
 
13742
static gint _vala_array_length (gpointer array) {
 
13743
        int length;
 
13744
        length = 0;
 
13745
        if (array) {
 
13746
                while (((gpointer*) array)[length]) {
 
13747
                        length++;
 
13748
                }
 
13749
        }
 
13750
        return length;
12795
13751
}
12796
13752
 
12797
13753