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

« back to all changes in this revision

Viewing changes to vapigen/valagidlparser.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:
149
149
}
150
150
 
151
151
 
 
152
/**
 
153
 * Parse all source files in the specified code context and build a
 
154
 * code tree.
 
155
 *
 
156
 * @param context a code context
 
157
 */
152
158
void vala_gidl_parser_parse (ValaGIdlParser* self, ValaCodeContext* context) {
153
159
        ValaMap* _tmp0_;
154
160
        ValaCodeContext* _tmp1_;
590
596
                                        nv = (_tmp7_ = _tmp6_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp6_), _nv_size_ = nv_length1, _tmp7_);
591
597
                                        if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
592
598
                                                char* _tmp8_;
593
 
                                                vala_namespace_set_cheader_filename (ns, _tmp8_ = vala_gidl_parser_eval (self, nv[1]));
 
599
                                                vala_symbol_set_cheader_filename ((ValaSymbol*) ns, _tmp8_ = vala_gidl_parser_eval (self, nv[1]));
594
600
                                                _g_free0 (_tmp8_);
595
601
                                        } else {
596
602
                                                if (_vala_strcmp0 (nv[0], "cprefix") == 0) {
788
794
                                        } else {
789
795
                                                if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
790
796
                                                        char* _tmp6_;
791
 
                                                        vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) cb, _tmp6_ = vala_gidl_parser_eval (self, nv[1]));
 
797
                                                        vala_symbol_add_cheader_filename ((ValaSymbol*) cb, _tmp6_ = vala_gidl_parser_eval (self, nv[1]));
792
798
                                                        _g_free0 (_tmp6_);
793
799
                                                } else {
794
800
                                                        if (_vala_strcmp0 (nv[0], "has_target") == 0) {
998
1004
                                                                                        if ((_tmp42_ = _vala_strcmp0 (_tmp41_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp41_), _tmp42_)) {
999
1005
                                                                                                ValaDataType* _tmp43_;
1000
1006
                                                                                                param_type = (_tmp43_ = (ValaDataType*) vala_array_type_new (param_type, 1, vala_code_node_get_source_reference ((ValaCodeNode*) param_type)), _vala_code_node_unref0 (param_type), _tmp43_);
1001
 
                                                                                                vala_formal_parameter_set_parameter_type (p, param_type);
 
1007
                                                                                                vala_variable_set_variable_type ((ValaVariable*) p, param_type);
1002
1008
                                                                                                if (!out_requested) {
1003
1009
                                                                                                        vala_formal_parameter_set_direction (p, VALA_PARAMETER_DIRECTION_IN);
1004
1010
                                                                                                }
1022
1028
                                                                                                                ValaDataType* _tmp47_;
1023
1029
                                                                                                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (param_type));
1024
1030
                                                                                                                param_type = (_tmp47_ = _vala_code_node_ref0 (vala_array_type_get_element_type (array_type)), _vala_code_node_unref0 (param_type), _tmp47_);
1025
 
                                                                                                                vala_formal_parameter_set_parameter_type (p, param_type);
 
1031
                                                                                                                vala_variable_set_variable_type ((ValaVariable*) p, param_type);
1026
1032
                                                                                                                _vala_code_node_unref0 (array_type);
1027
1033
                                                                                                        }
1028
1034
                                                                                                }
1043
1049
                                                                                                                        ValaDataType* _tmp51_;
1044
1050
                                                                                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (param_type));
1045
1051
                                                                                                                        param_type = (_tmp51_ = _vala_code_node_ref0 (vala_array_type_get_element_type (array_type)), _vala_code_node_unref0 (param_type), _tmp51_);
1046
 
                                                                                                                        vala_formal_parameter_set_parameter_type (p, param_type);
 
1052
                                                                                                                        vala_variable_set_variable_type ((ValaVariable*) p, param_type);
1047
1053
                                                                                                                        _vala_code_node_unref0 (array_type);
1048
1054
                                                                                                                }
1049
1055
                                                                                                        }
1106
1112
                                                                                                                                                        vala_unresolved_type_set_unresolved_symbol (VALA_UNRESOLVED_TYPE (param_type), sym);
1107
1113
                                                                                                                                                } else {
1108
1114
                                                                                                                                                        ValaDataType* _tmp65_;
1109
 
                                                                                                                                                        vala_formal_parameter_set_parameter_type (p, param_type = (_tmp65_ = (ValaDataType*) vala_unresolved_type_new_from_symbol (sym, vala_code_node_get_source_reference ((ValaCodeNode*) return_type)), _vala_code_node_unref0 (param_type), _tmp65_));
 
1115
                                                                                                                                                        vala_variable_set_variable_type ((ValaVariable*) p, param_type = (_tmp65_ = (ValaDataType*) vala_unresolved_type_new_from_symbol (sym, vala_code_node_get_source_reference ((ValaCodeNode*) return_type)), _vala_code_node_unref0 (param_type), _tmp65_));
1110
1116
                                                                                                                                                }
1111
1117
                                                                                                                                                _vala_code_node_unref0 (sym);
1112
1118
                                                                                                                                        }
1248
1254
                                                        nv = (_tmp5_ = _tmp4_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp4_), _nv_size_ = nv_length1, _tmp5_);
1249
1255
                                                        if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
1250
1256
                                                                char* _tmp6_;
1251
 
                                                                vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) st, _tmp6_ = vala_gidl_parser_eval (self, nv[1]));
 
1257
                                                                vala_symbol_add_cheader_filename ((ValaSymbol*) st, _tmp6_ = vala_gidl_parser_eval (self, nv[1]));
1252
1258
                                                                _g_free0 (_tmp6_);
1253
1259
                                                        } else {
1254
1260
                                                                if (_vala_strcmp0 (nv[0], "hidden") == 0) {
1433
1439
                                                        nv = (_tmp34_ = _tmp33_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp33_), _nv_size_ = nv_length1, _tmp34_);
1434
1440
                                                        if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
1435
1441
                                                                char* _tmp35_;
1436
 
                                                                vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) cl, _tmp35_ = vala_gidl_parser_eval (self, nv[1]));
 
1442
                                                                vala_symbol_add_cheader_filename ((ValaSymbol*) cl, _tmp35_ = vala_gidl_parser_eval (self, nv[1]));
1437
1443
                                                                _g_free0 (_tmp35_);
1438
1444
                                                        } else {
1439
1445
                                                                if (_vala_strcmp0 (nv[0], "base_class") == 0) {
1737
1743
                                                        nv = (_tmp5_ = _tmp4_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp4_), _nv_size_ = nv_length1, _tmp5_);
1738
1744
                                                        if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
1739
1745
                                                                char* _tmp6_;
1740
 
                                                                vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) st, _tmp6_ = vala_gidl_parser_eval (self, nv[1]));
 
1746
                                                                vala_symbol_add_cheader_filename ((ValaSymbol*) st, _tmp6_ = vala_gidl_parser_eval (self, nv[1]));
1741
1747
                                                                _g_free0 (_tmp6_);
1742
1748
                                                        } else {
1743
1749
                                                                if (_vala_strcmp0 (nv[0], "deprecated") == 0) {
1855
1861
                                                        nv = (_tmp20_ = _tmp19_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp19_), _nv_size_ = nv_length1, _tmp20_);
1856
1862
                                                        if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
1857
1863
                                                                char* _tmp21_;
1858
 
                                                                vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) cl, _tmp21_ = vala_gidl_parser_eval (self, nv[1]));
 
1864
                                                                vala_symbol_add_cheader_filename ((ValaSymbol*) cl, _tmp21_ = vala_gidl_parser_eval (self, nv[1]));
1859
1865
                                                                _g_free0 (_tmp21_);
1860
1866
                                                        } else {
1861
1867
                                                                if (_vala_strcmp0 (nv[0], "hidden") == 0) {
2049
2055
                                                        nv = (_tmp9_ = _tmp8_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp8_), _nv_size_ = nv_length1, _tmp9_);
2050
2056
                                                        if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
2051
2057
                                                                char* _tmp10_;
2052
 
                                                                vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) st, _tmp10_ = vala_gidl_parser_eval (self, nv[1]));
 
2058
                                                                vala_symbol_add_cheader_filename ((ValaSymbol*) st, _tmp10_ = vala_gidl_parser_eval (self, nv[1]));
2053
2059
                                                                _g_free0 (_tmp10_);
2054
2060
                                                        } else {
2055
2061
                                                                if (_vala_strcmp0 (nv[0], "deprecated") == 0) {
2188
2194
                                                        nv = (_tmp29_ = _tmp28_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp28_), _nv_size_ = nv_length1, _tmp29_);
2189
2195
                                                        if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
2190
2196
                                                                char* _tmp30_;
2191
 
                                                                vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) cl, _tmp30_ = vala_gidl_parser_eval (self, nv[1]));
 
2197
                                                                vala_symbol_add_cheader_filename ((ValaSymbol*) cl, _tmp30_ = vala_gidl_parser_eval (self, nv[1]));
2192
2198
                                                                _g_free0 (_tmp30_);
2193
2199
                                                        } else {
2194
2200
                                                                if (_vala_strcmp0 (nv[0], "base_class") == 0) {
2374
2380
        gboolean existing;
2375
2381
        ValaSymbol* _tmp0_;
2376
2382
        ValaEnum* en;
2377
 
        gboolean _tmp2_ = FALSE;
 
2383
        gboolean _tmp3_ = FALSE;
2378
2384
        char* common_prefix;
2379
2385
        gboolean is_errordomain;
2380
2386
        ValaArrayList* cheader_filenames;
2381
 
        char** _tmp18_;
 
2387
        char** _tmp19_;
2382
2388
        gint _en_attributes_size_;
2383
2389
        gint en_attributes_length1;
2384
 
        gint _tmp17_;
 
2390
        gint _tmp18_;
2385
2391
        char** en_attributes;
2386
2392
        g_return_if_fail (self != NULL);
2387
2393
        g_return_if_fail (en_node != NULL);
2397
2403
                vala_symbol_set_access ((ValaSymbol*) en, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
2398
2404
                existing = FALSE;
2399
2405
        } else {
2400
 
                vala_enum_remove_all_values (en);
 
2406
                ValaEnumValue* dummy;
 
2407
                dummy = VALA_ENUM_VALUE (vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) en), "__DUMMY__"));
 
2408
                if (dummy != NULL) {
 
2409
                        ValaList* _tmp2_;
 
2410
                        vala_collection_remove ((ValaCollection*) (_tmp2_ = vala_enum_get_values (en)), dummy);
 
2411
                        _vala_collection_object_unref0 (_tmp2_);
 
2412
                        vala_scope_remove (vala_symbol_get_scope ((ValaSymbol*) en), "__DUMMY__");
 
2413
                }
 
2414
                _vala_code_node_unref0 (dummy);
2401
2415
        }
2402
2416
        if (en_node->gtype_name != NULL) {
2403
 
                _tmp2_ = _vala_strcmp0 (en_node->gtype_name, "") != 0;
 
2417
                _tmp3_ = _vala_strcmp0 (en_node->gtype_name, "") != 0;
2404
2418
        } else {
2405
 
                _tmp2_ = FALSE;
 
2419
                _tmp3_ = FALSE;
2406
2420
        }
2407
 
        vala_enum_set_has_type_id (en, _tmp2_);
 
2421
        vala_enum_set_has_type_id (en, _tmp3_);
2408
2422
        common_prefix = NULL;
2409
2423
        {
2410
2424
                GList* value_collection;
2414
2428
                        GIdlNode* value;
2415
2429
                        value = (GIdlNode*) value_it->data;
2416
2430
                        {
2417
 
                                char** _tmp4_;
 
2431
                                char** _tmp5_;
2418
2432
                                gint _val_attributes_size_;
2419
2433
                                gint val_attributes_length1;
2420
 
                                gint _tmp3_;
 
2434
                                gint _tmp4_;
2421
2435
                                char** val_attributes;
2422
2436
                                gboolean is_hidden;
2423
 
                                val_attributes = (_tmp4_ = vala_gidl_parser_get_attributes (self, value->name, &_tmp3_), val_attributes_length1 = _tmp3_, _val_attributes_size_ = val_attributes_length1, _tmp4_);
 
2437
                                val_attributes = (_tmp5_ = vala_gidl_parser_get_attributes (self, value->name, &_tmp4_), val_attributes_length1 = _tmp4_, _val_attributes_size_ = val_attributes_length1, _tmp5_);
2424
2438
                                is_hidden = FALSE;
2425
2439
                                if (val_attributes != NULL) {
2426
2440
                                        {
2433
2447
                                                        char* attr;
2434
2448
                                                        attr = g_strdup (attr_collection[attr_it]);
2435
2449
                                                        {
 
2450
                                                                char** _tmp7_;
 
2451
                                                                gint _nv_size_;
 
2452
                                                                gint nv_length1;
2436
2453
                                                                char** _tmp6_;
2437
 
                                                                gint _nv_size_;
2438
 
                                                                gint nv_length1;
2439
 
                                                                char** _tmp5_;
2440
2454
                                                                char** nv;
2441
 
                                                                gboolean _tmp7_ = FALSE;
2442
 
                                                                nv = (_tmp6_ = _tmp5_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp5_), _nv_size_ = nv_length1, _tmp6_);
 
2455
                                                                gboolean _tmp8_ = FALSE;
 
2456
                                                                nv = (_tmp7_ = _tmp6_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp6_), _nv_size_ = nv_length1, _tmp7_);
2443
2457
                                                                if (_vala_strcmp0 (nv[0], "hidden") == 0) {
2444
 
                                                                        char* _tmp8_;
2445
 
                                                                        _tmp7_ = _vala_strcmp0 (_tmp8_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0;
2446
 
                                                                        _g_free0 (_tmp8_);
 
2458
                                                                        char* _tmp9_;
 
2459
                                                                        _tmp8_ = _vala_strcmp0 (_tmp9_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0;
 
2460
                                                                        _g_free0 (_tmp9_);
2447
2461
                                                                } else {
2448
 
                                                                        _tmp7_ = FALSE;
 
2462
                                                                        _tmp8_ = FALSE;
2449
2463
                                                                }
2450
 
                                                                if (_tmp7_) {
 
2464
                                                                if (_tmp8_) {
2451
2465
                                                                        is_hidden = TRUE;
2452
2466
                                                                }
2453
2467
                                                                nv = (_vala_array_free (nv, nv_length1, (GDestroyNotify) g_free), NULL);
2461
2475
                                        continue;
2462
2476
                                }
2463
2477
                                if (common_prefix == NULL) {
2464
 
                                        char* _tmp9_;
2465
 
                                        common_prefix = (_tmp9_ = g_strdup (value->name), _g_free0 (common_prefix), _tmp9_);
 
2478
                                        char* _tmp10_;
 
2479
                                        common_prefix = (_tmp10_ = g_strdup (value->name), _g_free0 (common_prefix), _tmp10_);
2466
2480
                                        while (TRUE) {
2467
 
                                                gboolean _tmp10_ = FALSE;
2468
 
                                                char* _tmp11_;
 
2481
                                                gboolean _tmp11_ = FALSE;
 
2482
                                                char* _tmp12_;
2469
2483
                                                if (g_utf8_strlen (common_prefix, -1) > 0) {
2470
 
                                                        _tmp10_ = !g_str_has_suffix (common_prefix, "_");
 
2484
                                                        _tmp11_ = !g_str_has_suffix (common_prefix, "_");
2471
2485
                                                } else {
2472
 
                                                        _tmp10_ = FALSE;
 
2486
                                                        _tmp11_ = FALSE;
2473
2487
                                                }
2474
 
                                                if (!_tmp10_) {
 
2488
                                                if (!_tmp11_) {
2475
2489
                                                        break;
2476
2490
                                                }
2477
 
                                                common_prefix = (_tmp11_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp11_);
 
2491
                                                common_prefix = (_tmp12_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp12_);
2478
2492
                                        }
2479
2493
                                } else {
2480
2494
                                        while (TRUE) {
2481
 
                                                char* _tmp12_;
 
2495
                                                char* _tmp13_;
2482
2496
                                                if (!(!g_str_has_prefix (value->name, common_prefix))) {
2483
2497
                                                        break;
2484
2498
                                                }
2485
 
                                                common_prefix = (_tmp12_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp12_);
 
2499
                                                common_prefix = (_tmp13_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp13_);
2486
2500
                                        }
2487
2501
                                }
2488
2502
                                while (TRUE) {
2489
 
                                        gboolean _tmp13_ = FALSE;
2490
 
                                        char* _tmp16_;
 
2503
                                        gboolean _tmp14_ = FALSE;
 
2504
                                        char* _tmp17_;
2491
2505
                                        if (g_utf8_strlen (common_prefix, -1) > 0) {
2492
 
                                                gboolean _tmp14_ = FALSE;
 
2506
                                                gboolean _tmp15_ = FALSE;
2493
2507
                                                if (!g_str_has_suffix (common_prefix, "_")) {
2494
 
                                                        _tmp14_ = TRUE;
 
2508
                                                        _tmp15_ = TRUE;
2495
2509
                                                } else {
2496
 
                                                        gboolean _tmp15_ = FALSE;
 
2510
                                                        gboolean _tmp16_ = FALSE;
2497
2511
                                                        if (g_unichar_isdigit (g_utf8_get_char (g_utf8_offset_to_pointer (value->name, string_get_length (common_prefix))))) {
2498
 
                                                                _tmp15_ = (g_utf8_strlen (value->name, -1) - g_utf8_strlen (common_prefix, -1)) <= 1;
 
2512
                                                                _tmp16_ = (g_utf8_strlen (value->name, -1) - g_utf8_strlen (common_prefix, -1)) <= 1;
2499
2513
                                                        } else {
2500
 
                                                                _tmp15_ = FALSE;
 
2514
                                                                _tmp16_ = FALSE;
2501
2515
                                                        }
2502
 
                                                        _tmp14_ = _tmp15_;
 
2516
                                                        _tmp15_ = _tmp16_;
2503
2517
                                                }
2504
 
                                                _tmp13_ = _tmp14_;
 
2518
                                                _tmp14_ = _tmp15_;
2505
2519
                                        } else {
2506
 
                                                _tmp13_ = FALSE;
 
2520
                                                _tmp14_ = FALSE;
2507
2521
                                        }
2508
 
                                        if (!_tmp13_) {
 
2522
                                        if (!_tmp14_) {
2509
2523
                                                break;
2510
2524
                                        }
2511
 
                                        common_prefix = (_tmp16_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp16_);
 
2525
                                        common_prefix = (_tmp17_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp17_);
2512
2526
                                }
2513
2527
                                val_attributes = (_vala_array_free (val_attributes, val_attributes_length1, (GDestroyNotify) g_free), NULL);
2514
2528
                        }
2516
2530
        }
2517
2531
        is_errordomain = FALSE;
2518
2532
        cheader_filenames = vala_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_direct_equal);
2519
 
        en_attributes = (_tmp18_ = vala_gidl_parser_get_attributes (self, node->name, &_tmp17_), en_attributes_length1 = _tmp17_, _en_attributes_size_ = en_attributes_length1, _tmp18_);
 
2533
        en_attributes = (_tmp19_ = vala_gidl_parser_get_attributes (self, node->name, &_tmp18_), en_attributes_length1 = _tmp18_, _en_attributes_size_ = en_attributes_length1, _tmp19_);
2520
2534
        if (en_attributes != NULL) {
2521
2535
                {
2522
2536
                        char** attr_collection;
2528
2542
                                char* attr;
2529
2543
                                attr = g_strdup (attr_collection[attr_it]);
2530
2544
                                {
2531
 
                                        char** _tmp20_;
 
2545
                                        char** _tmp21_;
2532
2546
                                        gint _nv_size_;
2533
2547
                                        gint nv_length1;
2534
 
                                        char** _tmp19_;
 
2548
                                        char** _tmp20_;
2535
2549
                                        char** nv;
2536
 
                                        nv = (_tmp20_ = _tmp19_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp19_), _nv_size_ = nv_length1, _tmp20_);
 
2550
                                        nv = (_tmp21_ = _tmp20_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp20_), _nv_size_ = nv_length1, _tmp21_);
2537
2551
                                        if (_vala_strcmp0 (nv[0], "common_prefix") == 0) {
2538
 
                                                char* _tmp21_;
2539
 
                                                common_prefix = (_tmp21_ = vala_gidl_parser_eval (self, nv[1]), _g_free0 (common_prefix), _tmp21_);
 
2552
                                                char* _tmp22_;
 
2553
                                                common_prefix = (_tmp22_ = vala_gidl_parser_eval (self, nv[1]), _g_free0 (common_prefix), _tmp22_);
2540
2554
                                        } else {
2541
2555
                                                if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
2542
 
                                                        char* _tmp22_;
2543
2556
                                                        char* _tmp23_;
2544
 
                                                        vala_collection_add ((ValaCollection*) cheader_filenames, _tmp22_ = vala_gidl_parser_eval (self, nv[1]));
2545
 
                                                        _g_free0 (_tmp22_);
2546
 
                                                        vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) en, _tmp23_ = vala_gidl_parser_eval (self, nv[1]));
 
2557
                                                        char* _tmp24_;
 
2558
                                                        vala_collection_add ((ValaCollection*) cheader_filenames, _tmp23_ = vala_gidl_parser_eval (self, nv[1]));
2547
2559
                                                        _g_free0 (_tmp23_);
 
2560
                                                        vala_symbol_add_cheader_filename ((ValaSymbol*) en, _tmp24_ = vala_gidl_parser_eval (self, nv[1]));
 
2561
                                                        _g_free0 (_tmp24_);
2548
2562
                                                } else {
2549
2563
                                                        if (_vala_strcmp0 (nv[0], "hidden") == 0) {
2550
 
                                                                char* _tmp24_;
2551
 
                                                                gboolean _tmp25_;
2552
 
                                                                if ((_tmp25_ = _vala_strcmp0 (_tmp24_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp24_), _tmp25_)) {
 
2564
                                                                char* _tmp25_;
 
2565
                                                                gboolean _tmp26_;
 
2566
                                                                if ((_tmp26_ = _vala_strcmp0 (_tmp25_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp25_), _tmp26_)) {
2553
2567
                                                                        nv = (_vala_array_free (nv, nv_length1, (GDestroyNotify) g_free), NULL);
2554
2568
                                                                        _g_free0 (attr);
2555
2569
                                                                        en_attributes = (_vala_array_free (en_attributes, en_attributes_length1, (GDestroyNotify) g_free), NULL);
2561
2575
                                                                }
2562
2576
                                                        } else {
2563
2577
                                                                if (_vala_strcmp0 (nv[0], "deprecated") == 0) {
2564
 
                                                                        char* _tmp26_;
2565
 
                                                                        gboolean _tmp27_;
2566
 
                                                                        if ((_tmp27_ = _vala_strcmp0 (_tmp26_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp26_), _tmp27_)) {
 
2578
                                                                        char* _tmp27_;
 
2579
                                                                        gboolean _tmp28_;
 
2580
                                                                        if ((_tmp28_ = _vala_strcmp0 (_tmp27_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp27_), _tmp28_)) {
2567
2581
                                                                                vala_symbol_set_deprecated ((ValaSymbol*) en, TRUE);
2568
2582
                                                                        }
2569
2583
                                                                } else {
2570
2584
                                                                        if (_vala_strcmp0 (nv[0], "replacement") == 0) {
2571
 
                                                                                char* _tmp28_;
2572
 
                                                                                vala_symbol_set_replacement ((ValaSymbol*) en, _tmp28_ = vala_gidl_parser_eval (self, nv[1]));
2573
 
                                                                                _g_free0 (_tmp28_);
 
2585
                                                                                char* _tmp29_;
 
2586
                                                                                vala_symbol_set_replacement ((ValaSymbol*) en, _tmp29_ = vala_gidl_parser_eval (self, nv[1]));
 
2587
                                                                                _g_free0 (_tmp29_);
2574
2588
                                                                        } else {
2575
2589
                                                                                if (_vala_strcmp0 (nv[0], "deprecated_since") == 0) {
2576
 
                                                                                        char* _tmp29_;
2577
 
                                                                                        vala_symbol_set_deprecated_since ((ValaSymbol*) en, _tmp29_ = vala_gidl_parser_eval (self, nv[1]));
2578
 
                                                                                        _g_free0 (_tmp29_);
 
2590
                                                                                        char* _tmp30_;
 
2591
                                                                                        vala_symbol_set_deprecated_since ((ValaSymbol*) en, _tmp30_ = vala_gidl_parser_eval (self, nv[1]));
 
2592
                                                                                        _g_free0 (_tmp30_);
2579
2593
                                                                                } else {
2580
2594
                                                                                        if (_vala_strcmp0 (nv[0], "rename_to") == 0) {
2581
 
                                                                                                char* _tmp30_;
2582
 
                                                                                                vala_symbol_set_name ((ValaSymbol*) en, _tmp30_ = vala_gidl_parser_eval (self, nv[1]));
2583
 
                                                                                                _g_free0 (_tmp30_);
 
2595
                                                                                                char* _tmp31_;
 
2596
                                                                                                vala_symbol_set_name ((ValaSymbol*) en, _tmp31_ = vala_gidl_parser_eval (self, nv[1]));
 
2597
                                                                                                _g_free0 (_tmp31_);
2584
2598
                                                                                        } else {
2585
2599
                                                                                                if (_vala_strcmp0 (nv[0], "errordomain") == 0) {
2586
 
                                                                                                        char* _tmp31_;
2587
 
                                                                                                        gboolean _tmp32_;
2588
 
                                                                                                        if ((_tmp32_ = _vala_strcmp0 (_tmp31_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp31_), _tmp32_)) {
 
2600
                                                                                                        char* _tmp32_;
 
2601
                                                                                                        gboolean _tmp33_;
 
2602
                                                                                                        if ((_tmp33_ = _vala_strcmp0 (_tmp32_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp32_), _tmp33_)) {
2589
2603
                                                                                                                is_errordomain = TRUE;
2590
2604
                                                                                                        }
2591
2605
                                                                                                } else {
2592
2606
                                                                                                        if (_vala_strcmp0 (nv[0], "to_string") == 0) {
2593
2607
                                                                                                                ValaUnresolvedType* return_type;
2594
 
                                                                                                                ValaUnresolvedSymbol* _tmp33_;
 
2608
                                                                                                                ValaUnresolvedSymbol* _tmp34_;
2595
2609
                                                                                                                ValaMethod* m;
2596
 
                                                                                                                char* _tmp34_;
 
2610
                                                                                                                char* _tmp35_;
2597
2611
                                                                                                                return_type = vala_unresolved_type_new ();
2598
 
                                                                                                                vala_unresolved_type_set_unresolved_symbol (return_type, _tmp33_ = vala_unresolved_symbol_new (NULL, "string", NULL));
2599
 
                                                                                                                _vala_code_node_unref0 (_tmp33_);
 
2612
                                                                                                                vala_unresolved_type_set_unresolved_symbol (return_type, _tmp34_ = vala_unresolved_symbol_new (NULL, "string", NULL));
 
2613
                                                                                                                _vala_code_node_unref0 (_tmp34_);
2600
2614
                                                                                                                vala_data_type_set_value_owned ((ValaDataType*) return_type, FALSE);
2601
2615
                                                                                                                m = vala_method_new ("to_string", (ValaDataType*) return_type, self->priv->current_source_reference, NULL);
2602
2616
                                                                                                                vala_symbol_set_access ((ValaSymbol*) m, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
2603
 
                                                                                                                vala_method_set_cname (m, _tmp34_ = vala_gidl_parser_eval (self, nv[1]));
2604
 
                                                                                                                _g_free0 (_tmp34_);
 
2617
                                                                                                                vala_method_set_cname (m, _tmp35_ = vala_gidl_parser_eval (self, nv[1]));
 
2618
                                                                                                                _g_free0 (_tmp35_);
2605
2619
                                                                                                                vala_enum_add_method (en, m);
2606
2620
                                                                                                                _vala_code_node_unref0 (m);
2607
2621
                                                                                                                _vala_code_node_unref0 (return_type);
2629
2643
                        GIdlNode* value2;
2630
2644
                        value2 = (GIdlNode*) value2_it->data;
2631
2645
                        {
2632
 
                                char** _tmp36_;
 
2646
                                char** _tmp37_;
2633
2647
                                gint _val_attributes_size_;
2634
2648
                                gint val_attributes_length1;
2635
 
                                gint _tmp35_;
 
2649
                                gint _tmp36_;
2636
2650
                                char** val_attributes;
2637
2651
                                gboolean is_hidden;
2638
 
                                val_attributes = (_tmp36_ = vala_gidl_parser_get_attributes (self, value2->name, &_tmp35_), val_attributes_length1 = _tmp35_, _val_attributes_size_ = val_attributes_length1, _tmp36_);
 
2652
                                val_attributes = (_tmp37_ = vala_gidl_parser_get_attributes (self, value2->name, &_tmp36_), val_attributes_length1 = _tmp36_, _val_attributes_size_ = val_attributes_length1, _tmp37_);
2639
2653
                                is_hidden = FALSE;
2640
2654
                                if (val_attributes != NULL) {
2641
2655
                                        {
2648
2662
                                                        char* attr;
2649
2663
                                                        attr = g_strdup (attr_collection[attr_it]);
2650
2664
                                                        {
 
2665
                                                                char** _tmp39_;
 
2666
                                                                gint _nv_size_;
 
2667
                                                                gint nv_length1;
2651
2668
                                                                char** _tmp38_;
2652
 
                                                                gint _nv_size_;
2653
 
                                                                gint nv_length1;
2654
 
                                                                char** _tmp37_;
2655
2669
                                                                char** nv;
2656
 
                                                                gboolean _tmp39_ = FALSE;
2657
 
                                                                nv = (_tmp38_ = _tmp37_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp37_), _nv_size_ = nv_length1, _tmp38_);
 
2670
                                                                gboolean _tmp40_ = FALSE;
 
2671
                                                                nv = (_tmp39_ = _tmp38_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp38_), _nv_size_ = nv_length1, _tmp39_);
2658
2672
                                                                if (_vala_strcmp0 (nv[0], "hidden") == 0) {
2659
 
                                                                        char* _tmp40_;
2660
 
                                                                        _tmp39_ = _vala_strcmp0 (_tmp40_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0;
2661
 
                                                                        _g_free0 (_tmp40_);
 
2673
                                                                        char* _tmp41_;
 
2674
                                                                        _tmp40_ = _vala_strcmp0 (_tmp41_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0;
 
2675
                                                                        _g_free0 (_tmp41_);
2662
2676
                                                                } else {
2663
 
                                                                        _tmp39_ = FALSE;
 
2677
                                                                        _tmp40_ = FALSE;
2664
2678
                                                                }
2665
 
                                                                if (_tmp39_) {
 
2679
                                                                if (_tmp40_) {
2666
2680
                                                                        is_hidden = TRUE;
2667
2681
                                                                }
2668
2682
                                                                nv = (_vala_array_free (nv, nv_length1, (GDestroyNotify) g_free), NULL);
2673
2687
                                }
2674
2688
                                if (!is_hidden) {
2675
2689
                                        ValaEnumValue* ev;
2676
 
                                        ev = vala_enum_value_new (g_utf8_offset_to_pointer (value2->name, g_utf8_strlen (common_prefix, -1)), NULL, NULL);
 
2690
                                        ev = vala_enum_value_new (g_utf8_offset_to_pointer (value2->name, g_utf8_strlen (common_prefix, -1)), NULL, NULL, NULL);
2677
2691
                                        vala_enum_add_value (en, ev);
2678
2692
                                        _vala_code_node_unref0 (ev);
2679
2693
                                }
2695
2709
                                        break;
2696
2710
                                }
2697
2711
                                filename = (char*) vala_iterator_get (_filename_it);
2698
 
                                vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) ed, filename);
 
2712
                                vala_symbol_add_cheader_filename ((ValaSymbol*) ed, filename);
2699
2713
                                _g_free0 (filename);
2700
2714
                        }
2701
2715
                        _vala_collection_object_unref0 (_filename_it);
2702
2716
                }
2703
2717
                {
2704
 
                        ValaList* _tmp41_;
2705
 
                        ValaIterator* _tmp42_;
 
2718
                        ValaList* _tmp42_;
 
2719
                        ValaIterator* _tmp43_;
2706
2720
                        ValaIterator* _ev_it;
2707
 
                        _ev_it = (_tmp42_ = vala_iterable_iterator ((ValaIterable*) (_tmp41_ = vala_enum_get_values (en))), _vala_collection_object_unref0 (_tmp41_), _tmp42_);
 
2721
                        _ev_it = (_tmp43_ = vala_iterable_iterator ((ValaIterable*) (_tmp42_ = vala_enum_get_values (en))), _vala_collection_object_unref0 (_tmp42_), _tmp43_);
2708
2722
                        while (TRUE) {
2709
2723
                                ValaEnumValue* ev;
2710
 
                                ValaErrorCode* _tmp43_;
 
2724
                                ValaErrorCode* _tmp44_;
2711
2725
                                if (!vala_iterator_next (_ev_it)) {
2712
2726
                                        break;
2713
2727
                                }
2714
2728
                                ev = (ValaEnumValue*) vala_iterator_get (_ev_it);
2715
 
                                vala_error_domain_add_code (ed, _tmp43_ = vala_error_code_new (vala_symbol_get_name ((ValaSymbol*) ev), NULL, NULL));
2716
 
                                _vala_code_node_unref0 (_tmp43_);
 
2729
                                vala_error_domain_add_code (ed, _tmp44_ = vala_error_code_new (vala_symbol_get_name ((ValaSymbol*) ev), NULL, NULL));
 
2730
                                _vala_code_node_unref0 (_tmp44_);
2717
2731
                                _vala_code_node_unref0 (ev);
2718
2732
                        }
2719
2733
                        _vala_collection_object_unref0 (_ev_it);
2785
2799
                                                nv = (_tmp5_ = _tmp4_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp4_), _nv_size_ = nv_length1, _tmp5_);
2786
2800
                                                if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
2787
2801
                                                        char* _tmp6_;
2788
 
                                                        vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) cl, _tmp6_ = vala_gidl_parser_eval (self, nv[1]));
 
2802
                                                        vala_symbol_add_cheader_filename ((ValaSymbol*) cl, _tmp6_ = vala_gidl_parser_eval (self, nv[1]));
2789
2803
                                                        _g_free0 (_tmp6_);
2790
2804
                                                } else {
2791
2805
                                                        if (_vala_strcmp0 (nv[0], "base_class") == 0) {
3093
3107
                                                nv = (_tmp5_ = _tmp4_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp4_), _nv_size_ = nv_length1, _tmp5_);
3094
3108
                                                if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
3095
3109
                                                        char* _tmp6_;
3096
 
                                                        vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) iface, _tmp6_ = vala_gidl_parser_eval (self, nv[1]));
 
3110
                                                        vala_symbol_add_cheader_filename ((ValaSymbol*) iface, _tmp6_ = vala_gidl_parser_eval (self, nv[1]));
3097
3111
                                                        _g_free0 (_tmp6_);
3098
3112
                                                } else {
3099
3113
                                                        if (_vala_strcmp0 (nv[0], "lower_case_csuffix") == 0) {
3229
3243
 
3230
3244
 
3231
3245
static void vala_gidl_parser_handle_async_methods (ValaGIdlParser* self, ValaObjectTypeSymbol* type_symbol) {
 
3246
        ValaSet* finish_methods;
3232
3247
        ValaList* methods;
3233
3248
        g_return_if_fail (self != NULL);
3234
3249
        g_return_if_fail (type_symbol != NULL);
 
3250
        finish_methods = (ValaSet*) vala_hash_set_new (VALA_TYPE_METHOD, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_hash, g_direct_equal);
3235
3251
        methods = vala_object_type_symbol_get_methods (type_symbol);
3236
3252
        {
3237
 
                gint method_n;
3238
 
                method_n = 0;
3239
 
                {
3240
 
                        gboolean _tmp0_;
3241
 
                        _tmp0_ = TRUE;
3242
 
                        while (TRUE) {
3243
 
                                ValaMethod* m;
3244
 
                                if (!_tmp0_) {
3245
 
                                        method_n++;
3246
 
                                }
3247
 
                                _tmp0_ = FALSE;
3248
 
                                if (!(method_n < vala_collection_get_size ((ValaCollection*) methods))) {
3249
 
                                        break;
3250
 
                                }
3251
 
                                m = (ValaMethod*) vala_list_get (methods, method_n);
3252
 
                                if (vala_method_get_coroutine (m)) {
3253
 
                                        char* finish_method_base;
3254
 
                                        char* _tmp3_;
3255
 
                                        ValaSymbol* _tmp4_;
3256
 
                                        ValaMethod* _tmp5_;
3257
 
                                        ValaMethod* finish_method;
3258
 
                                        finish_method_base = NULL;
3259
 
                                        if (g_str_has_suffix (vala_symbol_get_name ((ValaSymbol*) m), "_async")) {
3260
 
                                                char* _tmp1_;
3261
 
                                                finish_method_base = (_tmp1_ = string_substring (vala_symbol_get_name ((ValaSymbol*) m), (glong) 0, string_get_length (vala_symbol_get_name ((ValaSymbol*) m)) - string_get_length ("_async")), _g_free0 (finish_method_base), _tmp1_);
3262
 
                                        } else {
3263
 
                                                char* _tmp2_;
3264
 
                                                finish_method_base = (_tmp2_ = g_strdup (vala_symbol_get_name ((ValaSymbol*) m)), _g_free0 (finish_method_base), _tmp2_);
3265
 
                                        }
3266
 
                                        finish_method = (_tmp5_ = (_tmp4_ = vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) type_symbol), _tmp3_ = g_strconcat (finish_method_base, "_finish", NULL)), VALA_IS_METHOD (_tmp4_) ? ((ValaMethod*) _tmp4_) : NULL), _g_free0 (_tmp3_), _tmp5_);
3267
 
                                        if (finish_method == NULL) {
3268
 
                                                char* method_cname;
3269
 
                                                method_cname = vala_method_get_finish_cname (m);
3270
 
                                                {
3271
 
                                                        ValaList* _tmp6_;
3272
 
                                                        ValaIterator* _tmp7_;
3273
 
                                                        ValaIterator* _method_it;
3274
 
                                                        _method_it = (_tmp7_ = vala_iterable_iterator ((ValaIterable*) (_tmp6_ = vala_object_type_symbol_get_methods (type_symbol))), _vala_collection_object_unref0 (_tmp6_), _tmp7_);
3275
 
                                                        while (TRUE) {
3276
 
                                                                ValaMethod* method;
3277
 
                                                                char* _tmp8_;
3278
 
                                                                gboolean _tmp9_;
3279
 
                                                                if (!vala_iterator_next (_method_it)) {
3280
 
                                                                        break;
3281
 
                                                                }
3282
 
                                                                method = (ValaMethod*) vala_iterator_get (_method_it);
3283
 
                                                                if ((_tmp9_ = _vala_strcmp0 (_tmp8_ = vala_method_get_cname (method), method_cname) == 0, _g_free0 (_tmp8_), _tmp9_)) {
3284
 
                                                                        ValaMethod* _tmp10_;
3285
 
                                                                        finish_method = (_tmp10_ = _vala_code_node_ref0 (method), _vala_code_node_unref0 (finish_method), _tmp10_);
3286
 
                                                                        _vala_code_node_unref0 (method);
3287
 
                                                                        break;
3288
 
                                                                }
 
3253
                ValaIterator* _m_it;
 
3254
                _m_it = vala_iterable_iterator ((ValaIterable*) methods);
 
3255
                while (TRUE) {
 
3256
                        ValaMethod* m;
 
3257
                        if (!vala_iterator_next (_m_it)) {
 
3258
                                break;
 
3259
                        }
 
3260
                        m = (ValaMethod*) vala_iterator_get (_m_it);
 
3261
                        if (vala_method_get_coroutine (m)) {
 
3262
                                char* finish_method_base;
 
3263
                                char* _tmp2_;
 
3264
                                ValaSymbol* _tmp3_;
 
3265
                                ValaMethod* _tmp4_;
 
3266
                                ValaMethod* finish_method;
 
3267
                                finish_method_base = NULL;
 
3268
                                if (g_str_has_suffix (vala_symbol_get_name ((ValaSymbol*) m), "_async")) {
 
3269
                                        char* _tmp0_;
 
3270
                                        finish_method_base = (_tmp0_ = string_substring (vala_symbol_get_name ((ValaSymbol*) m), (glong) 0, string_get_length (vala_symbol_get_name ((ValaSymbol*) m)) - string_get_length ("_async")), _g_free0 (finish_method_base), _tmp0_);
 
3271
                                } else {
 
3272
                                        char* _tmp1_;
 
3273
                                        finish_method_base = (_tmp1_ = g_strdup (vala_symbol_get_name ((ValaSymbol*) m)), _g_free0 (finish_method_base), _tmp1_);
 
3274
                                }
 
3275
                                finish_method = (_tmp4_ = (_tmp3_ = vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) type_symbol), _tmp2_ = g_strconcat (finish_method_base, "_finish", NULL)), VALA_IS_METHOD (_tmp3_) ? ((ValaMethod*) _tmp3_) : NULL), _g_free0 (_tmp2_), _tmp4_);
 
3276
                                if (finish_method == NULL) {
 
3277
                                        char* method_cname;
 
3278
                                        method_cname = vala_method_get_finish_cname (m);
 
3279
                                        {
 
3280
                                                ValaList* _tmp5_;
 
3281
                                                ValaIterator* _tmp6_;
 
3282
                                                ValaIterator* _method_it;
 
3283
                                                _method_it = (_tmp6_ = vala_iterable_iterator ((ValaIterable*) (_tmp5_ = vala_object_type_symbol_get_methods (type_symbol))), _vala_collection_object_unref0 (_tmp5_), _tmp6_);
 
3284
                                                while (TRUE) {
 
3285
                                                        ValaMethod* method;
 
3286
                                                        char* _tmp7_;
 
3287
                                                        gboolean _tmp8_;
 
3288
                                                        if (!vala_iterator_next (_method_it)) {
 
3289
                                                                break;
 
3290
                                                        }
 
3291
                                                        method = (ValaMethod*) vala_iterator_get (_method_it);
 
3292
                                                        if ((_tmp8_ = _vala_strcmp0 (_tmp7_ = vala_method_get_cname (method), method_cname) == 0, _g_free0 (_tmp7_), _tmp8_)) {
 
3293
                                                                ValaMethod* _tmp9_;
 
3294
                                                                finish_method = (_tmp9_ = _vala_code_node_ref0 (method), _vala_code_node_unref0 (finish_method), _tmp9_);
3289
3295
                                                                _vala_code_node_unref0 (method);
3290
 
                                                        }
3291
 
                                                        _vala_collection_object_unref0 (_method_it);
3292
 
                                                }
3293
 
                                                _g_free0 (method_cname);
3294
 
                                        }
3295
 
                                        if (finish_method != NULL) {
3296
 
                                                ValaDataType* _tmp11_;
3297
 
                                                vala_method_set_return_type (m, _tmp11_ = vala_data_type_copy (vala_method_get_return_type (finish_method)));
3298
 
                                                _vala_code_node_unref0 (_tmp11_);
3299
 
                                                vala_method_set_no_array_length (m, vala_method_get_no_array_length (finish_method));
3300
 
                                                vala_method_set_array_null_terminated (m, vala_method_get_array_null_terminated (finish_method));
3301
 
                                                {
3302
 
                                                        ValaList* _tmp12_;
3303
 
                                                        ValaIterator* _tmp13_;
3304
 
                                                        ValaIterator* _param_it;
3305
 
                                                        _param_it = (_tmp13_ = vala_iterable_iterator ((ValaIterable*) (_tmp12_ = vala_method_get_parameters (finish_method))), _vala_collection_object_unref0 (_tmp12_), _tmp13_);
3306
 
                                                        while (TRUE) {
3307
 
                                                                ValaFormalParameter* param;
3308
 
                                                                if (!vala_iterator_next (_param_it)) {
3309
 
                                                                        break;
3310
 
                                                                }
3311
 
                                                                param = (ValaFormalParameter*) vala_iterator_get (_param_it);
3312
 
                                                                if (vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_OUT) {
3313
 
                                                                        ValaFormalParameter* async_param;
3314
 
                                                                        ValaSymbol* _tmp14_;
3315
 
                                                                        gboolean _tmp15_;
3316
 
                                                                        async_param = vala_formal_parameter_copy (param);
3317
 
                                                                        if ((_tmp15_ = (_tmp14_ = vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) m), vala_symbol_get_name ((ValaSymbol*) param))) != NULL, _vala_code_node_unref0 (_tmp14_), _tmp15_)) {
3318
 
                                                                                char* _tmp16_;
3319
 
                                                                                vala_symbol_set_name ((ValaSymbol*) async_param, _tmp16_ = g_strconcat (vala_symbol_get_name ((ValaSymbol*) async_param), "_out", NULL));
3320
 
                                                                                _g_free0 (_tmp16_);
3321
 
                                                                        }
3322
 
                                                                        vala_method_add_parameter (m, async_param);
3323
 
                                                                        _vala_code_node_unref0 (async_param);
3324
 
                                                                }
3325
 
                                                                _vala_code_node_unref0 (param);
3326
 
                                                        }
3327
 
                                                        _vala_collection_object_unref0 (_param_it);
3328
 
                                                }
3329
 
                                                {
3330
 
                                                        ValaList* _tmp17_;
3331
 
                                                        ValaIterator* _tmp18_;
3332
 
                                                        ValaIterator* _error_type_it;
3333
 
                                                        _error_type_it = (_tmp18_ = vala_iterable_iterator ((ValaIterable*) (_tmp17_ = vala_code_node_get_error_types ((ValaCodeNode*) finish_method))), _vala_collection_object_unref0 (_tmp17_), _tmp18_);
3334
 
                                                        while (TRUE) {
3335
 
                                                                ValaDataType* error_type;
3336
 
                                                                ValaDataType* _tmp19_;
3337
 
                                                                if (!vala_iterator_next (_error_type_it)) {
3338
 
                                                                        break;
3339
 
                                                                }
3340
 
                                                                error_type = (ValaDataType*) vala_iterator_get (_error_type_it);
3341
 
                                                                vala_code_node_add_error_type ((ValaCodeNode*) m, _tmp19_ = vala_data_type_copy (error_type));
3342
 
                                                                _vala_code_node_unref0 (_tmp19_);
3343
 
                                                                _vala_code_node_unref0 (error_type);
3344
 
                                                        }
3345
 
                                                        _vala_collection_object_unref0 (_error_type_it);
3346
 
                                                }
3347
 
                                                if (vala_list_index_of (methods, finish_method) < method_n) {
3348
 
                                                        method_n--;
3349
 
                                                }
3350
 
                                                vala_scope_remove (vala_symbol_get_scope ((ValaSymbol*) type_symbol), vala_symbol_get_name ((ValaSymbol*) finish_method));
3351
 
                                                vala_collection_remove ((ValaCollection*) methods, finish_method);
3352
 
                                        }
3353
 
                                        _vala_code_node_unref0 (finish_method);
3354
 
                                        _g_free0 (finish_method_base);
3355
 
                                }
3356
 
                                _vala_code_node_unref0 (m);
3357
 
                        }
3358
 
                }
 
3296
                                                                break;
 
3297
                                                        }
 
3298
                                                        _vala_code_node_unref0 (method);
 
3299
                                                }
 
3300
                                                _vala_collection_object_unref0 (_method_it);
 
3301
                                        }
 
3302
                                        _g_free0 (method_cname);
 
3303
                                }
 
3304
                                if (finish_method != NULL) {
 
3305
                                        ValaDataType* _tmp10_;
 
3306
                                        vala_method_set_return_type (m, _tmp10_ = vala_data_type_copy (vala_method_get_return_type (finish_method)));
 
3307
                                        _vala_code_node_unref0 (_tmp10_);
 
3308
                                        vala_method_set_no_array_length (m, vala_method_get_no_array_length (finish_method));
 
3309
                                        vala_method_set_array_null_terminated (m, vala_method_get_array_null_terminated (finish_method));
 
3310
                                        {
 
3311
                                                ValaList* _tmp11_;
 
3312
                                                ValaIterator* _tmp12_;
 
3313
                                                ValaIterator* _param_it;
 
3314
                                                _param_it = (_tmp12_ = vala_iterable_iterator ((ValaIterable*) (_tmp11_ = vala_method_get_parameters (finish_method))), _vala_collection_object_unref0 (_tmp11_), _tmp12_);
 
3315
                                                while (TRUE) {
 
3316
                                                        ValaFormalParameter* param;
 
3317
                                                        if (!vala_iterator_next (_param_it)) {
 
3318
                                                                break;
 
3319
                                                        }
 
3320
                                                        param = (ValaFormalParameter*) vala_iterator_get (_param_it);
 
3321
                                                        if (vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_OUT) {
 
3322
                                                                ValaFormalParameter* async_param;
 
3323
                                                                ValaSymbol* _tmp13_;
 
3324
                                                                gboolean _tmp14_;
 
3325
                                                                async_param = vala_formal_parameter_copy (param);
 
3326
                                                                if ((_tmp14_ = (_tmp13_ = vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) m), vala_symbol_get_name ((ValaSymbol*) param))) != NULL, _vala_code_node_unref0 (_tmp13_), _tmp14_)) {
 
3327
                                                                        char* _tmp15_;
 
3328
                                                                        vala_symbol_set_name ((ValaSymbol*) async_param, _tmp15_ = g_strconcat (vala_symbol_get_name ((ValaSymbol*) async_param), "_out", NULL));
 
3329
                                                                        _g_free0 (_tmp15_);
 
3330
                                                                }
 
3331
                                                                vala_method_add_parameter (m, async_param);
 
3332
                                                                _vala_code_node_unref0 (async_param);
 
3333
                                                        }
 
3334
                                                        _vala_code_node_unref0 (param);
 
3335
                                                }
 
3336
                                                _vala_collection_object_unref0 (_param_it);
 
3337
                                        }
 
3338
                                        {
 
3339
                                                ValaList* _tmp16_;
 
3340
                                                ValaIterator* _tmp17_;
 
3341
                                                ValaIterator* _error_type_it;
 
3342
                                                _error_type_it = (_tmp17_ = vala_iterable_iterator ((ValaIterable*) (_tmp16_ = vala_code_node_get_error_types ((ValaCodeNode*) finish_method))), _vala_collection_object_unref0 (_tmp16_), _tmp17_);
 
3343
                                                while (TRUE) {
 
3344
                                                        ValaDataType* error_type;
 
3345
                                                        ValaDataType* _tmp18_;
 
3346
                                                        if (!vala_iterator_next (_error_type_it)) {
 
3347
                                                                break;
 
3348
                                                        }
 
3349
                                                        error_type = (ValaDataType*) vala_iterator_get (_error_type_it);
 
3350
                                                        vala_code_node_add_error_type ((ValaCodeNode*) m, _tmp18_ = vala_data_type_copy (error_type));
 
3351
                                                        _vala_code_node_unref0 (_tmp18_);
 
3352
                                                        _vala_code_node_unref0 (error_type);
 
3353
                                                }
 
3354
                                                _vala_collection_object_unref0 (_error_type_it);
 
3355
                                        }
 
3356
                                        vala_collection_add ((ValaCollection*) finish_methods, finish_method);
 
3357
                                }
 
3358
                                _vala_code_node_unref0 (finish_method);
 
3359
                                _g_free0 (finish_method_base);
 
3360
                        }
 
3361
                        _vala_code_node_unref0 (m);
 
3362
                }
 
3363
                _vala_collection_object_unref0 (_m_it);
 
3364
        }
 
3365
        {
 
3366
                ValaIterator* _m_it;
 
3367
                _m_it = vala_iterable_iterator ((ValaIterable*) finish_methods);
 
3368
                while (TRUE) {
 
3369
                        ValaMethod* m;
 
3370
                        if (!vala_iterator_next (_m_it)) {
 
3371
                                break;
 
3372
                        }
 
3373
                        m = (ValaMethod*) vala_iterator_get (_m_it);
 
3374
                        vala_scope_remove (vala_symbol_get_scope ((ValaSymbol*) type_symbol), vala_symbol_get_name ((ValaSymbol*) m));
 
3375
                        vala_collection_remove ((ValaCollection*) methods, m);
 
3376
                        _vala_code_node_unref0 (m);
 
3377
                }
 
3378
                _vala_collection_object_unref0 (_m_it);
3359
3379
        }
3360
3380
        _vala_collection_object_unref0 (methods);
 
3381
        _vala_collection_object_unref0 (finish_methods);
3361
3382
}
3362
3383
 
3363
3384
 
4029
4050
        gboolean first;
4030
4051
        ValaFormalParameter* last_param;
4031
4052
        ValaDataType* last_param_type;
4032
 
        gboolean _tmp145_ = FALSE;
 
4053
        gboolean _tmp146_ = FALSE;
4033
4054
        g_return_val_if_fail (self != NULL, NULL);
4034
4055
        g_return_val_if_fail (name != NULL, NULL);
4035
4056
        g_return_val_if_fail (symbol != NULL, NULL);
4238
4259
                                                                                                                                        vala_method_set_array_null_terminated (m, TRUE);
4239
4260
                                                                                                                                }
4240
4261
                                                                                                                        } else {
4241
 
                                                                                                                                if (_vala_strcmp0 (nv[0], "type_name") == 0) {
 
4262
                                                                                                                                if (_vala_strcmp0 (nv[0], "array_length_type") == 0) {
4242
4263
                                                                                                                                        char* _tmp43_;
4243
 
                                                                                                                                        ValaUnresolvedSymbol* _tmp44_;
4244
 
                                                                                                                                        ValaUnresolvedSymbol* sym;
4245
 
                                                                                                                                        sym = (_tmp44_ = vala_unresolved_symbol_new (NULL, _tmp43_ = vala_gidl_parser_eval (self, nv[1]), NULL), _g_free0 (_tmp43_), _tmp44_);
4246
 
                                                                                                                                        if (VALA_IS_UNRESOLVED_TYPE (return_type)) {
4247
 
                                                                                                                                                vala_unresolved_type_set_unresolved_symbol (VALA_UNRESOLVED_TYPE (return_type), sym);
4248
 
                                                                                                                                        } else {
4249
 
                                                                                                                                                ValaDataType* _tmp45_;
4250
 
                                                                                                                                                vala_method_set_return_type (m, return_type = (_tmp45_ = (ValaDataType*) vala_unresolved_type_new_from_symbol (sym, vala_code_node_get_source_reference ((ValaCodeNode*) return_type)), _vala_code_node_unref0 (return_type), _tmp45_));
4251
 
                                                                                                                                        }
4252
 
                                                                                                                                        _vala_code_node_unref0 (sym);
 
4264
                                                                                                                                        vala_method_set_array_length_type (m, _tmp43_ = vala_gidl_parser_eval (self, nv[1]));
 
4265
                                                                                                                                        _g_free0 (_tmp43_);
4253
4266
                                                                                                                                } else {
4254
 
                                                                                                                                        if (_vala_strcmp0 (nv[0], "type_arguments") == 0) {
4255
 
                                                                                                                                                char** _tmp49_;
4256
 
                                                                                                                                                gint _type_args_size_;
4257
 
                                                                                                                                                gint type_args_length1;
4258
 
                                                                                                                                                char** _tmp47_;
4259
 
                                                                                                                                                char* _tmp46_;
4260
 
                                                                                                                                                char** _tmp48_;
4261
 
                                                                                                                                                char** type_args;
4262
 
                                                                                                                                                type_args = (_tmp49_ = (_tmp48_ = _tmp47_ = g_strsplit (_tmp46_ = vala_gidl_parser_eval (self, nv[1]), ",", 0), _g_free0 (_tmp46_), _tmp48_), type_args_length1 = _vala_array_length (_tmp47_), _type_args_size_ = type_args_length1, _tmp49_);
4263
 
                                                                                                                                                {
4264
 
                                                                                                                                                        char** type_arg_collection;
4265
 
                                                                                                                                                        int type_arg_collection_length1;
4266
 
                                                                                                                                                        int type_arg_it;
4267
 
                                                                                                                                                        type_arg_collection = type_args;
4268
 
                                                                                                                                                        type_arg_collection_length1 = type_args_length1;
4269
 
                                                                                                                                                        for (type_arg_it = 0; type_arg_it < type_args_length1; type_arg_it = type_arg_it + 1) {
4270
 
                                                                                                                                                                char* type_arg;
4271
 
                                                                                                                                                                type_arg = g_strdup (type_arg_collection[type_arg_it]);
4272
 
                                                                                                                                                                {
4273
 
                                                                                                                                                                        ValaDataType* _tmp50_;
4274
 
                                                                                                                                                                        vala_data_type_add_type_argument (return_type, _tmp50_ = vala_gidl_parser_get_type_from_string (self, type_arg));
4275
 
                                                                                                                                                                        _vala_code_node_unref0 (_tmp50_);
4276
 
                                                                                                                                                                        _g_free0 (type_arg);
4277
 
                                                                                                                                                                }
4278
 
                                                                                                                                                        }
 
4267
                                                                                                                                        if (_vala_strcmp0 (nv[0], "type_name") == 0) {
 
4268
                                                                                                                                                char* _tmp44_;
 
4269
                                                                                                                                                ValaUnresolvedSymbol* _tmp45_;
 
4270
                                                                                                                                                ValaUnresolvedSymbol* sym;
 
4271
                                                                                                                                                sym = (_tmp45_ = vala_unresolved_symbol_new (NULL, _tmp44_ = vala_gidl_parser_eval (self, nv[1]), NULL), _g_free0 (_tmp44_), _tmp45_);
 
4272
                                                                                                                                                if (VALA_IS_UNRESOLVED_TYPE (return_type)) {
 
4273
                                                                                                                                                        vala_unresolved_type_set_unresolved_symbol (VALA_UNRESOLVED_TYPE (return_type), sym);
 
4274
                                                                                                                                                } else {
 
4275
                                                                                                                                                        ValaDataType* _tmp46_;
 
4276
                                                                                                                                                        vala_method_set_return_type (m, return_type = (_tmp46_ = (ValaDataType*) vala_unresolved_type_new_from_symbol (sym, vala_code_node_get_source_reference ((ValaCodeNode*) return_type)), _vala_code_node_unref0 (return_type), _tmp46_));
4279
4277
                                                                                                                                                }
4280
 
                                                                                                                                                type_args = (_vala_array_free (type_args, type_args_length1, (GDestroyNotify) g_free), NULL);
 
4278
                                                                                                                                                _vala_code_node_unref0 (sym);
4281
4279
                                                                                                                                        } else {
4282
 
                                                                                                                                                if (_vala_strcmp0 (nv[0], "deprecated") == 0) {
4283
 
                                                                                                                                                        char* _tmp51_;
4284
 
                                                                                                                                                        gboolean _tmp52_;
4285
 
                                                                                                                                                        if ((_tmp52_ = _vala_strcmp0 (_tmp51_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp51_), _tmp52_)) {
4286
 
                                                                                                                                                                vala_symbol_set_deprecated ((ValaSymbol*) m, TRUE);
 
4280
                                                                                                                                                if (_vala_strcmp0 (nv[0], "type_arguments") == 0) {
 
4281
                                                                                                                                                        char** _tmp50_;
 
4282
                                                                                                                                                        gint _type_args_size_;
 
4283
                                                                                                                                                        gint type_args_length1;
 
4284
                                                                                                                                                        char** _tmp48_;
 
4285
                                                                                                                                                        char* _tmp47_;
 
4286
                                                                                                                                                        char** _tmp49_;
 
4287
                                                                                                                                                        char** type_args;
 
4288
                                                                                                                                                        type_args = (_tmp50_ = (_tmp49_ = _tmp48_ = g_strsplit (_tmp47_ = vala_gidl_parser_eval (self, nv[1]), ",", 0), _g_free0 (_tmp47_), _tmp49_), type_args_length1 = _vala_array_length (_tmp48_), _type_args_size_ = type_args_length1, _tmp50_);
 
4289
                                                                                                                                                        {
 
4290
                                                                                                                                                                char** type_arg_collection;
 
4291
                                                                                                                                                                int type_arg_collection_length1;
 
4292
                                                                                                                                                                int type_arg_it;
 
4293
                                                                                                                                                                type_arg_collection = type_args;
 
4294
                                                                                                                                                                type_arg_collection_length1 = type_args_length1;
 
4295
                                                                                                                                                                for (type_arg_it = 0; type_arg_it < type_args_length1; type_arg_it = type_arg_it + 1) {
 
4296
                                                                                                                                                                        char* type_arg;
 
4297
                                                                                                                                                                        type_arg = g_strdup (type_arg_collection[type_arg_it]);
 
4298
                                                                                                                                                                        {
 
4299
                                                                                                                                                                                ValaDataType* _tmp51_;
 
4300
                                                                                                                                                                                vala_data_type_add_type_argument (return_type, _tmp51_ = vala_gidl_parser_get_type_from_string (self, type_arg));
 
4301
                                                                                                                                                                                _vala_code_node_unref0 (_tmp51_);
 
4302
                                                                                                                                                                                _g_free0 (type_arg);
 
4303
                                                                                                                                                                        }
 
4304
                                                                                                                                                                }
4287
4305
                                                                                                                                                        }
 
4306
                                                                                                                                                        type_args = (_vala_array_free (type_args, type_args_length1, (GDestroyNotify) g_free), NULL);
4288
4307
                                                                                                                                                } else {
4289
 
                                                                                                                                                        if (_vala_strcmp0 (nv[0], "replacement") == 0) {
4290
 
                                                                                                                                                                char* _tmp53_;
4291
 
                                                                                                                                                                vala_symbol_set_replacement ((ValaSymbol*) m, _tmp53_ = vala_gidl_parser_eval (self, nv[1]));
4292
 
                                                                                                                                                                _g_free0 (_tmp53_);
 
4308
                                                                                                                                                        if (_vala_strcmp0 (nv[0], "deprecated") == 0) {
 
4309
                                                                                                                                                                char* _tmp52_;
 
4310
                                                                                                                                                                gboolean _tmp53_;
 
4311
                                                                                                                                                                if ((_tmp53_ = _vala_strcmp0 (_tmp52_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp52_), _tmp53_)) {
 
4312
                                                                                                                                                                        vala_symbol_set_deprecated ((ValaSymbol*) m, TRUE);
 
4313
                                                                                                                                                                }
4293
4314
                                                                                                                                                        } else {
4294
 
                                                                                                                                                                if (_vala_strcmp0 (nv[0], "deprecated_since") == 0) {
 
4315
                                                                                                                                                                if (_vala_strcmp0 (nv[0], "replacement") == 0) {
4295
4316
                                                                                                                                                                        char* _tmp54_;
4296
 
                                                                                                                                                                        vala_symbol_set_deprecated_since ((ValaSymbol*) m, _tmp54_ = vala_gidl_parser_eval (self, nv[1]));
 
4317
                                                                                                                                                                        vala_symbol_set_replacement ((ValaSymbol*) m, _tmp54_ = vala_gidl_parser_eval (self, nv[1]));
4297
4318
                                                                                                                                                                        _g_free0 (_tmp54_);
4298
4319
                                                                                                                                                                } else {
4299
 
                                                                                                                                                                        if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
 
4320
                                                                                                                                                                        if (_vala_strcmp0 (nv[0], "deprecated_since") == 0) {
4300
4321
                                                                                                                                                                                char* _tmp55_;
4301
 
                                                                                                                                                                                vala_member_add_cheader_filename ((ValaMember*) m, _tmp55_ = vala_gidl_parser_eval (self, nv[1]));
 
4322
                                                                                                                                                                                vala_symbol_set_deprecated_since ((ValaSymbol*) m, _tmp55_ = vala_gidl_parser_eval (self, nv[1]));
4302
4323
                                                                                                                                                                                _g_free0 (_tmp55_);
4303
4324
                                                                                                                                                                        } else {
4304
 
                                                                                                                                                                                if (_vala_strcmp0 (nv[0], "abstract") == 0) {
 
4325
                                                                                                                                                                                if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
4305
4326
                                                                                                                                                                                        char* _tmp56_;
4306
 
                                                                                                                                                                                        gboolean _tmp57_;
4307
 
                                                                                                                                                                                        if ((_tmp57_ = _vala_strcmp0 (_tmp56_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp56_), _tmp57_)) {
4308
 
                                                                                                                                                                                                vala_method_set_is_abstract (m, TRUE);
4309
 
                                                                                                                                                                                        }
 
4327
                                                                                                                                                                                        vala_symbol_add_cheader_filename ((ValaSymbol*) m, _tmp56_ = vala_gidl_parser_eval (self, nv[1]));
 
4328
                                                                                                                                                                                        _g_free0 (_tmp56_);
4310
4329
                                                                                                                                                                                } else {
4311
 
                                                                                                                                                                                        if (_vala_strcmp0 (nv[0], "virtual") == 0) {
4312
 
                                                                                                                                                                                                char* _tmp58_;
4313
 
                                                                                                                                                                                                gboolean _tmp59_;
4314
 
                                                                                                                                                                                                if ((_tmp59_ = _vala_strcmp0 (_tmp58_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp58_), _tmp59_)) {
4315
 
                                                                                                                                                                                                        vala_method_set_is_virtual (m, TRUE);
 
4330
                                                                                                                                                                                        if (_vala_strcmp0 (nv[0], "abstract") == 0) {
 
4331
                                                                                                                                                                                                char* _tmp57_;
 
4332
                                                                                                                                                                                                gboolean _tmp58_;
 
4333
                                                                                                                                                                                                if ((_tmp58_ = _vala_strcmp0 (_tmp57_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp57_), _tmp58_)) {
 
4334
                                                                                                                                                                                                        vala_method_set_is_abstract (m, TRUE);
4316
4335
                                                                                                                                                                                                }
4317
4336
                                                                                                                                                                                        } else {
4318
 
                                                                                                                                                                                                if (_vala_strcmp0 (nv[0], "vfunc_name") == 0) {
4319
 
                                                                                                                                                                                                        char* _tmp60_;
4320
 
                                                                                                                                                                                                        vala_method_set_vfunc_name (m, _tmp60_ = vala_gidl_parser_eval (self, nv[1]));
4321
 
                                                                                                                                                                                                        _g_free0 (_tmp60_);
 
4337
                                                                                                                                                                                                if (_vala_strcmp0 (nv[0], "virtual") == 0) {
 
4338
                                                                                                                                                                                                        char* _tmp59_;
 
4339
                                                                                                                                                                                                        gboolean _tmp60_;
 
4340
                                                                                                                                                                                                        if ((_tmp60_ = _vala_strcmp0 (_tmp59_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp59_), _tmp60_)) {
 
4341
                                                                                                                                                                                                                vala_method_set_is_virtual (m, TRUE);
 
4342
                                                                                                                                                                                                        }
4322
4343
                                                                                                                                                                                                } else {
4323
 
                                                                                                                                                                                                        if (_vala_strcmp0 (nv[0], "finish_name") == 0) {
 
4344
                                                                                                                                                                                                        if (_vala_strcmp0 (nv[0], "vfunc_name") == 0) {
4324
4345
                                                                                                                                                                                                                char* _tmp61_;
4325
 
                                                                                                                                                                                                                vala_method_set_finish_cname (m, _tmp61_ = vala_gidl_parser_eval (self, nv[1]));
 
4346
                                                                                                                                                                                                                vala_method_set_vfunc_name (m, _tmp61_ = vala_gidl_parser_eval (self, nv[1]));
4326
4347
                                                                                                                                                                                                                _g_free0 (_tmp61_);
4327
4348
                                                                                                                                                                                                        } else {
4328
 
                                                                                                                                                                                                                if (_vala_strcmp0 (nv[0], "async") == 0) {
 
4349
                                                                                                                                                                                                                if (_vala_strcmp0 (nv[0], "finish_name") == 0) {
4329
4350
                                                                                                                                                                                                                        char* _tmp62_;
4330
 
                                                                                                                                                                                                                        gboolean _tmp63_;
4331
 
                                                                                                                                                                                                                        if ((_tmp63_ = _vala_strcmp0 (_tmp62_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp62_), _tmp63_)) {
4332
 
                                                                                                                                                                                                                                vala_method_set_coroutine (m, TRUE);
 
4351
                                                                                                                                                                                                                        vala_method_set_finish_cname (m, _tmp62_ = vala_gidl_parser_eval (self, nv[1]));
 
4352
                                                                                                                                                                                                                        _g_free0 (_tmp62_);
 
4353
                                                                                                                                                                                                                } else {
 
4354
                                                                                                                                                                                                                        if (_vala_strcmp0 (nv[0], "async") == 0) {
 
4355
                                                                                                                                                                                                                                char* _tmp63_;
 
4356
                                                                                                                                                                                                                                gboolean _tmp64_;
 
4357
                                                                                                                                                                                                                                if ((_tmp64_ = _vala_strcmp0 (_tmp63_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp63_), _tmp64_)) {
 
4358
                                                                                                                                                                                                                                        vala_method_set_coroutine (m, TRUE);
 
4359
                                                                                                                                                                                                                                }
4333
4360
                                                                                                                                                                                                                        }
4334
4361
                                                                                                                                                                                                                }
4335
4362
                                                                                                                                                                                                        }
4372
4399
                        param = (GIdlNodeParam*) param_it->data;
4373
4400
                        {
4374
4401
                                GIdlNode* param_node;
4375
 
                                gboolean _tmp76_ = FALSE;
4376
 
                                gboolean _tmp78_ = FALSE;
 
4402
                                gboolean _tmp77_ = FALSE;
 
4403
                                gboolean _tmp79_ = FALSE;
4377
4404
                                char* param_name;
4378
4405
                                ValaParameterDirection direction = 0;
4379
4406
                                ValaDataType* param_type;
4386
4413
                                double delegate_target_pos;
4387
4414
                                gboolean array_requested;
4388
4415
                                gboolean out_requested;
4389
 
                                char** _tmp84_;
4390
 
                                gint _tmp83_;
4391
 
                                char* _tmp82_;
4392
 
                                gboolean _tmp138_ = FALSE;
4393
 
                                gboolean _tmp142_ = FALSE;
4394
 
                                ValaFormalParameter* _tmp143_;
4395
 
                                ValaDataType* _tmp144_;
 
4416
                                char** _tmp85_;
 
4417
                                gint _tmp84_;
 
4418
                                char* _tmp83_;
 
4419
                                gboolean _tmp139_ = FALSE;
 
4420
                                gboolean _tmp143_ = FALSE;
 
4421
                                ValaFormalParameter* _tmp144_;
 
4422
                                ValaDataType* _tmp145_;
4396
4423
                                param_node = (GIdlNode*) param;
4397
4424
                                if (first) {
4398
 
                                        gboolean _tmp64_ = FALSE;
4399
4425
                                        gboolean _tmp65_ = FALSE;
4400
4426
                                        gboolean _tmp66_ = FALSE;
 
4427
                                        gboolean _tmp67_ = FALSE;
4401
4428
                                        first = FALSE;
4402
4429
                                        if (!VALA_IS_CREATION_METHOD (m)) {
4403
 
                                                _tmp66_ = self->priv->current_data_type != NULL;
 
4430
                                                _tmp67_ = self->priv->current_data_type != NULL;
 
4431
                                        } else {
 
4432
                                                _tmp67_ = FALSE;
 
4433
                                        }
 
4434
                                        if (_tmp67_) {
 
4435
                                                _tmp66_ = param->type->is_interface;
4404
4436
                                        } else {
4405
4437
                                                _tmp66_ = FALSE;
4406
4438
                                        }
4407
4439
                                        if (_tmp66_) {
4408
 
                                                _tmp65_ = param->type->is_interface;
 
4440
                                                gboolean _tmp68_ = FALSE;
 
4441
                                                if (_vala_strcmp0 (param_node->name, "self") == 0) {
 
4442
                                                        _tmp68_ = TRUE;
 
4443
                                                } else {
 
4444
                                                        char* _tmp69_;
 
4445
                                                        _tmp68_ = g_str_has_suffix (param->type->interface, _tmp69_ = vala_typesymbol_get_cname (self->priv->current_data_type, FALSE));
 
4446
                                                        _g_free0 (_tmp69_);
 
4447
                                                }
 
4448
                                                _tmp65_ = _tmp68_;
4409
4449
                                        } else {
4410
4450
                                                _tmp65_ = FALSE;
4411
4451
                                        }
4412
4452
                                        if (_tmp65_) {
4413
 
                                                gboolean _tmp67_ = FALSE;
4414
 
                                                if (_vala_strcmp0 (param_node->name, "self") == 0) {
4415
 
                                                        _tmp67_ = TRUE;
4416
 
                                                } else {
4417
 
                                                        char* _tmp68_;
4418
 
                                                        _tmp67_ = g_str_has_suffix (param->type->interface, _tmp68_ = vala_typesymbol_get_cname (self->priv->current_data_type, FALSE));
4419
 
                                                        _g_free0 (_tmp68_);
4420
 
                                                }
4421
 
                                                _tmp64_ = _tmp67_;
4422
 
                                        } else {
4423
 
                                                _tmp64_ = FALSE;
4424
 
                                        }
4425
 
                                        if (_tmp64_) {
4426
4453
                                                continue;
4427
4454
                                        } else {
4428
 
                                                gboolean _tmp69_ = FALSE;
4429
4455
                                                gboolean _tmp70_ = FALSE;
4430
4456
                                                gboolean _tmp71_ = FALSE;
 
4457
                                                gboolean _tmp72_ = FALSE;
4431
4458
                                                if (!VALA_IS_CREATION_METHOD (m)) {
4432
 
                                                        _tmp71_ = self->priv->current_data_type != NULL;
 
4459
                                                        _tmp72_ = self->priv->current_data_type != NULL;
 
4460
                                                } else {
 
4461
                                                        _tmp72_ = FALSE;
 
4462
                                                }
 
4463
                                                if (_tmp72_) {
 
4464
                                                        _tmp71_ = param->type->is_interface;
4433
4465
                                                } else {
4434
4466
                                                        _tmp71_ = FALSE;
4435
4467
                                                }
4436
4468
                                                if (_tmp71_) {
4437
 
                                                        _tmp70_ = param->type->is_interface;
4438
 
                                                } else {
4439
 
                                                        _tmp70_ = FALSE;
4440
 
                                                }
4441
 
                                                if (_tmp70_) {
4442
 
                                                        gboolean _tmp72_ = FALSE;
 
4469
                                                        gboolean _tmp73_ = FALSE;
4443
4470
                                                        if (_vala_strcmp0 (param_node->name, "klass") == 0) {
4444
 
                                                                _tmp72_ = TRUE;
 
4471
                                                                _tmp73_ = TRUE;
4445
4472
                                                        } else {
 
4473
                                                                char* _tmp75_;
4446
4474
                                                                char* _tmp74_;
4447
 
                                                                char* _tmp73_;
4448
 
                                                                _tmp72_ = g_str_has_suffix (param->type->interface, _tmp74_ = g_strdup_printf ("%sClass", _tmp73_ = vala_typesymbol_get_cname (self->priv->current_data_type, FALSE)));
 
4475
                                                                _tmp73_ = g_str_has_suffix (param->type->interface, _tmp75_ = g_strdup_printf ("%sClass", _tmp74_ = vala_typesymbol_get_cname (self->priv->current_data_type, FALSE)));
 
4476
                                                                _g_free0 (_tmp75_);
4449
4477
                                                                _g_free0 (_tmp74_);
4450
 
                                                                _g_free0 (_tmp73_);
4451
4478
                                                        }
4452
 
                                                        _tmp69_ = _tmp72_;
 
4479
                                                        _tmp70_ = _tmp73_;
4453
4480
                                                } else {
4454
 
                                                        _tmp69_ = FALSE;
 
4481
                                                        _tmp70_ = FALSE;
4455
4482
                                                }
4456
 
                                                if (_tmp69_) {
 
4483
                                                if (_tmp70_) {
4457
4484
                                                        vala_method_set_binding (m, MEMBER_BINDING_CLASS);
4458
4485
                                                        if (g_str_has_prefix (vala_symbol_get_name ((ValaSymbol*) m), "class_")) {
4459
 
                                                                char* _tmp75_;
4460
 
                                                                vala_symbol_set_name ((ValaSymbol*) m, _tmp75_ = string_substring (vala_symbol_get_name ((ValaSymbol*) m), g_utf8_strlen ("class_", -1), g_utf8_strlen (vala_symbol_get_name ((ValaSymbol*) m), -1) - g_utf8_strlen ("class_", -1)));
4461
 
                                                                _g_free0 (_tmp75_);
 
4486
                                                                char* _tmp76_;
 
4487
                                                                vala_symbol_set_name ((ValaSymbol*) m, _tmp76_ = string_substring (vala_symbol_get_name ((ValaSymbol*) m), g_utf8_strlen ("class_", -1), g_utf8_strlen (vala_symbol_get_name ((ValaSymbol*) m), -1) - g_utf8_strlen ("class_", -1)));
 
4488
                                                                _g_free0 (_tmp76_);
4462
4489
                                                        }
4463
4490
                                                        continue;
4464
4491
                                                } else {
4467
4494
                                        }
4468
4495
                                }
4469
4496
                                if (_vala_strcmp0 (param->type->interface, "GAsyncReadyCallback") == 0) {
4470
 
                                        gboolean _tmp77_ = FALSE;
 
4497
                                        gboolean _tmp78_ = FALSE;
4471
4498
                                        if (g_str_has_suffix (symbol, "_async")) {
4472
 
                                                _tmp77_ = TRUE;
 
4499
                                                _tmp78_ = TRUE;
4473
4500
                                        } else {
4474
 
                                                _tmp77_ = vala_method_get_coroutine (m);
 
4501
                                                _tmp78_ = vala_method_get_coroutine (m);
4475
4502
                                        }
4476
 
                                        _tmp76_ = _tmp77_;
 
4503
                                        _tmp77_ = _tmp78_;
4477
4504
                                } else {
4478
 
                                        _tmp76_ = FALSE;
 
4505
                                        _tmp77_ = FALSE;
4479
4506
                                }
4480
 
                                if (_tmp76_) {
 
4507
                                if (_tmp77_) {
4481
4508
                                        vala_method_set_coroutine (m, TRUE);
4482
4509
                                        continue;
4483
4510
                                }
4484
4511
                                if (suppress_throws == FALSE) {
4485
 
                                        _tmp78_ = vala_gidl_parser_param_is_exception (self, param);
 
4512
                                        _tmp79_ = vala_gidl_parser_param_is_exception (self, param);
4486
4513
                                } else {
4487
 
                                        _tmp78_ = FALSE;
 
4514
                                        _tmp79_ = FALSE;
4488
4515
                                }
4489
 
                                if (_tmp78_) {
4490
 
                                        ValaDataType* _tmp79_;
4491
 
                                        vala_code_node_add_error_type ((ValaCodeNode*) m, _tmp79_ = vala_gidl_parser_parse_type (self, param->type, NULL));
4492
 
                                        _vala_code_node_unref0 (_tmp79_);
 
4516
                                if (_tmp79_) {
 
4517
                                        ValaDataType* _tmp80_;
 
4518
                                        vala_code_node_add_error_type ((ValaCodeNode*) m, _tmp80_ = vala_gidl_parser_parse_type (self, param->type, NULL));
 
4519
                                        _vala_code_node_unref0 (_tmp80_);
4493
4520
                                        continue;
4494
4521
                                }
4495
4522
                                param_name = g_strdup (param_node->name);
4496
4523
                                if (_vala_strcmp0 (param_name, "result") == 0) {
4497
 
                                        char* _tmp80_;
4498
 
                                        param_name = (_tmp80_ = g_strdup ("_result"), _g_free0 (param_name), _tmp80_);
 
4524
                                        char* _tmp81_;
 
4525
                                        param_name = (_tmp81_ = g_strdup ("_result"), _g_free0 (param_name), _tmp81_);
4499
4526
                                } else {
4500
4527
                                        if (_vala_strcmp0 (param_name, "string") == 0) {
4501
 
                                                char* _tmp81_;
4502
 
                                                param_name = (_tmp81_ = g_strdup ("str"), _g_free0 (param_name), _tmp81_);
 
4528
                                                char* _tmp82_;
 
4529
                                                param_name = (_tmp82_ = g_strdup ("str"), _g_free0 (param_name), _tmp82_);
4503
4530
                                        }
4504
4531
                                }
4505
4532
                                param_type = vala_gidl_parser_parse_param (self, param, &direction);
4513
4540
                                delegate_target_pos = (double) 0;
4514
4541
                                array_requested = FALSE;
4515
4542
                                out_requested = FALSE;
4516
 
                                attributes = (_tmp84_ = vala_gidl_parser_get_attributes (self, _tmp82_ = g_strdup_printf ("%s.%s", symbol, param_node->name), &_tmp83_), attributes = (_vala_array_free (attributes, attributes_length1, (GDestroyNotify) g_free), NULL), attributes_length1 = _tmp83_, _attributes_size_ = attributes_length1, _tmp84_);
4517
 
                                _g_free0 (_tmp82_);
 
4543
                                attributes = (_tmp85_ = vala_gidl_parser_get_attributes (self, _tmp83_ = g_strdup_printf ("%s.%s", symbol, param_node->name), &_tmp84_), attributes = (_vala_array_free (attributes, attributes_length1, (GDestroyNotify) g_free), NULL), attributes_length1 = _tmp84_, _attributes_size_ = attributes_length1, _tmp85_);
 
4544
                                _g_free0 (_tmp83_);
4518
4545
                                if (attributes != NULL) {
4519
4546
                                        {
4520
4547
                                                char** attr_collection;
4526
4553
                                                        char* attr;
4527
4554
                                                        attr = g_strdup (attr_collection[attr_it]);
4528
4555
                                                        {
 
4556
                                                                char** _tmp87_;
 
4557
                                                                gint _nv_size_;
 
4558
                                                                gint nv_length1;
4529
4559
                                                                char** _tmp86_;
4530
 
                                                                gint _nv_size_;
4531
 
                                                                gint nv_length1;
4532
 
                                                                char** _tmp85_;
4533
4560
                                                                char** nv;
4534
 
                                                                nv = (_tmp86_ = _tmp85_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp85_), _nv_size_ = nv_length1, _tmp86_);
 
4561
                                                                nv = (_tmp87_ = _tmp86_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp86_), _nv_size_ = nv_length1, _tmp87_);
4535
4562
                                                                if (_vala_strcmp0 (nv[0], "is_array") == 0) {
4536
 
                                                                        char* _tmp87_;
4537
 
                                                                        gboolean _tmp88_;
4538
 
                                                                        if ((_tmp88_ = _vala_strcmp0 (_tmp87_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp87_), _tmp88_)) {
4539
 
                                                                                ValaDataType* _tmp89_;
4540
 
                                                                                param_type = (_tmp89_ = (ValaDataType*) vala_array_type_new (param_type, 1, vala_code_node_get_source_reference ((ValaCodeNode*) param_type)), _vala_code_node_unref0 (param_type), _tmp89_);
4541
 
                                                                                vala_formal_parameter_set_parameter_type (p, param_type);
 
4563
                                                                        char* _tmp88_;
 
4564
                                                                        gboolean _tmp89_;
 
4565
                                                                        if ((_tmp89_ = _vala_strcmp0 (_tmp88_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp88_), _tmp89_)) {
 
4566
                                                                                ValaDataType* _tmp90_;
 
4567
                                                                                param_type = (_tmp90_ = (ValaDataType*) vala_array_type_new (param_type, 1, vala_code_node_get_source_reference ((ValaCodeNode*) param_type)), _vala_code_node_unref0 (param_type), _tmp90_);
 
4568
                                                                                vala_variable_set_variable_type ((ValaVariable*) p, param_type);
4542
4569
                                                                                if (!out_requested) {
4543
4570
                                                                                        vala_formal_parameter_set_direction (p, VALA_PARAMETER_DIRECTION_IN);
4544
4571
                                                                                }
4546
4573
                                                                        }
4547
4574
                                                                } else {
4548
4575
                                                                        if (_vala_strcmp0 (nv[0], "is_out") == 0) {
4549
 
                                                                                char* _tmp90_;
4550
 
                                                                                gboolean _tmp91_;
4551
 
                                                                                if ((_tmp91_ = _vala_strcmp0 (_tmp90_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp90_), _tmp91_)) {
4552
 
                                                                                        gboolean _tmp92_ = FALSE;
 
4576
                                                                                char* _tmp91_;
 
4577
                                                                                gboolean _tmp92_;
 
4578
                                                                                if ((_tmp92_ = _vala_strcmp0 (_tmp91_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp91_), _tmp92_)) {
 
4579
                                                                                        gboolean _tmp93_ = FALSE;
4553
4580
                                                                                        vala_formal_parameter_set_direction (p, VALA_PARAMETER_DIRECTION_OUT);
4554
4581
                                                                                        out_requested = TRUE;
4555
4582
                                                                                        if (!array_requested) {
4556
 
                                                                                                _tmp92_ = VALA_IS_ARRAY_TYPE (param_type);
 
4583
                                                                                                _tmp93_ = VALA_IS_ARRAY_TYPE (param_type);
4557
4584
                                                                                        } else {
4558
 
                                                                                                _tmp92_ = FALSE;
 
4585
                                                                                                _tmp93_ = FALSE;
4559
4586
                                                                                        }
4560
 
                                                                                        if (_tmp92_) {
 
4587
                                                                                        if (_tmp93_) {
4561
4588
                                                                                                ValaArrayType* array_type;
4562
 
                                                                                                ValaDataType* _tmp93_;
 
4589
                                                                                                ValaDataType* _tmp94_;
4563
4590
                                                                                                array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (param_type));
4564
 
                                                                                                param_type = (_tmp93_ = _vala_code_node_ref0 (vala_array_type_get_element_type (array_type)), _vala_code_node_unref0 (param_type), _tmp93_);
4565
 
                                                                                                vala_formal_parameter_set_parameter_type (p, param_type);
 
4591
                                                                                                param_type = (_tmp94_ = _vala_code_node_ref0 (vala_array_type_get_element_type (array_type)), _vala_code_node_unref0 (param_type), _tmp94_);
 
4592
                                                                                                vala_variable_set_variable_type ((ValaVariable*) p, param_type);
4566
4593
                                                                                                _vala_code_node_unref0 (array_type);
4567
4594
                                                                                        }
4568
4595
                                                                                }
4569
4596
                                                                        } else {
4570
4597
                                                                                if (_vala_strcmp0 (nv[0], "is_ref") == 0) {
4571
 
                                                                                        char* _tmp94_;
4572
 
                                                                                        gboolean _tmp95_;
4573
 
                                                                                        if ((_tmp95_ = _vala_strcmp0 (_tmp94_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp94_), _tmp95_)) {
4574
 
                                                                                                gboolean _tmp96_ = FALSE;
 
4598
                                                                                        char* _tmp95_;
 
4599
                                                                                        gboolean _tmp96_;
 
4600
                                                                                        if ((_tmp96_ = _vala_strcmp0 (_tmp95_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp95_), _tmp96_)) {
 
4601
                                                                                                gboolean _tmp97_ = FALSE;
4575
4602
                                                                                                vala_formal_parameter_set_direction (p, VALA_PARAMETER_DIRECTION_REF);
4576
4603
                                                                                                if (!array_requested) {
4577
 
                                                                                                        _tmp96_ = VALA_IS_ARRAY_TYPE (param_type);
 
4604
                                                                                                        _tmp97_ = VALA_IS_ARRAY_TYPE (param_type);
4578
4605
                                                                                                } else {
4579
 
                                                                                                        _tmp96_ = FALSE;
 
4606
                                                                                                        _tmp97_ = FALSE;
4580
4607
                                                                                                }
4581
 
                                                                                                if (_tmp96_) {
 
4608
                                                                                                if (_tmp97_) {
4582
4609
                                                                                                        ValaArrayType* array_type;
4583
 
                                                                                                        ValaDataType* _tmp97_;
 
4610
                                                                                                        ValaDataType* _tmp98_;
4584
4611
                                                                                                        array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (param_type));
4585
 
                                                                                                        param_type = (_tmp97_ = _vala_code_node_ref0 (vala_array_type_get_element_type (array_type)), _vala_code_node_unref0 (param_type), _tmp97_);
4586
 
                                                                                                        vala_formal_parameter_set_parameter_type (p, param_type);
 
4612
                                                                                                        param_type = (_tmp98_ = _vala_code_node_ref0 (vala_array_type_get_element_type (array_type)), _vala_code_node_unref0 (param_type), _tmp98_);
 
4613
                                                                                                        vala_variable_set_variable_type ((ValaVariable*) p, param_type);
4587
4614
                                                                                                        _vala_code_node_unref0 (array_type);
4588
4615
                                                                                                }
4589
4616
                                                                                        }
4590
4617
                                                                                } else {
4591
4618
                                                                                        if (_vala_strcmp0 (nv[0], "nullable") == 0) {
4592
 
                                                                                                char* _tmp98_;
4593
 
                                                                                                gboolean _tmp99_;
4594
 
                                                                                                if ((_tmp99_ = _vala_strcmp0 (_tmp98_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp98_), _tmp99_)) {
 
4619
                                                                                                char* _tmp99_;
 
4620
                                                                                                gboolean _tmp100_;
 
4621
                                                                                                if ((_tmp100_ = _vala_strcmp0 (_tmp99_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp99_), _tmp100_)) {
4595
4622
                                                                                                        vala_data_type_set_nullable (param_type, TRUE);
4596
4623
                                                                                                }
4597
4624
                                                                                        } else {
4598
4625
                                                                                                if (_vala_strcmp0 (nv[0], "transfer_ownership") == 0) {
4599
 
                                                                                                        char* _tmp100_;
4600
 
                                                                                                        gboolean _tmp101_;
4601
 
                                                                                                        if ((_tmp101_ = _vala_strcmp0 (_tmp100_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp100_), _tmp101_)) {
 
4626
                                                                                                        char* _tmp101_;
 
4627
                                                                                                        gboolean _tmp102_;
 
4628
                                                                                                        if ((_tmp102_ = _vala_strcmp0 (_tmp101_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp101_), _tmp102_)) {
4602
4629
                                                                                                                vala_data_type_set_value_owned (param_type, TRUE);
4603
4630
                                                                                                        }
4604
4631
                                                                                                } else {
4605
4632
                                                                                                        if (_vala_strcmp0 (nv[0], "takes_ownership") == 0) {
4606
 
                                                                                                                char* _tmp102_;
4607
 
                                                                                                                gboolean _tmp103_;
4608
 
                                                                                                                if ((_tmp103_ = _vala_strcmp0 (_tmp102_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp102_), _tmp103_)) {
 
4633
                                                                                                                char* _tmp103_;
 
4634
                                                                                                                gboolean _tmp104_;
 
4635
                                                                                                                if ((_tmp104_ = _vala_strcmp0 (_tmp103_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp103_), _tmp104_)) {
4609
4636
                                                                                                                        vala_data_type_set_value_owned (param_type, TRUE);
4610
4637
                                                                                                                }
4611
4638
                                                                                                        } else {
4612
4639
                                                                                                                if (_vala_strcmp0 (nv[0], "value_owned") == 0) {
4613
 
                                                                                                                        char* _tmp104_;
4614
 
                                                                                                                        gboolean _tmp105_;
4615
 
                                                                                                                        if ((_tmp105_ = _vala_strcmp0 (_tmp104_ = vala_gidl_parser_eval (self, nv[1]), "0") == 0, _g_free0 (_tmp104_), _tmp105_)) {
 
4640
                                                                                                                        char* _tmp105_;
 
4641
                                                                                                                        gboolean _tmp106_;
 
4642
                                                                                                                        if ((_tmp106_ = _vala_strcmp0 (_tmp105_ = vala_gidl_parser_eval (self, nv[1]), "0") == 0, _g_free0 (_tmp105_), _tmp106_)) {
4616
4643
                                                                                                                                vala_data_type_set_value_owned (param_type, FALSE);
4617
4644
                                                                                                                        } else {
4618
 
                                                                                                                                char* _tmp106_;
4619
 
                                                                                                                                gboolean _tmp107_;
4620
 
                                                                                                                                if ((_tmp107_ = _vala_strcmp0 (_tmp106_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp106_), _tmp107_)) {
 
4645
                                                                                                                                char* _tmp107_;
 
4646
                                                                                                                                gboolean _tmp108_;
 
4647
                                                                                                                                if ((_tmp108_ = _vala_strcmp0 (_tmp107_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp107_), _tmp108_)) {
4621
4648
                                                                                                                                        vala_data_type_set_value_owned (param_type, TRUE);
4622
4649
                                                                                                                                }
4623
4650
                                                                                                                        }
4624
4651
                                                                                                                } else {
4625
4652
                                                                                                                        if (_vala_strcmp0 (nv[0], "hidden") == 0) {
4626
 
                                                                                                                                char* _tmp108_;
4627
 
                                                                                                                                gboolean _tmp109_;
4628
 
                                                                                                                                if ((_tmp109_ = _vala_strcmp0 (_tmp108_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp108_), _tmp109_)) {
 
4653
                                                                                                                                char* _tmp109_;
 
4654
                                                                                                                                gboolean _tmp110_;
 
4655
                                                                                                                                if ((_tmp110_ = _vala_strcmp0 (_tmp109_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp109_), _tmp110_)) {
4629
4656
                                                                                                                                        hide_param = TRUE;
4630
4657
                                                                                                                                } else {
4631
 
                                                                                                                                        char* _tmp110_;
4632
 
                                                                                                                                        gboolean _tmp111_;
4633
 
                                                                                                                                        if ((_tmp111_ = _vala_strcmp0 (_tmp110_ = vala_gidl_parser_eval (self, nv[1]), "0") == 0, _g_free0 (_tmp110_), _tmp111_)) {
 
4658
                                                                                                                                        char* _tmp111_;
 
4659
                                                                                                                                        gboolean _tmp112_;
 
4660
                                                                                                                                        if ((_tmp112_ = _vala_strcmp0 (_tmp111_ = vala_gidl_parser_eval (self, nv[1]), "0") == 0, _g_free0 (_tmp111_), _tmp112_)) {
4634
4661
                                                                                                                                                show_param = TRUE;
4635
4662
                                                                                                                                        }
4636
4663
                                                                                                                                }
4637
4664
                                                                                                                        } else {
4638
4665
                                                                                                                                if (_vala_strcmp0 (nv[0], "no_array_length") == 0) {
4639
 
                                                                                                                                        char* _tmp112_;
4640
 
                                                                                                                                        gboolean _tmp113_;
4641
 
                                                                                                                                        if ((_tmp113_ = _vala_strcmp0 (_tmp112_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp112_), _tmp113_)) {
 
4666
                                                                                                                                        char* _tmp113_;
 
4667
                                                                                                                                        gboolean _tmp114_;
 
4668
                                                                                                                                        if ((_tmp114_ = _vala_strcmp0 (_tmp113_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp113_), _tmp114_)) {
4642
4669
                                                                                                                                                vala_formal_parameter_set_no_array_length (p, TRUE);
4643
4670
                                                                                                                                        }
4644
4671
                                                                                                                                } else {
4645
4672
                                                                                                                                        if (_vala_strcmp0 (nv[0], "array_length_type") == 0) {
4646
 
                                                                                                                                                char* _tmp114_;
4647
 
                                                                                                                                                vala_formal_parameter_set_array_length_type (p, _tmp114_ = vala_gidl_parser_eval (self, nv[1]));
4648
 
                                                                                                                                                _g_free0 (_tmp114_);
 
4673
                                                                                                                                                char* _tmp115_;
 
4674
                                                                                                                                                vala_formal_parameter_set_array_length_type (p, _tmp115_ = vala_gidl_parser_eval (self, nv[1]));
 
4675
                                                                                                                                                _g_free0 (_tmp115_);
4649
4676
                                                                                                                                        } else {
4650
4677
                                                                                                                                                if (_vala_strcmp0 (nv[0], "array_null_terminated") == 0) {
4651
 
                                                                                                                                                        char* _tmp115_;
4652
 
                                                                                                                                                        gboolean _tmp116_;
4653
 
                                                                                                                                                        if ((_tmp116_ = _vala_strcmp0 (_tmp115_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp115_), _tmp116_)) {
 
4678
                                                                                                                                                        char* _tmp116_;
 
4679
                                                                                                                                                        gboolean _tmp117_;
 
4680
                                                                                                                                                        if ((_tmp117_ = _vala_strcmp0 (_tmp116_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp116_), _tmp117_)) {
4654
4681
                                                                                                                                                                vala_formal_parameter_set_no_array_length (p, TRUE);
4655
4682
                                                                                                                                                                vala_formal_parameter_set_array_null_terminated (p, TRUE);
4656
4683
                                                                                                                                                        }
4657
4684
                                                                                                                                                } else {
4658
4685
                                                                                                                                                        if (_vala_strcmp0 (nv[0], "array_length_pos") == 0) {
4659
 
                                                                                                                                                                char* _tmp117_;
 
4686
                                                                                                                                                                char* _tmp118_;
4660
4687
                                                                                                                                                                set_array_length_pos = TRUE;
4661
 
                                                                                                                                                                array_length_pos = g_ascii_strtod (_tmp117_ = vala_gidl_parser_eval (self, nv[1]), NULL);
4662
 
                                                                                                                                                                _g_free0 (_tmp117_);
 
4688
                                                                                                                                                                array_length_pos = g_ascii_strtod (_tmp118_ = vala_gidl_parser_eval (self, nv[1]), NULL);
 
4689
                                                                                                                                                                _g_free0 (_tmp118_);
4663
4690
                                                                                                                                                        } else {
4664
4691
                                                                                                                                                                if (_vala_strcmp0 (nv[0], "delegate_target_pos") == 0) {
4665
 
                                                                                                                                                                        char* _tmp118_;
 
4692
                                                                                                                                                                        char* _tmp119_;
4666
4693
                                                                                                                                                                        set_delegate_target_pos = TRUE;
4667
 
                                                                                                                                                                        delegate_target_pos = g_ascii_strtod (_tmp118_ = vala_gidl_parser_eval (self, nv[1]), NULL);
4668
 
                                                                                                                                                                        _g_free0 (_tmp118_);
 
4694
                                                                                                                                                                        delegate_target_pos = g_ascii_strtod (_tmp119_ = vala_gidl_parser_eval (self, nv[1]), NULL);
 
4695
                                                                                                                                                                        _g_free0 (_tmp119_);
4669
4696
                                                                                                                                                                } else {
4670
4697
                                                                                                                                                                        if (_vala_strcmp0 (nv[0], "type_name") == 0) {
4671
 
                                                                                                                                                                                char* _tmp119_;
4672
 
                                                                                                                                                                                ValaUnresolvedSymbol* _tmp120_;
 
4698
                                                                                                                                                                                char* _tmp120_;
 
4699
                                                                                                                                                                                ValaUnresolvedSymbol* _tmp121_;
4673
4700
                                                                                                                                                                                ValaUnresolvedSymbol* sym;
4674
 
                                                                                                                                                                                sym = (_tmp120_ = vala_unresolved_symbol_new (NULL, _tmp119_ = vala_gidl_parser_eval (self, nv[1]), NULL), _g_free0 (_tmp119_), _tmp120_);
 
4701
                                                                                                                                                                                sym = (_tmp121_ = vala_unresolved_symbol_new (NULL, _tmp120_ = vala_gidl_parser_eval (self, nv[1]), NULL), _g_free0 (_tmp120_), _tmp121_);
4675
4702
                                                                                                                                                                                if (VALA_IS_UNRESOLVED_TYPE (param_type)) {
4676
4703
                                                                                                                                                                                        vala_unresolved_type_set_unresolved_symbol (VALA_UNRESOLVED_TYPE (param_type), sym);
4677
4704
                                                                                                                                                                                } else {
4678
 
                                                                                                                                                                                        ValaDataType* _tmp121_;
4679
 
                                                                                                                                                                                        vala_formal_parameter_set_parameter_type (p, param_type = (_tmp121_ = (ValaDataType*) vala_unresolved_type_new_from_symbol (sym, vala_code_node_get_source_reference ((ValaCodeNode*) return_type)), _vala_code_node_unref0 (param_type), _tmp121_));
 
4705
                                                                                                                                                                                        ValaDataType* _tmp122_;
 
4706
                                                                                                                                                                                        vala_variable_set_variable_type ((ValaVariable*) p, param_type = (_tmp122_ = (ValaDataType*) vala_unresolved_type_new_from_symbol (sym, vala_code_node_get_source_reference ((ValaCodeNode*) return_type)), _vala_code_node_unref0 (param_type), _tmp122_));
4680
4707
                                                                                                                                                                                }
4681
4708
                                                                                                                                                                                _vala_code_node_unref0 (sym);
4682
4709
                                                                                                                                                                        } else {
4683
4710
                                                                                                                                                                                if (_vala_strcmp0 (nv[0], "ctype") == 0) {
4684
 
                                                                                                                                                                                        char* _tmp122_;
4685
 
                                                                                                                                                                                        vala_formal_parameter_set_ctype (p, _tmp122_ = vala_gidl_parser_eval (self, nv[1]));
4686
 
                                                                                                                                                                                        _g_free0 (_tmp122_);
 
4711
                                                                                                                                                                                        char* _tmp123_;
 
4712
                                                                                                                                                                                        vala_formal_parameter_set_ctype (p, _tmp123_ = vala_gidl_parser_eval (self, nv[1]));
 
4713
                                                                                                                                                                                        _g_free0 (_tmp123_);
4687
4714
                                                                                                                                                                                } else {
4688
4715
                                                                                                                                                                                        if (_vala_strcmp0 (nv[0], "type_arguments") == 0) {
4689
 
                                                                                                                                                                                                char** _tmp126_;
 
4716
                                                                                                                                                                                                char** _tmp127_;
4690
4717
                                                                                                                                                                                                gint _type_args_size_;
4691
4718
                                                                                                                                                                                                gint type_args_length1;
4692
 
                                                                                                                                                                                                char** _tmp124_;
4693
 
                                                                                                                                                                                                char* _tmp123_;
4694
4719
                                                                                                                                                                                                char** _tmp125_;
 
4720
                                                                                                                                                                                                char* _tmp124_;
 
4721
                                                                                                                                                                                                char** _tmp126_;
4695
4722
                                                                                                                                                                                                char** type_args;
4696
 
                                                                                                                                                                                                type_args = (_tmp126_ = (_tmp125_ = _tmp124_ = g_strsplit (_tmp123_ = vala_gidl_parser_eval (self, nv[1]), ",", 0), _g_free0 (_tmp123_), _tmp125_), type_args_length1 = _vala_array_length (_tmp124_), _type_args_size_ = type_args_length1, _tmp126_);
 
4723
                                                                                                                                                                                                type_args = (_tmp127_ = (_tmp126_ = _tmp125_ = g_strsplit (_tmp124_ = vala_gidl_parser_eval (self, nv[1]), ",", 0), _g_free0 (_tmp124_), _tmp126_), type_args_length1 = _vala_array_length (_tmp125_), _type_args_size_ = type_args_length1, _tmp127_);
4697
4724
                                                                                                                                                                                                {
4698
4725
                                                                                                                                                                                                        char** type_arg_collection;
4699
4726
                                                                                                                                                                                                        int type_arg_collection_length1;
4704
4731
                                                                                                                                                                                                                char* type_arg;
4705
4732
                                                                                                                                                                                                                type_arg = g_strdup (type_arg_collection[type_arg_it]);
4706
4733
                                                                                                                                                                                                                {
4707
 
                                                                                                                                                                                                                        ValaDataType* _tmp127_;
4708
 
                                                                                                                                                                                                                        vala_data_type_add_type_argument (param_type, _tmp127_ = vala_gidl_parser_get_type_from_string (self, type_arg));
4709
 
                                                                                                                                                                                                                        _vala_code_node_unref0 (_tmp127_);
 
4734
                                                                                                                                                                                                                        ValaDataType* _tmp128_;
 
4735
                                                                                                                                                                                                                        vala_data_type_add_type_argument (param_type, _tmp128_ = vala_gidl_parser_get_type_from_string (self, type_arg));
 
4736
                                                                                                                                                                                                                        _vala_code_node_unref0 (_tmp128_);
4710
4737
                                                                                                                                                                                                                        _g_free0 (type_arg);
4711
4738
                                                                                                                                                                                                                }
4712
4739
                                                                                                                                                                                                        }
4717
4744
                                                                                                                                                                                                        char* val;
4718
4745
                                                                                                                                                                                                        val = vala_gidl_parser_eval (self, nv[1]);
4719
4746
                                                                                                                                                                                                        if (_vala_strcmp0 (val, "null") == 0) {
4720
 
                                                                                                                                                                                                                ValaNullLiteral* _tmp128_;
4721
 
                                                                                                                                                                                                                vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp128_ = vala_null_literal_new (vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4722
 
                                                                                                                                                                                                                _vala_code_node_unref0 (_tmp128_);
 
4747
                                                                                                                                                                                                                ValaNullLiteral* _tmp129_;
 
4748
                                                                                                                                                                                                                vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp129_ = vala_null_literal_new (vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
 
4749
                                                                                                                                                                                                                _vala_code_node_unref0 (_tmp129_);
4723
4750
                                                                                                                                                                                                        } else {
4724
4751
                                                                                                                                                                                                                if (_vala_strcmp0 (val, "true") == 0) {
4725
 
                                                                                                                                                                                                                        ValaBooleanLiteral* _tmp129_;
4726
 
                                                                                                                                                                                                                        vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp129_ = vala_boolean_literal_new (TRUE, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4727
 
                                                                                                                                                                                                                        _vala_code_node_unref0 (_tmp129_);
 
4752
                                                                                                                                                                                                                        ValaBooleanLiteral* _tmp130_;
 
4753
                                                                                                                                                                                                                        vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp130_ = vala_boolean_literal_new (TRUE, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
 
4754
                                                                                                                                                                                                                        _vala_code_node_unref0 (_tmp130_);
4728
4755
                                                                                                                                                                                                                } else {
4729
4756
                                                                                                                                                                                                                        if (_vala_strcmp0 (val, "false") == 0) {
4730
 
                                                                                                                                                                                                                                ValaBooleanLiteral* _tmp130_;
4731
 
                                                                                                                                                                                                                                vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp130_ = vala_boolean_literal_new (FALSE, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4732
 
                                                                                                                                                                                                                                _vala_code_node_unref0 (_tmp130_);
 
4757
                                                                                                                                                                                                                                ValaBooleanLiteral* _tmp131_;
 
4758
                                                                                                                                                                                                                                vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp131_ = vala_boolean_literal_new (FALSE, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
 
4759
                                                                                                                                                                                                                                _vala_code_node_unref0 (_tmp131_);
4733
4760
                                                                                                                                                                                                                        } else {
4734
4761
                                                                                                                                                                                                                                if (_vala_strcmp0 (val, "") == 0) {
4735
 
                                                                                                                                                                                                                                        ValaStringLiteral* _tmp131_;
4736
 
                                                                                                                                                                                                                                        vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp131_ = vala_string_literal_new ("\"\"", vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4737
 
                                                                                                                                                                                                                                        _vala_code_node_unref0 (_tmp131_);
 
4762
                                                                                                                                                                                                                                        ValaStringLiteral* _tmp132_;
 
4763
                                                                                                                                                                                                                                        vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp132_ = vala_string_literal_new ("\"\"", vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
 
4764
                                                                                                                                                                                                                                        _vala_code_node_unref0 (_tmp132_);
4738
4765
                                                                                                                                                                                                                                } else {
4739
4766
                                                                                                                                                                                                                                        const char* endptr;
4740
4767
                                                                                                                                                                                                                                        const char* val_end;
4742
4769
                                                                                                                                                                                                                                        val_end = g_utf8_offset_to_pointer (val, g_utf8_strlen (val, -1));
4743
4770
                                                                                                                                                                                                                                        strtol (val, &endptr, 0);
4744
4771
                                                                                                                                                                                                                                        if (((glong) endptr) == ((glong) val_end)) {
4745
 
                                                                                                                                                                                                                                                ValaIntegerLiteral* _tmp132_;
4746
 
                                                                                                                                                                                                                                                vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp132_ = vala_integer_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4747
 
                                                                                                                                                                                                                                                _vala_code_node_unref0 (_tmp132_);
 
4772
                                                                                                                                                                                                                                                ValaIntegerLiteral* _tmp133_;
 
4773
                                                                                                                                                                                                                                                vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp133_ = vala_integer_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
 
4774
                                                                                                                                                                                                                                                _vala_code_node_unref0 (_tmp133_);
4748
4775
                                                                                                                                                                                                                                        } else {
4749
4776
                                                                                                                                                                                                                                                g_ascii_strtod (val, &endptr);
4750
4777
                                                                                                                                                                                                                                                if (((glong) endptr) == ((glong) val_end)) {
4751
 
                                                                                                                                                                                                                                                        ValaRealLiteral* _tmp133_;
4752
 
                                                                                                                                                                                                                                                        vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp133_ = vala_real_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4753
 
                                                                                                                                                                                                                                                        _vala_code_node_unref0 (_tmp133_);
 
4778
                                                                                                                                                                                                                                                        ValaRealLiteral* _tmp134_;
 
4779
                                                                                                                                                                                                                                                        vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp134_ = vala_real_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
 
4780
                                                                                                                                                                                                                                                        _vala_code_node_unref0 (_tmp134_);
4754
4781
                                                                                                                                                                                                                                                } else {
4755
 
                                                                                                                                                                                                                                                        gboolean _tmp134_ = FALSE;
 
4782
                                                                                                                                                                                                                                                        gboolean _tmp135_ = FALSE;
4756
4783
                                                                                                                                                                                                                                                        if (g_str_has_prefix (val, "\"")) {
4757
 
                                                                                                                                                                                                                                                                _tmp134_ = g_str_has_suffix (val, "\"");
 
4784
                                                                                                                                                                                                                                                                _tmp135_ = g_str_has_suffix (val, "\"");
4758
4785
                                                                                                                                                                                                                                                        } else {
4759
 
                                                                                                                                                                                                                                                                _tmp134_ = FALSE;
 
4786
                                                                                                                                                                                                                                                                _tmp135_ = FALSE;
4760
4787
                                                                                                                                                                                                                                                        }
4761
 
                                                                                                                                                                                                                                                        if (_tmp134_) {
4762
 
                                                                                                                                                                                                                                                                ValaStringLiteral* _tmp135_;
4763
 
                                                                                                                                                                                                                                                                vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp135_ = vala_string_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4764
 
                                                                                                                                                                                                                                                                _vala_code_node_unref0 (_tmp135_);
 
4788
                                                                                                                                                                                                                                                        if (_tmp135_) {
 
4789
                                                                                                                                                                                                                                                                ValaStringLiteral* _tmp136_;
 
4790
                                                                                                                                                                                                                                                                vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp136_ = vala_string_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
 
4791
                                                                                                                                                                                                                                                                _vala_code_node_unref0 (_tmp136_);
4765
4792
                                                                                                                                                                                                                                                        } else {
4766
4793
                                                                                                                                                                                                                                                                {
4767
 
                                                                                                                                                                                                                                                                        char** _tmp136_;
 
4794
                                                                                                                                                                                                                                                                        char** _tmp137_;
4768
4795
                                                                                                                                                                                                                                                                        char** member_collection;
4769
4796
                                                                                                                                                                                                                                                                        int member_collection_length1;
4770
4797
                                                                                                                                                                                                                                                                        int member_it;
4771
 
                                                                                                                                                                                                                                                                        member_collection = _tmp136_ = g_strsplit (val, ".", 0);
4772
 
                                                                                                                                                                                                                                                                        member_collection_length1 = _vala_array_length (_tmp136_);
4773
 
                                                                                                                                                                                                                                                                        for (member_it = 0; member_it < _vala_array_length (_tmp136_); member_it = member_it + 1) {
 
4798
                                                                                                                                                                                                                                                                        member_collection = _tmp137_ = g_strsplit (val, ".", 0);
 
4799
                                                                                                                                                                                                                                                                        member_collection_length1 = _vala_array_length (_tmp137_);
 
4800
                                                                                                                                                                                                                                                                        for (member_it = 0; member_it < _vala_array_length (_tmp137_); member_it = member_it + 1) {
4774
4801
                                                                                                                                                                                                                                                                                char* member;
4775
4802
                                                                                                                                                                                                                                                                                member = g_strdup (member_collection[member_it]);
4776
4803
                                                                                                                                                                                                                                                                                {
4777
 
                                                                                                                                                                                                                                                                                        ValaMemberAccess* _tmp137_;
4778
 
                                                                                                                                                                                                                                                                                        vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp137_ = vala_member_access_new (vala_formal_parameter_get_default_expression (p), member, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4779
 
                                                                                                                                                                                                                                                                                        _vala_code_node_unref0 (_tmp137_);
 
4804
                                                                                                                                                                                                                                                                                        ValaMemberAccess* _tmp138_;
 
4805
                                                                                                                                                                                                                                                                                        vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp138_ = vala_member_access_new (vala_variable_get_initializer ((ValaVariable*) p), member, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
 
4806
                                                                                                                                                                                                                                                                                        _vala_code_node_unref0 (_tmp138_);
4780
4807
                                                                                                                                                                                                                                                                                        _g_free0 (member);
4781
4808
                                                                                                                                                                                                                                                                                }
4782
4809
                                                                                                                                                                                                                                                                        }
4814
4841
                                        }
4815
4842
                                }
4816
4843
                                if (last_param != NULL) {
4817
 
                                        char* _tmp139_;
4818
 
                                        _tmp138_ = _vala_strcmp0 (vala_symbol_get_name ((ValaSymbol*) p), _tmp139_ = g_strconcat ("n_", vala_symbol_get_name ((ValaSymbol*) last_param), NULL)) == 0;
4819
 
                                        _g_free0 (_tmp139_);
 
4844
                                        char* _tmp140_;
 
4845
                                        _tmp139_ = _vala_strcmp0 (vala_symbol_get_name ((ValaSymbol*) p), _tmp140_ = g_strconcat ("n_", vala_symbol_get_name ((ValaSymbol*) last_param), NULL)) == 0;
 
4846
                                        _g_free0 (_tmp140_);
4820
4847
                                } else {
4821
 
                                        _tmp138_ = FALSE;
 
4848
                                        _tmp139_ = FALSE;
4822
4849
                                }
4823
 
                                if (_tmp138_) {
 
4850
                                if (_tmp139_) {
4824
4851
                                        if (!VALA_IS_ARRAY_TYPE (last_param_type)) {
4825
 
                                                ValaDataType* _tmp140_;
4826
 
                                                last_param_type = (_tmp140_ = (ValaDataType*) vala_array_type_new (last_param_type, 1, vala_code_node_get_source_reference ((ValaCodeNode*) last_param_type)), _vala_code_node_unref0 (last_param_type), _tmp140_);
4827
 
                                                vala_formal_parameter_set_parameter_type (last_param, last_param_type);
 
4852
                                                ValaDataType* _tmp141_;
 
4853
                                                last_param_type = (_tmp141_ = (ValaDataType*) vala_array_type_new (last_param_type, 1, vala_code_node_get_source_reference ((ValaCodeNode*) last_param_type)), _vala_code_node_unref0 (last_param_type), _tmp141_);
 
4854
                                                vala_variable_set_variable_type ((ValaVariable*) last_param, last_param_type);
4828
4855
                                                vala_formal_parameter_set_direction (last_param, VALA_PARAMETER_DIRECTION_IN);
4829
4856
                                        }
4830
4857
                                        hide_param = TRUE;
4831
4858
                                } else {
4832
 
                                        gboolean _tmp141_ = FALSE;
 
4859
                                        gboolean _tmp142_ = FALSE;
4833
4860
                                        if (last_param != NULL) {
4834
 
                                                _tmp141_ = _vala_strcmp0 (vala_symbol_get_name ((ValaSymbol*) p), "user_data") == 0;
 
4861
                                                _tmp142_ = _vala_strcmp0 (vala_symbol_get_name ((ValaSymbol*) p), "user_data") == 0;
4835
4862
                                        } else {
4836
 
                                                _tmp141_ = FALSE;
 
4863
                                                _tmp142_ = FALSE;
4837
4864
                                        }
4838
 
                                        if (_tmp141_) {
 
4865
                                        if (_tmp142_) {
4839
4866
                                                hide_param = TRUE;
4840
4867
                                        }
4841
4868
                                }
4842
4869
                                if (show_param) {
4843
 
                                        _tmp142_ = TRUE;
 
4870
                                        _tmp143_ = TRUE;
4844
4871
                                } else {
4845
 
                                        _tmp142_ = !hide_param;
 
4872
                                        _tmp143_ = !hide_param;
4846
4873
                                }
4847
 
                                if (_tmp142_) {
 
4874
                                if (_tmp143_) {
4848
4875
                                        vala_method_add_parameter (m, p);
4849
4876
                                        if (set_array_length_pos) {
4850
4877
                                                vala_formal_parameter_set_carray_length_parameter_position (p, array_length_pos);
4853
4880
                                                vala_formal_parameter_set_cdelegate_target_parameter_position (p, delegate_target_pos);
4854
4881
                                        }
4855
4882
                                }
4856
 
                                last_param = (_tmp143_ = _vala_code_node_ref0 (p), _vala_code_node_unref0 (last_param), _tmp143_);
4857
 
                                last_param_type = (_tmp144_ = _vala_code_node_ref0 (param_type), _vala_code_node_unref0 (last_param_type), _tmp144_);
 
4883
                                last_param = (_tmp144_ = _vala_code_node_ref0 (p), _vala_code_node_unref0 (last_param), _tmp144_);
 
4884
                                last_param_type = (_tmp145_ = _vala_code_node_ref0 (param_type), _vala_code_node_unref0 (last_param_type), _tmp145_);
4858
4885
                                _vala_code_node_unref0 (p);
4859
4886
                                _vala_code_node_unref0 (param_type);
4860
4887
                                _g_free0 (param_name);
4865
4892
                vala_method_set_binding (m, MEMBER_BINDING_STATIC);
4866
4893
        }
4867
4894
        if (last_param != NULL) {
4868
 
                _tmp145_ = g_str_has_prefix (vala_symbol_get_name ((ValaSymbol*) last_param), "first_");
 
4895
                _tmp146_ = g_str_has_prefix (vala_symbol_get_name ((ValaSymbol*) last_param), "first_");
4869
4896
        } else {
4870
 
                _tmp145_ = FALSE;
 
4897
                _tmp146_ = FALSE;
4871
4898
        }
4872
 
        if (_tmp145_) {
 
4899
        if (_tmp146_) {
4873
4900
                vala_formal_parameter_set_ellipsis (last_param, TRUE);
4874
4901
        } else {
4875
4902
                if (add_ellipsis) {
4876
 
                        ValaFormalParameter* _tmp146_;
4877
 
                        vala_method_add_parameter (m, _tmp146_ = vala_formal_parameter_new_with_ellipsis (NULL));
4878
 
                        _vala_code_node_unref0 (_tmp146_);
 
4903
                        ValaFormalParameter* _tmp147_;
 
4904
                        vala_method_add_parameter (m, _tmp147_ = vala_formal_parameter_new_with_ellipsis (NULL));
 
4905
                        _vala_code_node_unref0 (_tmp147_);
4879
4906
                }
4880
4907
        }
4881
4908
        result = m;
5098
5125
        if (prop_node->readable) {
5099
5126
                ValaPropertyAccessor* _tmp6_;
5100
5127
                ValaDataType* _tmp5_;
5101
 
                vala_property_set_get_accessor (prop, _tmp6_ = vala_property_accessor_new (TRUE, FALSE, FALSE, _tmp5_ = vala_data_type_copy (vala_property_get_property_type (prop)), NULL, NULL));
 
5128
                vala_property_set_get_accessor (prop, _tmp6_ = vala_property_accessor_new (TRUE, FALSE, FALSE, _tmp5_ = vala_data_type_copy (vala_property_get_property_type (prop)), NULL, NULL, NULL));
5102
5129
                _vala_code_node_unref0 (_tmp6_);
5103
5130
                _vala_code_node_unref0 (_tmp5_);
5104
5131
        }
5105
5132
        if (prop_node->writable) {
5106
5133
                ValaPropertyAccessor* _tmp8_;
5107
5134
                ValaDataType* _tmp7_;
5108
 
                vala_property_set_set_accessor (prop, _tmp8_ = vala_property_accessor_new (FALSE, FALSE, FALSE, _tmp7_ = vala_data_type_copy (vala_property_get_property_type (prop)), NULL, NULL));
 
5135
                vala_property_set_set_accessor (prop, _tmp8_ = vala_property_accessor_new (FALSE, FALSE, FALSE, _tmp7_ = vala_data_type_copy (vala_property_get_property_type (prop)), NULL, NULL, NULL));
5109
5136
                _vala_code_node_unref0 (_tmp8_);
5110
5137
                _vala_code_node_unref0 (_tmp7_);
5111
5138
                if (prop_node->construct_only) {
5266
5293
                                        nv = (_tmp3_ = _tmp2_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp2_), _nv_size_ = nv_length1, _tmp3_);
5267
5294
                                        if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
5268
5295
                                                char* _tmp4_;
5269
 
                                                vala_member_add_cheader_filename ((ValaMember*) c, _tmp4_ = vala_gidl_parser_eval (self, nv[1]));
 
5296
                                                vala_symbol_add_cheader_filename ((ValaSymbol*) c, _tmp4_ = vala_gidl_parser_eval (self, nv[1]));
5270
5297
                                                _g_free0 (_tmp4_);
5271
5298
                                        } else {
5272
5299
                                                if (_vala_strcmp0 (nv[0], "deprecated") == 0) {
5561
5588
                vala_field_set_ctype (field, ctype);
5562
5589
        }
5563
5590
        if (cheader_filename != NULL) {
5564
 
                vala_member_add_cheader_filename ((ValaMember*) field, cheader_filename);
 
5591
                vala_symbol_add_cheader_filename ((ValaSymbol*) field, cheader_filename);
5565
5592
        }
5566
5593
        if (array_null_terminated) {
5567
5594
                vala_field_set_array_null_terminated (field, TRUE);
6001
6028
                                                                        if ((_tmp34_ = _vala_strcmp0 (_tmp33_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp33_), _tmp34_)) {
6002
6029
                                                                                ValaDataType* _tmp35_;
6003
6030
                                                                                param_type = (_tmp35_ = (ValaDataType*) vala_array_type_new (param_type, 1, vala_code_node_get_source_reference ((ValaCodeNode*) param_type)), _vala_code_node_unref0 (param_type), _tmp35_);
6004
 
                                                                                vala_formal_parameter_set_parameter_type (p, param_type);
 
6031
                                                                                vala_variable_set_variable_type ((ValaVariable*) p, param_type);
6005
6032
                                                                                vala_formal_parameter_set_direction (p, VALA_PARAMETER_DIRECTION_IN);
6006
6033
                                                                        }
6007
6034
                                                                } else {
6039
6066
                                                                                                                if (!VALA_IS_UNRESOLVED_TYPE (param_type)) {
6040
6067
                                                                                                                        ValaDataType* _tmp44_;
6041
6068
                                                                                                                        param_type = (_tmp44_ = (ValaDataType*) vala_unresolved_type_new (), _vala_code_node_unref0 (param_type), _tmp44_);
6042
 
                                                                                                                        vala_formal_parameter_set_parameter_type (p, param_type);
 
6069
                                                                                                                        vala_variable_set_variable_type ((ValaVariable*) p, param_type);
6043
6070
                                                                                                                }
6044
6071
                                                                                                                vala_unresolved_type_set_unresolved_symbol (VALA_UNRESOLVED_TYPE (param_type), _tmp46_ = vala_unresolved_symbol_new (NULL, _tmp45_ = vala_gidl_parser_eval (self, nv[1]), NULL));
6045
6072
                                                                                                                _vala_code_node_unref0 (_tmp46_);
6065
6092
                                                                                                                                        type_arg = g_strdup (type_arg_collection[type_arg_it]);
6066
6093
                                                                                                                                        {
6067
6094
                                                                                                                                                ValaDataType* _tmp51_;
6068
 
                                                                                                                                                vala_data_type_add_type_argument (vala_formal_parameter_get_parameter_type (p), _tmp51_ = vala_gidl_parser_get_type_from_string (self, type_arg));
 
6095
                                                                                                                                                vala_data_type_add_type_argument (vala_variable_get_variable_type ((ValaVariable*) p), _tmp51_ = vala_gidl_parser_get_type_from_string (self, type_arg));
6069
6096
                                                                                                                                                _vala_code_node_unref0 (_tmp51_);
6070
6097
                                                                                                                                                _g_free0 (type_arg);
6071
6098
                                                                                                                                        }
6155
6182
}
6156
6183
 
6157
6184
 
 
6185
/**
 
6186
 * Code visitor parsing all GIDL files.
 
6187
 */
6158
6188
GType vala_gidl_parser_get_type (void) {
6159
6189
        static volatile gsize vala_gidl_parser_type_id__volatile = 0;
6160
6190
        if (g_once_init_enter (&vala_gidl_parser_type_id__volatile)) {