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
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
|
/** Copyright (C) 2012 Free Software Foundation, Inc.
This generated file meltrunsup-inc.c is part of GCC.
[DON'T EDIT THIS GENERATED FILE]
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>.
**/
/* start of code generated by generate_runtypesupport_cod2ctype */
melt_ptr_t
melt_code_to_ctype (int code)
{
switch (code)
{
/* #1: CTYPE_BASIC_BLOCK */
case MELTBPAR_BB:
return MELT_PREDEF (CTYPE_BASIC_BLOCK);
/* #2: CTYPE_BITMAP */
case MELTBPAR_BITMAP:
return MELT_PREDEF (CTYPE_BITMAP);
/* #3: CTYPE_CSTRING */
case MELTBPAR_CSTRING:
return MELT_PREDEF (CTYPE_CSTRING);
/* #4: CTYPE_EDGE */
case MELTBPAR_EDGE:
return MELT_PREDEF (CTYPE_EDGE);
/* #5: CTYPE_GIMPLE */
case MELTBPAR_GIMPLE:
return MELT_PREDEF (CTYPE_GIMPLE);
/* #6: CTYPE_GIMPLE_SEQ */
case MELTBPAR_GIMPLESEQ:
return MELT_PREDEF (CTYPE_GIMPLE_SEQ);
/* #7: CTYPE_LONG */
case MELTBPAR_LONG:
return MELT_PREDEF (CTYPE_LONG);
/* #8: CTYPE_LOOP */
case MELTBPAR_LOOP:
return MELT_PREDEF (CTYPE_LOOP);
/* #9: CTYPE_RTVEC */
case MELTBPAR_RTVEC:
return MELT_PREDEF (CTYPE_RTVEC);
/* #10: CTYPE_RTX */
case MELTBPAR_RTX:
return MELT_PREDEF (CTYPE_RTX);
/* #11: CTYPE_TREE */
case MELTBPAR_TREE:
return MELT_PREDEF (CTYPE_TREE);
/* #12: CTYPE_VALUE */
case MELTBPAR_PTR:
return MELT_PREDEF (CTYPE_VALUE);
/* #13: CTYPE_VOID */
default:
break;
} /*end switch code */
return NULL;
} /* end of generated melt_code_to_ctype */
/** start of code generated by generate_runtypesupport_mag2str **/
const char *
melt_obmag_string (int i)
{
#define MELT_MAG2STR_CACHEBUF 17
#define MELT_MAG2STR_MAGLEN 16
static char melt_cacheobmagbuf[MELT_MAG2STR_CACHEBUF][MELT_MAG2STR_MAGLEN];
switch (i)
{
case 0:
return "MeltObMag!0";
/*gtyctype #1 CTYPE_BASIC_BLOCK */
case MELTOBMAG_BASICBLOCK:
return "MELTOBMAG_BASICBLOCK";
case MELTOBMAG_MAPBASICBLOCKS:
return "MELTOBMAG_MAPBASICBLOCKS";
/*gtyctype #2 CTYPE_BITMAP */
case MELTOBMAG_BITMAP:
return "MELTOBMAG_BITMAP";
case MELTOBMAG_MAPBITMAPS:
return "MELTOBMAG_MAPBITMAPS";
/*gtyctype #3 CTYPE_CSTRING */
/*runtypesupport_mag2str no boxed magic */
/*runtypesupport_mag2str no map magic */
/*gtyctype #4 CTYPE_EDGE */
case MELTOBMAG_EDGE:
return "MELTOBMAG_EDGE";
case MELTOBMAG_MAPEDGES:
return "MELTOBMAG_MAPEDGES";
/*gtyctype #5 CTYPE_GIMPLE */
case MELTOBMAG_GIMPLE:
return "MELTOBMAG_GIMPLE";
case MELTOBMAG_MAPGIMPLES:
return "MELTOBMAG_MAPGIMPLES";
/*gtyctype #6 CTYPE_GIMPLE_SEQ */
case MELTOBMAG_GIMPLESEQ:
return "MELTOBMAG_GIMPLESEQ";
case MELTOBMAG_MAPGIMPLESEQS:
return "MELTOBMAG_MAPGIMPLESEQS";
/*gtyctype #7 CTYPE_LONG */
/*runtypesupport_mag2str no boxed magic */
/*runtypesupport_mag2str no map magic */
/*gtyctype #8 CTYPE_LOOP */
case MELTOBMAG_LOOP:
return "MELTOBMAG_LOOP";
case MELTOBMAG_MAPLOOPS:
return "MELTOBMAG_MAPLOOPS";
/*gtyctype #9 CTYPE_RTVEC */
case MELTOBMAG_RTVEC:
return "MELTOBMAG_RTVEC";
case MELTOBMAG_MAPRTVECS:
return "MELTOBMAG_MAPRTVECS";
/*gtyctype #10 CTYPE_RTX */
case MELTOBMAG_RTX:
return "MELTOBMAG_RTX";
case MELTOBMAG_MAPRTXS:
return "MELTOBMAG_MAPRTXS";
/*gtyctype #11 CTYPE_TREE */
case MELTOBMAG_TREE:
return "MELTOBMAG_TREE";
case MELTOBMAG_MAPTREES:
return "MELTOBMAG_MAPTREES";
/*gtyctype #12 CTYPE_VALUE */
/*runtypesupport_mag2str no boxed magic */
/*runtypesupport_mag2str no map magic */
/*gtyctype #13 CTYPE_VOID */
/*runtypesupport_mag2str no boxed magic */
/*runtypesupport_mag2str no map magic */
/*valdesc #1 VALDESC_BUCKETLONGS */
case MELTOBMAG_BUCKETLONGS:
return "MELTOBMAG_BUCKETLONGS";
/*valdesc #2 VALDESC_CLOSURE */
case MELTOBMAG_CLOSURE:
return "MELTOBMAG_CLOSURE";
/*valdesc #3 VALDESC_DECAY */
case MELTOBMAG_DECAY:
return "MELTOBMAG_DECAY";
/*valdesc #4 VALDESC_INT */
case MELTOBMAG_INT:
return "MELTOBMAG_INT";
/*valdesc #5 VALDESC_LIST */
case MELTOBMAG_LIST:
return "MELTOBMAG_LIST";
/*valdesc #6 VALDESC_MAPOBJECTS */
case MELTOBMAG_MAPOBJECTS:
return "MELTOBMAG_MAPOBJECTS";
/*valdesc #7 VALDESC_MAPSTRINGS */
case MELTOBMAG_MAPSTRINGS:
return "MELTOBMAG_MAPSTRINGS";
/*valdesc #8 VALDESC_MIXBIGINT */
case MELTOBMAG_MIXBIGINT:
return "MELTOBMAG_MIXBIGINT";
/*valdesc #9 VALDESC_MIXINT */
case MELTOBMAG_MIXINT:
return "MELTOBMAG_MIXINT";
/*valdesc #10 VALDESC_MIXLOC */
case MELTOBMAG_MIXLOC:
return "MELTOBMAG_MIXLOC";
/*valdesc #11 VALDESC_MULTIPLE */
case MELTOBMAG_MULTIPLE:
return "MELTOBMAG_MULTIPLE";
/*valdesc #12 VALDESC_OBJECT */
case MELTOBMAG_OBJECT:
return "MELTOBMAG_OBJECT";
/*valdesc #13 VALDESC_PAIR */
case MELTOBMAG_PAIR:
return "MELTOBMAG_PAIR";
/*valdesc #14 VALDESC_REAL */
case MELTOBMAG_REAL:
return "MELTOBMAG_REAL";
/*valdesc #15 VALDESC_ROUTINE */
case MELTOBMAG_ROUTINE:
return "MELTOBMAG_ROUTINE";
/*valdesc #16 VALDESC_SPECIAL_FILE */
case MELTOBMAG_SPEC_FILE:
return "MELTOBMAG_SPEC_FILE";
/*valdesc #17 VALDESC_SPECIAL_MPFR */
case MELTOBMAG_SPEC_MPFR:
return "MELTOBMAG_SPEC_MPFR";
/*valdesc #18 VALDESC_SPECIAL_RAW_FILE */
case MELTOBMAG_SPEC_RAWFILE:
return "MELTOBMAG_SPEC_RAWFILE";
/*valdesc #19 VALDESC_STRBUF */
case MELTOBMAG_STRBUF:
return "MELTOBMAG_STRBUF";
/*valdesc #20 VALDESC_STRING */
case MELTOBMAG_STRING:
return "MELTOBMAG_STRING";
default:
{
int ix = (i & 0x3ffffff) % MELT_MAG2STR_CACHEBUF;
snprintf (melt_cacheobmagbuf[ix], MELT_MAG2STR_MAGLEN - 1,
"?MeltObjMag?%d", i);
return melt_cacheobmagbuf[ix];
}
} /* end switch */
} /* end generated melt_obmag_string */
/** end of code generated by generate_runtypesupport_mag2str **/
/** generated by generate_runtypesupport_forwcopy_fun **/
/* cheney like forwarding generated function */
melt_ptr_t
melt_forwarded_copy (melt_ptr_t p)
{ /* header generated by generate_runtypesupport_forwcopy_fun */
melt_ptr_t n = 0;
int mag = 0;
gcc_assert (melt_is_young (p));
gcc_assert (p->u_discr && p->u_discr != MELT_FORWARDED_DISCR);
if (p->u_discr->meltobj_class == MELT_FORWARDED_DISCR)
mag =
((meltobject_ptr_t)
(((struct meltforward_st *) p->u_discr)->forward))->meltobj_magic;
else
mag = p->u_discr->meltobj_magic;
melt_forward_counter++;
switch (mag)
{ /* end of generated header */
/* value descriptor forward copy for melt_forwarded_copy */
/*valdesc #1 VALDESC_BUCKETLONGS */
case MELTOBMAG_BUCKETLONGS:
{
struct meltbucketlongs_st *src = (struct meltbucketlongs_st *) p;
struct meltbucketlongs_st *dst = NULL;
/* copy chunk from VALDESC_BUCKETLONGS in warmelt-base.melt */
/* ggc_alloc_meltbucketlongs_st should be gengtype generated for VALDESC_BUCKETLONGS */
unsigned lnix = src->buckl_lenix;
unsigned len = melt_primtab[lnix];
unsigned ucnt = 0;
unsigned ix = 0;
gcc_assert (lnix > 0);
gcc_assert (len > 0);
dst = /* Don't need a cleared allocation! */
ggc_alloc_meltbucketlongs_st (len *
sizeof (struct
melt_bucketlongentry_st) +
offsetof (struct meltbucketlongs_st,
buckl_entab));
dst->discr = src->discr;
dst->buckl_lenix = src->buckl_lenix;
dst->buckl_aux = src->buckl_aux;
dst->buckl_xnum = src->buckl_xnum;
ucnt = dst->buckl_ucount = src->buckl_ucount;
for (ix = 0; ix < ucnt; ix++)
dst->buckl_entab[ix] = src->buckl_entab[ix];
for (ix = ucnt; ix < len; ix++)
{
dst->buckl_entab[ix].ebl_at = 0L;
dst->buckl_entab[ix].ebl_va = NULL;
}
/* end copy chunk VALDESC_BUCKETLONGS */
n = (melt_ptr_t) dst;
break;
}
/*valdesc #2 VALDESC_CLOSURE */
case MELTOBMAG_CLOSURE:
{
struct meltclosure_st *src = (struct meltclosure_st *) p;
struct meltclosure_st *dst = NULL;
/* copy VALDESC_CLOSURE in warmelt-base.melt */
/* ggc_alloc_meltclosure_st should be gengtype generated for VALDESC_CLOSURE */
#ifndef ggc_alloc_meltclosure_st
#define ggc_alloc_meltclosure_st(SIZE) ((struct meltclosure_st *)(ggc_internal_alloc_stat (SIZE MEM_STAT_INFO)))
#endif
int nbv = (int) src->nbval;
int ix = 0;
dst =
/* Don't need a cleared allocation! */
ggc_alloc_meltclosure_st
(nbv * sizeof (void *) + offsetof (struct meltclosure_st, tabval));
dst->discr = src->discr;
dst->rout = src->rout;
dst->nbval = (unsigned) nbv;
for (ix = 0; ix < nbv; ix++)
dst->tabval[ix] = src->tabval[ix];
n = (melt_ptr_t) dst;
break;
}
/*valdesc #3 VALDESC_DECAY */
case MELTOBMAG_DECAY:
{
struct meltdecay_st *src = (struct meltdecay_st *) p;
struct meltdecay_st *dst = NULL;
/* from VALDESC_DECAY */
/* ggc_alloc_meltdecay_st should be gengtype generated for VALDESC_DECAY */
#ifndef ggc_alloc_meltdecay_st
#define ggc_alloc_meltdecay_st() ((struct meltdecay_st *)(ggc_internal_alloc_stat (sizeof (struct meltdecay_st) MEM_STAT_INFO)))
#endif
dst = ggc_alloc_meltdecay_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #4 VALDESC_INT */
case MELTOBMAG_INT:
{
struct meltint_st *src = (struct meltint_st *) p;
struct meltint_st *dst = NULL;
/* from VALDESC_INT */
/* ggc_alloc_meltint_st should be gengtype generated for VALDESC_INT */
#ifndef ggc_alloc_meltint_st
#define ggc_alloc_meltint_st() ((struct meltint_st *)(ggc_internal_alloc_stat (sizeof (struct meltint_st) MEM_STAT_INFO)))
#endif
dst =
/* Don't need a cleared allocation. */
ggc_alloc_meltint_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #5 VALDESC_LIST */
case MELTOBMAG_LIST:
{
struct meltlist_st *src = (struct meltlist_st *) p;
struct meltlist_st *dst = NULL;
/* copy chunk from VALDESC_LIST */
/* ggc_alloc_meltlist_st should be gengtype gengtype for VALDESC_LIST */
#ifndef ggc_alloc_meltlist_st
#define ggc_alloc_meltlist_st() ((struct meltlist_st *)(ggc_internal_alloc_stat (sizeof (struct meltlist_st) MEM_STAT_INFO)))
#endif
dst =
/* Don't need a cleared allocation! */
ggc_alloc_meltlist_st ();
*dst = *src;
/* end chunk from VALDESC_LIST */
n = (melt_ptr_t) dst;
break;
}
/*valdesc #6 VALDESC_MAPOBJECTS */
case MELTOBMAG_MAPOBJECTS:
{
struct meltmapobjects_st *src = (struct meltmapobjects_st *) p;
struct meltmapobjects_st *dst = NULL;
/* copy VALDESC_MAPOBJECTS in warmelt-base.melt */
/* ggc_alloc_meltmapobjects_st should be gengtype generated for VALDESC_MAPOBJECTS */
#ifndef ggc_alloc_meltmapobjects_st
#define ggc_alloc_meltmapobjects_st() ((struct meltmapobjects_st *)(ggc_internal_alloc_stat (sizeof (struct meltmapobjects_st) MEM_STAT_INFO)))
#endif
#ifndef ggc_alloc_vec_entryobjectsmelt_st
#define ggc_alloc_vec_entryobjectsmelt_st(N) ((struct entryobjectsmelt_st *) (ggc_internal_vec_alloc_stat (sizeof (struct entryobjectsmelt_st), N MEM_STAT_INFO)))
#endif
#ifndef ggc_alloc_cleared_vec_entryobjectsmelt_st
#define ggc_alloc_cleared_vec_entryobjectsmelt_st(n) ((struct entryobjectsmelt_st *)(ggc_internal_cleared_vec_alloc_stat (sizeof (struct entryobjectsmelt_st), n MEM_STAT_INFO)))
#endif
int siz = melt_primtab[src->lenix];
dst =
/* Don't need a cleared allocation. */
ggc_alloc_meltmapobjects_st ();
dst->discr = src->discr;
dst->count = src->count;
dst->lenix = src->lenix;
dst->meltmap_aux = src->meltmap_aux;
if (siz > 0 && src->entab)
{
/* Don't need a cleared allocation. */
dst->entab = ggc_alloc_vec_entryobjectsmelt_st (siz);
memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0]));
}
else
dst->entab = NULL;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #7 VALDESC_MAPSTRINGS */
case MELTOBMAG_MAPSTRINGS:
{
struct meltmapstrings_st *src = (struct meltmapstrings_st *) p;
struct meltmapstrings_st *dst = NULL;
/* copy VALDESC_MAPSTRINGS in warmelt-base.melt */
/* ggc_alloc_meltmapstrings_st should be gengtype generated for VALDESC_MAPSTRINGS */
#ifndef ggc_alloc_meltmapstrings_st
#define ggc_alloc_meltmapstrings_st() ((struct meltmapstrings_st *)(ggc_internal_alloc_stat (sizeof (struct meltmapstrings_st) MEM_STAT_INFO)))
#endif
#ifndef ggc_alloc_vec_entrystringsmelt_st
#define ggc_alloc_vec_entrystringsmelt_st(n) ((struct entrystringsmelt_st *)(ggc_internal_vec_alloc_stat (sizeof (struct entrystringsmelt_st), n MEM_STAT_INFO)))
#endif
#ifndef ggc_alloc_cleared_vec_entrystringsmelt_st
#define ggc_alloc_cleared_vec_entrystringsmelt_st(n) ((struct entrystringsmelt_st *)(ggc_internal_cleared_vec_alloc_stat (sizeof (struct entrystringsmelt_st), n MEM_STAT_INFO)))
#endif
int siz = melt_primtab[src->lenix];
dst =
/* Don't need a cleared allocation. */
ggc_alloc_meltmapstrings_st ();
dst->discr = src->discr;
dst->count = src->count;
dst->lenix = src->lenix;
dst->meltmap_aux = src->meltmap_aux;
if (siz > 0 && src->entab)
{
/* Don't need a cleared allocation. */
dst->entab = ggc_alloc_vec_entrystringsmelt_st (siz);
memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0]));
}
else
dst->entab = NULL;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #8 VALDESC_MIXBIGINT */
case MELTOBMAG_MIXBIGINT:
{
struct meltmixbigint_st *src = (struct meltmixbigint_st *) p;
struct meltmixbigint_st *dst = NULL;
/* from VALDESC_MIXBIGINT */
/* ggc_alloc_meltmixbigint_st should be gengtype generated for VALDESC_MIXBIGINT */
#ifndef ggc_alloc_meltmixbigint_st
#define ggc_alloc_meltmixbigint_st(SIZE) ((struct meltmixbigint_st *)(ggc_internal_alloc_stat (SIZE MEM_STAT_INFO)))
#endif
unsigned blen = src->biglen;
dst =
/* Don't need a cleared allocation. */
ggc_alloc_meltmixbigint_st
(blen * sizeof (long) + offsetof (struct meltmixbigint_st, tabig));
dst->discr = src->discr;
dst->ptrval = src->ptrval;
dst->negative = src->negative;
dst->biglen = blen;
memcpy (dst->tabig, src->tabig, blen * sizeof (dst->tabig[0]));
n = (melt_ptr_t) dst;
break;
}
/*valdesc #9 VALDESC_MIXINT */
case MELTOBMAG_MIXINT:
{
struct meltmixint_st *src = (struct meltmixint_st *) p;
struct meltmixint_st *dst = NULL;
/* from VALDESC_MIXINT */
/* ggc_alloc_meltmixint_st should be gengtype generated for VALDESC_MIXINT */
#ifndef ggc_alloc_meltmixint_st
#define ggc_alloc_meltmixint_st() ((struct meltmixint_st *)(ggc_internal_alloc_stat (sizeof (struct meltmixint_st) MEM_STAT_INFO)))
#endif
dst =
/* Don't need a cleared allocation. */
ggc_alloc_meltmixint_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #10 VALDESC_MIXLOC */
case MELTOBMAG_MIXLOC:
{
struct meltmixloc_st *src = (struct meltmixloc_st *) p;
struct meltmixloc_st *dst = NULL;
/* from VALDESC_MIXLOC */
/* ggc_alloc_meltmixloc_st should be gengtype generated for VALDESC_MIXLOC */
#ifndef ggc_alloc_meltmixloc_st
#define ggc_alloc_meltmixloc_st() ((struct meltmixloc_st *)(ggc_internal_alloc_stat (sizeof (struct meltmixloc_st) MEM_STAT_INFO)))
#endif
dst =
/* Don't need a cleared allocation. */
ggc_alloc_meltmixloc_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #11 VALDESC_MULTIPLE */
case MELTOBMAG_MULTIPLE:
{
struct meltmultiple_st *src = (struct meltmultiple_st *) p;
struct meltmultiple_st *dst = NULL;
/* copy chunk from VALDESC_MULTIPLE */
/* ggc_alloc_meltmultiple_st should be gengtype generated for VALDESC_MULTIPLE */
#ifndef ggc_alloc_meltmultiple_st
#define ggc_alloc_meltmultiple_st(SIZE) ((struct meltmultiple_st *)(ggc_internal_alloc_stat (SIZE MEM_STAT_INFO)))
#endif
int nbv = (int) src->nbval;
int ix = 0;
dst =
/* Don't need a cleared allocation! */
ggc_alloc_meltmultiple_st
(nbv * sizeof (void *) + offsetof (struct meltmultiple_st, tabval));
/* we cannot copy the whole src, because MELT_FLEXIBLE_DIM might be
1 and nbval could be 0 */
dst->discr = src->discr;
dst->nbval = src->nbval;
for (ix = 0; ix < nbv; ix++)
dst->tabval[ix] = src->tabval[ix];
/* end copy chunk from VALDESC_MULTIPLE */
n = (melt_ptr_t) dst;
break;
}
/*valdesc #12 VALDESC_OBJECT */
case MELTOBMAG_OBJECT:
{
struct meltobject_st *src = (struct meltobject_st *) p;
struct meltobject_st *dst = NULL;
/* from VALDESC_OBJECT */
/* ggc_alloc_meltobject_st should be gengtype generated for VALDESC_OBJECT */
#ifndef ggc_alloc_meltobject_st
#define ggc_alloc_meltobject_st(SIZE) ((struct meltobject_st *)(ggc_internal_alloc_stat (SIZE MEM_STAT_INFO)))
#endif
int ix = 0;
int oblen = (int) (src->obj_len);
/* We don't need to clear at allocation, since the object is
explicitly filled here! */
dst = ggc_alloc_meltobject_st
(oblen * sizeof (void *)
+ offsetof (struct meltobject_st, obj_vartab));
/* we cannot copy the whole src, because MELT_FLEXIBLE_DIM might be 1 */
dst->meltobj_class = src->meltobj_class;
dst->obj_hash = src->obj_hash;
dst->obj_num = src->obj_num;
dst->obj_len = oblen;
for (ix = 0; ix < oblen; ix++)
dst->obj_vartab[ix] = src->obj_vartab[ix];
n = (melt_ptr_t) dst;
break;
}
/*valdesc #13 VALDESC_PAIR */
case MELTOBMAG_PAIR:
{
struct meltpair_st *src = (struct meltpair_st *) p;
struct meltpair_st *dst = NULL;
/* copy VALDESC_PAIR in warmelt-base.melt */
/* ggc_alloc_meltpair_st should be gengtype gengtype for VALDESC_PAIR */
#ifndef ggc_alloc_meltpair_st
#define ggc_alloc_meltpair_st() ((struct meltpair_st *)(ggc_internal_alloc_stat (sizeof (struct meltpair_st) MEM_STAT_INFO)))
#endif
dst = /* Don't need a cleared allocation. */
ggc_alloc_meltpair_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #14 VALDESC_REAL */
case MELTOBMAG_REAL:
{
struct meltreal_st *src = (struct meltreal_st *) p;
struct meltreal_st *dst = NULL;
/* from VALDESC_REAL */
/* ggc_alloc_meltreal_st should be gengtype generated for VALDESC_REAL */
#ifndef ggc_alloc_meltreal_st
#define ggc_alloc_meltreal_st() ((struct meltreal_st *)(ggc_internal_alloc_stat (sizeof (struct meltreal_st) MEM_STAT_INFO)))
#endif
dst =
/* Don't need a cleared allocation. */
ggc_alloc_meltreal_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #15 VALDESC_ROUTINE */
case MELTOBMAG_ROUTINE:
{
struct meltroutine_st *src = (struct meltroutine_st *) p;
struct meltroutine_st *dst = NULL;
/* from VALDESC_ROUTINE */
/* ggc_alloc_meltroutine_st should be gengtype generated for VALDESC_ROUTINE */
#ifndef ggc_alloc_meltroutine_st
#define ggc_alloc_meltroutine_st(SIZE) ((struct meltroutine_st *)(ggc_internal_alloc_stat (SIZE MEM_STAT_INFO)))
#endif
int nbv = (int) src->nbval;
int ix = 0;
dst =
/* Don't need a cleared allocation! */
ggc_alloc_meltroutine_st
(nbv * sizeof (void *) + offsetof (struct meltroutine_st, tabval));
dst->discr = src->discr;
strncpy (dst->routdescr, src->routdescr, MELT_ROUTDESCR_LEN);
dst->routdescr[MELT_ROUTDESCR_LEN - 1] = 0;
dst->nbval = (unsigned) nbv;
dst->routfunad = src->routfunad;
for (ix = 0; ix < nbv; ix++)
dst->tabval[ix] = src->tabval[ix];
dst->routdata = src->routdata;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #16 VALDESC_SPECIAL_FILE */
case MELTOBMAG_SPEC_FILE:
{
struct meltspecialfile_st *src = (struct meltspecialfile_st *) p;
struct meltspecialfile_st *dst = NULL;
/* from VALDESC_SPECIAL_FILE */
/* ggc_alloc_meltspecialfile_st should be gengtype generated for VALDESC_SPECIAL_FILE */
#ifndef ggc_alloc_meltspecialfile_st
#define ggc_alloc_meltspecialfile_st() ((struct meltspecialfile_st *)(ggc_internal_alloc_stat (sizeof (struct meltspecialfile_st) MEM_STAT_INFO)))
#endif
dst = ggc_alloc_meltspecialfile_st ();
*dst = *src;
/* mark the new copy! */
dst->mark = 1;
/* add the new copy to the old (major) special list */
dst->nextspec = melt_oldspeclist;
melt_oldspeclist = (struct meltspecial_st *) dst;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #17 VALDESC_SPECIAL_MPFR */
case MELTOBMAG_SPEC_MPFR:
{
struct meltspecialmpfr_st *src = (struct meltspecialmpfr_st *) p;
struct meltspecialmpfr_st *dst = NULL;
/* from VALDESC_SPECIAL_MPFR */
/* ggc_alloc_meltspecialmpfr_st should be gengtype generated for VALDESC_SPECIAL_MPFR */
#ifndef ggc_alloc_meltspecialmpfr_st
#define ggc_alloc_meltspecialmpfr_st() ((struct meltspecialmpfr_st *)(ggc_internal_alloc_stat (sizeof (struct meltspecialmpfr_st) MEM_STAT_INFO)))
#endif
dst = ggc_alloc_meltspecialmpfr_st ();
*dst = *src;
/* mark the new copy! */
dst->mark = 1;
/* add the new copy to the old (major) special list */
dst->nextspec = melt_oldspeclist;
melt_oldspeclist = (struct meltspecial_st *) dst;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #18 VALDESC_SPECIAL_RAW_FILE */
case MELTOBMAG_SPEC_RAWFILE:
{
struct meltspecialrawfile_st *src =
(struct meltspecialrawfile_st *) p;
struct meltspecialrawfile_st *dst = NULL;
/* from VALDESC_SPECIAL_RAW_FILE */
/* ggc_alloc_meltspecialrawfile_st should be gengtype generated for VALDESC_SPECIAL_RAW_FILE */
#ifndef ggc_alloc_meltspecialrawfile_st
#define ggc_alloc_meltspecialrawfile_st() ((struct meltspecialrawfile_st *)(ggc_internal_alloc_stat (sizeof (struct meltspecialrawfile_st) MEM_STAT_INFO)))
#endif
dst = ggc_alloc_meltspecialrawfile_st ();
*dst = *src;
/* mark the new copy! */
dst->mark = 1;
/* add the new copy to the old (major) special list */
dst->nextspec = melt_oldspeclist;
melt_oldspeclist = (struct meltspecial_st *) dst;
n = (melt_ptr_t) dst;
break;
}
/*valdesc #19 VALDESC_STRBUF */
case MELTOBMAG_STRBUF:
{
struct meltstrbuf_st *src = (struct meltstrbuf_st *) p;
struct meltstrbuf_st *dst = NULL;
/* copy chunk from VALDESC_STRBUF */
/* ggc_alloc_meltstrbuf_st should be gengtype gengtype for VALDESC_STRBUF */
#ifndef ggc_alloc_meltstrbuf_st
#define ggc_alloc_meltstrbuf_st() ((struct meltstrbuf_st *)(ggc_internal_alloc_stat (sizeof (struct meltstrbuf_st) MEM_STAT_INFO)))
#endif
unsigned blen = melt_primtab[src->buflenix];
dst =
/* Don't need a cleared allocation. */
ggc_alloc_meltstrbuf_st ();
dst->discr = src->discr;
dst->bufstart = src->bufstart;
dst->bufend = src->bufend;
dst->buflenix = src->buflenix;
if (blen > 0)
{
#if BUILDING_GCC_VERSION > 4005 || GCCPLUGIN_VERSION > 4005 || MELT_GCC_VERSION > 4005
dst->bufzn =
CONST_CAST (char *, ggc_alloc_string (src->bufzn, blen + 1));
#else /*GCC 4.5 */
dst->bufzn = (char *) ggc_alloc_cleared (1 + blen);
memcpy (dst->bufzn, src->bufzn, blen);
#endif /*!GCC 4.5 */
dst->bufzn[blen] = (char) 0;
}
else
dst->bufzn = NULL;
/* end copy chunk from VALDESC_STRBUF */
n = (melt_ptr_t) dst;
break;
}
/*valdesc #20 VALDESC_STRING */
case MELTOBMAG_STRING:
{
struct meltstring_st *src = (struct meltstring_st *) p;
struct meltstring_st *dst = NULL;
/* copy from VALDESC_STRING file warmelt-base.melt */
/* ggc_alloc_meltstring_st should be gengtype generated for VALDESC_STRING */
#ifndef ggc_alloc_meltstring_st
#define ggc_alloc_meltstring_st(SIZE) ((struct meltstring_st *)(ggc_internal_alloc_stat (SIZE MEM_STAT_INFO)))
#endif
int srclen = (src->val) ? strlen (src->val) : 0;
dst =
/* Don't need a cleared allocation. */
ggc_alloc_meltstring_st
(offsetof (struct meltstring_st, val) + (srclen + 1));
dst->discr = src->discr;
memcpy (dst->val, src->val, srclen);
dst->val[srclen] = (char) 0;
/* end copy from VALDESC_STRING */
n = (melt_ptr_t) dst;
break;
}
/* gty ctype forward copy for melt_forwarded_copy */
/*forwcopy gtyctype #1 CTYPE_BASIC_BLOCK*/
case MELTOBMAG_BASICBLOCK:
{
/* macro ggc_alloc_meltbasicblock_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltbasicblock_st
#define ggc_alloc_meltbasicblock_st() ((struct meltbasicblock_st*)(ggc_internal_alloc_stat (sizeof (struct meltbasicblock_st) MEM_STAT_INFO)))
#endif
struct meltbasicblock_st *src = (struct meltbasicblock_st *) p;
struct meltbasicblock_st *dst = ggc_alloc_meltbasicblock_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
case MELTOBMAG_MAPBASICBLOCKS:
{
/* ggc_alloc_meltmapbasicblocks_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltmapbasicblocks_st
#define ggc_alloc_meltmapbasicblocks_st() ((struct meltmapbasicblocks_st*) (ggc_internal_alloc_stat (sizeof (struct meltmapbasicblocks_st) MEM_STAT_INFO)))
#endif
/* ggc_alloc_vec_entrybasicblockmelt_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_vec_entrybasicblockmelt_st
#define ggc_alloc_vec_entrybasicblockmelt_st(n) ((struct entrybasicblockmelt_st*) (ggc_internal_vec_alloc_stat (sizeof (struct entrybasicblockmelt_st), n MEM_STAT_INFO)))
#endif
struct meltmapbasicblocks_st *src =
(struct meltmapbasicblocks_st *) p;
int siz = melt_primtab[src->lenix];
struct meltmapbasicblocks_st *dst =
ggc_alloc_meltmapbasicblocks_st ();
dst->discr = src->discr;
dst->count = src->count;
dst->lenix = src->lenix;
dst->meltmap_aux = src->meltmap_aux;
if (siz > 0 && src->entab)
{
dst->entab = ggc_alloc_vec_entrybasicblockmelt_st (siz);
memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0]));
}
else
dst->entab = NULL;
n = (melt_ptr_t) dst;
break;
}
/*forwcopy gtyctype #2 CTYPE_BITMAP */
case MELTOBMAG_BITMAP:
{
/* macro ggc_alloc_meltbitmap_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltbitmap_st
#define ggc_alloc_meltbitmap_st() ((struct meltbitmap_st*)(ggc_internal_alloc_stat (sizeof (struct meltbitmap_st) MEM_STAT_INFO)))
#endif
struct meltbitmap_st *src = (struct meltbitmap_st *) p;
struct meltbitmap_st *dst = ggc_alloc_meltbitmap_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
case MELTOBMAG_MAPBITMAPS:
{
/* ggc_alloc_meltmapbitmaps_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltmapbitmaps_st
#define ggc_alloc_meltmapbitmaps_st() ((struct meltmapbitmaps_st*) (ggc_internal_alloc_stat (sizeof (struct meltmapbitmaps_st) MEM_STAT_INFO)))
#endif
/* ggc_alloc_vec_entrybitmapmelt_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_vec_entrybitmapmelt_st
#define ggc_alloc_vec_entrybitmapmelt_st(n) ((struct entrybitmapmelt_st*) (ggc_internal_vec_alloc_stat (sizeof (struct entrybitmapmelt_st), n MEM_STAT_INFO)))
#endif
struct meltmapbitmaps_st *src = (struct meltmapbitmaps_st *) p;
int siz = melt_primtab[src->lenix];
struct meltmapbitmaps_st *dst = ggc_alloc_meltmapbitmaps_st ();
dst->discr = src->discr;
dst->count = src->count;
dst->lenix = src->lenix;
dst->meltmap_aux = src->meltmap_aux;
if (siz > 0 && src->entab)
{
dst->entab = ggc_alloc_vec_entrybitmapmelt_st (siz);
memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0]));
}
else
dst->entab = NULL;
n = (melt_ptr_t) dst;
break;
}
/*forwcopy gtyctype #3 CTYPE_EDGE */
case MELTOBMAG_EDGE:
{
/* macro ggc_alloc_meltedge_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltedge_st
#define ggc_alloc_meltedge_st() ((struct meltedge_st*)(ggc_internal_alloc_stat (sizeof (struct meltedge_st) MEM_STAT_INFO)))
#endif
struct meltedge_st *src = (struct meltedge_st *) p;
struct meltedge_st *dst = ggc_alloc_meltedge_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
case MELTOBMAG_MAPEDGES:
{
/* ggc_alloc_meltmapedges_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltmapedges_st
#define ggc_alloc_meltmapedges_st() ((struct meltmapedges_st*) (ggc_internal_alloc_stat (sizeof (struct meltmapedges_st) MEM_STAT_INFO)))
#endif
/* ggc_alloc_vec_entryedgemelt_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_vec_entryedgemelt_st
#define ggc_alloc_vec_entryedgemelt_st(n) ((struct entryedgemelt_st*) (ggc_internal_vec_alloc_stat (sizeof (struct entryedgemelt_st), n MEM_STAT_INFO)))
#endif
struct meltmapedges_st *src = (struct meltmapedges_st *) p;
int siz = melt_primtab[src->lenix];
struct meltmapedges_st *dst = ggc_alloc_meltmapedges_st ();
dst->discr = src->discr;
dst->count = src->count;
dst->lenix = src->lenix;
dst->meltmap_aux = src->meltmap_aux;
if (siz > 0 && src->entab)
{
dst->entab = ggc_alloc_vec_entryedgemelt_st (siz);
memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0]));
}
else
dst->entab = NULL;
n = (melt_ptr_t) dst;
break;
}
/*forwcopy gtyctype #4 CTYPE_GIMPLE */
case MELTOBMAG_GIMPLE:
{
/* macro ggc_alloc_meltgimple_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltgimple_st
#define ggc_alloc_meltgimple_st() ((struct meltgimple_st*)(ggc_internal_alloc_stat (sizeof (struct meltgimple_st) MEM_STAT_INFO)))
#endif
struct meltgimple_st *src = (struct meltgimple_st *) p;
struct meltgimple_st *dst = ggc_alloc_meltgimple_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
case MELTOBMAG_MAPGIMPLES:
{
/* ggc_alloc_meltmapgimples_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltmapgimples_st
#define ggc_alloc_meltmapgimples_st() ((struct meltmapgimples_st*) (ggc_internal_alloc_stat (sizeof (struct meltmapgimples_st) MEM_STAT_INFO)))
#endif
/* ggc_alloc_vec_entrygimplemelt_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_vec_entrygimplemelt_st
#define ggc_alloc_vec_entrygimplemelt_st(n) ((struct entrygimplemelt_st*) (ggc_internal_vec_alloc_stat (sizeof (struct entrygimplemelt_st), n MEM_STAT_INFO)))
#endif
struct meltmapgimples_st *src = (struct meltmapgimples_st *) p;
int siz = melt_primtab[src->lenix];
struct meltmapgimples_st *dst = ggc_alloc_meltmapgimples_st ();
dst->discr = src->discr;
dst->count = src->count;
dst->lenix = src->lenix;
dst->meltmap_aux = src->meltmap_aux;
if (siz > 0 && src->entab)
{
dst->entab = ggc_alloc_vec_entrygimplemelt_st (siz);
memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0]));
}
else
dst->entab = NULL;
n = (melt_ptr_t) dst;
break;
}
/*forwcopy gtyctype #5 CTYPE_GIMPLE_SEQ */
case MELTOBMAG_GIMPLESEQ:
{
/* macro ggc_alloc_meltgimpleseq_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltgimpleseq_st
#define ggc_alloc_meltgimpleseq_st() ((struct meltgimpleseq_st*)(ggc_internal_alloc_stat (sizeof (struct meltgimpleseq_st) MEM_STAT_INFO)))
#endif
struct meltgimpleseq_st *src = (struct meltgimpleseq_st *) p;
struct meltgimpleseq_st *dst = ggc_alloc_meltgimpleseq_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
case MELTOBMAG_MAPGIMPLESEQS:
{
/* ggc_alloc_meltmapgimpleseqs_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltmapgimpleseqs_st
#define ggc_alloc_meltmapgimpleseqs_st() ((struct meltmapgimpleseqs_st*) (ggc_internal_alloc_stat (sizeof (struct meltmapgimpleseqs_st) MEM_STAT_INFO)))
#endif
/* ggc_alloc_vec_entrygimpleseqmelt_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_vec_entrygimpleseqmelt_st
#define ggc_alloc_vec_entrygimpleseqmelt_st(n) ((struct entrygimpleseqmelt_st*) (ggc_internal_vec_alloc_stat (sizeof (struct entrygimpleseqmelt_st), n MEM_STAT_INFO)))
#endif
struct meltmapgimpleseqs_st *src = (struct meltmapgimpleseqs_st *) p;
int siz = melt_primtab[src->lenix];
struct meltmapgimpleseqs_st *dst = ggc_alloc_meltmapgimpleseqs_st ();
dst->discr = src->discr;
dst->count = src->count;
dst->lenix = src->lenix;
dst->meltmap_aux = src->meltmap_aux;
if (siz > 0 && src->entab)
{
dst->entab = ggc_alloc_vec_entrygimpleseqmelt_st (siz);
memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0]));
}
else
dst->entab = NULL;
n = (melt_ptr_t) dst;
break;
}
/*forwcopy gtyctype #6 CTYPE_LOOP */
case MELTOBMAG_LOOP:
{
/* macro ggc_alloc_meltloop_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltloop_st
#define ggc_alloc_meltloop_st() ((struct meltloop_st*)(ggc_internal_alloc_stat (sizeof (struct meltloop_st) MEM_STAT_INFO)))
#endif
struct meltloop_st *src = (struct meltloop_st *) p;
struct meltloop_st *dst = ggc_alloc_meltloop_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
case MELTOBMAG_MAPLOOPS:
{
/* ggc_alloc_meltmaploops_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltmaploops_st
#define ggc_alloc_meltmaploops_st() ((struct meltmaploops_st*) (ggc_internal_alloc_stat (sizeof (struct meltmaploops_st) MEM_STAT_INFO)))
#endif
/* ggc_alloc_vec_entryloopmelt_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_vec_entryloopmelt_st
#define ggc_alloc_vec_entryloopmelt_st(n) ((struct entryloopmelt_st*) (ggc_internal_vec_alloc_stat (sizeof (struct entryloopmelt_st), n MEM_STAT_INFO)))
#endif
struct meltmaploops_st *src = (struct meltmaploops_st *) p;
int siz = melt_primtab[src->lenix];
struct meltmaploops_st *dst = ggc_alloc_meltmaploops_st ();
dst->discr = src->discr;
dst->count = src->count;
dst->lenix = src->lenix;
dst->meltmap_aux = src->meltmap_aux;
if (siz > 0 && src->entab)
{
dst->entab = ggc_alloc_vec_entryloopmelt_st (siz);
memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0]));
}
else
dst->entab = NULL;
n = (melt_ptr_t) dst;
break;
}
/*forwcopy gtyctype #7 CTYPE_RTVEC */
case MELTOBMAG_RTVEC:
{
/* macro ggc_alloc_meltrtvec_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltrtvec_st
#define ggc_alloc_meltrtvec_st() ((struct meltrtvec_st*)(ggc_internal_alloc_stat (sizeof (struct meltrtvec_st) MEM_STAT_INFO)))
#endif
struct meltrtvec_st *src = (struct meltrtvec_st *) p;
struct meltrtvec_st *dst = ggc_alloc_meltrtvec_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
case MELTOBMAG_MAPRTVECS:
{
/* ggc_alloc_meltmaprtvecs_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltmaprtvecs_st
#define ggc_alloc_meltmaprtvecs_st() ((struct meltmaprtvecs_st*) (ggc_internal_alloc_stat (sizeof (struct meltmaprtvecs_st) MEM_STAT_INFO)))
#endif
/* ggc_alloc_vec_entryrtvecmelt_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_vec_entryrtvecmelt_st
#define ggc_alloc_vec_entryrtvecmelt_st(n) ((struct entryrtvecmelt_st*) (ggc_internal_vec_alloc_stat (sizeof (struct entryrtvecmelt_st), n MEM_STAT_INFO)))
#endif
struct meltmaprtvecs_st *src = (struct meltmaprtvecs_st *) p;
int siz = melt_primtab[src->lenix];
struct meltmaprtvecs_st *dst = ggc_alloc_meltmaprtvecs_st ();
dst->discr = src->discr;
dst->count = src->count;
dst->lenix = src->lenix;
dst->meltmap_aux = src->meltmap_aux;
if (siz > 0 && src->entab)
{
dst->entab = ggc_alloc_vec_entryrtvecmelt_st (siz);
memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0]));
}
else
dst->entab = NULL;
n = (melt_ptr_t) dst;
break;
}
/*forwcopy gtyctype #8 CTYPE_RTX */
case MELTOBMAG_RTX:
{
/* macro ggc_alloc_meltrtx_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltrtx_st
#define ggc_alloc_meltrtx_st() ((struct meltrtx_st*)(ggc_internal_alloc_stat (sizeof (struct meltrtx_st) MEM_STAT_INFO)))
#endif
struct meltrtx_st *src = (struct meltrtx_st *) p;
struct meltrtx_st *dst = ggc_alloc_meltrtx_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
case MELTOBMAG_MAPRTXS:
{
/* ggc_alloc_meltmaprtxs_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltmaprtxs_st
#define ggc_alloc_meltmaprtxs_st() ((struct meltmaprtxs_st*) (ggc_internal_alloc_stat (sizeof (struct meltmaprtxs_st) MEM_STAT_INFO)))
#endif
/* ggc_alloc_vec_entryrtxmelt_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_vec_entryrtxmelt_st
#define ggc_alloc_vec_entryrtxmelt_st(n) ((struct entryrtxmelt_st*) (ggc_internal_vec_alloc_stat (sizeof (struct entryrtxmelt_st), n MEM_STAT_INFO)))
#endif
struct meltmaprtxs_st *src = (struct meltmaprtxs_st *) p;
int siz = melt_primtab[src->lenix];
struct meltmaprtxs_st *dst = ggc_alloc_meltmaprtxs_st ();
dst->discr = src->discr;
dst->count = src->count;
dst->lenix = src->lenix;
dst->meltmap_aux = src->meltmap_aux;
if (siz > 0 && src->entab)
{
dst->entab = ggc_alloc_vec_entryrtxmelt_st (siz);
memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0]));
}
else
dst->entab = NULL;
n = (melt_ptr_t) dst;
break;
}
/*forwcopy gtyctype #9 CTYPE_TREE */
case MELTOBMAG_TREE:
{
/* macro ggc_alloc_melttree_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_melttree_st
#define ggc_alloc_melttree_st() ((struct melttree_st*)(ggc_internal_alloc_stat (sizeof (struct melttree_st) MEM_STAT_INFO)))
#endif
struct melttree_st *src = (struct melttree_st *) p;
struct melttree_st *dst = ggc_alloc_melttree_st ();
*dst = *src;
n = (melt_ptr_t) dst;
break;
}
case MELTOBMAG_MAPTREES:
{
/* ggc_alloc_meltmaptrees_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_meltmaptrees_st
#define ggc_alloc_meltmaptrees_st() ((struct meltmaptrees_st*) (ggc_internal_alloc_stat (sizeof (struct meltmaptrees_st) MEM_STAT_INFO)))
#endif
/* ggc_alloc_vec_entrytreemelt_st should be generated by gengtype not by runtypesupport_forwcopy */
#ifndef ggc_alloc_vec_entrytreemelt_st
#define ggc_alloc_vec_entrytreemelt_st(n) ((struct entrytreemelt_st*) (ggc_internal_vec_alloc_stat (sizeof (struct entrytreemelt_st), n MEM_STAT_INFO)))
#endif
struct meltmaptrees_st *src = (struct meltmaptrees_st *) p;
int siz = melt_primtab[src->lenix];
struct meltmaptrees_st *dst = ggc_alloc_meltmaptrees_st ();
dst->discr = src->discr;
dst->count = src->count;
dst->lenix = src->lenix;
dst->meltmap_aux = src->meltmap_aux;
if (siz > 0 && src->entab)
{
dst->entab = ggc_alloc_vec_entrytreemelt_st (siz);
memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0]));
}
else
dst->entab = NULL;
n = (melt_ptr_t) dst;
break;
}
/* trailer generated by generate_runtypesupport_forwcopy_fun */
default:
fatal_error ("corruption: forward invalid p=%p discr=%p magic=%d",
(void *) p, (void *) p->u_discr, mag);
} /* end switch (mag) */
melt_debuggc_eprintf ("melt_forwarded_copy#%ld/%04ld %p => %p %s",
melt_nb_garbcoll, melt_forward_counter, (void *) p,
(void *) n, melt_obmag_string (mag));
if (n)
{
#if ENABLE_CHECKING
if (melt_alptr_1 && (void *) melt_alptr_1 == (void *) n)
{
fprintf (stderr, "melt_forwarded_copy to alptr_1 %p mag %d\n",
melt_alptr_1, mag);
fflush (stderr);
melt_debuggc_eprintf ("melt_forwarded_copy #%ld alptr_1 %p mag %d",
melt_nb_garbcoll, melt_alptr_1, mag);
melt_break_alptr_1 ("forwarded copy to alptr_1");
}
if (melt_alptr_2 && (void *) melt_alptr_2 == (void *) n)
{
fprintf (stderr, "melt_forwarded_copy to alptr_2 %p mag %d\n",
melt_alptr_2, mag);
fflush (stderr);
melt_debuggc_eprintf ("melt_forwarded_copy #%ld alptr_2 %p",
melt_nb_garbcoll, melt_alptr_2);
melt_break_alptr_2 ("forwarded copy to alptr_2");
};
#endif /*ENABLE_CHECKING */
p->u_forward.discr = MELT_FORWARDED_DISCR;
p->u_forward.forward = n;
VEC_safe_push (melt_ptr_t, gc, melt_bscanvec, n);
}
return n;
} /* end of melt_forwarded_copy generated by generate_runtypesupport_forwcopy_fun */
/** end of code generated by generate_runtypesupport_forwcopy_fun **/
/** start of code generated by generate_runtypesupport_scanning **/
/* header from generate_runtypesupport_scanning */
/* The melt_scanning routine is mostly Chesney like ; however some types,
including objects, strbuf, stringmaps, objectmaps, all the other
*maps, contain a pointer to a non value ; this pointer should be
carefully updated if it was young. */
static void
melt_scanning (melt_ptr_t p)
{
unsigned omagic = 0;
if (!p)
return;
gcc_assert (p != (void *) HTAB_DELETED_ENTRY);
gcc_assert (p->u_discr && p->u_discr != (meltobject_ptr_t) 1);
MELT_FORWARDED (p->u_discr);
gcc_assert (!melt_is_young (p));
omagic = p->u_discr->meltobj_magic;
switch (omagic)
{
/* end of header from generate_runtypesupport_scanning*/
/*valdesc #1 VALDESC_BUCKETLONGS */
case MELTOBMAG_BUCKETLONGS:
{
struct meltbucketlongs_st *src = (struct meltbucketlongs_st *) p;
/* forwarding chunk from VALDESC_BUCKETLONGS in warmelt-base.melt */
unsigned lnix = src->buckl_lenix;
unsigned len = melt_primtab[lnix];
unsigned ucnt = src->buckl_ucount;
unsigned ix = 0;
gcc_assert (lnix > 0);
gcc_assert (len > 0);
MELT_FORWARDED (src->buckl_aux);
gcc_assert (ucnt <= len);
for (ix = 0; ix < ucnt; ix++)
MELT_FORWARDED (src->buckl_entab[ix].ebl_va);
/* end forwarding VALDESC_BUCKETLONGS */
break;
}
/*valdesc #2 VALDESC_CLOSURE */
case MELTOBMAG_CLOSURE:
{
struct meltclosure_st *src = (struct meltclosure_st *) p;
/* forwarding from VALDESC_CLOSURE */
int nbval = (int) src->nbval;
int ix = 0;
MELT_FORWARDED (src->rout);
for (ix = 0; ix < nbval; ix++)
MELT_FORWARDED (src->tabval[ix]);
break;
}
/*valdesc #3 VALDESC_DECAY */
case MELTOBMAG_DECAY:
{
struct meltdecay_st *src = (struct meltdecay_st *) p;
/* from VALDESC_DECAY */
MELT_FORWARDED (src->val);
break;
}
/*valdesc #4 VALDESC_INT */
case MELTOBMAG_INT:
{
break;
}
/*valdesc #5 VALDESC_LIST */
case MELTOBMAG_LIST:
{
struct meltlist_st *src = (struct meltlist_st *) p;
/* from VALDESC_LIST */
MELT_FORWARDED (src->first);
MELT_FORWARDED (src->last);
break;
}
/*valdesc #6 VALDESC_MAPOBJECTS */
case MELTOBMAG_MAPOBJECTS:
{
struct meltmapobjects_st *src = (struct meltmapobjects_st *) p;
/* forwarding from VALDESC_MAPOBJECTS */
int siz, ix;
MELT_FORWARDED (src->meltmap_aux);
if (!src->entab)
break;
siz = melt_primtab[src->lenix];
gcc_assert (siz > 0);
if (melt_is_young (src->entab))
{
struct entryobjectsmelt_st *newtab =
/* Don't need a cleared allocation! */
ggc_alloc_vec_entryobjectsmelt_st (siz);
memcpy (newtab, src->entab,
siz * sizeof (struct entryobjectsmelt_st));
src->entab = newtab;
}
for (ix = 0; ix < siz; ix++)
{
meltobject_ptr_t at = src->entab[ix].e_at;
if (!at || at == (void *) HTAB_DELETED_ENTRY)
{
src->entab[ix].e_va = NULL;
continue;
}
MELT_FORWARDED (at);
src->entab[ix].e_at = at;
MELT_FORWARDED (src->entab[ix].e_va);
}
/* end forwarding from VALDESC_MAPOBJECTS */
break;
}
/*valdesc #7 VALDESC_MAPSTRINGS */
case MELTOBMAG_MAPSTRINGS:
{
struct meltmapstrings_st *src = (struct meltmapstrings_st *) p;
/* forwarding from VALDESC_MAPSTRINGS */
int ix, siz;
MELT_FORWARDED (src->meltmap_aux);
if (!src->entab)
break;
siz = melt_primtab[src->lenix];
gcc_assert (siz > 0);
if (melt_is_young (src->entab))
{
struct entrystringsmelt_st *newtab
/* Don't need a cleared allocation! */
= ggc_alloc_vec_entrystringsmelt_st (siz);
memcpy (newtab, src->entab,
siz * sizeof (struct entrystringsmelt_st));
src->entab = newtab;
}
for (ix = 0; ix < siz; ix++)
{
const char *at = src->entab[ix].e_at;
if (!at || at == (void *) HTAB_DELETED_ENTRY)
{
src->entab[ix].e_va = NULL;
continue;
}
if (melt_is_young ((const void *) at))
src->entab[ix].e_at = (const char *) ggc_strdup (at);
MELT_FORWARDED (src->entab[ix].e_va);
}
/* end forwarding from VALDESC_MAPSTRINGS */
break;
}
/*valdesc #8 VALDESC_MIXBIGINT */
case MELTOBMAG_MIXBIGINT:
{
struct meltmixbigint_st *src = (struct meltmixbigint_st *) p;
/* from VALDESC_MIXBIGINT */
MELT_FORWARDED (src->ptrval);
break;
}
/*valdesc #9 VALDESC_MIXINT */
case MELTOBMAG_MIXINT:
{
struct meltmixint_st *src = (struct meltmixint_st *) p;
/* from VALDESC_MIXINT */
MELT_FORWARDED (src->ptrval);
break;
}
/*valdesc #10 VALDESC_MIXLOC */
case MELTOBMAG_MIXLOC:
{
struct meltmixloc_st *src = (struct meltmixloc_st *) p;
/* from VALDESC_MIXLOC */
MELT_FORWARDED (src->ptrval);
break;
}
/*valdesc #11 VALDESC_MULTIPLE */
case MELTOBMAG_MULTIPLE:
{
struct meltmultiple_st *src = (struct meltmultiple_st *) p;
/* forwarding chunk from VALDESC_MULTIPLE */
int nbval = (int) src->nbval;
int ix = 0;
for (ix = 0; ix < nbval; ix++)
MELT_FORWARDED (src->tabval[ix]);
/* end forwarding chunk from VALDESC_MULTIPLE */
break;
}
/*valdesc #12 VALDESC_OBJECT */
case MELTOBMAG_OBJECT:
{
struct meltobject_st *src = (struct meltobject_st *) p;
/* from VALDESC_OBJECT */
int ix = 0;
int oblen = (int) (src->obj_len);
for (ix = 0; ix < oblen; ix++)
MELT_FORWARDED (src->obj_vartab[ix]);
break;
}
/*valdesc #13 VALDESC_PAIR */
case MELTOBMAG_PAIR:
{
struct meltpair_st *src = (struct meltpair_st *) p;
/* forward VALDESC_PAIR in warmelt-base.melt */
MELT_FORWARDED (src->hd);
MELT_FORWARDED (src->tl);
break;
}
/*valdesc #14 VALDESC_REAL */
case MELTOBMAG_REAL:
{
break;
}
/*valdesc #15 VALDESC_ROUTINE */
case MELTOBMAG_ROUTINE:
{
struct meltroutine_st *src = (struct meltroutine_st *) p;
/* from VALDESC_ROUTINE */
int nbval = (int) src->nbval;
int ix = 0;
for (ix = 0; ix < nbval; ix++)
MELT_FORWARDED (src->tabval[ix]);
break;
}
/*valdesc #16 VALDESC_SPECIAL_FILE */
case MELTOBMAG_SPEC_FILE:
{
struct meltspecialfile_st *src = (struct meltspecialfile_st *) p;
/* from VALDESC_SPECIAL_FILE */
src->mark = 1;
break;
}
/*valdesc #17 VALDESC_SPECIAL_MPFR */
case MELTOBMAG_SPEC_MPFR:
{
struct meltspecialmpfr_st *src = (struct meltspecialmpfr_st *) p;
/* from VALDESC_SPECIAL_MPFR */
src->mark = 1;
break;
}
/*valdesc #18 VALDESC_SPECIAL_RAW_FILE */
case MELTOBMAG_SPEC_RAWFILE:
{
struct meltspecialrawfile_st *src =
(struct meltspecialrawfile_st *) p;
/* from VALDESC_SPECIAL_RAW_FILE */
src->mark = 1;
break;
}
/*valdesc #19 VALDESC_STRBUF */
case MELTOBMAG_STRBUF:
{
break;
}
/*valdesc #20 VALDESC_STRING */
case MELTOBMAG_STRING:
{
break;
}
/* GTY-ed ctypes scan forward for melt_scanning */
/*gtyctype #1 CTYPE_BASIC_BLOCK*/
case MELTOBMAG_BASICBLOCK:
break;
case MELTOBMAG_MAPBASICBLOCKS:
{
struct meltmapbasicblocks_st *src =
(struct meltmapbasicblocks_st *) p;
int siz = 0, ix = 0;
MELT_FORWARDED (src->meltmap_aux);
if (!src->entab)
break;
siz = melt_primtab[src->lenix];
gcc_assert (siz > 0);
if (melt_is_young (src->entab))
{
struct entrybasicblockmelt_st *newtab =
ggc_alloc_vec_entrybasicblockmelt_st (siz);
memcpy (newtab, src->entab,
siz * sizeof (struct entrybasicblockmelt_st));
src->entab = newtab;
} /*end if young entab */
for (ix = 0; ix < siz; ix++)
{
basic_block at = src->entab[ix].e_at;
if (!at || (void *) at == (void *) HTAB_DELETED_ENTRY)
{
src->entab[ix].e_va = NULL;
continue;
} /*end if empty at */
MELT_FORWARDED (src->entab[ix].e_va);
} /*end for ix */
}; /* end case MELTOBMAG_MAPBASICBLOCKS */
break;
/*gtyctype #2 CTYPE_BITMAP */
case MELTOBMAG_BITMAP:
break;
case MELTOBMAG_MAPBITMAPS:
{
struct meltmapbitmaps_st *src = (struct meltmapbitmaps_st *) p;
int siz = 0, ix = 0;
MELT_FORWARDED (src->meltmap_aux);
if (!src->entab)
break;
siz = melt_primtab[src->lenix];
gcc_assert (siz > 0);
if (melt_is_young (src->entab))
{
struct entrybitmapmelt_st *newtab =
ggc_alloc_vec_entrybitmapmelt_st (siz);
memcpy (newtab, src->entab,
siz * sizeof (struct entrybitmapmelt_st));
src->entab = newtab;
} /*end if young entab */
for (ix = 0; ix < siz; ix++)
{
bitmap at = src->entab[ix].e_at;
if (!at || (void *) at == (void *) HTAB_DELETED_ENTRY)
{
src->entab[ix].e_va = NULL;
continue;
} /*end if empty at */
MELT_FORWARDED (src->entab[ix].e_va);
} /*end for ix */
}; /* end case MELTOBMAG_MAPBITMAPS */
break;
/*gtyctype #3 CTYPE_EDGE */
case MELTOBMAG_EDGE:
break;
case MELTOBMAG_MAPEDGES:
{
struct meltmapedges_st *src = (struct meltmapedges_st *) p;
int siz = 0, ix = 0;
MELT_FORWARDED (src->meltmap_aux);
if (!src->entab)
break;
siz = melt_primtab[src->lenix];
gcc_assert (siz > 0);
if (melt_is_young (src->entab))
{
struct entryedgemelt_st *newtab =
ggc_alloc_vec_entryedgemelt_st (siz);
memcpy (newtab, src->entab,
siz * sizeof (struct entryedgemelt_st));
src->entab = newtab;
} /*end if young entab */
for (ix = 0; ix < siz; ix++)
{
edge at = src->entab[ix].e_at;
if (!at || (void *) at == (void *) HTAB_DELETED_ENTRY)
{
src->entab[ix].e_va = NULL;
continue;
} /*end if empty at */
MELT_FORWARDED (src->entab[ix].e_va);
} /*end for ix */
}; /* end case MELTOBMAG_MAPEDGES */
break;
/*gtyctype #4 CTYPE_GIMPLE */
case MELTOBMAG_GIMPLE:
break;
case MELTOBMAG_MAPGIMPLES:
{
struct meltmapgimples_st *src = (struct meltmapgimples_st *) p;
int siz = 0, ix = 0;
MELT_FORWARDED (src->meltmap_aux);
if (!src->entab)
break;
siz = melt_primtab[src->lenix];
gcc_assert (siz > 0);
if (melt_is_young (src->entab))
{
struct entrygimplemelt_st *newtab =
ggc_alloc_vec_entrygimplemelt_st (siz);
memcpy (newtab, src->entab,
siz * sizeof (struct entrygimplemelt_st));
src->entab = newtab;
} /*end if young entab */
for (ix = 0; ix < siz; ix++)
{
gimple at = src->entab[ix].e_at;
if (!at || (void *) at == (void *) HTAB_DELETED_ENTRY)
{
src->entab[ix].e_va = NULL;
continue;
} /*end if empty at */
MELT_FORWARDED (src->entab[ix].e_va);
} /*end for ix */
}; /* end case MELTOBMAG_MAPGIMPLES */
break;
/*gtyctype #5 CTYPE_GIMPLE_SEQ */
case MELTOBMAG_GIMPLESEQ:
break;
case MELTOBMAG_MAPGIMPLESEQS:
{
struct meltmapgimpleseqs_st *src = (struct meltmapgimpleseqs_st *) p;
int siz = 0, ix = 0;
MELT_FORWARDED (src->meltmap_aux);
if (!src->entab)
break;
siz = melt_primtab[src->lenix];
gcc_assert (siz > 0);
if (melt_is_young (src->entab))
{
struct entrygimpleseqmelt_st *newtab =
ggc_alloc_vec_entrygimpleseqmelt_st (siz);
memcpy (newtab, src->entab,
siz * sizeof (struct entrygimpleseqmelt_st));
src->entab = newtab;
} /*end if young entab */
for (ix = 0; ix < siz; ix++)
{
gimple_seq at = src->entab[ix].e_at;
if (!at || (void *) at == (void *) HTAB_DELETED_ENTRY)
{
src->entab[ix].e_va = NULL;
continue;
} /*end if empty at */
MELT_FORWARDED (src->entab[ix].e_va);
} /*end for ix */
}; /* end case MELTOBMAG_MAPGIMPLESEQS */
break;
/*gtyctype #6 CTYPE_LOOP */
case MELTOBMAG_LOOP:
break;
case MELTOBMAG_MAPLOOPS:
{
struct meltmaploops_st *src = (struct meltmaploops_st *) p;
int siz = 0, ix = 0;
MELT_FORWARDED (src->meltmap_aux);
if (!src->entab)
break;
siz = melt_primtab[src->lenix];
gcc_assert (siz > 0);
if (melt_is_young (src->entab))
{
struct entryloopmelt_st *newtab =
ggc_alloc_vec_entryloopmelt_st (siz);
memcpy (newtab, src->entab,
siz * sizeof (struct entryloopmelt_st));
src->entab = newtab;
} /*end if young entab */
for (ix = 0; ix < siz; ix++)
{
loop_p at = src->entab[ix].e_at;
if (!at || (void *) at == (void *) HTAB_DELETED_ENTRY)
{
src->entab[ix].e_va = NULL;
continue;
} /*end if empty at */
MELT_FORWARDED (src->entab[ix].e_va);
} /*end for ix */
}; /* end case MELTOBMAG_MAPLOOPS */
break;
/*gtyctype #7 CTYPE_RTVEC */
case MELTOBMAG_RTVEC:
break;
case MELTOBMAG_MAPRTVECS:
{
struct meltmaprtvecs_st *src = (struct meltmaprtvecs_st *) p;
int siz = 0, ix = 0;
MELT_FORWARDED (src->meltmap_aux);
if (!src->entab)
break;
siz = melt_primtab[src->lenix];
gcc_assert (siz > 0);
if (melt_is_young (src->entab))
{
struct entryrtvecmelt_st *newtab =
ggc_alloc_vec_entryrtvecmelt_st (siz);
memcpy (newtab, src->entab,
siz * sizeof (struct entryrtvecmelt_st));
src->entab = newtab;
} /*end if young entab */
for (ix = 0; ix < siz; ix++)
{
rtvec at = src->entab[ix].e_at;
if (!at || (void *) at == (void *) HTAB_DELETED_ENTRY)
{
src->entab[ix].e_va = NULL;
continue;
} /*end if empty at */
MELT_FORWARDED (src->entab[ix].e_va);
} /*end for ix */
}; /* end case MELTOBMAG_MAPRTVECS */
break;
/*gtyctype #8 CTYPE_RTX */
case MELTOBMAG_RTX:
break;
case MELTOBMAG_MAPRTXS:
{
struct meltmaprtxs_st *src = (struct meltmaprtxs_st *) p;
int siz = 0, ix = 0;
MELT_FORWARDED (src->meltmap_aux);
if (!src->entab)
break;
siz = melt_primtab[src->lenix];
gcc_assert (siz > 0);
if (melt_is_young (src->entab))
{
struct entryrtxmelt_st *newtab =
ggc_alloc_vec_entryrtxmelt_st (siz);
memcpy (newtab, src->entab,
siz * sizeof (struct entryrtxmelt_st));
src->entab = newtab;
} /*end if young entab */
for (ix = 0; ix < siz; ix++)
{
rtx at = src->entab[ix].e_at;
if (!at || (void *) at == (void *) HTAB_DELETED_ENTRY)
{
src->entab[ix].e_va = NULL;
continue;
} /*end if empty at */
MELT_FORWARDED (src->entab[ix].e_va);
} /*end for ix */
}; /* end case MELTOBMAG_MAPRTXS */
break;
/*gtyctype #9 CTYPE_TREE */
case MELTOBMAG_TREE:
break;
case MELTOBMAG_MAPTREES:
{
struct meltmaptrees_st *src = (struct meltmaptrees_st *) p;
int siz = 0, ix = 0;
MELT_FORWARDED (src->meltmap_aux);
if (!src->entab)
break;
siz = melt_primtab[src->lenix];
gcc_assert (siz > 0);
if (melt_is_young (src->entab))
{
struct entrytreemelt_st *newtab =
ggc_alloc_vec_entrytreemelt_st (siz);
memcpy (newtab, src->entab,
siz * sizeof (struct entrytreemelt_st));
src->entab = newtab;
} /*end if young entab */
for (ix = 0; ix < siz; ix++)
{
tree at = src->entab[ix].e_at;
if (!at || (void *) at == (void *) HTAB_DELETED_ENTRY)
{
src->entab[ix].e_va = NULL;
continue;
} /*end if empty at */
MELT_FORWARDED (src->entab[ix].e_va);
} /*end for ix */
}; /* end case MELTOBMAG_MAPTREES */
break;
/* trailer generated by generate_runtypesupport_scanning */
default:
/* gcc_unreachable (); */
fatal_error ("melt melt_scanning GC: corrupted heap, p=%p omagic=%d\n",
(void *) p, (int) omagic);
}
} /* end of melt_scanning generated by generate_runtypesupport_scanning */
/**end of code generated by generate_runtypesupport_scanning **/
/** start of code generated by generate_runtypesupport_boxingfun **/
/*gtyctype #1 CTYPE_BASIC_BLOCK*/
melt_ptr_t
meltgc_new_basicblock (meltobject_ptr_t discr_p, basic_block val)
{ /*generated boxingfun */
MELT_ENTERFRAME (2, NULL);
#define resv meltfram__.mcfr_varptr[0]
#define discrv meltfram__.mcfr_varptr[1]
discrv = discr_p;
if (!discrv)
discrv = MELT_PREDEF (DISCR_BASIC_BLOCK);
if (melt_magic_discr ((melt_ptr_t) discrv) != MELTOBMAG_OBJECT)
goto end;
if (((meltobject_ptr_t) (discrv))->meltobj_magic != MELTOBMAG_BASICBLOCK)
goto end;
resv = meltgc_allocate (sizeof (struct meltbasicblock_st), 0);
((struct meltbasicblock_st *) (resv))->discr = (meltobject_ptr_t) discrv;
((struct meltbasicblock_st *) (resv))->val = val;
end:MELT_EXITFRAME ();
return ((melt_ptr_t) (resv));
#undef resv
#undef discrv
} /* end generated boxingfun meltgc_new_basicblock */
void
meltgc_basicblock_updatebox (melt_ptr_t box_p, basic_block val)
{ /*generated updateboxfun */
MELT_ENTERFRAME (1, NULL);
#define boxv meltfram__.mcfr_varptr[0]
boxv = box_p;
if (melt_magic_discr ((melt_ptr_t) boxv) != MELTOBMAG_BASICBLOCK)
goto end;
((struct meltbasicblock_st *) (boxv))->val = val;
meltgc_touch ((melt_ptr_t) boxv);
end:MELT_EXITFRAME ();
#undef boxv
} /* end generated updateboxfun meltgc_basicblock_updatebox */
/*gtyctype #2 CTYPE_BITMAP*/
melt_ptr_t
meltgc_new_bitmap (meltobject_ptr_t discr_p, bitmap val)
{ /*generated boxingfun */
MELT_ENTERFRAME (2, NULL);
#define resv meltfram__.mcfr_varptr[0]
#define discrv meltfram__.mcfr_varptr[1]
discrv = discr_p;
if (!discrv)
discrv = MELT_PREDEF (DISCR_BITMAP);
if (melt_magic_discr ((melt_ptr_t) discrv) != MELTOBMAG_OBJECT)
goto end;
if (((meltobject_ptr_t) (discrv))->meltobj_magic != MELTOBMAG_BITMAP)
goto end;
resv = meltgc_allocate (sizeof (struct meltbitmap_st), 0);
((struct meltbitmap_st *) (resv))->discr = (meltobject_ptr_t) discrv;
((struct meltbitmap_st *) (resv))->val = val;
end:MELT_EXITFRAME ();
return ((melt_ptr_t) (resv));
#undef resv
#undef discrv
} /* end generated boxingfun meltgc_new_bitmap */
void
meltgc_bitmap_updatebox (melt_ptr_t box_p, bitmap val)
{ /*generated updateboxfun */
MELT_ENTERFRAME (1, NULL);
#define boxv meltfram__.mcfr_varptr[0]
boxv = box_p;
if (melt_magic_discr ((melt_ptr_t) boxv) != MELTOBMAG_BITMAP)
goto end;
((struct meltbitmap_st *) (boxv))->val = val;
meltgc_touch ((melt_ptr_t) boxv);
end:MELT_EXITFRAME ();
#undef boxv
} /* end generated updateboxfun meltgc_bitmap_updatebox */
/*gtyctype #3 CTYPE_EDGE*/
melt_ptr_t
meltgc_new_edge (meltobject_ptr_t discr_p, edge val)
{ /*generated boxingfun */
MELT_ENTERFRAME (2, NULL);
#define resv meltfram__.mcfr_varptr[0]
#define discrv meltfram__.mcfr_varptr[1]
discrv = discr_p;
if (!discrv)
discrv = MELT_PREDEF (DISCR_EDGE);
if (melt_magic_discr ((melt_ptr_t) discrv) != MELTOBMAG_OBJECT)
goto end;
if (((meltobject_ptr_t) (discrv))->meltobj_magic != MELTOBMAG_EDGE)
goto end;
resv = meltgc_allocate (sizeof (struct meltedge_st), 0);
((struct meltedge_st *) (resv))->discr = (meltobject_ptr_t) discrv;
((struct meltedge_st *) (resv))->val = val;
end:MELT_EXITFRAME ();
return ((melt_ptr_t) (resv));
#undef resv
#undef discrv
} /* end generated boxingfun meltgc_new_edge */
void
meltgc_edge_updatebox (melt_ptr_t box_p, edge val)
{ /*generated updateboxfun */
MELT_ENTERFRAME (1, NULL);
#define boxv meltfram__.mcfr_varptr[0]
boxv = box_p;
if (melt_magic_discr ((melt_ptr_t) boxv) != MELTOBMAG_EDGE)
goto end;
((struct meltedge_st *) (boxv))->val = val;
meltgc_touch ((melt_ptr_t) boxv);
end:MELT_EXITFRAME ();
#undef boxv
} /* end generated updateboxfun meltgc_edge_updatebox */
/*gtyctype #4 CTYPE_GIMPLE*/
melt_ptr_t
meltgc_new_gimple (meltobject_ptr_t discr_p, gimple val)
{ /*generated boxingfun */
MELT_ENTERFRAME (2, NULL);
#define resv meltfram__.mcfr_varptr[0]
#define discrv meltfram__.mcfr_varptr[1]
discrv = discr_p;
if (!discrv)
discrv = MELT_PREDEF (DISCR_GIMPLE);
if (melt_magic_discr ((melt_ptr_t) discrv) != MELTOBMAG_OBJECT)
goto end;
if (((meltobject_ptr_t) (discrv))->meltobj_magic != MELTOBMAG_GIMPLE)
goto end;
resv = meltgc_allocate (sizeof (struct meltgimple_st), 0);
((struct meltgimple_st *) (resv))->discr = (meltobject_ptr_t) discrv;
((struct meltgimple_st *) (resv))->val = val;
end:MELT_EXITFRAME ();
return ((melt_ptr_t) (resv));
#undef resv
#undef discrv
} /* end generated boxingfun meltgc_new_gimple */
void
meltgc_gimple_updatebox (melt_ptr_t box_p, gimple val)
{ /*generated updateboxfun */
MELT_ENTERFRAME (1, NULL);
#define boxv meltfram__.mcfr_varptr[0]
boxv = box_p;
if (melt_magic_discr ((melt_ptr_t) boxv) != MELTOBMAG_GIMPLE)
goto end;
((struct meltgimple_st *) (boxv))->val = val;
meltgc_touch ((melt_ptr_t) boxv);
end:MELT_EXITFRAME ();
#undef boxv
} /* end generated updateboxfun meltgc_gimple_updatebox */
/*gtyctype #5 CTYPE_GIMPLE_SEQ*/
melt_ptr_t
meltgc_new_gimpleseq (meltobject_ptr_t discr_p, gimple_seq val)
{ /*generated boxingfun */
MELT_ENTERFRAME (2, NULL);
#define resv meltfram__.mcfr_varptr[0]
#define discrv meltfram__.mcfr_varptr[1]
discrv = discr_p;
if (!discrv)
discrv = MELT_PREDEF (DISCR_GIMPLE_SEQ);
if (melt_magic_discr ((melt_ptr_t) discrv) != MELTOBMAG_OBJECT)
goto end;
if (((meltobject_ptr_t) (discrv))->meltobj_magic != MELTOBMAG_GIMPLESEQ)
goto end;
resv = meltgc_allocate (sizeof (struct meltgimpleseq_st), 0);
((struct meltgimpleseq_st *) (resv))->discr = (meltobject_ptr_t) discrv;
((struct meltgimpleseq_st *) (resv))->val = val;
end:MELT_EXITFRAME ();
return ((melt_ptr_t) (resv));
#undef resv
#undef discrv
} /* end generated boxingfun meltgc_new_gimpleseq */
void
meltgc_gimpleseq_updatebox (melt_ptr_t box_p, gimple_seq val)
{ /*generated updateboxfun */
MELT_ENTERFRAME (1, NULL);
#define boxv meltfram__.mcfr_varptr[0]
boxv = box_p;
if (melt_magic_discr ((melt_ptr_t) boxv) != MELTOBMAG_GIMPLESEQ)
goto end;
((struct meltgimpleseq_st *) (boxv))->val = val;
meltgc_touch ((melt_ptr_t) boxv);
end:MELT_EXITFRAME ();
#undef boxv
} /* end generated updateboxfun meltgc_gimpleseq_updatebox */
/*gtyctype #6 CTYPE_LOOP*/
melt_ptr_t
meltgc_new_loop (meltobject_ptr_t discr_p, loop_p val)
{ /*generated boxingfun */
MELT_ENTERFRAME (2, NULL);
#define resv meltfram__.mcfr_varptr[0]
#define discrv meltfram__.mcfr_varptr[1]
discrv = discr_p;
if (!discrv)
discrv = MELT_PREDEF (DISCR_LOOP);
if (melt_magic_discr ((melt_ptr_t) discrv) != MELTOBMAG_OBJECT)
goto end;
if (((meltobject_ptr_t) (discrv))->meltobj_magic != MELTOBMAG_LOOP)
goto end;
resv = meltgc_allocate (sizeof (struct meltloop_st), 0);
((struct meltloop_st *) (resv))->discr = (meltobject_ptr_t) discrv;
((struct meltloop_st *) (resv))->val = val;
end:MELT_EXITFRAME ();
return ((melt_ptr_t) (resv));
#undef resv
#undef discrv
} /* end generated boxingfun meltgc_new_loop */
void
melt_loop_updatebox (melt_ptr_t box_p, loop_p val)
{ /*generated updateboxfun */
MELT_ENTERFRAME (1, NULL);
#define boxv meltfram__.mcfr_varptr[0]
boxv = box_p;
if (melt_magic_discr ((melt_ptr_t) boxv) != MELTOBMAG_LOOP)
goto end;
((struct meltloop_st *) (boxv))->val = val;
meltgc_touch ((melt_ptr_t) boxv);
end:MELT_EXITFRAME ();
#undef boxv
} /* end generated updateboxfun melt_loop_updatebox */
/*gtyctype #7 CTYPE_RTVEC*/
melt_ptr_t
meltgc_new_rtvec (meltobject_ptr_t discr_p, rtvec val)
{ /*generated boxingfun */
MELT_ENTERFRAME (2, NULL);
#define resv meltfram__.mcfr_varptr[0]
#define discrv meltfram__.mcfr_varptr[1]
discrv = discr_p;
if (!discrv)
discrv = MELT_PREDEF (DISCR_RTVEC);
if (melt_magic_discr ((melt_ptr_t) discrv) != MELTOBMAG_OBJECT)
goto end;
if (((meltobject_ptr_t) (discrv))->meltobj_magic != MELTOBMAG_RTVEC)
goto end;
resv = meltgc_allocate (sizeof (struct meltrtvec_st), 0);
((struct meltrtvec_st *) (resv))->discr = (meltobject_ptr_t) discrv;
((struct meltrtvec_st *) (resv))->val = val;
end:MELT_EXITFRAME ();
return ((melt_ptr_t) (resv));
#undef resv
#undef discrv
} /* end generated boxingfun meltgc_new_rtvec */
void
meltgc_rtvec_updatebox (melt_ptr_t box_p, rtvec val)
{ /*generated updateboxfun */
MELT_ENTERFRAME (1, NULL);
#define boxv meltfram__.mcfr_varptr[0]
boxv = box_p;
if (melt_magic_discr ((melt_ptr_t) boxv) != MELTOBMAG_RTVEC)
goto end;
((struct meltrtvec_st *) (boxv))->val = val;
meltgc_touch ((melt_ptr_t) boxv);
end:MELT_EXITFRAME ();
#undef boxv
} /* end generated updateboxfun meltgc_rtvec_updatebox */
/*gtyctype #8 CTYPE_RTX*/
melt_ptr_t
meltgc_new_rtx (meltobject_ptr_t discr_p, rtx val)
{ /*generated boxingfun */
MELT_ENTERFRAME (2, NULL);
#define resv meltfram__.mcfr_varptr[0]
#define discrv meltfram__.mcfr_varptr[1]
discrv = discr_p;
if (!discrv)
discrv = MELT_PREDEF (DISCR_RTX);
if (melt_magic_discr ((melt_ptr_t) discrv) != MELTOBMAG_OBJECT)
goto end;
if (((meltobject_ptr_t) (discrv))->meltobj_magic != MELTOBMAG_RTX)
goto end;
resv = meltgc_allocate (sizeof (struct meltrtx_st), 0);
((struct meltrtx_st *) (resv))->discr = (meltobject_ptr_t) discrv;
((struct meltrtx_st *) (resv))->val = val;
end:MELT_EXITFRAME ();
return ((melt_ptr_t) (resv));
#undef resv
#undef discrv
} /* end generated boxingfun meltgc_new_rtx */
void
meltgc_rtx_updatebox (melt_ptr_t box_p, rtx val)
{ /*generated updateboxfun */
MELT_ENTERFRAME (1, NULL);
#define boxv meltfram__.mcfr_varptr[0]
boxv = box_p;
if (melt_magic_discr ((melt_ptr_t) boxv) != MELTOBMAG_RTX)
goto end;
((struct meltrtx_st *) (boxv))->val = val;
meltgc_touch ((melt_ptr_t) boxv);
end:MELT_EXITFRAME ();
#undef boxv
} /* end generated updateboxfun meltgc_rtx_updatebox */
/*gtyctype #9 CTYPE_TREE*/
melt_ptr_t
meltgc_new_tree (meltobject_ptr_t discr_p, tree val)
{ /*generated boxingfun */
MELT_ENTERFRAME (2, NULL);
#define resv meltfram__.mcfr_varptr[0]
#define discrv meltfram__.mcfr_varptr[1]
discrv = discr_p;
if (!discrv)
discrv = MELT_PREDEF (DISCR_TREE);
if (melt_magic_discr ((melt_ptr_t) discrv) != MELTOBMAG_OBJECT)
goto end;
if (((meltobject_ptr_t) (discrv))->meltobj_magic != MELTOBMAG_TREE)
goto end;
resv = meltgc_allocate (sizeof (struct melttree_st), 0);
((struct melttree_st *) (resv))->discr = (meltobject_ptr_t) discrv;
((struct melttree_st *) (resv))->val = val;
end:MELT_EXITFRAME ();
return ((melt_ptr_t) (resv));
#undef resv
#undef discrv
} /* end generated boxingfun meltgc_new_tree */
void
meltgc_tree_updatebox (melt_ptr_t box_p, tree val)
{ /*generated updateboxfun */
MELT_ENTERFRAME (1, NULL);
#define boxv meltfram__.mcfr_varptr[0]
boxv = box_p;
if (melt_magic_discr ((melt_ptr_t) boxv) != MELTOBMAG_TREE)
goto end;
((struct melttree_st *) (boxv))->val = val;
meltgc_touch ((melt_ptr_t) boxv);
end:MELT_EXITFRAME ();
#undef boxv
} /* end generated updateboxfun meltgc_tree_updatebox */
/** end of code generated by generate_runtypesupport_boxingfun **/
/** generated by generate_runtypesupport_cloning_fun **/
/* generated cloning routine head */
melt_ptr_t
meltgc_clone_with_discriminant (melt_ptr_t srcval_p, melt_ptr_t newdiscr_p)
{
unsigned srcmagic = 0;
unsigned newmagic = 0;
MELT_ENTERFRAME (5, NULL);
#define resv meltfram__.mcfr_varptr[0]
#define srcvalv meltfram__.mcfr_varptr[1]
#define newdiscrv meltfram__.mcfr_varptr[2]
#define srcdiscrv meltfram__.mcfr_varptr[3]
#define compv meltfram__.mcfr_varptr[4]
srcvalv = srcval_p;
newdiscrv = newdiscr_p;
resv = srcvalv;
if (!srcvalv)
goto end;
srcdiscrv = ((melt_ptr_t) srcvalv)->u_discr;
if (!newdiscrv)
newdiscrv = srcdiscrv;
if (melt_magic_discr ((melt_ptr_t) newdiscrv) != MELTOBMAG_OBJECT
|| ((meltobject_ptr_t) newdiscrv)->obj_len <
MELTLENGTH_CLASS_DISCRIMINANT)
goto end;
if (!melt_is_instance_of ((melt_ptr_t) newdiscrv,
MELT_PREDEF (CLASS_DISCRIMINANT)))
goto end;
srcmagic = melt_magic_discr ((melt_ptr_t) srcvalv);
newmagic = ((meltobject_ptr_t) newdiscrv)->meltobj_magic;
if (srcmagic != newmagic)
goto end;
switch (srcmagic)
{ /* end cloning heeader */
/*** cloning 9 GTY-ed ctypes ***/
/*cloning gtyctype #1 CTYPE_BASIC_BLOCK */
case MELTOBMAG_BASICBLOCK:
{ /* cloning boxed value CTYPE_BASIC_BLOCK */
struct meltbasicblock_st *src = (struct meltbasicblock_st *) srcvalv;
struct meltbasicblock_st *dst =
(struct meltbasicblock_st *)
meltgc_allocate (sizeof (struct meltbasicblock_st), 0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
case MELTOBMAG_MAPBASICBLOCKS:
{ /* cloning map value CTYPE_BASIC_BLOCK */
struct meltmapbasicblocks_st *src =
(struct meltmapbasicblocks_st *) srcvalv;
unsigned oldlen = melt_primtab[src->lenix];
unsigned newlen = 4 * src->count / 3 + 5;
struct meltmapbasicblocks_st *dst =
(struct meltmapbasicblocks_st *)
meltgc_raw_new_mappointers ((meltobject_ptr_t) newdiscrv, newlen);
unsigned ix = 0;
dst->meltmap_aux = src->meltmap_aux;
if (src->entab)
for (ix = 0; ix < oldlen; ix++)
{
melt_ptr_t curva = src->entab[ix].e_va;
basic_block curat = src->entab[ix].e_at;
if (curva != NULL && curat != (basic_block) HTAB_DELETED_ENTRY)
meltgc_raw_put_mappointers ((void *) dst,
(const void *) curat, curva);
}
resv = (melt_ptr_t) dst;
};
break;
/*cloning gtyctype #2 CTYPE_BITMAP */
case MELTOBMAG_BITMAP:
{ /* cloning boxed value CTYPE_BITMAP */
struct meltbitmap_st *src = (struct meltbitmap_st *) srcvalv;
struct meltbitmap_st *dst =
(struct meltbitmap_st *)
meltgc_allocate (sizeof (struct meltbitmap_st), 0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
case MELTOBMAG_MAPBITMAPS:
{ /* cloning map value CTYPE_BITMAP */
struct meltmapbitmaps_st *src = (struct meltmapbitmaps_st *) srcvalv;
unsigned oldlen = melt_primtab[src->lenix];
unsigned newlen = 4 * src->count / 3 + 5;
struct meltmapbitmaps_st *dst =
(struct meltmapbitmaps_st *)
meltgc_raw_new_mappointers ((meltobject_ptr_t) newdiscrv, newlen);
unsigned ix = 0;
dst->meltmap_aux = src->meltmap_aux;
if (src->entab)
for (ix = 0; ix < oldlen; ix++)
{
melt_ptr_t curva = src->entab[ix].e_va;
bitmap curat = src->entab[ix].e_at;
if (curva != NULL && curat != (bitmap) HTAB_DELETED_ENTRY)
meltgc_raw_put_mappointers ((void *) dst,
(const void *) curat, curva);
}
resv = (melt_ptr_t) dst;
};
break;
/*cloning gtyctype #3 CTYPE_EDGE */
case MELTOBMAG_EDGE:
{ /* cloning boxed value CTYPE_EDGE */
struct meltedge_st *src = (struct meltedge_st *) srcvalv;
struct meltedge_st *dst =
(struct meltedge_st *) meltgc_allocate (sizeof (struct meltedge_st),
0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
case MELTOBMAG_MAPEDGES:
{ /* cloning map value CTYPE_EDGE */
struct meltmapedges_st *src = (struct meltmapedges_st *) srcvalv;
unsigned oldlen = melt_primtab[src->lenix];
unsigned newlen = 4 * src->count / 3 + 5;
struct meltmapedges_st *dst =
(struct meltmapedges_st *)
meltgc_raw_new_mappointers ((meltobject_ptr_t) newdiscrv, newlen);
unsigned ix = 0;
dst->meltmap_aux = src->meltmap_aux;
if (src->entab)
for (ix = 0; ix < oldlen; ix++)
{
melt_ptr_t curva = src->entab[ix].e_va;
edge curat = src->entab[ix].e_at;
if (curva != NULL && curat != (edge) HTAB_DELETED_ENTRY)
meltgc_raw_put_mappointers ((void *) dst,
(const void *) curat, curva);
}
resv = (melt_ptr_t) dst;
};
break;
/*cloning gtyctype #4 CTYPE_GIMPLE */
case MELTOBMAG_GIMPLE:
{ /* cloning boxed value CTYPE_GIMPLE */
struct meltgimple_st *src = (struct meltgimple_st *) srcvalv;
struct meltgimple_st *dst =
(struct meltgimple_st *)
meltgc_allocate (sizeof (struct meltgimple_st), 0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
case MELTOBMAG_MAPGIMPLES:
{ /* cloning map value CTYPE_GIMPLE */
struct meltmapgimples_st *src = (struct meltmapgimples_st *) srcvalv;
unsigned oldlen = melt_primtab[src->lenix];
unsigned newlen = 4 * src->count / 3 + 5;
struct meltmapgimples_st *dst =
(struct meltmapgimples_st *)
meltgc_raw_new_mappointers ((meltobject_ptr_t) newdiscrv, newlen);
unsigned ix = 0;
dst->meltmap_aux = src->meltmap_aux;
if (src->entab)
for (ix = 0; ix < oldlen; ix++)
{
melt_ptr_t curva = src->entab[ix].e_va;
gimple curat = src->entab[ix].e_at;
if (curva != NULL && curat != (gimple) HTAB_DELETED_ENTRY)
meltgc_raw_put_mappointers ((void *) dst,
(const void *) curat, curva);
}
resv = (melt_ptr_t) dst;
};
break;
/*cloning gtyctype #5 CTYPE_GIMPLE_SEQ */
case MELTOBMAG_GIMPLESEQ:
{ /* cloning boxed value CTYPE_GIMPLE_SEQ */
struct meltgimpleseq_st *src = (struct meltgimpleseq_st *) srcvalv;
struct meltgimpleseq_st *dst =
(struct meltgimpleseq_st *)
meltgc_allocate (sizeof (struct meltgimpleseq_st), 0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
case MELTOBMAG_MAPGIMPLESEQS:
{ /* cloning map value CTYPE_GIMPLE_SEQ */
struct meltmapgimpleseqs_st *src =
(struct meltmapgimpleseqs_st *) srcvalv;
unsigned oldlen = melt_primtab[src->lenix];
unsigned newlen = 4 * src->count / 3 + 5;
struct meltmapgimpleseqs_st *dst =
(struct meltmapgimpleseqs_st *)
meltgc_raw_new_mappointers ((meltobject_ptr_t) newdiscrv, newlen);
unsigned ix = 0;
dst->meltmap_aux = src->meltmap_aux;
if (src->entab)
for (ix = 0; ix < oldlen; ix++)
{
melt_ptr_t curva = src->entab[ix].e_va;
gimple_seq curat = src->entab[ix].e_at;
if (curva != NULL && curat != (gimple_seq) HTAB_DELETED_ENTRY)
meltgc_raw_put_mappointers ((void *) dst,
(const void *) curat, curva);
}
resv = (melt_ptr_t) dst;
};
break;
/*cloning gtyctype #6 CTYPE_LOOP */
case MELTOBMAG_LOOP:
{ /* cloning boxed value CTYPE_LOOP */
struct meltloop_st *src = (struct meltloop_st *) srcvalv;
struct meltloop_st *dst =
(struct meltloop_st *) meltgc_allocate (sizeof (struct meltloop_st),
0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
case MELTOBMAG_MAPLOOPS:
{ /* cloning map value CTYPE_LOOP */
struct meltmaploops_st *src = (struct meltmaploops_st *) srcvalv;
unsigned oldlen = melt_primtab[src->lenix];
unsigned newlen = 4 * src->count / 3 + 5;
struct meltmaploops_st *dst =
(struct meltmaploops_st *)
meltgc_raw_new_mappointers ((meltobject_ptr_t) newdiscrv, newlen);
unsigned ix = 0;
dst->meltmap_aux = src->meltmap_aux;
if (src->entab)
for (ix = 0; ix < oldlen; ix++)
{
melt_ptr_t curva = src->entab[ix].e_va;
loop_p curat = src->entab[ix].e_at;
if (curva != NULL && curat != (loop_p) HTAB_DELETED_ENTRY)
meltgc_raw_put_mappointers ((void *) dst,
(const void *) curat, curva);
}
resv = (melt_ptr_t) dst;
};
break;
/*cloning gtyctype #7 CTYPE_RTVEC */
case MELTOBMAG_RTVEC:
{ /* cloning boxed value CTYPE_RTVEC */
struct meltrtvec_st *src = (struct meltrtvec_st *) srcvalv;
struct meltrtvec_st *dst =
(struct meltrtvec_st *)
meltgc_allocate (sizeof (struct meltrtvec_st), 0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
case MELTOBMAG_MAPRTVECS:
{ /* cloning map value CTYPE_RTVEC */
struct meltmaprtvecs_st *src = (struct meltmaprtvecs_st *) srcvalv;
unsigned oldlen = melt_primtab[src->lenix];
unsigned newlen = 4 * src->count / 3 + 5;
struct meltmaprtvecs_st *dst =
(struct meltmaprtvecs_st *)
meltgc_raw_new_mappointers ((meltobject_ptr_t) newdiscrv, newlen);
unsigned ix = 0;
dst->meltmap_aux = src->meltmap_aux;
if (src->entab)
for (ix = 0; ix < oldlen; ix++)
{
melt_ptr_t curva = src->entab[ix].e_va;
rtvec curat = src->entab[ix].e_at;
if (curva != NULL && curat != (rtvec) HTAB_DELETED_ENTRY)
meltgc_raw_put_mappointers ((void *) dst,
(const void *) curat, curva);
}
resv = (melt_ptr_t) dst;
};
break;
/*cloning gtyctype #8 CTYPE_RTX */
case MELTOBMAG_RTX:
{ /* cloning boxed value CTYPE_RTX */
struct meltrtx_st *src = (struct meltrtx_st *) srcvalv;
struct meltrtx_st *dst =
(struct meltrtx_st *) meltgc_allocate (sizeof (struct meltrtx_st),
0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
case MELTOBMAG_MAPRTXS:
{ /* cloning map value CTYPE_RTX */
struct meltmaprtxs_st *src = (struct meltmaprtxs_st *) srcvalv;
unsigned oldlen = melt_primtab[src->lenix];
unsigned newlen = 4 * src->count / 3 + 5;
struct meltmaprtxs_st *dst =
(struct meltmaprtxs_st *)
meltgc_raw_new_mappointers ((meltobject_ptr_t) newdiscrv, newlen);
unsigned ix = 0;
dst->meltmap_aux = src->meltmap_aux;
if (src->entab)
for (ix = 0; ix < oldlen; ix++)
{
melt_ptr_t curva = src->entab[ix].e_va;
rtx curat = src->entab[ix].e_at;
if (curva != NULL && curat != (rtx) HTAB_DELETED_ENTRY)
meltgc_raw_put_mappointers ((void *) dst,
(const void *) curat, curva);
}
resv = (melt_ptr_t) dst;
};
break;
/*cloning gtyctype #9 CTYPE_TREE */
case MELTOBMAG_TREE:
{ /* cloning boxed value CTYPE_TREE */
struct melttree_st *src = (struct melttree_st *) srcvalv;
struct melttree_st *dst =
(struct melttree_st *) meltgc_allocate (sizeof (struct melttree_st),
0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
case MELTOBMAG_MAPTREES:
{ /* cloning map value CTYPE_TREE */
struct meltmaptrees_st *src = (struct meltmaptrees_st *) srcvalv;
unsigned oldlen = melt_primtab[src->lenix];
unsigned newlen = 4 * src->count / 3 + 5;
struct meltmaptrees_st *dst =
(struct meltmaptrees_st *)
meltgc_raw_new_mappointers ((meltobject_ptr_t) newdiscrv, newlen);
unsigned ix = 0;
dst->meltmap_aux = src->meltmap_aux;
if (src->entab)
for (ix = 0; ix < oldlen; ix++)
{
melt_ptr_t curva = src->entab[ix].e_va;
tree curat = src->entab[ix].e_at;
if (curva != NULL && curat != (tree) HTAB_DELETED_ENTRY)
meltgc_raw_put_mappointers ((void *) dst,
(const void *) curat, curva);
}
resv = (melt_ptr_t) dst;
};
break;
/******* cloning the 20 value descriptors *******/
/** cloning value descriptor #1 VALDESC_BUCKETLONGS **/
/*explicit cloning for VALDESC_BUCKETLONGS */
case MELTOBMAG_BUCKETLONGS:
{
struct meltbucketlongs_st *src =
(struct meltbucketlongs_st *) srcvalv;
struct meltbucketlongs_st *dst = NULL;
/* clone chunk for VALDESC_BUCKETLONGS: */
/* cloning chunk from VALDESC_BUCKETLONGS in warmelt-base.melt */
unsigned lnix = src->buckl_lenix;
unsigned len = melt_primtab[lnix];
unsigned cnt = src->buckl_ucount;
unsigned dstlen = 0;
unsigned ix = 0;
gcc_assert (lnix > 0);
gcc_assert (len > 0);
gcc_assert (cnt <= len);
dst = (struct meltbucketlongs_st *)
meltgc_new_longsbucket ((meltobject_ptr_t) newdiscrv,
cnt + cnt / 8 + 2);
dstlen = melt_primtab[dst->buckl_lenix];
dst->buckl_aux = src->buckl_aux;
dst->buckl_xnum = src->buckl_xnum;
dst->buckl_lenix = src->buckl_lenix;
for (ix = 0; ix < cnt; ix++)
dst->buckl_entab[ix] = src->buckl_entab[ix];
for (ix = cnt; ix < dstlen; ix++)
{
dst->buckl_entab[ix].ebl_at = 0L;
dst->buckl_entab[ix].ebl_va = NULL;
}
/* end clone chunk VALDESC_BUCKETLONGS */
;
if (dst)
resv = (melt_ptr_t) dst;
};
break;
/** cloning value descriptor #2 VALDESC_CLOSURE **/
/*explicit cloning for VALDESC_CLOSURE */
case MELTOBMAG_CLOSURE:
{
struct meltclosure_st *src = (struct meltclosure_st *) srcvalv;
struct meltclosure_st *dst = NULL;
/* clone chunk for VALDESC_CLOSURE: */
/* cloning from VALDESC_CLOSURE */
unsigned nbval = (int) src->nbval;
unsigned ix = 0;
dst
=
(struct meltclosure_st *)
meltgc_allocate (sizeof (struct meltclosure_st),
nbval * sizeof (void *));
src = (struct meltclosure_st *) srcvalv;
dst->discr = (meltobject_ptr_t) newdiscrv;
dst->rout = src->rout;
for (ix = 0; ix < nbval; ix++)
dst->tabval[ix] = src->tabval[ix];
/* end cloning from VALDESC_CLOSURE */
;
if (dst)
resv = (melt_ptr_t) dst;
};
break;
/** cloning value descriptor #3 VALDESC_DECAY **/
/*default cloning for VALDESC_DECAY */
case MELTOBMAG_DECAY:
{
struct meltdecay_st *src = (struct meltdecay_st *) srcvalv;
struct meltdecay_st *dst =
(struct meltdecay_st *)
meltgc_allocate (sizeof (struct meltdecay_st), 0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
/** cloning value descriptor #4 VALDESC_INT **/
/*default cloning for VALDESC_INT */
case MELTOBMAG_INT:
{
struct meltint_st *src = (struct meltint_st *) srcvalv;
struct meltint_st *dst =
(struct meltint_st *) meltgc_allocate (sizeof (struct meltint_st),
0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
/** cloning value descriptor #5 VALDESC_LIST **/
/*explicit cloning for VALDESC_LIST */
case MELTOBMAG_LIST:
{
struct meltlist_st *src = (struct meltlist_st *) srcvalv;
struct meltlist_st *dst = NULL;
/* clone chunk for VALDESC_LIST: */
/* cloning from VALDESC_LIST */
struct meltpair_st *curpair = NULL;
resv = dst =
(struct meltlist_st *) meltgc_new_list ((meltobject_ptr_t)
newdiscrv);
src = (struct meltlist_st *) srcvalv;
for (curpair = ((struct meltlist_st *) src)->first;
melt_magic_discr ((melt_ptr_t) curpair) == MELTOBMAG_PAIR;
curpair = (struct meltpair_st *) (curpair->tl))
{
src = (struct meltlist_st *) srcvalv;
dst = (struct meltlist_st *) resv;
compv = curpair;
meltgc_append_list ((melt_ptr_t) resv, curpair->hd);
/* copy, because GC might have moved values. */
curpair = (struct meltpair_st *) compv;
src = (struct meltlist_st *) srcvalv;
dst = (struct meltlist_st *) resv;
}
/* end cloning from VALDESC_LIST */
;
if (dst)
resv = (melt_ptr_t) dst;
};
break;
/** cloning value descriptor #6 VALDESC_MAPOBJECTS **/
/*explicit cloning for VALDESC_MAPOBJECTS */
case MELTOBMAG_MAPOBJECTS:
{
struct meltmapobjects_st *src = (struct meltmapobjects_st *) srcvalv;
struct meltmapobjects_st *dst = NULL;
/* clone chunk for VALDESC_MAPOBJECTS: */
/* cloning, from VALDESC_MAPOBJECTS */
unsigned srccount = src->count;
unsigned srclen = melt_primtab[src->lenix];
unsigned newlen = 4 * srccount / 3 + 4;
unsigned srcix = 0;
dst = (struct meltmapobjects_st *)
meltgc_new_mapobjects ((meltobject_ptr_t) newdiscrv, newlen);
resv = dst;
dst->meltmap_aux = src->meltmap_aux;
for (srcix = 0; srcix < srclen; srcix++)
{
meltobject_ptr_t curat = NULL;
melt_ptr_t curva = NULL;
src = (struct meltmapobjects_st *) srcvalv;
curat = src->entab[srcix].e_at;
curva = src->entab[srcix].e_va;
if (!curat || curat == (meltobject_ptr_t) HTAB_DELETED_ENTRY
|| !curva)
continue;
meltgc_put_mapobjects ((meltmapobjects_ptr_t) resv, curat, curva);
/* update the dst, since it could have moved */
dst = (struct meltmapobjects_st *) resv;
} /* end cloning, from VALDESC_MAPOBJECTS */
;
if (dst)
resv = (melt_ptr_t) dst;
};
break;
/** cloning value descriptor #7 VALDESC_MAPSTRINGS **/
/*explicit cloning for VALDESC_MAPSTRINGS */
case MELTOBMAG_MAPSTRINGS:
{
struct meltmapstrings_st *src = (struct meltmapstrings_st *) srcvalv;
struct meltmapstrings_st *dst = NULL;
/* clone chunk for VALDESC_MAPSTRINGS: */
/* cloning from VALDESC_MAPSTRINGS */
unsigned srccount = src->count;
unsigned srclen = melt_primtab[src->lenix];
unsigned newlen = 4 * srccount / 3 + 4;
unsigned srcix = 0;
dst =
(struct meltmapstrings_st *)
meltgc_new_mapstrings ((meltobject_ptr_t) newdiscrv, newlen);
resv = dst;
dst->meltmap_aux = src->meltmap_aux;
for (srcix = 0; srcix < srclen; srcix++)
{
const char *curat = NULL;
melt_ptr_t curva = NULL;
src = (struct meltmapstrings_st *) srcvalv;
dst = (struct meltmapstrings_st *) resv;
curat = src->entab[srcix].e_at;
if (!curat || curat == (const char *) HTAB_DELETED_ENTRY
|| !curat[0])
continue;
curva = src->entab[srcix].e_va;
if (!curva)
continue;
meltgc_put_mapstrings (dst, curat, curva);
dst = (struct meltmapstrings_st *) resv;
}
/* end cloning from VALDESC_MAPSTRINGS */
;
if (dst)
resv = (melt_ptr_t) dst;
};
break;
/** cloning value descriptor #8 VALDESC_MIXBIGINT **/
/*no cloning for VALDESC_MIXBIGINT */
case MELTOBMAG_MIXBIGINT:
break;
/** cloning value descriptor #9 VALDESC_MIXINT **/
/*default cloning for VALDESC_MIXINT */
case MELTOBMAG_MIXINT:
{
struct meltmixint_st *src = (struct meltmixint_st *) srcvalv;
struct meltmixint_st *dst =
(struct meltmixint_st *)
meltgc_allocate (sizeof (struct meltmixint_st), 0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
/** cloning value descriptor #10 VALDESC_MIXLOC **/
/*default cloning for VALDESC_MIXLOC */
case MELTOBMAG_MIXLOC:
{
struct meltmixloc_st *src = (struct meltmixloc_st *) srcvalv;
struct meltmixloc_st *dst =
(struct meltmixloc_st *)
meltgc_allocate (sizeof (struct meltmixloc_st), 0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
/** cloning value descriptor #11 VALDESC_MULTIPLE **/
/*explicit cloning for VALDESC_MULTIPLE */
case MELTOBMAG_MULTIPLE:
{
struct meltmultiple_st *src = (struct meltmultiple_st *) srcvalv;
struct meltmultiple_st *dst = NULL;
/* clone chunk for VALDESC_MULTIPLE: */
/* cloning from VALDESC_MULTIPLE */
unsigned srclen = src->nbval;
unsigned srcix = 0;
resv = dst =
(struct meltmultiple_st *) meltgc_new_multiple ((meltobject_ptr_t)
newdiscrv, srclen);
src = (struct meltmultiple_st *) srcvalv; /* could have moved */
for (srcix = 0; srcix < srclen; srcix++)
dst->tabval[srcix] = src->tabval[srcix];
/* end cloning from VALDESC_MULTIPLE */
;
if (dst)
resv = (melt_ptr_t) dst;
};
break;
/** cloning value descriptor #12 VALDESC_OBJECT **/
/*explicit cloning for VALDESC_OBJECT */
case MELTOBMAG_OBJECT:
{
struct meltobject_st *src = (struct meltobject_st *) srcvalv;
struct meltobject_st *dst = NULL;
/* clone chunk for VALDESC_OBJECT: */
/* cloning, from VALDESC_OBJECT */
unsigned newlen = 0;
unsigned srclen = src->obj_len;
unsigned slotix = 0;
if (melt_is_subclass_of ((meltobject_ptr_t) srcdiscrv,
(meltobject_ptr_t) newdiscrv))
{
newlen =
melt_multiple_length ((melt_ptr_t)
(((meltobject_ptr_t) newdiscrv)->
obj_vartab[MELTFIELD_CLASS_FIELDS]));
gcc_assert (newlen <= srclen);
dst =
meltgc_new_raw_object ((meltobject_ptr_t) newdiscrv, newlen);
for (slotix = 0; slotix < newlen; slotix++)
dst->obj_vartab[slotix] = src->obj_vartab[slotix];
dst->obj_num = src->obj_num;
}
else if (melt_is_subclass_of ((meltobject_ptr_t) newdiscrv,
(meltobject_ptr_t) srcdiscrv))
{
newlen =
melt_multiple_length ((melt_ptr_t)
(((meltobject_ptr_t) newdiscrv)->
obj_vartab[MELTFIELD_CLASS_FIELDS]));
gcc_assert (newlen >= srclen);
dst =
meltgc_new_raw_object ((meltobject_ptr_t) newdiscrv, newlen);
for (slotix = 0; slotix < srclen; slotix++)
dst->obj_vartab[slotix] = src->obj_vartab[slotix];
dst->obj_num = src->obj_num;
}
;
if (dst)
resv = (melt_ptr_t) dst;
};
break;
/** cloning value descriptor #13 VALDESC_PAIR **/
/*default cloning for VALDESC_PAIR */
case MELTOBMAG_PAIR:
{
struct meltpair_st *src = (struct meltpair_st *) srcvalv;
struct meltpair_st *dst =
(struct meltpair_st *) meltgc_allocate (sizeof (struct meltpair_st),
0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
/** cloning value descriptor #14 VALDESC_REAL **/
/*default cloning for VALDESC_REAL */
case MELTOBMAG_REAL:
{
struct meltreal_st *src = (struct meltreal_st *) srcvalv;
struct meltreal_st *dst =
(struct meltreal_st *) meltgc_allocate (sizeof (struct meltreal_st),
0);
*dst = *src;
dst->discr = (meltobject_ptr_t) newdiscrv;
resv = (melt_ptr_t) dst;
}
break;
/** cloning value descriptor #15 VALDESC_ROUTINE **/
/*no cloning for VALDESC_ROUTINE */
case MELTOBMAG_ROUTINE:
break;
/** cloning value descriptor #16 VALDESC_SPECIAL_FILE **/
/*no cloning for VALDESC_SPECIAL_FILE */
case MELTOBMAG_SPEC_FILE:
break;
/** cloning value descriptor #17 VALDESC_SPECIAL_MPFR **/
/*no cloning for VALDESC_SPECIAL_MPFR */
case MELTOBMAG_SPEC_MPFR:
break;
/** cloning value descriptor #18 VALDESC_SPECIAL_RAW_FILE **/
/*no cloning for VALDESC_SPECIAL_RAW_FILE */
case MELTOBMAG_SPEC_RAWFILE:
break;
/** cloning value descriptor #19 VALDESC_STRBUF **/
/*explicit cloning for VALDESC_STRBUF */
case MELTOBMAG_STRBUF:
{
struct meltstrbuf_st *src = (struct meltstrbuf_st *) srcvalv;
struct meltstrbuf_st *dst = NULL;
/* clone chunk for VALDESC_STRBUF: */
/* clone chunk from VALDESC_STRBUF */
resv = dst = (struct meltstrbuf_st *)
meltgc_new_strbuf ((meltobject_ptr_t) newdiscrv, NULL);
src = (struct meltstrbuf_st *) srcvalv;
meltgc_add_strbuf ((melt_ptr_t) dst,
melt_strbuf_str ((melt_ptr_t) src));
/* end clone chunk from VALDESC_STRBUF */
;
if (dst)
resv = (melt_ptr_t) dst;
};
break;
/** cloning value descriptor #20 VALDESC_STRING **/
/*explicit cloning for VALDESC_STRING */
case MELTOBMAG_STRING:
{
struct meltstring_st *src = (struct meltstring_st *) srcvalv;
struct meltstring_st *dst = NULL;
/* clone chunk for VALDESC_STRING: */
/* clone from VALDESC_STRING */
dst = (struct meltstring_st *)
meltgc_new_stringdup ((meltobject_ptr_t) newdiscrv, src->val);
/* end clone from VALDESC_STRING */
;
if (dst)
resv = (melt_ptr_t) dst;
};
break;
/* generated cloning routine trailer */
default:;
} /*end switch srcmagic for cloning */
end:
MELT_EXITFRAME ();
return (melt_ptr_t) resv;
} /* end of generated meltgc_clone_with_discriminant */
#undef resv
#undef srcvalv
#undef newdiscrv
#undef discrv
#undef compv
/*** End of code file meltbuild-sources/generated/meltrunsup-inc.c generated on 2012 Sep 03
* by GCC MELT 4.8.0 20120903 (experimental) [melt-branch revision 190869] MELT_0.9.7-pre . ***/
|