1845
1843
vala_expression_set_symbol_reference ((ValaExpression*) self, (ValaSymbol*) constructor);
1846
_tmp19_ = vala_member_access_get_inner (self->priv->_member_name);
1847
_tmp21_ = _vala_code_node_ref0 ((_tmp20_ = _tmp19_, VALA_IS_MEMBER_ACCESS (_tmp20_) ? ((ValaMemberAccess*) _tmp20_) : NULL));
1844
_tmp18_ = vala_member_access_get_inner (self->priv->_member_name);
1846
_tmp20_ = _vala_code_node_ref0 (VALA_IS_MEMBER_ACCESS (_tmp19_) ? ((ValaMemberAccess*) _tmp19_) : NULL);
1849
1848
if (ma != NULL) {
1850
ValaList* _tmp22_ = NULL;
1852
_tmp22_ = vala_member_access_get_type_arguments (ma);
1849
ValaList* _tmp21_ = NULL;
1850
_tmp21_ = vala_member_access_get_type_arguments (ma);
1854
1851
_vala_iterable_unref0 (type_args);
1855
type_args = _tmp23_;
1852
type_args = _tmp21_;
1857
1854
_vala_code_node_unref0 (ma);
1858
1855
_vala_code_node_unref0 (constructor);
1860
1857
if (VALA_IS_CLASS (type_sym)) {
1861
ValaTypeSymbol* _tmp24_;
1862
ValaTypeSymbol* _tmp25_;
1864
_tmp24_ = _vala_code_node_ref0 (VALA_TYPESYMBOL (type_sym));
1858
ValaTypeSymbol* _tmp22_;
1860
_tmp22_ = _vala_code_node_ref0 (VALA_TYPESYMBOL (type_sym));
1866
1861
_vala_code_node_unref0 (type);
1868
_tmp26_ = vala_class_get_is_error_base (VALA_CLASS (type));
1870
ValaSourceReference* _tmp27_ = NULL;
1871
ValaErrorType* _tmp28_ = NULL;
1872
ValaErrorType* _tmp29_;
1873
_tmp27_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1874
_tmp28_ = vala_error_type_new (NULL, NULL, _tmp27_);
1876
vala_object_creation_expression_set_type_reference (self, (ValaDataType*) _tmp29_);
1877
_vala_code_node_unref0 (_tmp29_);
1863
_tmp23_ = vala_class_get_is_error_base (VALA_CLASS (type));
1865
ValaSourceReference* _tmp24_ = NULL;
1866
ValaErrorType* _tmp25_ = NULL;
1867
ValaErrorType* _tmp26_;
1868
_tmp24_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1869
_tmp25_ = vala_error_type_new (NULL, NULL, _tmp24_);
1871
vala_object_creation_expression_set_type_reference (self, (ValaDataType*) _tmp26_);
1872
_vala_code_node_unref0 (_tmp26_);
1879
ValaObjectType* _tmp30_ = NULL;
1880
ValaObjectType* _tmp31_;
1881
_tmp30_ = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_CLASS (type));
1874
ValaObjectType* _tmp27_ = NULL;
1875
ValaObjectType* _tmp28_;
1876
_tmp27_ = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_CLASS (type));
1878
vala_object_creation_expression_set_type_reference (self, (ValaDataType*) _tmp28_);
1879
_vala_code_node_unref0 (_tmp28_);
1882
if (VALA_IS_STRUCT (type_sym)) {
1883
ValaTypeSymbol* _tmp29_;
1884
ValaStructValueType* _tmp30_ = NULL;
1885
ValaStructValueType* _tmp31_;
1886
_tmp29_ = _vala_code_node_ref0 (VALA_TYPESYMBOL (type_sym));
1887
_vala_code_node_unref0 (type);
1889
_tmp30_ = vala_struct_value_type_new (VALA_STRUCT (type));
1882
1890
_tmp31_ = _tmp30_;
1883
1891
vala_object_creation_expression_set_type_reference (self, (ValaDataType*) _tmp31_);
1884
1892
_vala_code_node_unref0 (_tmp31_);
1887
if (VALA_IS_STRUCT (type_sym)) {
1888
ValaTypeSymbol* _tmp32_;
1889
ValaTypeSymbol* _tmp33_;
1890
ValaStructValueType* _tmp34_ = NULL;
1891
ValaStructValueType* _tmp35_;
1892
_tmp32_ = _vala_code_node_ref0 (VALA_TYPESYMBOL (type_sym));
1894
_vala_code_node_unref0 (type);
1896
_tmp34_ = vala_struct_value_type_new (VALA_STRUCT (type));
1898
vala_object_creation_expression_set_type_reference (self, (ValaDataType*) _tmp35_);
1899
_vala_code_node_unref0 (_tmp35_);
1901
1894
if (VALA_IS_ERROR_CODE (type_sym)) {
1902
ValaSymbol* _tmp36_ = NULL;
1903
ValaSourceReference* _tmp37_ = NULL;
1904
ValaErrorType* _tmp38_ = NULL;
1905
ValaErrorType* _tmp39_;
1906
_tmp36_ = vala_symbol_get_parent_symbol (type_sym);
1907
_tmp37_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1908
_tmp38_ = vala_error_type_new (VALA_ERROR_DOMAIN (_tmp36_), VALA_ERROR_CODE (type_sym), _tmp37_);
1910
vala_object_creation_expression_set_type_reference (self, (ValaDataType*) _tmp39_);
1911
_vala_code_node_unref0 (_tmp39_);
1895
ValaSymbol* _tmp32_ = NULL;
1896
ValaSourceReference* _tmp33_ = NULL;
1897
ValaErrorType* _tmp34_ = NULL;
1898
ValaErrorType* _tmp35_;
1899
_tmp32_ = vala_symbol_get_parent_symbol (type_sym);
1900
_tmp33_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1901
_tmp34_ = vala_error_type_new (VALA_ERROR_DOMAIN (_tmp32_), VALA_ERROR_CODE (type_sym), _tmp33_);
1903
vala_object_creation_expression_set_type_reference (self, (ValaDataType*) _tmp35_);
1904
_vala_code_node_unref0 (_tmp35_);
1912
1905
vala_expression_set_symbol_reference ((ValaExpression*) self, type_sym);
1914
ValaSourceReference* _tmp40_ = NULL;
1915
gchar* _tmp41_ = NULL;
1917
gchar* _tmp43_ = NULL;
1907
ValaSourceReference* _tmp36_ = NULL;
1908
gchar* _tmp37_ = NULL;
1910
gchar* _tmp39_ = NULL;
1919
1912
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1920
_tmp40_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1921
_tmp41_ = vala_symbol_get_full_name (type_sym);
1923
_tmp43_ = g_strdup_printf ("`%s' is not a class, struct, or error code", _tmp42_);
1925
vala_report_error (_tmp40_, _tmp44_);
1913
_tmp36_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1914
_tmp37_ = vala_symbol_get_full_name (type_sym);
1916
_tmp39_ = g_strdup_printf ("`%s' is not a class, struct, or error code", _tmp38_);
1918
vala_report_error (_tmp36_, _tmp40_);
1928
1921
result = FALSE;
1929
1922
_vala_iterable_unref0 (type_args);
1930
1923
_vala_code_node_unref0 (type_sym);
1965
1958
_vala_code_node_unref0 (type_sym);
1966
1959
_vala_code_node_unref0 (constructor_sym);
1968
ValaDataType* _tmp49_ = NULL;
1969
ValaTypeSymbol* _tmp50_ = NULL;
1970
ValaTypeSymbol* _tmp51_;
1971
ValaTypeSymbol* _tmp52_;
1972
_tmp49_ = vala_object_creation_expression_get_type_reference (self);
1973
_tmp50_ = vala_data_type_get_data_type (_tmp49_);
1974
_tmp51_ = _vala_code_node_ref0 (_tmp50_);
1961
ValaDataType* _tmp45_ = NULL;
1962
ValaTypeSymbol* _tmp46_ = NULL;
1963
ValaTypeSymbol* _tmp47_;
1964
_tmp45_ = vala_object_creation_expression_get_type_reference (self);
1965
_tmp46_ = vala_data_type_get_data_type (_tmp45_);
1966
_tmp47_ = _vala_code_node_ref0 (_tmp46_);
1976
1967
_vala_code_node_unref0 (type);
1979
_tmp53_ = vala_object_creation_expression_get_type_reference (self);
1980
_tmp54_ = vala_data_type_copy (_tmp53_);
1982
vala_expression_set_value_type ((ValaExpression*) self, _tmp55_);
1983
_vala_code_node_unref0 (_tmp55_);
1984
_tmp56_ = vala_expression_get_value_type ((ValaExpression*) self);
1985
vala_data_type_set_value_owned (_tmp56_, TRUE);
1970
_tmp48_ = vala_object_creation_expression_get_type_reference (self);
1971
_tmp49_ = vala_data_type_copy (_tmp48_);
1973
vala_expression_set_value_type ((ValaExpression*) self, _tmp50_);
1974
_vala_code_node_unref0 (_tmp50_);
1975
_tmp51_ = vala_expression_get_value_type ((ValaExpression*) self);
1976
vala_data_type_set_value_owned (_tmp51_, TRUE);
1986
1977
may_throw = FALSE;
1987
_tmp57_ = vala_object_creation_expression_get_type_reference (self);
1988
_tmp58_ = vala_data_type_get_type_arguments (_tmp57_);
1990
_tmp60_ = vala_collection_get_size ((ValaCollection*) _tmp59_);
1991
given_num_type_args = (_tmp61_ = _tmp60_, _vala_iterable_unref0 (_tmp59_), _tmp61_);
1978
_tmp52_ = vala_object_creation_expression_get_type_reference (self);
1979
_tmp53_ = vala_data_type_get_type_arguments (_tmp52_);
1981
_tmp55_ = vala_collection_get_size ((ValaCollection*) _tmp54_);
1983
_vala_iterable_unref0 (_tmp54_);
1984
given_num_type_args = _tmp56_;
1992
1985
expected_num_type_args = 0;
1993
1986
if (VALA_IS_CLASS (type)) {
1996
ValaList* _tmp63_ = NULL;
2000
ValaSymbol* _tmp73_ = NULL;
2001
gboolean _tmp84_ = FALSE;
2002
ValaSymbol* _tmp85_ = NULL;
2003
_tmp62_ = _vala_code_node_ref0 (VALA_CLASS (type));
2005
_tmp63_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) cl);
2007
_tmp65_ = vala_collection_get_size ((ValaCollection*) _tmp64_);
2008
expected_num_type_args = _tmp65_;
2009
_vala_iterable_unref0 (_tmp64_);
1989
ValaList* _tmp58_ = NULL;
1993
ValaSymbol* _tmp68_ = NULL;
1994
gboolean _tmp79_ = FALSE;
1995
ValaSymbol* _tmp80_ = NULL;
1996
_tmp57_ = _vala_code_node_ref0 (VALA_CLASS (type));
1998
_tmp58_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) cl);
2000
_tmp60_ = vala_collection_get_size ((ValaCollection*) _tmp59_);
2001
expected_num_type_args = _tmp60_;
2002
_vala_iterable_unref0 (_tmp59_);
2010
2003
if (self->priv->_struct_creation) {
2011
ValaSourceReference* _tmp66_ = NULL;
2004
ValaSourceReference* _tmp61_ = NULL;
2012
2005
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2013
_tmp66_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2014
vala_report_error (_tmp66_, "syntax error, use `new' to create new objects");
2006
_tmp61_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2007
vala_report_error (_tmp61_, "syntax error, use `new' to create new objects");
2015
2008
result = FALSE;
2016
2009
_vala_code_node_unref0 (cl);
2017
2010
_vala_code_node_unref0 (type);
2020
_tmp67_ = vala_class_get_is_abstract (cl);
2022
ValaSourceReference* _tmp68_ = NULL;
2023
gchar* _tmp69_ = NULL;
2025
gchar* _tmp71_ = NULL;
2013
_tmp62_ = vala_class_get_is_abstract (cl);
2015
ValaSourceReference* _tmp63_ = NULL;
2016
gchar* _tmp64_ = NULL;
2018
gchar* _tmp66_ = NULL;
2027
2020
vala_expression_set_value_type ((ValaExpression*) self, NULL);
2028
2021
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2029
_tmp68_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2030
_tmp69_ = vala_symbol_get_full_name ((ValaSymbol*) cl);
2032
_tmp71_ = g_strdup_printf ("Can't create instance of abstract class `%s'", _tmp70_);
2034
vala_report_error (_tmp68_, _tmp72_);
2022
_tmp63_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2023
_tmp64_ = vala_symbol_get_full_name ((ValaSymbol*) cl);
2025
_tmp66_ = g_strdup_printf ("Can't create instance of abstract class `%s'", _tmp65_);
2027
vala_report_error (_tmp63_, _tmp67_);
2037
2030
result = FALSE;
2038
2031
_vala_code_node_unref0 (cl);
2039
2032
_vala_code_node_unref0 (type);
2042
_tmp73_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2043
if (_tmp73_ == NULL) {
2044
ValaMethod* _tmp74_ = NULL;
2045
ValaSymbol* _tmp75_ = NULL;
2035
_tmp68_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2036
if (_tmp68_ == NULL) {
2037
ValaMethod* _tmp69_ = NULL;
2038
ValaSymbol* _tmp70_ = NULL;
2039
ValaSymbol* _tmp76_ = NULL;
2040
ValaSymbol* _tmp77_ = NULL;
2041
ValaSourceReference* _tmp78_ = NULL;
2042
_tmp69_ = vala_class_get_default_construction_method (cl);
2043
vala_expression_set_symbol_reference ((ValaExpression*) self, (ValaSymbol*) _tmp69_);
2044
_tmp70_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2045
if (_tmp70_ == NULL) {
2046
ValaSourceReference* _tmp71_ = NULL;
2047
gchar* _tmp72_ = NULL;
2049
gchar* _tmp74_ = NULL;
2051
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2052
_tmp71_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2053
_tmp72_ = vala_symbol_get_full_name ((ValaSymbol*) cl);
2055
_tmp74_ = g_strdup_printf ("`%s' does not have a default constructor", _tmp73_);
2057
vala_report_error (_tmp71_, _tmp75_);
2061
_vala_code_node_unref0 (cl);
2062
_vala_code_node_unref0 (type);
2065
_tmp76_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2066
vala_symbol_set_used (_tmp76_, TRUE);
2067
_tmp77_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2068
_tmp78_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2069
vala_symbol_check_deprecated (_tmp77_, _tmp78_);
2071
_tmp80_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2072
if (_tmp80_ != NULL) {
2046
2073
ValaSymbol* _tmp81_ = NULL;
2047
ValaSymbol* _tmp82_ = NULL;
2048
ValaSourceReference* _tmp83_ = NULL;
2049
_tmp74_ = vala_class_get_default_construction_method (cl);
2050
vala_expression_set_symbol_reference ((ValaExpression*) self, (ValaSymbol*) _tmp74_);
2051
_tmp75_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2052
if (_tmp75_ == NULL) {
2053
ValaSourceReference* _tmp76_ = NULL;
2054
gchar* _tmp77_ = NULL;
2056
gchar* _tmp79_ = NULL;
2058
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2059
_tmp76_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2060
_tmp77_ = vala_symbol_get_full_name ((ValaSymbol*) cl);
2062
_tmp79_ = g_strdup_printf ("`%s' does not have a default constructor", _tmp78_);
2064
vala_report_error (_tmp76_, _tmp80_);
2068
_vala_code_node_unref0 (cl);
2069
_vala_code_node_unref0 (type);
2074
ValaSymbolAccessibility _tmp82_;
2072
2075
_tmp81_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2073
vala_symbol_set_used (_tmp81_, TRUE);
2074
_tmp82_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2075
_tmp83_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2076
vala_symbol_check_deprecated (_tmp82_, _tmp83_);
2078
_tmp85_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2079
if (_tmp85_ != NULL) {
2080
ValaSymbol* _tmp86_ = NULL;
2081
ValaSymbolAccessibility _tmp87_;
2082
_tmp86_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2083
_tmp87_ = vala_symbol_get_access (_tmp86_);
2084
_tmp84_ = _tmp87_ == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
2076
_tmp82_ = vala_symbol_get_access (_tmp81_);
2077
_tmp79_ = _tmp82_ == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
2089
2082
gboolean in_target_type;
2090
2083
in_target_type = FALSE;
2092
ValaSemanticAnalyzer* _tmp88_ = NULL;
2093
ValaSymbol* _tmp89_ = NULL;
2094
ValaSymbol* _tmp90_;
2085
ValaSemanticAnalyzer* _tmp83_ = NULL;
2086
ValaSymbol* _tmp84_ = NULL;
2087
ValaSymbol* _tmp85_;
2095
2088
ValaSymbol* this_symbol;
2096
_tmp88_ = vala_code_context_get_analyzer (context);
2097
_tmp89_ = vala_semantic_analyzer_get_current_symbol (_tmp88_);
2098
_tmp90_ = _vala_code_node_ref0 (_tmp89_);
2099
this_symbol = _tmp90_;
2089
_tmp83_ = vala_code_context_get_analyzer (context);
2090
_tmp84_ = vala_semantic_analyzer_get_current_symbol (_tmp83_);
2091
_tmp85_ = _vala_code_node_ref0 (_tmp84_);
2092
this_symbol = _tmp85_;
2105
ValaSymbol* _tmp92_ = NULL;
2106
ValaSymbol* _tmp93_;
2107
ValaSymbol* _tmp94_;
2108
_tmp92_ = vala_symbol_get_parent_symbol (this_symbol);
2109
_tmp93_ = _vala_code_node_ref0 (_tmp92_);
2098
ValaSymbol* _tmp87_ = NULL;
2099
ValaSymbol* _tmp88_;
2100
_tmp87_ = vala_symbol_get_parent_symbol (this_symbol);
2101
_tmp88_ = _vala_code_node_ref0 (_tmp87_);
2111
2102
_vala_code_node_unref0 (this_symbol);
2112
this_symbol = _tmp94_;
2103
this_symbol = _tmp88_;
2115
2106
if (!(this_symbol != NULL)) {
2150
gchar* _tmp101_ = NULL;
2153
ValaClass* _tmp105_ = NULL;
2154
ValaClass* _tmp106_;
2155
ValaClass* _tmp107_;
2141
gchar* _tmp95_ = NULL;
2144
ValaClass* _tmp99_ = NULL;
2145
ValaClass* _tmp100_;
2156
2146
if (!(cl != NULL)) {
2159
_tmp101_ = vala_typesymbol_get_ref_sink_function ((ValaTypeSymbol*) cl);
2160
_tmp102_ = _tmp101_;
2161
if ((_tmp103_ = _tmp102_ != NULL, _g_free0 (_tmp102_), _tmp103_)) {
2162
ValaDataType* _tmp104_ = NULL;
2163
_tmp104_ = vala_expression_get_value_type ((ValaExpression*) self);
2164
vala_data_type_set_floating_reference (_tmp104_, TRUE);
2149
_tmp95_ = vala_typesymbol_get_ref_sink_function ((ValaTypeSymbol*) cl);
2151
_tmp97_ = _tmp96_ != NULL;
2154
ValaDataType* _tmp98_ = NULL;
2155
_tmp98_ = vala_expression_get_value_type ((ValaExpression*) self);
2156
vala_data_type_set_floating_reference (_tmp98_, TRUE);
2167
_tmp105_ = vala_class_get_base_class (cl);
2168
_tmp106_ = _vala_code_node_ref0 (_tmp105_);
2169
_tmp107_ = _tmp106_;
2159
_tmp99_ = vala_class_get_base_class (cl);
2160
_tmp100_ = _vala_code_node_ref0 (_tmp99_);
2170
2161
_vala_code_node_unref0 (cl);
2173
2164
_vala_code_node_unref0 (cl);
2175
2166
if (VALA_IS_STRUCT (type)) {
2176
ValaStruct* _tmp108_;
2167
ValaStruct* _tmp101_;
2177
2168
ValaStruct* st;
2178
ValaList* _tmp109_ = NULL;
2181
gboolean _tmp112_ = FALSE;
2182
ValaSymbol* _tmp115_ = NULL;
2183
_tmp108_ = _vala_code_node_ref0 (VALA_STRUCT (type));
2185
_tmp109_ = vala_struct_get_type_parameters (st);
2186
_tmp110_ = _tmp109_;
2187
_tmp111_ = vala_collection_get_size ((ValaCollection*) _tmp110_);
2188
expected_num_type_args = _tmp111_;
2189
_vala_iterable_unref0 (_tmp110_);
2169
ValaList* _tmp102_ = NULL;
2172
gboolean _tmp105_ = FALSE;
2173
ValaSymbol* _tmp108_ = NULL;
2174
_tmp101_ = _vala_code_node_ref0 (VALA_STRUCT (type));
2176
_tmp102_ = vala_struct_get_type_parameters (st);
2177
_tmp103_ = _tmp102_;
2178
_tmp104_ = vala_collection_get_size ((ValaCollection*) _tmp103_);
2179
expected_num_type_args = _tmp104_;
2180
_vala_iterable_unref0 (_tmp103_);
2190
2181
if (!self->priv->_struct_creation) {
2192
_tmp113_ = vala_code_context_get_deprecated (context);
2193
_tmp112_ = !_tmp113_;
2183
_tmp106_ = vala_code_context_get_deprecated (context);
2184
_tmp105_ = !_tmp106_;
2198
ValaSourceReference* _tmp114_ = NULL;
2199
_tmp114_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2200
vala_report_warning (_tmp114_, "deprecated syntax, don't use `new' to initialize structs");
2202
_tmp115_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2203
if (_tmp115_ == NULL) {
2204
ValaMethod* _tmp116_ = NULL;
2205
_tmp116_ = vala_struct_get_default_construction_method (st);
2206
vala_expression_set_symbol_reference ((ValaExpression*) self, (ValaSymbol*) _tmp116_);
2189
ValaSourceReference* _tmp107_ = NULL;
2190
_tmp107_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2191
vala_report_warning (_tmp107_, "deprecated syntax, don't use `new' to initialize structs");
2193
_tmp108_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2194
if (_tmp108_ == NULL) {
2195
ValaMethod* _tmp109_ = NULL;
2196
_tmp109_ = vala_struct_get_default_construction_method (st);
2197
vala_expression_set_symbol_reference ((ValaExpression*) self, (ValaSymbol*) _tmp109_);
2208
2199
_vala_code_node_unref0 (st);
2211
2202
if (expected_num_type_args > given_num_type_args) {
2203
ValaSourceReference* _tmp110_ = NULL;
2204
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2205
_tmp110_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2206
vala_report_error (_tmp110_, "too few type arguments");
2208
_vala_code_node_unref0 (type);
2211
if (expected_num_type_args < given_num_type_args) {
2212
ValaSourceReference* _tmp111_ = NULL;
2213
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2214
_tmp111_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2215
vala_report_error (_tmp111_, "too many type arguments");
2217
_vala_code_node_unref0 (type);
2221
_tmp113_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2222
if (_tmp113_ == NULL) {
2223
ValaList* _tmp114_ = NULL;
2226
_tmp114_ = vala_object_creation_expression_get_argument_list (self);
2227
_tmp115_ = _tmp114_;
2228
_tmp116_ = vala_collection_get_size ((ValaCollection*) _tmp115_);
2229
_tmp112_ = _tmp116_ != 0;
2230
_vala_iterable_unref0 (_tmp115_);
2212
2235
ValaSourceReference* _tmp117_ = NULL;
2236
gchar* _tmp118_ = NULL;
2238
gchar* _tmp120_ = NULL;
2240
vala_expression_set_value_type ((ValaExpression*) self, NULL);
2213
2241
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2214
2242
_tmp117_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2215
vala_report_error (_tmp117_, "too few type arguments");
2217
_vala_code_node_unref0 (type);
2220
if (expected_num_type_args < given_num_type_args) {
2221
ValaSourceReference* _tmp118_ = NULL;
2222
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2223
_tmp118_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2224
vala_report_error (_tmp118_, "too many type arguments");
2226
_vala_code_node_unref0 (type);
2230
_tmp120_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2231
if (_tmp120_ == NULL) {
2232
ValaList* _tmp121_ = NULL;
2235
_tmp121_ = vala_object_creation_expression_get_argument_list (self);
2236
_tmp122_ = _tmp121_;
2237
_tmp123_ = vala_collection_get_size ((ValaCollection*) _tmp122_);
2238
_tmp119_ = _tmp123_ != 0;
2239
_vala_iterable_unref0 (_tmp122_);
2244
ValaSourceReference* _tmp124_ = NULL;
2245
gchar* _tmp125_ = NULL;
2247
gchar* _tmp127_ = NULL;
2249
vala_expression_set_value_type ((ValaExpression*) self, NULL);
2250
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2251
_tmp124_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2252
_tmp125_ = vala_symbol_get_full_name ((ValaSymbol*) type);
2253
_tmp126_ = _tmp125_;
2254
_tmp127_ = g_strdup_printf ("No arguments allowed when constructing type `%s'", _tmp126_);
2255
_tmp128_ = _tmp127_;
2256
vala_report_error (_tmp124_, _tmp128_);
2257
_g_free0 (_tmp128_);
2258
_g_free0 (_tmp126_);
2260
_vala_code_node_unref0 (type);
2263
_tmp129_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2264
if (VALA_IS_METHOD (_tmp129_)) {
2265
ValaSymbol* _tmp130_ = NULL;
2266
ValaMethod* _tmp131_;
2243
_tmp118_ = vala_symbol_get_full_name ((ValaSymbol*) type);
2244
_tmp119_ = _tmp118_;
2245
_tmp120_ = g_strdup_printf ("No arguments allowed when constructing type `%s'", _tmp119_);
2246
_tmp121_ = _tmp120_;
2247
vala_report_error (_tmp117_, _tmp121_);
2248
_g_free0 (_tmp121_);
2249
_g_free0 (_tmp119_);
2251
_vala_code_node_unref0 (type);
2254
_tmp122_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2255
if (VALA_IS_METHOD (_tmp122_)) {
2256
ValaSymbol* _tmp123_ = NULL;
2257
ValaMethod* _tmp124_;
2268
ValaList* _tmp132_ = NULL;
2259
ValaList* _tmp125_ = NULL;
2269
2260
ValaList* args;
2270
ValaIterator* _tmp133_ = NULL;
2261
ValaIterator* _tmp126_ = NULL;
2271
2262
ValaIterator* arg_it;
2272
ValaSemanticAnalyzer* _tmp148_ = NULL;
2273
ValaMethodType* _tmp149_ = NULL;
2274
ValaMethodType* _tmp150_;
2275
ValaList* _tmp151_ = NULL;
2277
_tmp130_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2278
_tmp131_ = _vala_code_node_ref0 (VALA_METHOD (_tmp130_));
2280
_tmp132_ = vala_object_creation_expression_get_argument_list (self);
2282
_tmp133_ = vala_iterable_iterator ((ValaIterable*) args);
2263
ValaSemanticAnalyzer* _tmp141_ = NULL;
2264
ValaMethodType* _tmp142_ = NULL;
2265
ValaMethodType* _tmp143_;
2266
ValaList* _tmp144_ = NULL;
2268
_tmp123_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2269
_tmp124_ = _vala_code_node_ref0 (VALA_METHOD (_tmp123_));
2271
_tmp125_ = vala_object_creation_expression_get_argument_list (self);
2273
_tmp126_ = vala_iterable_iterator ((ValaIterable*) args);
2285
ValaList* _tmp134_ = NULL;
2276
ValaList* _tmp127_ = NULL;
2286
2277
ValaList* _param_list;
2288
2279
gint _param_size;
2289
2280
gint _param_index;
2290
_tmp134_ = vala_method_get_parameters (m);
2291
_param_list = _tmp134_;
2292
_tmp135_ = vala_collection_get_size ((ValaCollection*) _param_list);
2293
_param_size = _tmp135_;
2281
_tmp127_ = vala_method_get_parameters (m);
2282
_param_list = _tmp127_;
2283
_tmp128_ = vala_collection_get_size ((ValaCollection*) _param_list);
2284
_param_size = _tmp128_;
2294
2285
_param_index = -1;
2296
gpointer _tmp136_ = NULL;
2287
gpointer _tmp129_ = NULL;
2297
2288
ValaParameter* param;
2300
2291
_param_index = _param_index + 1;
2301
2292
if (!(_param_index < _param_size)) {
2304
_tmp136_ = vala_list_get (_param_list, _param_index);
2305
param = (ValaParameter*) _tmp136_;
2306
_tmp137_ = vala_parameter_get_ellipsis (param);
2295
_tmp129_ = vala_list_get (_param_list, _param_index);
2296
param = (ValaParameter*) _tmp129_;
2297
_tmp130_ = vala_parameter_get_ellipsis (param);
2308
2299
_vala_code_node_unref0 (param);
2311
_tmp138_ = vala_iterator_next (arg_it);
2313
gpointer _tmp139_ = NULL;
2302
_tmp131_ = vala_iterator_next (arg_it);
2304
gpointer _tmp132_ = NULL;
2314
2305
ValaExpression* arg;
2315
ValaDataType* _tmp140_ = NULL;
2316
ValaDataType* _tmp141_ = NULL;
2317
ValaDataType* _tmp142_ = NULL;
2318
ValaDataType* _tmp143_ = NULL;
2319
ValaDataType* _tmp144_;
2320
_tmp139_ = vala_iterator_get (arg_it);
2321
arg = (ValaExpression*) _tmp139_;
2322
_tmp140_ = vala_variable_get_variable_type ((ValaVariable*) param);
2323
vala_expression_set_formal_target_type (arg, _tmp140_);
2324
_tmp141_ = vala_expression_get_formal_target_type (arg);
2325
_tmp142_ = vala_expression_get_value_type ((ValaExpression*) self);
2326
_tmp143_ = vala_data_type_get_actual_type (_tmp141_, _tmp142_, NULL, (ValaCodeNode*) self);
2327
_tmp144_ = _tmp143_;
2328
vala_expression_set_target_type (arg, _tmp144_);
2329
_vala_code_node_unref0 (_tmp144_);
2306
ValaDataType* _tmp133_ = NULL;
2307
ValaDataType* _tmp134_ = NULL;
2308
ValaDataType* _tmp135_ = NULL;
2309
ValaDataType* _tmp136_ = NULL;
2310
ValaDataType* _tmp137_;
2311
_tmp132_ = vala_iterator_get (arg_it);
2312
arg = (ValaExpression*) _tmp132_;
2313
_tmp133_ = vala_variable_get_variable_type ((ValaVariable*) param);
2314
vala_expression_set_formal_target_type (arg, _tmp133_);
2315
_tmp134_ = vala_expression_get_formal_target_type (arg);
2316
_tmp135_ = vala_expression_get_value_type ((ValaExpression*) self);
2317
_tmp136_ = vala_data_type_get_actual_type (_tmp134_, _tmp135_, NULL, (ValaCodeNode*) self);
2318
_tmp137_ = _tmp136_;
2319
vala_expression_set_target_type (arg, _tmp137_);
2320
_vala_code_node_unref0 (_tmp137_);
2330
2321
_vala_code_node_unref0 (arg);
2332
2323
_vala_code_node_unref0 (param);
2334
2325
_vala_iterable_unref0 (_param_list);
2338
2329
ValaList* _arg_list;
2340
2331
gint _arg_size;
2341
2332
gint _arg_index;
2342
_tmp145_ = _vala_iterable_ref0 (args);
2343
_arg_list = _tmp145_;
2344
_tmp146_ = vala_collection_get_size ((ValaCollection*) _arg_list);
2345
_arg_size = _tmp146_;
2333
_tmp138_ = _vala_iterable_ref0 (args);
2334
_arg_list = _tmp138_;
2335
_tmp139_ = vala_collection_get_size ((ValaCollection*) _arg_list);
2336
_arg_size = _tmp139_;
2346
2337
_arg_index = -1;
2348
gpointer _tmp147_ = NULL;
2339
gpointer _tmp140_ = NULL;
2349
2340
ValaExpression* arg;
2350
2341
_arg_index = _arg_index + 1;
2351
2342
if (!(_arg_index < _arg_size)) {
2354
_tmp147_ = vala_list_get (_arg_list, _arg_index);
2355
arg = (ValaExpression*) _tmp147_;
2345
_tmp140_ = vala_list_get (_arg_list, _arg_index);
2346
arg = (ValaExpression*) _tmp140_;
2356
2347
vala_code_node_check ((ValaCodeNode*) arg, context);
2357
2348
_vala_code_node_unref0 (arg);
2359
2350
_vala_iterable_unref0 (_arg_list);
2361
_tmp148_ = vala_code_context_get_analyzer (context);
2362
_tmp149_ = vala_method_type_new (m);
2363
_tmp150_ = _tmp149_;
2364
_tmp151_ = vala_method_get_parameters (m);
2365
_tmp152_ = _tmp151_;
2366
vala_semantic_analyzer_check_arguments (_tmp148_, (ValaExpression*) self, (ValaDataType*) _tmp150_, _tmp152_, args);
2367
_vala_iterable_unref0 (_tmp152_);
2368
_vala_code_node_unref0 (_tmp150_);
2352
_tmp141_ = vala_code_context_get_analyzer (context);
2353
_tmp142_ = vala_method_type_new (m);
2354
_tmp143_ = _tmp142_;
2355
_tmp144_ = vala_method_get_parameters (m);
2356
_tmp145_ = _tmp144_;
2357
vala_semantic_analyzer_check_arguments (_tmp141_, (ValaExpression*) self, (ValaDataType*) _tmp143_, _tmp145_, args);
2358
_vala_iterable_unref0 (_tmp145_);
2359
_vala_code_node_unref0 (_tmp143_);
2370
ValaList* _tmp153_ = NULL;
2361
ValaList* _tmp146_ = NULL;
2371
2362
ValaList* _error_type_list;
2373
2364
gint _error_type_size;
2374
2365
gint _error_type_index;
2375
_tmp153_ = vala_code_node_get_error_types ((ValaCodeNode*) m);
2376
_error_type_list = _tmp153_;
2377
_tmp154_ = vala_collection_get_size ((ValaCollection*) _error_type_list);
2378
_error_type_size = _tmp154_;
2366
_tmp146_ = vala_code_node_get_error_types ((ValaCodeNode*) m);
2367
_error_type_list = _tmp146_;
2368
_tmp147_ = vala_collection_get_size ((ValaCollection*) _error_type_list);
2369
_error_type_size = _tmp147_;
2379
2370
_error_type_index = -1;
2381
gpointer _tmp155_ = NULL;
2372
gpointer _tmp148_ = NULL;
2382
2373
ValaDataType* error_type;
2383
ValaDataType* _tmp156_ = NULL;
2374
ValaDataType* _tmp149_ = NULL;
2384
2375
ValaDataType* call_error_type;
2385
ValaSourceReference* _tmp157_ = NULL;
2376
ValaSourceReference* _tmp150_ = NULL;
2386
2377
_error_type_index = _error_type_index + 1;
2387
2378
if (!(_error_type_index < _error_type_size)) {
2390
_tmp155_ = vala_list_get (_error_type_list, _error_type_index);
2391
error_type = (ValaDataType*) _tmp155_;
2381
_tmp148_ = vala_list_get (_error_type_list, _error_type_index);
2382
error_type = (ValaDataType*) _tmp148_;
2392
2383
may_throw = TRUE;
2393
_tmp156_ = vala_data_type_copy (error_type);
2394
call_error_type = _tmp156_;
2395
_tmp157_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2396
vala_code_node_set_source_reference ((ValaCodeNode*) call_error_type, _tmp157_);
2384
_tmp149_ = vala_data_type_copy (error_type);
2385
call_error_type = _tmp149_;
2386
_tmp150_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2387
vala_code_node_set_source_reference ((ValaCodeNode*) call_error_type, _tmp150_);
2397
2388
vala_code_node_add_error_type ((ValaCodeNode*) self, call_error_type);
2398
2389
_vala_code_node_unref0 (call_error_type);
2399
2390
_vala_code_node_unref0 (error_type);
2404
2395
_vala_iterable_unref0 (args);
2405
2396
_vala_code_node_unref0 (m);
2407
ValaDataType* _tmp158_ = NULL;
2408
_tmp158_ = vala_object_creation_expression_get_type_reference (self);
2409
if (VALA_IS_ERROR_TYPE (_tmp158_)) {
2410
ValaDataType* _tmp159_ = NULL;
2411
ValaList* _tmp167_ = NULL;
2415
_tmp159_ = vala_object_creation_expression_get_type_reference (self);
2416
if (_tmp159_ != NULL) {
2417
ValaDataType* _tmp160_ = NULL;
2418
_tmp160_ = vala_object_creation_expression_get_type_reference (self);
2419
vala_code_node_check ((ValaCodeNode*) _tmp160_, context);
2398
ValaDataType* _tmp151_ = NULL;
2399
_tmp151_ = vala_object_creation_expression_get_type_reference (self);
2400
if (VALA_IS_ERROR_TYPE (_tmp151_)) {
2401
ValaDataType* _tmp152_ = NULL;
2402
ValaList* _tmp160_ = NULL;
2406
_tmp152_ = vala_object_creation_expression_get_type_reference (self);
2407
if (_tmp152_ != NULL) {
2408
ValaDataType* _tmp153_ = NULL;
2409
_tmp153_ = vala_object_creation_expression_get_type_reference (self);
2410
vala_code_node_check ((ValaCodeNode*) _tmp153_, context);
2421
2412
if (self->priv->_member_name != NULL) {
2422
2413
vala_code_node_check ((ValaCodeNode*) self->priv->_member_name, context);
2426
2417
ValaList* _arg_list;
2428
2419
gint _arg_size;
2429
2420
gint _arg_index;
2430
_tmp161_ = _vala_iterable_ref0 (self->priv->argument_list);
2431
_arg_list = _tmp161_;
2432
_tmp162_ = vala_collection_get_size ((ValaCollection*) _arg_list);
2433
_arg_size = _tmp162_;
2421
_tmp154_ = _vala_iterable_ref0 (self->priv->argument_list);
2422
_arg_list = _tmp154_;
2423
_tmp155_ = vala_collection_get_size ((ValaCollection*) _arg_list);
2424
_arg_size = _tmp155_;
2434
2425
_arg_index = -1;
2436
gpointer _tmp163_ = NULL;
2427
gpointer _tmp156_ = NULL;
2437
2428
ValaExpression* arg;
2438
2429
_arg_index = _arg_index + 1;
2439
2430
if (!(_arg_index < _arg_size)) {
2442
_tmp163_ = vala_list_get (_arg_list, _arg_index);
2443
arg = (ValaExpression*) _tmp163_;
2433
_tmp156_ = vala_list_get (_arg_list, _arg_index);
2434
arg = (ValaExpression*) _tmp156_;
2444
2435
vala_code_node_check ((ValaCodeNode*) arg, context);
2445
2436
_vala_code_node_unref0 (arg);
2447
2438
_vala_iterable_unref0 (_arg_list);
2451
2442
ValaList* _init_list;
2453
2444
gint _init_size;
2454
2445
gint _init_index;
2455
_tmp164_ = _vala_iterable_ref0 (self->priv->object_initializer);
2456
_init_list = _tmp164_;
2457
_tmp165_ = vala_collection_get_size ((ValaCollection*) _init_list);
2458
_init_size = _tmp165_;
2446
_tmp157_ = _vala_iterable_ref0 (self->priv->object_initializer);
2447
_init_list = _tmp157_;
2448
_tmp158_ = vala_collection_get_size ((ValaCollection*) _init_list);
2449
_init_size = _tmp158_;
2459
2450
_init_index = -1;
2461
gpointer _tmp166_ = NULL;
2452
gpointer _tmp159_ = NULL;
2462
2453
ValaMemberInitializer* init;
2463
2454
_init_index = _init_index + 1;
2464
2455
if (!(_init_index < _init_size)) {
2467
_tmp166_ = vala_list_get (_init_list, _init_index);
2468
init = (ValaMemberInitializer*) _tmp166_;
2458
_tmp159_ = vala_list_get (_init_list, _init_index);
2459
init = (ValaMemberInitializer*) _tmp159_;
2469
2460
vala_code_node_check ((ValaCodeNode*) init, context);
2470
2461
_vala_code_node_unref0 (init);
2472
2463
_vala_iterable_unref0 (_init_list);
2474
_tmp167_ = vala_object_creation_expression_get_argument_list (self);
2475
_tmp168_ = _tmp167_;
2476
_tmp169_ = vala_collection_get_size ((ValaCollection*) _tmp168_);
2477
if ((_tmp170_ = _tmp169_ == 0, _vala_iterable_unref0 (_tmp168_), _tmp170_)) {
2478
ValaSourceReference* _tmp171_ = NULL;
2465
_tmp160_ = vala_object_creation_expression_get_argument_list (self);
2466
_tmp161_ = _tmp160_;
2467
_tmp162_ = vala_collection_get_size ((ValaCollection*) _tmp161_);
2468
_tmp163_ = _tmp162_ == 0;
2469
_vala_iterable_unref0 (_tmp161_);
2471
ValaSourceReference* _tmp164_ = NULL;
2479
2472
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2480
_tmp171_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2481
vala_report_error (_tmp171_, "Too few arguments, errors need at least 1 argument");
2473
_tmp164_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2474
vala_report_error (_tmp164_, "Too few arguments, errors need at least 1 argument");
2483
ValaList* _tmp172_ = NULL;
2485
ValaIterator* _tmp174_ = NULL;
2486
ValaIterator* _tmp175_;
2476
ValaList* _tmp165_ = NULL;
2478
ValaIterator* _tmp167_ = NULL;
2479
ValaIterator* _tmp168_;
2487
2480
ValaIterator* arg_it;
2488
gpointer _tmp176_ = NULL;
2481
gpointer _tmp169_ = NULL;
2489
2482
ValaExpression* ex;
2490
gboolean _tmp177_ = FALSE;
2491
ValaDataType* _tmp178_ = NULL;
2492
_tmp172_ = vala_object_creation_expression_get_argument_list (self);
2493
_tmp173_ = _tmp172_;
2494
_tmp174_ = vala_iterable_iterator ((ValaIterable*) _tmp173_);
2495
arg_it = (_tmp175_ = _tmp174_, _vala_iterable_unref0 (_tmp173_), _tmp175_);
2483
gboolean _tmp170_ = FALSE;
2484
ValaDataType* _tmp171_ = NULL;
2485
_tmp165_ = vala_object_creation_expression_get_argument_list (self);
2486
_tmp166_ = _tmp165_;
2487
_tmp167_ = vala_iterable_iterator ((ValaIterable*) _tmp166_);
2488
_tmp168_ = _tmp167_;
2489
_vala_iterable_unref0 (_tmp166_);
2496
2491
vala_iterator_next (arg_it);
2497
_tmp176_ = vala_iterator_get (arg_it);
2498
ex = (ValaExpression*) _tmp176_;
2499
_tmp178_ = vala_expression_get_value_type (ex);
2500
if (_tmp178_ == NULL) {
2492
_tmp169_ = vala_iterator_get (arg_it);
2493
ex = (ValaExpression*) _tmp169_;
2494
_tmp171_ = vala_expression_get_value_type (ex);
2495
if (_tmp171_ == NULL) {
2503
ValaDataType* _tmp179_ = NULL;
2504
ValaSemanticAnalyzer* _tmp180_ = NULL;
2506
_tmp179_ = vala_expression_get_value_type (ex);
2507
_tmp180_ = vala_code_context_get_analyzer (context);
2508
_tmp181_ = vala_data_type_compatible (_tmp179_, _tmp180_->string_type);
2509
_tmp177_ = !_tmp181_;
2498
ValaDataType* _tmp172_ = NULL;
2499
ValaSemanticAnalyzer* _tmp173_ = NULL;
2501
_tmp172_ = vala_expression_get_value_type (ex);
2502
_tmp173_ = vala_code_context_get_analyzer (context);
2503
_tmp174_ = vala_data_type_compatible (_tmp172_, _tmp173_->string_type);
2504
_tmp170_ = !_tmp174_;
2512
ValaSourceReference* _tmp182_ = NULL;
2507
ValaSourceReference* _tmp175_ = NULL;
2513
2508
vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2514
_tmp182_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2515
vala_report_error (_tmp182_, "Invalid type for argument 1");
2509
_tmp175_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2510
vala_report_error (_tmp175_, "Invalid type for argument 1");
2517
2512
_vala_code_node_unref0 (ex);
2518
2513
_vala_iterator_unref0 (arg_it);
2523
ValaList* _tmp183_ = NULL;
2518
ValaList* _tmp176_ = NULL;
2524
2519
ValaList* _init_list;
2526
2521
gint _init_size;
2527
2522
gint _init_index;
2528
_tmp183_ = vala_object_creation_expression_get_object_initializer (self);
2529
_init_list = _tmp183_;
2530
_tmp184_ = vala_collection_get_size ((ValaCollection*) _init_list);
2531
_init_size = _tmp184_;
2523
_tmp176_ = vala_object_creation_expression_get_object_initializer (self);
2524
_init_list = _tmp176_;
2525
_tmp177_ = vala_collection_get_size ((ValaCollection*) _init_list);
2526
_init_size = _tmp177_;
2532
2527
_init_index = -1;
2534
gpointer _tmp185_ = NULL;
2529
gpointer _tmp178_ = NULL;
2535
2530
ValaMemberInitializer* init;
2536
ValaSemanticAnalyzer* _tmp186_ = NULL;
2537
ValaDataType* _tmp187_ = NULL;
2531
ValaSemanticAnalyzer* _tmp179_ = NULL;
2532
ValaDataType* _tmp180_ = NULL;
2538
2533
_init_index = _init_index + 1;
2539
2534
if (!(_init_index < _init_size)) {
2542
_tmp185_ = vala_list_get (_init_list, _init_index);
2543
init = (ValaMemberInitializer*) _tmp185_;
2544
_tmp186_ = vala_code_context_get_analyzer (context);
2545
_tmp187_ = vala_object_creation_expression_get_type_reference (self);
2546
vala_semantic_analyzer_visit_member_initializer (_tmp186_, init, _tmp187_);
2537
_tmp178_ = vala_list_get (_init_list, _init_index);
2538
init = (ValaMemberInitializer*) _tmp178_;
2539
_tmp179_ = vala_code_context_get_analyzer (context);
2540
_tmp180_ = vala_object_creation_expression_get_type_reference (self);
2541
vala_semantic_analyzer_visit_member_initializer (_tmp179_, init, _tmp180_);
2547
2542
_vala_code_node_unref0 (init);
2549
2544
_vala_iterable_unref0 (_init_list);
2551
2546
if (may_throw) {
2552
gboolean _tmp188_ = FALSE;
2553
ValaCodeNode* _tmp189_ = NULL;
2554
_tmp189_ = vala_code_node_get_parent_node ((ValaCodeNode*) self);
2555
if (VALA_IS_LOCAL_VARIABLE (_tmp189_)) {
2547
gboolean _tmp181_ = FALSE;
2548
ValaCodeNode* _tmp182_ = NULL;
2549
_tmp182_ = vala_code_node_get_parent_node ((ValaCodeNode*) self);
2550
if (VALA_IS_LOCAL_VARIABLE (_tmp182_)) {
2558
ValaCodeNode* _tmp190_ = NULL;
2559
_tmp190_ = vala_code_node_get_parent_node ((ValaCodeNode*) self);
2560
_tmp188_ = VALA_IS_EXPRESSION_STATEMENT (_tmp190_);
2553
ValaCodeNode* _tmp183_ = NULL;
2554
_tmp183_ = vala_code_node_get_parent_node ((ValaCodeNode*) self);
2555
_tmp181_ = VALA_IS_EXPRESSION_STATEMENT (_tmp183_);
2564
ValaSemanticAnalyzer* _tmp191_ = NULL;
2565
ValaSymbol* _tmp192_ = NULL;
2566
_tmp191_ = vala_code_context_get_analyzer (context);
2567
_tmp192_ = vala_semantic_analyzer_get_current_symbol (_tmp191_);
2568
if (!VALA_IS_BLOCK (_tmp192_)) {
2569
ValaProfile _tmp193_;
2570
_tmp193_ = vala_code_context_get_profile (context);
2571
if (_tmp193_ != VALA_PROFILE_DOVA) {
2572
ValaSourceReference* _tmp194_ = NULL;
2573
_tmp194_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2574
vala_report_error (_tmp194_, "Field initializers must not throw errors");
2559
ValaSemanticAnalyzer* _tmp184_ = NULL;
2560
ValaSymbol* _tmp185_ = NULL;
2561
_tmp184_ = vala_code_context_get_analyzer (context);
2562
_tmp185_ = vala_semantic_analyzer_get_current_symbol (_tmp184_);
2563
if (!VALA_IS_BLOCK (_tmp185_)) {
2564
ValaProfile _tmp186_;
2565
_tmp186_ = vala_code_context_get_profile (context);
2566
if (_tmp186_ != VALA_PROFILE_DOVA) {
2567
ValaSourceReference* _tmp187_ = NULL;
2568
_tmp187_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2569
vala_report_error (_tmp187_, "Field initializers must not throw errors");
2577
ValaCodeNode* _tmp195_ = NULL;
2578
ValaCodeNode* _tmp196_;
2572
ValaCodeNode* _tmp188_ = NULL;
2573
ValaCodeNode* _tmp189_;
2579
2574
ValaCodeNode* old_parent_node;
2580
ValaDataType* _tmp197_ = NULL;
2581
gchar* _tmp198_ = NULL;
2583
ValaSourceReference* _tmp200_ = NULL;
2584
ValaLocalVariable* _tmp201_ = NULL;
2585
ValaLocalVariable* _tmp202_;
2575
ValaDataType* _tmp190_ = NULL;
2576
gchar* _tmp191_ = NULL;
2578
ValaSourceReference* _tmp193_ = NULL;
2579
ValaLocalVariable* _tmp194_ = NULL;
2580
ValaLocalVariable* _tmp195_;
2586
2581
ValaLocalVariable* local;
2587
ValaSourceReference* _tmp203_ = NULL;
2588
ValaDeclarationStatement* _tmp204_ = NULL;
2582
ValaSourceReference* _tmp196_ = NULL;
2583
ValaDeclarationStatement* _tmp197_ = NULL;
2589
2584
ValaDeclarationStatement* decl;
2590
ValaSemanticAnalyzer* _tmp205_ = NULL;
2591
const gchar* _tmp206_ = NULL;
2592
ValaSourceReference* _tmp207_ = NULL;
2593
ValaMemberAccess* _tmp208_ = NULL;
2585
ValaSemanticAnalyzer* _tmp198_ = NULL;
2586
const gchar* _tmp199_ = NULL;
2587
ValaSourceReference* _tmp200_ = NULL;
2588
ValaMemberAccess* _tmp201_ = NULL;
2594
2589
ValaExpression* temp_access;
2595
ValaDataType* _tmp209_ = NULL;
2596
ValaSemanticAnalyzer* _tmp210_ = NULL;
2597
ValaSymbol* _tmp211_ = NULL;
2598
ValaBlock* _tmp212_;
2590
ValaDataType* _tmp202_ = NULL;
2591
ValaSemanticAnalyzer* _tmp203_ = NULL;
2592
ValaSymbol* _tmp204_ = NULL;
2593
ValaBlock* _tmp205_;
2599
2594
ValaBlock* block;
2600
ValaSemanticAnalyzer* _tmp213_ = NULL;
2601
_tmp195_ = vala_code_node_get_parent_node ((ValaCodeNode*) self);
2602
_tmp196_ = _vala_code_node_ref0 (_tmp195_);
2603
old_parent_node = _tmp196_;
2604
_tmp197_ = vala_expression_get_value_type ((ValaExpression*) self);
2605
_tmp198_ = vala_code_node_get_temp_name ();
2606
_tmp199_ = _tmp198_;
2595
ValaSemanticAnalyzer* _tmp206_ = NULL;
2596
_tmp188_ = vala_code_node_get_parent_node ((ValaCodeNode*) self);
2597
_tmp189_ = _vala_code_node_ref0 (_tmp188_);
2598
old_parent_node = _tmp189_;
2599
_tmp190_ = vala_expression_get_value_type ((ValaExpression*) self);
2600
_tmp191_ = vala_code_node_get_temp_name ();
2601
_tmp192_ = _tmp191_;
2602
_tmp193_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2603
_tmp194_ = vala_local_variable_new (_tmp190_, _tmp192_, NULL, _tmp193_);
2604
_tmp195_ = _tmp194_;
2605
_g_free0 (_tmp192_);
2607
vala_local_variable_set_floating (local, TRUE);
2608
_tmp196_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2609
_tmp197_ = vala_declaration_statement_new ((ValaSymbol*) local, _tmp196_);
2611
_tmp198_ = vala_code_context_get_analyzer (context);
2612
vala_expression_insert_statement ((ValaExpression*) self, _tmp198_->insert_block, (ValaStatement*) decl);
2613
_tmp199_ = vala_symbol_get_name ((ValaSymbol*) local);
2607
2614
_tmp200_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2608
_tmp201_ = vala_local_variable_new (_tmp197_, _tmp199_, NULL, _tmp200_);
2609
local = (_tmp202_ = _tmp201_, _g_free0 (_tmp199_), _tmp202_);
2610
vala_local_variable_set_floating (local, TRUE);
2611
_tmp203_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2612
_tmp204_ = vala_declaration_statement_new ((ValaSymbol*) local, _tmp203_);
2614
_tmp205_ = vala_code_context_get_analyzer (context);
2615
vala_expression_insert_statement ((ValaExpression*) self, _tmp205_->insert_block, (ValaStatement*) decl);
2616
_tmp206_ = vala_symbol_get_name ((ValaSymbol*) local);
2617
_tmp207_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2618
_tmp208_ = vala_member_access_new_simple (_tmp206_, _tmp207_);
2619
temp_access = (ValaExpression*) _tmp208_;
2620
_tmp209_ = vala_expression_get_target_type ((ValaExpression*) self);
2621
vala_expression_set_target_type (temp_access, _tmp209_);
2615
_tmp201_ = vala_member_access_new_simple (_tmp199_, _tmp200_);
2616
temp_access = (ValaExpression*) _tmp201_;
2617
_tmp202_ = vala_expression_get_target_type ((ValaExpression*) self);
2618
vala_expression_set_target_type (temp_access, _tmp202_);
2622
2619
vala_variable_set_initializer ((ValaVariable*) local, (ValaExpression*) self);
2623
2620
vala_code_node_check ((ValaCodeNode*) decl, context);
2624
2621
vala_code_node_check ((ValaCodeNode*) temp_access, context);
2625
_tmp210_ = vala_code_context_get_analyzer (context);
2626
_tmp211_ = vala_semantic_analyzer_get_current_symbol (_tmp210_);
2627
_tmp212_ = _vala_code_node_ref0 (VALA_BLOCK (_tmp211_));
2622
_tmp203_ = vala_code_context_get_analyzer (context);
2623
_tmp204_ = vala_semantic_analyzer_get_current_symbol (_tmp203_);
2624
_tmp205_ = _vala_code_node_ref0 (VALA_BLOCK (_tmp204_));
2629
2626
vala_block_remove_local_variable (block, local);
2630
_tmp213_ = vala_code_context_get_analyzer (context);
2631
vala_block_add_local_variable (_tmp213_->insert_block, local);
2627
_tmp206_ = vala_code_context_get_analyzer (context);
2628
vala_block_add_local_variable (_tmp206_->insert_block, local);
2632
2629
vala_code_node_replace_expression (old_parent_node, (ValaExpression*) self, temp_access);
2633
2630
_vala_code_node_unref0 (block);
2634
2631
_vala_code_node_unref0 (temp_access);