~ubuntu-branches/ubuntu/vivid/vala/vivid

« back to all changes in this revision

Viewing changes to codegen/valaccodebasemodule.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-07-28 07:58:01 UTC
  • mfrom: (1.5.5 upstream) (7.3.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20100728075801-18u9cg5hv5oety6m
Tags: 0.9.4-1
New upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        void (*visit_enum) (ValaCCodeModule* self, ValaEnum* en);
111
111
        void (*visit_error_domain) (ValaCCodeModule* self, ValaErrorDomain* edomain);
112
112
        void (*visit_delegate) (ValaCCodeModule* self, ValaDelegate* d);
113
 
        void (*visit_member) (ValaCCodeModule* self, ValaMember* m);
 
113
        void (*visit_member) (ValaCCodeModule* self, ValaSymbol* m);
114
114
        void (*visit_constant) (ValaCCodeModule* self, ValaConstant* c);
115
115
        void (*visit_field) (ValaCCodeModule* self, ValaField* f);
116
116
        void (*visit_method) (ValaCCodeModule* self, ValaMethod* m);
395
395
static gboolean vala_ccode_base_module_real_generate_enum_declaration (ValaCCodeBaseModule* self, ValaEnum* en, ValaCCodeDeclarationSpace* decl_space);
396
396
static void vala_ccode_base_module_real_visit_enum (ValaCCodeModule* base, ValaEnum* en);
397
397
char* vala_ccode_base_module_get_symbol_lock_name (ValaCCodeBaseModule* self, const char* symname);
398
 
static void vala_ccode_base_module_real_visit_member (ValaCCodeModule* base, ValaMember* m);
 
398
static void vala_ccode_base_module_real_visit_member (ValaCCodeModule* base, ValaSymbol* m);
399
399
void vala_ccode_base_module_generate_type_declaration (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeDeclarationSpace* decl_space);
400
400
void vala_ccode_declaration_space_add_constant_declaration (ValaCCodeDeclarationSpace* self, ValaCCodeNode* node);
401
401
void vala_ccode_base_module_generate_constant_declaration (ValaCCodeBaseModule* self, ValaConstant* c, ValaCCodeDeclarationSpace* decl_space, gboolean definition);
405
405
char* vala_ccode_base_module_get_delegate_target_cname (ValaCCodeBaseModule* self, const char* delegate_cname);
406
406
char* vala_ccode_base_module_get_delegate_target_destroy_notify_cname (ValaCCodeBaseModule* self, const char* delegate_cname);
407
407
void vala_ccode_base_module_generate_field_declaration (ValaCCodeBaseModule* self, ValaField* f, ValaCCodeDeclarationSpace* decl_space);
 
408
void vala_ccode_module_visit_member (ValaCCodeModule* self, ValaSymbol* m);
408
409
void vala_ccode_base_module_check_type (ValaCCodeBaseModule* self, ValaDataType* type);
409
410
ValaDataType* vala_ccode_base_module_get_data_type_for_symbol (ValaTypeSymbol* sym);
410
411
ValaCCodeExpression* vala_ccode_module_get_array_length_cexpression (ValaCCodeModule* self, ValaExpression* array_expr, gint dim);
845
846
                                                break;
846
847
                                        }
847
848
                                        parameter = (ValaFormalParameter*) vala_iterator_get (_parameter_it);
848
 
                                        if (vala_data_type_get_data_type (vala_formal_parameter_get_parameter_type (parameter)) == self->type_module_type) {
 
849
                                        if (vala_data_type_get_data_type (vala_variable_get_variable_type ((ValaVariable*) parameter)) == self->type_module_type) {
849
850
                                                char* _tmp64_;
850
851
                                                self->in_plugin = TRUE;
851
852
                                                self->module_init_param_name = (_tmp64_ = g_strdup (vala_symbol_get_name ((ValaSymbol*) parameter)), _g_free0 (self->module_init_param_name), _tmp64_);
1468
1469
                        }
1469
1470
                        ev = (ValaEnumValue*) vala_iterator_get (_ev_it);
1470
1471
                        c_ev = NULL;
1471
 
                        if (vala_enum_value_get_value (ev) == NULL) {
 
1472
                        if (vala_constant_get_value ((ValaConstant*) ev) == NULL) {
1472
1473
                                ValaCCodeEnumValue* _tmp7_;
1473
1474
                                char* _tmp6_;
1474
 
                                c_ev = (_tmp7_ = vala_ccode_enum_value_new (_tmp6_ = vala_enum_value_get_cname (ev), NULL), _vala_ccode_node_unref0 (c_ev), _tmp7_);
 
1475
                                c_ev = (_tmp7_ = vala_ccode_enum_value_new (_tmp6_ = vala_constant_get_cname ((ValaConstant*) ev), NULL), _vala_ccode_node_unref0 (c_ev), _tmp7_);
1475
1476
                                _g_free0 (_tmp6_);
1476
1477
                        } else {
1477
1478
                                ValaCCodeEnumValue* _tmp9_;
1478
1479
                                char* _tmp8_;
1479
 
                                vala_code_node_accept ((ValaCodeNode*) vala_enum_value_get_value (ev), (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
1480
 
                                c_ev = (_tmp9_ = vala_ccode_enum_value_new (_tmp8_ = vala_enum_value_get_cname (ev), VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_enum_value_get_value (ev)))), _vala_ccode_node_unref0 (c_ev), _tmp9_);
 
1480
                                vala_code_node_accept ((ValaCodeNode*) vala_constant_get_value ((ValaConstant*) ev), (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
 
1481
                                c_ev = (_tmp9_ = vala_ccode_enum_value_new (_tmp8_ = vala_constant_get_cname ((ValaConstant*) ev), VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_constant_get_value ((ValaConstant*) ev)))), _vala_ccode_node_unref0 (c_ev), _tmp9_);
1481
1482
                                _g_free0 (_tmp8_);
1482
1483
                        }
1483
1484
                        vala_ccode_enum_value_set_deprecated (c_ev, vala_symbol_get_deprecated ((ValaSymbol*) ev));
1538
1539
}
1539
1540
 
1540
1541
 
1541
 
static void vala_ccode_base_module_real_visit_member (ValaCCodeModule* base, ValaMember* m) {
 
1542
static void vala_ccode_base_module_real_visit_member (ValaCCodeModule* base, ValaSymbol* m) {
1542
1543
        ValaCCodeBaseModule * self;
1543
1544
        gboolean _tmp0_ = FALSE;
1544
1545
        self = (ValaCCodeBaseModule*) base;
1561
1562
                l = (ValaCCodeExpression*) vala_ccode_identifier_new ("self");
1562
1563
                init_fragment = _vala_ccode_node_ref0 (self->class_init_fragment);
1563
1564
                finalize_fragment = _vala_ccode_node_ref0 (self->class_finalize_fragment);
1564
 
                if (vala_symbol_is_instance_member ((ValaSymbol*) m)) {
 
1565
                if (vala_symbol_is_instance_member (m)) {
1565
1566
                        ValaCCodeExpression* _tmp3_;
1566
1567
                        char* _tmp2_;
1567
1568
                        ValaCCodeMemberAccess* _tmp1_;
1568
1569
                        ValaCCodeFragment* _tmp4_;
1569
1570
                        ValaCCodeFragment* _tmp5_;
1570
 
                        l = (_tmp3_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp1_ = vala_ccode_member_access_new_pointer (l, "priv")), _tmp2_ = vala_ccode_base_module_get_symbol_lock_name (self, vala_symbol_get_name ((ValaSymbol*) m))), _vala_ccode_node_unref0 (l), _tmp3_);
 
1571
                        l = (_tmp3_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp1_ = vala_ccode_member_access_new_pointer (l, "priv")), _tmp2_ = vala_ccode_base_module_get_symbol_lock_name (self, vala_symbol_get_name (m))), _vala_ccode_node_unref0 (l), _tmp3_);
1571
1572
                        _g_free0 (_tmp2_);
1572
1573
                        _vala_ccode_node_unref0 (_tmp1_);
1573
1574
                        init_fragment = (_tmp4_ = _vala_ccode_node_ref0 (self->instance_init_fragment), _vala_ccode_node_unref0 (init_fragment), _tmp4_);
1574
1575
                        finalize_fragment = (_tmp5_ = _vala_ccode_node_ref0 (self->instance_finalize_fragment), _vala_ccode_node_unref0 (finalize_fragment), _tmp5_);
1575
1576
                } else {
1576
 
                        if (vala_symbol_is_class_member ((ValaSymbol*) m)) {
 
1577
                        if (vala_symbol_is_class_member (m)) {
1577
1578
                                ValaTypeSymbol* parent;
1578
1579
                                ValaCCodeIdentifier* _tmp8_;
1579
1580
                                char* _tmp7_;
1583
1584
                                ValaCCodeIdentifier* _tmp10_;
1584
1585
                                ValaCCodeExpression* _tmp12_;
1585
1586
                                char* _tmp11_;
1586
 
                                parent = _vala_code_node_ref0 (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
 
1587
                                parent = _vala_code_node_ref0 (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol (m)));
1587
1588
                                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_);
1588
1589
                                vala_ccode_function_call_add_argument (get_class_private_call, (ValaCCodeExpression*) (_tmp10_ = vala_ccode_identifier_new ("klass")));
1589
1590
                                _vala_ccode_node_unref0 (_tmp10_);
1590
 
                                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_);
 
1591
                                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 (m))), _vala_ccode_node_unref0 (l), _tmp12_);
1591
1592
                                _g_free0 (_tmp11_);
1592
1593
                                _vala_ccode_node_unref0 (get_class_private_call);
1593
1594
                                _vala_code_node_unref0 (parent);
1596
1597
                                char* _tmp15_;
1597
1598
                                char* _tmp14_;
1598
1599
                                char* _tmp13_;
1599
 
                                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_);
 
1600
                                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 (m), NULL), vala_symbol_get_name (m)))), _vala_ccode_node_unref0 (l), _tmp16_);
1600
1601
                                _g_free0 (_tmp15_);
1601
1602
                                _g_free0 (_tmp14_);
1602
1603
                                _g_free0 (_tmp13_);
1642
1643
                ValaExpression* _tmp2_;
1643
1644
                ValaInitializerList* initializer_list;
1644
1645
                vala_ccode_base_module_generate_type_declaration (self, vala_constant_get_type_reference (c), decl_space);
1645
 
                initializer_list = _vala_code_node_ref0 ((_tmp2_ = vala_constant_get_initializer (c), VALA_IS_INITIALIZER_LIST (_tmp2_) ? ((ValaInitializerList*) _tmp2_) : NULL));
 
1646
                initializer_list = _vala_code_node_ref0 ((_tmp2_ = vala_constant_get_value (c), VALA_IS_INITIALIZER_LIST (_tmp2_) ? ((ValaInitializerList*) _tmp2_) : NULL));
1646
1647
                if (initializer_list != NULL) {
1647
1648
                        char* _tmp3_;
1648
1649
                        ValaCCodeDeclaration* _tmp4_;
1658
1659
                                char* _tmp5_;
1659
1660
                                arr = (_tmp5_ = g_strdup_printf ("[%d]", vala_initializer_list_get_size (initializer_list)), _g_free0 (arr), _tmp5_);
1660
1661
                        }
1661
 
                        cinitializer = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_constant_get_initializer (c))));
 
1662
                        cinitializer = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_constant_get_value (c))));
1662
1663
                        if (!definition) {
1663
1664
                                ValaCCodeExpression* _tmp6_;
1664
1665
                                cinitializer = (_tmp6_ = NULL, _vala_ccode_node_unref0 (cinitializer), _tmp6_);
1680
1681
                        char* _tmp10_;
1681
1682
                        ValaCCodeMacroReplacement* _tmp11_;
1682
1683
                        ValaCCodeMacroReplacement* cdefine;
1683
 
                        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_);
 
1684
                        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_value (c)))), _g_free0 (_tmp10_), _tmp11_);
1684
1685
                        vala_ccode_declaration_space_add_type_member_declaration (decl_space, (ValaCCodeNode*) cdefine);
1685
1686
                        _vala_ccode_node_unref0 (cdefine);
1686
1687
                }
1718
1719
        if ((_tmp1_ = vala_ccode_declaration_space_add_symbol_declaration (decl_space, (ValaSymbol*) f, _tmp0_ = vala_field_get_cname (f)), _g_free0 (_tmp0_), _tmp1_)) {
1719
1720
                return;
1720
1721
        }
1721
 
        vala_ccode_base_module_generate_type_declaration (self, vala_field_get_field_type (f), decl_space);
1722
 
        field_ctype = vala_data_type_get_cname (vala_field_get_field_type (f));
 
1722
        vala_ccode_base_module_generate_type_declaration (self, vala_variable_get_variable_type ((ValaVariable*) f), decl_space);
 
1723
        field_ctype = vala_data_type_get_cname (vala_variable_get_variable_type ((ValaVariable*) f));
1723
1724
        if (vala_field_get_is_volatile (f)) {
1724
1725
                char* _tmp2_;
1725
1726
                field_ctype = (_tmp2_ = g_strconcat ("volatile ", field_ctype, NULL), _g_free0 (field_ctype), _tmp2_);
1726
1727
        }
1727
1728
        _cdecl_ = vala_ccode_declaration_new (field_ctype);
1728
 
        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp5_ = vala_ccode_variable_declarator_new (_tmp3_ = vala_field_get_cname (f), NULL, _tmp4_ = vala_data_type_get_cdeclarator_suffix (vala_field_get_field_type (f)))));
 
1729
        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp5_ = vala_ccode_variable_declarator_new (_tmp3_ = vala_field_get_cname (f), NULL, _tmp4_ = vala_data_type_get_cdeclarator_suffix (vala_variable_get_variable_type ((ValaVariable*) f)))));
1729
1730
        _vala_ccode_node_unref0 (_tmp5_);
1730
1731
        _g_free0 (_tmp4_);
1731
1732
        _g_free0 (_tmp3_);
1759
1760
                _vala_ccode_node_unref0 (flock_decl);
1760
1761
                _vala_ccode_node_unref0 (flock);
1761
1762
        }
1762
 
        if (VALA_IS_ARRAY_TYPE (vala_field_get_field_type (f))) {
 
1763
        if (VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) f))) {
1763
1764
                _tmp12_ = !vala_field_get_no_array_length (f);
1764
1765
        } else {
1765
1766
                _tmp12_ = FALSE;
1766
1767
        }
1767
1768
        if (_tmp12_) {
1768
1769
                ValaArrayType* array_type;
1769
 
                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
 
1770
                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) f)));
1770
1771
                if (!vala_array_type_get_fixed_length (array_type)) {
1771
1772
                        {
1772
1773
                                gint dim;
1808
1809
                }
1809
1810
                _vala_code_node_unref0 (array_type);
1810
1811
        } else {
1811
 
                if (VALA_IS_DELEGATE_TYPE (vala_field_get_field_type (f))) {
 
1812
                if (VALA_IS_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) f))) {
1812
1813
                        ValaDelegateType* delegate_type;
1813
 
                        delegate_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_field_get_field_type (f)));
 
1814
                        delegate_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) f)));
1814
1815
                        if (vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (delegate_type))) {
1815
1816
                                ValaCCodeDeclaration* _tmp19_;
1816
1817
                                ValaCCodeVariableDeclarator* _tmp22_;
1863
1864
        char* field_ctype;
1864
1865
        self = (ValaCCodeBaseModule*) base;
1865
1866
        g_return_if_fail (f != NULL);
1866
 
        vala_ccode_base_module_check_type (self, vala_field_get_field_type (f));
 
1867
        vala_ccode_module_visit_member ((ValaCCodeModule*) self, (ValaSymbol*) f);
 
1868
        vala_ccode_base_module_check_type (self, vala_variable_get_variable_type ((ValaVariable*) f));
1867
1869
        vala_code_node_accept_children ((ValaCodeNode*) f, (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
1868
1870
        cl = _vala_code_node_ref0 ((_tmp0_ = vala_symbol_get_parent_symbol ((ValaSymbol*) f), VALA_IS_CLASS (_tmp0_) ? ((ValaClass*) _tmp0_) : NULL));
1869
1871
        if (cl != NULL) {
1873
1875
        }
1874
1876
        is_gtypeinstance = _tmp1_;
1875
1877
        lhs = NULL;
1876
 
        field_ctype = vala_data_type_get_cname (vala_field_get_field_type (f));
 
1878
        field_ctype = vala_data_type_get_cname (vala_variable_get_variable_type ((ValaVariable*) f));
1877
1879
        if (vala_field_get_is_volatile (f)) {
1878
1880
                char* _tmp2_;
1879
1881
                field_ctype = (_tmp2_ = g_strconcat ("volatile ", field_ctype, NULL), _g_free0 (field_ctype), _tmp2_);
1903
1905
                        _g_free0 (_tmp9_);
1904
1906
                        _vala_ccode_node_unref0 (_tmp8_);
1905
1907
                }
1906
 
                if (vala_field_get_initializer (f) != NULL) {
 
1908
                if (vala_variable_get_initializer ((ValaVariable*) f) != NULL) {
1907
1909
                        ValaCCodeExpression* rhs;
1908
1910
                        ValaCCodeExpressionStatement* _tmp12_;
1909
1911
                        ValaCCodeAssignment* _tmp11_;
1910
1912
                        gboolean _tmp13_ = FALSE;
1911
1913
                        gboolean _tmp14_ = FALSE;
1912
 
                        rhs = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_field_get_initializer (f))));
 
1914
                        rhs = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_variable_get_initializer ((ValaVariable*) f))));
1913
1915
                        vala_ccode_fragment_append (self->instance_init_fragment, (ValaCCodeNode*) (_tmp12_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp11_ = vala_ccode_assignment_new (lhs, rhs, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)))));
1914
1916
                        _vala_ccode_node_unref0 (_tmp12_);
1915
1917
                        _vala_ccode_node_unref0 (_tmp11_);
1916
 
                        if (VALA_IS_ARRAY_TYPE (vala_field_get_field_type (f))) {
 
1918
                        if (VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) f))) {
1917
1919
                                _tmp14_ = !vala_field_get_no_array_length (f);
1918
1920
                        } else {
1919
1921
                                _tmp14_ = FALSE;
1920
1922
                        }
1921
1923
                        if (_tmp14_) {
1922
 
                                _tmp13_ = VALA_IS_ARRAY_CREATION_EXPRESSION (vala_field_get_initializer (f));
 
1924
                                _tmp13_ = VALA_IS_ARRAY_CREATION_EXPRESSION (vala_variable_get_initializer ((ValaVariable*) f));
1923
1925
                        } else {
1924
1926
                                _tmp13_ = FALSE;
1925
1927
                        }
1931
1933
                                ValaMemberAccess* ma;
1932
1934
                                ValaList* sizes;
1933
1935
                                gboolean _tmp20_ = FALSE;
1934
 
                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
 
1936
                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) f)));
1935
1937
                                this_access = vala_member_access_new_simple ("this", NULL);
1936
1938
                                vala_expression_set_value_type ((ValaExpression*) this_access, _tmp15_ = vala_ccode_base_module_get_data_type_for_symbol (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) f))));
1937
1939
                                _vala_code_node_unref0 (_tmp15_);
1939
1941
                                _vala_ccode_node_unref0 (_tmp16_);
1940
1942
                                ma = vala_member_access_new ((ValaExpression*) this_access, vala_symbol_get_name ((ValaSymbol*) f), NULL);
1941
1943
                                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) f);
1942
 
                                sizes = vala_array_creation_expression_get_sizes (VALA_ARRAY_CREATION_EXPRESSION (vala_field_get_initializer (f)));
 
1944
                                sizes = vala_array_creation_expression_get_sizes (VALA_ARRAY_CREATION_EXPRESSION (vala_variable_get_initializer ((ValaVariable*) f)));
1943
1945
                                {
1944
1946
                                        gint dim;
1945
1947
                                        dim = 1;
2008
2010
                                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
2009
2011
                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
2010
2012
                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
2011
 
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp23_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
2013
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp23_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) local)));
2012
2014
                                        _vala_code_node_unref0 (_tmp23_);
2013
 
                                        vala_ccode_fragment_append (self->instance_init_fragment, (ValaCCodeNode*) (_tmp26_ = vala_ccode_expression_statement_new (_tmp25_ = vala_ccode_base_module_get_unref_expression (self, _tmp24_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
2015
                                        vala_ccode_fragment_append (self->instance_init_fragment, (ValaCCodeNode*) (_tmp26_ = vala_ccode_expression_statement_new (_tmp25_ = vala_ccode_base_module_get_unref_expression (self, _tmp24_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_variable_get_variable_type ((ValaVariable*) local), (ValaExpression*) ma, FALSE))));
2014
2016
                                        _vala_ccode_node_unref0 (_tmp26_);
2015
2017
                                        _vala_ccode_node_unref0 (_tmp25_);
2016
2018
                                        _vala_ccode_node_unref0 (_tmp24_);
2023
2025
                        vala_collection_clear ((ValaCollection*) self->temp_ref_vars);
2024
2026
                        _vala_ccode_node_unref0 (rhs);
2025
2027
                }
2026
 
                if (vala_ccode_base_module_requires_destroy (self, vala_field_get_field_type (f))) {
 
2028
                if (vala_ccode_base_module_requires_destroy (self, vala_variable_get_variable_type ((ValaVariable*) f))) {
2027
2029
                        _tmp27_ = self->instance_finalize_fragment != NULL;
2028
2030
                } else {
2029
2031
                        _tmp27_ = FALSE;
2058
2060
                        }
2059
2061
                        ma = vala_member_access_new ((ValaExpression*) this_access, vala_symbol_get_name ((ValaSymbol*) f), NULL);
2060
2062
                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) f);
2061
 
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp33_ = vala_data_type_copy (vala_field_get_field_type (f)));
 
2063
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp33_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) f)));
2062
2064
                        _vala_code_node_unref0 (_tmp33_);
2063
 
                        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))));
 
2065
                        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_variable_get_variable_type ((ValaVariable*) f), (ValaExpression*) ma, FALSE))));
2064
2066
                        _vala_ccode_node_unref0 (_tmp35_);
2065
2067
                        _vala_ccode_node_unref0 (_tmp34_);
2066
2068
                        _vala_code_node_unref0 (ma);
2100
2102
                                _g_free0 (_tmp44_);
2101
2103
                                _vala_ccode_node_unref0 (_tmp43_);
2102
2104
                        }
2103
 
                        if (vala_field_get_initializer (f) != NULL) {
 
2105
                        if (vala_variable_get_initializer ((ValaVariable*) f) != NULL) {
2104
2106
                                ValaCCodeExpression* rhs;
2105
2107
                                ValaCCodeExpressionStatement* _tmp47_;
2106
2108
                                ValaCCodeAssignment* _tmp46_;
2107
 
                                rhs = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_field_get_initializer (f))));
 
2109
                                rhs = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_variable_get_initializer ((ValaVariable*) f))));
2108
2110
                                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)))));
2109
2111
                                _vala_ccode_node_unref0 (_tmp47_);
2110
2112
                                _vala_ccode_node_unref0 (_tmp46_);
2125
2127
                                                local = (ValaLocalVariable*) vala_iterator_get (_local_it);
2126
2128
                                                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
2127
2129
                                                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
2128
 
                                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp48_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
2130
                                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp48_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) local)));
2129
2131
                                                _vala_code_node_unref0 (_tmp48_);
2130
 
                                                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))));
 
2132
                                                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_variable_get_variable_type ((ValaVariable*) local), (ValaExpression*) ma, FALSE))));
2131
2133
                                                _vala_ccode_node_unref0 (_tmp51_);
2132
2134
                                                _vala_ccode_node_unref0 (_tmp50_);
2133
2135
                                                _vala_ccode_node_unref0 (_tmp49_);
2159
2161
                        }
2160
2162
                        lhs = (_tmp53_ = (ValaCCodeExpression*) vala_ccode_identifier_new (_tmp52_ = vala_field_get_cname (f)), _vala_ccode_node_unref0 (lhs), _tmp53_);
2161
2163
                        _g_free0 (_tmp52_);
2162
 
                        var_decl = (_tmp56_ = vala_ccode_variable_declarator_new (_tmp54_ = vala_field_get_cname (f), NULL, _tmp55_ = vala_data_type_get_cdeclarator_suffix (vala_field_get_field_type (f))), _g_free0 (_tmp55_), _g_free0 (_tmp54_), _tmp56_);
2163
 
                        vala_ccode_variable_declarator_set_initializer (var_decl, _tmp57_ = vala_ccode_base_module_default_value_for_type (self, vala_field_get_field_type (f), TRUE));
 
2164
                        var_decl = (_tmp56_ = vala_ccode_variable_declarator_new (_tmp54_ = vala_field_get_cname (f), NULL, _tmp55_ = vala_data_type_get_cdeclarator_suffix (vala_variable_get_variable_type ((ValaVariable*) f))), _g_free0 (_tmp55_), _g_free0 (_tmp54_), _tmp56_);
 
2165
                        vala_ccode_variable_declarator_set_initializer (var_decl, _tmp57_ = vala_ccode_base_module_default_value_for_type (self, vala_variable_get_variable_type ((ValaVariable*) f), TRUE));
2164
2166
                        _vala_ccode_node_unref0 (_tmp57_);
2165
 
                        if (vala_field_get_initializer (f) != NULL) {
 
2167
                        if (vala_variable_get_initializer ((ValaVariable*) f) != NULL) {
2166
2168
                                ValaCCodeExpression* init;
2167
 
                                init = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_field_get_initializer (f))));
 
2169
                                init = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_variable_get_initializer ((ValaVariable*) f))));
2168
2170
                                if (vala_ccode_base_module_is_constant_ccode_expression (self, init)) {
2169
2171
                                        vala_ccode_variable_declarator_set_initializer (var_decl, init);
2170
2172
                                }
2178
2180
                                vala_ccode_declaration_set_modifiers (var_def, VALA_CCODE_MODIFIERS_STATIC);
2179
2181
                        }
2180
2182
                        vala_ccode_declaration_space_add_type_member_declaration (self->source_declarations, (ValaCCodeNode*) var_def);
2181
 
                        if (VALA_IS_ARRAY_TYPE (vala_field_get_field_type (f))) {
 
2183
                        if (VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) f))) {
2182
2184
                                _tmp58_ = !vala_field_get_no_array_length (f);
2183
2185
                        } else {
2184
2186
                                _tmp58_ = FALSE;
2185
2187
                        }
2186
2188
                        if (_tmp58_) {
2187
2189
                                ValaArrayType* array_type;
2188
 
                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
 
2190
                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) f)));
2189
2191
                                if (!vala_array_type_get_fixed_length (array_type)) {
2190
2192
                                        gboolean _tmp66_ = FALSE;
2191
2193
                                        {
2257
2259
                                }
2258
2260
                                _vala_code_node_unref0 (array_type);
2259
2261
                        } else {
2260
 
                                if (VALA_IS_DELEGATE_TYPE (vala_field_get_field_type (f))) {
 
2262
                                if (VALA_IS_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) f))) {
2261
2263
                                        ValaDelegateType* delegate_type;
2262
 
                                        delegate_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_field_get_field_type (f)));
 
2264
                                        delegate_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) f)));
2263
2265
                                        if (vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (delegate_type))) {
2264
2266
                                                ValaCCodeDeclaration* target_def;
2265
2267
                                                ValaCCodeVariableDeclarator* _tmp76_;
2303
2305
                                        _vala_code_node_unref0 (delegate_type);
2304
2306
                                }
2305
2307
                        }
2306
 
                        if (vala_field_get_initializer (f) != NULL) {
 
2308
                        if (vala_variable_get_initializer ((ValaVariable*) f) != NULL) {
2307
2309
                                ValaCCodeExpression* rhs;
2308
 
                                rhs = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_field_get_initializer (f))));
 
2310
                                rhs = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_variable_get_initializer ((ValaVariable*) f))));
2309
2311
                                if (!vala_ccode_base_module_is_constant_ccode_expression (self, rhs)) {
2310
2312
                                        if (VALA_IS_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) f))) {
2311
2313
                                                gboolean _tmp89_ = FALSE;
2312
2314
                                                gboolean _tmp90_ = FALSE;
2313
 
                                                if (VALA_IS_INITIALIZER_LIST (vala_field_get_initializer (f))) {
 
2315
                                                if (VALA_IS_INITIALIZER_LIST (vala_variable_get_initializer ((ValaVariable*) f))) {
2314
2316
                                                        ValaCCodeBlock* block;
2315
2317
                                                        ValaCCodeFragment* frag;
2316
2318
                                                        ValaLocalVariable* temp_decl;
2325
2327
                                                        ValaCCodeAssignment* _tmp85_;
2326
2328
                                                        block = vala_ccode_block_new ();
2327
2329
                                                        frag = vala_ccode_fragment_new ();
2328
 
                                                        temp_decl = vala_ccode_base_module_get_temp_variable (self, vala_field_get_field_type (f), TRUE, NULL, TRUE);
2329
 
                                                        _cdecl_ = (_tmp82_ = vala_ccode_declaration_new (_tmp81_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (temp_decl))), _g_free0 (_tmp81_), _tmp82_);
 
2330
                                                        temp_decl = vala_ccode_base_module_get_temp_variable (self, vala_variable_get_variable_type ((ValaVariable*) f), TRUE, NULL, TRUE);
 
2331
                                                        _cdecl_ = (_tmp82_ = vala_ccode_declaration_new (_tmp81_ = vala_data_type_get_cname (vala_variable_get_variable_type ((ValaVariable*) temp_decl))), _g_free0 (_tmp81_), _tmp82_);
2330
2332
                                                        vardecl = vala_ccode_variable_declarator_new (vala_symbol_get_name ((ValaSymbol*) temp_decl), rhs, NULL);
2331
2333
                                                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) vardecl);
2332
2334
                                                        vala_ccode_variable_declarator_set_init0 (vardecl, TRUE);
2350
2352
                                                        _vala_ccode_node_unref0 (_tmp88_);
2351
2353
                                                        _vala_ccode_node_unref0 (_tmp87_);
2352
2354
                                                }
2353
 
                                                if (VALA_IS_ARRAY_TYPE (vala_field_get_field_type (f))) {
 
2355
                                                if (VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) f))) {
2354
2356
                                                        _tmp90_ = !vala_field_get_no_array_length (f);
2355
2357
                                                } else {
2356
2358
                                                        _tmp90_ = FALSE;
2357
2359
                                                }
2358
2360
                                                if (_tmp90_) {
2359
 
                                                        _tmp89_ = VALA_IS_ARRAY_CREATION_EXPRESSION (vala_field_get_initializer (f));
 
2361
                                                        _tmp89_ = VALA_IS_ARRAY_CREATION_EXPRESSION (vala_variable_get_initializer ((ValaVariable*) f));
2360
2362
                                                } else {
2361
2363
                                                        _tmp89_ = FALSE;
2362
2364
                                                }
2364
2366
                                                        ValaArrayType* array_type;
2365
2367
                                                        ValaMemberAccess* ma;
2366
2368
                                                        ValaList* sizes;
2367
 
                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
 
2369
                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) f)));
2368
2370
                                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) f), NULL);
2369
2371
                                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) f);
2370
 
                                                        sizes = vala_array_creation_expression_get_sizes (VALA_ARRAY_CREATION_EXPRESSION (vala_field_get_initializer (f)));
 
2372
                                                        sizes = vala_array_creation_expression_get_sizes (VALA_ARRAY_CREATION_EXPRESSION (vala_variable_get_initializer ((ValaVariable*) f)));
2371
2373
                                                        {
2372
2374
                                                                gint dim;
2373
2375
                                                                dim = 1;
2471
2473
}
2472
2474
 
2473
2475
 
 
2476
/**
 
2477
 * Returns whether the passed cexpr is a pure expression, i.e. an
 
2478
 * expression without side-effects.
 
2479
 */
2474
2480
gboolean vala_ccode_base_module_is_pure_ccode_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr) {
2475
2481
        gboolean result = FALSE;
2476
2482
        gboolean _tmp0_ = FALSE;
2570
2576
        self = (ValaCCodeBaseModule*) base;
2571
2577
        g_return_if_fail (p != NULL);
2572
2578
        if (!vala_formal_parameter_get_ellipsis (p)) {
2573
 
                vala_ccode_base_module_check_type (self, vala_formal_parameter_get_parameter_type (p));
 
2579
                vala_ccode_base_module_check_type (self, vala_variable_get_variable_type ((ValaVariable*) p));
2574
2580
        }
2575
2581
}
2576
2582
 
2594
2600
        ValaMap* _tmp5_;
2595
2601
        self = (ValaCCodeBaseModule*) base;
2596
2602
        g_return_if_fail (prop != NULL);
 
2603
        vala_ccode_module_visit_member ((ValaCCodeModule*) self, (ValaSymbol*) prop);
2597
2604
        vala_ccode_base_module_check_type (self, vala_property_get_property_type (prop));
2598
2605
        old_next_temp_var_id = self->next_temp_var_id;
2599
2606
        old_temp_vars = _vala_collection_object_ref0 (self->temp_vars);
2952
2959
        gboolean old_method_inner_error;
2953
2960
        ValaSymbol* _tmp0_;
2954
2961
        ValaProperty* prop;
2955
 
        gboolean _tmp1_ = FALSE;
 
2962
        gboolean _tmp2_ = FALSE;
2956
2963
        gboolean returns_real_struct;
2957
2964
        ValaTypeSymbol* t;
2958
 
        gboolean _tmp2_ = FALSE;
2959
 
        gboolean _tmp4_ = FALSE;
 
2965
        gboolean _tmp3_ = FALSE;
2960
2966
        gboolean _tmp5_ = FALSE;
 
2967
        gboolean _tmp6_ = FALSE;
2961
2968
        ValaDataType* this_type;
2962
 
        char* _tmp11_;
2963
 
        ValaCCodeFormalParameter* _tmp12_;
 
2969
        char* _tmp12_;
 
2970
        ValaCCodeFormalParameter* _tmp13_;
2964
2971
        ValaCCodeFormalParameter* cselfparam;
2965
2972
        ValaCCodeFormalParameter* cvalueparam;
2966
 
        gboolean _tmp23_ = FALSE;
2967
 
        ValaSymbol* _tmp129_;
 
2973
        gboolean _tmp24_ = FALSE;
 
2974
        ValaSymbol* _tmp130_;
2968
2975
        self = (ValaCCodeBaseModule*) base;
2969
2976
        g_return_if_fail (acc != NULL);
2970
2977
        old_symbol = _vala_code_node_ref0 (self->current_symbol);
2972
2979
        self->current_symbol = (_tmp0_ = _vala_code_node_ref0 ((ValaSymbol*) acc), _vala_code_node_unref0 (self->current_symbol), _tmp0_);
2973
2980
        self->current_method_inner_error = FALSE;
2974
2981
        prop = _vala_code_node_ref0 (VALA_PROPERTY (vala_property_accessor_get_prop (acc)));
 
2982
        if (vala_symbol_get_comment ((ValaSymbol*) acc) != NULL) {
 
2983
                ValaCCodeComment* _tmp1_;
 
2984
                vala_ccode_fragment_append (self->source_type_member_definition, (ValaCCodeNode*) (_tmp1_ = vala_ccode_comment_new (vala_comment_get_content (vala_symbol_get_comment ((ValaSymbol*) acc)))));
 
2985
                _vala_ccode_node_unref0 (_tmp1_);
 
2986
        }
2975
2987
        if (vala_property_accessor_get_readable (acc)) {
2976
 
                _tmp1_ = vala_data_type_is_real_non_null_struct_type (vala_property_get_property_type (prop));
 
2988
                _tmp2_ = vala_data_type_is_real_non_null_struct_type (vala_property_get_property_type (prop));
2977
2989
        } else {
2978
 
                _tmp1_ = FALSE;
 
2990
                _tmp2_ = FALSE;
2979
2991
        }
2980
 
        returns_real_struct = _tmp1_;
 
2992
        returns_real_struct = _tmp2_;
2981
2993
        vala_code_node_accept_children ((ValaCodeNode*) acc, (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
2982
2994
        t = _vala_code_node_ref0 (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol ((ValaSymbol*) prop)));
2983
2995
        if (vala_property_accessor_get_construction (acc)) {
2984
 
                _tmp2_ = !vala_typesymbol_is_subtype_of (t, self->gobject_type);
 
2996
                _tmp3_ = !vala_typesymbol_is_subtype_of (t, self->gobject_type);
2985
2997
        } else {
2986
 
                _tmp2_ = FALSE;
 
2998
                _tmp3_ = FALSE;
2987
2999
        }
2988
 
        if (_tmp2_) {
 
3000
        if (_tmp3_) {
2989
3001
                vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) acc), "construct properties require GLib.Object");
2990
3002
                vala_code_node_set_error ((ValaCodeNode*) acc, TRUE);
2991
3003
                _vala_code_node_unref0 (t);
2993
3005
                _vala_code_node_unref0 (old_symbol);
2994
3006
                return;
2995
3007
        } else {
2996
 
                gboolean _tmp3_ = FALSE;
 
3008
                gboolean _tmp4_ = FALSE;
2997
3009
                if (vala_property_accessor_get_construction (acc)) {
2998
 
                        _tmp3_ = !vala_ccode_base_module_is_gobject_property (self, prop);
 
3010
                        _tmp4_ = !vala_ccode_base_module_is_gobject_property (self, prop);
2999
3011
                } else {
3000
 
                        _tmp3_ = FALSE;
 
3012
                        _tmp4_ = FALSE;
3001
3013
                }
3002
 
                if (_tmp3_) {
 
3014
                if (_tmp4_) {
3003
3015
                        vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) acc), "construct properties not supported for specified property type");
3004
3016
                        vala_code_node_set_error ((ValaCodeNode*) acc, TRUE);
3005
3017
                        _vala_code_node_unref0 (t);
3009
3021
                }
3010
3022
        }
3011
3023
        if (vala_property_get_is_abstract (prop)) {
 
3024
                _tmp6_ = TRUE;
 
3025
        } else {
 
3026
                _tmp6_ = vala_property_get_is_virtual (prop);
 
3027
        }
 
3028
        if (_tmp6_) {
3012
3029
                _tmp5_ = TRUE;
3013
3030
        } else {
3014
 
                _tmp5_ = vala_property_get_is_virtual (prop);
3015
 
        }
3016
 
        if (_tmp5_) {
3017
 
                _tmp4_ = TRUE;
3018
 
        } else {
3019
 
                gboolean _tmp6_ = FALSE;
 
3031
                gboolean _tmp7_ = FALSE;
3020
3032
                if (vala_property_get_base_property (prop) == NULL) {
3021
 
                        _tmp6_ = vala_property_get_base_interface_property (prop) == NULL;
 
3033
                        _tmp7_ = vala_property_get_base_interface_property (prop) == NULL;
3022
3034
                } else {
3023
 
                        _tmp6_ = FALSE;
 
3035
                        _tmp7_ = FALSE;
3024
3036
                }
3025
 
                _tmp4_ = _tmp6_;
 
3037
                _tmp5_ = _tmp7_;
3026
3038
        }
3027
 
        if (_tmp4_) {
3028
 
                gboolean _tmp7_ = FALSE;
 
3039
        if (_tmp5_) {
 
3040
                gboolean _tmp8_ = FALSE;
3029
3041
                vala_ccode_base_module_generate_property_accessor_declaration (self, acc, self->source_declarations);
3030
3042
                if (vala_property_accessor_get_readable (acc)) {
3031
 
                        _tmp7_ = TRUE;
 
3043
                        _tmp8_ = TRUE;
3032
3044
                } else {
3033
 
                        _tmp7_ = vala_property_accessor_get_writable (acc);
 
3045
                        _tmp8_ = vala_property_accessor_get_writable (acc);
3034
3046
                }
3035
 
                if (_tmp7_) {
3036
 
                        gboolean _tmp8_ = FALSE;
3037
 
                        gboolean _tmp10_ = FALSE;
 
3047
                if (_tmp8_) {
 
3048
                        gboolean _tmp9_ = FALSE;
 
3049
                        gboolean _tmp11_ = FALSE;
3038
3050
                        if (!vala_symbol_is_internal_symbol ((ValaSymbol*) prop)) {
3039
 
                                gboolean _tmp9_ = FALSE;
 
3051
                                gboolean _tmp10_ = FALSE;
3040
3052
                                if (vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PUBLIC) {
3041
 
                                        _tmp9_ = TRUE;
 
3053
                                        _tmp10_ = TRUE;
3042
3054
                                } else {
3043
 
                                        _tmp9_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PROTECTED;
 
3055
                                        _tmp10_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PROTECTED;
3044
3056
                                }
3045
 
                                _tmp8_ = _tmp9_;
 
3057
                                _tmp9_ = _tmp10_;
3046
3058
                        } else {
3047
 
                                _tmp8_ = FALSE;
 
3059
                                _tmp9_ = FALSE;
3048
3060
                        }
3049
 
                        if (_tmp8_) {
 
3061
                        if (_tmp9_) {
3050
3062
                                vala_ccode_base_module_generate_property_accessor_declaration (self, acc, self->header_declarations);
3051
3063
                        }
3052
3064
                        if (!vala_symbol_is_private_symbol ((ValaSymbol*) prop)) {
3053
 
                                _tmp10_ = vala_symbol_get_access ((ValaSymbol*) acc) != VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
 
3065
                                _tmp11_ = vala_symbol_get_access ((ValaSymbol*) acc) != VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3054
3066
                        } else {
3055
 
                                _tmp10_ = FALSE;
 
3067
                                _tmp11_ = FALSE;
3056
3068
                        }
3057
 
                        if (_tmp10_) {
 
3069
                        if (_tmp11_) {
3058
3070
                                vala_ccode_base_module_generate_property_accessor_declaration (self, acc, self->internal_header_declarations);
3059
3071
                        }
3060
3072
                }
3061
3073
        }
3062
3074
        this_type = vala_ccode_base_module_get_data_type_for_symbol (t);
3063
 
        cselfparam = (_tmp12_ = vala_ccode_formal_parameter_new ("self", _tmp11_ = vala_data_type_get_cname (this_type)), _g_free0 (_tmp11_), _tmp12_);
 
3075
        cselfparam = (_tmp13_ = vala_ccode_formal_parameter_new ("self", _tmp12_ = vala_data_type_get_cname (this_type)), _g_free0 (_tmp12_), _tmp13_);
3064
3076
        if (VALA_IS_STRUCT (t)) {
3065
 
                char* _tmp13_;
3066
 
                vala_ccode_formal_parameter_set_type_name (cselfparam, _tmp13_ = g_strconcat (vala_ccode_formal_parameter_get_type_name (cselfparam), "*", NULL));
3067
 
                _g_free0 (_tmp13_);
 
3077
                char* _tmp14_;
 
3078
                vala_ccode_formal_parameter_set_type_name (cselfparam, _tmp14_ = g_strconcat (vala_ccode_formal_parameter_get_type_name (cselfparam), "*", NULL));
 
3079
                _g_free0 (_tmp14_);
3068
3080
        }
3069
3081
        cvalueparam = NULL;
3070
3082
        if (returns_real_struct) {
3071
 
                ValaCCodeFormalParameter* _tmp16_;
 
3083
                ValaCCodeFormalParameter* _tmp17_;
 
3084
                char* _tmp16_;
3072
3085
                char* _tmp15_;
3073
 
                char* _tmp14_;
3074
 
                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_);
 
3086
                cvalueparam = (_tmp17_ = vala_ccode_formal_parameter_new ("result", _tmp16_ = g_strconcat (_tmp15_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc)), "*", NULL)), _vala_ccode_node_unref0 (cvalueparam), _tmp17_);
 
3087
                _g_free0 (_tmp16_);
3075
3088
                _g_free0 (_tmp15_);
3076
 
                _g_free0 (_tmp14_);
3077
3089
        } else {
3078
 
                gboolean _tmp17_ = FALSE;
 
3090
                gboolean _tmp18_ = FALSE;
3079
3091
                if (!vala_property_accessor_get_readable (acc)) {
3080
 
                        _tmp17_ = vala_data_type_is_real_non_null_struct_type (vala_property_get_property_type (prop));
 
3092
                        _tmp18_ = vala_data_type_is_real_non_null_struct_type (vala_property_get_property_type (prop));
3081
3093
                } else {
3082
 
                        _tmp17_ = FALSE;
 
3094
                        _tmp18_ = FALSE;
3083
3095
                }
3084
 
                if (_tmp17_) {
3085
 
                        ValaCCodeFormalParameter* _tmp20_;
 
3096
                if (_tmp18_) {
 
3097
                        ValaCCodeFormalParameter* _tmp21_;
 
3098
                        char* _tmp20_;
3086
3099
                        char* _tmp19_;
3087
 
                        char* _tmp18_;
3088
 
                        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_);
 
3100
                        cvalueparam = (_tmp21_ = vala_ccode_formal_parameter_new ("value", _tmp20_ = g_strconcat (_tmp19_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc)), "*", NULL)), _vala_ccode_node_unref0 (cvalueparam), _tmp21_);
 
3101
                        _g_free0 (_tmp20_);
3089
3102
                        _g_free0 (_tmp19_);
3090
 
                        _g_free0 (_tmp18_);
3091
3103
                } else {
3092
 
                        ValaCCodeFormalParameter* _tmp22_;
3093
 
                        char* _tmp21_;
3094
 
                        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_);
3095
 
                        _g_free0 (_tmp21_);
 
3104
                        ValaCCodeFormalParameter* _tmp23_;
 
3105
                        char* _tmp22_;
 
3106
                        cvalueparam = (_tmp23_ = vala_ccode_formal_parameter_new ("value", _tmp22_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc))), _vala_ccode_node_unref0 (cvalueparam), _tmp23_);
 
3107
                        _g_free0 (_tmp22_);
3096
3108
                }
3097
3109
        }
3098
3110
        if (vala_property_get_is_abstract (prop)) {
3099
 
                _tmp23_ = TRUE;
 
3111
                _tmp24_ = TRUE;
3100
3112
        } else {
3101
 
                _tmp23_ = vala_property_get_is_virtual (prop);
 
3113
                _tmp24_ = vala_property_get_is_virtual (prop);
3102
3114
        }
3103
 
        if (_tmp23_) {
3104
 
                gboolean _tmp24_ = FALSE;
3105
 
                gboolean _tmp30_ = FALSE;
 
3115
        if (_tmp24_) {
 
3116
                gboolean _tmp25_ = FALSE;
3106
3117
                gboolean _tmp31_ = FALSE;
3107
 
                gboolean _tmp42_ = FALSE;
 
3118
                gboolean _tmp32_ = FALSE;
3108
3119
                gboolean _tmp43_ = FALSE;
 
3120
                gboolean _tmp44_ = FALSE;
3109
3121
                ValaCCodeBlock* block;
3110
3122
                ValaCCodeFunctionCall* vcast;
3111
 
                ValaCCodeIdentifier* _tmp53_;
 
3123
                ValaCCodeIdentifier* _tmp54_;
3112
3124
                if (vala_property_accessor_get_readable (acc)) {
3113
 
                        _tmp24_ = !returns_real_struct;
 
3125
                        _tmp25_ = !returns_real_struct;
3114
3126
                } else {
3115
 
                        _tmp24_ = FALSE;
 
3127
                        _tmp25_ = FALSE;
3116
3128
                }
3117
 
                if (_tmp24_) {
3118
 
                        ValaCCodeFunction* _tmp27_;
 
3129
                if (_tmp25_) {
 
3130
                        ValaCCodeFunction* _tmp28_;
 
3131
                        char* _tmp27_;
3119
3132
                        char* _tmp26_;
3120
 
                        char* _tmp25_;
3121
 
                        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_);
 
3133
                        self->function = (_tmp28_ = vala_ccode_function_new (_tmp26_ = vala_property_accessor_get_cname (acc), _tmp27_ = vala_data_type_get_cname (vala_ccode_base_module_get_current_return_type (self))), _vala_ccode_node_unref0 (self->function), _tmp28_);
 
3134
                        _g_free0 (_tmp27_);
3122
3135
                        _g_free0 (_tmp26_);
3123
 
                        _g_free0 (_tmp25_);
3124
3136
                } else {
3125
 
                        ValaCCodeFunction* _tmp29_;
3126
 
                        char* _tmp28_;
3127
 
                        self->function = (_tmp29_ = vala_ccode_function_new (_tmp28_ = vala_property_accessor_get_cname (acc), "void"), _vala_ccode_node_unref0 (self->function), _tmp29_);
3128
 
                        _g_free0 (_tmp28_);
 
3137
                        ValaCCodeFunction* _tmp30_;
 
3138
                        char* _tmp29_;
 
3139
                        self->function = (_tmp30_ = vala_ccode_function_new (_tmp29_ = vala_property_accessor_get_cname (acc), "void"), _vala_ccode_node_unref0 (self->function), _tmp30_);
 
3140
                        _g_free0 (_tmp29_);
3129
3141
                }
3130
3142
                vala_ccode_function_add_parameter (self->function, cselfparam);
3131
3143
                if (vala_property_accessor_get_writable (acc)) {
 
3144
                        _tmp32_ = TRUE;
 
3145
                } else {
 
3146
                        _tmp32_ = vala_property_accessor_get_construction (acc);
 
3147
                }
 
3148
                if (_tmp32_) {
3132
3149
                        _tmp31_ = TRUE;
3133
3150
                } else {
3134
 
                        _tmp31_ = vala_property_accessor_get_construction (acc);
 
3151
                        _tmp31_ = returns_real_struct;
3135
3152
                }
3136
3153
                if (_tmp31_) {
3137
 
                        _tmp30_ = TRUE;
3138
 
                } else {
3139
 
                        _tmp30_ = returns_real_struct;
3140
 
                }
3141
 
                if (_tmp30_) {
3142
3154
                        vala_ccode_function_add_parameter (self->function, cvalueparam);
3143
3155
                }
3144
3156
                if (VALA_IS_ARRAY_TYPE (vala_property_accessor_get_value_type (acc))) {
3147
3159
                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_property_accessor_get_value_type (acc)));
3148
3160
                        length_ctype = g_strdup ("int");
3149
3161
                        if (vala_property_accessor_get_readable (acc)) {
3150
 
                                char* _tmp32_;
3151
 
                                length_ctype = (_tmp32_ = g_strdup ("int*"), _g_free0 (length_ctype), _tmp32_);
 
3162
                                char* _tmp33_;
 
3163
                                length_ctype = (_tmp33_ = g_strdup ("int*"), _g_free0 (length_ctype), _tmp33_);
3152
3164
                        }
3153
3165
                        {
3154
3166
                                gint dim;
3155
3167
                                dim = 1;
3156
3168
                                {
3157
 
                                        gboolean _tmp33_;
3158
 
                                        _tmp33_ = TRUE;
 
3169
                                        gboolean _tmp34_;
 
3170
                                        _tmp34_ = TRUE;
3159
3171
                                        while (TRUE) {
3160
 
                                                const char* _tmp34_;
3161
 
                                                ValaCCodeFormalParameter* _tmp36_;
3162
 
                                                char* _tmp35_;
3163
 
                                                if (!_tmp33_) {
 
3172
                                                const char* _tmp35_;
 
3173
                                                ValaCCodeFormalParameter* _tmp37_;
 
3174
                                                char* _tmp36_;
 
3175
                                                if (!_tmp34_) {
3164
3176
                                                        dim++;
3165
3177
                                                }
3166
 
                                                _tmp33_ = FALSE;
 
3178
                                                _tmp34_ = FALSE;
3167
3179
                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
3168
3180
                                                        break;
3169
3181
                                                }
3170
 
                                                _tmp34_ = NULL;
 
3182
                                                _tmp35_ = NULL;
3171
3183
                                                if (vala_property_accessor_get_readable (acc)) {
3172
 
                                                        _tmp34_ = "result";
 
3184
                                                        _tmp35_ = "result";
3173
3185
                                                } else {
3174
 
                                                        _tmp34_ = "value";
 
3186
                                                        _tmp35_ = "value";
3175
3187
                                                }
3176
 
                                                vala_ccode_function_add_parameter (self->function, _tmp36_ = vala_ccode_formal_parameter_new (_tmp35_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp34_, dim), length_ctype));
3177
 
                                                _vala_ccode_node_unref0 (_tmp36_);
3178
 
                                                _g_free0 (_tmp35_);
 
3188
                                                vala_ccode_function_add_parameter (self->function, _tmp37_ = vala_ccode_formal_parameter_new (_tmp36_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp35_, dim), length_ctype));
 
3189
                                                _vala_ccode_node_unref0 (_tmp37_);
 
3190
                                                _g_free0 (_tmp36_);
3179
3191
                                        }
3180
3192
                                }
3181
3193
                        }
3182
3194
                        _g_free0 (length_ctype);
3183
3195
                        _vala_code_node_unref0 (array_type);
3184
3196
                } else {
3185
 
                        gboolean _tmp37_ = FALSE;
 
3197
                        gboolean _tmp38_ = FALSE;
3186
3198
                        if (VALA_IS_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))) {
3187
 
                                _tmp37_ = vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))));
 
3199
                                _tmp38_ = vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))));
3188
3200
                        } else {
3189
 
                                _tmp37_ = FALSE;
 
3201
                                _tmp38_ = FALSE;
3190
3202
                        }
3191
 
                        if (_tmp37_) {
3192
 
                                const char* _tmp38_;
 
3203
                        if (_tmp38_) {
3193
3204
                                const char* _tmp39_;
3194
 
                                ValaCCodeFormalParameter* _tmp41_;
3195
 
                                char* _tmp40_;
3196
 
                                _tmp38_ = NULL;
3197
 
                                if (vala_property_accessor_get_readable (acc)) {
3198
 
                                        _tmp38_ = "result";
3199
 
                                } else {
3200
 
                                        _tmp38_ = "value";
3201
 
                                }
 
3205
                                const char* _tmp40_;
 
3206
                                ValaCCodeFormalParameter* _tmp42_;
 
3207
                                char* _tmp41_;
3202
3208
                                _tmp39_ = NULL;
3203
3209
                                if (vala_property_accessor_get_readable (acc)) {
3204
 
                                        _tmp39_ = "gpointer*";
3205
 
                                } else {
3206
 
                                        _tmp39_ = "gpointer";
3207
 
                                }
3208
 
                                vala_ccode_function_add_parameter (self->function, _tmp41_ = vala_ccode_formal_parameter_new (_tmp40_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp38_), _tmp39_));
3209
 
                                _vala_ccode_node_unref0 (_tmp41_);
3210
 
                                _g_free0 (_tmp40_);
 
3210
                                        _tmp39_ = "result";
 
3211
                                } else {
 
3212
                                        _tmp39_ = "value";
 
3213
                                }
 
3214
                                _tmp40_ = NULL;
 
3215
                                if (vala_property_accessor_get_readable (acc)) {
 
3216
                                        _tmp40_ = "gpointer*";
 
3217
                                } else {
 
3218
                                        _tmp40_ = "gpointer";
 
3219
                                }
 
3220
                                vala_ccode_function_add_parameter (self->function, _tmp42_ = vala_ccode_formal_parameter_new (_tmp41_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp39_), _tmp40_));
 
3221
                                _vala_ccode_node_unref0 (_tmp42_);
 
3222
                                _g_free0 (_tmp41_);
3211
3223
                        }
3212
3224
                }
3213
3225
                if (vala_symbol_is_private_symbol ((ValaSymbol*) prop)) {
 
3226
                        _tmp44_ = TRUE;
 
3227
                } else {
 
3228
                        gboolean _tmp45_ = FALSE;
 
3229
                        if (vala_property_accessor_get_readable (acc)) {
 
3230
                                _tmp45_ = TRUE;
 
3231
                        } else {
 
3232
                                _tmp45_ = vala_property_accessor_get_writable (acc);
 
3233
                        }
 
3234
                        _tmp44_ = !_tmp45_;
 
3235
                }
 
3236
                if (_tmp44_) {
3214
3237
                        _tmp43_ = TRUE;
3215
3238
                } else {
3216
 
                        gboolean _tmp44_ = FALSE;
3217
 
                        if (vala_property_accessor_get_readable (acc)) {
3218
 
                                _tmp44_ = TRUE;
3219
 
                        } else {
3220
 
                                _tmp44_ = vala_property_accessor_get_writable (acc);
3221
 
                        }
3222
 
                        _tmp43_ = !_tmp44_;
 
3239
                        _tmp43_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3223
3240
                }
3224
3241
                if (_tmp43_) {
3225
 
                        _tmp42_ = TRUE;
3226
 
                } else {
3227
 
                        _tmp42_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3228
 
                }
3229
 
                if (_tmp42_) {
3230
3242
                        vala_ccode_function_set_modifiers (self->function, vala_ccode_function_get_modifiers (self->function) | VALA_CCODE_MODIFIERS_STATIC);
3231
3243
                }
3232
3244
                block = vala_ccode_block_new ();
3234
3246
                vcast = NULL;
3235
3247
                if (VALA_IS_INTERFACE (vala_symbol_get_parent_symbol ((ValaSymbol*) prop))) {
3236
3248
                        ValaInterface* iface;
3237
 
                        ValaCCodeFunctionCall* _tmp48_;
3238
 
                        ValaCCodeIdentifier* _tmp47_;
 
3249
                        ValaCCodeFunctionCall* _tmp49_;
 
3250
                        ValaCCodeIdentifier* _tmp48_;
 
3251
                        char* _tmp47_;
3239
3252
                        char* _tmp46_;
3240
 
                        char* _tmp45_;
3241
3253
                        iface = _vala_code_node_ref0 (VALA_INTERFACE (vala_symbol_get_parent_symbol ((ValaSymbol*) prop)));
3242
 
                        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_);
3243
 
                        _vala_ccode_node_unref0 (_tmp47_);
 
3254
                        vcast = (_tmp49_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp48_ = vala_ccode_identifier_new (_tmp47_ = g_strdup_printf ("%s_GET_INTERFACE", _tmp46_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) iface, NULL))))), _vala_ccode_node_unref0 (vcast), _tmp49_);
 
3255
                        _vala_ccode_node_unref0 (_tmp48_);
 
3256
                        _g_free0 (_tmp47_);
3244
3257
                        _g_free0 (_tmp46_);
3245
 
                        _g_free0 (_tmp45_);
3246
3258
                        _vala_code_node_unref0 (iface);
3247
3259
                } else {
3248
3260
                        ValaClass* cl;
3249
 
                        ValaCCodeFunctionCall* _tmp52_;
3250
 
                        ValaCCodeIdentifier* _tmp51_;
 
3261
                        ValaCCodeFunctionCall* _tmp53_;
 
3262
                        ValaCCodeIdentifier* _tmp52_;
 
3263
                        char* _tmp51_;
3251
3264
                        char* _tmp50_;
3252
 
                        char* _tmp49_;
3253
3265
                        cl = _vala_code_node_ref0 (VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) prop)));
3254
 
                        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_);
3255
 
                        _vala_ccode_node_unref0 (_tmp51_);
 
3266
                        vcast = (_tmp53_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp52_ = vala_ccode_identifier_new (_tmp51_ = g_strdup_printf ("%s_GET_CLASS", _tmp50_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) cl, NULL))))), _vala_ccode_node_unref0 (vcast), _tmp53_);
 
3267
                        _vala_ccode_node_unref0 (_tmp52_);
 
3268
                        _g_free0 (_tmp51_);
3256
3269
                        _g_free0 (_tmp50_);
3257
 
                        _g_free0 (_tmp49_);
3258
3270
                        _vala_code_node_unref0 (cl);
3259
3271
                }
3260
 
                vala_ccode_function_call_add_argument (vcast, (ValaCCodeExpression*) (_tmp53_ = vala_ccode_identifier_new ("self")));
3261
 
                _vala_ccode_node_unref0 (_tmp53_);
 
3272
                vala_ccode_function_call_add_argument (vcast, (ValaCCodeExpression*) (_tmp54_ = vala_ccode_identifier_new ("self")));
 
3273
                _vala_ccode_node_unref0 (_tmp54_);
3262
3274
                if (vala_property_accessor_get_readable (acc)) {
3263
 
                        ValaCCodeMemberAccess* _tmp55_;
3264
 
                        char* _tmp54_;
3265
 
                        ValaCCodeFunctionCall* _tmp56_;
 
3275
                        ValaCCodeMemberAccess* _tmp56_;
 
3276
                        char* _tmp55_;
 
3277
                        ValaCCodeFunctionCall* _tmp57_;
3266
3278
                        ValaCCodeFunctionCall* vcall;
3267
 
                        ValaCCodeIdentifier* _tmp57_;
3268
 
                        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_);
3269
 
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp57_ = vala_ccode_identifier_new ("self")));
3270
 
                        _vala_ccode_node_unref0 (_tmp57_);
 
3279
                        ValaCCodeIdentifier* _tmp58_;
 
3280
                        vcall = (_tmp57_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp56_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) vcast, _tmp55_ = g_strdup_printf ("get_%s", vala_symbol_get_name ((ValaSymbol*) prop))))), _vala_ccode_node_unref0 (_tmp56_), _g_free0 (_tmp55_), _tmp57_);
 
3281
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp58_ = vala_ccode_identifier_new ("self")));
 
3282
                        _vala_ccode_node_unref0 (_tmp58_);
3271
3283
                        if (returns_real_struct) {
3272
 
                                ValaCCodeIdentifier* _tmp58_;
3273
 
                                ValaCCodeExpressionStatement* _tmp59_;
3274
 
                                vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp58_ = vala_ccode_identifier_new ("result")));
3275
 
                                _vala_ccode_node_unref0 (_tmp58_);
3276
 
                                vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp59_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) vcall)));
 
3284
                                ValaCCodeIdentifier* _tmp59_;
 
3285
                                ValaCCodeExpressionStatement* _tmp60_;
 
3286
                                vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp59_ = vala_ccode_identifier_new ("result")));
3277
3287
                                _vala_ccode_node_unref0 (_tmp59_);
 
3288
                                vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp60_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) vcall)));
 
3289
                                _vala_ccode_node_unref0 (_tmp60_);
3278
3290
                        } else {
3279
 
                                ValaCCodeReturnStatement* _tmp63_;
 
3291
                                ValaCCodeReturnStatement* _tmp64_;
3280
3292
                                if (VALA_IS_ARRAY_TYPE (vala_property_accessor_get_value_type (acc))) {
3281
3293
                                        ValaArrayType* array_type;
3282
3294
                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_property_accessor_get_value_type (acc)));
3284
3296
                                                gint dim;
3285
3297
                                                dim = 1;
3286
3298
                                                {
3287
 
                                                        gboolean _tmp60_;
3288
 
                                                        _tmp60_ = TRUE;
 
3299
                                                        gboolean _tmp61_;
 
3300
                                                        _tmp61_ = TRUE;
3289
3301
                                                        while (TRUE) {
3290
 
                                                                char* _tmp61_;
3291
 
                                                                ValaCCodeIdentifier* _tmp62_;
 
3302
                                                                char* _tmp62_;
 
3303
                                                                ValaCCodeIdentifier* _tmp63_;
3292
3304
                                                                ValaCCodeIdentifier* len_expr;
3293
 
                                                                if (!_tmp60_) {
 
3305
                                                                if (!_tmp61_) {
3294
3306
                                                                        dim++;
3295
3307
                                                                }
3296
 
                                                                _tmp60_ = FALSE;
 
3308
                                                                _tmp61_ = FALSE;
3297
3309
                                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
3298
3310
                                                                        break;
3299
3311
                                                                }
3300
 
                                                                len_expr = (_tmp62_ = vala_ccode_identifier_new (_tmp61_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), "result", dim)), _g_free0 (_tmp61_), _tmp62_);
 
3312
                                                                len_expr = (_tmp63_ = vala_ccode_identifier_new (_tmp62_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), "result", dim)), _g_free0 (_tmp62_), _tmp63_);
3301
3313
                                                                vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) len_expr);
3302
3314
                                                                _vala_ccode_node_unref0 (len_expr);
3303
3315
                                                        }
3305
3317
                                        }
3306
3318
                                        _vala_code_node_unref0 (array_type);
3307
3319
                                }
3308
 
                                vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp63_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) vcall)));
3309
 
                                _vala_ccode_node_unref0 (_tmp63_);
 
3320
                                vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp64_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) vcall)));
 
3321
                                _vala_ccode_node_unref0 (_tmp64_);
3310
3322
                        }
3311
3323
                        _vala_ccode_node_unref0 (vcall);
3312
3324
                } else {
3313
 
                        ValaCCodeMemberAccess* _tmp65_;
3314
 
                        char* _tmp64_;
3315
 
                        ValaCCodeFunctionCall* _tmp66_;
 
3325
                        ValaCCodeMemberAccess* _tmp66_;
 
3326
                        char* _tmp65_;
 
3327
                        ValaCCodeFunctionCall* _tmp67_;
3316
3328
                        ValaCCodeFunctionCall* vcall;
3317
 
                        ValaCCodeIdentifier* _tmp67_;
3318
3329
                        ValaCCodeIdentifier* _tmp68_;
3319
 
                        ValaCCodeExpressionStatement* _tmp72_;
3320
 
                        vcall = (_tmp66_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp65_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) vcast, _tmp64_ = g_strdup_printf ("set_%s", vala_symbol_get_name ((ValaSymbol*) prop))))), _vala_ccode_node_unref0 (_tmp65_), _g_free0 (_tmp64_), _tmp66_);
3321
 
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp67_ = vala_ccode_identifier_new ("self")));
3322
 
                        _vala_ccode_node_unref0 (_tmp67_);
3323
 
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp68_ = vala_ccode_identifier_new ("value")));
 
3330
                        ValaCCodeIdentifier* _tmp69_;
 
3331
                        ValaCCodeExpressionStatement* _tmp73_;
 
3332
                        vcall = (_tmp67_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp66_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) vcast, _tmp65_ = g_strdup_printf ("set_%s", vala_symbol_get_name ((ValaSymbol*) prop))))), _vala_ccode_node_unref0 (_tmp66_), _g_free0 (_tmp65_), _tmp67_);
 
3333
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp68_ = vala_ccode_identifier_new ("self")));
3324
3334
                        _vala_ccode_node_unref0 (_tmp68_);
 
3335
                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp69_ = vala_ccode_identifier_new ("value")));
 
3336
                        _vala_ccode_node_unref0 (_tmp69_);
3325
3337
                        if (VALA_IS_ARRAY_TYPE (vala_property_accessor_get_value_type (acc))) {
3326
3338
                                ValaArrayType* array_type;
3327
3339
                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_property_accessor_get_value_type (acc)));
3329
3341
                                        gint dim;
3330
3342
                                        dim = 1;
3331
3343
                                        {
3332
 
                                                gboolean _tmp69_;
3333
 
                                                _tmp69_ = TRUE;
 
3344
                                                gboolean _tmp70_;
 
3345
                                                _tmp70_ = TRUE;
3334
3346
                                                while (TRUE) {
3335
 
                                                        char* _tmp70_;
3336
 
                                                        ValaCCodeIdentifier* _tmp71_;
 
3347
                                                        char* _tmp71_;
 
3348
                                                        ValaCCodeIdentifier* _tmp72_;
3337
3349
                                                        ValaCCodeIdentifier* len_expr;
3338
 
                                                        if (!_tmp69_) {
 
3350
                                                        if (!_tmp70_) {
3339
3351
                                                                dim++;
3340
3352
                                                        }
3341
 
                                                        _tmp69_ = FALSE;
 
3353
                                                        _tmp70_ = FALSE;
3342
3354
                                                        if (!(dim <= vala_array_type_get_rank (array_type))) {
3343
3355
                                                                break;
3344
3356
                                                        }
3345
 
                                                        len_expr = (_tmp71_ = vala_ccode_identifier_new (_tmp70_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), "value", dim)), _g_free0 (_tmp70_), _tmp71_);
 
3357
                                                        len_expr = (_tmp72_ = vala_ccode_identifier_new (_tmp71_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), "value", dim)), _g_free0 (_tmp71_), _tmp72_);
3346
3358
                                                        vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) len_expr);
3347
3359
                                                        _vala_ccode_node_unref0 (len_expr);
3348
3360
                                                }
3350
3362
                                }
3351
3363
                                _vala_code_node_unref0 (array_type);
3352
3364
                        }
3353
 
                        vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp72_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) vcall)));
3354
 
                        _vala_ccode_node_unref0 (_tmp72_);
 
3365
                        vala_ccode_block_add_statement (block, (ValaCCodeNode*) (_tmp73_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) vcall)));
 
3366
                        _vala_ccode_node_unref0 (_tmp73_);
3355
3367
                        _vala_ccode_node_unref0 (vcall);
3356
3368
                }
3357
3369
                vala_ccode_fragment_append (self->source_type_member_definition, (ValaCCodeNode*) self->function);
3359
3371
                _vala_ccode_node_unref0 (block);
3360
3372
        }
3361
3373
        if (!vala_property_get_is_abstract (prop)) {
3362
 
                gboolean _tmp73_ = FALSE;
 
3374
                gboolean _tmp74_ = FALSE;
3363
3375
                gboolean is_virtual;
3364
3376
                char* cname;
3365
 
                gboolean _tmp79_ = FALSE;
3366
3377
                gboolean _tmp80_ = FALSE;
 
3378
                gboolean _tmp81_ = FALSE;
3367
3379
                ValaObjectType* base_type;
3368
 
                gboolean _tmp88_ = FALSE;
3369
3380
                gboolean _tmp89_ = FALSE;
3370
 
                gboolean _tmp108_ = FALSE;
3371
 
                gboolean _tmp116_ = FALSE;
3372
 
                gboolean _tmp120_ = FALSE;
 
3381
                gboolean _tmp90_ = FALSE;
 
3382
                gboolean _tmp109_ = FALSE;
 
3383
                gboolean _tmp117_ = FALSE;
3373
3384
                gboolean _tmp121_ = FALSE;
 
3385
                gboolean _tmp122_ = FALSE;
3374
3386
                if (vala_property_get_base_property (prop) != NULL) {
3375
 
                        _tmp73_ = TRUE;
 
3387
                        _tmp74_ = TRUE;
3376
3388
                } else {
3377
 
                        _tmp73_ = vala_property_get_base_interface_property (prop) != NULL;
 
3389
                        _tmp74_ = vala_property_get_base_interface_property (prop) != NULL;
3378
3390
                }
3379
 
                is_virtual = _tmp73_;
 
3391
                is_virtual = _tmp74_;
3380
3392
                cname = NULL;
3381
3393
                if (is_virtual) {
3382
3394
                        if (vala_property_accessor_get_readable (acc)) {
 
3395
                                char* _tmp76_;
3383
3396
                                char* _tmp75_;
3384
 
                                char* _tmp74_;
3385
 
                                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_);
3386
 
                                _g_free0 (_tmp74_);
 
3397
                                cname = (_tmp76_ = g_strdup_printf ("%s_real_get_%s", _tmp75_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) t, NULL), vala_symbol_get_name ((ValaSymbol*) prop)), _g_free0 (cname), _tmp76_);
 
3398
                                _g_free0 (_tmp75_);
3387
3399
                        } else {
 
3400
                                char* _tmp78_;
3388
3401
                                char* _tmp77_;
3389
 
                                char* _tmp76_;
3390
 
                                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_);
3391
 
                                _g_free0 (_tmp76_);
 
3402
                                cname = (_tmp78_ = g_strdup_printf ("%s_real_set_%s", _tmp77_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) t, NULL), vala_symbol_get_name ((ValaSymbol*) prop)), _g_free0 (cname), _tmp78_);
 
3403
                                _g_free0 (_tmp77_);
3392
3404
                        }
3393
3405
                } else {
3394
 
                        char* _tmp78_;
3395
 
                        cname = (_tmp78_ = vala_property_accessor_get_cname (acc), _g_free0 (cname), _tmp78_);
 
3406
                        char* _tmp79_;
 
3407
                        cname = (_tmp79_ = vala_property_accessor_get_cname (acc), _g_free0 (cname), _tmp79_);
3396
3408
                }
3397
3409
                if (vala_property_accessor_get_writable (acc)) {
 
3410
                        _tmp81_ = TRUE;
 
3411
                } else {
 
3412
                        _tmp81_ = vala_property_accessor_get_construction (acc);
 
3413
                }
 
3414
                if (_tmp81_) {
3398
3415
                        _tmp80_ = TRUE;
3399
3416
                } else {
3400
 
                        _tmp80_ = vala_property_accessor_get_construction (acc);
 
3417
                        _tmp80_ = returns_real_struct;
3401
3418
                }
3402
3419
                if (_tmp80_) {
3403
 
                        _tmp79_ = TRUE;
3404
 
                } else {
3405
 
                        _tmp79_ = returns_real_struct;
3406
 
                }
3407
 
                if (_tmp79_) {
3408
 
                        ValaCCodeFunction* _tmp81_;
3409
 
                        self->function = (_tmp81_ = vala_ccode_function_new (cname, "void"), _vala_ccode_node_unref0 (self->function), _tmp81_);
3410
 
                } else {
3411
 
                        ValaCCodeFunction* _tmp83_;
3412
 
                        char* _tmp82_;
3413
 
                        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_);
3414
 
                        _g_free0 (_tmp82_);
 
3420
                        ValaCCodeFunction* _tmp82_;
 
3421
                        self->function = (_tmp82_ = vala_ccode_function_new (cname, "void"), _vala_ccode_node_unref0 (self->function), _tmp82_);
 
3422
                } else {
 
3423
                        ValaCCodeFunction* _tmp84_;
 
3424
                        char* _tmp83_;
 
3425
                        self->function = (_tmp84_ = vala_ccode_function_new (cname, _tmp83_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc))), _vala_ccode_node_unref0 (self->function), _tmp84_);
 
3426
                        _g_free0 (_tmp83_);
3415
3427
                }
3416
3428
                base_type = NULL;
3417
3429
                if (vala_property_get_binding (prop) == MEMBER_BINDING_INSTANCE) {
3418
3430
                        if (is_virtual) {
3419
 
                                ValaCCodeFormalParameter* _tmp87_;
3420
 
                                char* _tmp86_;
 
3431
                                ValaCCodeFormalParameter* _tmp88_;
 
3432
                                char* _tmp87_;
3421
3433
                                if (vala_property_get_base_property (prop) != NULL) {
3422
 
                                        ValaObjectType* _tmp84_;
3423
 
                                        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_);
 
3434
                                        ValaObjectType* _tmp85_;
 
3435
                                        base_type = (_tmp85_ = 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), _tmp85_);
3424
3436
                                } else {
3425
3437
                                        if (vala_property_get_base_interface_property (prop) != NULL) {
3426
 
                                                ValaObjectType* _tmp85_;
3427
 
                                                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_);
 
3438
                                                ValaObjectType* _tmp86_;
 
3439
                                                base_type = (_tmp86_ = 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), _tmp86_);
3428
3440
                                        }
3429
3441
                                }
3430
3442
                                vala_ccode_function_set_modifiers (self->function, vala_ccode_function_get_modifiers (self->function) | VALA_CCODE_MODIFIERS_STATIC);
3431
 
                                vala_ccode_function_add_parameter (self->function, _tmp87_ = vala_ccode_formal_parameter_new ("base", _tmp86_ = vala_data_type_get_cname ((ValaDataType*) base_type)));
3432
 
                                _vala_ccode_node_unref0 (_tmp87_);
3433
 
                                _g_free0 (_tmp86_);
 
3443
                                vala_ccode_function_add_parameter (self->function, _tmp88_ = vala_ccode_formal_parameter_new ("base", _tmp87_ = vala_data_type_get_cname ((ValaDataType*) base_type)));
 
3444
                                _vala_ccode_node_unref0 (_tmp88_);
 
3445
                                _g_free0 (_tmp87_);
3434
3446
                        } else {
3435
3447
                                vala_ccode_function_add_parameter (self->function, cselfparam);
3436
3448
                        }
3437
3449
                }
3438
3450
                if (vala_property_accessor_get_writable (acc)) {
 
3451
                        _tmp90_ = TRUE;
 
3452
                } else {
 
3453
                        _tmp90_ = vala_property_accessor_get_construction (acc);
 
3454
                }
 
3455
                if (_tmp90_) {
3439
3456
                        _tmp89_ = TRUE;
3440
3457
                } else {
3441
 
                        _tmp89_ = vala_property_accessor_get_construction (acc);
 
3458
                        _tmp89_ = returns_real_struct;
3442
3459
                }
3443
3460
                if (_tmp89_) {
3444
 
                        _tmp88_ = TRUE;
3445
 
                } else {
3446
 
                        _tmp88_ = returns_real_struct;
3447
 
                }
3448
 
                if (_tmp88_) {
3449
3461
                        vala_ccode_function_add_parameter (self->function, cvalueparam);
3450
3462
                }
3451
3463
                if (VALA_IS_ARRAY_TYPE (vala_property_accessor_get_value_type (acc))) {
3454
3466
                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_property_accessor_get_value_type (acc)));
3455
3467
                        length_ctype = g_strdup ("int");
3456
3468
                        if (vala_property_accessor_get_readable (acc)) {
3457
 
                                char* _tmp90_;
3458
 
                                length_ctype = (_tmp90_ = g_strdup ("int*"), _g_free0 (length_ctype), _tmp90_);
 
3469
                                char* _tmp91_;
 
3470
                                length_ctype = (_tmp91_ = g_strdup ("int*"), _g_free0 (length_ctype), _tmp91_);
3459
3471
                        }
3460
3472
                        {
3461
3473
                                gint dim;
3462
3474
                                dim = 1;
3463
3475
                                {
3464
 
                                        gboolean _tmp91_;
3465
 
                                        _tmp91_ = TRUE;
 
3476
                                        gboolean _tmp92_;
 
3477
                                        _tmp92_ = TRUE;
3466
3478
                                        while (TRUE) {
3467
 
                                                const char* _tmp92_;
3468
 
                                                ValaCCodeFormalParameter* _tmp94_;
3469
 
                                                char* _tmp93_;
3470
 
                                                if (!_tmp91_) {
 
3479
                                                const char* _tmp93_;
 
3480
                                                ValaCCodeFormalParameter* _tmp95_;
 
3481
                                                char* _tmp94_;
 
3482
                                                if (!_tmp92_) {
3471
3483
                                                        dim++;
3472
3484
                                                }
3473
 
                                                _tmp91_ = FALSE;
 
3485
                                                _tmp92_ = FALSE;
3474
3486
                                                if (!(dim <= vala_array_type_get_rank (array_type))) {
3475
3487
                                                        break;
3476
3488
                                                }
3477
 
                                                _tmp92_ = NULL;
 
3489
                                                _tmp93_ = NULL;
3478
3490
                                                if (vala_property_accessor_get_readable (acc)) {
3479
 
                                                        _tmp92_ = "result";
 
3491
                                                        _tmp93_ = "result";
3480
3492
                                                } else {
3481
 
                                                        _tmp92_ = "value";
 
3493
                                                        _tmp93_ = "value";
3482
3494
                                                }
3483
 
                                                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));
3484
 
                                                _vala_ccode_node_unref0 (_tmp94_);
3485
 
                                                _g_free0 (_tmp93_);
 
3495
                                                vala_ccode_function_add_parameter (self->function, _tmp95_ = vala_ccode_formal_parameter_new (_tmp94_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), _tmp93_, dim), length_ctype));
 
3496
                                                _vala_ccode_node_unref0 (_tmp95_);
 
3497
                                                _g_free0 (_tmp94_);
3486
3498
                                        }
3487
3499
                                }
3488
3500
                        }
3489
3501
                        _g_free0 (length_ctype);
3490
3502
                        _vala_code_node_unref0 (array_type);
3491
3503
                } else {
3492
 
                        gboolean _tmp95_ = FALSE;
 
3504
                        gboolean _tmp96_ = FALSE;
3493
3505
                        if (VALA_IS_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))) {
3494
 
                                _tmp95_ = vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))));
 
3506
                                _tmp96_ = vala_delegate_get_has_target (vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (vala_property_accessor_get_value_type (acc))));
3495
3507
                        } else {
3496
 
                                _tmp95_ = FALSE;
 
3508
                                _tmp96_ = FALSE;
3497
3509
                        }
3498
 
                        if (_tmp95_) {
3499
 
                                const char* _tmp96_;
 
3510
                        if (_tmp96_) {
3500
3511
                                const char* _tmp97_;
3501
 
                                ValaCCodeFormalParameter* _tmp99_;
3502
 
                                char* _tmp98_;
3503
 
                                _tmp96_ = NULL;
3504
 
                                if (vala_property_accessor_get_readable (acc)) {
3505
 
                                        _tmp96_ = "result";
3506
 
                                } else {
3507
 
                                        _tmp96_ = "value";
3508
 
                                }
 
3512
                                const char* _tmp98_;
 
3513
                                ValaCCodeFormalParameter* _tmp100_;
 
3514
                                char* _tmp99_;
3509
3515
                                _tmp97_ = NULL;
3510
3516
                                if (vala_property_accessor_get_readable (acc)) {
3511
 
                                        _tmp97_ = "gpointer*";
3512
 
                                } else {
3513
 
                                        _tmp97_ = "gpointer";
3514
 
                                }
3515
 
                                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_));
3516
 
                                _vala_ccode_node_unref0 (_tmp99_);
3517
 
                                _g_free0 (_tmp98_);
 
3517
                                        _tmp97_ = "result";
 
3518
                                } else {
 
3519
                                        _tmp97_ = "value";
 
3520
                                }
 
3521
                                _tmp98_ = NULL;
 
3522
                                if (vala_property_accessor_get_readable (acc)) {
 
3523
                                        _tmp98_ = "gpointer*";
 
3524
                                } else {
 
3525
                                        _tmp98_ = "gpointer";
 
3526
                                }
 
3527
                                vala_ccode_function_add_parameter (self->function, _tmp100_ = vala_ccode_formal_parameter_new (_tmp99_ = vala_ccode_base_module_get_delegate_target_cname (self, _tmp97_), _tmp98_));
 
3528
                                _vala_ccode_node_unref0 (_tmp100_);
 
3529
                                _g_free0 (_tmp99_);
3518
3530
                        }
3519
3531
                }
3520
3532
                if (!is_virtual) {
3521
 
                        gboolean _tmp100_ = FALSE;
3522
3533
                        gboolean _tmp101_ = FALSE;
 
3534
                        gboolean _tmp102_ = FALSE;
3523
3535
                        if (vala_symbol_is_private_symbol ((ValaSymbol*) prop)) {
 
3536
                                _tmp102_ = TRUE;
 
3537
                        } else {
 
3538
                                gboolean _tmp103_ = FALSE;
 
3539
                                if (vala_property_accessor_get_readable (acc)) {
 
3540
                                        _tmp103_ = TRUE;
 
3541
                                } else {
 
3542
                                        _tmp103_ = vala_property_accessor_get_writable (acc);
 
3543
                                }
 
3544
                                _tmp102_ = !_tmp103_;
 
3545
                        }
 
3546
                        if (_tmp102_) {
3524
3547
                                _tmp101_ = TRUE;
3525
3548
                        } else {
3526
 
                                gboolean _tmp102_ = FALSE;
3527
 
                                if (vala_property_accessor_get_readable (acc)) {
3528
 
                                        _tmp102_ = TRUE;
3529
 
                                } else {
3530
 
                                        _tmp102_ = vala_property_accessor_get_writable (acc);
3531
 
                                }
3532
 
                                _tmp101_ = !_tmp102_;
 
3549
                                _tmp101_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3533
3550
                        }
3534
3551
                        if (_tmp101_) {
3535
 
                                _tmp100_ = TRUE;
3536
 
                        } else {
3537
 
                                _tmp100_ = vala_symbol_get_access ((ValaSymbol*) acc) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
3538
 
                        }
3539
 
                        if (_tmp100_) {
3540
3552
                                vala_ccode_function_set_modifiers (self->function, vala_ccode_function_get_modifiers (self->function) | VALA_CCODE_MODIFIERS_STATIC);
3541
3553
                        }
3542
3554
                }
3543
3555
                vala_ccode_function_set_block (self->function, VALA_CCODE_BLOCK (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_property_accessor_get_body (acc))));
3544
3556
                if (is_virtual) {
3545
 
                        char* _tmp103_;
3546
 
                        ValaCCodeDeclaration* _tmp104_;
 
3557
                        char* _tmp104_;
 
3558
                        ValaCCodeDeclaration* _tmp105_;
3547
3559
                        ValaCCodeDeclaration* _cdecl_;
3548
 
                        ValaCCodeVariableDeclarator* _tmp107_;
3549
 
                        ValaCCodeExpression* _tmp106_;
3550
 
                        ValaCCodeIdentifier* _tmp105_;
3551
 
                        _cdecl_ = (_tmp104_ = vala_ccode_declaration_new (_tmp103_ = vala_data_type_get_cname (this_type)), _g_free0 (_tmp103_), _tmp104_);
3552
 
                        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)));
 
3560
                        ValaCCodeVariableDeclarator* _tmp108_;
 
3561
                        ValaCCodeExpression* _tmp107_;
 
3562
                        ValaCCodeIdentifier* _tmp106_;
 
3563
                        _cdecl_ = (_tmp105_ = vala_ccode_declaration_new (_tmp104_ = vala_data_type_get_cname (this_type)), _g_free0 (_tmp104_), _tmp105_);
 
3564
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp108_ = vala_ccode_variable_declarator_new ("self", _tmp107_ = vala_ccode_base_module_transform_expression (self, (ValaCCodeExpression*) (_tmp106_ = vala_ccode_identifier_new ("base")), (ValaDataType*) base_type, this_type, NULL), NULL)));
 
3565
                        _vala_ccode_node_unref0 (_tmp108_);
3553
3566
                        _vala_ccode_node_unref0 (_tmp107_);
3554
3567
                        _vala_ccode_node_unref0 (_tmp106_);
3555
 
                        _vala_ccode_node_unref0 (_tmp105_);
3556
3568
                        vala_ccode_block_prepend_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) _cdecl_);
3557
3569
                        _vala_ccode_node_unref0 (_cdecl_);
3558
3570
                }
3559
3571
                if (vala_property_accessor_get_readable (acc)) {
3560
 
                        _tmp108_ = !returns_real_struct;
 
3572
                        _tmp109_ = !returns_real_struct;
3561
3573
                } else {
3562
 
                        _tmp108_ = FALSE;
 
3574
                        _tmp109_ = FALSE;
3563
3575
                }
3564
 
                if (_tmp108_) {
3565
 
                        gboolean _tmp109_ = FALSE;
 
3576
                if (_tmp109_) {
 
3577
                        gboolean _tmp110_ = FALSE;
3566
3578
                        if (vala_property_accessor_get_return_block (acc) == NULL) {
3567
 
                                _tmp109_ = TRUE;
 
3579
                                _tmp110_ = TRUE;
3568
3580
                        } else {
3569
 
                                ValaList* _tmp110_;
3570
 
                                _tmp109_ = vala_collection_get_size ((ValaCollection*) (_tmp110_ = vala_basic_block_get_predecessors (vala_property_accessor_get_return_block (acc)))) > 0;
3571
 
                                _vala_collection_object_unref0 (_tmp110_);
 
3581
                                ValaList* _tmp111_;
 
3582
                                _tmp110_ = vala_collection_get_size ((ValaCollection*) (_tmp111_ = vala_basic_block_get_predecessors (vala_property_accessor_get_return_block (acc)))) > 0;
 
3583
                                _vala_collection_object_unref0 (_tmp111_);
3572
3584
                        }
3573
 
                        if (_tmp109_) {
3574
 
                                char* _tmp111_;
3575
 
                                ValaCCodeDeclaration* _tmp112_;
 
3585
                        if (_tmp110_) {
 
3586
                                char* _tmp112_;
 
3587
                                ValaCCodeDeclaration* _tmp113_;
3576
3588
                                ValaCCodeDeclaration* _cdecl_;
3577
 
                                ValaCCodeVariableDeclarator* _tmp113_;
3578
 
                                _cdecl_ = (_tmp112_ = vala_ccode_declaration_new (_tmp111_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc))), _g_free0 (_tmp111_), _tmp112_);
3579
 
                                vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp113_ = vala_ccode_variable_declarator_new ("result", NULL, NULL)));
3580
 
                                _vala_ccode_node_unref0 (_tmp113_);
 
3589
                                ValaCCodeVariableDeclarator* _tmp114_;
 
3590
                                _cdecl_ = (_tmp113_ = vala_ccode_declaration_new (_tmp112_ = vala_data_type_get_cname (vala_property_accessor_get_value_type (acc))), _g_free0 (_tmp112_), _tmp113_);
 
3591
                                vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp114_ = vala_ccode_variable_declarator_new ("result", NULL, NULL)));
 
3592
                                _vala_ccode_node_unref0 (_tmp114_);
3581
3593
                                vala_ccode_block_prepend_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) _cdecl_);
3582
3594
                                _vala_ccode_node_unref0 (_cdecl_);
3583
3595
                        }
3584
3596
                }
3585
3597
                if (self->current_method_inner_error) {
3586
3598
                        ValaCCodeDeclaration* _cdecl_;
3587
 
                        ValaCCodeVariableDeclarator* _tmp115_;
3588
 
                        ValaCCodeConstant* _tmp114_;
 
3599
                        ValaCCodeVariableDeclarator* _tmp116_;
 
3600
                        ValaCCodeConstant* _tmp115_;
3589
3601
                        _cdecl_ = vala_ccode_declaration_new ("GError *");
3590
 
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp115_ = vala_ccode_variable_declarator_new ("_inner_error_", (ValaCCodeExpression*) (_tmp114_ = vala_ccode_constant_new ("NULL")), NULL)));
 
3602
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp116_ = vala_ccode_variable_declarator_new ("_inner_error_", (ValaCCodeExpression*) (_tmp115_ = vala_ccode_constant_new ("NULL")), NULL)));
 
3603
                        _vala_ccode_node_unref0 (_tmp116_);
3591
3604
                        _vala_ccode_node_unref0 (_tmp115_);
3592
 
                        _vala_ccode_node_unref0 (_tmp114_);
3593
3605
                        vala_ccode_block_prepend_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) _cdecl_);
3594
3606
                        _vala_ccode_node_unref0 (_cdecl_);
3595
3607
                }
3596
3608
                if (vala_property_get_binding (prop) == MEMBER_BINDING_INSTANCE) {
3597
 
                        _tmp116_ = !is_virtual;
 
3609
                        _tmp117_ = !is_virtual;
3598
3610
                } else {
3599
 
                        _tmp116_ = FALSE;
 
3611
                        _tmp117_ = FALSE;
3600
3612
                }
3601
 
                if (_tmp116_) {
 
3613
                if (_tmp117_) {
3602
3614
                        ValaCCodeStatement* check_stmt;
3603
 
                        gboolean _tmp117_ = FALSE;
 
3615
                        gboolean _tmp118_ = FALSE;
3604
3616
                        check_stmt = NULL;
3605
3617
                        if (!vala_property_accessor_get_readable (acc)) {
3606
 
                                _tmp117_ = TRUE;
 
3618
                                _tmp118_ = TRUE;
3607
3619
                        } else {
3608
 
                                _tmp117_ = returns_real_struct;
 
3620
                                _tmp118_ = returns_real_struct;
3609
3621
                        }
3610
 
                        if (_tmp117_) {
3611
 
                                ValaCCodeStatement* _tmp118_;
3612
 
                                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_);
3613
 
                        } else {
 
3622
                        if (_tmp118_) {
3614
3623
                                ValaCCodeStatement* _tmp119_;
3615
 
                                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_);
 
3624
                                check_stmt = (_tmp119_ = vala_ccode_base_module_create_property_type_check_statement (self, prop, FALSE, t, TRUE, "self"), _vala_ccode_node_unref0 (check_stmt), _tmp119_);
 
3625
                        } else {
 
3626
                                ValaCCodeStatement* _tmp120_;
 
3627
                                check_stmt = (_tmp120_ = vala_ccode_base_module_create_property_type_check_statement (self, prop, TRUE, t, TRUE, "self"), _vala_ccode_node_unref0 (check_stmt), _tmp120_);
3616
3628
                        }
3617
3629
                        if (check_stmt != NULL) {
3618
3630
                                vala_ccode_block_prepend_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) check_stmt);
3620
3632
                        _vala_ccode_node_unref0 (check_stmt);
3621
3633
                }
3622
3634
                if (vala_ccode_base_module_is_gobject_property (self, prop)) {
3623
 
                        _tmp121_ = vala_property_get_notify (prop);
 
3635
                        _tmp122_ = vala_property_get_notify (prop);
 
3636
                } else {
 
3637
                        _tmp122_ = FALSE;
 
3638
                }
 
3639
                if (_tmp122_) {
 
3640
                        gboolean _tmp123_ = FALSE;
 
3641
                        if (vala_property_accessor_get_writable (acc)) {
 
3642
                                _tmp123_ = TRUE;
 
3643
                        } else {
 
3644
                                _tmp123_ = vala_property_accessor_get_construction (acc);
 
3645
                        }
 
3646
                        _tmp121_ = _tmp123_;
3624
3647
                } else {
3625
3648
                        _tmp121_ = FALSE;
3626
3649
                }
3627
3650
                if (_tmp121_) {
3628
 
                        gboolean _tmp122_ = FALSE;
3629
 
                        if (vala_property_accessor_get_writable (acc)) {
3630
 
                                _tmp122_ = TRUE;
3631
 
                        } else {
3632
 
                                _tmp122_ = vala_property_accessor_get_construction (acc);
3633
 
                        }
3634
 
                        _tmp120_ = _tmp122_;
3635
 
                } else {
3636
 
                        _tmp120_ = FALSE;
3637
 
                }
3638
 
                if (_tmp120_) {
3639
 
                        ValaCCodeIdentifier* _tmp123_;
3640
 
                        ValaCCodeFunctionCall* _tmp124_;
 
3651
                        ValaCCodeIdentifier* _tmp124_;
 
3652
                        ValaCCodeFunctionCall* _tmp125_;
3641
3653
                        ValaCCodeFunctionCall* notify_call;
3642
 
                        ValaCCodeCastExpression* _tmp126_;
3643
 
                        ValaCCodeIdentifier* _tmp125_;
3644
 
                        ValaCCodeConstant* _tmp127_;
3645
 
                        ValaCCodeExpressionStatement* _tmp128_;
3646
 
                        notify_call = (_tmp124_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp123_ = vala_ccode_identifier_new ("g_object_notify"))), _vala_ccode_node_unref0 (_tmp123_), _tmp124_);
3647
 
                        vala_ccode_function_call_add_argument (notify_call, (ValaCCodeExpression*) (_tmp126_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) (_tmp125_ = vala_ccode_identifier_new ("self")), "GObject *")));
 
3654
                        ValaCCodeCastExpression* _tmp127_;
 
3655
                        ValaCCodeIdentifier* _tmp126_;
 
3656
                        ValaCCodeConstant* _tmp128_;
 
3657
                        ValaCCodeExpressionStatement* _tmp129_;
 
3658
                        notify_call = (_tmp125_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp124_ = vala_ccode_identifier_new ("g_object_notify"))), _vala_ccode_node_unref0 (_tmp124_), _tmp125_);
 
3659
                        vala_ccode_function_call_add_argument (notify_call, (ValaCCodeExpression*) (_tmp127_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) (_tmp126_ = vala_ccode_identifier_new ("self")), "GObject *")));
 
3660
                        _vala_ccode_node_unref0 (_tmp127_);
3648
3661
                        _vala_ccode_node_unref0 (_tmp126_);
3649
 
                        _vala_ccode_node_unref0 (_tmp125_);
3650
 
                        vala_ccode_function_call_add_argument (notify_call, (ValaCCodeExpression*) (_tmp127_ = vala_property_get_canonical_cconstant (prop)));
3651
 
                        _vala_ccode_node_unref0 (_tmp127_);
3652
 
                        vala_ccode_block_add_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) (_tmp128_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) notify_call)));
 
3662
                        vala_ccode_function_call_add_argument (notify_call, (ValaCCodeExpression*) (_tmp128_ = vala_property_get_canonical_cconstant (prop)));
3653
3663
                        _vala_ccode_node_unref0 (_tmp128_);
 
3664
                        vala_ccode_block_add_statement (vala_ccode_function_get_block (self->function), (ValaCCodeNode*) (_tmp129_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) notify_call)));
 
3665
                        _vala_ccode_node_unref0 (_tmp129_);
3654
3666
                        _vala_ccode_node_unref0 (notify_call);
3655
3667
                }
3656
3668
                vala_ccode_fragment_append (self->source_type_member_definition, (ValaCCodeNode*) self->function);
3657
3669
                _vala_code_node_unref0 (base_type);
3658
3670
                _g_free0 (cname);
3659
3671
        }
3660
 
        self->current_symbol = (_tmp129_ = _vala_code_node_ref0 (old_symbol), _vala_code_node_unref0 (self->current_symbol), _tmp129_);
 
3672
        self->current_symbol = (_tmp130_ = _vala_code_node_ref0 (old_symbol), _vala_code_node_unref0 (self->current_symbol), _tmp130_);
3661
3673
        self->current_method_inner_error = old_method_inner_error;
3662
3674
        _vala_ccode_node_unref0 (cvalueparam);
3663
3675
        _vala_ccode_node_unref0 (cselfparam);
3743
3755
        g_return_if_fail (data != NULL);
3744
3756
        g_return_if_fail (cblock != NULL);
3745
3757
        g_return_if_fail (free_block != NULL);
3746
 
        vala_ccode_base_module_generate_type_declaration (self, vala_formal_parameter_get_parameter_type (param), self->source_declarations);
3747
 
        param_type = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param));
 
3758
        vala_ccode_base_module_generate_type_declaration (self, vala_variable_get_variable_type ((ValaVariable*) param), self->source_declarations);
 
3759
        param_type = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) param));
3748
3760
        vala_data_type_set_value_owned (param_type, TRUE);
3749
3761
        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);
3750
3762
        _g_free0 (_tmp1_);
3751
3763
        _g_free0 (_tmp0_);
3752
 
        if (VALA_IS_DELEGATE_TYPE (vala_formal_parameter_get_parameter_type (param))) {
3753
 
                _tmp2_ = !vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param));
 
3764
        if (VALA_IS_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) param))) {
 
3765
                _tmp2_ = !vala_data_type_get_value_owned (vala_variable_get_variable_type ((ValaVariable*) param));
3754
3766
        } else {
3755
3767
                _tmp2_ = FALSE;
3756
3768
        }
3757
3769
        is_unowned_delegate = _tmp2_;
3758
3770
        cparam = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) param));
3759
 
        if (vala_data_type_is_real_non_null_struct_type (vala_formal_parameter_get_parameter_type (param))) {
 
3771
        if (vala_data_type_is_real_non_null_struct_type (vala_variable_get_variable_type ((ValaVariable*) param))) {
3760
3772
                ValaCCodeExpression* _tmp3_;
3761
3773
                cparam = (_tmp3_ = (ValaCCodeExpression*) vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, cparam), _vala_ccode_node_unref0 (cparam), _tmp3_);
3762
3774
        }
3763
3775
        if (vala_ccode_base_module_requires_copy (self, param_type)) {
3764
 
                _tmp5_ = !vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param));
 
3776
                _tmp5_ = !vala_data_type_get_value_owned (vala_variable_get_variable_type ((ValaVariable*) param));
3765
3777
        } else {
3766
3778
                _tmp5_ = FALSE;
3767
3779
        }
3776
3788
                ValaCCodeExpression* _tmp7_;
3777
3789
                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) param), NULL);
3778
3790
                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
3779
 
                vala_expression_set_value_type ((ValaExpression*) ma, _tmp6_ = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param)));
 
3791
                vala_expression_set_value_type ((ValaExpression*) ma, _tmp6_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) param)));
3780
3792
                _vala_code_node_unref0 (_tmp6_);
3781
3793
                vala_formal_parameter_set_captured (param, FALSE);
3782
 
                cparam = (_tmp7_ = 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), _tmp7_);
 
3794
                cparam = (_tmp7_ = vala_ccode_base_module_get_ref_cexpression (self, vala_variable_get_variable_type ((ValaVariable*) param), cparam, (ValaExpression*) ma, (ValaCodeNode*) param), _vala_ccode_node_unref0 (cparam), _tmp7_);
3783
3795
                vala_formal_parameter_set_captured (param, TRUE);
3784
3796
                _vala_code_node_unref0 (ma);
3785
3797
        }
3790
3802
        _g_free0 (_tmp10_);
3791
3803
        _vala_ccode_node_unref0 (_tmp9_);
3792
3804
        _g_free0 (_tmp8_);
3793
 
        if (VALA_IS_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param))) {
 
3805
        if (VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) param))) {
3794
3806
                ValaArrayType* array_type;
3795
 
                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param)));
 
3807
                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) param)));
3796
3808
                {
3797
3809
                        gint dim;
3798
3810
                        dim = 1;
3838
3850
                }
3839
3851
                _vala_code_node_unref0 (array_type);
3840
3852
        } else {
3841
 
                if (VALA_IS_DELEGATE_TYPE (vala_formal_parameter_get_parameter_type (param))) {
 
3853
                if (VALA_IS_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) param))) {
3842
3854
                        char* _tmp28_;
3843
3855
                        char* _tmp27_;
3844
3856
                        ValaCCodeExpressionStatement* _tmp38_;
3865
3877
                        _g_free0 (_tmp31_);
3866
3878
                        _vala_ccode_node_unref0 (_tmp30_);
3867
3879
                        _g_free0 (_tmp29_);
3868
 
                        if (vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param))) {
 
3880
                        if (vala_data_type_get_value_owned (vala_variable_get_variable_type ((ValaVariable*) param))) {
3869
3881
                                char* _tmp40_;
3870
3882
                                char* _tmp39_;
3871
3883
                                ValaCCodeExpressionStatement* _tmp50_;
3919
3931
                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
3920
3932
                vala_expression_set_value_type ((ValaExpression*) ma, _tmp52_ = vala_data_type_copy (param_type));
3921
3933
                _vala_code_node_unref0 (_tmp52_);
3922
 
                vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp58_ = vala_ccode_expression_statement_new (_tmp57_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp56_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp54_ = vala_ccode_identifier_new (_tmp53_ = g_strdup_printf ("_data%d_", block_id))), _tmp55_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)))), vala_formal_parameter_get_parameter_type (param), (ValaExpression*) ma, FALSE))));
 
3934
                vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp58_ = vala_ccode_expression_statement_new (_tmp57_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp56_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp54_ = vala_ccode_identifier_new (_tmp53_ = g_strdup_printf ("_data%d_", block_id))), _tmp55_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) param)))), vala_variable_get_variable_type ((ValaVariable*) param), (ValaExpression*) ma, FALSE))));
3923
3935
                _vala_ccode_node_unref0 (_tmp58_);
3924
3936
                _vala_ccode_node_unref0 (_tmp57_);
3925
3937
                _vala_ccode_node_unref0 (_tmp56_);
4125
4137
                                        char* _tmp27_;
4126
4138
                                        char* _tmp26_;
4127
4139
                                        char* _tmp25_;
4128
 
                                        vala_ccode_base_module_generate_type_declaration (self, vala_local_variable_get_variable_type (local), self->source_declarations);
4129
 
                                        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);
 
4140
                                        vala_ccode_base_module_generate_type_declaration (self, vala_variable_get_variable_type ((ValaVariable*) local), self->source_declarations);
 
4141
                                        vala_ccode_struct_add_field (data, _tmp25_ = vala_data_type_get_cname (vala_variable_get_variable_type ((ValaVariable*) 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_variable_get_variable_type ((ValaVariable*) local)), NULL), NULL);
4130
4142
                                        _g_free0 (_tmp28_);
4131
4143
                                        _g_free0 (_tmp27_);
4132
4144
                                        _g_free0 (_tmp26_);
4133
4145
                                        _g_free0 (_tmp25_);
4134
 
                                        if (VALA_IS_ARRAY_TYPE (vala_local_variable_get_variable_type (local))) {
 
4146
                                        if (VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) local))) {
4135
4147
                                                ValaArrayType* array_type;
4136
4148
                                                char* _tmp33_;
4137
4149
                                                char* _tmp32_;
4138
 
                                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_local_variable_get_variable_type (local)));
 
4150
                                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) local)));
4139
4151
                                                {
4140
4152
                                                        gint dim;
4141
4153
                                                        dim = 1;
4163
4175
                                                _g_free0 (_tmp32_);
4164
4176
                                                _vala_code_node_unref0 (array_type);
4165
4177
                                        } else {
4166
 
                                                if (VALA_IS_DELEGATE_TYPE (vala_local_variable_get_variable_type (local))) {
 
4178
                                                if (VALA_IS_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) local))) {
4167
4179
                                                        char* _tmp35_;
4168
4180
                                                        char* _tmp34_;
4169
4181
                                                        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);
4170
4182
                                                        _g_free0 (_tmp35_);
4171
4183
                                                        _g_free0 (_tmp34_);
4172
 
                                                        if (vala_data_type_get_value_owned (vala_local_variable_get_variable_type (local))) {
 
4184
                                                        if (vala_data_type_get_value_owned (vala_variable_get_variable_type ((ValaVariable*) local))) {
4173
4185
                                                                char* _tmp37_;
4174
4186
                                                                char* _tmp36_;
4175
4187
                                                                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);
4200
4212
                                        }
4201
4213
                                        local = (ValaLocalVariable*) vala_list_get (local_vars, i);
4202
4214
                                        if (vala_local_variable_get_captured (local)) {
4203
 
                                                if (vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local))) {
 
4215
                                                if (vala_ccode_base_module_requires_destroy (self, vala_variable_get_variable_type ((ValaVariable*) local))) {
4204
4216
                                                        gboolean old_coroutine;
4205
4217
                                                        ValaMemberAccess* ma;
4206
4218
                                                        ValaDataType* _tmp39_;
4217
4229
                                                        }
4218
4230
                                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
4219
4231
                                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
4220
 
                                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp39_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
4232
                                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp39_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) local)));
4221
4233
                                                        _vala_code_node_unref0 (_tmp39_);
4222
 
                                                        vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp45_ = vala_ccode_expression_statement_new (_tmp44_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp43_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp41_ = vala_ccode_identifier_new (_tmp40_ = g_strdup_printf ("_data%d_", block_id))), _tmp42_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)))), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
4234
                                                        vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) (_tmp45_ = vala_ccode_expression_statement_new (_tmp44_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) (_tmp43_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp41_ = vala_ccode_identifier_new (_tmp40_ = g_strdup_printf ("_data%d_", block_id))), _tmp42_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)))), vala_variable_get_variable_type ((ValaVariable*) local), (ValaExpression*) ma, FALSE))));
4223
4235
                                                        _vala_ccode_node_unref0 (_tmp45_);
4224
4236
                                                        _vala_ccode_node_unref0 (_tmp44_);
4225
4237
                                                        _vala_ccode_node_unref0 (_tmp43_);
4572
4584
                                        _tmp149_ = FALSE;
4573
4585
                                }
4574
4586
                                if (_tmp149_) {
4575
 
                                        _tmp148_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
 
4587
                                        _tmp148_ = vala_ccode_base_module_requires_destroy (self, vala_variable_get_variable_type ((ValaVariable*) local));
4576
4588
                                } else {
4577
4589
                                        _tmp148_ = FALSE;
4578
4590
                                }
4584
4596
                                        ValaCCodeExpression* _tmp152_;
4585
4597
                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
4586
4598
                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
4587
 
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp151_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
4599
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp151_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) local)));
4588
4600
                                        _vala_code_node_unref0 (_tmp151_);
4589
 
                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp154_ = vala_ccode_expression_statement_new (_tmp153_ = vala_ccode_base_module_get_unref_expression (self, _tmp152_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
4601
                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp154_ = vala_ccode_expression_statement_new (_tmp153_ = vala_ccode_base_module_get_unref_expression (self, _tmp152_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_variable_get_variable_type ((ValaVariable*) local), (ValaExpression*) ma, FALSE))));
4590
4602
                                        _vala_ccode_node_unref0 (_tmp154_);
4591
4603
                                        _vala_ccode_node_unref0 (_tmp153_);
4592
4604
                                        _vala_ccode_node_unref0 (_tmp152_);
4619
4631
                                        _tmp159_ = FALSE;
4620
4632
                                }
4621
4633
                                if (_tmp159_) {
4622
 
                                        _tmp158_ = vala_ccode_base_module_requires_destroy (self, vala_formal_parameter_get_parameter_type (param));
 
4634
                                        _tmp158_ = vala_ccode_base_module_requires_destroy (self, vala_variable_get_variable_type ((ValaVariable*) param));
4623
4635
                                } else {
4624
4636
                                        _tmp158_ = FALSE;
4625
4637
                                }
4636
4648
                                        ValaCCodeExpression* _tmp161_;
4637
4649
                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) param), NULL);
4638
4650
                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
4639
 
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp160_ = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param)));
 
4651
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp160_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) param)));
4640
4652
                                        _vala_code_node_unref0 (_tmp160_);
4641
 
                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp163_ = vala_ccode_expression_statement_new (_tmp162_ = vala_ccode_base_module_get_unref_expression (self, _tmp161_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) param)), vala_formal_parameter_get_parameter_type (param), (ValaExpression*) ma, FALSE))));
 
4653
                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp163_ = vala_ccode_expression_statement_new (_tmp162_ = vala_ccode_base_module_get_unref_expression (self, _tmp161_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) param)), vala_variable_get_variable_type ((ValaVariable*) param), (ValaExpression*) ma, FALSE))));
4642
4654
                                        _vala_ccode_node_unref0 (_tmp163_);
4643
4655
                                        _vala_ccode_node_unref0 (_tmp162_);
4644
4656
                                        _vala_ccode_node_unref0 (_tmp161_);
4697
4709
        vala_code_node_set_ccodenode ((ValaCodeNode*) stmt, vala_code_node_get_ccodenode ((ValaCodeNode*) vala_declaration_statement_get_declaration (stmt)));
4698
4710
        local = _vala_code_node_ref0 ((_tmp0_ = vala_declaration_statement_get_declaration (stmt), VALA_IS_LOCAL_VARIABLE (_tmp0_) ? ((ValaLocalVariable*) _tmp0_) : NULL));
4699
4711
        if (local != NULL) {
4700
 
                _tmp1_ = vala_local_variable_get_initializer (local) != NULL;
 
4712
                _tmp1_ = vala_variable_get_initializer ((ValaVariable*) local) != NULL;
4701
4713
        } else {
4702
4714
                _tmp1_ = FALSE;
4703
4715
        }
4704
4716
        if (_tmp1_) {
4705
 
                vala_ccode_base_module_create_temp_decl (self, (ValaStatement*) stmt, (ValaList*) vala_local_variable_get_initializer (local)->temp_vars);
 
4717
                vala_ccode_base_module_create_temp_decl (self, (ValaStatement*) stmt, (ValaList*) vala_variable_get_initializer ((ValaVariable*) local)->temp_vars);
4706
4718
        }
4707
4719
        vala_ccode_base_module_create_temp_decl (self, (ValaStatement*) stmt, (ValaList*) self->temp_vars);
4708
4720
        vala_collection_clear ((ValaCollection*) self->temp_vars);
4798
4810
        gboolean _tmp5_ = FALSE;
4799
4811
        g_return_val_if_fail (self != NULL, FALSE);
4800
4812
        g_return_val_if_fail (local != NULL, FALSE);
4801
 
        st = _vala_code_node_ref0 ((_tmp0_ = vala_data_type_get_data_type (vala_local_variable_get_variable_type (local)), VALA_IS_STRUCT (_tmp0_) ? ((ValaStruct*) _tmp0_) : NULL));
4802
 
        initializer = _vala_code_node_ref0 ((_tmp1_ = vala_local_variable_get_initializer (local), VALA_IS_OBJECT_CREATION_EXPRESSION (_tmp1_) ? ((ValaObjectCreationExpression*) _tmp1_) : NULL));
 
4813
        st = _vala_code_node_ref0 ((_tmp0_ = vala_data_type_get_data_type (vala_variable_get_variable_type ((ValaVariable*) local)), VALA_IS_STRUCT (_tmp0_) ? ((ValaStruct*) _tmp0_) : NULL));
 
4814
        initializer = _vala_code_node_ref0 ((_tmp1_ = vala_variable_get_initializer ((ValaVariable*) local), VALA_IS_OBJECT_CREATION_EXPRESSION (_tmp1_) ? ((ValaObjectCreationExpression*) _tmp1_) : NULL));
4803
4815
        if (st != NULL) {
4804
4816
                gboolean _tmp6_ = FALSE;
4805
4817
                if (!vala_struct_is_simple_type (st)) {
4814
4826
                _tmp5_ = FALSE;
4815
4827
        }
4816
4828
        if (_tmp5_) {
4817
 
                _tmp4_ = !vala_data_type_get_nullable (vala_local_variable_get_variable_type (local));
 
4829
                _tmp4_ = !vala_data_type_get_nullable (vala_variable_get_variable_type ((ValaVariable*) local));
4818
4830
        } else {
4819
4831
                _tmp4_ = FALSE;
4820
4832
        }
4855
4867
        gboolean _tmp100_ = FALSE;
4856
4868
        self = (ValaCCodeBaseModule*) base;
4857
4869
        g_return_if_fail (local != NULL);
4858
 
        vala_ccode_base_module_check_type (self, vala_local_variable_get_variable_type (local));
 
4870
        vala_ccode_base_module_check_type (self, vala_variable_get_variable_type ((ValaVariable*) local));
4859
4871
        vala_code_node_accept_children ((ValaCodeNode*) local, (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
4860
 
        vala_ccode_base_module_generate_type_declaration (self, vala_local_variable_get_variable_type (local), self->source_declarations);
 
4872
        vala_ccode_base_module_generate_type_declaration (self, vala_variable_get_variable_type ((ValaVariable*) local), self->source_declarations);
4861
4873
        if (!vala_local_variable_get_captured (local)) {
4862
 
                if (VALA_IS_ARRAY_TYPE (vala_local_variable_get_variable_type (local))) {
 
4874
                if (VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) local))) {
4863
4875
                        ValaArrayType* array_type;
4864
 
                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_local_variable_get_variable_type (local)));
 
4876
                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) local)));
4865
4877
                        if (!vala_array_type_get_fixed_length (array_type)) {
4866
4878
                                {
4867
4879
                                        gint dim;
4901
4913
                        }
4902
4914
                        _vala_code_node_unref0 (array_type);
4903
4915
                } else {
4904
 
                        if (VALA_IS_DELEGATE_TYPE (vala_local_variable_get_variable_type (local))) {
 
4916
                        if (VALA_IS_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) local))) {
4905
4917
                                ValaDelegateType* deleg_type;
4906
4918
                                ValaDelegate* d;
4907
 
                                deleg_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_local_variable_get_variable_type (local)));
 
4919
                                deleg_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) local)));
4908
4920
                                d = _vala_code_node_ref0 (vala_delegate_type_get_delegate_symbol (deleg_type));
4909
4921
                                if (vala_delegate_get_has_target (d)) {
4910
4922
                                        char* _tmp12_;
4935
4947
                }
4936
4948
        }
4937
4949
        rhs = NULL;
4938
 
        if (vala_local_variable_get_initializer (local) != NULL) {
4939
 
                _tmp20_ = vala_code_node_get_ccodenode ((ValaCodeNode*) vala_local_variable_get_initializer (local)) != NULL;
 
4950
        if (vala_variable_get_initializer ((ValaVariable*) local) != NULL) {
 
4951
                _tmp20_ = vala_code_node_get_ccodenode ((ValaCodeNode*) vala_variable_get_initializer ((ValaVariable*) local)) != NULL;
4940
4952
        } else {
4941
4953
                _tmp20_ = FALSE;
4942
4954
        }
4946
4958
                ValaCCodeExpression* _tmp22_;
4947
4959
                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
4948
4960
                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
4949
 
                vala_expression_set_value_type ((ValaExpression*) ma, _tmp21_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
4961
                vala_expression_set_value_type ((ValaExpression*) ma, _tmp21_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) local)));
4950
4962
                _vala_code_node_unref0 (_tmp21_);
4951
 
                rhs = (_tmp22_ = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_local_variable_get_initializer (local)))), _vala_ccode_node_unref0 (rhs), _tmp22_);
4952
 
                if (VALA_IS_ARRAY_TYPE (vala_local_variable_get_variable_type (local))) {
 
4963
                rhs = (_tmp22_ = _vala_ccode_node_ref0 (VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_variable_get_initializer ((ValaVariable*) local)))), _vala_ccode_node_unref0 (rhs), _tmp22_);
 
4964
                if (VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) local))) {
4953
4965
                        ValaArrayType* array_type;
4954
 
                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_local_variable_get_variable_type (local)));
 
4966
                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) local)));
4955
4967
                        if (vala_array_type_get_fixed_length (array_type)) {
4956
4968
                                ValaCCodeExpression* _tmp23_;
4957
4969
                                rhs = (_tmp23_ = NULL, _vala_ccode_node_unref0 (rhs), _tmp23_);
4964
4976
                                ValaCCodeExpression* _tmp30_;
4965
4977
                                ValaCCodeExpression* _tmp31_;
4966
4978
                                ccomma = vala_ccode_comma_expression_new ();
4967
 
                                temp_var = vala_ccode_base_module_get_temp_variable (self, vala_local_variable_get_variable_type (local), TRUE, (ValaCodeNode*) local, FALSE);
 
4979
                                temp_var = vala_ccode_base_module_get_temp_variable (self, vala_variable_get_variable_type ((ValaVariable*) local), TRUE, (ValaCodeNode*) local, FALSE);
4968
4980
                                vala_list_insert ((ValaList*) self->temp_vars, 0, temp_var);
4969
4981
                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp25_ = vala_ccode_assignment_new (_tmp24_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) temp_var)), rhs, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
4970
4982
                                _vala_ccode_node_unref0 (_tmp25_);
4987
4999
                                                                break;
4988
5000
                                                        }
4989
5001
                                                        lhs_array_len = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), (ValaExpression*) ma, dim);
4990
 
                                                        rhs_array_len = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), vala_local_variable_get_initializer (local), dim);
 
5002
                                                        rhs_array_len = vala_ccode_module_get_array_length_cexpression (vala_ccode_module_get_head ((ValaCCodeModule*) self), vala_variable_get_initializer ((ValaVariable*) local), dim);
4991
5003
                                                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp27_ = vala_ccode_assignment_new (lhs_array_len, rhs_array_len, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
4992
5004
                                                        _vala_ccode_node_unref0 (_tmp27_);
4993
5005
                                                        _vala_ccode_node_unref0 (rhs_array_len);
5019
5031
                        }
5020
5032
                        _vala_code_node_unref0 (array_type);
5021
5033
                } else {
5022
 
                        if (VALA_IS_DELEGATE_TYPE (vala_local_variable_get_variable_type (local))) {
 
5034
                        if (VALA_IS_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) local))) {
5023
5035
                                ValaDelegateType* deleg_type;
5024
5036
                                ValaDelegate* d;
5025
 
                                deleg_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_local_variable_get_variable_type (local)));
 
5037
                                deleg_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) local)));
5026
5038
                                d = _vala_code_node_ref0 (vala_delegate_type_get_delegate_symbol (deleg_type));
5027
5039
                                if (vala_delegate_get_has_target (d)) {
5028
5040
                                        ValaCCodeCommaExpression* ccomma;
5043
5055
                                        ValaCCodeExpression* _tmp50_;
5044
5056
                                        ValaCCodeExpression* _tmp51_;
5045
5057
                                        ccomma = vala_ccode_comma_expression_new ();
5046
 
                                        temp_var = vala_ccode_base_module_get_temp_variable (self, vala_local_variable_get_variable_type (local), TRUE, (ValaCodeNode*) local, FALSE);
 
5058
                                        temp_var = vala_ccode_base_module_get_temp_variable (self, vala_variable_get_variable_type ((ValaVariable*) local), TRUE, (ValaCodeNode*) local, FALSE);
5047
5059
                                        vala_list_insert ((ValaList*) self->temp_vars, 0, temp_var);
5048
5060
                                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp33_ = vala_ccode_assignment_new (_tmp32_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) temp_var)), rhs, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
5049
5061
                                        _vala_ccode_node_unref0 (_tmp33_);
5064
5076
                                                _vala_code_node_unref0 (block);
5065
5077
                                        }
5066
5078
                                        rhs_delegate_target_destroy_notify = NULL;
5067
 
                                        rhs_delegate_target = (_tmp42_ = vala_ccode_base_module_get_delegate_target_cexpression (self, vala_local_variable_get_initializer (local), &_tmp41_), rhs_delegate_target_destroy_notify = (_tmp43_ = _tmp41_, _vala_ccode_node_unref0 (rhs_delegate_target_destroy_notify), _tmp43_), _tmp42_);
 
5079
                                        rhs_delegate_target = (_tmp42_ = vala_ccode_base_module_get_delegate_target_cexpression (self, vala_variable_get_initializer ((ValaVariable*) local), &_tmp41_), rhs_delegate_target_destroy_notify = (_tmp43_ = _tmp41_, _vala_ccode_node_unref0 (rhs_delegate_target_destroy_notify), _tmp43_), _tmp42_);
5068
5080
                                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp44_ = vala_ccode_assignment_new (lhs_delegate_target, rhs_delegate_target, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
5069
5081
                                        _vala_ccode_node_unref0 (_tmp44_);
5070
5082
                                        if (vala_data_type_get_value_owned ((ValaDataType*) deleg_type)) {
5101
5113
                }
5102
5114
                _vala_code_node_unref0 (ma);
5103
5115
        } else {
5104
 
                if (vala_data_type_is_reference_type_or_type_parameter (vala_local_variable_get_variable_type (local))) {
 
5116
                if (vala_data_type_is_reference_type_or_type_parameter (vala_variable_get_variable_type ((ValaVariable*) local))) {
5105
5117
                        ValaCCodeExpression* _tmp52_;
5106
5118
                        rhs = (_tmp52_ = (ValaCCodeExpression*) vala_ccode_constant_new ("NULL"), _vala_ccode_node_unref0 (rhs), _tmp52_);
5107
 
                        if (VALA_IS_ARRAY_TYPE (vala_local_variable_get_variable_type (local))) {
 
5119
                        if (VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) local))) {
5108
5120
                                ValaArrayType* array_type;
5109
 
                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_local_variable_get_variable_type (local)));
 
5121
                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) local)));
5110
5122
                                if (vala_array_type_get_fixed_length (array_type)) {
5111
5123
                                        ValaCCodeExpression* _tmp53_;
5112
5124
                                        rhs = (_tmp53_ = NULL, _vala_ccode_node_unref0 (rhs), _tmp53_);
5157
5169
                self->pre_statement_fragment = (_tmp61_ = NULL, _vala_ccode_node_unref0 (self->pre_statement_fragment), _tmp61_);
5158
5170
        }
5159
5171
        if (vala_local_variable_get_captured (local)) {
5160
 
                if (vala_local_variable_get_initializer (local) != NULL) {
 
5172
                if (vala_variable_get_initializer ((ValaVariable*) local) != NULL) {
5161
5173
                        if (vala_ccode_base_module_has_simple_struct_initializer (self, local)) {
5162
5174
                                ValaCCodeExpressionStatement* _tmp62_;
5163
5175
                                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp62_ = vala_ccode_expression_statement_new (rhs)));
5190
5202
                        char* _tmp72_;
5191
5203
                        char* _tmp71_;
5192
5204
                        char* _tmp70_;
5193
 
                        vala_ccode_struct_add_field (self->closure_struct, _tmp70_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local)), _tmp73_ = g_strconcat (_tmp71_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), _tmp72_ = vala_data_type_get_cdeclarator_suffix (vala_local_variable_get_variable_type (local)), NULL), NULL);
 
5205
                        vala_ccode_struct_add_field (self->closure_struct, _tmp70_ = vala_data_type_get_cname (vala_variable_get_variable_type ((ValaVariable*) local)), _tmp73_ = g_strconcat (_tmp71_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), _tmp72_ = vala_data_type_get_cdeclarator_suffix (vala_variable_get_variable_type ((ValaVariable*) local)), NULL), NULL);
5194
5206
                        _g_free0 (_tmp73_);
5195
5207
                        _g_free0 (_tmp72_);
5196
5208
                        _g_free0 (_tmp71_);
5197
5209
                        _g_free0 (_tmp70_);
5198
 
                        if (vala_local_variable_get_initializer (local) != NULL) {
 
5210
                        if (vala_variable_get_initializer ((ValaVariable*) local) != NULL) {
5199
5211
                                if (vala_ccode_base_module_has_simple_struct_initializer (self, local)) {
5200
5212
                                        ValaCCodeExpressionStatement* _tmp74_;
5201
5213
                                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp74_ = vala_ccode_expression_statement_new (rhs)));
5230
5242
                                post_stmt = (_tmp80_ = (ValaCCodeStatement*) vala_ccode_expression_statement_new (rhs), _vala_ccode_node_unref0 (post_stmt), _tmp80_);
5231
5243
                                rhs = (_tmp81_ = NULL, _vala_ccode_node_unref0 (rhs), _tmp81_);
5232
5244
                        }
5233
 
                        cvar = (_tmp84_ = vala_ccode_variable_declarator_new (_tmp82_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), rhs, _tmp83_ = vala_data_type_get_cdeclarator_suffix (vala_local_variable_get_variable_type (local))), _g_free0 (_tmp83_), _g_free0 (_tmp82_), _tmp84_);
 
5245
                        cvar = (_tmp84_ = vala_ccode_variable_declarator_new (_tmp82_ = vala_ccode_base_module_get_variable_cname (self, vala_symbol_get_name ((ValaSymbol*) local)), rhs, _tmp83_ = vala_data_type_get_cdeclarator_suffix (vala_variable_get_variable_type ((ValaVariable*) local))), _g_free0 (_tmp83_), _g_free0 (_tmp82_), _tmp84_);
5234
5246
                        if (rhs != NULL) {
5235
5247
                                vala_ccode_node_set_line ((ValaCCodeNode*) cvar, vala_ccode_node_get_line ((ValaCCodeNode*) rhs));
5236
5248
                        }
5237
 
                        _cdecl_ = (_tmp86_ = vala_ccode_declaration_new (_tmp85_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local))), _g_free0 (_tmp85_), _tmp86_);
 
5249
                        _cdecl_ = (_tmp86_ = vala_ccode_declaration_new (_tmp85_ = vala_data_type_get_cname (vala_variable_get_variable_type ((ValaVariable*) local))), _g_free0 (_tmp85_), _tmp86_);
5238
5250
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) cvar);
5239
5251
                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) _cdecl_);
5240
5252
                        if (vala_ccode_variable_declarator_get_initializer (cvar) == NULL) {
5241
5253
                                ValaCCodeExpression* _tmp87_;
5242
 
                                vala_ccode_variable_declarator_set_initializer (cvar, _tmp87_ = vala_ccode_base_module_default_value_for_type (self, vala_local_variable_get_variable_type (local), TRUE));
 
5254
                                vala_ccode_variable_declarator_set_initializer (cvar, _tmp87_ = vala_ccode_base_module_default_value_for_type (self, vala_variable_get_variable_type ((ValaVariable*) local), TRUE));
5243
5255
                                _vala_ccode_node_unref0 (_tmp87_);
5244
5256
                                vala_ccode_variable_declarator_set_init0 (cvar, TRUE);
5245
5257
                        }
5251
5263
                        _vala_ccode_node_unref0 (post_stmt);
5252
5264
                }
5253
5265
        }
5254
 
        if (vala_local_variable_get_initializer (local) != NULL) {
5255
 
                _tmp88_ = VALA_IS_ARRAY_TYPE (vala_local_variable_get_variable_type (local));
 
5266
        if (vala_variable_get_initializer ((ValaVariable*) local) != NULL) {
 
5267
                _tmp88_ = VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) local));
5256
5268
        } else {
5257
5269
                _tmp88_ = FALSE;
5258
5270
        }
5259
5271
        if (_tmp88_) {
5260
5272
                ValaArrayType* array_type;
5261
 
                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_local_variable_get_variable_type (local)));
 
5273
                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) local)));
5262
5274
                if (vala_array_type_get_fixed_length (array_type)) {
5263
5275
                        ValaCCodeIdentifier* _tmp89_;
5264
5276
                        ValaCCodeFunctionCall* _tmp90_;
5283
5295
                        ccopy = (_tmp97_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp96_ = vala_ccode_identifier_new ("memcpy"))), _vala_ccode_node_unref0 (_tmp96_), _tmp97_);
5284
5296
                        vala_ccode_function_call_add_argument (ccopy, _tmp98_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)));
5285
5297
                        _vala_ccode_node_unref0 (_tmp98_);
5286
 
                        vala_ccode_function_call_add_argument (ccopy, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_local_variable_get_initializer (local))));
 
5298
                        vala_ccode_function_call_add_argument (ccopy, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_variable_get_initializer ((ValaVariable*) local))));
5287
5299
                        vala_ccode_function_call_add_argument (ccopy, (ValaCCodeExpression*) size);
5288
5300
                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp99_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) ccopy)));
5289
5301
                        _vala_ccode_node_unref0 (_tmp99_);
5293
5305
                }
5294
5306
                _vala_code_node_unref0 (array_type);
5295
5307
        }
5296
 
        if (vala_local_variable_get_initializer (local) != NULL) {
5297
 
                _tmp100_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) vala_local_variable_get_initializer (local));
 
5308
        if (vala_variable_get_initializer ((ValaVariable*) local) != NULL) {
 
5309
                _tmp100_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) vala_variable_get_initializer ((ValaVariable*) local));
5298
5310
        } else {
5299
5311
                _tmp100_ = FALSE;
5300
5312
        }
5301
5313
        if (_tmp100_) {
5302
 
                vala_ccode_module_add_simple_check (vala_ccode_module_get_head ((ValaCCodeModule*) self), (ValaCodeNode*) vala_local_variable_get_initializer (local), cfrag, FALSE);
 
5314
                vala_ccode_module_add_simple_check (vala_ccode_module_get_head ((ValaCCodeModule*) self), (ValaCodeNode*) vala_variable_get_initializer ((ValaVariable*) local), cfrag, FALSE);
5303
5315
        }
5304
5316
        vala_code_node_set_ccodenode ((ValaCodeNode*) local, (ValaCCodeNode*) cfrag);
5305
5317
        vala_symbol_set_active ((ValaSymbol*) local, TRUE);
5951
5963
                        ValaCCodeIdentifier* _tmp28_;
5952
5964
                        ValaCCodeExpression* _tmp29_;
5953
5965
                        ValaCCodeExpression* s2;
5954
 
                        ValaDataType* field_type;
 
5966
                        ValaDataType* variable_type;
5955
5967
                        gboolean _tmp30_ = FALSE;
5956
5968
                        ValaCCodeBlock* block;
5957
5969
                        ValaCCodeReturnStatement* _tmp40_;
5968
5980
                        cexp = NULL;
5969
5981
                        s1 = (_tmp27_ = VALA_CCODE_EXPRESSION (vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp26_ = vala_ccode_identifier_new ("s1")), vala_symbol_get_name ((ValaSymbol*) f))), _vala_ccode_node_unref0 (_tmp26_), _tmp27_);
5970
5982
                        s2 = (_tmp29_ = VALA_CCODE_EXPRESSION (vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp28_ = vala_ccode_identifier_new ("s2")), vala_symbol_get_name ((ValaSymbol*) f))), _vala_ccode_node_unref0 (_tmp28_), _tmp29_);
5971
 
                        field_type = vala_data_type_copy (vala_field_get_field_type (f));
5972
 
                        vala_ccode_base_module_make_comparable_cexpression (self, &field_type, &s1, &field_type, &s2);
5973
 
                        if (!VALA_IS_NULL_TYPE (vala_field_get_field_type (f))) {
5974
 
                                _tmp30_ = vala_data_type_compatible (vala_field_get_field_type (f), self->string_type);
 
5983
                        variable_type = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) f));
 
5984
                        vala_ccode_base_module_make_comparable_cexpression (self, &variable_type, &s1, &variable_type, &s2);
 
5985
                        if (!VALA_IS_NULL_TYPE (vala_variable_get_variable_type ((ValaVariable*) f))) {
 
5986
                                _tmp30_ = vala_data_type_compatible (vala_variable_get_variable_type ((ValaVariable*) f), self->string_type);
5975
5987
                        } else {
5976
5988
                                _tmp30_ = FALSE;
5977
5989
                        }
5987
5999
                                cexp = (_tmp33_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccall), _vala_ccode_node_unref0 (cexp), _tmp33_);
5988
6000
                                _vala_ccode_node_unref0 (ccall);
5989
6001
                        } else {
5990
 
                                if (VALA_IS_STRUCT_VALUE_TYPE (vala_field_get_field_type (f))) {
 
6002
                                if (VALA_IS_STRUCT_VALUE_TYPE (vala_variable_get_variable_type ((ValaVariable*) f))) {
5991
6003
                                        ValaTypeSymbol* _tmp34_;
5992
6004
                                        char* equalfunc;
5993
6005
                                        ValaCCodeIdentifier* _tmp35_;
5994
6006
                                        ValaCCodeFunctionCall* _tmp36_;
5995
6007
                                        ValaCCodeFunctionCall* ccall;
5996
6008
                                        ValaCCodeExpression* _tmp37_;
5997
 
                                        equalfunc = vala_ccode_base_module_generate_struct_equal_function (self, (_tmp34_ = vala_data_type_get_data_type (vala_field_get_field_type (f)), VALA_IS_STRUCT (_tmp34_) ? ((ValaStruct*) _tmp34_) : NULL));
 
6009
                                        equalfunc = vala_ccode_base_module_generate_struct_equal_function (self, (_tmp34_ = vala_data_type_get_data_type (vala_variable_get_variable_type ((ValaVariable*) f)), VALA_IS_STRUCT (_tmp34_) ? ((ValaStruct*) _tmp34_) : NULL));
5998
6010
                                        ccall = (_tmp36_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp35_ = vala_ccode_identifier_new (equalfunc))), _vala_ccode_node_unref0 (_tmp35_), _tmp36_);
5999
6011
                                        vala_ccode_function_call_add_argument (ccall, s1);
6000
6012
                                        vala_ccode_function_call_add_argument (ccall, s2);
6014
6026
                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) cif);
6015
6027
                        _vala_ccode_node_unref0 (cif);
6016
6028
                        _vala_ccode_node_unref0 (block);
6017
 
                        _vala_code_node_unref0 (field_type);
 
6029
                        _vala_code_node_unref0 (variable_type);
6018
6030
                        _vala_ccode_node_unref0 (s2);
6019
6031
                        _vala_ccode_node_unref0 (s1);
6020
6032
                        _vala_ccode_node_unref0 (cexp);
7172
7184
                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
7173
7185
                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
7174
7186
                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
7175
 
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp6_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
7187
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp6_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) local)));
7176
7188
                        _vala_code_node_unref0 (_tmp6_);
7177
 
                        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));
 
7189
                        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_variable_get_variable_type ((ValaVariable*) local), (ValaExpression*) ma, FALSE));
7178
7190
                        _vala_ccode_node_unref0 (_tmp8_);
7179
7191
                        _vala_ccode_node_unref0 (_tmp7_);
7180
7192
                        _vala_code_node_unref0 (ma);
7219
7231
                                break;
7220
7232
                        }
7221
7233
                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
7222
 
                        _cdecl_ = (_tmp1_ = vala_ccode_declaration_new (_tmp0_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local))), _g_free0 (_tmp0_), _tmp1_);
7223
 
                        vardecl = (_tmp3_ = vala_ccode_variable_declarator_new (vala_symbol_get_name ((ValaSymbol*) local), NULL, _tmp2_ = vala_data_type_get_cdeclarator_suffix (vala_local_variable_get_variable_type (local))), _g_free0 (_tmp2_), _tmp3_);
 
7234
                        _cdecl_ = (_tmp1_ = vala_ccode_declaration_new (_tmp0_ = vala_data_type_get_cname (vala_variable_get_variable_type ((ValaVariable*) local))), _g_free0 (_tmp0_), _tmp1_);
 
7235
                        vardecl = (_tmp3_ = vala_ccode_variable_declarator_new (vala_symbol_get_name ((ValaSymbol*) local), NULL, _tmp2_ = vala_data_type_get_cdeclarator_suffix (vala_variable_get_variable_type ((ValaVariable*) local))), _g_free0 (_tmp2_), _tmp3_);
7224
7236
                        vala_code_node_set_ccodenode ((ValaCodeNode*) local, (ValaCCodeNode*) vardecl);
7225
7237
                        vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) vardecl);
7226
 
                        st = _vala_code_node_ref0 ((_tmp4_ = vala_data_type_get_data_type (vala_local_variable_get_variable_type (local)), VALA_IS_STRUCT (_tmp4_) ? ((ValaStruct*) _tmp4_) : NULL));
7227
 
                        array_type = _vala_code_node_ref0 ((_tmp5_ = vala_local_variable_get_variable_type (local), VALA_IS_ARRAY_TYPE (_tmp5_) ? ((ValaArrayType*) _tmp5_) : NULL));
 
7238
                        st = _vala_code_node_ref0 ((_tmp4_ = vala_data_type_get_data_type (vala_variable_get_variable_type ((ValaVariable*) local)), VALA_IS_STRUCT (_tmp4_) ? ((ValaStruct*) _tmp4_) : NULL));
 
7239
                        array_type = _vala_code_node_ref0 ((_tmp5_ = vala_variable_get_variable_type ((ValaVariable*) local), VALA_IS_ARRAY_TYPE (_tmp5_) ? ((ValaArrayType*) _tmp5_) : NULL));
7228
7240
                        if (g_str_has_prefix (vala_symbol_get_name ((ValaSymbol*) local), "*")) {
7229
7241
                        } else {
7230
7242
                                if (vala_local_variable_get_no_init (local)) {
7231
7243
                                } else {
7232
7244
                                        gboolean _tmp6_ = FALSE;
7233
7245
                                        gboolean _tmp7_ = FALSE;
7234
 
                                        if (!vala_data_type_get_nullable (vala_local_variable_get_variable_type (local))) {
 
7246
                                        if (!vala_data_type_get_nullable (vala_variable_get_variable_type ((ValaVariable*) local))) {
7235
7247
                                                gboolean _tmp8_ = FALSE;
7236
7248
                                                if (st != NULL) {
7237
7249
                                                        _tmp8_ = !vala_struct_is_simple_type (st);
7265
7277
                                        } else {
7266
7278
                                                gboolean _tmp11_ = FALSE;
7267
7279
                                                gboolean _tmp12_ = FALSE;
7268
 
                                                if (vala_data_type_is_reference_type_or_type_parameter (vala_local_variable_get_variable_type (local))) {
 
7280
                                                if (vala_data_type_is_reference_type_or_type_parameter (vala_variable_get_variable_type ((ValaVariable*) local))) {
7269
7281
                                                        _tmp12_ = TRUE;
7270
7282
                                                } else {
7271
 
                                                        _tmp12_ = vala_data_type_get_nullable (vala_local_variable_get_variable_type (local));
 
7283
                                                        _tmp12_ = vala_data_type_get_nullable (vala_variable_get_variable_type ((ValaVariable*) local));
7272
7284
                                                }
7273
7285
                                                if (_tmp12_) {
7274
7286
                                                        _tmp11_ = TRUE;
7275
7287
                                                } else {
7276
 
                                                        _tmp11_ = VALA_IS_DELEGATE_TYPE (vala_local_variable_get_variable_type (local));
 
7288
                                                        _tmp11_ = VALA_IS_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) local));
7277
7289
                                                }
7278
7290
                                                if (_tmp11_) {
7279
7291
                                                        ValaCCodeConstant* _tmp13_;
7291
7303
                        }
7292
7304
                        if (_tmp14_) {
7293
7305
                                char* _tmp15_;
7294
 
                                vala_ccode_struct_add_field (self->closure_struct, _tmp15_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local)), vala_symbol_get_name ((ValaSymbol*) local), NULL);
 
7306
                                vala_ccode_struct_add_field (self->closure_struct, _tmp15_ = vala_data_type_get_cname (vala_variable_get_variable_type ((ValaVariable*) local)), vala_symbol_get_name ((ValaSymbol*) local), NULL);
7295
7307
                                _g_free0 (_tmp15_);
7296
7308
                                if (VALA_IS_CCODE_INITIALIZER_LIST (vala_ccode_variable_declarator_get_initializer (vardecl))) {
7297
7309
                                        ValaCCodeIdentifier* _tmp16_;
7311
7323
                                        _vala_ccode_node_unref0 (_tmp18_);
7312
7324
                                        vala_ccode_function_call_add_argument (memset_call, (ValaCCodeExpression*) (_tmp20_ = vala_ccode_constant_new ("0")));
7313
7325
                                        _vala_ccode_node_unref0 (_tmp20_);
7314
 
                                        vala_ccode_function_call_add_argument (memset_call, (ValaCCodeExpression*) (_tmp23_ = vala_ccode_identifier_new (_tmp22_ = g_strdup_printf ("sizeof (%s)", _tmp21_ = vala_data_type_get_cname (vala_local_variable_get_variable_type (local))))));
 
7326
                                        vala_ccode_function_call_add_argument (memset_call, (ValaCCodeExpression*) (_tmp23_ = vala_ccode_identifier_new (_tmp22_ = g_strdup_printf ("sizeof (%s)", _tmp21_ = vala_data_type_get_cname (vala_variable_get_variable_type ((ValaVariable*) local))))));
7315
7327
                                        _vala_ccode_node_unref0 (_tmp23_);
7316
7328
                                        _g_free0 (_tmp22_);
7317
7329
                                        _g_free0 (_tmp21_);
7402
7414
                        local = (ValaLocalVariable*) vala_iterator_get (_local_it);
7403
7415
                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
7404
7416
                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
7405
 
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp5_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
7417
                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp5_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) local)));
7406
7418
                        _vala_code_node_unref0 (_tmp5_);
7407
 
                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp8_ = vala_ccode_expression_statement_new (_tmp7_ = vala_ccode_base_module_get_unref_expression (self, _tmp6_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
7419
                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp8_ = vala_ccode_expression_statement_new (_tmp7_ = vala_ccode_base_module_get_unref_expression (self, _tmp6_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_variable_get_variable_type ((ValaVariable*) local), (ValaExpression*) ma, FALSE))));
7408
7420
                        _vala_ccode_node_unref0 (_tmp8_);
7409
7421
                        _vala_ccode_node_unref0 (_tmp7_);
7410
7422
                        _vala_ccode_node_unref0 (_tmp6_);
7488
7500
                                        _tmp2_ = FALSE;
7489
7501
                                }
7490
7502
                                if (_tmp2_) {
7491
 
                                        _tmp1_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
 
7503
                                        _tmp1_ = vala_ccode_base_module_requires_destroy (self, vala_variable_get_variable_type ((ValaVariable*) local));
7492
7504
                                } else {
7493
7505
                                        _tmp1_ = FALSE;
7494
7506
                                }
7500
7512
                                        ValaCCodeExpression* _tmp6_;
7501
7513
                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
7502
7514
                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
7503
 
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp5_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
 
7515
                                        vala_expression_set_value_type ((ValaExpression*) ma, _tmp5_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) local)));
7504
7516
                                        _vala_code_node_unref0 (_tmp5_);
7505
 
                                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp8_ = vala_ccode_expression_statement_new (_tmp7_ = vala_ccode_base_module_get_unref_expression (self, _tmp6_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
 
7517
                                        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp8_ = vala_ccode_expression_statement_new (_tmp7_ = vala_ccode_base_module_get_unref_expression (self, _tmp6_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) local)), vala_variable_get_variable_type ((ValaVariable*) local), (ValaExpression*) ma, FALSE))));
7506
7518
                                        _vala_ccode_node_unref0 (_tmp8_);
7507
7519
                                        _vala_ccode_node_unref0 (_tmp7_);
7508
7520
                                        _vala_ccode_node_unref0 (_tmp6_);
7611
7623
                                        _tmp2_ = FALSE;
7612
7624
                                }
7613
7625
                                if (_tmp2_) {
7614
 
                                        _tmp1_ = vala_ccode_base_module_requires_destroy (self, vala_local_variable_get_variable_type (local));
 
7626
                                        _tmp1_ = vala_ccode_base_module_requires_destroy (self, vala_variable_get_variable_type ((ValaVariable*) local));
7615
7627
                                } else {
7616
7628
                                        _tmp1_ = FALSE;
7617
7629
                                }
7622
7634
                                        ValaCCodeExpression* _tmp5_;
7623
7635
                                        ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
7624
7636
                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
7625
 
                                        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))));
 
7637
                                        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_variable_get_variable_type ((ValaVariable*) local), (ValaExpression*) ma, FALSE))));
7626
7638
                                        _vala_ccode_node_unref0 (_tmp7_);
7627
7639
                                        _vala_ccode_node_unref0 (_tmp6_);
7628
7640
                                        _vala_ccode_node_unref0 (_tmp5_);
7685
7697
                        }
7686
7698
                        param = (ValaFormalParameter*) vala_iterator_get (_param_it);
7687
7699
                        if (!vala_formal_parameter_get_ellipsis (param)) {
7688
 
                                _tmp3_ = vala_ccode_base_module_requires_destroy (self, vala_formal_parameter_get_parameter_type (param));
 
7700
                                _tmp3_ = vala_ccode_base_module_requires_destroy (self, vala_variable_get_variable_type ((ValaVariable*) param));
7689
7701
                        } else {
7690
7702
                                _tmp3_ = FALSE;
7691
7703
                        }
7702
7714
                                ValaCCodeExpression* _tmp5_;
7703
7715
                                ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) param), NULL);
7704
7716
                                vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
7705
 
                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp4_ = vala_data_type_copy (vala_formal_parameter_get_parameter_type (param)));
 
7717
                                vala_expression_set_value_type ((ValaExpression*) ma, _tmp4_ = vala_data_type_copy (vala_variable_get_variable_type ((ValaVariable*) param)));
7706
7718
                                _vala_code_node_unref0 (_tmp4_);
7707
 
                                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp7_ = vala_ccode_expression_statement_new (_tmp6_ = vala_ccode_base_module_get_unref_expression (self, _tmp5_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) param)), vala_formal_parameter_get_parameter_type (param), (ValaExpression*) ma, FALSE))));
 
7719
                                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp7_ = vala_ccode_expression_statement_new (_tmp6_ = vala_ccode_base_module_get_unref_expression (self, _tmp5_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) param)), vala_variable_get_variable_type ((ValaVariable*) param), (ValaExpression*) ma, FALSE))));
7708
7720
                                _vala_ccode_node_unref0 (_tmp7_);
7709
7721
                                _vala_ccode_node_unref0 (_tmp6_);
7710
7722
                                _vala_ccode_node_unref0 (_tmp5_);
7812
7824
                        _tmp4_ = FALSE;
7813
7825
                }
7814
7826
                if (_tmp4_) {
7815
 
                        _tmp3_ = vala_data_type_get_value_owned (vala_local_variable_get_variable_type (local));
 
7827
                        _tmp3_ = vala_data_type_get_value_owned (vala_variable_get_variable_type ((ValaVariable*) local));
7816
7828
                } else {
7817
7829
                        _tmp3_ = FALSE;
7818
7830
                }
7847
7859
                        _tmp9_ = FALSE;
7848
7860
                }
7849
7861
                if (_tmp9_) {
7850
 
                        _tmp8_ = vala_data_type_get_value_owned (vala_local_variable_get_variable_type (local));
 
7862
                        _tmp8_ = vala_data_type_get_value_owned (vala_variable_get_variable_type ((ValaVariable*) local));
7851
7863
                } else {
7852
7864
                        _tmp8_ = FALSE;
7853
7865
                }
8137
8149
        ValaCCodeExpression* result = NULL;
8138
8150
        ValaCCodeExpression* l;
8139
8151
        ValaExpression* inner_node;
8140
 
        ValaMember* member;
 
8152
        ValaSymbol* member;
8141
8153
        ValaTypeSymbol* parent;
8142
8154
        g_return_val_if_fail (self != NULL, NULL);
8143
8155
        g_return_val_if_fail (stmt != NULL, NULL);
8144
8156
        g_return_val_if_fail (resource != NULL, NULL);
8145
8157
        l = NULL;
8146
8158
        inner_node = _vala_code_node_ref0 (vala_member_access_get_inner (VALA_MEMBER_ACCESS (resource)));
8147
 
        member = _vala_code_node_ref0 (VALA_MEMBER (vala_expression_get_symbol_reference (resource)));
 
8159
        member = _vala_code_node_ref0 (vala_expression_get_symbol_reference (resource));
8148
8160
        parent = _vala_code_node_ref0 (VALA_TYPESYMBOL (vala_symbol_get_parent_symbol (vala_expression_get_symbol_reference (resource))));
8149
 
        if (vala_symbol_is_instance_member ((ValaSymbol*) member)) {
 
8161
        if (vala_symbol_is_instance_member (member)) {
8150
8162
                ValaCCodeExpression* _tmp5_;
8151
8163
                char* _tmp4_;
8152
8164
                ValaCCodeMemberAccess* _tmp3_;
8166
8178
                _g_free0 (_tmp4_);
8167
8179
                _vala_ccode_node_unref0 (_tmp3_);
8168
8180
        } else {
8169
 
                if (vala_symbol_is_class_member ((ValaSymbol*) member)) {
 
8181
                if (vala_symbol_is_class_member (member)) {
8170
8182
                        ValaCCodeExpression* klass;
8171
8183
                        gboolean _tmp6_ = FALSE;
8172
8184
                        gboolean _tmp7_ = FALSE;
10104
10116
                                                                gboolean _tmp57_ = FALSE;
10105
10117
                                                                ValaCCodeExpression* _tmp63_;
10106
10118
                                                                if (!vala_formal_parameter_get_no_array_length (param)) {
10107
 
                                                                        _tmp57_ = VALA_IS_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param));
 
10119
                                                                        _tmp57_ = VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) param));
10108
10120
                                                                } else {
10109
10121
                                                                        _tmp57_ = FALSE;
10110
10122
                                                                }
10111
10123
                                                                if (_tmp57_) {
10112
10124
                                                                        ValaArrayType* array_type;
10113
 
                                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param)));
 
10125
                                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) param)));
10114
10126
                                                                        {
10115
10127
                                                                                gint dim;
10116
10128
                                                                                dim = 1;
10133
10145
                                                                        }
10134
10146
                                                                        _vala_code_node_unref0 (array_type);
10135
10147
                                                                } else {
10136
 
                                                                        if (VALA_IS_DELEGATE_TYPE (vala_formal_parameter_get_parameter_type (param))) {
 
10148
                                                                        if (VALA_IS_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) param))) {
10137
10149
                                                                                ValaDelegateType* deleg_type;
10138
10150
                                                                                ValaDelegate* d;
10139
 
                                                                                deleg_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_formal_parameter_get_parameter_type (param)));
 
10151
                                                                                deleg_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) param)));
10140
10152
                                                                                d = _vala_code_node_ref0 (vala_delegate_type_get_delegate_symbol (deleg_type));
10141
10153
                                                                                if (vala_delegate_get_has_target (d)) {
10142
10154
                                                                                        ValaCCodeExpression* delegate_target_destroy_notify;
10186
10198
                                                _vala_code_node_unref0 (param);
10187
10199
                                                break;
10188
10200
                                        }
10189
 
                                        if (vala_formal_parameter_get_default_expression (param) == NULL) {
 
10201
                                        if (vala_variable_get_initializer ((ValaVariable*) param) == NULL) {
10190
10202
                                                char* _tmp65_;
10191
10203
                                                vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) expr), _tmp65_ = g_strdup_printf ("no default expression for argument %d", i));
10192
10204
                                                _g_free0 (_tmp65_);
10202
10214
                                                _vala_ccode_node_unref0 (instance);
10203
10215
                                                return;
10204
10216
                                        }
10205
 
                                        vala_code_node_accept ((ValaCodeNode*) vala_formal_parameter_get_default_expression (param), (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
10206
 
                                        vala_map_set ((ValaMap*) carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos (self, vala_formal_parameter_get_cparameter_position (param), FALSE)), VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_formal_parameter_get_default_expression (param))));
 
10217
                                        vala_code_node_accept ((ValaCodeNode*) vala_variable_get_initializer ((ValaVariable*) param), (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
 
10218
                                        vala_map_set ((ValaMap*) carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos (self, vala_formal_parameter_get_cparameter_position (param), FALSE)), VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_variable_get_initializer ((ValaVariable*) param))));
10207
10219
                                        i++;
10208
10220
                                        _vala_code_node_unref0 (param);
10209
10221
                                }
10417
10429
                                                }
10418
10430
                                                vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp106_ = 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)));
10419
10431
                                                _vala_ccode_node_unref0 (_tmp106_);
10420
 
                                                if (VALA_IS_ARRAY_TYPE (vala_field_get_field_type (f))) {
 
10432
                                                if (VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) f))) {
10421
10433
                                                        _tmp107_ = !vala_field_get_no_array_length (f);
10422
10434
                                                } else {
10423
10435
                                                        _tmp107_ = FALSE;
10424
10436
                                                }
10425
10437
                                                if (_tmp107_) {
10426
10438
                                                        ValaArrayType* array_type;
10427
 
                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_field_get_field_type (f)));
 
10439
                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) f)));
10428
10440
                                                        {
10429
10441
                                                                gint dim;
10430
10442
                                                                dim = 1;
10466
10478
                                                        _vala_code_node_unref0 (array_type);
10467
10479
                                                } else {
10468
10480
                                                        gboolean _tmp116_ = FALSE;
10469
 
                                                        if (VALA_IS_DELEGATE_TYPE (vala_field_get_field_type (f))) {
 
10481
                                                        if (VALA_IS_DELEGATE_TYPE (vala_variable_get_variable_type ((ValaVariable*) f))) {
10470
10482
                                                                _tmp116_ = !vala_field_get_no_delegate_target (f);
10471
10483
                                                        } else {
10472
10484
                                                                _tmp116_ = FALSE;
10553
10565
        g_return_val_if_fail (param != NULL, NULL);
10554
10566
        g_return_val_if_fail (arg != NULL, NULL);
10555
10567
        if (!VALA_IS_NULL_TYPE (vala_expression_get_value_type (arg))) {
10556
 
                _tmp1_ = VALA_IS_STRUCT (vala_data_type_get_data_type (vala_formal_parameter_get_parameter_type (param)));
 
10568
                _tmp1_ = VALA_IS_STRUCT (vala_data_type_get_data_type (vala_variable_get_variable_type ((ValaVariable*) param)));
10557
10569
        } else {
10558
10570
                _tmp1_ = FALSE;
10559
10571
        }
10560
10572
        if (_tmp1_) {
10561
 
                _tmp0_ = !vala_struct_is_simple_type (VALA_STRUCT (vala_data_type_get_data_type (vala_formal_parameter_get_parameter_type (param))));
 
10573
                _tmp0_ = !vala_struct_is_simple_type (VALA_STRUCT (vala_data_type_get_data_type (vala_variable_get_variable_type ((ValaVariable*) param))));
10562
10574
        } else {
10563
10575
                _tmp0_ = FALSE;
10564
10576
        }
10565
10577
        if (_tmp0_) {
10566
10578
                gboolean _tmp2_ = FALSE;
10567
10579
                if (vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_IN) {
10568
 
                        _tmp2_ = !vala_data_type_get_nullable (vala_formal_parameter_get_parameter_type (param));
 
10580
                        _tmp2_ = !vala_data_type_get_nullable (vala_variable_get_variable_type ((ValaVariable*) param));
10569
10581
                } else {
10570
10582
                        _tmp2_ = FALSE;
10571
10583
                }
10602
10614
                                        ValaCCodeUnaryExpression* _tmp9_;
10603
10615
                                        ValaCCodeExpression* _tmp8_;
10604
10616
                                        ccomma = vala_ccode_comma_expression_new ();
10605
 
                                        temp_var = vala_ccode_base_module_get_temp_variable (self, vala_formal_parameter_get_parameter_type (param), TRUE, NULL, FALSE);
 
10617
                                        temp_var = vala_ccode_base_module_get_temp_variable (self, vala_variable_get_variable_type ((ValaVariable*) param), TRUE, NULL, FALSE);
10606
10618
                                        vala_list_insert ((ValaList*) self->temp_vars, 0, temp_var);
10607
10619
                                        vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) (_tmp7_ = vala_ccode_assignment_new (_tmp6_ = vala_ccode_base_module_get_variable_cexpression (self, vala_symbol_get_name ((ValaSymbol*) temp_var)), cexpr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
10608
10620
                                        _vala_ccode_node_unref0 (_tmp7_);
13013
13025
                _vala_code_node_unref0 (ma);
13014
13026
                return result;
13015
13027
        }
13016
 
        if (vala_expression_get_symbol_reference ((ValaExpression*) ma) == NULL) {
13017
 
                result = FALSE;
13018
 
                _vala_code_node_unref0 (ma);
13019
 
                return result;
13020
 
        }
13021
 
        if (VALA_IS_FORMAL_PARAMETER (vala_expression_get_symbol_reference ((ValaExpression*) ma))) {
13022
 
                result = TRUE;
13023
 
                _vala_code_node_unref0 (ma);
13024
 
                return result;
13025
 
        }
13026
 
        if (VALA_IS_LOCAL_VARIABLE (vala_expression_get_symbol_reference ((ValaExpression*) ma))) {
13027
 
                result = TRUE;
13028
 
                _vala_code_node_unref0 (ma);
13029
 
                return result;
13030
 
        }
13031
 
        if (VALA_IS_FIELD (vala_expression_get_symbol_reference ((ValaExpression*) ma))) {
13032
 
                result = TRUE;
13033
 
                _vala_code_node_unref0 (ma);
13034
 
                return result;
13035
 
        }
13036
 
        result = FALSE;
 
13028
        result = VALA_IS_VARIABLE (vala_expression_get_symbol_reference ((ValaExpression*) ma));
13037
13029
        _vala_code_node_unref0 (ma);
13038
13030
        return result;
13039
13031
}
13513
13505
                _tmp0_ = FALSE;
13514
13506
        }
13515
13507
        if (_tmp0_) {
13516
 
                result = _vala_code_node_ref0 (vala_formal_parameter_get_parameter_type (vala_method_get_this_parameter (vala_ccode_base_module_get_current_method (self))));
 
13508
                result = _vala_code_node_ref0 (vala_variable_get_variable_type ((ValaVariable*) vala_method_get_this_parameter (vala_ccode_base_module_get_current_method (self))));
13517
13509
                return result;
13518
13510
        } else {
13519
13511
                gboolean _tmp1_ = FALSE;
13523
13515
                        _tmp1_ = FALSE;
13524
13516
                }
13525
13517
                if (_tmp1_) {
13526
 
                        result = _vala_code_node_ref0 (vala_formal_parameter_get_parameter_type (vala_property_get_this_parameter (vala_property_accessor_get_prop (vala_ccode_base_module_get_current_property_accessor (self)))));
 
13518
                        result = _vala_code_node_ref0 (vala_variable_get_variable_type ((ValaVariable*) vala_property_get_this_parameter (vala_property_accessor_get_prop (vala_ccode_base_module_get_current_property_accessor (self)))));
13527
13519
                        return result;
13528
13520
                }
13529
13521
        }
13583
13575
                        }
13584
13576
                        f = (ValaField*) vala_iterator_get (_f_it);
13585
13577
                        if (vala_field_get_binding (f) == MEMBER_BINDING_INSTANCE) {
13586
 
                                if (vala_ccode_base_module_requires_destroy (self, vala_field_get_field_type (f))) {
 
13578
                                if (vala_ccode_base_module_requires_destroy (self, vala_variable_get_variable_type ((ValaVariable*) f))) {
13587
13579
                                        char* _tmp10_;
13588
13580
                                        ValaCCodeIdentifier* _tmp9_;
13589
13581
                                        ValaCCodeMemberAccess* _tmp11_;
13602
13594
                                        _vala_ccode_node_unref0 (_tmp13_);
13603
13595
                                        ma = vala_member_access_new ((ValaExpression*) this_access, vala_symbol_get_name ((ValaSymbol*) f), NULL);
13604
13596
                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) f);
13605
 
                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp15_ = vala_ccode_expression_statement_new (_tmp14_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) lhs, vala_field_get_field_type (f), (ValaExpression*) ma, FALSE))));
 
13597
                                        vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp15_ = vala_ccode_expression_statement_new (_tmp14_ = vala_ccode_base_module_get_unref_expression (self, (ValaCCodeExpression*) lhs, vala_variable_get_variable_type ((ValaVariable*) f), (ValaExpression*) ma, FALSE))));
13606
13598
                                        _vala_ccode_node_unref0 (_tmp15_);
13607
13599
                                        _vala_ccode_node_unref0 (_tmp14_);
13608
13600
                                        _vala_code_node_unref0 (ma);
13698
13690
                                ValaArrayType* array_type;
13699
13691
                                gboolean _tmp24_ = FALSE;
13700
13692
                                copy = (_tmp17_ = (ValaCCodeExpression*) vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp16_ = vala_ccode_identifier_new ("self")), vala_symbol_get_name ((ValaSymbol*) f)), _vala_ccode_node_unref0 (_tmp16_), _tmp17_);
13701
 
                                if (vala_ccode_base_module_requires_copy (self, vala_field_get_field_type (f))) {
 
13693
                                if (vala_ccode_base_module_requires_copy (self, vala_variable_get_variable_type ((ValaVariable*) f))) {
13702
13694
                                        ValaMemberAccess* this_access;
13703
13695
                                        ValaDataType* _tmp18_;
13704
13696
                                        ValaCCodeIdentifier* _tmp19_;
13711
13703
                                        _vala_ccode_node_unref0 (_tmp19_);
13712
13704
                                        ma = vala_member_access_new ((ValaExpression*) this_access, vala_symbol_get_name ((ValaSymbol*) f), NULL);
13713
13705
                                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) f);
13714
 
                                        copy = (_tmp20_ = vala_ccode_base_module_get_ref_cexpression (self, vala_field_get_field_type (f), copy, (ValaExpression*) ma, (ValaCodeNode*) f), _vala_ccode_node_unref0 (copy), _tmp20_);
 
13706
                                        copy = (_tmp20_ = vala_ccode_base_module_get_ref_cexpression (self, vala_variable_get_variable_type ((ValaVariable*) f), copy, (ValaExpression*) ma, (ValaCodeNode*) f), _vala_ccode_node_unref0 (copy), _tmp20_);
13715
13707
                                        _vala_code_node_unref0 (ma);
13716
13708
                                        _vala_code_node_unref0 (this_access);
13717
13709
                                }
13718
13710
                                dest = (_tmp22_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp21_ = vala_ccode_identifier_new ("dest")), vala_symbol_get_name ((ValaSymbol*) f)), _vala_ccode_node_unref0 (_tmp21_), _tmp22_);
13719
 
                                array_type = _vala_code_node_ref0 ((_tmp23_ = vala_field_get_field_type (f), VALA_IS_ARRAY_TYPE (_tmp23_) ? ((ValaArrayType*) _tmp23_) : NULL));
 
13711
                                array_type = _vala_code_node_ref0 ((_tmp23_ = vala_variable_get_variable_type ((ValaVariable*) f), VALA_IS_ARRAY_TYPE (_tmp23_) ? ((ValaArrayType*) _tmp23_) : NULL));
13720
13712
                                if (array_type != NULL) {
13721
13713
                                        _tmp24_ = vala_array_type_get_fixed_length (array_type);
13722
13714
                                } else {
14144
14136
}
14145
14137
 
14146
14138
 
 
14139
/**
 
14140
 * Code visitor generating C Code.
 
14141
 */
14147
14142
GType vala_ccode_base_module_get_type (void) {
14148
14143
        static volatile gsize vala_ccode_base_module_type_id__volatile = 0;
14149
14144
        if (g_once_init_enter (&vala_ccode_base_module_type_id__volatile)) {