1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500
|
/* valaccodeassignmentmodule.c generated by valac, the Vala compiler
* generated from valaccodeassignmentmodule.vala, do not modify */
/* valaccodeassignmentmodule.vala
*
* Copyright (C) 2006-2010 Jürg Billeter
* Copyright (C) 2006-2008 Raffaele Sandrini
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author:
* Jürg Billeter <j@bitron.ch>
* Raffaele Sandrini <raffaele@sandrini.ch>
*/
#include <glib.h>
#include <glib-object.h>
#include <vala.h>
#include <valaccode.h>
#include <valagee.h>
#include <stdlib.h>
#include <string.h>
#define VALA_TYPE_CCODE_BASE_MODULE (vala_ccode_base_module_get_type ())
#define VALA_CCODE_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModule))
#define VALA_CCODE_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModuleClass))
#define VALA_IS_CCODE_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_BASE_MODULE))
#define VALA_IS_CCODE_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_BASE_MODULE))
#define VALA_CCODE_BASE_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModuleClass))
typedef struct _ValaCCodeBaseModule ValaCCodeBaseModule;
typedef struct _ValaCCodeBaseModuleClass ValaCCodeBaseModuleClass;
typedef struct _ValaCCodeBaseModulePrivate ValaCCodeBaseModulePrivate;
#define VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT (vala_ccode_base_module_emit_context_get_type ())
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContext))
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContextClass))
#define VALA_CCODE_BASE_MODULE_IS_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT))
#define VALA_CCODE_BASE_MODULE_IS_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT))
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContextClass))
typedef struct _ValaCCodeBaseModuleEmitContext ValaCCodeBaseModuleEmitContext;
typedef struct _ValaCCodeBaseModuleEmitContextClass ValaCCodeBaseModuleEmitContextClass;
#define VALA_TYPE_CCODE_STRUCT_MODULE (vala_ccode_struct_module_get_type ())
#define VALA_CCODE_STRUCT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModule))
#define VALA_CCODE_STRUCT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModuleClass))
#define VALA_IS_CCODE_STRUCT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_STRUCT_MODULE))
#define VALA_IS_CCODE_STRUCT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_STRUCT_MODULE))
#define VALA_CCODE_STRUCT_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModuleClass))
typedef struct _ValaCCodeStructModule ValaCCodeStructModule;
typedef struct _ValaCCodeStructModuleClass ValaCCodeStructModuleClass;
typedef struct _ValaCCodeStructModulePrivate ValaCCodeStructModulePrivate;
#define VALA_TYPE_CCODE_METHOD_MODULE (vala_ccode_method_module_get_type ())
#define VALA_CCODE_METHOD_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModule))
#define VALA_CCODE_METHOD_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModuleClass))
#define VALA_IS_CCODE_METHOD_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_METHOD_MODULE))
#define VALA_IS_CCODE_METHOD_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_METHOD_MODULE))
#define VALA_CCODE_METHOD_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModuleClass))
typedef struct _ValaCCodeMethodModule ValaCCodeMethodModule;
typedef struct _ValaCCodeMethodModuleClass ValaCCodeMethodModuleClass;
typedef struct _ValaCCodeMethodModulePrivate ValaCCodeMethodModulePrivate;
#define VALA_TYPE_CCODE_CONTROL_FLOW_MODULE (vala_ccode_control_flow_module_get_type ())
#define VALA_CCODE_CONTROL_FLOW_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModule))
#define VALA_CCODE_CONTROL_FLOW_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModuleClass))
#define VALA_IS_CCODE_CONTROL_FLOW_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE))
#define VALA_IS_CCODE_CONTROL_FLOW_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE))
#define VALA_CCODE_CONTROL_FLOW_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModuleClass))
typedef struct _ValaCCodeControlFlowModule ValaCCodeControlFlowModule;
typedef struct _ValaCCodeControlFlowModuleClass ValaCCodeControlFlowModuleClass;
typedef struct _ValaCCodeControlFlowModulePrivate ValaCCodeControlFlowModulePrivate;
#define VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE (vala_ccode_member_access_module_get_type ())
#define VALA_CCODE_MEMBER_ACCESS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModule))
#define VALA_CCODE_MEMBER_ACCESS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModuleClass))
#define VALA_IS_CCODE_MEMBER_ACCESS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE))
#define VALA_IS_CCODE_MEMBER_ACCESS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE))
#define VALA_CCODE_MEMBER_ACCESS_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModuleClass))
typedef struct _ValaCCodeMemberAccessModule ValaCCodeMemberAccessModule;
typedef struct _ValaCCodeMemberAccessModuleClass ValaCCodeMemberAccessModuleClass;
typedef struct _ValaCCodeMemberAccessModulePrivate ValaCCodeMemberAccessModulePrivate;
#define VALA_TYPE_CCODE_ASSIGNMENT_MODULE (vala_ccode_assignment_module_get_type ())
#define VALA_CCODE_ASSIGNMENT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModule))
#define VALA_CCODE_ASSIGNMENT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModuleClass))
#define VALA_IS_CCODE_ASSIGNMENT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE))
#define VALA_IS_CCODE_ASSIGNMENT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_ASSIGNMENT_MODULE))
#define VALA_CCODE_ASSIGNMENT_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModuleClass))
typedef struct _ValaCCodeAssignmentModule ValaCCodeAssignmentModule;
typedef struct _ValaCCodeAssignmentModuleClass ValaCCodeAssignmentModuleClass;
typedef struct _ValaCCodeAssignmentModulePrivate ValaCCodeAssignmentModulePrivate;
#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL)))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _vala_target_value_unref0(var) ((var == NULL) ? NULL : (var = (vala_target_value_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define VALA_TYPE_GLIB_VALUE (vala_glib_value_get_type ())
#define VALA_GLIB_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GLIB_VALUE, ValaGLibValue))
#define VALA_GLIB_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GLIB_VALUE, ValaGLibValueClass))
#define VALA_IS_GLIB_VALUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GLIB_VALUE))
#define VALA_IS_GLIB_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GLIB_VALUE))
#define VALA_GLIB_VALUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GLIB_VALUE, ValaGLibValueClass))
typedef struct _ValaGLibValue ValaGLibValue;
typedef struct _ValaGLibValueClass ValaGLibValueClass;
typedef struct _ValaGLibValuePrivate ValaGLibValuePrivate;
struct _ValaCCodeBaseModule {
ValaCodeGenerator parent_instance;
ValaCCodeBaseModulePrivate * priv;
ValaSymbol* root_symbol;
ValaCCodeBaseModuleEmitContext* emit_context;
ValaCCodeLineDirective* current_line;
ValaCCodeFile* header_file;
ValaCCodeFile* internal_header_file;
ValaCCodeFile* cfile;
ValaCCodeBaseModuleEmitContext* class_init_context;
ValaCCodeBaseModuleEmitContext* base_init_context;
ValaCCodeBaseModuleEmitContext* class_finalize_context;
ValaCCodeBaseModuleEmitContext* base_finalize_context;
ValaCCodeBaseModuleEmitContext* instance_init_context;
ValaCCodeBaseModuleEmitContext* instance_finalize_context;
ValaCCodeStruct* param_spec_struct;
ValaCCodeStruct* closure_struct;
ValaCCodeEnum* prop_enum;
ValaSet* user_marshal_set;
ValaSet* predefined_marshal_set;
gint next_regex_id;
gint next_coroutine_state;
ValaDataType* void_type;
ValaDataType* bool_type;
ValaDataType* char_type;
ValaDataType* uchar_type;
ValaDataType* unichar_type;
ValaDataType* short_type;
ValaDataType* ushort_type;
ValaDataType* int_type;
ValaDataType* uint_type;
ValaDataType* long_type;
ValaDataType* ulong_type;
ValaDataType* int8_type;
ValaDataType* uint8_type;
ValaDataType* int16_type;
ValaDataType* uint16_type;
ValaDataType* int32_type;
ValaDataType* uint32_type;
ValaDataType* int64_type;
ValaDataType* uint64_type;
ValaDataType* string_type;
ValaDataType* regex_type;
ValaDataType* float_type;
ValaDataType* double_type;
ValaTypeSymbol* gtype_type;
ValaTypeSymbol* gobject_type;
ValaErrorType* gerror_type;
ValaClass* glist_type;
ValaClass* gslist_type;
ValaClass* gnode_type;
ValaClass* gqueue_type;
ValaClass* gvaluearray_type;
ValaTypeSymbol* gstringbuilder_type;
ValaTypeSymbol* garray_type;
ValaTypeSymbol* gbytearray_type;
ValaTypeSymbol* gptrarray_type;
ValaTypeSymbol* gthreadpool_type;
ValaDataType* gdestroynotify_type;
ValaDataType* gquark_type;
ValaStruct* gvalue_type;
ValaClass* gvariant_type;
ValaStruct* mutex_type;
ValaTypeSymbol* type_module_type;
ValaTypeSymbol* dbus_proxy_type;
gboolean in_plugin;
gchar* module_init_param_name;
gboolean gvaluecollector_h_needed;
gboolean requires_array_free;
gboolean requires_array_move;
gboolean requires_array_length;
ValaSet* wrappers;
};
struct _ValaCCodeBaseModuleClass {
ValaCodeGeneratorClass parent_class;
void (*append_vala_array_free) (ValaCCodeBaseModule* self);
void (*append_vala_array_move) (ValaCCodeBaseModule* self);
void (*append_vala_array_length) (ValaCCodeBaseModule* self);
gboolean (*generate_enum_declaration) (ValaCCodeBaseModule* self, ValaEnum* en, ValaCCodeFile* decl_space);
void (*generate_class_struct_declaration) (ValaCCodeBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space);
void (*generate_struct_declaration) (ValaCCodeBaseModule* self, ValaStruct* st, ValaCCodeFile* decl_space);
void (*generate_delegate_declaration) (ValaCCodeBaseModule* self, ValaDelegate* d, ValaCCodeFile* decl_space);
void (*generate_cparameters) (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction);
ValaCCodeExpression* (*get_dup_func_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup);
gchar* (*append_struct_array_free) (ValaCCodeBaseModule* self, ValaStruct* st);
ValaCCodeExpression* (*destroy_value) (ValaCCodeBaseModule* self, ValaTargetValue* value, gboolean is_macro_definition);
void (*append_scope_free) (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCodeNode* stop_at);
ValaTargetValue* (*get_local_cvalue) (ValaCCodeBaseModule* self, ValaLocalVariable* local);
ValaTargetValue* (*get_parameter_cvalue) (ValaCCodeBaseModule* self, ValaParameter* param);
ValaTargetValue* (*get_field_cvalue) (ValaCCodeBaseModule* self, ValaField* field, ValaTargetValue* instance);
ValaTargetValue* (*load_variable) (ValaCCodeBaseModule* self, ValaVariable* variable, ValaTargetValue* value);
ValaTargetValue* (*load_this_parameter) (ValaCCodeBaseModule* self, ValaTypeSymbol* sym);
void (*store_value) (ValaCCodeBaseModule* self, ValaTargetValue* lvalue, ValaTargetValue* value);
gchar* (*get_delegate_target_cname) (ValaCCodeBaseModule* self, const gchar* delegate_cname);
ValaCCodeExpression* (*get_delegate_target_cexpression) (ValaCCodeBaseModule* self, ValaExpression* delegate_expr, ValaCCodeExpression** delegate_target_destroy_notify);
ValaCCodeExpression* (*get_delegate_target_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value);
ValaCCodeExpression* (*get_delegate_target_destroy_notify_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value);
gchar* (*get_delegate_target_destroy_notify_cname) (ValaCCodeBaseModule* self, const gchar* delegate_cname);
ValaTargetValue* (*copy_value) (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaCodeNode* node);
void (*generate_class_declaration) (ValaCCodeBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space);
void (*generate_interface_declaration) (ValaCCodeBaseModule* self, ValaInterface* iface, ValaCCodeFile* decl_space);
void (*generate_method_declaration) (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space);
void (*generate_error_domain_declaration) (ValaCCodeBaseModule* self, ValaErrorDomain* edomain, ValaCCodeFile* decl_space);
ValaCCodeExpression* (*deserialize_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr, ValaCCodeExpression* error_expr, gboolean* may_fail);
ValaCCodeExpression* (*serialize_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeExpression* expr);
ValaCCodeExpression* (*get_implicit_cast_expression) (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaCodeNode* node);
void (*create_type_check_statement) (ValaCCodeBaseModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaTypeSymbol* t, gboolean non_null, const gchar* var_name);
gboolean (*is_gobject_property) (ValaCCodeBaseModule* self, ValaProperty* prop);
void (*generate_dynamic_method_wrapper) (ValaCCodeBaseModule* self, ValaDynamicMethod* method);
gboolean (*method_has_wrapper) (ValaCCodeBaseModule* self, ValaMethod* method);
ValaCCodeFunctionCall* (*get_param_spec) (ValaCCodeBaseModule* self, ValaProperty* prop);
ValaCCodeFunctionCall* (*get_signal_creation) (ValaCCodeBaseModule* self, ValaSignal* sig, ValaTypeSymbol* type);
void (*register_dbus_info) (ValaCCodeBaseModule* self, ValaCCodeBlock* block, ValaObjectTypeSymbol* bindable);
gchar* (*get_dynamic_property_getter_cname) (ValaCCodeBaseModule* self, ValaDynamicProperty* node);
gchar* (*get_dynamic_property_setter_cname) (ValaCCodeBaseModule* self, ValaDynamicProperty* node);
gchar* (*get_dynamic_signal_cname) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
gchar* (*get_dynamic_signal_connect_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
gchar* (*get_dynamic_signal_connect_after_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
gchar* (*get_dynamic_signal_disconnect_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
gchar* (*get_array_length_cname) (ValaCCodeBaseModule* self, const gchar* array_cname, gint dim);
gchar* (*get_parameter_array_length_cname) (ValaCCodeBaseModule* self, ValaParameter* param, gint dim);
ValaCCodeExpression* (*get_array_length_cexpression) (ValaCCodeBaseModule* self, ValaExpression* array_expr, gint dim);
ValaCCodeExpression* (*get_array_length_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value, gint dim);
gchar* (*get_array_size_cname) (ValaCCodeBaseModule* self, const gchar* array_cname);
void (*add_simple_check) (ValaCCodeBaseModule* self, ValaCodeNode* node, gboolean always_fails);
gchar* (*generate_ready_function) (ValaCCodeBaseModule* self, ValaMethod* m);
};
struct _ValaCCodeStructModule {
ValaCCodeBaseModule parent_instance;
ValaCCodeStructModulePrivate * priv;
};
struct _ValaCCodeStructModuleClass {
ValaCCodeBaseModuleClass parent_class;
};
struct _ValaCCodeMethodModule {
ValaCCodeStructModule parent_instance;
ValaCCodeMethodModulePrivate * priv;
};
struct _ValaCCodeMethodModuleClass {
ValaCCodeStructModuleClass parent_class;
void (*generate_method_result_declaration) (ValaCCodeMethodModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeFunction* cfunc, ValaMap* cparam_map, ValaMap* carg_map);
ValaCCodeParameter* (*generate_parameter) (ValaCCodeMethodModule* self, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map);
};
struct _ValaCCodeControlFlowModule {
ValaCCodeMethodModule parent_instance;
ValaCCodeControlFlowModulePrivate * priv;
};
struct _ValaCCodeControlFlowModuleClass {
ValaCCodeMethodModuleClass parent_class;
};
struct _ValaCCodeMemberAccessModule {
ValaCCodeControlFlowModule parent_instance;
ValaCCodeMemberAccessModulePrivate * priv;
};
struct _ValaCCodeMemberAccessModuleClass {
ValaCCodeControlFlowModuleClass parent_class;
};
struct _ValaCCodeAssignmentModule {
ValaCCodeMemberAccessModule parent_instance;
ValaCCodeAssignmentModulePrivate * priv;
};
struct _ValaCCodeAssignmentModuleClass {
ValaCCodeMemberAccessModuleClass parent_class;
};
struct _ValaGLibValue {
ValaTargetValue parent_instance;
ValaGLibValuePrivate * priv;
ValaCCodeExpression* cvalue;
gboolean lvalue;
gboolean non_null;
gchar* ctype;
ValaList* array_length_cvalues;
ValaCCodeExpression* array_size_cvalue;
gboolean array_null_terminated;
ValaCCodeExpression* array_length_cexpr;
ValaCCodeExpression* delegate_target_cvalue;
ValaCCodeExpression* delegate_target_destroy_notify_cvalue;
};
struct _ValaGLibValueClass {
ValaTargetValueClass parent_class;
};
static gpointer vala_ccode_assignment_module_parent_class = NULL;
GType vala_ccode_base_module_get_type (void) G_GNUC_CONST;
gpointer vala_ccode_base_module_emit_context_ref (gpointer instance);
void vala_ccode_base_module_emit_context_unref (gpointer instance);
GParamSpec* vala_ccode_base_module_param_spec_emit_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_ccode_base_module_value_set_emit_context (GValue* value, gpointer v_object);
void vala_ccode_base_module_value_take_emit_context (GValue* value, gpointer v_object);
gpointer vala_ccode_base_module_value_get_emit_context (const GValue* value);
GType vala_ccode_base_module_emit_context_get_type (void) G_GNUC_CONST;
GType vala_ccode_struct_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_method_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_control_flow_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_member_access_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_assignment_module_get_type (void) G_GNUC_CONST;
enum {
VALA_CCODE_ASSIGNMENT_MODULE_DUMMY_PROPERTY
};
static ValaTargetValue* vala_ccode_assignment_module_emit_simple_assignment (ValaCCodeAssignmentModule* self, ValaAssignment* assignment);
gboolean vala_ccode_base_module_requires_destroy (ValaCCodeBaseModule* self, ValaDataType* type);
ValaCCodeFunction* vala_ccode_base_module_get_ccode (ValaCCodeBaseModule* self);
ValaCCodeExpression* vala_ccode_base_module_destroy_value (ValaCCodeBaseModule* self, ValaTargetValue* value, gboolean is_macro_definition);
void vala_ccode_base_module_store_value (ValaCCodeBaseModule* self, ValaTargetValue* lvalue, ValaTargetValue* value);
ValaCCodeExpression* vala_ccode_base_module_get_cvalue (ValaCCodeBaseModule* self, ValaExpression* expr);
ValaTargetValue* vala_ccode_base_module_load_variable (ValaCCodeBaseModule* self, ValaVariable* variable, ValaTargetValue* value);
ValaTargetValue* vala_ccode_base_module_store_temp_value (ValaCCodeBaseModule* self, ValaTargetValue* initializer, ValaCodeNode* node_reference, gboolean* value_owned);
static void vala_ccode_assignment_module_real_visit_assignment (ValaCodeVisitor* base, ValaAssignment* assignment);
void vala_ccode_base_module_store_property (ValaCCodeBaseModule* self, ValaProperty* prop, ValaExpression* instance, ValaTargetValue* value);
static void vala_ccode_assignment_module_real_store_value (ValaCCodeBaseModule* base, ValaTargetValue* lvalue, ValaTargetValue* value);
gchar* vala_ccode_base_module_get_ccode_name (ValaCodeNode* node);
ValaCCodeExpression* vala_ccode_base_module_get_cvalue_ (ValaCCodeBaseModule* self, ValaTargetValue* value);
gchar* vala_ccode_base_module_get_ctype (ValaCCodeBaseModule* self, ValaTargetValue* value);
GType vala_glib_value_get_type (void) G_GNUC_CONST;
ValaCCodeExpression* vala_ccode_base_module_get_array_length_cvalue (ValaCCodeBaseModule* self, ValaTargetValue* value, gint dim);
ValaCCodeExpression* vala_ccode_base_module_get_array_size_cvalue (ValaCCodeBaseModule* self, ValaTargetValue* value);
ValaCCodeExpression* vala_ccode_base_module_get_delegate_target_cvalue (ValaCCodeBaseModule* self, ValaTargetValue* value);
ValaCCodeExpression* vala_ccode_base_module_get_delegate_target_destroy_notify_cvalue (ValaCCodeBaseModule* self, ValaTargetValue* value);
static void vala_ccode_assignment_module_real_store_local (ValaCodeGenerator* base, ValaLocalVariable* local, ValaTargetValue* value, gboolean initializer);
ValaCCodeExpression* vala_ccode_base_module_destroy_local (ValaCCodeBaseModule* self, ValaLocalVariable* local);
ValaTargetValue* vala_ccode_base_module_get_local_cvalue (ValaCCodeBaseModule* self, ValaLocalVariable* local);
static void vala_ccode_assignment_module_real_store_parameter (ValaCodeGenerator* base, ValaParameter* param, ValaTargetValue* value);
ValaCCodeExpression* vala_ccode_base_module_destroy_parameter (ValaCCodeBaseModule* self, ValaParameter* param);
ValaTargetValue* vala_ccode_base_module_get_parameter_cvalue (ValaCCodeBaseModule* self, ValaParameter* param);
static void vala_ccode_assignment_module_real_store_field (ValaCodeGenerator* base, ValaField* field, ValaTargetValue* instance, ValaTargetValue* value);
ValaTargetValue* vala_ccode_base_module_get_field_cvalue (ValaCCodeBaseModule* self, ValaField* field, ValaTargetValue* instance);
ValaCCodeExpression* vala_ccode_base_module_destroy_field (ValaCCodeBaseModule* self, ValaField* field, ValaTargetValue* instance);
ValaCCodeAssignmentModule* vala_ccode_assignment_module_new (void);
ValaCCodeAssignmentModule* vala_ccode_assignment_module_construct (GType object_type);
ValaCCodeMemberAccessModule* vala_ccode_member_access_module_construct (GType object_type);
static gpointer _vala_code_node_ref0 (gpointer self) {
return self ? vala_code_node_ref (self) : NULL;
}
static ValaTargetValue* vala_ccode_assignment_module_emit_simple_assignment (ValaCCodeAssignmentModule* self, ValaAssignment* assignment) {
ValaTargetValue* result = NULL;
ValaAssignment* _tmp0_;
ValaExpression* _tmp1_;
ValaExpression* _tmp2_;
ValaSymbol* _tmp3_;
ValaSymbol* _tmp4_;
ValaVariable* _tmp5_;
ValaVariable* variable;
ValaAssignment* _tmp6_;
ValaExpression* _tmp7_;
ValaExpression* _tmp8_;
ValaDataType* _tmp9_;
ValaDataType* _tmp10_;
gboolean _tmp11_ = FALSE;
ValaAssignment* _tmp21_;
ValaAssignmentOperator _tmp22_;
ValaAssignmentOperator _tmp23_;
gboolean _tmp80_ = FALSE;
ValaAssignment* _tmp81_;
ValaExpression* _tmp82_;
ValaExpression* _tmp83_;
ValaDataType* _tmp84_;
ValaDataType* _tmp85_;
gboolean _tmp93_;
g_return_val_if_fail (self != NULL, NULL);
g_return_val_if_fail (assignment != NULL, NULL);
_tmp0_ = assignment;
_tmp1_ = vala_assignment_get_left (_tmp0_);
_tmp2_ = _tmp1_;
_tmp3_ = vala_expression_get_symbol_reference (_tmp2_);
_tmp4_ = _tmp3_;
_tmp5_ = _vala_code_node_ref0 (VALA_VARIABLE (_tmp4_));
variable = _tmp5_;
_tmp6_ = assignment;
_tmp7_ = vala_assignment_get_left (_tmp6_);
_tmp8_ = _tmp7_;
_tmp9_ = vala_expression_get_value_type (_tmp8_);
_tmp10_ = _tmp9_;
_tmp11_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp10_);
if (_tmp11_) {
ValaCCodeFunction* _tmp12_;
ValaCCodeFunction* _tmp13_;
ValaAssignment* _tmp14_;
ValaExpression* _tmp15_;
ValaExpression* _tmp16_;
ValaTargetValue* _tmp17_;
ValaTargetValue* _tmp18_;
ValaCCodeExpression* _tmp19_ = NULL;
ValaCCodeExpression* _tmp20_;
_tmp12_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp13_ = _tmp12_;
_tmp14_ = assignment;
_tmp15_ = vala_assignment_get_left (_tmp14_);
_tmp16_ = _tmp15_;
_tmp17_ = vala_expression_get_target_value (_tmp16_);
_tmp18_ = _tmp17_;
_tmp19_ = vala_ccode_base_module_destroy_value ((ValaCCodeBaseModule*) self, _tmp18_, FALSE);
_tmp20_ = _tmp19_;
vala_ccode_function_add_expression (_tmp13_, _tmp20_);
_vala_ccode_node_unref0 (_tmp20_);
}
_tmp21_ = assignment;
_tmp22_ = vala_assignment_get_operator (_tmp21_);
_tmp23_ = _tmp22_;
if (_tmp23_ == VALA_ASSIGNMENT_OPERATOR_SIMPLE) {
ValaAssignment* _tmp24_;
ValaExpression* _tmp25_;
ValaExpression* _tmp26_;
ValaTargetValue* _tmp27_;
ValaTargetValue* _tmp28_;
ValaAssignment* _tmp29_;
ValaExpression* _tmp30_;
ValaExpression* _tmp31_;
ValaTargetValue* _tmp32_;
ValaTargetValue* _tmp33_;
_tmp24_ = assignment;
_tmp25_ = vala_assignment_get_left (_tmp24_);
_tmp26_ = _tmp25_;
_tmp27_ = vala_expression_get_target_value (_tmp26_);
_tmp28_ = _tmp27_;
_tmp29_ = assignment;
_tmp30_ = vala_assignment_get_right (_tmp29_);
_tmp31_ = _tmp30_;
_tmp32_ = vala_expression_get_target_value (_tmp31_);
_tmp33_ = _tmp32_;
vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp28_, _tmp33_);
} else {
ValaCCodeAssignmentOperator cop = 0;
ValaAssignment* _tmp34_;
ValaAssignmentOperator _tmp35_;
ValaAssignmentOperator _tmp36_;
ValaAssignment* _tmp64_;
ValaExpression* _tmp65_;
ValaExpression* _tmp66_;
ValaCCodeExpression* _tmp67_ = NULL;
ValaCCodeExpression* _tmp68_;
ValaAssignment* _tmp69_;
ValaExpression* _tmp70_;
ValaExpression* _tmp71_;
ValaCCodeExpression* _tmp72_ = NULL;
ValaCCodeExpression* _tmp73_;
ValaCCodeAssignmentOperator _tmp74_;
ValaCCodeAssignment* _tmp75_;
ValaCCodeExpression* _tmp76_;
ValaCCodeExpression* codenode;
ValaCCodeFunction* _tmp77_;
ValaCCodeFunction* _tmp78_;
ValaCCodeExpression* _tmp79_;
_tmp34_ = assignment;
_tmp35_ = vala_assignment_get_operator (_tmp34_);
_tmp36_ = _tmp35_;
if (_tmp36_ == VALA_ASSIGNMENT_OPERATOR_BITWISE_OR) {
cop = VALA_CCODE_ASSIGNMENT_OPERATOR_BITWISE_OR;
} else {
ValaAssignment* _tmp37_;
ValaAssignmentOperator _tmp38_;
ValaAssignmentOperator _tmp39_;
_tmp37_ = assignment;
_tmp38_ = vala_assignment_get_operator (_tmp37_);
_tmp39_ = _tmp38_;
if (_tmp39_ == VALA_ASSIGNMENT_OPERATOR_BITWISE_AND) {
cop = VALA_CCODE_ASSIGNMENT_OPERATOR_BITWISE_AND;
} else {
ValaAssignment* _tmp40_;
ValaAssignmentOperator _tmp41_;
ValaAssignmentOperator _tmp42_;
_tmp40_ = assignment;
_tmp41_ = vala_assignment_get_operator (_tmp40_);
_tmp42_ = _tmp41_;
if (_tmp42_ == VALA_ASSIGNMENT_OPERATOR_BITWISE_XOR) {
cop = VALA_CCODE_ASSIGNMENT_OPERATOR_BITWISE_XOR;
} else {
ValaAssignment* _tmp43_;
ValaAssignmentOperator _tmp44_;
ValaAssignmentOperator _tmp45_;
_tmp43_ = assignment;
_tmp44_ = vala_assignment_get_operator (_tmp43_);
_tmp45_ = _tmp44_;
if (_tmp45_ == VALA_ASSIGNMENT_OPERATOR_ADD) {
cop = VALA_CCODE_ASSIGNMENT_OPERATOR_ADD;
} else {
ValaAssignment* _tmp46_;
ValaAssignmentOperator _tmp47_;
ValaAssignmentOperator _tmp48_;
_tmp46_ = assignment;
_tmp47_ = vala_assignment_get_operator (_tmp46_);
_tmp48_ = _tmp47_;
if (_tmp48_ == VALA_ASSIGNMENT_OPERATOR_SUB) {
cop = VALA_CCODE_ASSIGNMENT_OPERATOR_SUB;
} else {
ValaAssignment* _tmp49_;
ValaAssignmentOperator _tmp50_;
ValaAssignmentOperator _tmp51_;
_tmp49_ = assignment;
_tmp50_ = vala_assignment_get_operator (_tmp49_);
_tmp51_ = _tmp50_;
if (_tmp51_ == VALA_ASSIGNMENT_OPERATOR_MUL) {
cop = VALA_CCODE_ASSIGNMENT_OPERATOR_MUL;
} else {
ValaAssignment* _tmp52_;
ValaAssignmentOperator _tmp53_;
ValaAssignmentOperator _tmp54_;
_tmp52_ = assignment;
_tmp53_ = vala_assignment_get_operator (_tmp52_);
_tmp54_ = _tmp53_;
if (_tmp54_ == VALA_ASSIGNMENT_OPERATOR_DIV) {
cop = VALA_CCODE_ASSIGNMENT_OPERATOR_DIV;
} else {
ValaAssignment* _tmp55_;
ValaAssignmentOperator _tmp56_;
ValaAssignmentOperator _tmp57_;
_tmp55_ = assignment;
_tmp56_ = vala_assignment_get_operator (_tmp55_);
_tmp57_ = _tmp56_;
if (_tmp57_ == VALA_ASSIGNMENT_OPERATOR_PERCENT) {
cop = VALA_CCODE_ASSIGNMENT_OPERATOR_PERCENT;
} else {
ValaAssignment* _tmp58_;
ValaAssignmentOperator _tmp59_;
ValaAssignmentOperator _tmp60_;
_tmp58_ = assignment;
_tmp59_ = vala_assignment_get_operator (_tmp58_);
_tmp60_ = _tmp59_;
if (_tmp60_ == VALA_ASSIGNMENT_OPERATOR_SHIFT_LEFT) {
cop = VALA_CCODE_ASSIGNMENT_OPERATOR_SHIFT_LEFT;
} else {
ValaAssignment* _tmp61_;
ValaAssignmentOperator _tmp62_;
ValaAssignmentOperator _tmp63_;
_tmp61_ = assignment;
_tmp62_ = vala_assignment_get_operator (_tmp61_);
_tmp63_ = _tmp62_;
if (_tmp63_ == VALA_ASSIGNMENT_OPERATOR_SHIFT_RIGHT) {
cop = VALA_CCODE_ASSIGNMENT_OPERATOR_SHIFT_RIGHT;
} else {
g_assert_not_reached ();
}
}
}
}
}
}
}
}
}
}
_tmp64_ = assignment;
_tmp65_ = vala_assignment_get_left (_tmp64_);
_tmp66_ = _tmp65_;
_tmp67_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp66_);
_tmp68_ = _tmp67_;
_tmp69_ = assignment;
_tmp70_ = vala_assignment_get_right (_tmp69_);
_tmp71_ = _tmp70_;
_tmp72_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp71_);
_tmp73_ = _tmp72_;
_tmp74_ = cop;
_tmp75_ = vala_ccode_assignment_new (_tmp68_, _tmp73_, _tmp74_);
_tmp76_ = (ValaCCodeExpression*) _tmp75_;
_vala_ccode_node_unref0 (_tmp73_);
_vala_ccode_node_unref0 (_tmp68_);
codenode = _tmp76_;
_tmp77_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp78_ = _tmp77_;
_tmp79_ = codenode;
vala_ccode_function_add_expression (_tmp78_, _tmp79_);
_vala_ccode_node_unref0 (codenode);
}
_tmp81_ = assignment;
_tmp82_ = vala_assignment_get_left (_tmp81_);
_tmp83_ = _tmp82_;
_tmp84_ = vala_expression_get_value_type (_tmp83_);
_tmp85_ = _tmp84_;
if (VALA_IS_ARRAY_TYPE (_tmp85_)) {
ValaAssignment* _tmp86_;
ValaExpression* _tmp87_;
ValaExpression* _tmp88_;
ValaDataType* _tmp89_;
ValaDataType* _tmp90_;
gboolean _tmp91_;
gboolean _tmp92_;
_tmp86_ = assignment;
_tmp87_ = vala_assignment_get_left (_tmp86_);
_tmp88_ = _tmp87_;
_tmp89_ = vala_expression_get_value_type (_tmp88_);
_tmp90_ = _tmp89_;
_tmp91_ = vala_array_type_get_inline_allocated (VALA_ARRAY_TYPE (_tmp90_));
_tmp92_ = _tmp91_;
_tmp80_ = _tmp92_;
} else {
_tmp80_ = FALSE;
}
_tmp93_ = _tmp80_;
if (_tmp93_) {
ValaVariable* _tmp94_;
ValaAssignment* _tmp95_;
ValaExpression* _tmp96_;
ValaExpression* _tmp97_;
ValaTargetValue* _tmp98_;
ValaTargetValue* _tmp99_;
ValaTargetValue* _tmp100_ = NULL;
_tmp94_ = variable;
_tmp95_ = assignment;
_tmp96_ = vala_assignment_get_left (_tmp95_);
_tmp97_ = _tmp96_;
_tmp98_ = vala_expression_get_target_value (_tmp97_);
_tmp99_ = _tmp98_;
_tmp100_ = vala_ccode_base_module_load_variable ((ValaCCodeBaseModule*) self, _tmp94_, _tmp99_);
result = _tmp100_;
_vala_code_node_unref0 (variable);
return result;
} else {
ValaAssignment* _tmp101_;
ValaExpression* _tmp102_;
ValaExpression* _tmp103_;
ValaTargetValue* _tmp104_;
ValaTargetValue* _tmp105_;
ValaAssignment* _tmp106_;
ValaTargetValue* _tmp107_ = NULL;
_tmp101_ = assignment;
_tmp102_ = vala_assignment_get_left (_tmp101_);
_tmp103_ = _tmp102_;
_tmp104_ = vala_expression_get_target_value (_tmp103_);
_tmp105_ = _tmp104_;
_tmp106_ = assignment;
_tmp107_ = vala_ccode_base_module_store_temp_value ((ValaCCodeBaseModule*) self, _tmp105_, (ValaCodeNode*) _tmp106_, NULL);
result = _tmp107_;
_vala_code_node_unref0 (variable);
return result;
}
_vala_code_node_unref0 (variable);
}
static void vala_ccode_assignment_module_real_visit_assignment (ValaCodeVisitor* base, ValaAssignment* assignment) {
ValaCCodeAssignmentModule * self;
gboolean _tmp0_ = FALSE;
ValaAssignment* _tmp1_;
ValaExpression* _tmp2_;
ValaExpression* _tmp3_;
gboolean _tmp4_;
gboolean _tmp5_;
gboolean _tmp11_;
ValaAssignment* _tmp13_;
ValaExpression* _tmp14_;
ValaExpression* _tmp15_;
ValaSymbol* _tmp16_;
ValaSymbol* _tmp17_;
self = (ValaCCodeAssignmentModule*) base;
g_return_if_fail (assignment != NULL);
_tmp1_ = assignment;
_tmp2_ = vala_assignment_get_left (_tmp1_);
_tmp3_ = _tmp2_;
_tmp4_ = vala_code_node_get_error ((ValaCodeNode*) _tmp3_);
_tmp5_ = _tmp4_;
if (_tmp5_) {
_tmp0_ = TRUE;
} else {
ValaAssignment* _tmp6_;
ValaExpression* _tmp7_;
ValaExpression* _tmp8_;
gboolean _tmp9_;
gboolean _tmp10_;
_tmp6_ = assignment;
_tmp7_ = vala_assignment_get_right (_tmp6_);
_tmp8_ = _tmp7_;
_tmp9_ = vala_code_node_get_error ((ValaCodeNode*) _tmp8_);
_tmp10_ = _tmp9_;
_tmp0_ = _tmp10_;
}
_tmp11_ = _tmp0_;
if (_tmp11_) {
ValaAssignment* _tmp12_;
_tmp12_ = assignment;
vala_code_node_set_error ((ValaCodeNode*) _tmp12_, TRUE);
return;
}
_tmp13_ = assignment;
_tmp14_ = vala_assignment_get_left (_tmp13_);
_tmp15_ = _tmp14_;
_tmp16_ = vala_expression_get_symbol_reference (_tmp15_);
_tmp17_ = _tmp16_;
if (VALA_IS_PROPERTY (_tmp17_)) {
ValaAssignment* _tmp18_;
ValaExpression* _tmp19_;
ValaExpression* _tmp20_;
ValaMemberAccess* _tmp21_;
ValaMemberAccess* ma;
ValaAssignment* _tmp22_;
ValaExpression* _tmp23_;
ValaExpression* _tmp24_;
ValaSymbol* _tmp25_;
ValaSymbol* _tmp26_;
ValaProperty* _tmp27_;
ValaProperty* prop;
ValaProperty* _tmp28_;
ValaMemberAccess* _tmp29_;
ValaExpression* _tmp30_;
ValaExpression* _tmp31_;
ValaAssignment* _tmp32_;
ValaExpression* _tmp33_;
ValaExpression* _tmp34_;
ValaTargetValue* _tmp35_;
ValaTargetValue* _tmp36_;
ValaAssignment* _tmp37_;
ValaAssignment* _tmp38_;
ValaExpression* _tmp39_;
ValaExpression* _tmp40_;
ValaTargetValue* _tmp41_;
ValaTargetValue* _tmp42_;
_tmp18_ = assignment;
_tmp19_ = vala_assignment_get_left (_tmp18_);
_tmp20_ = _tmp19_;
_tmp21_ = _vala_code_node_ref0 (VALA_IS_MEMBER_ACCESS (_tmp20_) ? ((ValaMemberAccess*) _tmp20_) : NULL);
ma = _tmp21_;
_tmp22_ = assignment;
_tmp23_ = vala_assignment_get_left (_tmp22_);
_tmp24_ = _tmp23_;
_tmp25_ = vala_expression_get_symbol_reference (_tmp24_);
_tmp26_ = _tmp25_;
_tmp27_ = _vala_code_node_ref0 (VALA_PROPERTY (_tmp26_));
prop = _tmp27_;
_tmp28_ = prop;
_tmp29_ = ma;
_tmp30_ = vala_member_access_get_inner (_tmp29_);
_tmp31_ = _tmp30_;
_tmp32_ = assignment;
_tmp33_ = vala_assignment_get_right (_tmp32_);
_tmp34_ = _tmp33_;
_tmp35_ = vala_expression_get_target_value (_tmp34_);
_tmp36_ = _tmp35_;
vala_ccode_base_module_store_property ((ValaCCodeBaseModule*) self, _tmp28_, _tmp31_, _tmp36_);
_tmp37_ = assignment;
_tmp38_ = assignment;
_tmp39_ = vala_assignment_get_right (_tmp38_);
_tmp40_ = _tmp39_;
_tmp41_ = vala_expression_get_target_value (_tmp40_);
_tmp42_ = _tmp41_;
vala_expression_set_target_value ((ValaExpression*) _tmp37_, _tmp42_);
_vala_code_node_unref0 (prop);
_vala_code_node_unref0 (ma);
} else {
ValaAssignment* _tmp43_;
ValaAssignment* _tmp44_;
ValaTargetValue* _tmp45_ = NULL;
ValaTargetValue* _tmp46_;
_tmp43_ = assignment;
_tmp44_ = assignment;
_tmp45_ = vala_ccode_assignment_module_emit_simple_assignment (self, _tmp44_);
_tmp46_ = _tmp45_;
vala_expression_set_target_value ((ValaExpression*) _tmp43_, _tmp46_);
_vala_target_value_unref0 (_tmp46_);
}
}
static gpointer _vala_target_value_ref0 (gpointer self) {
return self ? vala_target_value_ref (self) : NULL;
}
static void vala_ccode_assignment_module_real_store_value (ValaCCodeBaseModule* base, ValaTargetValue* lvalue, ValaTargetValue* value) {
ValaCCodeAssignmentModule * self;
ValaTargetValue* _tmp0_;
ValaDataType* _tmp1_;
ValaDataType* _tmp2_;
ValaArrayType* _tmp3_;
ValaArrayType* array_type;
gboolean _tmp4_ = FALSE;
ValaArrayType* _tmp5_;
gboolean _tmp9_;
ValaTargetValue* _tmp50_;
ValaCCodeExpression* _tmp51_ = NULL;
ValaCCodeExpression* cexpr;
ValaTargetValue* _tmp52_;
gchar* _tmp53_ = NULL;
gchar* _tmp54_;
gboolean _tmp55_;
ValaCCodeFunction* _tmp61_;
ValaCCodeFunction* _tmp62_;
ValaTargetValue* _tmp63_;
ValaCCodeExpression* _tmp64_ = NULL;
ValaCCodeExpression* _tmp65_;
ValaCCodeExpression* _tmp66_;
gboolean _tmp67_ = FALSE;
ValaArrayType* _tmp68_;
gboolean _tmp71_;
ValaTargetValue* _tmp140_;
ValaDataType* _tmp141_;
ValaDataType* _tmp142_;
ValaDelegateType* _tmp143_;
ValaDelegateType* delegate_type;
gboolean _tmp144_ = FALSE;
ValaDelegateType* _tmp145_;
gboolean _tmp151_;
self = (ValaCCodeAssignmentModule*) base;
g_return_if_fail (lvalue != NULL);
g_return_if_fail (value != NULL);
_tmp0_ = lvalue;
_tmp1_ = vala_target_value_get_value_type (_tmp0_);
_tmp2_ = _tmp1_;
_tmp3_ = _vala_code_node_ref0 (VALA_IS_ARRAY_TYPE (_tmp2_) ? ((ValaArrayType*) _tmp2_) : NULL);
array_type = _tmp3_;
_tmp5_ = array_type;
if (_tmp5_ != NULL) {
ValaArrayType* _tmp6_;
gboolean _tmp7_;
gboolean _tmp8_;
_tmp6_ = array_type;
_tmp7_ = vala_array_type_get_fixed_length (_tmp6_);
_tmp8_ = _tmp7_;
_tmp4_ = _tmp8_;
} else {
_tmp4_ = FALSE;
}
_tmp9_ = _tmp4_;
if (_tmp9_) {
ValaCCodeFile* _tmp10_;
ValaCCodeIdentifier* _tmp11_;
ValaCCodeIdentifier* _tmp12_;
ValaCCodeFunctionCall* _tmp13_;
ValaCCodeFunctionCall* _tmp14_;
ValaCCodeFunctionCall* sizeof_call;
ValaCCodeFunctionCall* _tmp15_;
ValaArrayType* _tmp16_;
ValaDataType* _tmp17_;
ValaDataType* _tmp18_;
gchar* _tmp19_ = NULL;
gchar* _tmp20_;
ValaCCodeIdentifier* _tmp21_;
ValaCCodeIdentifier* _tmp22_;
ValaArrayType* _tmp23_;
gint _tmp24_;
gint _tmp25_;
gchar* _tmp26_ = NULL;
gchar* _tmp27_;
ValaCCodeConstant* _tmp28_;
ValaCCodeConstant* _tmp29_;
ValaCCodeFunctionCall* _tmp30_;
ValaCCodeBinaryExpression* _tmp31_;
ValaCCodeBinaryExpression* _tmp32_;
ValaCCodeBinaryExpression* size;
ValaCCodeIdentifier* _tmp33_;
ValaCCodeIdentifier* _tmp34_;
ValaCCodeFunctionCall* _tmp35_;
ValaCCodeFunctionCall* _tmp36_;
ValaCCodeFunctionCall* ccopy;
ValaCCodeFunctionCall* _tmp37_;
ValaTargetValue* _tmp38_;
ValaCCodeExpression* _tmp39_ = NULL;
ValaCCodeExpression* _tmp40_;
ValaCCodeFunctionCall* _tmp41_;
ValaTargetValue* _tmp42_;
ValaCCodeExpression* _tmp43_ = NULL;
ValaCCodeExpression* _tmp44_;
ValaCCodeFunctionCall* _tmp45_;
ValaCCodeBinaryExpression* _tmp46_;
ValaCCodeFunction* _tmp47_;
ValaCCodeFunction* _tmp48_;
ValaCCodeFunctionCall* _tmp49_;
_tmp10_ = ((ValaCCodeBaseModule*) self)->cfile;
vala_ccode_file_add_include (_tmp10_, "string.h", FALSE);
_tmp11_ = vala_ccode_identifier_new ("sizeof");
_tmp12_ = _tmp11_;
_tmp13_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp12_);
_tmp14_ = _tmp13_;
_vala_ccode_node_unref0 (_tmp12_);
sizeof_call = _tmp14_;
_tmp15_ = sizeof_call;
_tmp16_ = array_type;
_tmp17_ = vala_array_type_get_element_type (_tmp16_);
_tmp18_ = _tmp17_;
_tmp19_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp18_);
_tmp20_ = _tmp19_;
_tmp21_ = vala_ccode_identifier_new (_tmp20_);
_tmp22_ = _tmp21_;
vala_ccode_function_call_add_argument (_tmp15_, (ValaCCodeExpression*) _tmp22_);
_vala_ccode_node_unref0 (_tmp22_);
_g_free0 (_tmp20_);
_tmp23_ = array_type;
_tmp24_ = vala_array_type_get_length (_tmp23_);
_tmp25_ = _tmp24_;
_tmp26_ = g_strdup_printf ("%d", _tmp25_);
_tmp27_ = _tmp26_;
_tmp28_ = vala_ccode_constant_new (_tmp27_);
_tmp29_ = _tmp28_;
_tmp30_ = sizeof_call;
_tmp31_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp29_, (ValaCCodeExpression*) _tmp30_);
_tmp32_ = _tmp31_;
_vala_ccode_node_unref0 (_tmp29_);
_g_free0 (_tmp27_);
size = _tmp32_;
_tmp33_ = vala_ccode_identifier_new ("memcpy");
_tmp34_ = _tmp33_;
_tmp35_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp34_);
_tmp36_ = _tmp35_;
_vala_ccode_node_unref0 (_tmp34_);
ccopy = _tmp36_;
_tmp37_ = ccopy;
_tmp38_ = lvalue;
_tmp39_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp38_);
_tmp40_ = _tmp39_;
vala_ccode_function_call_add_argument (_tmp37_, _tmp40_);
_vala_ccode_node_unref0 (_tmp40_);
_tmp41_ = ccopy;
_tmp42_ = value;
_tmp43_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp42_);
_tmp44_ = _tmp43_;
vala_ccode_function_call_add_argument (_tmp41_, _tmp44_);
_vala_ccode_node_unref0 (_tmp44_);
_tmp45_ = ccopy;
_tmp46_ = size;
vala_ccode_function_call_add_argument (_tmp45_, (ValaCCodeExpression*) _tmp46_);
_tmp47_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp48_ = _tmp47_;
_tmp49_ = ccopy;
vala_ccode_function_add_expression (_tmp48_, (ValaCCodeExpression*) _tmp49_);
_vala_ccode_node_unref0 (ccopy);
_vala_ccode_node_unref0 (size);
_vala_ccode_node_unref0 (sizeof_call);
_vala_code_node_unref0 (array_type);
return;
}
_tmp50_ = value;
_tmp51_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp50_);
cexpr = _tmp51_;
_tmp52_ = lvalue;
_tmp53_ = vala_ccode_base_module_get_ctype ((ValaCCodeBaseModule*) self, _tmp52_);
_tmp54_ = _tmp53_;
_tmp55_ = _tmp54_ != NULL;
_g_free0 (_tmp54_);
if (_tmp55_) {
ValaCCodeExpression* _tmp56_;
ValaTargetValue* _tmp57_;
gchar* _tmp58_ = NULL;
gchar* _tmp59_;
ValaCCodeCastExpression* _tmp60_;
_tmp56_ = cexpr;
_tmp57_ = lvalue;
_tmp58_ = vala_ccode_base_module_get_ctype ((ValaCCodeBaseModule*) self, _tmp57_);
_tmp59_ = _tmp58_;
_tmp60_ = vala_ccode_cast_expression_new (_tmp56_, _tmp59_);
_vala_ccode_node_unref0 (cexpr);
cexpr = (ValaCCodeExpression*) _tmp60_;
_g_free0 (_tmp59_);
}
_tmp61_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp62_ = _tmp61_;
_tmp63_ = lvalue;
_tmp64_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp63_);
_tmp65_ = _tmp64_;
_tmp66_ = cexpr;
vala_ccode_function_add_assignment (_tmp62_, _tmp65_, _tmp66_);
_vala_ccode_node_unref0 (_tmp65_);
_tmp68_ = array_type;
if (_tmp68_ != NULL) {
ValaTargetValue* _tmp69_;
ValaList* _tmp70_;
_tmp69_ = lvalue;
_tmp70_ = VALA_GLIB_VALUE (_tmp69_)->array_length_cvalues;
_tmp67_ = _tmp70_ != NULL;
} else {
_tmp67_ = FALSE;
}
_tmp71_ = _tmp67_;
if (_tmp71_) {
ValaTargetValue* _tmp72_;
ValaGLibValue* _tmp73_;
ValaGLibValue* glib_value;
ValaGLibValue* _tmp74_;
ValaList* _tmp75_;
gboolean _tmp124_ = FALSE;
ValaArrayType* _tmp125_;
gint _tmp126_;
gint _tmp127_;
gboolean _tmp131_;
_tmp72_ = value;
_tmp73_ = _vala_target_value_ref0 (VALA_GLIB_VALUE (_tmp72_));
glib_value = _tmp73_;
_tmp74_ = glib_value;
_tmp75_ = _tmp74_->array_length_cvalues;
if (_tmp75_ != NULL) {
{
gint dim;
dim = 1;
{
gboolean _tmp76_;
_tmp76_ = TRUE;
while (TRUE) {
gboolean _tmp77_;
gint _tmp79_;
ValaArrayType* _tmp80_;
gint _tmp81_;
gint _tmp82_;
ValaCCodeFunction* _tmp83_;
ValaCCodeFunction* _tmp84_;
ValaTargetValue* _tmp85_;
gint _tmp86_;
ValaCCodeExpression* _tmp87_ = NULL;
ValaCCodeExpression* _tmp88_;
ValaTargetValue* _tmp89_;
gint _tmp90_;
ValaCCodeExpression* _tmp91_ = NULL;
ValaCCodeExpression* _tmp92_;
_tmp77_ = _tmp76_;
if (!_tmp77_) {
gint _tmp78_;
_tmp78_ = dim;
dim = _tmp78_ + 1;
}
_tmp76_ = FALSE;
_tmp79_ = dim;
_tmp80_ = array_type;
_tmp81_ = vala_array_type_get_rank (_tmp80_);
_tmp82_ = _tmp81_;
if (!(_tmp79_ <= _tmp82_)) {
break;
}
_tmp83_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp84_ = _tmp83_;
_tmp85_ = lvalue;
_tmp86_ = dim;
_tmp87_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp85_, _tmp86_);
_tmp88_ = _tmp87_;
_tmp89_ = value;
_tmp90_ = dim;
_tmp91_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp89_, _tmp90_);
_tmp92_ = _tmp91_;
vala_ccode_function_add_assignment (_tmp84_, _tmp88_, _tmp92_);
_vala_ccode_node_unref0 (_tmp92_);
_vala_ccode_node_unref0 (_tmp88_);
}
}
}
} else {
ValaGLibValue* _tmp93_;
gboolean _tmp94_;
_tmp93_ = glib_value;
_tmp94_ = _tmp93_->array_null_terminated;
if (_tmp94_) {
ValaCCodeIdentifier* _tmp95_;
ValaCCodeIdentifier* _tmp96_;
ValaCCodeFunctionCall* _tmp97_;
ValaCCodeFunctionCall* _tmp98_;
ValaCCodeFunctionCall* len_call;
ValaCCodeFunctionCall* _tmp99_;
ValaTargetValue* _tmp100_;
ValaCCodeExpression* _tmp101_ = NULL;
ValaCCodeExpression* _tmp102_;
ValaCCodeFunction* _tmp103_;
ValaCCodeFunction* _tmp104_;
ValaTargetValue* _tmp105_;
ValaCCodeExpression* _tmp106_ = NULL;
ValaCCodeExpression* _tmp107_;
ValaCCodeFunctionCall* _tmp108_;
((ValaCCodeBaseModule*) self)->requires_array_length = TRUE;
_tmp95_ = vala_ccode_identifier_new ("_vala_array_length");
_tmp96_ = _tmp95_;
_tmp97_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp96_);
_tmp98_ = _tmp97_;
_vala_ccode_node_unref0 (_tmp96_);
len_call = _tmp98_;
_tmp99_ = len_call;
_tmp100_ = value;
_tmp101_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp100_);
_tmp102_ = _tmp101_;
vala_ccode_function_call_add_argument (_tmp99_, _tmp102_);
_vala_ccode_node_unref0 (_tmp102_);
_tmp103_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp104_ = _tmp103_;
_tmp105_ = lvalue;
_tmp106_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp105_, 1);
_tmp107_ = _tmp106_;
_tmp108_ = len_call;
vala_ccode_function_add_assignment (_tmp104_, _tmp107_, (ValaCCodeExpression*) _tmp108_);
_vala_ccode_node_unref0 (_tmp107_);
_vala_ccode_node_unref0 (len_call);
} else {
{
gint dim;
dim = 1;
{
gboolean _tmp109_;
_tmp109_ = TRUE;
while (TRUE) {
gboolean _tmp110_;
gint _tmp112_;
ValaArrayType* _tmp113_;
gint _tmp114_;
gint _tmp115_;
ValaCCodeFunction* _tmp116_;
ValaCCodeFunction* _tmp117_;
ValaTargetValue* _tmp118_;
gint _tmp119_;
ValaCCodeExpression* _tmp120_ = NULL;
ValaCCodeExpression* _tmp121_;
ValaCCodeConstant* _tmp122_;
ValaCCodeConstant* _tmp123_;
_tmp110_ = _tmp109_;
if (!_tmp110_) {
gint _tmp111_;
_tmp111_ = dim;
dim = _tmp111_ + 1;
}
_tmp109_ = FALSE;
_tmp112_ = dim;
_tmp113_ = array_type;
_tmp114_ = vala_array_type_get_rank (_tmp113_);
_tmp115_ = _tmp114_;
if (!(_tmp112_ <= _tmp115_)) {
break;
}
_tmp116_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp117_ = _tmp116_;
_tmp118_ = lvalue;
_tmp119_ = dim;
_tmp120_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp118_, _tmp119_);
_tmp121_ = _tmp120_;
_tmp122_ = vala_ccode_constant_new ("-1");
_tmp123_ = _tmp122_;
vala_ccode_function_add_assignment (_tmp117_, _tmp121_, (ValaCCodeExpression*) _tmp123_);
_vala_ccode_node_unref0 (_tmp123_);
_vala_ccode_node_unref0 (_tmp121_);
}
}
}
}
}
_tmp125_ = array_type;
_tmp126_ = vala_array_type_get_rank (_tmp125_);
_tmp127_ = _tmp126_;
if (_tmp127_ == 1) {
ValaTargetValue* _tmp128_;
ValaCCodeExpression* _tmp129_ = NULL;
ValaCCodeExpression* _tmp130_;
_tmp128_ = lvalue;
_tmp129_ = vala_ccode_base_module_get_array_size_cvalue ((ValaCCodeBaseModule*) self, _tmp128_);
_tmp130_ = _tmp129_;
_tmp124_ = _tmp130_ != NULL;
_vala_ccode_node_unref0 (_tmp130_);
} else {
_tmp124_ = FALSE;
}
_tmp131_ = _tmp124_;
if (_tmp131_) {
ValaCCodeFunction* _tmp132_;
ValaCCodeFunction* _tmp133_;
ValaTargetValue* _tmp134_;
ValaCCodeExpression* _tmp135_ = NULL;
ValaCCodeExpression* _tmp136_;
ValaTargetValue* _tmp137_;
ValaCCodeExpression* _tmp138_ = NULL;
ValaCCodeExpression* _tmp139_;
_tmp132_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp133_ = _tmp132_;
_tmp134_ = lvalue;
_tmp135_ = vala_ccode_base_module_get_array_size_cvalue ((ValaCCodeBaseModule*) self, _tmp134_);
_tmp136_ = _tmp135_;
_tmp137_ = lvalue;
_tmp138_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp137_, 1);
_tmp139_ = _tmp138_;
vala_ccode_function_add_assignment (_tmp133_, _tmp136_, _tmp139_);
_vala_ccode_node_unref0 (_tmp139_);
_vala_ccode_node_unref0 (_tmp136_);
}
_vala_target_value_unref0 (glib_value);
}
_tmp140_ = lvalue;
_tmp141_ = vala_target_value_get_value_type (_tmp140_);
_tmp142_ = _tmp141_;
_tmp143_ = _vala_code_node_ref0 (VALA_IS_DELEGATE_TYPE (_tmp142_) ? ((ValaDelegateType*) _tmp142_) : NULL);
delegate_type = _tmp143_;
_tmp145_ = delegate_type;
if (_tmp145_ != NULL) {
ValaDelegateType* _tmp146_;
ValaDelegate* _tmp147_;
ValaDelegate* _tmp148_;
gboolean _tmp149_;
gboolean _tmp150_;
_tmp146_ = delegate_type;
_tmp147_ = vala_delegate_type_get_delegate_symbol (_tmp146_);
_tmp148_ = _tmp147_;
_tmp149_ = vala_delegate_get_has_target (_tmp148_);
_tmp150_ = _tmp149_;
_tmp144_ = _tmp150_;
} else {
_tmp144_ = FALSE;
}
_tmp151_ = _tmp144_;
if (_tmp151_) {
ValaTargetValue* _tmp152_;
ValaCCodeExpression* _tmp153_ = NULL;
ValaCCodeExpression* _tmp154_;
gboolean _tmp155_;
_tmp152_ = lvalue;
_tmp153_ = vala_ccode_base_module_get_delegate_target_cvalue ((ValaCCodeBaseModule*) self, _tmp152_);
_tmp154_ = _tmp153_;
_tmp155_ = _tmp154_ != NULL;
_vala_ccode_node_unref0 (_tmp154_);
if (_tmp155_) {
ValaCCodeFunction* _tmp156_;
ValaCCodeFunction* _tmp157_;
ValaTargetValue* _tmp158_;
ValaCCodeExpression* _tmp159_ = NULL;
ValaCCodeExpression* _tmp160_;
ValaTargetValue* _tmp161_;
ValaCCodeExpression* _tmp162_ = NULL;
ValaCCodeExpression* _tmp163_;
ValaTargetValue* _tmp164_;
ValaCCodeExpression* _tmp165_ = NULL;
ValaCCodeExpression* _tmp166_;
gboolean _tmp167_;
_tmp156_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp157_ = _tmp156_;
_tmp158_ = lvalue;
_tmp159_ = vala_ccode_base_module_get_delegate_target_cvalue ((ValaCCodeBaseModule*) self, _tmp158_);
_tmp160_ = _tmp159_;
_tmp161_ = value;
_tmp162_ = vala_ccode_base_module_get_delegate_target_cvalue ((ValaCCodeBaseModule*) self, _tmp161_);
_tmp163_ = _tmp162_;
vala_ccode_function_add_assignment (_tmp157_, _tmp160_, _tmp163_);
_vala_ccode_node_unref0 (_tmp163_);
_vala_ccode_node_unref0 (_tmp160_);
_tmp164_ = lvalue;
_tmp165_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cvalue ((ValaCCodeBaseModule*) self, _tmp164_);
_tmp166_ = _tmp165_;
_tmp167_ = _tmp166_ != NULL;
_vala_ccode_node_unref0 (_tmp166_);
if (_tmp167_) {
ValaCCodeFunction* _tmp168_;
ValaCCodeFunction* _tmp169_;
ValaTargetValue* _tmp170_;
ValaCCodeExpression* _tmp171_ = NULL;
ValaCCodeExpression* _tmp172_;
ValaTargetValue* _tmp173_;
ValaCCodeExpression* _tmp174_ = NULL;
ValaCCodeExpression* _tmp175_;
_tmp168_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp169_ = _tmp168_;
_tmp170_ = lvalue;
_tmp171_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cvalue ((ValaCCodeBaseModule*) self, _tmp170_);
_tmp172_ = _tmp171_;
_tmp173_ = value;
_tmp174_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cvalue ((ValaCCodeBaseModule*) self, _tmp173_);
_tmp175_ = _tmp174_;
vala_ccode_function_add_assignment (_tmp169_, _tmp172_, _tmp175_);
_vala_ccode_node_unref0 (_tmp175_);
_vala_ccode_node_unref0 (_tmp172_);
}
}
}
_vala_code_node_unref0 (delegate_type);
_vala_ccode_node_unref0 (cexpr);
_vala_code_node_unref0 (array_type);
}
static void vala_ccode_assignment_module_real_store_local (ValaCodeGenerator* base, ValaLocalVariable* local, ValaTargetValue* value, gboolean initializer) {
ValaCCodeAssignmentModule * self;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_;
gboolean _tmp6_;
ValaLocalVariable* _tmp12_;
ValaTargetValue* _tmp13_ = NULL;
ValaTargetValue* _tmp14_;
ValaTargetValue* _tmp15_;
self = (ValaCCodeAssignmentModule*) base;
g_return_if_fail (local != NULL);
g_return_if_fail (value != NULL);
_tmp1_ = initializer;
if (!_tmp1_) {
ValaLocalVariable* _tmp2_;
ValaDataType* _tmp3_;
ValaDataType* _tmp4_;
gboolean _tmp5_ = FALSE;
_tmp2_ = local;
_tmp3_ = vala_variable_get_variable_type ((ValaVariable*) _tmp2_);
_tmp4_ = _tmp3_;
_tmp5_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp4_);
_tmp0_ = _tmp5_;
} else {
_tmp0_ = FALSE;
}
_tmp6_ = _tmp0_;
if (_tmp6_) {
ValaCCodeFunction* _tmp7_;
ValaCCodeFunction* _tmp8_;
ValaLocalVariable* _tmp9_;
ValaCCodeExpression* _tmp10_ = NULL;
ValaCCodeExpression* _tmp11_;
_tmp7_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp8_ = _tmp7_;
_tmp9_ = local;
_tmp10_ = vala_ccode_base_module_destroy_local ((ValaCCodeBaseModule*) self, _tmp9_);
_tmp11_ = _tmp10_;
vala_ccode_function_add_expression (_tmp8_, _tmp11_);
_vala_ccode_node_unref0 (_tmp11_);
}
_tmp12_ = local;
_tmp13_ = vala_ccode_base_module_get_local_cvalue ((ValaCCodeBaseModule*) self, _tmp12_);
_tmp14_ = _tmp13_;
_tmp15_ = value;
vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp14_, _tmp15_);
_vala_target_value_unref0 (_tmp14_);
}
static void vala_ccode_assignment_module_real_store_parameter (ValaCodeGenerator* base, ValaParameter* param, ValaTargetValue* value) {
ValaCCodeAssignmentModule * self;
ValaParameter* _tmp0_;
ValaDataType* _tmp1_;
ValaDataType* _tmp2_;
gboolean _tmp3_ = FALSE;
ValaParameter* _tmp9_;
ValaTargetValue* _tmp10_ = NULL;
ValaTargetValue* _tmp11_;
ValaTargetValue* _tmp12_;
self = (ValaCCodeAssignmentModule*) base;
g_return_if_fail (param != NULL);
g_return_if_fail (value != NULL);
_tmp0_ = param;
_tmp1_ = vala_variable_get_variable_type ((ValaVariable*) _tmp0_);
_tmp2_ = _tmp1_;
_tmp3_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp2_);
if (_tmp3_) {
ValaCCodeFunction* _tmp4_;
ValaCCodeFunction* _tmp5_;
ValaParameter* _tmp6_;
ValaCCodeExpression* _tmp7_ = NULL;
ValaCCodeExpression* _tmp8_;
_tmp4_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp5_ = _tmp4_;
_tmp6_ = param;
_tmp7_ = vala_ccode_base_module_destroy_parameter ((ValaCCodeBaseModule*) self, _tmp6_);
_tmp8_ = _tmp7_;
vala_ccode_function_add_expression (_tmp5_, _tmp8_);
_vala_ccode_node_unref0 (_tmp8_);
}
_tmp9_ = param;
_tmp10_ = vala_ccode_base_module_get_parameter_cvalue ((ValaCCodeBaseModule*) self, _tmp9_);
_tmp11_ = _tmp10_;
_tmp12_ = value;
vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp11_, _tmp12_);
_vala_target_value_unref0 (_tmp11_);
}
static void vala_ccode_assignment_module_real_store_field (ValaCodeGenerator* base, ValaField* field, ValaTargetValue* instance, ValaTargetValue* value) {
ValaCCodeAssignmentModule * self;
ValaField* _tmp0_;
ValaTargetValue* _tmp1_;
ValaTargetValue* _tmp2_ = NULL;
ValaTargetValue* lvalue;
ValaTargetValue* _tmp3_;
ValaDataType* _tmp4_;
ValaDataType* _tmp5_;
ValaDataType* _tmp6_;
ValaDataType* type;
ValaTargetValue* _tmp7_;
ValaDataType* _tmp8_;
ValaDataType* _tmp9_;
ValaDataType* _tmp14_;
gboolean _tmp15_ = FALSE;
ValaTargetValue* _tmp22_;
ValaTargetValue* _tmp23_;
self = (ValaCCodeAssignmentModule*) base;
g_return_if_fail (field != NULL);
g_return_if_fail (value != NULL);
_tmp0_ = field;
_tmp1_ = instance;
_tmp2_ = vala_ccode_base_module_get_field_cvalue ((ValaCCodeBaseModule*) self, _tmp0_, _tmp1_);
lvalue = _tmp2_;
_tmp3_ = lvalue;
_tmp4_ = vala_target_value_get_value_type (_tmp3_);
_tmp5_ = _tmp4_;
_tmp6_ = _vala_code_node_ref0 (_tmp5_);
type = _tmp6_;
_tmp7_ = lvalue;
_tmp8_ = vala_target_value_get_actual_value_type (_tmp7_);
_tmp9_ = _tmp8_;
if (_tmp9_ != NULL) {
ValaTargetValue* _tmp10_;
ValaDataType* _tmp11_;
ValaDataType* _tmp12_;
ValaDataType* _tmp13_;
_tmp10_ = lvalue;
_tmp11_ = vala_target_value_get_actual_value_type (_tmp10_);
_tmp12_ = _tmp11_;
_tmp13_ = _vala_code_node_ref0 (_tmp12_);
_vala_code_node_unref0 (type);
type = _tmp13_;
}
_tmp14_ = type;
_tmp15_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp14_);
if (_tmp15_) {
ValaCCodeFunction* _tmp16_;
ValaCCodeFunction* _tmp17_;
ValaField* _tmp18_;
ValaTargetValue* _tmp19_;
ValaCCodeExpression* _tmp20_ = NULL;
ValaCCodeExpression* _tmp21_;
_tmp16_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
_tmp17_ = _tmp16_;
_tmp18_ = field;
_tmp19_ = instance;
_tmp20_ = vala_ccode_base_module_destroy_field ((ValaCCodeBaseModule*) self, _tmp18_, _tmp19_);
_tmp21_ = _tmp20_;
vala_ccode_function_add_expression (_tmp17_, _tmp21_);
_vala_ccode_node_unref0 (_tmp21_);
}
_tmp22_ = lvalue;
_tmp23_ = value;
vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp22_, _tmp23_);
_vala_code_node_unref0 (type);
_vala_target_value_unref0 (lvalue);
}
ValaCCodeAssignmentModule* vala_ccode_assignment_module_construct (GType object_type) {
ValaCCodeAssignmentModule* self = NULL;
self = (ValaCCodeAssignmentModule*) vala_ccode_member_access_module_construct (object_type);
return self;
}
ValaCCodeAssignmentModule* vala_ccode_assignment_module_new (void) {
return vala_ccode_assignment_module_construct (VALA_TYPE_CCODE_ASSIGNMENT_MODULE);
}
static void vala_ccode_assignment_module_class_init (ValaCCodeAssignmentModuleClass * klass) {
vala_ccode_assignment_module_parent_class = g_type_class_peek_parent (klass);
VALA_CODE_VISITOR_CLASS (klass)->visit_assignment = vala_ccode_assignment_module_real_visit_assignment;
VALA_CCODE_BASE_MODULE_CLASS (klass)->store_value = vala_ccode_assignment_module_real_store_value;
VALA_CODE_GENERATOR_CLASS (klass)->store_local = vala_ccode_assignment_module_real_store_local;
VALA_CODE_GENERATOR_CLASS (klass)->store_parameter = vala_ccode_assignment_module_real_store_parameter;
VALA_CODE_GENERATOR_CLASS (klass)->store_field = vala_ccode_assignment_module_real_store_field;
}
static void vala_ccode_assignment_module_instance_init (ValaCCodeAssignmentModule * self) {
}
/**
* The link between an assignment and generated code.
*/
GType vala_ccode_assignment_module_get_type (void) {
static volatile gsize vala_ccode_assignment_module_type_id__volatile = 0;
if (g_once_init_enter (&vala_ccode_assignment_module_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (ValaCCodeAssignmentModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_ccode_assignment_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCCodeAssignmentModule), 0, (GInstanceInitFunc) vala_ccode_assignment_module_instance_init, NULL };
GType vala_ccode_assignment_module_type_id;
vala_ccode_assignment_module_type_id = g_type_register_static (VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, "ValaCCodeAssignmentModule", &g_define_type_info, 0);
g_once_init_leave (&vala_ccode_assignment_module_type_id__volatile, vala_ccode_assignment_module_type_id);
}
return vala_ccode_assignment_module_type_id__volatile;
}
|