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);
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_);
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_;
764
ValaTypeSymbol* _tmp48_;
765
ValaTypeSymbol* _tmp49_;
766
ValaTypeSymbol* _tmp50_;
789
ValaTypeSymbol* _tmp45_;
790
ValaTypeSymbol* _tmp46_;
791
ValaErrorType* _tmp47_;
767
795
ValaTypeSymbol* _tmp51_;
768
796
ValaTypeSymbol* _tmp52_;
769
ValaDataType* _tmp54_;
797
ValaTypeSymbol* _tmp53_;
798
ValaTypeSymbol* _tmp54_;
799
ValaTypeSymbol* _tmp55_;
800
ValaDataType* _tmp57_;
772
801
ValaStruct* _tmp56_;
773
ValaTypeSymbol* _tmp57_;
802
ValaDataType* _tmp59_;
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) {
795
ValaIterator* _tmp59_;
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_);
799
834
ValaFormalParameter* parameter;
800
835
if (!vala_iterator_next (_parameter_it)) {
869
913
_vala_collection_object_unref0 (_node_it);
871
stream = (_tmp66_ = NULL, _fclose0 (stream), _tmp66_);
915
stream = (_tmp72_ = NULL, _fclose0 (stream), _tmp72_);
872
916
_fclose0 (stream);
874
918
if (vala_code_context_get_header_filename (context) != NULL) {
875
919
ValaCCodeWriter* writer;
877
ValaCCodeOnceSection* _tmp69_;
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)) {
890
vala_report_error (NULL, _tmp67_ = g_strdup_printf ("unable to open `%s' for writing", vala_ccode_writer_get_filename (writer)));
932
if (!vala_ccode_writer_open (writer, vala_code_context_get_version_header (context))) {
934
vala_report_error (NULL, _tmp73_ = g_strdup_printf ("unable to open `%s' for writing", vala_ccode_writer_get_filename (writer)));
892
936
_vala_ccode_writer_unref0 (writer);
893
937
_vala_code_node_unref0 (unichar_struct);
894
938
_vala_collection_object_unref0 (source_files);
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_);
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_);
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_);
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);
941
985
if (vala_code_context_get_internal_header_filename (context) != NULL) {
942
986
ValaCCodeWriter* writer;
944
ValaCCodeOnceSection* _tmp84_;
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)) {
957
vala_report_error (NULL, _tmp82_ = g_strdup_printf ("unable to open `%s' for writing", vala_ccode_writer_get_filename (writer)));
999
if (!vala_ccode_writer_open (writer, vala_code_context_get_version_header (context))) {
1001
vala_report_error (NULL, _tmp88_ = g_strdup_printf ("unable to open `%s' for writing", vala_ccode_writer_get_filename (writer)));
959
1003
_vala_ccode_writer_unref0 (writer);
960
1004
_vala_code_node_unref0 (unichar_struct);
961
1005
_vala_collection_object_unref0 (source_files);
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_);
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_);
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_);
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);
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);
1661
if (!vala_enum_get_has_type_id (en)) {
1664
clist = vala_ccode_initializer_list_new ();
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_);
1673
ValaCCodeInitializerList* _tmp2_;
1674
ValaCCodeConstant* _tmp4_;
1676
ValaCCodeIdentifier* _tmp7_;
1679
ValaCCodeConstant* _tmp8_;
1680
if (!vala_iterator_next (_ev_it)) {
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_);
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_);
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);
1697
_vala_collection_object_unref0 (_ev_it);
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);
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_);
1713
ValaCCodeDeclaration* _tmp14_;
1714
_cdecl_ = (_tmp14_ = vala_ccode_declaration_new ("const GEnumValue"), _vala_ccode_node_unref0 (_cdecl_), _tmp14_);
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_);
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_);
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_);
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_);
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);
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);
1819
1741
if (vala_symbol_is_class_member ((ValaSymbol*) m)) {
1820
1742
ValaTypeSymbol* parent;
1821
ValaCCodeExpression* _tmp9_;
1743
ValaCCodeIdentifier* _tmp8_;
1825
ValaCCodeExpression* _tmp11_;
1746
ValaCCodeFunctionCall* _tmp9_;
1747
ValaCCodeFunctionCall* get_class_private_call;
1748
ValaCCodeIdentifier* _tmp10_;
1749
ValaCCodeExpression* _tmp12_;
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_);
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_);
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_);
1834
1757
_vala_code_node_unref0 (parent);
1758
_vala_ccode_node_unref0 (get_class_private_call);
1836
ValaCCodeExpression* _tmp15_;
1760
ValaCCodeExpression* _tmp16_;
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_);
1841
1766
_g_free0 (_tmp14_);
1842
1767
_g_free0 (_tmp13_);
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);
1864
1788
_vala_ccode_node_unref0 (l);
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))) {
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) {
1813
ValaCCodeDeclaration* _tmp4_;
1887
1814
ValaCCodeDeclaration* _cdecl_;
1889
ValaCCodeVariableDeclarator* _tmp7_;
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_;
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))) {
1896
arr = (_tmp4_ = g_strdup ("[]"), _g_free0 (arr), _tmp4_);
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_);
1902
vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
1824
arr = (_tmp5_ = g_strdup_printf ("[%d]", vala_initializer_list_get_size (initializer_list)), _g_free0 (arr), _tmp5_);
1826
cinitializer = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_constant_get_initializer (c))));
1828
ValaCCodeExpression* _tmp6_;
1829
cinitializer = (_tmp6_ = NULL, _vala_ccode_node_unref0 (cinitializer), _tmp6_);
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_);
1835
if (vala_symbol_is_private_symbol ((ValaSymbol*) c)) {
1836
vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
1838
vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_EXTERN);
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);
1908
ValaCCodeMacroReplacement* _tmp9_;
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);
1852
_vala_code_node_unref0 (initializer_list);
2237
2186
_vala_ccode_node_unref0 (rhs);
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;
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);
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_);
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_);
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_);
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);
2242
if (vala_symbol_get_access ((ValaSymbol*) f) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
2243
ValaCCodeIdentifier* _tmp38_;
2246
ValaCCodeFunctionCall* _tmp39_;
2247
ValaCCodeFunctionCall* ccall;
2248
ValaCCodeIdentifier* _tmp40_;
2249
ValaCCodeExpression* _tmp42_;
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_);
2256
_vala_ccode_node_unref0 (ccall);
2258
ValaCCodeExpression* _tmp45_;
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_);
2263
_vala_ccode_node_unref0 (_tmp43_);
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);
2275
ValaIterator* _local_it;
2276
_local_it = vala_iterable_iterator ((ValaIterable*) self->temp_ref_vars);
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)) {
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);
2299
_vala_collection_object_unref0 (_local_it);
2301
vala_collection_clear ((ValaCollection*) self->temp_vars);
2302
vala_collection_clear ((ValaCollection*) self->temp_ref_vars);
2303
_vala_ccode_node_unref0 (rhs);
2294
ValaCCodeExpression* _tmp36_;
2297
ValaCCodeVariableDeclarator* _tmp38_;
2306
ValaCCodeExpression* _tmp53_;
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);
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);
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)));
2351
if (!vala_array_type_get_fixed_length (array_type)) {
2352
gboolean _tmp66_ = FALSE;
2346
ValaDataType* len_type;
2348
ValaCCodeDeclaration* _tmp43_;
2349
ValaCCodeDeclaration* len_def;
2350
ValaCCodeVariableDeclarator* _tmp47_;
2351
ValaCCodeConstant* _tmp46_;
2358
if (!(dim <= vala_array_type_get_rank (array_type))) {
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_);
2368
if (!vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
2369
vala_ccode_declaration_set_modifiers (len_def, VALA_CCODE_MODIFIERS_EXTERN);
2371
vala_ccode_declaration_set_modifiers (len_def, VALA_CCODE_MODIFIERS_STATIC);
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);
2360
ValaDataType* len_type;
2362
ValaCCodeDeclaration* _tmp61_;
2363
ValaCCodeDeclaration* len_def;
2364
ValaCCodeVariableDeclarator* _tmp65_;
2365
ValaCCodeConstant* _tmp64_;
2372
if (!(dim <= vala_array_type_get_rank (array_type))) {
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_);
2382
if (!vala_symbol_is_private_symbol ((ValaSymbol*) f)) {
2383
vala_ccode_declaration_set_modifiers (len_def, VALA_CCODE_MODIFIERS_EXTERN);
2385
vala_ccode_declaration_set_modifiers (len_def, VALA_CCODE_MODIFIERS_STATIC);
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);
2379
if (vala_array_type_get_rank (array_type) == 1) {
2380
_tmp48_ = vala_symbol_is_internal_symbol ((ValaSymbol*) f);
2385
ValaDataType* len_type;
2387
ValaCCodeDeclaration* _tmp50_;
2388
ValaCCodeDeclaration* _cdecl_;
2389
ValaCCodeVariableDeclarator* _tmp54_;
2390
ValaCCodeConstant* _tmp53_;
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_);
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);
2399
ValaDataType* len_type;
2401
ValaCCodeDeclaration* _tmp68_;
2402
ValaCCodeDeclaration* _cdecl_;
2403
ValaCCodeVariableDeclarator* _tmp72_;
2404
ValaCCodeConstant* _tmp71_;
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_);
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_);
2405
2420
_vala_code_node_unref0 (array_type);
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;
2465
ValaCCodeDeclaration* _tmp64_;
2480
ValaCCodeDeclaration* _tmp82_;
2466
2481
ValaCCodeDeclaration* _cdecl_;
2467
2482
ValaCCodeVariableDeclarator* vardecl;
2469
ValaCCodeExpression* _tmp66_;
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);
3137
3154
_vala_code_node_unref0 (prop);
3138
3155
_vala_code_node_unref0 (t);
3158
gboolean _tmp3_ = FALSE;
3159
if (vala_property_accessor_get_construction (acc)) {
3160
_tmp3_ = !vala_ccode_base_module_is_gobject_property (self, prop);
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);
3141
3173
if (vala_property_get_is_abstract (prop)) {
3176
_tmp5_ = vala_property_get_is_virtual (prop);
3144
_tmp4_ = vala_property_get_is_virtual (prop);
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;
3158
gboolean _tmp6_ = FALSE;
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)) {
3163
_tmp6_ = vala_property_accessor_get_writable (acc);
3195
_tmp7_ = vala_property_accessor_get_writable (acc);
3166
gboolean _tmp7_ = FALSE;
3167
gboolean _tmp9_ = FALSE;
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) {
3173
_tmp8_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PROTECTED;
3205
_tmp9_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PROTECTED;
3180
3212
vala_ccode_base_module_generate_property_accessor_declaration (self, acc, self->header_declarations);
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;
3188
3220
vala_ccode_base_module_generate_property_accessor_declaration (self, acc, self->internal_header_declarations);
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)) {
3196
vala_ccode_formal_parameter_set_type_name (cselfparam, _tmp12_ = g_strconcat (vala_ccode_formal_parameter_get_type_name (cselfparam), "*", NULL));
3228
vala_ccode_formal_parameter_set_type_name (cselfparam, _tmp13_ = g_strconcat (vala_ccode_formal_parameter_get_type_name (cselfparam), "*", NULL));
3199
3231
cvalueparam = NULL;
3200
3232
if (returns_real_struct) {
3201
ValaCCodeFormalParameter* _tmp15_;
3233
ValaCCodeFormalParameter* _tmp16_;
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_);
3205
3238
_g_free0 (_tmp14_);
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));
3215
ValaCCodeFormalParameter* _tmp19_;
3247
ValaCCodeFormalParameter* _tmp20_;
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_);
3219
3252
_g_free0 (_tmp18_);
3222
ValaCCodeFormalParameter* _tmp21_;
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_);
3254
ValaCCodeFormalParameter* _tmp22_;
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_);
3228
3260
if (vala_property_get_is_abstract (prop)) {
3231
_tmp22_ = vala_property_get_is_virtual (prop);
3263
_tmp23_ = vala_property_get_is_virtual (prop);
3234
gboolean _tmp23_ = FALSE;
3235
gboolean _tmp29_ = FALSE;
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;
3248
ValaCCodeFunction* _tmp26_;
3280
ValaCCodeFunction* _tmp27_;
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_);
3252
3285
_g_free0 (_tmp25_);
3255
ValaCCodeFunction* _tmp28_;
3257
self->function = (_tmp28_ = vala_ccode_function_new (_tmp27_ = vala_property_accessor_get_cname (acc), "void"), _vala_ccode_node_unref0 (self->function), _tmp28_);
3287
ValaCCodeFunction* _tmp29_;
3289
self->function = (_tmp29_ = vala_ccode_function_new (_tmp28_ = vala_property_accessor_get_cname (acc), "void"), _vala_ccode_node_unref0 (self->function), _tmp29_);
3260
3292
vala_ccode_function_add_parameter (self->function, cselfparam);
3261
3293
if (vala_property_accessor_get_writable (acc)) {
3296
_tmp31_ = vala_property_accessor_get_construction (acc);
3262
3299
_tmp30_ = TRUE;
3264
_tmp30_ = vala_property_accessor_get_construction (acc);
3301
_tmp30_ = returns_real_struct;
3269
_tmp29_ = returns_real_struct;
3272
3304
vala_ccode_function_add_parameter (self->function, cvalueparam);
3274
3306
if (VALA_IS_ARRAY_TYPE (vala_property_accessor_get_value_type (acc))) {
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_;
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_);
3374
3407
_g_free0 (_tmp45_);
3376
3408
_vala_code_node_unref0 (iface);
3379
ValaCCodeFunctionCall* _tmp51_;
3380
ValaCCodeIdentifier* _tmp50_;
3411
ValaCCodeFunctionCall* _tmp52_;
3412
ValaCCodeIdentifier* _tmp51_;
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_);
3386
3419
_g_free0 (_tmp49_);
3388
3420
_vala_code_node_unref0 (cl);
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_;
3395
ValaCCodeFunctionCall* _tmp55_;
3425
ValaCCodeMemberAccess* _tmp55_;
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_);
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)));
3489
3521
_vala_ccode_node_unref0 (vcast);
3491
3523
if (!vala_property_get_is_abstract (prop)) {
3492
gboolean _tmp72_ = FALSE;
3524
gboolean _tmp73_ = FALSE;
3493
3525
gboolean is_virtual;
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) {
3507
_tmp72_ = vala_property_get_base_interface_property (prop) != NULL;
3539
_tmp73_ = vala_property_get_base_interface_property (prop) != NULL;
3509
is_virtual = _tmp72_;
3541
is_virtual = _tmp73_;
3511
3543
if (is_virtual) {
3512
3544
if (vala_property_accessor_get_readable (acc)) {
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_);
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_);
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_);
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_);
3525
cname = (_tmp77_ = vala_property_accessor_get_cname (acc), _g_free0 (cname), _tmp77_);
3557
cname = (_tmp78_ = vala_property_accessor_get_cname (acc), _g_free0 (cname), _tmp78_);
3527
3559
if (vala_property_accessor_get_writable (acc)) {
3562
_tmp80_ = vala_property_accessor_get_construction (acc);
3528
3565
_tmp79_ = TRUE;
3530
_tmp79_ = vala_property_accessor_get_construction (acc);
3567
_tmp79_ = returns_real_struct;
3535
_tmp78_ = returns_real_struct;
3538
ValaCCodeFunction* _tmp80_;
3539
self->function = (_tmp80_ = vala_ccode_function_new (cname, "void"), _vala_ccode_node_unref0 (self->function), _tmp80_);
3541
ValaCCodeFunction* _tmp82_;
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_);
3570
ValaCCodeFunction* _tmp81_;
3571
self->function = (_tmp81_ = vala_ccode_function_new (cname, "void"), _vala_ccode_node_unref0 (self->function), _tmp81_);
3573
ValaCCodeFunction* _tmp83_;
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_);
3546
3578
base_type = NULL;
3547
3579
if (vala_property_get_binding (prop) == MEMBER_BINDING_INSTANCE) {
3548
3580
if (is_virtual) {
3549
ValaCCodeFormalParameter* _tmp86_;
3581
ValaCCodeFormalParameter* _tmp87_;
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_);
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_);
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_);
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_);
3565
3597
vala_ccode_function_add_parameter (self->function, cselfparam);
3568
3600
if (vala_property_accessor_get_writable (acc)) {
3603
_tmp89_ = vala_property_accessor_get_construction (acc);
3569
3606
_tmp88_ = TRUE;
3571
_tmp88_ = vala_property_accessor_get_construction (acc);
3608
_tmp88_ = returns_real_struct;
3576
_tmp87_ = returns_real_struct;
3579
3611
vala_ccode_function_add_parameter (self->function, cvalueparam);
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)) {
3588
length_ctype = (_tmp89_ = g_strdup ("int*"), _g_free0 (length_ctype), _tmp89_);
3620
length_ctype = (_tmp90_ = g_strdup ("int*"), _g_free0 (length_ctype), _tmp90_);
3597
const char* _tmp91_;
3598
ValaCCodeFormalParameter* _tmp93_;
3629
const char* _tmp92_;
3630
ValaCCodeFormalParameter* _tmp94_;
3604
3636
if (!(dim <= vala_array_type_get_rank (array_type))) {
3608
3640
if (vala_property_accessor_get_readable (acc)) {
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_);
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_);
3619
3651
_vala_code_node_unref0 (array_type);
3620
3652
_g_free0 (length_ctype);
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))));
3629
const char* _tmp95_;
3630
3661
const char* _tmp96_;
3631
ValaCCodeFormalParameter* _tmp98_;
3634
if (vala_property_accessor_get_readable (acc)) {
3662
const char* _tmp97_;
3663
ValaCCodeFormalParameter* _tmp99_;
3639
3665
_tmp96_ = NULL;
3640
3666
if (vala_property_accessor_get_readable (acc)) {
3641
_tmp96_ = "gpointer*";
3643
_tmp96_ = "gpointer";
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_);
3672
if (vala_property_accessor_get_readable (acc)) {
3673
_tmp97_ = "gpointer*";
3675
_tmp97_ = "gpointer";
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_);
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)) {
3688
gboolean _tmp102_ = FALSE;
3689
if (vala_property_accessor_get_readable (acc)) {
3692
_tmp102_ = vala_property_accessor_get_writable (acc);
3694
_tmp101_ = !_tmp102_;
3654
3697
_tmp100_ = TRUE;
3656
gboolean _tmp101_ = FALSE;
3657
if (vala_property_accessor_get_readable (acc)) {
3660
_tmp101_ = vala_property_accessor_get_writable (acc);
3662
_tmp100_ = !_tmp101_;
3699
_tmp100_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3664
3701
if (_tmp100_) {
3667
_tmp99_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3670
3702
vala_ccode_function_set_modifiers (self->function, vala_ccode_function_get_modifiers (self->function) | VALA_CCODE_MODIFIERS_STATIC);
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) {
3676
ValaCCodeDeclaration* _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_);
3689
3721
if (vala_property_accessor_get_readable (acc)) {
3690
_tmp107_ = !returns_real_struct;
3722
_tmp108_ = !returns_real_struct;
3695
gboolean _tmp108_ = FALSE;
3727
gboolean _tmp109_ = FALSE;
3696
3728
if (vala_property_accessor_get_exit_block (acc) == NULL) {
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_);
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_);
3705
ValaCCodeDeclaration* _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_);
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_);
3726
3758
if (vala_property_get_binding (prop) == MEMBER_BINDING_INSTANCE) {
3727
_tmp115_ = !is_virtual;
3759
_tmp116_ = !is_virtual;
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)) {
3738
_tmp116_ = returns_real_struct;
3770
_tmp117_ = returns_real_struct;
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_);
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_);
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_);
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);
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);
3790
gboolean _tmp122_ = FALSE;
3791
if (vala_property_accessor_get_writable (acc)) {
3794
_tmp122_ = vala_property_accessor_get_construction (acc);
3796
_tmp120_ = _tmp122_;
3755
3798
_tmp120_ = FALSE;
3757
3800
if (_tmp120_) {
3758
gboolean _tmp121_ = FALSE;
3759
if (vala_property_accessor_get_writable (acc)) {
3762
_tmp121_ = vala_property_accessor_get_construction (acc);
3764
_tmp119_ = _tmp121_;
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);
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);
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);
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;
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_;
3900
ValaCCodeExpression* _tmp8_;
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);
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));
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));
3926
_tmp3_ = !is_unowned_delegate;
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);
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_);
3948
_vala_ccode_node_unref0 (_tmp8_);
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)));
3962
ValaCCodeExpressionStatement* _tmp25_;
3963
ValaCCodeAssignment* _tmp24_;
3964
ValaCCodeIdentifier* _tmp23_;
3967
ValaCCodeMemberAccess* _tmp20_;
3970
ValaCCodeExpression* _tmp17_;
3976
if (!(dim <= vala_array_type_get_rank (array_type))) {
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);
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_);
3988
_vala_ccode_node_unref0 (_tmp20_);
3991
_vala_ccode_node_unref0 (_tmp17_);
3996
_vala_code_node_unref0 (array_type);
3998
if (VALA_IS_DELEGATE_TYPE (vala_formal_parameter_get_parameter_type (param))) {
4001
ValaCCodeExpressionStatement* _tmp37_;
4002
ValaCCodeAssignment* _tmp36_;
4003
ValaCCodeIdentifier* _tmp35_;
4006
ValaCCodeMemberAccess* _tmp32_;
4009
ValaCCodeExpression* _tmp29_;
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);
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_);
4020
_vala_ccode_node_unref0 (_tmp32_);
4023
_vala_ccode_node_unref0 (_tmp29_);
4025
if (vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param))) {
4028
ValaCCodeExpressionStatement* _tmp49_;
4029
ValaCCodeAssignment* _tmp48_;
4030
ValaCCodeIdentifier* _tmp47_;
4033
ValaCCodeMemberAccess* _tmp44_;
4036
ValaCCodeExpression* _tmp41_;
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);
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_);
4047
_vala_ccode_node_unref0 (_tmp44_);
4050
_vala_ccode_node_unref0 (_tmp41_);
4055
if (vala_ccode_base_module_requires_destroy (self, param_type)) {
4056
_tmp50_ = !is_unowned_delegate;
4061
gboolean old_coroutine;
4062
ValaMemberAccess* ma;
4063
ValaDataType* _tmp51_;
4064
ValaCCodeExpressionStatement* _tmp57_;
4065
ValaCCodeExpression* _tmp56_;
4066
ValaCCodeMemberAccess* _tmp55_;
4068
ValaCCodeIdentifier* _tmp53_;
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);
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_);
4084
_vala_ccode_node_unref0 (_tmp53_);
4086
if (old_coroutine) {
4087
vala_method_set_coroutine (vala_ccode_base_module_get_current_method (self), TRUE);
4089
_vala_code_node_unref0 (ma);
4091
_vala_code_node_unref0 (param_type);
4092
_vala_ccode_node_unref0 (cparam);
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);
3889
4130
ValaCCodeStruct* _tmp2_;
3890
4131
ValaCCodeStruct* data;
3891
ValaCCodeVariableDeclarator* _tmp42_;
3893
ValaCCodeTypeDefinition* _tmp43_;
4132
ValaCCodeVariableDeclarator* _tmp46_;
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_;
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_;
4147
ValaCCodeIdentifier* _tmp103_;
4148
ValaCCodeFunctionCall* _tmp104_;
3908
4149
ValaCCodeFunctionCall* data_free;
3909
ValaCCodeIdentifier* _tmp154_;
3910
ValaCCodeIdentifier* _tmp156_;
3912
ValaCCodeExpressionStatement* _tmp157_;
3915
ValaCCodeFunction* _tmp160_;
4150
ValaCCodeIdentifier* _tmp105_;
4151
ValaCCodeIdentifier* _tmp107_;
4153
ValaCCodeExpressionStatement* _tmp108_;
4156
ValaCCodeFunction* _tmp111_;
3916
4157
ValaCCodeFunction* ref_fun;
3917
ValaCCodeFormalParameter* _tmp163_;
3920
ValaCCodeFunction* _tmp164_;
3921
ValaCCodeBlock* _tmp165_;
3922
ValaCCodeExpressionStatement* _tmp170_;
3923
ValaCCodeUnaryExpression* _tmp169_;
3924
ValaCCodeMemberAccess* _tmp168_;
3925
ValaCCodeIdentifier* _tmp167_;
3927
ValaCCodeReturnStatement* _tmp173_;
3928
ValaCCodeIdentifier* _tmp172_;
3931
ValaCCodeFunction* _tmp175_;
4158
ValaCCodeFormalParameter* _tmp114_;
4161
ValaCCodeFunction* _tmp115_;
4162
ValaCCodeBlock* _tmp116_;
4163
ValaCCodeExpressionStatement* _tmp121_;
4164
ValaCCodeUnaryExpression* _tmp120_;
4165
ValaCCodeMemberAccess* _tmp119_;
4166
ValaCCodeIdentifier* _tmp118_;
4168
ValaCCodeReturnStatement* _tmp124_;
4169
ValaCCodeIdentifier* _tmp123_;
4172
ValaCCodeFunction* _tmp126_;
3932
4173
ValaCCodeFunction* unref_fun;
3933
ValaCCodeFormalParameter* _tmp178_;
3936
ValaCCodeFunction* _tmp179_;
3937
ValaCCodeBlock* _tmp180_;
3938
ValaCCodeConstant* _tmp185_;
3939
ValaCCodeUnaryExpression* _tmp184_;
3940
ValaCCodeMemberAccess* _tmp183_;
3941
ValaCCodeIdentifier* _tmp182_;
3943
ValaCCodeBinaryExpression* _tmp186_;
4174
ValaCCodeFormalParameter* _tmp129_;
4177
ValaCCodeFunction* _tmp130_;
4178
ValaCCodeBlock* _tmp131_;
4179
ValaCCodeConstant* _tmp136_;
4180
ValaCCodeUnaryExpression* _tmp135_;
4181
ValaCCodeMemberAccess* _tmp134_;
4182
ValaCCodeIdentifier* _tmp133_;
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;
4024
4277
local = (ValaLocalVariable*) vala_iterator_get (_local_it);
4025
4278
if (vala_local_variable_get_captured (local)) {
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);
4031
4286
_g_free0 (_tmp26_);
4032
4287
_g_free0 (_tmp25_);
4035
4288
if (VALA_IS_ARRAY_TYPE (vala_local_variable_get_variable_type (local))) {
4036
4289
ValaArrayType* array_type;
4037
4292
array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_local_variable_get_variable_type (local)));
4051
4306
if (!(dim <= vala_array_type_get_rank (array_type))) {
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));
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);
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);
4060
4318
_vala_code_node_unref0 (array_type);
4062
4320
if (VALA_IS_DELEGATE_TYPE (vala_local_variable_get_variable_type (local))) {
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))));
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);
4068
4326
if (vala_data_type_get_value_owned (vala_local_variable_get_variable_type (local))) {
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))));
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);
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_;
4085
ValaCCodeIdentifier* _tmp36_;
4338
ValaDataType* _tmp38_;
4339
ValaCCodeExpressionStatement* _tmp44_;
4340
ValaCCodeExpression* _tmp43_;
4341
ValaCCodeMemberAccess* _tmp42_;
4343
ValaCCodeIdentifier* _tmp40_;
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));
4111
4369
_vala_collection_object_unref0 (_local_it);
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));
4127
ValaCCodeExpressionStatement* _tmp53_;
4128
ValaCCodeAssignment* _tmp52_;
4129
ValaCCodeExpression* _tmp51_;
4131
vala_ccode_struct_add_field (self->closure_struct, _tmp48_ = g_strconcat (struct_name, "*", NULL), _tmp49_ = g_strdup_printf ("_data%d_", block_id));
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_);
4385
ValaCCodeExpressionStatement* _tmp57_;
4386
ValaCCodeAssignment* _tmp56_;
4387
ValaCCodeExpression* _tmp55_;
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);
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_);
4399
ValaCCodeDeclaration* _tmp59_;
4142
4400
ValaCCodeDeclaration* data_decl;
4143
ValaCCodeVariableDeclarator* _tmp57_;
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_);
4401
ValaCCodeVariableDeclarator* _tmp61_;
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_);
4149
4407
vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) data_decl);
4150
4408
_vala_ccode_node_unref0 (data_decl);
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_);
4159
4417
if (parent_block != NULL) {
4160
4418
gint parent_block_id;
4161
ValaCCodeIdentifier* _tmp65_;
4163
ValaCCodeFunctionCall* _tmp66_;
4419
ValaCCodeIdentifier* _tmp69_;
4421
ValaCCodeFunctionCall* _tmp70_;
4164
4422
ValaCCodeFunctionCall* ref_call;
4165
ValaCCodeExpression* _tmp68_;
4167
ValaCCodeExpressionStatement* _tmp74_;
4168
ValaCCodeAssignment* _tmp73_;
4169
ValaCCodeMemberAccess* _tmp72_;
4423
ValaCCodeExpression* _tmp72_;
4171
ValaCCodeExpression* _tmp70_;
4425
ValaCCodeExpressionStatement* _tmp78_;
4426
ValaCCodeAssignment* _tmp77_;
4427
ValaCCodeMemberAccess* _tmp76_;
4429
ValaCCodeExpression* _tmp74_;
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_);
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_);
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_);
4441
_vala_ccode_node_unref0 (_tmp74_);
4185
4443
_vala_ccode_node_unref0 (ref_call);
4187
gboolean _tmp75_ = FALSE;
4445
gboolean _tmp79_ = FALSE;
4446
gboolean _tmp80_ = FALSE;
4188
4447
if (self->in_constructor) {
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;
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;
4458
gboolean _tmp83_ = FALSE;
4459
if (!VALA_IS_CREATION_METHOD (vala_ccode_base_module_get_current_method (self))) {
4462
_tmp83_ = vala_method_get_body (vala_ccode_base_module_get_current_method (self)) != b;
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;
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_;
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_);
4486
ValaCCodeExpression* _tmp88_;
4487
ValaCCodeExpressionStatement* _tmp93_;
4488
ValaCCodeAssignment* _tmp92_;
4489
ValaCCodeMemberAccess* _tmp91_;
4490
ValaCCodeExpression* _tmp90_;
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_);
4219
4501
_vala_ccode_node_unref0 (ref_call);
4236
4518
param = (ValaFormalParameter*) vala_iterator_get (_param_it);
4237
4519
if (vala_formal_parameter_get_captured (param)) {
4238
ValaDataType* param_type;
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_;
4250
ValaCCodeExpression* _tmp96_;
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)));
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));
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));
4271
_tmp91_ = !is_unowned_delegate;
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);
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_);
4293
_vala_ccode_node_unref0 (_tmp96_);
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)));
4307
ValaCCodeExpressionStatement* _tmp113_;
4308
ValaCCodeAssignment* _tmp112_;
4309
ValaCCodeIdentifier* _tmp111_;
4312
ValaCCodeMemberAccess* _tmp108_;
4315
ValaCCodeExpression* _tmp105_;
4321
if (!(dim <= vala_array_type_get_rank (array_type))) {
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_);
4341
_vala_code_node_unref0 (array_type);
4343
if (VALA_IS_DELEGATE_TYPE (vala_formal_parameter_get_parameter_type (param))) {
4346
ValaCCodeExpressionStatement* _tmp125_;
4347
ValaCCodeAssignment* _tmp124_;
4348
ValaCCodeIdentifier* _tmp123_;
4351
ValaCCodeMemberAccess* _tmp120_;
4354
ValaCCodeExpression* _tmp117_;
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))) {
4373
ValaCCodeExpressionStatement* _tmp137_;
4374
ValaCCodeAssignment* _tmp136_;
4375
ValaCCodeIdentifier* _tmp135_;
4378
ValaCCodeMemberAccess* _tmp132_;
4381
ValaCCodeExpression* _tmp129_;
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_);
4400
if (vala_ccode_base_module_requires_destroy (self, param_type)) {
4401
_tmp138_ = !is_unowned_delegate;
4406
gboolean old_coroutine;
4407
ValaMemberAccess* ma;
4408
ValaDataType* _tmp139_;
4409
ValaCCodeExpressionStatement* _tmp145_;
4410
ValaCCodeExpression* _tmp144_;
4411
ValaCCodeMemberAccess* _tmp143_;
4413
ValaCCodeIdentifier* _tmp141_;
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);
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);
4434
_vala_code_node_unref0 (ma);
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);
4439
4522
_vala_code_node_unref0 (param);
4441
4524
_vala_collection_object_unref0 (_param_it);
4443
4526
if (vala_method_get_coroutine (m)) {
4444
ValaCCodeExpressionStatement* _tmp151_;
4445
ValaCCodeAssignment* _tmp150_;
4446
ValaCCodeIdentifier* _tmp149_;
4447
ValaCCodeMemberAccess* _tmp148_;
4448
ValaCCodeExpression* _tmp147_;
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_;
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_);
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);
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));
4560
vala_ccode_base_module_capture_parameter (self, vala_property_accessor_get_value_parameter (acc), data, cblock, block_id, free_block);
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);
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);
4602
4718
m = _vala_code_node_ref0 (VALA_METHOD (vala_symbol_get_parent_symbol ((ValaSymbol*) b)));
4605
ValaIterator* _tmp199_;
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_);
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)) {
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));
4622
_tmp200_ = vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_IN;
4734
_tmp155_ = !vala_formal_parameter_get_ellipsis (param);
4739
_tmp154_ = vala_ccode_base_module_requires_destroy (self, vala_formal_parameter_get_parameter_type (param));
4744
_tmp153_ = vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_IN;
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);
4642
4764
_vala_code_node_unref0 (param);
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_;
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_);
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_);
5315
ValaCCodeExpressionStatement* _tmp78_;
5316
ValaCCodeAssignment* _tmp77_;
5317
ValaCCodeMemberAccess* _tmp76_;
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_);
5325
_vala_ccode_node_unref0 (_tmp74_);
5143
ValaCCodeVariableDeclarator* _tmp80_;
5329
ValaCCodeStatement* post_stmt;
5332
ValaCCodeVariableDeclarator* _tmp83_;
5144
5333
ValaCCodeVariableDeclarator* cvar;
5146
ValaCCodeDeclaration* _tmp82_;
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_);
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_);
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));
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);
5357
if (post_stmt != NULL) {
5358
vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) post_stmt);
5360
_vala_ccode_node_unref0 (post_stmt);
5161
5361
_vala_ccode_node_unref0 (cvar);
5162
5362
_vala_ccode_node_unref0 (_cdecl_);
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));
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_;
5179
ValaCCodeConstant* _tmp90_;
5181
ValaCCodeBinaryExpression* _tmp91_;
5375
ValaCCodeFunctionCall* _tmp89_;
5376
ValaCCodeFunctionCall* sizeof_call;
5377
ValaCCodeIdentifier* _tmp91_;
5379
ValaCCodeConstant* _tmp93_;
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_);
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_);
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);
6588
6797
_tmp15_ = FALSE;
6591
ValaCCodeUnaryExpression* _tmp16_;
6800
ValaTypeSymbol* _tmp16_;
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));
6806
_tmp17_ = vala_struct_is_simple_type (st);
6598
6808
_tmp17_ = FALSE;
6601
ValaCCodeIdentifier* _tmp18_;
6602
ValaCCodeFunctionCall* _tmp19_;
6811
vala_ccode_function_call_add_argument (ccall, cvar);
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_);
6817
if (self->gvalue_type != NULL) {
6818
_tmp19_ = vala_data_type_get_data_type (type) == VALA_TYPESYMBOL (self->gvalue_type);
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);
6621
6844
_vala_ccode_node_unref0 (cisvalid);
6622
6845
_vala_ccode_node_unref0 (ccomma);
6624
6847
result = (ValaCCodeExpression*) ccall;
6848
_vala_code_node_unref0 (st);
6851
_vala_code_node_unref0 (st);
6628
6853
if (VALA_IS_CCODE_IDENTIFIER (vala_ccode_function_call_get_call (ccall))) {
6629
_tmp25_ = !VALA_IS_ARRAY_TYPE (type);
6634
_tmp24_ = !is_macro_definition;
6854
_tmp27_ = !VALA_IS_ARRAY_TYPE (type);
6859
_tmp26_ = !is_macro_definition;
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_;
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_);
6874
ValaCCodeMacroReplacement* _tmp31_;
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_);
6655
6880
_vala_ccode_node_unref0 (macro);
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);
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))) {
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));
6679
6904
result = (ValaCCodeExpression*) vala_ccode_constant_new ("NULL");
6680
6905
_vala_ccode_node_unref0 (ccall);
6681
6906
_vala_ccode_node_unref0 (cisnull);
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);
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) {
6922
_tmp43_ = vala_data_type_get_data_type (type) == self->garray_type;
6927
_tmp42_ = vala_data_type_get_data_type (type) == self->gbytearray_type;
6695
6930
_tmp41_ = TRUE;
6697
_tmp41_ = vala_data_type_get_data_type (type) == self->garray_type;
6932
_tmp41_ = vala_data_type_get_data_type (type) == self->gptrarray_type;
6702
_tmp40_ = vala_data_type_get_data_type (type) == self->gbytearray_type;
6707
_tmp39_ = vala_data_type_get_data_type (type) == self->gptrarray_type;
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_);
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_);
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;
6744
6969
if (!(dim <= vala_array_type_get_rank (array_type))) {
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_);
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_);
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));
6767
ValaCCodeIdentifier* _tmp52_;
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_);
6992
ValaCCodeIdentifier* _tmp54_;
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_);
6772
6997
vala_ccode_function_call_add_argument (ccall, csizeexpr);
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_);
6785
7010
_vala_ccode_node_unref0 (csizeexpr);
6786
7011
_vala_code_node_unref0 (st);
6867
7091
if (vala_collection_get_size ((ValaCollection*) VALA_LIST (self->temp_ref_vars)) == 0) {
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_);
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);
7103
vala_ccode_comma_expression_append_expression (expr_list, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) expr)));
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_);
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);
6882
7122
ValaIterator* _local_it;
6883
7123
_local_it = vala_iterable_iterator ((ValaIterable*) self->temp_ref_vars);
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)) {
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);
6904
7144
_vala_collection_object_unref0 (_local_it);
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_);
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);
7171
7421
gboolean _tmp0_ = FALSE;
7172
7422
gboolean _tmp1_ = FALSE;
7173
7423
gboolean _tmp2_ = FALSE;
7174
if (!vala_iterator_next (_local_it)) {
7177
local = (ValaLocalVariable*) vala_iterator_get (_local_it);
7178
if (vala_symbol_get_active ((ValaSymbol*) local)) {
7179
_tmp2_ = !vala_local_variable_get_floating (local);
7184
_tmp1_ = !vala_local_variable_get_captured (local);
7189
_tmp0_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
7194
ValaMemberAccess* ma;
7195
ValaDataType* _tmp3_;
7424
gboolean _tmp3_ = FALSE;
7425
if (!vala_iterator_next (_local_it)) {
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);
7435
_tmp2_ = !vala_local_variable_get_floating (local);
7440
_tmp1_ = !vala_local_variable_get_captured (local);
7445
_tmp0_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
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);
7465
_vala_code_node_unref0 (local);
7467
_vala_collection_object_unref0 (_local_it);
7469
if (vala_block_get_captured (b)) {
7471
ValaCCodeIdentifier* _tmp9_;
7473
ValaCCodeFunctionCall* _tmp10_;
7474
ValaCCodeFunctionCall* data_unref;
7475
ValaCCodeExpression* _tmp12_;
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_);
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);
7488
gboolean _tmp14_ = FALSE;
7489
gboolean _tmp15_ = FALSE;
7490
if (VALA_IS_LOOP (vala_code_node_get_parent_node ((ValaCodeNode*) b))) {
7493
_tmp15_ = VALA_IS_FOREACH_STATEMENT (vala_code_node_get_parent_node ((ValaCodeNode*) b));
7498
_tmp14_ = VALA_IS_SWITCH_STATEMENT (vala_code_node_get_parent_node ((ValaCodeNode*) b));
7501
_vala_code_node_unref0 (b);
7502
_vala_collection_object_unref0 (local_vars);
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);
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);
7513
_vala_code_node_unref0 (b);
7514
_vala_collection_object_unref0 (local_vars);
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);
7523
void vala_ccode_base_module_append_error_free (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCCodeFragment* cfrag, ValaTryStatement* current_try) {
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);
7533
ValaIterator* _local_it;
7534
_local_it = vala_iterable_iterator ((ValaIterable*) local_vars);
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)) {
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);
7551
_tmp2_ = !vala_local_variable_get_floating (local);
7556
_tmp1_ = !vala_local_variable_get_captured (local);
7561
_tmp0_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
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);
7232
gboolean _tmp13_ = FALSE;
7233
gboolean _tmp14_ = FALSE;
7234
if (VALA_IS_LOOP (vala_code_node_get_parent_node ((ValaCodeNode*) b))) {
7237
_tmp14_ = VALA_IS_FOREACH_STATEMENT (vala_code_node_get_parent_node ((ValaCodeNode*) b));
7242
_tmp13_ = VALA_IS_SWITCH_STATEMENT (vala_code_node_get_parent_node ((ValaCodeNode*) b));
7245
_vala_code_node_unref0 (b);
7246
_vala_collection_object_unref0 (local_vars);
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);
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);
7257
_vala_code_node_unref0 (b);
7258
_vala_collection_object_unref0 (local_vars);
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);
7267
void vala_ccode_base_module_append_error_free (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCCodeFragment* cfrag, ValaTryStatement* current_try) {
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);
7277
ValaIterator* _local_it;
7278
_local_it = vala_iterable_iterator ((ValaIterable*) local_vars);
7280
ValaLocalVariable* local;
7281
gboolean _tmp0_ = FALSE;
7282
gboolean _tmp1_ = FALSE;
7283
if (!vala_iterator_next (_local_it)) {
7286
local = (ValaLocalVariable*) vala_iterator_get (_local_it);
7287
if (vala_symbol_get_active ((ValaSymbol*) local)) {
7288
_tmp1_ = !vala_local_variable_get_floating (local);
7293
_tmp0_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
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);
7310
_vala_code_node_unref0 (local);
7312
_vala_collection_object_unref0 (_local_it);
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);
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_);
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_);
7839
8116
if (vala_symbol_is_class_member ((ValaSymbol*) member)) {
7840
ValaCCodeExpression* _tmp9_;
7844
ValaCCodeExpression* _tmp11_;
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_);
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_);
8117
ValaCCodeExpression* klass;
8118
gboolean _tmp6_ = FALSE;
8119
gboolean _tmp7_ = FALSE;
8120
gboolean _tmp8_ = FALSE;
8121
ValaCCodeIdentifier* _tmp18_;
8124
ValaCCodeFunctionCall* _tmp19_;
8125
ValaCCodeFunctionCall* get_class_private_call;
8126
ValaCCodeExpression* _tmp21_;
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;
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;
8148
gboolean _tmp10_ = FALSE;
8149
if (self->in_constructor) {
8150
_tmp10_ = !self->in_static_or_class_context;
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);
8168
ValaCCodeExpression* _tmp15_;
8169
klass = (_tmp15_ = (ValaCCodeExpression*) vala_ccode_identifier_new ("klass"), _vala_ccode_node_unref0 (klass), _tmp15_);
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_);
8175
_vala_ccode_node_unref0 (klass);
8176
_vala_ccode_node_unref0 (get_class_private_call);
7855
8180
char* lock_name;
7856
ValaCCodeExpression* _tmp15_;
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_);
8181
ValaCCodeExpression* _tmp25_;
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_);
7861
8186
_g_free0 (lock_name);
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_);
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_);
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);
7885
8190
_vala_code_node_unref0 (inner_node);
7886
8191
_vala_code_node_unref0 (member);
7887
8192
_vala_code_node_unref0 (parent);
8197
static void vala_ccode_base_module_real_visit_lock_statement (ValaCCodeModule* base, ValaLockStatement* stmt) {
8198
ValaCCodeBaseModule * self;
8199
ValaCCodeExpression* l;
8200
ValaCCodeIdentifier* _tmp2_;
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);
8224
static void vala_ccode_base_module_real_visit_unlock_statement (ValaCCodeModule* base, ValaUnlockStatement* stmt) {
8225
ValaCCodeBaseModule * self;
8226
ValaCCodeExpression* l;
8227
ValaCCodeIdentifier* _tmp2_;
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);
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_);
8514
static void vala_ccode_base_module_real_visit_regex_literal (ValaCCodeModule* base, ValaRegexLiteral* expr) {
8515
ValaCCodeBaseModule * self;
8523
ValaLocalVariable* regex_var;
8524
ValaCCodeDeclaration* _cdecl_;
8529
ValaCCodeVariableDeclarator* _tmp33_;
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")) {
8541
flags = (_tmp2_ = g_strconcat (flags, " | G_REGEX_CASELESS", NULL), _g_free0 (flags), _tmp2_);
8543
if (string_contains (parts[1], "m")) {
8545
flags = (_tmp3_ = g_strconcat (flags, " | G_REGEX_MULTILINE", NULL), _g_free0 (flags), _tmp3_);
8547
if (string_contains (parts[1], "s")) {
8549
flags = (_tmp4_ = g_strconcat (flags, " | G_REGEX_DOTALL", NULL), _g_free0 (flags), _tmp4_);
8551
if (string_contains (parts[1], "x")) {
8553
flags = (_tmp5_ = g_strconcat (flags, " | G_REGEX_EXTENDED", NULL), _g_free0 (flags), _tmp5_);
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);
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_);
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);
8647
_vala_code_node_unref0 (regex_var);
8648
_vala_ccode_node_unref0 (_cdecl_);
8650
_vala_ccode_node_unref0 (regex_const);
8134
8654
static void vala_ccode_base_module_real_visit_null_literal (ValaCCodeModule* base, ValaNullLiteral* expr) {
8135
8655
ValaCCodeBaseModule * self;
8136
8656
ValaCCodeConstant* _tmp0_;
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)) {
9719
_tmp3_ = _vala_strcmp0 (_tmp4_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE), "va_list") == 0;
9176
9724
_tmp2_ = FALSE;
9182
_tmp1_ = vala_collection_get_size ((ValaCollection*) (_tmp3_ = vala_object_creation_expression_get_object_initializer (expr))) > 0;
9183
_vala_collection_object_unref0 (_tmp3_);
9730
_tmp1_ = vala_collection_get_size ((ValaCollection*) (_tmp5_ = vala_object_creation_expression_get_object_initializer (expr))) > 0;
9731
_vala_collection_object_unref0 (_tmp5_);
9186
ValaLocalVariable* temp_decl;
9187
ValaCCodeExpression* _tmp5_;
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_);
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);
9744
ValaCCodeExpression* _tmp9_;
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_);
9749
ValaLocalVariable* temp_decl;
9750
ValaCCodeExpression* _tmp11_;
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_);
9756
_vala_code_node_unref0 (temp_decl);
9758
_vala_code_node_unref0 (local);
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_;
9205
ValaCCodeExpression* _tmp13_;
9765
ValaCCodeUnaryExpression* _tmp14_;
9766
ValaCCodeConstant* _tmp15_;
9767
ValaCCodeIdentifier* _tmp18_;
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_);
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_);
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);
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)) {
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);
9227
ValaCCodeConstant* _tmp15_;
9228
vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp15_ = vala_ccode_constant_new ("NULL")));
9229
_vala_ccode_node_unref0 (_tmp15_);
9792
ValaCCodeConstant* _tmp21_;
9793
vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) (_tmp21_ = vala_ccode_constant_new ("NULL")));
9794
_vala_ccode_node_unref0 (_tmp21_);
9231
9796
if (VALA_IS_METHOD (vala_expression_get_symbol_reference ((ValaExpression*) expr))) {
9233
9798
ValaList* params;
9234
9799
ValaCCodeFunctionCall* creation_call;
9235
ValaTypeSymbol* _tmp16_;
9800
ValaTypeSymbol* _tmp22_;
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;
9243
9808
gint arg_pos = 0;
9244
9809
ValaIterator* params_it;
9246
9811
gint min_pos = 0;
9247
gboolean _tmp47_ = FALSE;
9248
gboolean _tmp48_ = FALSE;
9249
ValaCCodeExpression* _tmp55_;
9812
gboolean _tmp62_ = FALSE;
9813
gboolean _tmp63_ = FALSE;
9814
ValaCCodeExpression* _tmp70_;
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_;
9261
ValaCCodeIdentifier* _tmp21_;
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_);
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_);
9823
ValaCCodeFunctionCall* _tmp25_;
9824
ValaCCodeIdentifier* _tmp24_;
9826
ValaCCodeIdentifier* _tmp27_;
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_);
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_);
9270
ValaCCodeFunctionCall* _tmp24_;
9271
ValaCCodeIdentifier* _tmp23_;
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_);
9835
ValaCCodeFunctionCall* _tmp30_;
9836
ValaCCodeIdentifier* _tmp29_;
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_);
9277
9842
if (st != NULL) {
9278
_tmp26_ = !vala_struct_is_simple_type (st);
9283
_tmp25_ = !(vala_method_get_cinstance_parameter_position (m) < 0);
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);
9848
_tmp31_ = !(vala_method_get_cinstance_parameter_position (m) < 0);
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_);
9857
gboolean _tmp34_ = FALSE;
9860
_tmp34_ = _vala_strcmp0 (_tmp35_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE), "va_list") == 0;
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_;
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_);
9880
ValaFormalParameter* param;
9881
ValaFormalParameter* _tmp40_;
9882
if (!vala_iterator_next (_param_it)) {
9885
param = (ValaFormalParameter*) vala_iterator_get (_param_it);
9886
if (vala_formal_parameter_get_ellipsis (param)) {
9887
_vala_code_node_unref0 (param);
9890
last_param = (_tmp40_ = _vala_code_node_ref0 (param), _vala_code_node_unref0 (last_param), _tmp40_);
9891
_vala_code_node_unref0 (param);
9893
_vala_collection_object_unref0 (_param_it);
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_);
9898
_vala_code_node_unref0 (last_param);
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);
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_);
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_);
9304
9914
ellipsis = FALSE;
9306
9916
params_it = vala_iterable_iterator ((ValaIterable*) params);
9309
ValaIterator* _tmp31_;
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_);
9313
9923
ValaExpression* arg;
9314
9924
ValaCCodeExpression* cexpr;
9466
10076
if (min_pos == (-1)) {
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;
9473
10083
if (st != NULL) {
9474
_tmp48_ = !vala_struct_is_simple_type (st);
9479
_tmp47_ = vala_method_get_cinstance_parameter_position (m) < 0;
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);
10089
_tmp62_ = vala_method_get_cinstance_parameter_position (m) < 0;
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_);
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_);
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);
9505
_tmp52_ = _vala_strcmp0 (vala_method_get_sentinel (m), "") != 0;
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);
10115
_tmp67_ = _vala_strcmp0 (vala_method_get_sentinel (m), "") != 0;
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_);
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_;
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_);
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_;
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_);
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;
9535
ValaCCodeIdentifier* _tmp67_;
9537
ValaCCodeIdentifier* _tmp69_;
9539
ValaCCodeExpression* _tmp72_;
10145
ValaCCodeIdentifier* _tmp82_;
10147
ValaCCodeIdentifier* _tmp84_;
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_);
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_);
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_);
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_);
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_);
9563
ValaIterator* _tmp71_;
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)) {
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);
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_);
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_);
9603
ValaMemberInitializer* init;
9604
if (!vala_iterator_next (_init_it)) {
9607
init = (ValaMemberInitializer*) vala_iterator_get (_init_it);
9608
if (VALA_IS_FIELD (vala_member_initializer_get_symbol_reference (init))) {
9610
ValaDataType* instance_target_type;
9611
ValaCCodeExpression* typed_inst;
9612
ValaCCodeExpression* lhs;
9613
ValaCCodeAssignment* _tmp80_;
9614
gboolean _tmp81_ = FALSE;
9615
ValaSymbol* _tmp101_;
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);
9621
if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
9622
ValaCCodeExpression* _tmp77_;
9624
lhs = (_tmp77_ = (ValaCCodeExpression*) vala_ccode_member_access_new (typed_inst, _tmp76_ = vala_field_get_cname (f), FALSE), _vala_ccode_node_unref0 (lhs), _tmp77_);
9627
ValaCCodeExpression* _tmp79_;
9629
lhs = (_tmp79_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer (typed_inst, _tmp78_ = vala_field_get_cname (f)), _vala_ccode_node_unref0 (lhs), _tmp79_);
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);
9640
ValaArrayType* array_type;
9641
array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
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);
10204
vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) creation_expr);
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);
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_);
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_);
10222
ValaMemberInitializer* init;
10223
if (!vala_iterator_next (_init_it)) {
10226
init = (ValaMemberInitializer*) vala_iterator_get (_init_it);
10227
if (VALA_IS_FIELD (vala_member_initializer_get_symbol_reference (init))) {
10229
ValaDataType* instance_target_type;
10230
ValaCCodeExpression* typed_inst;
10231
ValaCCodeExpression* lhs;
10232
ValaCCodeAssignment* _tmp97_;
10233
gboolean _tmp98_ = FALSE;
10234
ValaSymbol* _tmp118_;
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);
10240
if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
10241
ValaCCodeExpression* _tmp94_;
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_);
10246
ValaCCodeExpression* _tmp96_;
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_);
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);
10259
ValaArrayType* array_type;
10260
array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
9649
ValaCCodeExpression* rhs_array_len;
9650
ValaCCodeAssignment* _tmp89_;
9655
if (!(dim <= vala_array_type_get_rank (array_type))) {
9658
if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
9659
ValaCCodeExpression* _tmp85_;
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_);
9666
ValaCCodeExpression* _tmp88_;
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_);
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);
10268
ValaCCodeExpression* rhs_array_len;
10269
ValaCCodeAssignment* _tmp106_;
10274
if (!(dim <= vala_array_type_get_rank (array_type))) {
10277
if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_object_creation_expression_get_type_reference (expr)))) {
10278
ValaCCodeExpression* _tmp102_;
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_);
10285
ValaCCodeExpression* _tmp105_;
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_);
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);
9680
_vala_code_node_unref0 (array_type);
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);
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_;
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_);
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);
9703
ValaCCodeExpression* _tmp96_;
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_);
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);
9718
cl = _vala_code_node_ref0 ((_tmp101_ = vala_symbol_get_parent_symbol ((ValaSymbol*) f), VALA_IS_CLASS (_tmp101_) ? ((ValaClass*) _tmp101_) : NULL));
9720
vala_ccode_base_module_generate_class_struct_declaration (self, cl, self->source_declarations);
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);
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);
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_;
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_);
10322
ValaCCodeExpression* _tmp113_;
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_);
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);
10337
cl = _vala_code_node_ref0 ((_tmp118_ = vala_symbol_get_parent_symbol ((ValaSymbol*) f), VALA_IS_CLASS (_tmp118_) ? ((ValaClass*) _tmp118_) : NULL));
10339
vala_ccode_base_module_generate_class_struct_declaration (self, cl, self->source_declarations);
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);
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);
10361
_vala_code_node_unref0 (init);
9742
_vala_code_node_unref0 (init);
9744
_vala_collection_object_unref0 (_init_it);
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);
9750
if (creation_expr != NULL) {
9751
vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) creation_expr);
10363
_vala_collection_object_unref0 (_init_it);
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);
10369
if (creation_expr != NULL) {
10370
vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) creation_expr);
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);
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);
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))));
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_);
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);
10254
10923
if (vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_PLUS) {
10255
10924
op = VALA_CCODE_BINARY_OPERATOR_PLUS;
10338
11064
if (vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_EQUALITY) {
10341
_tmp2_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_INEQUALITY;
11067
_tmp16_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_INEQUALITY;
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);
10356
ValaStruct* _tmp4_;
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);
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)) {
10380
_tmp13_ = VALA_IS_FLOATING_TYPE (left_type);
10385
_tmp12_ = VALA_IS_BOOLEAN_TYPE (left_type);
10388
_tmp11_ = vala_data_type_get_nullable (left_type);
10393
gboolean _tmp14_ = FALSE;
10394
gboolean _tmp15_ = FALSE;
11106
_tmp27_ = VALA_IS_FLOATING_TYPE (left_type);
11111
_tmp26_ = VALA_IS_BOOLEAN_TYPE (left_type);
11114
_tmp25_ = vala_data_type_get_nullable (left_type);
11119
gboolean _tmp28_ = FALSE;
11120
gboolean _tmp29_ = FALSE;
10395
11121
if (VALA_IS_INTEGER_TYPE (right_type)) {
10398
_tmp15_ = VALA_IS_FLOATING_TYPE (right_type);
10403
_tmp14_ = VALA_IS_BOOLEAN_TYPE (right_type);
10410
_tmp9_ = vala_data_type_get_nullable (right_type);
10415
ValaStruct* _tmp16_;
11124
_tmp29_ = VALA_IS_FLOATING_TYPE (right_type);
11129
_tmp28_ = VALA_IS_BOOLEAN_TYPE (right_type);
11136
_tmp23_ = vala_data_type_get_nullable (right_type);
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);
10433
11159
_vala_code_node_unref0 (right_type);
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);
10441
_tmp22_ = !VALA_IS_NULL_TYPE (vala_expression_get_value_type (vala_binary_expression_get_right (expr)));
10446
_tmp21_ = vala_data_type_compatible (vala_expression_get_value_type (vala_binary_expression_get_right (expr)), self->string_type);
11162
_tmp37_ = vala_data_type_compatible (vala_expression_get_value_type (vala_binary_expression_get_left (expr)), self->string_type);
11167
_tmp36_ = !VALA_IS_NULL_TYPE (vala_expression_get_value_type (vala_binary_expression_get_right (expr)));
11172
_tmp35_ = vala_data_type_compatible (vala_expression_get_value_type (vala_binary_expression_get_right (expr)), self->string_type);
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));
10461
ValaCCodeConstant* _tmp30_;
11187
ValaCCodeConstant* _tmp44_;
10464
11190
right = NULL;
10465
11191
if (VALA_IS_CCODE_IDENTIFIER (cleft)) {
10467
left = (_tmp25_ = g_strdup (vala_ccode_identifier_get_name (VALA_CCODE_IDENTIFIER (cleft))), _g_free0 (left), _tmp25_);
11193
left = (_tmp39_ = g_strdup (vala_ccode_identifier_get_name (VALA_CCODE_IDENTIFIER (cleft))), _g_free0 (left), _tmp39_);
10469
11195
if (VALA_IS_CCODE_CONSTANT (cleft)) {
10471
left = (_tmp26_ = g_strdup (vala_ccode_constant_get_name (VALA_CCODE_CONSTANT (cleft))), _g_free0 (left), _tmp26_);
11197
left = (_tmp40_ = g_strdup (vala_ccode_constant_get_name (VALA_CCODE_CONSTANT (cleft))), _g_free0 (left), _tmp40_);
10473
11199
g_assert_not_reached ();
10476
11202
if (VALA_IS_CCODE_IDENTIFIER (cright)) {
10478
right = (_tmp27_ = g_strdup (vala_ccode_identifier_get_name (VALA_CCODE_IDENTIFIER (cright))), _g_free0 (right), _tmp27_);
11204
right = (_tmp41_ = g_strdup (vala_ccode_identifier_get_name (VALA_CCODE_IDENTIFIER (cright))), _g_free0 (right), _tmp41_);
10480
11206
if (VALA_IS_CCODE_CONSTANT (cright)) {
10482
right = (_tmp28_ = g_strdup (vala_ccode_constant_get_name (VALA_CCODE_CONSTANT (cright))), _g_free0 (right), _tmp28_);
11208
right = (_tmp42_ = g_strdup (vala_ccode_constant_get_name (VALA_CCODE_CONSTANT (cright))), _g_free0 (right), _tmp42_);
10484
11210
g_assert_not_reached ();
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);
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);
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);
10549
11276
_vala_ccode_node_unref0 (cleft);
10550
11277
_vala_ccode_node_unref0 (cright);
11278
_vala_ccode_node_unref0 (left_chain);
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) {
10562
_tmp51_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_INEQUALITY;
10567
_tmp50_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_LESS_THAN;
10572
_tmp49_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_GREATER_THAN;
10577
_tmp48_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_LESS_THAN_OR_EQUAL;
10582
_tmp47_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_GREATER_THAN_OR_EQUAL;
10585
ValaCCodeIdentifier* _tmp52_;
10586
ValaCCodeFunctionCall* _tmp53_;
11290
_tmp65_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_INEQUALITY;
11295
_tmp64_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_LESS_THAN;
11300
_tmp63_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_GREATER_THAN;
11305
_tmp62_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_LESS_THAN_OR_EQUAL;
11310
_tmp61_ = vala_binary_expression_get_operator (expr) == VALA_BINARY_OPERATOR_GREATER_THAN_OR_EQUAL;
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);
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_);
10602
11335
_vala_ccode_node_unref0 (cleft);
10603
11336
_vala_ccode_node_unref0 (cright);
11337
_vala_ccode_node_unref0 (left_chain);
10607
11341
char* vala_ccode_base_module_get_type_check_function (ValaCCodeBaseModule* self, ValaTypeSymbol* type) {
11342
char* result = NULL;
10609
11343
ValaTypeSymbol* _tmp0_;
10610
11344
ValaClass* cl;
10611
11345
gboolean _tmp1_ = FALSE;
11473
static char* vala_ccode_base_module_generate_array_contains_wrapper (ValaCCodeBaseModule* self, ValaArrayType* array_type) {
11474
char* result = NULL;
11477
char* array_contains_func;
11478
ValaCCodeFunction* function;
11479
ValaCCodeFormalParameter* _tmp3_;
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;
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_);
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_;
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_);
11532
ValaCCodeFormalParameter* _tmp9_;
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_);
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);
11560
if (VALA_IS_STRUCT_VALUE_TYPE (vala_array_type_get_element_type (array_type))) {
11561
ValaStruct* _tmp18_;
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);
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_);
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);
10739
11622
static void vala_ccode_base_module_real_visit_type_check (ValaCCodeModule* base, ValaTypeCheck* expr) {
10740
11623
ValaCCodeBaseModule * self;
10741
11624
ValaCCodeExpression* _tmp0_;
11052
11930
while (TRUE) {
11054
ValaDataType* _tmp31_;
11055
ValaLocalVariable* _tmp33_;
11932
ValaDataType* _tmp30_;
11933
ValaLocalVariable* _tmp32_;
11056
11934
ValaLocalVariable* len_decl;
11057
ValaCCodeAssignment* _tmp36_;
11058
ValaCCodeExpression* _tmp35_;
11935
ValaCCodeAssignment* _tmp35_;
11059
11936
ValaCCodeExpression* _tmp34_;
11937
ValaCCodeExpression* _tmp33_;
11064
11942
if (!(dim <= vala_array_type_get_rank (array_type))) {
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);
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);
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;
11090
11968
ValaCCodeCommaExpression* ccomma;
11092
ValaPointerType* _tmp41_;
11093
ValaVoidType* _tmp40_;
11094
ValaLocalVariable* _tmp43_;
11970
ValaPointerType* _tmp40_;
11971
ValaVoidType* _tmp39_;
11972
ValaLocalVariable* _tmp42_;
11095
11973
ValaLocalVariable* target_decl;
11097
ValaDelegateType* _tmp46_;
11098
ValaDelegate* _tmp45_;
11099
ValaSymbol* _tmp44_;
11100
ValaLocalVariable* _tmp48_;
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_;
11153
ValaCCodeFunctionCall* _tmp73_;
11154
ValaCCodeIdentifier* _tmp72_;
11155
ValaCCodeExpression* _tmp78_;
12029
ValaCCodeIdentifier* _tmp70_;
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);
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_);
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_);
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_);
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_);
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_);
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_);
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_);
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_);
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_);
11213
12098
vala_ccode_function_call_add_argument (ccall, cexpr);
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;
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;
11236
ValaCCodeExpression* _tmp82_;
11237
cexpr = (_tmp82_ = _vala_ccode_node_ref0 (vala_ccode_unary_expression_get_inner (unary)), _vala_ccode_node_unref0 (cexpr), _tmp82_);
12121
ValaCCodeExpression* _tmp83_;
12122
cexpr = (_tmp83_ = _vala_ccode_node_ref0 (vala_ccode_unary_expression_get_inner (unary)), _vala_ccode_node_unref0 (cexpr), _tmp83_);
11239
gboolean _tmp83_ = FALSE;
12124
gboolean _tmp84_ = FALSE;
11240
12125
if (VALA_IS_CCODE_IDENTIFIER (cexpr)) {
11243
_tmp83_ = VALA_IS_CCODE_MEMBER_ACCESS (cexpr);
12128
_tmp84_ = VALA_IS_CCODE_MEMBER_ACCESS (cexpr);
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_);
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_);
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);
11583
12470
vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp35_ = vala_property_get_canonical_cconstant (prop)));
11584
12471
_vala_ccode_node_unref0 (_tmp35_);
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));
11588
12475
if (array_type != NULL) {
11589
_tmp38_ = !vala_property_get_no_array_length (prop);
11594
_tmp37_ = rhs != NULL;
12476
_tmp37_ = !vala_property_get_no_array_length (prop);
11596
12478
_tmp37_ = FALSE;
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);
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_);
12504
if (array_type != NULL) {
12505
_tmp44_ = !vala_property_get_no_array_length (prop);
12510
_tmp43_ = rhs != NULL;
11605
12521
while (TRUE) {
11606
ValaCCodeExpression* _tmp40_;
12522
ValaCCodeExpression* _tmp46_;
11611
12527
if (!(dim <= vala_array_type_get_rank (array_type))) {
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_);
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;
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);
11640
12556
_vala_code_node_unref0 (delegate_type);
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_);
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;
11656
12573
gboolean vala_ccode_base_module_is_address_of_possible (ValaCCodeBaseModule* self, ValaExpression* e) {
12574
gboolean result = FALSE;
11658
12575
ValaExpression* _tmp0_;
11659
12576
ValaMemberAccess* ma;
11660
12577
g_return_val_if_fail (self != NULL, FALSE);