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
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
|
2004-11-27 Per Bothner <per@bothner.com>
* expr.c (build_expr_wfl): Only declare last_file and last_filenode
local static variables if not USE_MAPPED_LOCATION.
2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
* class.c, decl.c, expr.c: Fix comment typos.
2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
PR java/18305
* decl.c (end_java_method): Call
attach_init_test_initialization_flags on all the init_decls.
* parse.y (attach_init_test_initialization_flags): Move to ...
* expr.c (attach_init_test_initialization_flags): here and
support BIND_EXPR also.
* java-tree.h (attach_init_test_initialization_flags): Prototype.
* jcf-parse.c (parse_class_file): Don't disable class init
optimization.
2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
* gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
in diagnostics.
2004-11-24 Richard Henderson <rth@redhat.com>
* verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
2004-11-24 Tom Tromey <tromey@redhat.com>
* verify.c (defer_merging): Don't use C++-style comment.
* verify.h (java_opcode): Added java_opcode_end.
* class.c (build_class_ref): Remove C++ comment and old FIXME.
* verify-impl.c (vfy_push_type): Removed bogus "return".
(initialize_stack): Use vfy_alloc and vfy_free.
(verify_instructions_0): Likewise.
* Merged gcj-abi-2-dev-branch to trunk.
2004-11-24 Andrew Haley <aph@redhat.com>
* jcf-parse.c (parse_class_file): Set file_start_location.
2004-11-10 Tom Tromey <tromey@redhat.com>
* class.c (make_field_value): Don't call build_static_field_ref.
(build_static_field_ref): Don't emit direct references when using
indirect dispatch.
* gcj.texi (Invoking gij): Document -verbose. Put -verbose and
-verbose:class into man page synopsis.
2004-11-09 Tom Tromey <tromey@redhat.com>
* expr.c (build_java_arraystore_check): Still generate check if
element type is itself an array.
2004-11-08 Tom Tromey <tromey@redhat.com>
* java-tree.h (soft_check_assignment_node): Removed.
(enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
* decl.c (java_init_decl_processing): Don't initialize
soft_check_assignment_node.
2004-11-05 Tom Tromey <tromey@redhat.com>
* class.c (layout_class_methods): Don't add Miranda methods when
using indirect dispatch.
2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
* class.c (make_class_data): Call emit_assertion_table to set the
'assertion_table' field.
(build_signature_for_libgcj): Move here from expr.c.
(add_assertion_table_entry): New function. Callback for assertion
hashtable traversal.
(emit_assertion_table): New. Take class argument, and generate
assertion table DECL based on the TYPE_ASSERTIONS hashtable.
* decl.c (init_decl_processing): Define assertion_entry_type record.
Push 'assertion_table' class field instead of 'verify'.
* expr.c (type_assertion_eq): Compare 'assertion_code' field.
(type_assertion_hash): Include 'assertion_code' in hash.
(add_type_assertion): Rewritten. Take class and assertion_code
arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
(can_widen_reference_to): Use new add_type_assertion() arguments.
* java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
(verify_identifier_node): Removed.
(assertion_entry_type, assertion_table_type): New.
(ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
assertion code definitions.
(struct type_assertion): Add assertion_code. Rename 'source_type' and
'target_type' to 'op1' and 'op2'.
(add_type_assertion): Declare.
(lang_printable_name_wls): Remove unused definition.
* verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
to emit runtime assertion.
(vfy_note_stack_type): Clean up non-C90 declarations.
(vfy_note_local_type): Likewise.
* verify.h (vfy_is_assignable_from): Declare.
* verify-impl.c (is_assignable_from_slow): Remove unused function.
(ref_compatible): Rename arguments. Call vfy_is_assignable_from()
instead of is_assignable_from_slow().
(types_compatible): Reinstate ref_compatible() call.
2004-11-04 Tom Tromey <tromey@redhat.com>
* class.c (build_static_field_ref): Reverted previous patch.
* class.c (build_static_field_ref): Don't emit direct references
when using indirect dispatch.
2004-11-03 Tom Tromey <tromey@redhat.com>
* expr.c (expand_java_arrayload): Set lhs_type_node.
(expand_java_arraystore): Set rhs_type_node.
2004-11-02 Tom Tromey <tromey@redhat.com>
* jcf-parse.c (compute_class_name): Use filename length from zip
directory, not strlen.
* expr.c (expand_invoke): Mark new interface methods as abstract.
2004-11-01 Tom Tromey <tromey@redhat.com>
* verify-impl.c (push_jump): Removed check for uninitialized
objects.
(push_exception_jump): Likewise.
(handle_ret_insn): Likewise.
(handle_jsr_insn): Likewise.
(state_check_no_uninitialized_objects): Removed.
* decl.c (check_local_unnamed_variable): Recognize
promoted-to-int parameters when using the new verifier.
* expr.c (expand_java_arraystore): Explicitly request array type
when using new verifier.
(expand_java_arrayload): Likewise.
(invoke_build_dtable): Don't pass object_type_node as
expression argument to build_java_indirect_ref.
(build_java_check_indexed_type): Do nothing.
(build_java_arraystore_check): Handle case where array doesn't
have array type.
(build_java_array_length_access): Likewise.
(expand_invoke): Handle case where interface overrides a method
from Object.
(pop_type_0): Always succeed for reference types.
(process_jvm_instruction): Don't pop a value in a dead
exception handler.
(pop_arguments): Convert arguments to correct types.
2004-10-29 Andrew Haley <aph@redhat.com>
* jcf-parse.c (give_name_to_class): Remove line that was
incorrectly merged.
2004-10-29 Andrew Haley <aph@redhat.com>
* jcf-parse.c (set_source_filename): Add code to build new sfname.
2004-10-20 Andrew Haley <aph@redhat.com>
* decl.c (end_java_method): Don't expand if flag_syntax_only.
2004-10-26 Tom Tromey <tromey@redhat.com>
* verify.h (vfy_notify_verified): Removed.
* verify-glue.c (vfy_notify_verified): Removed.
2004-10-26 Tom Tromey <tromey@redhat.com>
* verify-impl.c (debug_print_state): Declare `i' before code.
(merge_types): Modify `t' when it is null_type.
2004-10-26 Tom Tromey <tromey@redhat.com>
* verify-impl.c (type_print): Renamed from print. Now static and
takes an argument.
(debug_print_state): Use type_print.
2004-10-25 Tom Tromey <tromey@redhat.com>
* expr.c (build_invokeinterface): Compute correct offset for
index into interface methods.
2004-10-20 Tom Tromey <tromey@redhat.com>
* java-tree.h (verify_jvm_instructions_new): Declare.
* jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
command line.
* verify-impl.c (verify_instructions): Correctly handle wide
types on the stack.
* verify-glue.c (vfy_get_class_name): Use DECL_NAME.
(vfy_get_component_type): Strip pointer types.
(vfy_find_class): Use get_type_from_signature. Strip pointer
types.
Include java-except.h.
2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
* verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
vfy_push_type_t, set_variable, add_new_state, merge_into,
handle_jsr_insn, branch_prepass, check_class_constant,
check_wide_constant, get_one_type, compute_static_types,
verify_instructions_0): Clean up C99 declarations after statements.
2004-10-20 Tom Tromey <tromey@redhat.com>
* verify-impl.c (merge_refs): Compare reference against iterator,
not ref2.
* verify-glue.c (vfy_tag): Mask off resolved flag.
2004-10-19 Tom Tromey <tromey@redhat.com>
* verify-impl.c (verify_instructions): Call vfy_note_local_type.
(init_state_with_stack): Initialize `this_type' in state.
(verify_method): Use debug_print.
* verify-glue.c (vfy_is_primitive): Removed debugging print.
(vfy_note_stack_depth): Reverted last patch.
(vfy_note_stack_type): Note pointer to Object, not Object.
(vfy_note_local_type): Likewise.
* verify.h (vfy_note_instruction_seen): Declare.
* verify-glue.c (verify_jvm_instructions_new): Set
BCODE_EXCEPTION_TARGET on target instruction.
(vfy_note_instruction_seen): New function.
* verify-impl.c (FLAG_INSN_SEEN): New define.
(verify_instructions_0): Set flag on instruction. Save state for
PC=0 later.
(verify_instructions): Call vfy_note_instruction_seen.
* verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
(verify_jvm_instructions_new): Call method_init_exceptions,
add_handler, and handle_nested_ranges.
* verify-impl.c (verify_method): Return 1 on success.
(verify_instructions_0): Save the state at PC=0.
* verify-impl.c (init_type_from_class): Set is_resolved and
ref_next on new ref_intersection.
(init_type_from_string): Likewise.
2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
* expr.c (expand_bytecode): Use verify_jvm_instructions_new
if flag_new_verifier is set.
* java-tree.h (flag_new_verifier): Declare.
* lang.opt (fnew-verifier): New option.
* verify-impl.c: Work around namespace pollution by undef'ing
'current_class'.
(struct verifier_context): Make 'bytecode' const.
(verify_fail_pc): Pass -1 PC argument to vfy_fail.
(types_compatible): For the BC-ABI, always consider reference types
compatible.
(check_class_constant): Use vfr->current_class.
(check_constant): Likewise.
(check_wide_constant): Likewise.
(check_field_constant): Check for 'L' at start of type name.
(get_one_type): Return pointer instead of type. Set type result in
caller via passed type pointer.
(compute_argument_types): Update to use new get_one_type arguments.
(compute_return_type): Likewise.
(make_verifier_context): New. Allocate and initialize 'vfr'.
(free_verifier_context): New. Free 'vfr' and its contents.
(verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
and free_verifier_context.
2004-10-15 Tom Tromey <tromey@redhat.com>
* verify-glue.c (vfy_note_local_type): Mark argument as unused.
* verify.h (vfy_fail): Fixed formatting.
* verify-impl.c (vfr): Fixed comment formatting.
(collapse_type): New function.
(verify_instructions): Notify compiler about type map.
* verify.h (vfy_note_stack_depth): Updated.
(vfy_note_stack_type): Likewise.
(vfy_note_local_type): Likewise.
(vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
Declare.
* verify-glue.c (vfy_note_stack_depth): Correctly size type
state. Added `method' argument.
(vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
argument.
(vfy_note_local_type): New function.
(vfy_unsuitable_type): Likewise.
(vfy_return_address_type): Likewise.
(vfy_null_type): Likewise.
* verify.h (VFY_IN_GCC): Removed.
(VFY_WANT_TYPEMAP): Removed.
* verify-impl.c (verify_instructions_0): Removed useless "\".
(struct state) <next>: Uncomment.
2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
* verify-impl.c: Formatting fixes. Reformat C++-style comments to
C-style.
2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
* Make-lang.in (verify.o): Re-enabled this target.
* verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
(vfy_get_interface): Likewise.
(verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
* verify.h (verify_jvm_instructions_new): Declare.
* verify-impl.c (free_state): Temporarily comment out unused
function.
2004-10-06 Tom Tromey <tromey@redhat.com>
* java-tree.h (JV_STATE_READ): New enum value.
2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
* verify.h: New file.
2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
* verify-impl.c, verify-glue.c, verify.h: New files.
* Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
2004-09-24 Andrew Haley <aph@redhat.com>
* decl.c (check_local_unnamed_variable): Always use the PARM_DECL
for a slot if it's of pointer type.
2004-09-14 Tom Tromey <tromey@redhat.com>
* class.c (make_class_data): Correctly initialize "state" field.
Initialize "engine" field.
* decl.c (java_init_decl_processing): Add "engine" field.
2004-09-10 Andrew Haley <aph@redhat.com>
PR java/12760
* expr.c (build_invokeinterface): Use fast method for interface
dispatch.
* java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
JTI_ITABLE_PTR_TYPE.
(struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
(emit_symbol_table): Add new arg, element_size.
* decl.c (java_init_decl_processing): Initialize Class.itable.
* class.c (GEN_TABLE): New macro.
(gen_indirect_dispatch_tables): Use it. Add itable.
(make_class_data): Add new arg for emit_symbol_table().
Emit itable.
(add_miranda_methods): Make sure search_class has been parsed.
(emit_symbol_table): Add new arg, element_size.
2004-09-06 Andrew Haley <aph@redhat.com>
* verify.c (merge_types): Return Object for all merges of
interfaces.
* expr.c (add_type_assertion): Don't generate assertions when
source type is array of Object.
2004-09-03 Andrew Haley <aph@redhat.com>
* class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
* lang.c (java_post_options): Force flag_verify_invocations if
we're not using indirect dispatch.
* expr.c (pop_type_0): Move test for interfaces before call to
can_widen_reference_to().
(build_signature_for_libgcj): Remove generation of canonical array
type.
(add_type_assertion): Canonicalize both arrays.
Don't assert that type X can be assigned to Object.
Don't assert that type X an be assigned to type X.
Don't assert that Object can be assigned to type X.
(can_widen_reference_to): Warn whenever we generate an assertion.
(process_jvm_instruction): Use throwable_type_node for the type of
an exception class.
2004-09-01 Andrew Haley <aph@redhat.com>
* decl.c (java_init_decl_processing): Change
verify_identifier_node to "__verify".
* expr.c (add_type_assertion): Use verify_identifier_node for name.
* java-tree.h (verify_identifier_node): Change to "__verify".
* expr.c (build_signature_for_libgcj): New function.
(add_type_assertion): Use it to construct signatures for
source_type and target_type.
2004-08-27 Andrew Haley <aph@redhat.com>
* java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
(verify_identifier_node): New.
(TYPE_VERIFY_METHOD): New.
(struct type_assertion): New type.
* expr.c (type_assertion_eq): New function.
(type_assertion_hash): New function.
(add_type_assertion): New function.
(can_widen_reference_to): Call add_type_assertion().
* decl.c (java_init_decl_processing): Add verify_identifier_node.
* class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
(finish_class): Output TYPE_VERIFY_METHOD (type).
* decl.c (end_java_method): Nullify unused fields.
2004-08-17 Andrew Haley <aph@redhat.com>
* verify.c (defer_merging): Quieten.
* jcf-parse.c (load_class): Only try to open a class file if it's
java.lang.Object or if it's part of the current compilation.
Check that the class we just tried to load is the class we just
loaded. Quieten.
(java_parse_file): Set flag_verify_invocations off if we're
compiling from .class.
(parse_zip_file_entries): Abort if we try to read a dummy class.
* expr.c (can_widen_reference_to): Quieten.
(build_invokevirtual): Abort if we try to invokevirtual an
interface.
(expand_invoke): Don't build a non-interface call to an interface.
(build_instanceof): Don't do premature optimization if
flag_verify_invocations is not set.
* class.c (set_super_info): Disable code that inherits TYPE_DUMMY
from superclass.
(build_static_field_ref): Add correct type conversion for
field_address.
(add_miranda_methods): Disable generation of Miranda methods for
dummy classes.
(layout_class_method): Don't complain about non-static method
overrides static method with dummy classes.
2004-08-13 Tom Tromey <tromey@redhat.com>
* class.c (build_static_field_ref): Re-enable atable lookups for
static fields.
* parse.y (strip_out_static_field_access_decl): Indentation fix.
2004-08-11 Tom Tromey <tromey@redhat.com>
* gcj.texi (libgcj Runtime Properties): Document new properties.
2004-08-06 Andrew Haley <aph@redhat.com>
* jcf-parse.c (load_class): Check that we really have loaded the
class we're looking for.
2004-07-19 Andrew Haley <aph@redhat.com>
* verify.c (verify_jvm_instructions): Comment change only.
* typeck.c (build_java_array_type): Add size field to array name.
* java-tree.h (LOCAL_SLOT_P): New.
(update_aliases): Add PC argument.
(pushdecl_function_level): New function.
* java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
MODIFY_EXPR, and SAVE_EXPR.
(java_gimplify_modify_expr): New function.
* expr.c (push_type_0): Call find_stack_slot() to create temporary.
(expand_iinc): Pass PC to update_aliases().
(STORE_INTERNAL): Likewise.
(process_jvm_instruction): Likewise.
* decl.c (base_decl_map): New variable.
(uniq): New variable.
(update_aliases): Rewrite with more thorough checking.
(debug_variable_p): New function.
(push_jvm_slot): Don't initialize local variable. Don't pushdecl.
(check_local_named_variable): Delete whole function.
(initialize_local_variable): New function.
(check_local_unnamed_variable): Add checks and comments.
(find_local_variable): Rewrite.
(java_replace_reference): New function.
(function_binding_level): New variable.
(pushdecl_function_level): New function.
(maybe_pushlevels): Set DECL_LOCAL_END_PC.
(maybe_pushlevels): Call pushdecl() on each of the new decls.
(start_java_method): Reset uniq. Create base_decl_map. Set
function_binding_level.
(end_java_method): Null unused fields to save memory.
2004-06-29 Andrew Haley <aph@redhat.com>
* except.c (expand_start_java_handler): Push a new binding level.
Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
register_exception_range() to register where we'll do it.
(expand_end_java_handler): Remove old bogus code. Replace with
new logic that simply builds TRY_CATCH_EXPRs and inserts them at
the top of the expression we're curently building.
(maybe_end_try): Delete.
* decl.c (binding_level.exception_range): New field.
(clear_binding_level): Add field exception_range. Reformat.
(poplevel): Call expand_end_java_handler().
(poplevel): Call java_add_stmt only if functionbody is false.
(maybe_poplevels): Don't call maybe_end_try() from here.
(end_java_method): Clear no longer used trees in function decl.
(register_exception_range): New function.
* java-tree.h (register_exception_range, struct eh_range): Declare.
2004-06-22 Andrew Haley <aph@redhat.com>
* class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
the otable.
* check-init.c (get_variable_decl): Teach check-init about
FIELD_DECLs addressed via the otable.
* jcf-parse.c (load_class): Check CLASS_LOADED_P, not
CLASS_PARSED_P.
2004-05-28 Andrew Haley <aph@redhat.com>
* jcf-parse.c (load_class): Don't try to read a class that we've
already read.
* expr.c (build_invokeinterface): Use the old-fashioned way of
doing indirect dispatch: look up interfaces by name.
* java-tree.h (enum java_tree_index): Add
JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
* decl.c (java_init_decl_processing): Add
soft_lookupinterfacemethodbyname_node.
* gjavah.c (print_method_info): Final methods have vtable entries,
so gjavah needs to output them.
* class.c (layout_class_method): Generate vtable entries for final
methods.
* parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
dispatch, even if a method is final.
2004-05-25 Andrew Haley <aph@redhat.com>
* class.c (build_symbol_entry): Convert the names of constructors
to init_identifier_node when generating an entry for the indirect
dispatch table.
* expr.c (build_known_method_ref): Generate indirect calls for
all methods marked DECL_EXTERNAL or TREE_PUBLIC.
2004-05-24 Andrew Haley <aph@redhat.com>
* expr.c (build_known_method_ref): Make sure ARRAY_REF access to
atable element is of the right type.
* class.c (build_static_field_ref): Cast pointer to correct type
for field.
2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
* Merged with HEAD as of 20040514. Diff against
gcj-abi-2-merge-20040514.
2004-04-16 Andrew Haley <aph@redhat.com>
* verify.c (check_pending_block): Disable subroutine checks.
(defer_merging): New function.
(merge_types): If types are dummy, use defer_merging to combine them.
(verify_jvm_instructions): If invocation is invokeinterface and
target is dummy, assume target really is an interface.
* parse.y (patch_invoke): Break out call to java_create_object.
* lang.c (flag_verify_invocations): New.
* jcf-parse.c (load_class): If we've already failed to load a
class, don't try again.
(load_class): If we can't find a .class file, don't fail, but emit
a warning.
(parse_class_file): Don't act on dummy methods.
* java-tree.h (flag_verify_invocations): New.
(TYPE_DUMMY): New.
(lang_type.dummy_class): New field.
(java_create_object): New function.
(METHOD_DUMMY): New.
* expr.c (build_field_ref): Widen field offset.
(pop_type_0): If the type in stack_type_map is a TREE_LIST, check
that each of its elements is compatible with the one we're
popping.
(pop_type_0): Issue a warning to say that we need to generate a
runtime check.
(java_create_object): New function.
(build_field_ref): Only generate hard refs if we're not using
indirect dispatch.
(expand_java_field_op): If we're using !verify_invocations and we
see a missing field, generate a decl for it.
(expand_invoke): If a class doesn't have the method we seek and
we're using !flag_verify_invocations, generate a decl for the
method now.
(build_known_method_ref): Always use indirect dispatch via the
atable for static methods.
(expand_java_NEW): Break out object creation into new function,
java_create_object.
(can_widen_reference_to): Issue a warning to say that we need to
generate a runtime check.
* class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
(make_method_value): Also use index for interfaces.
(make_class_data): Skip dummy field for inherited data.
Don't build method array for dummy methods.
Set size_in_byte to -1 when using inirect dispatch
Don't build a hard class ref if we don't have a hard ref to our
superclass, or if we're using inirect dispatch.
Null out dispatch tables.
(layout_class_method): Don't complain about non-static method
overrides static method is method is artificial.
(build_static_field_ref): Disable atable references to static
fields for the time being.
(layout_class_methods): Check for CLASS_INTERFACE as
well as CLASS_ABSTRACT.
2004-11-24 Steven Bosscher <stevenb@suse.de>
* class.c (make_class_data): Don't check flag_inline_functions.
* lang.c (flag_really_inline): Remove unused flag.
(java_handle_option): Don't set it here. Remove special handling
of flag_inline_functions for Java.
(java_init): Don't set flag_inline_trees here. Already done...
(java_post_options): ...here. Don't clear flag_inline_functions.
2004-11-24 Steven Bosscher <stevenb@suse.de>
* java-gimplify.c (java_gimplify_labeled_block_expr): New function.
(java_gimplify_exit_block_expr): New function.
(java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
LABELED_BLOCK_EXPR.
* java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
(EXIT_BLOCK_EXPR): Likewise.
* java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
(LABELED_BLOCK_BODY): Likewise.
(EXIT_BLOCK_LABELED_BLOCK): Likewise.
* jcf-write.c (generate_bytecode_insns): Don't handle the unused
EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
TREE_OPERAND.
* lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
(java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
second operand of EXIT_BLOCK_EXPR.
* parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
TREE_OPERAND.
(build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
2004-11-23 Ben Elliston <bje@au.ibm.com>
* xref.h (xref_flag_value): Remove.
(xref_set_data, xref_get_data): Likewise.
(xref_set_current_fp): Likewise.
(XREF_NONE): Likewise.
(XREF_GET_DATA): Likewise.
* xref.c (xref_flag_value): Remove.
(xref_set_data, xref_get_data): Likewise.
(xref_set_current_fp): Likewise.
2004-11-23 Ben Elliston <bje@au.ibm.com>
* gjavah.c (output_directory): Make static.
(temp_directory): Likewise.
2004-11-15 Tom Tromey <tromey@redhat.com>
* decl.c (instn_ptr_type_node): Removed.
(lineNumbers_ptr_type_node): Removed.
(jint_type): Removed.
(jint_ptr_type): Removed.
2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
PR java/15576
* check-init.c (check_init): Ignore DECL_EXPR.
* expr.c (always_initialize_class_p): Reenable.
(build_class_init): Use a variable to store the decl. Also use
boolean_false_node instead of integer_zero_node.
* parse.y (attach_init_test_initialization_flags): Add a decl_expr
to the block.
2004-11-08 Tom Tromey <tromey@redhat.com>
PR java/16843:
* gjavah.c (HANDLE_END_FIELD): Call print_field_info when
generating a JNI header.
(print_field_info): Handle JNI headers.
(jni_print_float): Likewise.
(jni_print_double): Likewise.
2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
* decl.c (end_java_method): Remove duplicated code.
2004-11-06 Zack Weinberg <zack@codesourcery.com>
Gerald Pfeifer <gerald@pfeifer.com>
* lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
as well.
2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
PR java/17265
* class.c: Reinstate 2004-08-18 patch.
(make_local_function_alias): Don't create an alias for extern (native)
functions.
2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
PR java/17265
* class.c (make_local_function_alias): Revert 2004-08-18 change.
(make_method_value): Likewise.
2004-10-21 Andrew Haley <aph@redhat.com>
PR java/18091:
* jcf-parse.c (set_source_filename): Add code to build new sfname.
2004-10-20 Andrew Haley <aph@redhat.com>
* decl.c (end_java_method): Don't expand if flag_syntax_only.
Remove duplicated code block.
2004-10-18 Steven Bosscher <stevenb@suse.de>
* Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
New rules to work around old Bison warnings.
2004-10-17 Steven Bosscher <stevenb@suse.de>
* class.c (ident_subst): Always alloca buffer.
* java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
opcode after including javaop.def.
* jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
conditional expression that exits, to avoid warnings.
* verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
a user of an extension.
* win32-host.c: Move check down to have non-empty file when
WIN32 is not defined.
* Make-lang.in (java-warn): Add STRICT_WARN.
(java/jcf-io.o-warn): Don't have Werror for this file.
* jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
* expr.c (expr_add_location): Move declaration to before all
statements.
* parse.y (java_expand_classes): Ditto.
* lex.c (java_peek_unicode): Ditto.
2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
* check-init.c: Use %<, %> and %q for quoting in diagnostics,
if possible, else convert `foo' to 'foo'.
* class.c: Likewise.
* decl.c: Likewise.
* expr.c: Likewise.
* jcf-io.c: Likewise.
* jcf-parse.c: Likewise.
* lang.c: Likewise.
* lex.c: Likewise.
* parse.h: Likewise.
2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
* parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
rename parameter 'msg' to 'msgid' in function declaration.
(issue_warning_error_from_context): Likewise.
(yyerror): Rename parameter 'msg' to 'msgid'.
(all over): Use new quoting style for diagnostics.
2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
* boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
Update copyright.
2004-10-14 Matt Austern <austern@apple.com>
* lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
pointer_set_t* now.
2004-10-13 Tom Tromey <tromey@redhat.com>
PR java/15578:
* lang.opt (--extdirs): Document.
* jvspec.c (lang_specific_driver): Recognize -encoding and
-extdirs.
2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
* parse.y (issue_warning_error_from_context): Use va_list *
instead of va_list parameter.
(parse_error_context): Update call.
(parse_warning_context): Likewise.
2004-10-05 Zack Weinberg <zack@codesourcery.com>
* parse.y, parse-scan.y: Add list of diagnostic messages to
insulate translation template from version of yacc/bison used
to compile the grammar.
2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
Prepare for %q, %< and %> in diagnostic message strings.
* java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
Name second parameter 'msgid'.
* parse.y: Additionally include pretty-print.h and diagnostic.h.
(issue_warning_error_from_context): Use pretty-printer functions
instead of vsprintf for constructing formatted messages. Rename
parameter 'msg' to 'msgid'.
(parse_error_context): Rename parameter 'msg' to 'msgid'.
(parse_warning_context): Likewise.
2004-10-05 Andrew Haley <aph@redhat.com>
PR java/17779
* jcf-parse.c (parse_zip_file_entries): If a class has a
superclass and a TYPE_SIZE of zero, lay it out.
2004-09-30 Andrew Haley <aph@redhat.com>
PR java/17733
* jcf-parse.c (compute_class_name): Rewrite.
2004-10-01 Jan Hubicka <jh@suse.cz>
* java.c (java_expand_body): Update call of tree_rest_of_compilation.
2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
* lex.c: Fix a comment typo.
2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
* java-tree.h: Fix a comment typo.
2004-09-30 Per Bothner <per@bothner.com>
Simplify lexer. Implement --enable-mapped-location support.
* jcf-parse.c (parse_class_file): Use linemap_line_start.
(parse_source_file_1): Pass filename as extra parameter, so we can call
linemap_add and set input_location here, rather than in both callers.
(read_class): Pass copied filename to parse_source_file_1.
Don't initialize wfl_operator - only needed for source compilation.
(read_class, jcf_parse): Call linemap_add with LC_LEAVE.
* lex.h: Remove a bunch of debugging macros.
* lex.h (struct_java_line, struct java_error): Remove types.
(JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
(struct java_lc_s): Remove prev_col field.
(struct java_lexer): New fields next_unicode, next_columns, and
avail_unicode. New position field, and maybe token_start field.
Don't need hit_eof field - use next_unicode == -1 instead.
(JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
(JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
* parse.h: Various changes for USE_MAPPED_LOCATION.
(EXPR_WFL_EMIT_LINE_NOTE): XXX
(BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
(struct parser_ctxt): New file_start_location field.
Remove p_line, c_line fields since we no longer save lines.
Remove elc, lineno, and current_jcf fields - no longer used.
* parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
Don't use EXPR_WFL_ADD_COL since that isn't trivial with
source_location and is probably not needed anymore anyway.
Use new expr_add_Location function.
(SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
(java_pop_parser_context): Minor cleanup.
(java_parser_context_save_global, java_parser_context_restore_global,
java_pop_parser_context): Save/restore input_location as a unit.
(issue_warning_error_from_context): If USE_MAPPED_LOCATION take
a source_location instead of a wfl context node.
(check_class_interface_creation): input_filename is not addressable.
(create_artificial_method): Calling java_parser_context_save_global
and java_parser_context_restore_global is overkill. Instead,
temporarily set input_location from class decl.
(java_layout_seen_class_methods): Set input_location from method decl.
(fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
(finish_loop_body): Likewise.
* lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
(java_sprint_unicode): Take a character, not index in line.
(java_sneak_uncode): Replaced by java_peek_unicode.
(java_unget_unicode): No longer used.
(java_allocate_new_line. java_store_unicode): Removed, since we
no longer remember "lines".
(java_new_lexer): Update for new data structures.
(java_read_char): Move unget_value checking to java_read_unicode.
(java_get_unicode, java_peek_unicode, java_next_unicode): New more
efficient functions that are used directly when lexing.
(java_read_unicode_collapsing_terminators): No longer needed.
(java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
Re-organize to use java_peek_unicode to avoid java_unget_unicode.
(java_parse_escape_sequence): Rewrite to be simpler / more efficient.
(do_java_lex): Lots of movings around to avoid java_unget_unicode,
combine switch branches, and test for common token kinds earlier.
(java_lex_error): Rewrite.
* jv-scan.c (expand_location): New function, copied from tree.c.
(main): Set ctxp->filename instead of setting input_filename directly.
2004-09-30 Per Bothner <per@bothner.com>
More cleanup for --enable-mapped-location.
* class.c (push_class): If USE_MAPPED_LOCATION don't set
input_location here. Instead do it in give_name_to_class.
(build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
* expr.c (expand_byte_code): Call linemap_line_start.
* expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
(expr_add_location): New function, if USE_MAPPED_LOCATION.
* class.c (maybe_layout_super_class): Adjust build_expr_wfl call
to USE_MAPPED_LOCATION case.
* java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
* jcf-parse.c (java_parse_file): Don't set input_filename.
Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
Create a list of TRANSLATION_UNIT_DECL.
(current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
reason is so we can set a DECL_SOURCE_LOCATION for each file.
(java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
(file_start_location): New static.
(set_source_filename): Avoid extra access to input_filename macro.
Concatenate new name with class's package prefix.
(set_source_filename, give_name_to_class): Update.
(give_name_to_class): Set class's "line 0" input_location here.
(parse_class_file): Set input_location as a unit.
* jcf-parse.c (load_class): Sanity test if missing inner class file.
2004-09-29 Per Bothner <per@bothner.com>
* java-tree.h: Redefine some macros and add some declaration
to handle the USE_MAPPED_LOCATION case.
* parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
* java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
* java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
* check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
* decl.c (finish_method, java_add_stmt): Likewise.
* java-gimplify.c (java-gimplify.c): Likewise.
* jcf-write.c (generate_bytecode_insns): Likewise.
* lang.c (java_post_options): Likewise - call linemap_add.
2004-09-29 Andrew Haley <aph@redhat.com>
PR java/17007
* parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
result of TRUNC_MOD_EXPR.
(patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
* decl.c (java_init_decl_processing): Mark
soft_lookupinterfacemethod_node and soft_instanceof_node pure.
2004-09-28 Tom Tromey <tromey@redhat.com>
PR java/15710:
* class.c (add_miranda_methods): Load superinterface if not
already loaded.
2004-09-28 Andrew Haley <aph@redhat.com>
PR java/17586
* jcf-parse.c (load_class): Don't try to read a class that we've
already read.
2004-09-28 Andrew Haley <aph@redhat.com>
* jcf-parse.c (load_class): Back out previous broken patch.
2004-09-28 Andrew Haley <aph@redhat.com>
PR java/17586
* jcf-parse.c (load_class): Don't try to read a class that we've
already read.
Check that we really did read the right class.
2004-09-25 Tom Tromey <tromey@redhat.com>
PR java/17500:
* parse.y (create_artificial_method): Use add_method_1.
2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
* expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
comment typos.
* gcj.texi: Fix typos.
2004-09-24 Tom Tromey <tromey@redhat.com>
PR java/15656:
* parse.y (class_instance_creation_expression): Set `$$' to NULL
in error parts of rule.
(unary_expression): Don't call error_if_numeric_overflow when $1
is NULL.
2004-09-24 Tom Tromey <tromey@redhat.com>
PR java/16789:
* parse.y (resolve_qualified_expression_name): Set
CAN_COMPLETE_NORMALLY on first call when chaining static calls.
* expr.c (force_evaluation_order): Check for empty argument list
after stripping COMPOUND_EXPR.
2004-09-23 Andrew Haley <aph@redhat.com>
PR java/16927:
* parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
COND_EXPRs.
2004-09-23 Tom Tromey <tromey@redhat.com>
PR java/17329:
* java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
where operand is null.
2004-09-23 Tom Tromey <tromey@redhat.com>
PR java/17380:
* parse.y (not_accessible_p): Allow access to protected members
even when class is not static.
2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in: Revert the gcc-none.o change.
2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (patch_anonymous_class): VEC_space returns true if there
is space.
2004-09-21 Matt Austern <austern@apple.com>
Fix bootstrap.
* gjavah.c (free_method_name_list): Fix function definition so
it's a proper C prototype.
2004-09-21 Tom Tromey <tromey@redhat.com>
PR java/17575:
* gjavah.c (free_method_name_list): New method.
(main): Call it.
2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
* java-tree.def: Use tree_code_class enumeration constants
instead of code letters.
* java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
new tree-class enumeration constants.
2004-09-13 Tom Tromey <tromey@redhat.com>
PR java/17216:
* class.c (layout_class_method): Put synthetic methods into the
vtable.
2004-09-11 Andrew Pinski <apinski@apple.com>
* Make-lang.in (java/ggc-none.c): Change dependency
for ggc.h into $(GGC_H).
2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
* Make-lang.in (java/win32-host.o): Add dependency on
coretypes.h.
* win32-host.c: Add includes for coretypes.h, jcf.h
2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
* Make-lang.in (GCJH_OBJS): Change dependency from
ggc-none.o to java/ggc-none.o
(JCFDUMP_OBJS): Likewise.
(java/ggc-none.o): New target.
2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
* boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
* class.c (build_utf8_ref, build_static_field_ref,
make_field_value, make_method_value, get_dispatch_table,
make_class_data, emit_symbol_table, emit_catch_table): Likewise.
* constants.c (get_tag_node, build_ref_from_constant_pool,
build_constants_constructor): Likewise.
* decl.c (java_init_decl_processing): Likewise.
* expr.c (build_java_array_length_access, build_newarray,
expand_java_multianewarray, expand_java_pushc, expand_iinc,
build_java_binop, build_field_ref, expand_java_add_case,
expand_java_call, build_known_method_ref, build_invokevirtual,
build_invokeinterface, build_jni_stub): Likewise.
* java-gimplify.c (java_gimplify_new_array_init): Likewise.
* jcf-parse.c (get_constant): Likewise.
* lex.c (do_java_lex): Likewise.
* parse.y (patch_binop, patch_unaryop, patch_cast,
build_newarray_node, patch_newarray): Likewise.
* resource.c (compile_resource_data): Likewise.
* typeck.c (build_prim_array_type): Likewise.
2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (java_init_decl_processing): Adjust
initialize_sizetypes call.
2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
* jv-scan.c (fancy_abort): Add.
2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
* expr.c (build_java_arrayaccess): Use convert to change
len's type.
2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
* class.c (make_local_function_alias): Allocate extra space for 'L'
in name buffer. Reported by Thomas Neumann.
2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
* parse.h (JAVA_RADIX10_FLAG): Rename to ...
(JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
* lex.c (do_java_lex): Adjust.
(error_if_numeric_overflow): Likewise.
2004-08-18 Andrew Pinski <apinski@apple.com>
* class.c (make_local_function_alias): Only make a new decl if we
support alias attribute on all decls.
2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
* class.c (make_local_function_alias): New function. Create local
alias for public method DECL.
(make_method_value): Use make_local_function_alias.
* parse.y (craft_constructor): Don't special-case anonymous classes.
Always set ctor_name to init_identifier_node.
(lookup_method_invoke): Call layout_class_method when creating
anonymous class constructor.
2004-08-18 Richard Henderson <rth@redhat.com>
* java-gimplify.c (java_gimplify_expr): Move '2' handling into
default case. Treat '<' similarly. Update for
is_gimple_formal_tmp_var name change.
2004-08-17 Andrew Haley <aph@redhat.com>
* lang.c (lang_printable_name): Obey verbose flag.
* parse.y (constructor_circularity_msg): Set VERBOSE arg for
lang_printable_name().
(verify_constructor_circularity, get_printable_method_name,
check_abstract_method_definitions, java_check_regular_methods,
java_check_abstract_methods, check_inner_class_access,
fix_constructors, patch_method_invocation, patch_return):
Likewise.
* expr.c (pop_type_0): Likewise.
* java-tree.h (lang_printable_name_wls): Delete.
2004-08-16 Tom Tromey <tromey@redhat.com>
PR java/8473:
* parse.y (primary): Changed for initialized and uninitialized
array creations.
(array_access): Handle array_creation_initialized.
(array_creation_expression): Split into
array_creation_initialized and array_creation_uninitialized.
2004-08-16 Andrew Haley <aph@redhat.com>
* jcf-write.c (find_constant_index): Canonicalize NaNs when
generating bytecode.
2004-08-16 Elliot Lee <sopwith@redhat.com>
PR java/9677
* jcf-parse.c (java_parse_file): Handle filenames with embedded
spaces, and quoted filelists.
2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
* boehm.c (get_boehm_type_descriptor): Use build_int_cst.
* class.c (build_utf8_ref, build_static_field_ref,
make_field_value, make_method_value, get_dispatch_table,
make_class_data, emit_symbol_table, emit_catch_table): Likewise.
* constants.c (get_tag_node, build_ref_from_constant_pool,
build_constants_constructor): Likewise.
* decl.c (java_init_decl_processing): Likewise.
* expr.c (build_java_array_length_access, build_newarray,
expand_java_multianewarray, expand_java_pushc, expand_iinc,
build_java_binop, build_field_ref, expand_java_add_case,
expand_java_call, build_known_method_ref, build_invokevirtual,
build_invokeinterface, build_jni_stub): Likewise.
* java-gimplify.c (java_gimplify_new_array_init): Likewise.
* jcf-parse.c (get_constant): Likewise.
* lex.c (do_java_lex): Likewise.
* parse.y (patch_binop, patch_unaryop, patch_cast,
build_null_of_type, patch_newarray): Likewise.
* resource.c (compile_resource_data): Likewise.
* typeck.c (build_prim_array_type): Likewise.
2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
* java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
Don't create BLOCK here or call java_gimplify_block.
2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
* java-tree.h (flag_deprecated): Removed.
* lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
* parse.y (check_deprecation): Check warn_deprecated instead of
flag_deprecated.
2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
* lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
flag_check_references, flag_extraneous_semicolon, flag_deprecated,
flag_force_classes_archive_check, flag_optimize_sci,
flag_indirect_dispatch): Remove explicit declarations.
* lang.opt: Add implicit declare/define/assign. Remove obsolete
final comment.
2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
PR bootstrap/14893
* Make-lang.in (java.install-man): Install from either build
tree or source tree, whichever has the file first.
2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
* jcf-parse.c (get_constant): Adjust force_fit_type call.
* lex.h (SET_LVAL_NODE_TYPE): Remove.
* lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
(do_java_lex): Likewise. Adjust force_fit_type call.
2004-08-04 Roger Sayle <roger@eyesopen.com>
Andrew Haley <aph@redhat.com>
* typeck.c (convert_ieee_real_to_integer): Call fold on the range
checking trees as they're being built.
(convert): Call convert_ieee_real_to_integer if we're
converting a constant, even if we're writing a class file.
2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
PR java/16701
* parse.y (fold_constant_for_init): Call resolve_field_access with
correct current_class context.
2004-08-01 Roger Sayle <roger@eyesopen.com>
* decl.c (update_aliases, initialize_local_variable): Replace calls
to build with calls to buildN.
* java-gimplify.c (java_gimplify_modify_expr): Likewise.
* java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
* parse.h (BUILD_THROW): Likewise.
* parse.y (switch_expression, synchronized_statement,
catch_clause_parameter, array_creation_expression,
conditional_expression, make_qualified_name,
resolve_qualified_expression_name, patch_method_invocation,
patch_invoke, build_method_invocation, build_new_invocation,
build_assignment, patch_assignment, build_binop, patch_binop,
build_string_concatenation, build_incdec, patch_unaryop,
patch_cast, build_array_ref, build_newarray_node, patch_newarray,
patch_return, build_if_else_statement, build_labeled_block,
build_new_loop, build_loop_body, build_bc_statement,
build_assertion, encapsulate_with_try_catch, build_try_statement,
build_try_finally_statement, patch_synchronized_statement,
emit_test_initialization): Likewise, replace build with buildN.
2004-07-28 Eric Christopher <echristo@redhat.com>
* lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
(java_unsafe_for_reeval): Ditto.
2004-07-26 <hp@bitrange.com>
* parse.y (build_super_invocation): Adjust declaration order to
avoid declaration after statement.
2004-07-25 Bernardo Innocenti <bernie@develer.com>
* decl.c: Rename all identifiers named `class' to `cl'.
2004-07-25 Richard Henderson <rth@redhat.com>
* decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
2004-07-23 Mike Stump <mrs@apple.com>
* boehm.c (set_bit): Improve type safety wrt unsignedness.
* gjavah.c (throwable_p, decode_signature_piece,
print_full_cxx_name, print_include, add_namelet, add_class_decl,
process_file): Likewise.
* jcf-dump.c (main): Likewise.
* jcf-io.c (read_zip_member): Likewise.
* jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
give_name_to_class, get_class_constant): Likewise.
* jcf-write.c (find_constant_wide, push_long_const,
generate_classfile): Likewise.
* lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
* parse.y (read_import_dir): Likewise.
* typeck.c (parse_signature_type): Likewise.
* verify.c (verify_jvm_instructions): Likewise.
* zextract.c (find_zip_file_start, read_zip_archive): Likewise.
2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
* Make-lang.in: Replace rmic and rmiregistry references with
grmic and grmiregistry.
* gcj.texi: Likewise.
2004-07-20 Andrew Haley <aph@redhat.com>
PR java/16431.
* verify.c (verify_jvm_instructions): Comment change only.
* typeck.c (build_java_array_type): Add size field to array name.
* java-tree.h (LOCAL_SLOT_P): New.
(update_aliases): Add PC argument.
(pushdecl_function_level): New function.
* java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
MODIFY_EXPR, and SAVE_EXPR.
(java_gimplify_modify_expr): New function.
* expr.c (push_type_0): Call find_stack_slot() to create temporary.
(expand_iinc): Pass PC to update_aliases().
(STORE_INTERNAL): Likewise.
(process_jvm_instruction): Likewise.
* decl.c (base_decl_map): New variable.
(uniq): New variable.
(update_aliases): Rewrite with more thorough checking.
(debug_variable_p): New function.
(push_jvm_slot): Don't initialize local variable. Don't pushdecl.
(check_local_named_variable): Delete whole function.
(initialize_local_variable): New function.
(check_local_unnamed_variable): Add checks and comments.
(find_local_variable): Rewrite.
(java_replace_reference): New function.
(function_binding_level): New variable.
(pushdecl_function_level): New function.
(maybe_pushlevels): Set DECL_LOCAL_END_PC.
(maybe_pushlevels): Call pushdecl() on each of the new decls.
(start_java_method): Reset uniq. Create base_decl_map. Set
function_binding_level.
(end_java_method): Null unused fields to save memory.
2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
* class.c (add_interface_do): Remove.
(set_super_info, interface_of_p, maybe_add_interface,
add_interface, make_class_data, layout_class,
add_miranda_methods): Adjust BINFO accessors and addition.
* expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
accessors.
* jcf-write.c (generate_classfile): Likewise.
* parse.y (patch_anonymous_class, check_inner_circular_reference,
check_circular_reference, java_complete_class,
check_abstract_method_definitions,
java_check_abstract_method_definitions,
check_interface_throws_clauses, java_check_abstract_methods,
lookup_java_interface_method2,
find_applicable_accessible_methods_list): Adjust BINFO accessors
and addition.
* typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
2004-07-18 Roger Sayle <roger@eyesopen.com>
* builtins.c (max_builtin, min_builtin,
java_build_function_call_expr): Replace calls to build with buildN.
* class.c (build_class_ref, build_static_field_ref,
get_dispatch_table, make_class_data, layout_class_method): Likewise.
* constants.c (build_ref_from_constant_pool): Likewise.
* decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
add_stmt_to_compound): Likewise.
* except.c (build_exception_object_ref, expand_end_java_handler):
Likewise.
* java-gimplify.c (java_gimplify_case_expr,
java_gimplify_default_expr, java_gimplify_block,
java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
* jcf-write.c (generate_bytecode_insns): Likewise.
* typeck.c (convert_ieee_real_to_integer): Likewise.
2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
* java-tree.h (builtin_function): Declare.
2004-07-16 Steven Bosscher <stevenb@suse.de>
* parse.y (java_complete_expand_methods, java_expand_classes): Don't
abuse restore_line_number_status.
2004-07-15 Frank Ch. Eigler <fche@redhat.com>
g++/15861
* jcf-parse.c (java_emit_static_constructor): Specify default
priority.
2004-07-13 Per Bothner <per@bothner.com>
* java-tree.h (all_class_filename): Remove useless macro.
(enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
(BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
* parse.y (java_parser_context_restore_global): Replace
BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
* jcf-parse.c (read_class, java_parse_file): Likewise.
2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
PR java/16474
gjavah.c (print_field_info): Emit constant only if field is static.
2004-07-11 Roger Sayle <roger@eyesopen.com>
* expr.c (java_truthvalue_conversion, flush_quick_stack,
java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
build_java_ret, build_java_throw_out_of_bounds_exception,
build_java_array_length_access, java_check_reference,
build_java_arrayaccess, build_java_arraystore_check, build_newarray,
build_anewarray, expand_java_multianewarray, expand_java_arraystore,
expand_java_arrayload, build_java_monitor, expand_java_return,
expand_load_internal, expand_java_NEW, build_get_class,
build_instanceof, expand_java_CHECKCAST, expand_iinc,
build_java_soft_divmod, build_java_binop, build_field_ref,
expand_compare, expand_java_goto, expand_java_switch,
expand_java_add_case, build_class_init, build_known_method_ref,
invoke_build_dtable, build_invokevirtual, build_invokeinterface,
expand_invoke, build_jni_stub, expand_java_field_op,
java_expand_expr, expand_byte_code, STORE_INTERNAL,
force_evaluation_order, emit_init_test_initialization): Convert
calls to "build" into calls to the prefered "buildN" functions.
2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
* java-tree.h (set_block): Remove.
* lang.c (java_clear_binding_stack): New.
(LANG_HOOKS_CLEAR_BINDING_STACK): Define.
* decl.c (struct binding_level): Remove this_block.
(clear_binding_level): Likewise.
(poplevel): Don't handle this_block.
(set_block): Remove.
2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
* class.c (common_enclosing_context_p): Remove statement with no
side-effects.
2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
PR java/8618
* parse.y (create_anonymous_class): Remove 'location' argument. Use
the WFL from TYPE_NAME to get line number for the decl. Fix comment.
(craft_constructor): Inherit access flags for implicit constructor
from the enclosing class.
(create_class): Fix comment typo.
(resolve_qualified_expression_name): Pass type of qualifier to
not_accessible_p, not the type in which target field was found.
(not_accessible_p): Handle inner classes. Expand protected
qualifier-subtype check to enclosing instances, but don't apply this
check to static members. Allow protected access to inner classes
of a subtype. Allow private access within common enclosing context.
(build_super_invocation): Get WFL line number info from current
class decl.
(build_incomplete_class_ref): Update for new create_anonymous_class
signature.
* parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
common_enclosing_instance_p.
* class.c (common_enclosing_context_p): New. Determine if types
share a common enclosing context, even across static contexts.
(common_enclosing_instance_p): Renamed from
common_enclosing_context_p. Determines if types share a common
non-static enclosing instance.
* java-tree.h (common_enclosing_instance_p): Declare.
* jcf-write.c (get_method_access_flags): New. Surpress private flag
for inner class constructors.
(generate_classfile): Use get_method_access_flags.
2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
* class.c (interface_of_p): Check for null TYPE_BINFO.
2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
* class.c (make_class): Do not create binfo here.
(set_super_info): Create it here.
* java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
2004-07-08 Richard Henderson <rth@redhat.com>
* expr.c (case_identity, get_primitive_array_vtable,
java_expand_expr, emit_init_test_initialization): Remove.
* java-tree.h (java_expand_expr): Remove.
* lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
2004-07-07 Per Bothner <per@bothner.com>
* class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
get internal error due to mismatched types.
* gcj.texi (Invoking gij): Document new -verbose:class flag.
* gcj.texi (Linking): New node. Document -lgij usage.
2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
* java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
(TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
* java/class.c (set_super_info, class_depth, interface_of_p,
maybe_add_interface, add_interface, make_class_data,
layout_class, add_miranda_methods): Adjust BINFO macros.
* expr.c (can_widen_reference_to, lookup_field): Likewise.
* jcf-write.c (generate_classfile): Likewise.
* parse.y (patch_anonymous_class,
check_inner_circular_reference, check_circular_reference,
java_complete_class, check_abstract_method_definitions,
java_check_abstract_method_definitions,
check_interface_throws_clauses, java_check_abstract_methods,
lookup_java_interface_method2,
find_applicable_accessible_methods_list): Likewise.
* typeck.c (find_method_in_interface): Likewise.
* verify.c (merge_types): Likewise.
2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
* java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
* class.c (add_interface_do): Use BINFO_VIRTUAL_P.
2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
* class.c (make_class): Use make_tree_binfo.
(set_super_info, add_interface_do): Likewise.
* java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
* verify.c: Correct array element access formatting thinko.
2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
* verify.c: Insert a short blurb at the start referring to the JVMS.
(merge_type_state): Remove redundant nested if statement.
(verify_jvm_instructions): Ensure current_subr is initialised to
NULL_TREE.
Minor formatting fixes all over the place.
2004-07-02 Richard Henderson <rth@redhat.com>
* jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
2004-07-01 Richard Henderson <rth@redhat.com>
* class.c (registerClass_libfunc): Remove.
(init_class_processing): Don't set it.
(emit_register_classes): Take list_p parameter. Fill it in
with _Jv_RegisterClass calls.
* decl.c (java_init_decl_processing): Don't call
init_resource_processing.
* jcf-parse.c (java_emit_static_constructor): New.
(java_parse_file): Call it.
* resource.c (registerResource_libfunc): Remove.
(init_resource_processing): Remove.
(write_resource_constructor): Take list_p parameter. Fill it in
with _Jv_RegisterResource calls.
* java-tree.h: Update prototypes.
2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
PR java/1262
* class.c (layout_class_method): Do not override package-private
method if its in a different package.
(split_qualified_name): Move here from parse.y. Rename from
breakdown_qualified. Add comment.
(in_same_package): Move here from parse.y. Add comment.
* java-tree.h (break_down_qualified, in_same_package): Declare.
(in_same_package): Likewise.
* parse.y (breakdown_qualified, in_same_package): Moved to class.c.
Callers updated.
2004-06-29 Andrew Haley <aph@redhat.com>
* except.c (expand_start_java_handler): Push a new binding level.
Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
register_exception_range() to register where we'll do it.
(expand_end_java_handler): Remove old bogus code. Replace with
new logic that simply builds TRY_CATCH_EXPRs and inserts them at
the top of the expression we're curently building.
(maybe_end_try): Delete.
* decl.c (binding_level.exception_range): New field.
(clear_binding_level): Add field exception_range. Reformat.
(poplevel): Call expand_end_java_handler().
(poplevel): Call java_add_stmt only if functionbody is false.
(maybe_poplevels): Don't call maybe_end_try() from here.
(end_java_method): Clear no longer used trees in function decl.
(register_exception_range): New function.
* java-tree.h (register_exception_range, struct eh_range): Declare.
2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
* jcf-write.c (get_classfile_modifiers): Formatting fixes.
2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
Formatting fixes.
* expr.c (class_has_finalize_method): Fix method name indentation.
(expand_java_call): Remove K&R style parameter declaration.
(expand_invoke): Fix statement indentation.
(expand_java_field_op): Likewise.
* parse-scan.y: Fix typo.
(reset_report): Fix method name indentation.
* parse.y (unresolved_type_p, build_expr_block): Remove extra blank
line. Fix typos.
* verify.c (verify_jvm_instructions): Document parameters, insert
page break.
* lang.c (lang_init_source): Fix method name indentation.
* class.c (common_enclosing_context_p): Likewise.
(emit_symbol_table): Fix parameter list indentation.
* decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
parameter declaration.
* constants.c: Fix copyright notice indentation.
* typeck.c (find_method_in_superclasses): Fix parameter list
indentation.
(find_method_in_interfaces): Likewise.
* zextract.c (makelong): Fix method name indentation.
2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
PR java/15715.
* parse.y (create_interface): Set correct access modifiers for
interfaces.
* jcf-write.c (get_classfile_modifiers): New function.
(generate_classfile): Use get_classfile_modifiers, not
get_access_flags.
2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
* parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
dependency to current parser context, not NULL_TREE, for top-level
classes.
(jdep_resolve_class): Enable member access check for all inner
class dependencies.
2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
* parse.y (qualify_and_find): Pass type decl, not identifier, to
load_class.
2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
PR java/15734
* expr.c (expand_java_field_op): Ensure that target class for static
field access has been loaded.
2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
Ranjit Mathew <rmathew@hotmail.com>
PR java/1207, java/16178
* jcf-parse.c (load_class): Return immediately if passed a type decl
where CLASS_FROM_SOURCE_P is set. Remove FIXME.
* parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
before calling load_class.
(qualify_and_find): Likewise.
(find_in_imports_on_demand): Likewise.
(find_applicable_accessible_methods_list): Likewise.
2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
* parse.y (java_layout_seen_class_methods): Don't call load_class
on class defined by source parser.
2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
* parse.y (set_nested_class_simple_name_value): Removed.
(java_complete_expand_class): Remove calls to
set_nested_class_simple_name_value.
2004-06-22 Andrew Haley <aph@redhat.com>
Ranjit Mathew <rmathew@hotmail.com>
Fixes PR java/16113.
* decl.c (force_poplevels): Remove call to expand_end_bindings.
2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
* parse.y (create_class): Correct diagnostic message about
java.lang.Object extending anything else.
2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (build_class_ref): Add new operand for COMPONENT_REF.
(build_static_field_ref): Likewise and add new operands for ARRAY_REF.
* constants.c (build_ref_from_constant_pool): Likewise.
* expr.c (build_java_array_length_access): Likewise.
(build_get_class, build_field_ref, build_known_method_ref): Likewise.
(invoke_build_dtable, build_invokevirtual): Likewise.
(build_invokeinterface, java_expand_expr): Likewise.
(emit_init_test_initialization): Likewise.
* java-gimplify.c (java_gimplify_new_array_init): Likewise.
* parse.y (make_qualifed_name, build_array_ref): Likewise.
2004-06-21 Andrew Haley <aph@redhat.com>
* java-gimplify.c (java_gimplify_block): set TREE_USED on the new
block.
2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
* jcf.h (struct JCF): Change java_source, right_zip and finished
to unsigned int.
* lex.h (struct java_lexer): Change hit_eof, read_anything,
byte_swap and use_fallback to unsigned int.
* parse.h (struct _jdep): Change flag0 to unsigned int.
2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
Fixes PR java/13948
* parse.y (java_layout_seen_class_methods): Ensure class is loaded
before trying to lay out its methods.
* jcf-parse.c (read_class): Track parsed files using canonical paths
obtained via lrealpath from libiberty.
(java_parse_file): Likewise.
(parse_source_file_1): Rename formal parameter to reflect its
modified purpose. Minor formatting fix.
2004-06-15 Paolo Bonzini <bonzini@gnu.org>
* class.c (emit_register_classes): Make the function uninlinable,
do not set current_function_cannot_inline.
* resource.c (write_resource_constructor): Do not reset
flag_inline_functions around rest_of_compilation.
2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
PR java/15769
* expr.c (java_truthvalue_conversion): Handle
UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
i.e. return the expression.
2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
* gjavah.c: Include version.h
2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
* jcf-write.c (generate_bytecode_conditional): Correct handling
of unordered conditionals. Add comment.
2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
Per Bothner <per@bothner.com>
* java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
local variable was initialised upon declaration.
* parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
variable was final and initialised upon declaration.
* check-init.c (check_final_reassigned): Give error only if a blank
final is not definitely unassigned or if an initialised final is
reassigned.
(check_bool_init): Respect JLS2 16.1.7 requirements for boolean
assignment expressions. Remove case MODIFY_EXPR, label do_default.
(check_init): Perform initialised-variable-removing-optimisation
only on non-final local variables.
2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
* jcf-write.c (generate_bytecode_conditional): Handle binops
UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
and LTGT_EXPR.
(generate_bytecode_insns): Likewise.
2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
* check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
* gcj.texi (Object allocation): Remove _Jv_AllocBytes.
(Mixing with C++): Document JvAllocBytes and RawDataManaged.
2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
* decl.c (struct binding_level): Add GTY marker. Compile
binding_depth unconditionally.
(current_binding_level, free_binding_level, global_binding_level):
Likewise.
(clear_binding_level): Unconditionally set binding_depth.
(make_binding_level): Use ggc_alloc_cleared, not xmalloc.
2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
* lex.c (java_new_lexer): Set 'encoding'.
(java_read_char): Improve error message for unrecognized characters.
* lex.h (struct java_lexer): New field 'encoding'.
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
* Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
2004-05-21 Mark Wielaard <mark@klomp.org>
* gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
extern.
2004-05-19 Paolo Bonzini <bonzini@gnu.org>
* typeck.c: Remove non-printable character 160.
2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
* check-init.c: Correct minor typos.
2004-05-13 Diego Novillo <dnovillo@redhat.com>
* Make-lang.in, expr.c, java-gimplify.c: Rename
tree-simple.[ch] to tree-gimple.[ch].
2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
* java-gimplify.c (java_gimplify_expr): Correct minor typos.
2004-05-13 Diego Novillo <dnovillo@redhat.com>
Merge from tree-ssa-20020619-branch. See
ChangeLog.tree-ssa for details.
* Make-lang.in, builtins.c, check-init.c, class.c,
constants.c, decl.c, except.c, expr.c, java-except.h,
java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
lang.c, lang.opt, parse.y, resource.c: Merged.
* java-gimplify.c: New file.
2004-05-10 Andrew Haley <aph@redhat.com>
* parse.y (create_class): Set TYPE_VFIELD.
* decl.c (java_init_decl_processing): Likewise.
* expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
* class.c (make_method_value): Replace DECL_VINDEX with call to
get_method_index().
(get_dispatch_vector): Likewise.
(layout_class_method): Likewise.
Replace set of DECL_VINDEX with call to set_method_index().
(set_method_index): New function.
(get_method_index): New function.
* java-tree.h (set_method_index): New function decl.
(get_method_index): New function decl.
2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
* parse.y (check_pkg_class_access): Add new argument
and use it when cl is NULL to call lookup_cl on it.
(parser_check_super_interface): Do not call lookup_cl.
Pass this_decl to check_pkg_class_access and NULL
instead of lookup_cl.
(parser_check_super): Update for change in
check_pkg_class_access.
(do_resolve_class): Likewise.
(process_imports): Likewise.
(find_in_imports_on_demand): Likewise.
(resolve_qualified_expression_name): Likewise.
2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
Fixes PR java/9685, PR java/15073
* parse.y (accessibility_string): New method.
(not_accessible_field_error): Use accessibility_string()
instead of java_accstring_lookup().
(resolve_qualified_expression_name): Check with
check_pkg_class_access() before allowing access using
qualified names.
Fix comment typo.
Use check_pkg_class_access() instead of not_accessible_p()
for unqualified types.
(not_accessible_p): Use DECL_CONTEXT (member) instead of
REFERENCE for package-private access checking.
(patch_method_invocation): Use accessibility_string() instead
of java_accstring_lookup().
2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
Fixes PR java/15133
* gjavah.c (struct method_name): Add member is_native.
(overloaded_jni_method_exists_p): Match candidate method only if
it is native.
(print_method_info): Initialise is_native flag from the method's
access flags.
2004-04-30 Roger Sayle <roger@eyesopen.com>
* builtins.c (java_builtins): Add acos, asin, ceil and floor.
(initialize_builtins): Likewise, define acos, asin, ceil and floor.
2004-04-22 Roger Sayle <roger@eyesopen.com>
* resource.c (write_resource_constructor): Guard call to possibly
NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
* class.c (make_class_data): Add new field aux_info.
* decl.c (java_init_decl_processing): Push type and decl for
`aux_info'.
2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
* expr.c (expand_java_NEW): Don't use size argument for
_Jv_AllocObject calls.
* parse.y (patch_invoke): Likewise.
2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
* expr.c (build_invokeinterface): Remove unused variables to
fix warnings.
2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
* class.c (get_interface_method_index): New function. Return dispatch
index for interface method.
(make_method_value): For interface methods, set index field to
iface dispatch index, not DECL_VINDEX.
* expr.c (build_invokeinterface): Use get_interface_method_index.
2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
2004-03-31 Andrew Haley <aph@redhat.com>
PR java/14104
* jcf-io.c (opendir_in_zip): Tidy up error handling.
2004-03-30 Zack Weinberg <zack@codesourcery.com>
* builtins.c, expr.c, jcf.h, parse.h: Use new shorter
form of GTY markers.
2004-03-25 Marcus Meissner <meissner@suse.de>
PR java/14689:
* jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
2004-03-23 Tom Tromey <tromey@redhat.com>
PR java/14315:
* jcf-write.c (make_class_file_name): Don't report if mkdir
failed with EEXIST.
2004-03-23 Tom Tromey <tromey@redhat.com>
* gcj.texi (Extensions): Document GCJ_PROPERTIES.
2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
* class.c, gjavah.c, lang.c: Fix comment typos.
* gcj.texi: Fix typos.
2004-03-19 Per Bothner <per@bothner.com>
* gcj.texi (Code Generation): Document new flags and assert defaults.
* class.c (assume_compiled_node_struct): Rename type to
class_flag_node_struct, as it is now also used for enable_assertions.
Rename assume_compiled_node typedef. Rename excludep field to value.
(find_assume_compiled_node): Rename function to find_class_flag_node.
Minor optimization - avoid needless strlen.
(add_assume_compiled): Some tweaking and optimization.
Rename and generalize to add_class_flag takem an extra parameter.
(add_assume_compled): New just calls add_class_flag.
(add_enable_assert, enable_assertions): New functions.
(enable_assert_tree): New static.
* java-tree.h (add_enable_assert, enable_assertions): New declarations.
* lang.opt (fenable-assertions, fenable-assertions=,
fdisable-assertions, fdisable-assertions=): New options.
* lang.c (java_handle_option): Handle new options.
* parse.y (build_incomplete_class_ref): Handle class$ in an inner
class in an interface - create helper class nested in outer interface.
(build_assertion): Short-circuit if enable_assertions is false.
2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* java-tree.h: Changes throughout to add checking to macros
and numerous whitespace changes.
(VAR_OR_FIELD_CHECK): New macro.
* jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
2004-03-16 Per Bothner <per@bothner.com>
* jcf-jump.c (options): New --print-constants option.
* gcj.texi (Invoking jcf-dump): Document --print-constants.
* jcf-dump.c (flag_print_constant_pool): Default to off.
(print_constant_terse_with_index): New helper function.
(various places): Check flag_print_constant_pool where missing.
(main): If verbose set flag_print_constant_pool.
(HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
2004-03-15 Andrew Haley <aph@redhat.com>
PR java/14581
* parse.y (java_complete_lhs): Check that final variable has an
initializer.
2004-03-12 Andrew Haley <aph@redhat.com>
PR java/14551
* typeck.c (convert): Clear TREE_OVERFLOW after an integer
conversion.
2004-02-29 Roger Sayle <roger@eyesopen.com>
* jcf-parse.c (java_parse_file): Handle the case that input_filename
is NULL.
2004-02-27 Per Bothner <per@bothner.com>
* parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
suggestion: Use build_incomplete_class_ref.
This fixes PR java/13508, java/11714.
2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
* java/parse.h: Update copyright.
2004-02-26 Andrew Haley <aph@redhat.com>
PR java/14231:
* parse.y (check_interface_throws_clauses): Check for
!METHOD_INVISIBLE (iface_method).
* class.c (layout_class_methods): Check for CLASS_INTERFACE as
well as CLASS_ABSTRACT.
2004-02-25 Per Bothner <per@bothner.com>
* parse.y (build_assertion): If we're in an inner class, create the
class$ helper routine in the outer class.
2004-02-19 Richard Henderson <rth@redhat.com>
* parse.y (switch_label): Use make_node for DEFAULT_EXPR.
2004-02-16 Geoffrey Keating <geoffk@apple.com>
* Make-lang.in (java.install-man): Add extra dependencies.
2004-02-13 Geoffrey Keating <geoffk@apple.com>
* Make-lang.in: Install man pages under the same names
(possibly transformed) as the program they document.
2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
* gjavah.c: Include "intl.h".
(error): New function.
(main): Call gcc_init_libintl.
(get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
print_stub_or_jni, process_file, main): Use error rather than
fprintf.
(print_method_info, usage, help, version, main): Mark strings for
translation with _. Avoid splitting up sentences. Send
information messages to stdout.
* jcf-dump.c: Include "intl.h".
(main): Call gcc_init_libintl.
(process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
Mark error, usage and version messages for translation with _.
Avoid splitting up sentences.
* jv-scan.c: Include "intl.h".
(fatal_error, warning): Change parameter s to msgid. Translate
messages.
(main): Call gcc_init_libintl.
(usage, help, version): Mark error, usage and version messages for
translation with _. Avoid splitting up sentences.
* jvgenmain.c: Include "intl.h".
(main): Call gcc_init_libintl.
(usage, main): Mark error messages for translation with _.
* Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
JVGENMAIN_OBJS): Add intl.o.
(java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
java/jvgenmain.o): Update dependencies.
2004-02-08 Per Bothner <per@bothner.com>
* parse.y (resolve_qualified_expression_name): In case of inaccessible
class don't use not_accessible_field_error, which can get confused.
2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
Make-lang.in (po-generated): Delete.
2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
* Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
Depend on target.h.
* decl.c: Include target.h.
(start_java_method): Replace PROMOTE_PROTOTYPES with
targetm.calls.promote_prototypes.
* expr.c: Include target.h.
(pop_arguments): Replace PROMOTE_PROTOTYPES with
targetm.calls.promote_prototypes.
* parse.y: Include target.h.
(start_complete_expand_method): Replace PROMOTE_PROTOTYPES
with targetm.calls.promote_prototypes.
2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
* typeck.c: Update copyright.
2004-02-02 Tom Tromey <tromey@redhat.com>
* decl.c (java_init_decl_processing): Remove duplicate
gnu/gcj/RawData.
2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
* expr.c (build_field_ref): Move variable
definition up.
2004-01-28 Andrew Haley <aph@redhat.com>
* expr.c (build_field_ref): Widen field offset.
2004-01-27 Andrew Haley <aph@redhat.com>
java/13273
* parse.y (check_interface_throws_clauses): Make sure class_decl
has been loaded.
2004-01-22 Jeff Sturm <jsturm@one-point.com>
PR java/13733
* parse.y (patch_assignment): Don't modify lhs_type for
reference assignments.
2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in: Replace $(docdir) with doc.
(java.info, java.srcinfo, java.man, java.srcman): New rules.
(java.install-man): Revamp rule.
2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
instead of deferred backquote.
2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
* typeck.c (find_method_in_interfaces): Move variable
definition up.
2004-01-16 Andrew Haley <aph@redhat.com>
PR java/13273:
* typeck.c (shallow_find_method): New.
(find_method_in_superclasses): New.
(find_method_in_interfaces): New.
(lookup_do): Rewrite.
* java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
* jcf-parse.c (read_class): Save and restore output_class.
* decl.c (java_expand_body): Set output_class from fndecl.
2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
* class.c (gen_indirect_dispatch_tables): Fix string length
calculations.
2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
(java.srcextra): Copy above back to source directory if requested.
(po-generated): Delete reference to $(parsedir).
(java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
Use implicit rule.
2004-01-14 Jan Hubicka <jh@suse.cz>
* lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
estimation.
2004-01-09 Mark Mitchell <mark@codesourcery.com>
* java-tree.h (java_expand_expr): Change prototype.
* expr.c (java_expand_expr): Add alt_rtl parameter.
2004-01-09 Andrew Haley <aph@redhat.com>
PR java/12755:
* parse.y (java_fix_constructors): Set output_class.
(java_reorder_fields): Likewise.
(java_layout_classes): Likewise.
(java_expand_classes): Generate indirect dispatch tables.
(java_expand_classes): Set output_class.
(java_finish_classes): Likewise.
* lang.c (java_init): Turn on always_initialize_class_p if we're
using indirect dis[atch.
(java_decl_ok_for_sibcall): Use output_class, not current_class.
(java_get_callee_fndecl): Use class local atable.
* jcf-parse.c
(always_initialize_class_p): Decl moved to java-tree.h.
(HANDLE_CLASS_INFO): Set output_class.
(read_class): Likewise.
(parse_class_file): Call gen_indirect_dispatch_tables.
(parse_zip_file_entries): Set output_class.
(java_parse_file): Set output_class. Don't emit symbol tables.
* java-tree.h (output_class): New.
Remove global declarations for otable, atable, and ctable.
(always_initialize_class_p): moved here from decl.c.
(DECL_OWNER): New.
(TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
(struct lang_type): Add otable_methods, otable_decl,
otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
ctable_decl, catch_classes, type_to_runtime_map.
* expr.c (build_field_ref): Make otable, atable, and ctable class
local rather than global.
(build_known_method_ref): Likewise.
(build_invokeinterface): Likewise.
(java_expand_expr): Pass runtime type (rather than actual type) to
expand_start_catch.
* except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
this class. Look up each class in that map to delete duplicates.
(expand_end_java_handler): Pass runtime type (rather than actual
type) to expand_start_catch.
* decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
(do_nothing): New.
(java_init_decl_processing): Rearrange things. Remove global
declarations of otable, atable, and ctable.
(java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
(java_expand_body): Set output_class.
* constants.c (build_constant_data_ref): Use output_class, not
current_class.
(alloc_name_constant): Likewise.
* class.c (gen_indirect_dispatch_tables): New.
(build_class_ref): Generate hard reference to superclass, even if
using indirect dispatch.
(build_static_field_ref): Use class local atable.
(make_class_data): Generate hard reference to superclass, even if
using indirect dispatch.
Generate symbolic references to interfaces when using indirect
dispatch.
(make_class_data): Emit otable, atable, and ctable.
Make otable, atable, and ctable class local rather than global.
(emit_catch_table): Make otable, atable, and ctable class local
rather than global.
2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
* parse.y (catch_clause_parameter): Fix typo.
PR java/13404
* parse.y: (catch_clause_parameter): Return early if $3, aka
formal_parameter, is null.
2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
* class.c: Remove uses of "register" specifier in
declarations of arguments and local variables.
* decl.c: Likewise.
* expr.c: Likewise.
* gjavah.c: Likewise.
* jcf-dump.c: Likewise.
* jcf-io.c: Likewise.
* jcf-parse.c: Likewise.
* jcf-write.c: Likewise.
* keyword.h: Likewise.
* parse.y: Likewise.
* typeck.c: Likewise.
* verify.c: Likewise.
2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in (GCJ_CROSS_NAME): Delete.
(java.install_common, java.install-man): Adjust for above.
(java.uninstall): Likewise.
2003-12-03 Michael Koch <konqueror@gmx.de>
* class.c (make_class_data):
Push field value to 'hack_signers' instead of 'signers'.
* decl.c (java_init_decl_processing):
Push field 'hack_signers' instead of 'signers'.
2003-12-03 Zack Weinberg <zack@codesourcery.com>
* lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
including iconv.h.
2003-12-03 Ralph Loader <rcl@ihug.co.nz>
PR java/12374:
* parse.y (qualify_ambiguous_name): Remove lots of broken
field access processing - there's no need to do that here,
because we have resolve_field_access. Remove
RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
* java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
used.
2003-12-01 Jeff Sturm <jsturm@one-point.com>
Fix PR java/13237
* parse.y (java_complete_lhs): Save location prior to patching
CALL_EXPR.
2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
PR java/12548
* resource.c (write_resource_constructor): Append
"_resource" to constructor identifier name.
2003-11-25 Jeff Sturm <jsturm@one-point.com>
Fix PR java/13183.
* constants.c (cpool_for_class): New function.
(outgoing_cpool): Remove global variable.
(alloc_name_constant): Use cpool_for_class.
(build_constants_constructor): Likewise.
* decl.c (java_expand_body): Set current_class.
* java-tree.h (outgoing_cpool) Remove declaration.
(init_outgoing_cpool): Likewise.
* jcf-parse.c (init_outgoing_cpool): Remove function.
(parse_class_file): Don't call init_outgoing_cpool.
* parse.y (java_complete_expand_methods): Don't call
init_outgoing_cpool. Don't save outgoing_cpool.
(java_expand_classes): Don't restore outgoing_cpool.
(java_finish_classes): Likewise.
2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
* Make-lang.in: (java.install-common) Add
symlink for $(target_noncanonical)-gcjh for
native builds.
2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
* Make-lang.in (java.extraclean): Delete.
2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
* Make-lang.in (check-java): Add.
2003-11-19 Jeff Sturm <jsturm@one-point.com>
Fix PR java/13024.
* except.c (prepare_eh_table_type): Allocate variable-sized
buffer `buf' with alloca.
2003-11-17 Jeff Sturm <jsturm@one-point.com>
Fix PR java/12857.
decl.c (java_init_decl_processing): Don't initialize
class_not_found_type_node, no_class_def_found_type_node.
java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
(class_not_found_type_node, no_class_def_found_type_node):
Don't define.
parse.y (build_dot_class_method_invocation): Add this_class
argument. Qualify method invocations to a different class.
(create_new_parser_context): Initialize saved_data_ctx to 0.
(java_parser_context_save_global): Initialize saved_data_ctx to 1.
(build_dot_class_method): Don't load classes. Register
incomplete types.
(build_incomplete_class_ref): Special cases for interfaces
and inner classes. Move build_dot_class_method call to here...
(patch_incomplete_class_ref): ...from here. Pass current_class
to build_dot_class_method_invocation.
(build_assertion): Pass class_type to
build_dot_class_method_invocation.
(encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
2003-11-17 Jeff Sturm <jsturm@one-point.com>
Fix PR java/12739.
* java-tree.h (BLOCK_EMPTY_P): Define.
* parse.y (java_complete_lhs): Check for empty blocks
in TRY_FINALLY_EXPR case.
2003-11-17 Andrew Haley <aph@redhat.com>
* java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
(struct lang_decl_var:freed): New variable.
* decl.c (poplevel): Mark local vars that have gone out of scope.
(push_jvm_slot): Don't use the RTL of a var that has gone out of
scope.
2003-11-16 Jason Merrill <jason@redhat.com>
* Make-lang.in (java.tags): Create TAGS.sub files in each directory
and TAGS files that include them for each front end.
2003-11-15 Tom Tromey <tromey@redhat.com>
* gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
2003-11-12 Jason Merrill <jason@redhat.com>
PR optimization/12547
* lang.c (java_tree_inlining_walk_subtrees): Just walk
BLOCK_EXPR_BODY directly.
2003-11-12 Andrew Haley <aph@redhat.com>
PR java/11045
* parse.y (fold_constant_for_init): Check that we really do have a
constant.
PR java/11533
* lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
init_test_decls being inlined.
PR java/12890:
* parse.y (do_resolve_class): Check return value from
breakdown_qualified().
2003-11-11 Tom Tromey <tromey@redhat.com>
PR java/12915:
* parse.y (merge_string_cste): Handle case where we have a
pointer that happens to be zero, not null_pointer_node.
2003-11-10 Tom Tromey <tromey@redhat.com>
* jcf-parse.c (classify_zip_file): Correctly compare
filename_length against length of manifest file's name.
2003-11-08 Tom Tromey <tromey@redhat.com>
PR java/12894:
* jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
2003-11-06 Andrew Haley <aph@redhat.com>
* expr.c (java_stack_swap): Make sure destination stack slots are
of the correct type.
2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in (dvi): Move targets to $(docobjdir).
(gcj.dvi): Simplify rule and adjust target.
(gcj.info): Simplify rule.
(gcj.pod): New intermediate rule.
(gcjh.pod): Likewise.
(jv-scan.pod): Likewise.
(jcf-dump.pod): Likewise.
(gij.pod): Likewise.
(jv-convert.pod): Likewise.
(rmic.pod): Likewise.
(rmiregistry.pod): Likewise.
(gcj.1): Delete.
(gcjh.1): Delete.
(jv-scan.1): Delete.
(jcf-dump.1): Delete.
(gij.1): Delete.
(jv-convert.1): Delete.
(rmic.1): Delete.
(rmiregistry.1): Delete.
2003-11-02 Jeff Sturm <jsturm@one-point.com>
Fixes PR java/12866.
* parse.y (resolve_qualified_expression_name): Move test
for outer field access methods from here...
(check_thrown_exceptions) ...to here.
2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
* .cvsignore: Delete.
2003-10-28 Frank Ch. Eigler <fche@redhat.com>
* verify.c (verify_jvm_instructions): Don't warn about legal
eh binding regions generated for example by jdk 1.4.1.
2003-10-24 David S. Miller <davem@redhat.com>
* jcf-parse.c (jcf_parse): Fix args to fatal_error().
2003-10-22 Andrew Haley <aph@redhat.com>
* lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
(java_get_callee_fndecl): New.
* jcf-parse.c (java_parse_file): Call emit_catch_table().
* java-tree.h (ctable_decl): New.
(catch_classes): New.
(java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
* decl.c (java_init_decl_processing): Add catch_class_type.
Add ctable_decl.
Add catch_classes field.
* class.c (build_indirect_class_ref): Break out from
build_class_ref.
(make_field_value): Check flag_indirect_dispatch.
(make_class_data): Ditto.
Tidy uses of PUSH_FIELD_VALUE.
Add field catch_classes.
(make_catch_class_record): New.
* java-tree.h (PUSH_FIELD_VALUE): Tidy.
2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
* jcf-write.c: Follow spelling conventions.
* parse.y: Likewise.
2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog: Fix typos.
* expr.c: Fix comment typos.
* jcf-write.c: Likewise.
* lang.c: Likewise.
* lex.c: Likewise.
* mangle.c: Likewise.
* parse-scan.y: Likewise.
* parse.y: Likewise.
2003-10-22 Tom Tromey <tromey@redhat.com>
* expr.c (expand_byte_code): Only warn about dead bytecode when
extra_warnings is set.
2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
Fix for PR java/12586.
* mangle.c (find_compression_record_match): Don't iterate through
package namespace elements unless they all match compression_table
entries.
2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
* Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
(generate-manpages): Likewise.
(java.maintainer-clean): Likewise.
(gcj.info): Likewise.
(gcj.1): Likewise.
(gcjh.1): Likewise.
(jv-scan.1): Likewise.
(jcf-dump.1): Likewise.
(gij.1): Likewise.
(jv-convert.1): Likewise.
(rmic.1): Likewise.
(rmiregistry.1): Likewise.
(java.install-man): Likewise.
(parse-scan.o): Move and define complete compile line.
(parse.o): Likewise.
(jcf-tree-inline.o): Move.
2003-10-20 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (info): Update dependencies.
(java.install-info): Remove.
($(srcdir)/java/gcj.info): Replace with ...
($(docobjdir)/gcj.info): ... this.
2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
* Make-lang.in: Replace uses of $(target_alias) with
$(target_noncanonical).
2003-10-09 Tom Tromey <tromey@redhat.com>
* decl.c (java_init_decl_processing): Declare signers field.
* class.c (make_class_data): Set signers field.
2003-10-09 Jason Merrill <jason@redhat.com>
* parse.y (patch_assignment): Use make_node to create a BLOCK.
* parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
POINTER_TYPE.
2003-10-06 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (java.info): Replace with ...
(info): ... this.
(java.dvi): Replace with ...
(dvi): ... this.
(java.generated-manpages): Replace with ...
2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
* builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
2003-10-01 Andrew Haley <aph@redhat.com>
* jcf-parse.c (java_parse_file): Write otable and atable.
* java-tree.h (atable_methods): New.
(atable_decl): New.
(atable_syms_decl): New.
(enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
(symbol_*type): Rename method_symbol* to symbol*type.
(emit_offset_symbol_table): Delete.
(emit_symbol_table): New.
(get_symbol_table_index): New.
(atable_type): New.
* expr.c (build_field_ref): Handle flag_indirect_dispatch.
(build_known_method_ref): Likewise.
(get_symbol_table_index): Rename from get_offset_table_index.
Parameterize to allow re-use by differing types of symbol table.
(build_invokevirtual): Pass table to get_offset_table_index.
* decl.c (java_init_decl_processing): Push types and decls for
atable and atable_syyms.
* class.c (build_static_field_ref): Handle flag_indirect_dispatch.
(make_class_data): Add new fields atable and atable_syms.
(emit_symbol_table): Rename from emit_offset_symbol_table.
Parameterize to allow re-use by different types of symbol table.
(build_symbol_entry): Renamed from build_method_symbols_entry.
2003-09-30 Roger Sayle <roger@eyesopen.com>
* jcf-write.c (generate_bytecode_insns): Implement evaluate-once
semantics for SAVE_EXPR, by caching the result in a temporary.
2003-09-28 Richard Henderson <rth@redhat.com>
* check-init.c (check_init): Save and restore input_location
instead of file and line separately.
* decl.c (java_expand_body): Likewise.
* jcf-write.c (generate_bytecode_insns): Likewise.
* parse.y (safe_layout_class): Likewise.
* jcf-parse.c (read_class, parse_class_file): Likewise.
(java_parse_file): Use %H for warning locator.
2003-09-28 Roger Sayle <roger@eyesopen.com>
* expr.c (java_check_reference): Use the semantics of COND_EXPRs
with void-type branches instead of using a COMPOUND_EXPR.
2003-09-28 Jeff Sturm <jsturm@one-point.com>
* decl.c (java_optimize_inline, dump_function): Remove.
* java-tree.h (java_optimize_inline): Remove declaration.
* jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
* parse.y (source_end_java_method, java_expand_classes):
Likewise. Remove dead code.
2003-09-27 Roger Sayle <roger@eyesopen.com>
* lang.c (java_init_options): Set flag_evaluation_order.
* expr.c (force_evaluation_order): Don't attempt to force
evaluation order of binary operations using save_expr.
* parse.y (java_complete_lhs): No longer need to call
force_evaluation_order when constructing binary operators.
2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
Bryce McKinlay <bryce@mckinlay.net.nz>
PR java/1333:
* parse.y (not_accessible_field_error): New function.
(resolve_expression_name): Check field access permissions.
(resolve_qualified_expression_name): Use
not_accessible_field_error.
(resolve_qualified_expression_name): Likewise.
2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
2003-09-23 Roger Sayle <roger@eyesopen.com>
* jcf-write.c (generate_bytecode_insns): Optimize binary operations
with equal operands without side-effects.
2003-09-22 Jeff Sturm <jsturm@one-point.com>
* decl.c (java_init_decl_processing): Don't emit otable decls
if flag_indirect_dispatch is not set.
2003-09-21 Richard Henderson <rth@redhat.com>
* class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
resource.c: Revert.
2003-09-21 Richard Henderson <rth@redhat.com>
* class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
2003-09-20 Richard Henderson <rth@redhat.com>
* check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
2003-09-18 Roger Sayle <roger@eyesopen.com>
* expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
* check-init.c (check_init): Likewise.
2003-09-18 Roger Sayle <roger@eyesopen.com>
* jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
2003-09-16 Andrew Haley <aph@redhat.com>
* jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
Fixes PR java/9577
* mangle.c (find_compression_record_match): Skip
over a "6JArray" (the array template mangled string)
IDENTIFIER_NODE.
(mangle_array_type): Correct minor typo.
(atms): Move definition to the beginning.
2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
* class.c (add_miranda_methods): Ensure super-interfaces are laid
out. Fix for PR java/12254.
2003-09-11 Richard Henderson <rth@redhat.com>
* parse.y (source_end_java_method): Update for new
cgraph_finalize_function argument.
2003-09-09 Richard Henderson <rth@redhat.com>
* parse.y (source_end_java_method): Update call to
cgraph_finalize_function.
2003-09-03 Jeff Sturm <jsturm@one-point.com>
* decl.c (java_expand_body): New function.
* expr.c (build_class_init): Set DECL_IGNORED_P.
* java-tree.h (start_complete_expand_method,
java_expand_body): Declare.
* jcf-parse.c (cgraph.h): Include.
(java_parse_file): Handle flag_unit_at_a_time.
* lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
(java_estimate_num_insns): Use walk_tree_without_duplicates.
(java_start_inlining): New function.
* parse.h (java_finish_classes): Declare.
* parse.y: Include cgraph.h.
(block): Don't special-case empty block production.
(craft_constructor): Set DECL_INLINE.
(source_end_java_method): Handle flag_unit_at_a_time.
Replace inline code with call to java_expand_body.
(start_complete_expand_method): Remove static modifier.
(java_expand_method_bodies): Patch function tree for
class initialization and/or synchronization as needed.
Don't begin RTL expansion yet.
(java_expand_classes): Check flag_unit_at_a_time before
calling finish_class.
(java_finish_classes): New function.
(java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
(patch_assignment): Set DECL_CONTEXT on temporary variable.
(emit_test_initialization): Set DECL_IGNORED_P.
2003-09-03 Roger Sayle <roger@eyesopen.com>
* builtins.c (enum builtin_type): Delete unused enumeration.
* Make-lang.in (java/builtins.o): Remove built-types.def dependency.
2003-08-28 Tom Tromey <tromey@redhat.com>
* gcj.texi (Extensions): Document gcjlib URLs.
2003-08-20 Tom Tromey <tromey@redhat.com>
* gcj.texi (Extensions): Added xref.
(libgcj Runtime Properties): Document
gnu.gcj.runtime.VMClassLoader.library_control.
2003-08-20 Andrew Haley <aph@redhat.com>
* except.c (prepare_eh_table_type): Use new encoding for exception
handlers when using -fno-assume-compiled.
2003-08-13 Tom Tromey <tromey@redhat.com>
* gcj.texi (Invoking gij): Document -X and -?.
2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
* Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
GCJH_OBJS, JCFDUMP_OBJS
* win32-host.c: Removed the unnecessary and broken dependency
on jcf.h
2003-08-11 Tom Tromey <tromey@redhat.com>
* parse.y (java_check_regular_methods): Typo fixes. Call
check_interface_throws_clauses. Use
check_concrete_throws_clauses.
(check_interface_throws_clauses): New function.
(check_concrete_throws_clauses): New function.
(hack_is_accessible_p): New function.
(find_most_specific_methods_list): Added FIXME.
* typeck.c (lookup_do): Use `flags' argument to decide what to
do. Reimplemented.
(lookup_argument_method_generic): New function.
(lookup_argument_method2): Removed.
* jcf.h (ACC_INVISIBLE): New define.
* jcf-write.c (generate_classfile): Skip invisible methods.
* class.c (add_miranda_methods): New function.
(layout_class_methods): Use it.
(get_access_flags_from_decl): Use ACC_INVISIBLE.
* java-tree.h (METHOD_INVISIBLE): New define.
(lang_decl_func) [invisible]: New field.
(lookup_argument_method_generic): Declare.
(SEARCH_INTERFACE): New define.
(SEARCH_SUPER): Likewise.
(SEARCH_ONLY_INTERFACE): Likewise.
(SEARCH_VISIBLE): Likewise.
(lookup_argument_method2): Removed declaration.
2003-08-05 Tom Tromey <tromey@redhat.com>
Fix for PR java/11600:
* parse.y (java_complete_lhs): See whether we're calling a method
on an array.
(check_thrown_exceptions): Added `is_array_call' argument;
fixed `clone' checking; updated all callers.
2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
* java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
2003-08-03 Tom Tromey <tromey@redhat.com>
* java-tree.h (METHOD_TRANSIENT): Removed.
* decl.c (pushdecl): Removed some dead code.
* class.c (get_access_flags_from_decl): Can't have transient
method.
(add_method_1): Can't have a transient method.
2003-07-28 Andreas Jaeger <aj@suse.de>
* jvspec.c: Convert to ISO C90 prototypes.
2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (force_poplevels): Fix warning call.
2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
* expr.c (expand_java_field_op): Don't use xxx_with_decl
(expand_java_field_op): Likewise.
* class.c (layout_class_method): Likewise
(emit_register_classes): Likewise.
* decl.c (pushdecl): Likewise.
(poplevel): Likewise.
(force_poplevels): Likewise.
(give_name_to_locals): Likewise.
* check-init.c (check_for_initialization): Likewise.
2003-07-24 Jason Merrill <jason@redhat.com>
* java-tree.h: Move boolean_type_node et al to the back end.
2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
casts.
2003-07-19 Neil Booth <neil@daikokuya.co.uk>
* lang.opt: Don't show -MD_ and -MDD_.
2003-07-18 Neil Booth <neil@daikokuya.co.uk>
* lang-options.h: Remove.
* lang.opt: Add help text.
2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
* expr.c: Remove the last argument to expand_assignment().
2003-07-09 Jan Hubicka <jh@suse.cz>
* java-tree.h (DECL_NUM_STMTS): Rename to...
(DECL_ESTIMATED_INSNS): ... this.
* lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
New static functions.
(LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
* parser.y (add_stmt_to_compound): Do not account statements.
2003-07-08 Mark Wielaard <mark@klomp.org>
* gcj.texi: CNI now expands to Compiled Native Interface.
2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
* expr.c (expand_byte_code): Adjist emit_line_note call.
2003-07-06 Neil Booth <neil@daikokuya.co.uk>
* lang.c (java_handle_option): Don't handle filenames.
2003-07-02 Zack Weinberg <zack@codesourcery.com>
* jcf-path.c: Don't default-define PATH_SEPARATOR nor
DIR_SEPARATOR.
Use FILENAME_CMP.
* jcf-write.c: Don't default-define DIR_SEPARATOR.
* jcf.h: Delete COMPARE_FILENAMES definition.
2003-07-02 Neil Booth <neil@daikokuya.co.uk>
* lang.c (java_init_options): Update prototype.
2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (poplevel): Adjust define_label call.
2003-06-27 Zack Weinberg <zack@codesourcery.com>
* gjavah.c (flag_jni): Make non-static.
* parse-scan.y (ctxp): Make non-static.
* class.c (build_method_symbols_entry)
* expr.c (get_offset_table_index)
* jcf-parse.c (jcf_parse):
Mark the definition static, matching the forward declaration.
2003-06-26 Neil Booth <neil@daikokuya.co.uk>
* lang.c (java_handle_option): Don't check for missing arguments.
2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
* class.c (push_class): Use a location_t to save place.
(emit_register_classes): Set input_location. Adjust
expand_function_end call.
* resource.c (write_resource_constructor): Likewise.
* decl.c (end_java_method): Adjust expand_function_end call.
* parse.y (source_end_java_method): Likewise.
2003-06-17 Robert Abeles <rabeles@archaelogic.com>
* lang.c (java_handle_option): Likewise.
2003-06-16 Neil Booth <neil@daikokuya.co.uk>
* lang.c (java_handle_option): Special-casing of optional
joined arguments no longer needed.
* lang.opt: Update switches that take optional argument.
2003-06-15 Neil Booth <neil@daikokuya.co.uk>
* lang.opt: Declare Java.
* lang.c (java_init_options): Update.
2003-06-15 Neil Booth <neil@daikokuya.co.uk>
* lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
2003-06-14 Neil Booth <neil@daikokuya.co.uk>
* lang-specs.h: Rewrite -MD and -MMD to append an underscore.
* lang.c (java_handle_option): -MD and -MMD have an underscore.
* lang.opt: -MD and -MMD have an underscore.
2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
* class.c (emit_register_classes): Adjust init_function_start
call.
* decl.c (complete_start_java_method): Likewise.
* resource.c (write_resource_constructor): Likewise.
2003-06-14 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update to use options.c and options.h.
* lang.c: Include options.h not j-options.h.
(java_handle_option): Abort on unrecognized option.
(java_init_options): Request Java switches.
2003-06-11 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Handle mostlyclean.
2003-06-11 Tom Tromey <tromey@redhat.com>
* lang.c (java_handle_option): Update dependency_tracking for
OPT_MF case.
* lang.c (java_handle_option): OPT_fbootclasspath_ can take an
empty argument.
2003-06-10 Andrew Haley <aph@redhat.com>
* resource.c (write_resource_constructor): Use expand_expr to
generate the address of the label attached to a resource.
* Make-lang.in (java/resource.o): Add expr.h
2003-06-10 Andrew Haley <aph@redhat.com>
* lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
(java_decl_ok_for_sibcall): New.
2003-06-09 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in (JAVA_OBJS, java/lang.o): Update.
(java/j-options.c, java/j-options.h): New.
* java-tree.h (resource_name, compile_resource_file,
compile_resource_data): Constify.
* jcf-write.c (jcf_write_base_directory): Similarly.
* jcf.h (jcf_write_base_directory): Similarly.
* lang.c: Include j-options.h.
(cl_options_count, cl_options, string_option, java_decode_option,
lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
process_option_with_no): Remove.
(resource_name): Constify.
(LANG_HOOKS_HANDLE_OPTION): Override.
(java_handle_option): New.
(java_init): Don't call jcf_path_init.
(java_init_options): Call jcf_path_init.
* lang.opt: New.
* resource.c (compile_resource_data, compile_resource_file): Constify.
2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
* java-tree.h (DECL_FUNCTION_LAST_LINE): New.
(struct lang_decl_func): Add last_line field.
* parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
DECL_SOURCE_LINE_LAST): Remove.
* parse.y (missing_return_error, finish_method_declaration,
lookup_cl, start_artificial_method_body, source_end_java_method,
start_complete_expand_method): Adjust.
2003-06-08 Tom Tromey <tromey@redhat.com>
* jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
fno-assume-compiled.
2003-06-08 Roger Sayle <roger@eyesopen.com>
* builtins.c (define_builtin_type, builtin_types): Delete.
(define_builtin): Rewritten to take just the built-in code,
the function's name, type and fallback library function name.
All built-ins used by Java are implicit and BUILT_IN_NORMAL.
(initialize_builtins): Overhaul to define the GCC builtins
used by gcj manually, providing the Java run-time's
implementations as the fallback library function.
2003-06-08 Anthony Green <green@redhat.com>
* parse.y (patch_cast): Fix conversions from floating-point to
integral types.
2003-06-08 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in: Update.
* lang.c: Include opts.h. Define cl_options_count and cl_options.
2003-06-07 Neil Booth <neil@daikokuya.co.uk>
* lang.c (java_init_options): Update.
2003-06-05 Jan Hubicka <jh@suse.cz>
* Make-lang.in: Add support for stageprofile and stagefeedback
2003-05-31 Roger Sayle <roger@eyesopen.com>
* lang.c (java_init_options): Prescribe wrap-around two's
complement arithmetic overflow by setting flag_wrapv.
2003-05-29 Roger Sayle <roger@eyesopen.com>
* builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
(builtin_record): Add an additional builtin_code field to
record which GCC built-in corresponds to the Java function.
(java_builtins): Add new entries for atan, atan2, exp, log,
pow and tan.
(max_builtin, min_builtin, abs_builtin): Perform constant
folding on the resulting tree.
(java_build_function_call_expr): Likewise, perform constant
folding on the resulting tree.
(initialize_builtins): The NULL creators are now allowed in
the java_builtins table, which is now terminated by an entry
with builtin_code == END_BUILTINS.
(check_for_builtin): Likewise. If the matching creator is
NULL, construct the call using java_build_function_call_expr
directly with the decl for the corresponding builtin_code.
2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
* win32-host.c: Normalize copyright boilerplate.
2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* parse.y (print_int_node): Use string concatentation on
HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
function calls into one.
2003-05-13 Zack Weinberg <zack@codesourcery.com>
* jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
fatal_io_error with calls to fatal_error; add ": %m" to the end of
all the affected error messages.
2003-05-13 Richard Henderson <rth@redhat.com>
* class.c (layout_class_method): Set DECL_EXTERNAL.
* decl.c (java_mark_decl_local, java_mark_class_local): New.
* java-tree.h (java_mark_class_local): Declare.
* jcf-parse.c (parse_class_file): Use it.
* parse.y (java_expand_classes): Likewise.
2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
* Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
* lex.h: #include input.h.
* jv-scan.c (input_filename): Remove.
2003-05-02 Tom Tromey <tromey@redhat.com>
PR java/10491:
* gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
(handle_inner_classes): New function.
2003-05-01 Tom Tromey <tromey@redhat.com>
PR java/10459:
* parse.y (finish_for_loop): Do nothing if update expression is a
EXPR_WFL_NODE wrapping nothing.
(java_complete_lhs) <COMPOUND_EXPR>: Likewise.
2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
* lex.h (input_lineno): Remove declaration.
* parse-scan.y: #include input.h.
(input_filename): Remove declaration.
(input_location): Add definition.
(input_line): Remove definition.
2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
* lex.h (lineno): Rename to ...
(input_line): ... here
* parse-scan.y (lineno): Rename to ...
(input_line): ... here.
(reset_report): Rename lineno to input_line.
* check-init.c (check_init): Likewise.
* class.c (push_class): Likewise.
* decl.c (complete_start_java_method, end_java_method): Likewise.
* expr.c (expand_byte_code): Likewise.
* jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
* jcf-write.c (generate_bytecode_insns): Likewise.
* lex.c (java_init_lex, java_allocate_new_line,
do_java_lex): Likewise.
* parse.h (YYNOT_TWICE): Likewise.
* parse.y (empty_statement, expression_statement,
java_pop_parser_context, java_parser_context_save_global,
yyerror, register_fields, method_header, safe_layout_class,
find_in_imports_on_demand, create_artificial_method,
source_end_java_method, start_complete_expand_method,
build_thisn_assign, java_complete_lhs,
maybe_absorb_scoping_block): Likewise.
2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
* jcf-io.c (find_class): use DIR_SEPARATOR instead of
'/' when computing java source filename
2003-04-13 Tom Tromey <tromey@redhat.com>
* gjavah.c (print_c_decl): Indentation fix.
2003-04-12 Zack Weinberg <zack@codesourcery.com>
* class.c (make_field_value, make_method_value, get_dispatch_table)
(make_class_data, emit_offset_symbol_table)
* constants.c (build_constants_constructor)
* java-tree.h (START_RECORD_CONSTRUCTOR)
* parse.y (maybe_build_array_element_wfl):
Use build_constructor.
2003-04-10 Eric Blake <ebb9@email.byu.edu>
PR java/10253:
* parse.y (string_convert_int_cst): Always use at least one digit
in string conversion. Remove ASCII dependence.
(merge_string_cste): Fix merging of 3-byte UTF-8 characters.
2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
* Make-lang.in: added win32-host.c
* jcf.h: defined macro JCF_OPEN_EXACT_CASE which
resolves to open() on non-Win32 platforms and
Win32-specific jcf_open_exact_case() on Win32
* jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
when trying .java and .class files
* win32-host.c: added to repository. Defines
Win32-specific jcf_open_exact_case()
2003-04-10 Andrew Haley <aph@redhat.com>
* jcf-write.c (struct jcf_partial): num_jsrs: new field.
(maybe_free_localvar): Renamed from localvar_free.
Add new arg, really.
(generate_bytecode_insns): Set new variable, jsrs.
Only free local vars if no jsr insns have been emittted.
Call maybe_free_localvar, not localvar_free.
2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
* gcj.texi: Remove @ at start of file.
2003-03-25 Tom Tromey <tromey@redhat.com>
* parse.y (create_interface): Call CHECK_DEPRECATED.
2003-03-23 Zack Weinberg <zack@codesourcery.com>
* Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
2003-03-21 Zack Weinberg <zack@codesourcery.com>
* javaop.h (jfloat, jdouble): Make them structures mirroring
the bit fields of IEEE float and double respectively.
(JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
(union Word, union DWord): Delete.
(WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
* gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
D_NAN_MASK): Delete.
(jni_print_float, jni_print_double): New. Generate
hexadecimal floating constants.
(print_field_info): Use jni_print_float/double.
* jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
finite floating point numbers for output; special case
non-finite floats.
2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
* lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
Replace 0 and 1 with true and false in return statements.
2003-03-19 Tom Tromey <tromey@redhat.com>
* lex.c (do_java_lex): Renamed from java_lex.
(java_lex): New function.
Include timevar.h.
2003-03-13 Tom Tromey <tromey@redhat.com>
* parse.y (resolve_inner_class): Error if qualifier is a primitive
type.
2003-03-04 Andrew Haley <aph@redhat.com>
* gjavah.c (is_first_data_member): New global variable.
(print_c_decl): If it's the first data member, align it as the
superclass.
(process_file): Set is_first_data_member.
2003-03-11 Tom Tromey <tromey@redhat.com>
* parse.y (resolve_field_access): Initialize class if field is
found in another static field.
* expr.c (build_class_init): Don't optimize out initialization of
implemented interface.
2003-03-11 Andrew Haley <aph@redhat.com>
* jcf-io.c (caching_stat): Initialize origsep to remove compiler
warning.
2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
* jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
and DIR_SEPARATOR_2 for a target.
Correct minor typos.
* jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
and DIR_SEPARATOR_2 for a target into account.
2003-03-08 Neil Booth <neil@daikokuya.co.uk>
* lang.c (java_init): Update prototype, move code to java_post_options.
(java_post_options): Similarly.
2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
* jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
compare file name components depending on the case-sensitivity
or otherwise of the host file system.
* jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
"strcmp" to compare file name components.
Use IS_DIR_SEPARATOR instead of comparing directly against
DIR_SEPARATOR.
(jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
comparing directly against DIR_SEPARATOR.
2003-03-04 Tom Tromey <tromey@redhat.com>
* Make-lang.in (java.tags): New target.
2003-03-01 Roger Sayle <roger@eyesopen.com>
* java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
(initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
2003-03-01 Tom Tromey <tromey@redhat.com>
* parse.y (jdep_resolve_class): Only check deprecation if we found
a decl.
2003-02-28 Tom Tromey <tromey@redhat.com>
PR java/9695:
* class.c (maybe_layout_super_class): Always pass a WFL to
do_resolve_class.
* parse.y (do_resolve_class): Updated comment to explain
parameters.
2003-02-26 Tom Tromey <tromey@redhat.com>
* jcf-write.c (generate_classfile): Check whether class is
deprecated before writing attribute count.
2003-02-25 Roger Sayle <roger@eyesopen.com>
* java/decl.c (java_init_decl_processing): Get soft_fmod_node from
built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
2003-02-23 Tom Tromey <tromey@redhat.com>
* lang-options.h: Added -Wdeprecated.
* gcj.texi (Warnings): Document -Wdeprecated.
* java-tree.h (flag_deprecated): Declare.
* lang.c (lang_W_options): Added deprecated.
(flag_deprecated): New global.
* chartables.h: Rebuilt.
* gen-table.pl (process_one): Look at whitespace.
(print_tables): Define LETTER_SPACE, LETTER_MASK.
* parse.h (CLEAR_DEPRECATED): New macro.
(CHECK_DEPRECATED_NO_RESET): New macro.
* jcf-parse.c (handle_deprecated): New function.
(HANDLE_DEPRECATED_ATTRIBUTE): New define.
* jcf-reader.c (get_attribute): Handle Deprecated attribute.
* parse.y (resolve_type_during_patch): Check deprecation.
(jdep_resolve_class): Likewise.
(process_imports): Likewise.
(resolve_expression_name): Likewise.
(check_deprecation): Strip arrays from decl. Check
flag_deprecated.
(patch_method_invocation): Also check the particular constructor
for deprecation.
(register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
* jcf-write.c (append_deprecated_attribute): New function.
(generate_classfile): Generate deprecated attribute when
appropriate.
* lex.c (java_parse_doc_section): Return type now void. Rewrote.
(java_lex) [case '*']: Simplify logic.
(java_start_char_p): Use LETTER_MASK.
(java_part_char_p): Likewise.
(java_space_char_p): New function.
2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
Change base class access representation.
* java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
(add_interface_do): Likewise.
2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
* decl.c (java_init_decl_processing): Change
soft_lookupjnimethod_node to reflect the change in
signature of _Jv_LookupJNIMethod in libjava/jni.cc
* expr.c (build_jni_stub): Calculate and pass the size
on the stack of the arguments to a JNI function. Use
new target macro MODIFY_JNI_METHOD_CALL to allow a
target to modify the call to a JNI method.
2003-02-08 Roger Sayle <roger@eyesopen.com>
* jcf-io.c (java_or_class_file): Use libiberty's lbasename
instead of basename to avoid compiler warnings on Tru64.
2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
* gcj.texi: Update to GFDL 1.2.
2003-01-31 Andrew Haley <aph@redhat.com>
* parse.y (java_expand_classes): Scan the whole class list looking
for access methods that haven't yet been expanded.
2003-01-31 Adrian Bunk <bunk@fs.tum.de>
Fix for java/4269:
* jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
to fix bootstrap on sparc-unknown-netbsdelf1.5.
* jcf-parse.c: Likewise.
2003-01-31 Mark Wielaard <mark@klomp.org>
* gjavah.c (throwable_p): Allocate 1 more byte for string.
2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
* class.c (make_class): Use BINFO_ELTS.
(set_super_info): Likewse.
(add_interface_do): Likewise.
2003-01-30 Tom Tromey <tromey@redhat.com>
* jcf-parse.c (read_class): Update identifier's class value if it
changed during parsing.
2003-01-30 Loren James Rittle <ljrittle@acm.org>
* Make-lang.in (po-generated): Find the targets in $(parsedir).
Propagate change to all other rules as required.
(java/parse-scan.o): Add explicit dependency on
$(parsedir)/java/parse-scan.c .
2003-01-29 Tom Tromey <tromey@redhat.com>
* parse.y (patch_assignment): Only transform the rhs of an
assignment when compiling to native.
2003-01-28 Tom Tromey <tromey@redhat.com>
* jcf-write.c (generate_bytecode_conditional): Typo fixes.
2003-01-28 Tom Tromey <tromey@redhat.com>
* lex.c (java_lex): Don't include UEOF as part of token.
(java_read_unicode): Error if \u sequence prematurely terminated.
2003-01-27 Tom Tromey <tromey@redhat.com>
* parse.y (java_check_regular_methods): Check for construct after
checking types in throws clause.
2003-01-24 Tom Tromey <tromey@redhat.com>
* class.c (build_static_field_ref): Only a String or numeric field
can fold to a constant.
2003-01-23 Tom Tromey <tromey@redhat.com>
* jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
file name in resource buffer.
2003-01-23 Tom Tromey <tromey@redhat.com>
* expr.c (build_known_method_ref): Use method's context to find
method table index.
2003-01-23 Tom Tromey <tromey@redhat.com>
* constants.c (set_constant_entry): Allocated cleared memory.
2003-01-22 Tom Tromey <tromey@redhat.com>
* java-tree.h: Don't use PARAMS.
* resource.c: Add prototypes for all functions.
(write_resource_constructor): Use `const char *' to avoid
warning.
2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
* jcf-parse.c (process_zip_dir): Remove unused variable.
2003-01-22 Tom Tromey <tromey@redhat.com>
* expr.c (build_invokeinterface): Abort if method's context is not
an interface.
2003-01-22 Tom Tromey <tromey@redhat.com>
* gcj.texi (Input and output files): Mention non-class entries.
* decl.c (java_init_decl_processing): Call
init_resource_processing.
* java-tree.h (compile_resource_data, write_resource_constructor,
compile_resource_file, init_resource_processing): Declare.
* config-lang.in (gtfiles): Added resource.c.
* Make-lang.in (gt-java-resource.h): New target.
(JAVA_OBJS): Added resource.o.
(java/resource.o): New target.
* resource.c: New file.
* class.c (compile_resource_file): Moved to resource.c.
(registerResource_libfunc): Likewise.
(utf8_decl_list): Mark with GTY; now static.
* jcf-parse.c (classify_zip_file): New function.
(parse_zip_file_entries): Use it; compile .properties files.
(process_zip_dir): Use classify_zip_file and compute_class_name.
Don't write class name into zip directory.
(java_parse_file): Call write_resource_constructor.
(compute_class_name): New function.
* jcf-io.c (read_zip_member): Reindented.
2003-01-21 Tom Tromey <tromey@redhat.com>
* class.c (supers_all_compiled): New function.
(make_class_data): Use it.
2003-01-21 Tom Tromey <tromey@redhat.com>
* parse.y (method_header): Native method can't be strictfp.
No method can be transient or volatile.
2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Make-lang.in (jvspec.o-warn): Add -Wno-error.
2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
* check-init.c: Fix comment typos.
* class.c: Likewise.
* constants.c: Likewise.
* decl.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* java-except.h: Likewise.
* java-tree.h: Likewise.
* javaop.h: Likewise.
* jcf-dump.c: Likewise.
* jcf-io.c: Likewise.
* jcf-parse.c: Likewise.
* jcf-write.c: Likewise.
* lang.c: Likewise.
* mangle.c: Likewise.
* typeck.c: Likewise.
* verify.c: Likewise.
2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
* jcf-write.c: Include "tm_p.h".
2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* builtins.c (java_build_function_call_expr): Renamed from
build_function_call_expr. All callers changed.
* Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
* jcf-parse.c: Include tm_p.h.
* jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
warning.
2003-01-14 Tom Tromey <tromey@redhat.com>
* class.c (make_class_data): Check that super is compiled before
building class reference to it.
2003-01-14 Andrew Haley <aph@redhat.com>
* decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
varargs function -- correct.
2003-01-14 Andrew Haley <aph@redhat.com>
* decl.c (java_init_decl_processing): Temporarily back out previous patch.
2003-01-14 Andrew Haley <aph@redhat.com>
* decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
varargs function -- correct.
* parse.y (patch_assignment): Copy the rhs of an assignment into a
temporary if the RHS is a reference.
2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
* keyword.h: Regenerated.
* All Files: Convert to ISO C style function definitions.
2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
* parse.y (check_pkg_class_access): ANSIfy definition.
2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c, parse-scan.y, parse.y: Don't cast return value of
xmalloc et al.
* class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
2003-01-09 Geoffrey Keating <geoffk@apple.com>
Merge from pch-branch:
2002-12-02 Geoffrey Keating <geoffk@apple.com>
* Make-lang.in (java/gjavah.o): Update dependencies.
* gjavah.c: Include ggc.h.
2002-08-16 Geoffrey Keating <geoffk@redhat.com>
* Make-lang.in (GCJH_OBJS): Add ggc-none.o.
(JCFDUMP_OBJS): Add ggc-none.o.
(java/jcf-dump.o): Depend on GGC_H.
* jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
CPool substructures.
* jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
* jcf-dump.c: Include ggc.h.
2002-08-08 Geoffrey Keating <geoffk@redhat.com>
* jcf.h (union cpool_entry): New.
(struct CPool): Use gengtype to mark. Change field 'data' to be
an array of unions.
(struct JCF): Use gengtype to mark.
(CPOOL_UINT): Update for new cpool_entry type.
(CPOOL_USHORT1): Likewise.
(CPOOL_USHORT2): Likewise.
(CPOOL_FINISH): Use GC to free cpool subfields.
* parse.h (struct parser_ctxt): Mark field current_jcf.
* lex.c (java_init_lex): Use GC to allocate struct JCF.
* jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
(main_jcf): Use gengtype to mark.
(ggc_mark_jcf): Delete.
(get_constant): Update for new cpool_entry type.
(give_name_to_class): Likewise.
(get_class_constant): Likewise.
(init_outgoing_cpool): Use GGC to allocate struct CPool.
(java_parse_file): Use GGC to allocate struct JCF.
(init_jcf_parse): Don't call ggc_add_root.
* jcf-reader.c (jcf_parse_constant_pool): Update for new
cpool_entry type.
* java-tree.h (current_jcf): Use gengtype to mark.
(CPOOL_UTF): Update for new cpool_entry type.
(outgoing_cpool): Use gengtype to mark.
(struct lang_type): GC struct JCF and struct CPool.
* config-lang.in (gtfiles): Add jcf.h.
* constants.c (find_tree_constant): New.
(set_constant_entry): Allocate cpool subfields using GGC. Update
for new cpool_entry type.
(find_constant1): Update for new cpool_entry type.
(find_constant2): Likewise.
(find_utf8_constant): Use find_tree_constant.
(find_class_or_string_constant): Remove unnecessary cast to jword.
Update for new cpool_entry type.
(count_constant_pool_bytes): Update for new cpool_entry type.
(write_constant_pool): Likewise.
(alloc_name_constant): Use find_tree_constant.
(build_constants_constructor): Update for new cpool_entry type.
2002-08-08 Geoffrey Keating <geoffk@redhat.com>
* parse.y (mark_parser_ctxt): Delete.
(goal): Don't use ggc_add_root.
(create_new_parser_context): Use GC to allocate struct parser_ctxt.
(java_pop_parser_context): Let GC free parser_ctxt.
(java_parser_context_resume): Likewise.
* parse.h (struct parser_ctxt): Use gengtype to mark.
(ctxp): Likewise.
(ctxp_for_generation): Likewise.
* lex.h (struct java_lc_s): Mark for gengtype.
(java_lexer): Rearrange for gengtype.
* config-lang.in (gtfiles): Add lex.h, parse.h.
2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* All Files: Remove PARAMS macro.
* expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
`__STDC__' macros.
* jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
VA_CLOSE.
2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
* Make-lang.in (java.install-common, java.uninstall,
java.install-info, java.install-man): Prepend $(DESTDIR)
to destination paths in all (un)installation commands.
(java.install-common): Rewrite $(LN) command to support
DESTDIR with "ln" as well as with "ln -s".
2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
* java-tree.h: Protect against multiple inclusion.
2003-01-07 Tom Tromey <tromey@redhat.com>
* class.c (add_assume_compiled): Don't adjust parent if we're
already at the root of tree.
2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lang.c (dump_compound_expr): Prototype.
2003-01-03 Tom Tromey <tromey@redhat.com>
Fix for PR java/8712:
* expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
when simply checking against `null'.
2003-01-03 Tom Tromey <tromey@redhat.com>
* gcj.texi (Standard Properties): Document http.proxyHost and
http.proxyPort.
* gcj.texi (GNU Classpath Properties): Document new properties.
2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
* java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
java/lang-options.h, java/mangle.c, java/mangle_name.c,
java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
* Make-lang.in, boehm.c, buffer.c,
buffer.h, builtins.c, class.c,
config-lang.in, constants.c,
convert.h, decl.c, except.c,
expr.c, java-except.h,
java-tree.h, javaop.def,
jcf-parse.c, jcf-write.c,
jv-scan.c, jvgenmain.c,
jvspec.c, keyword.gperf,
keyword.h, lang-options.h,
lang-specs.h, lang.c, lex.c,
lex.h, mangle.c, mangle_name.c,
parse-scan.y, parse.h, parse.y,
typeck.c, verify.c, xref.c,
xref.h: Replace "GNU CC" with
"GCC" in the copyright header.
* check-init.c, gjavah.c, javaop.h,
jcf-depend.c, jcf-dump.c, jcf-io.c,
jcf-path.c, jcf-reader.c, jcf.h,
zextract.c, zipfile.h: These files are
"part of GCC". Also say "GCC" not "GNU CC".
2002-12-30 DJ Delorie <dj@redhat.com>
* Make-lang.in: Protect against texi2pod/pod2man failing.
2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
* gcj.texi: Use @copying.
2002-12-27 Mark Mitchell <mark@codesourcery.com>
* gjavah.c (print_name_for_stub_or_jni): Adjust call to
print_cxx_classname.
(print_cxx_classname): Add add_scope parameter.
(print_class_decls): Do not emit a semicolon after the extern
"Java" block.
(process_file): Adjust calls to print_cxx_classname.
2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
* gcj.texi: Include Cover Texts in man page.
2002-12-23 Jeff Sturm <jsturm@one-point.com>
* class.c (build_static_field_ref): Check FIELD_FINAL.
* constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
instead of current_constant_pool_data_ref.
* java-tree.h (current_constant_pool_data_ref): Undefine.
(JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
* jcf-parse.c (init_outgoing_cpool): Don't initialize
current_constant_pool_data_ref.
* except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
not build_internal_class_name.
* parse.y (patch_incomplete_class_ref): Always emit `class$' method.
Use it when class ref isn't certain to be compiled.
2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
* gcj.texi: Include gcc-common.texi.
* Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
$(srcdir)/doc/include/gcc-common.texi.
2002-12-22 Anthony Green <green@redhat.com>
* gcj.texi (Limitations): Add note about org.xml.sax and
org.w3c.dom.
2002-12-20 Tom Tromey <tromey@redhat.com>
* jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
where minimum case value is Integer.MIN_VALUE.
Fixes PR java/8955.
2002-12-18 Andrew Haley <aph@redhat.com>
* parse.y (patch_invoke): Force evaluation order when `check' is
set. For PR libgcj/8945.
2002-12-16 Mark Mitchell <mark@codesourcery.com>
* gcj.texi: Change version number to 3.4.
2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
Andrew Haley <aph@redhat.com>
* parse.y (source_end_java_method): Remove custom encoding of line
numbers for a function decl before passing it to the back end.
2002-12-03 Andrew Haley <aph@redhat.com>
* class.c (make_class_data): New field, "chain".
* decl.c (java_init_decl_processing): Likewise.
2002-12-02 Tom Tromey <tromey@redhat.com>
For PR java/8740:
* parse.y (do_resolve_class): Handle qualified name via
recursion.
2002-11-30 Zack Weinberg <zack@codesourcery.com>
* boehm.c, buffer.c, builtins.c, check-init.c, class.c,
constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
Include coretypes.h and tm.h.
* Make-lang.in: Update dependencies.
2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
2002-11-25 Diego Novillo <dnovillo@redhat.com>
* jcf-reader.c: Don't expand JCF_readu4 inside the
expansion of JCF_SKIP.
2002-11-25 Diego Novillo <dnovillo@redhat.com>
* jcf-reader.c: Don't expand JCF_readu4 inside the
expansion of JCF_SKIP.
2002-11-22 Tom Tromey <tromey@redhat.com>
* parse.y (patch_binop): Cast right hand side of shift expression
to `int'. Fixes PR java/8676.
2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
Andrew Haley <aph@redhat.com>
* gcc/java/jcf-write.c (write_classfile): Remove target
class file, if it exists, before renaming the temporary
class file to it.
2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
* jvspec.c (lang_specific_spec_functions): New.
2002-11-18 Tom Tromey <tromey@redhat.com>
Fix for PR java/7912:
* expr.c (can_widen_reference_to): Allow cast of array to
Cloneable or Serializable.
* java-tree.h (java_lang_cloneable_identifier_node): Declare.
(java_io_serializable_identifier_node): Likewise.
* parse.y (java_lang_cloneable, java_io_serializable): Removed.
(valid_ref_assignconv_cast_p): Use new identifier nodes.
* lex.c (java_init_lex): Don't initialize java_lang_cloneable and
java_io_serializable.
* decl.c (java_init_decl_processing): Initialize
java_lang_cloneable_identifier_node and
java_io_serializable_identifier_node.
(java_lang_cloneable_identifier_node): New global.
(java_io_serializable_identifier_node): Likewise.
2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
* buffer.c: Remove unnecessary casts.
* check-init.c: Likewise.
* class.c: Likewise.
* constants.c: Likewise.
* decl.c: Likewise.
* except.c: Likewise.
* gjavah.c: Likewise.
* jcf-io.c: Likewise.
* jcf-parse.c: Likewise.
* jcf-path.c: Likewise.
* jvspec.c: Likewise.
* lang.c: Likewise.
* lex.c: Likewise.
* verify.c: Likewise.
2002-11-06 Tom Tromey <tromey@redhat.com>
* gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
a JNI header.
2002-11-05 Tom Tromey <tromey@redhat.com>
Fix for PR java/6388.
* lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
* java-tree.h (enum java_tree_index): New values
JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
(decimal_int_max, decimal_long_max): New defines.
* lex.c (yylex): Rewrote range checking. Sign extend literals.
(error_if_numeric_overflow): Rewrote range checking.
* decl.c (java_init_decl_processing): Initialize decimal_int_max,
decimal_long_max.
2002-11-02 Tom Tromey <tromey@redhat.com>
* java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
* class.c (make_method_value): Put class name, not signature, into
`throws' field. For PR java/8415.
2002-10-24 Tom Tromey <tromey@redhat.com>
* gcj.texi (Invoking gij): Document --showversion.
(Standard Properties): java.library.path now set.
2002-10-23 Tom Tromey <tromey@redhat.com>
* gjavah.c (decode_signature_piece): In JNI mode, print
`jobjectArray' when array depth is nonzero.
Fixes PR java/8296.
2002-10-15 Andrew Haley <aph@redhat.com>
* parse.y (patch_invoke): Call force_evaluation_order on a static
arg list.
(resolve_qualified_expression_name): Call force_evaluation_order
on a arg list that is part of a Qualified Expression Name.
* lang.c (dump_compound_expr): New.
(java_dump_tree): New.
2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
* gcj.texi: Added item describing the GCJ runtime property
"gnu.gcj.progname".
2002-10-15 Richard Henderson <rth@redhat.com>
* jcf-parse.c (get_constant): Fix type warning.
2002-10-15 Andrew Haley <aph@redhat.com>
* java-tree.h (java_inlining_merge_static_initializers): Declare.
(java_inlining_map_static_initializers): Declare.
2002-10-14 Andrew Haley <aph@redhat.com>
* tree-inline.c (remap_block): All local class initialization
flags go in the outermost scope.
(expand_call_inline): Call java_inlining_map_static_initializers.
(expand_call_inline): Call java_inlining_merge_static_initializers.
* java/lang.c (merge_init_test_initialization): New.
(java_inlining_merge_static_initializers): New.
(inline_init_test_initialization): New.
(java_inlining_map_static_initializers): New.
2002-10-11 Mark Wielaard <mark@klomp.org>
* gcj.texi (Compatibility): Add Limitations and Extensions section.
2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* parse.y (merge_string_cste): Add parentheses around & within |.
2002-10-08 Tom Tromey <tromey@redhat.com>
* parse.y (variable_declarator_id): Simplify error path for
array declarator error. For PR java/8003.
2002-10-08 Zack Weinberg <zack@codesourcery.com>
* gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
bug_report_url.
2002-10-08 Andrew Haley <aph@redhat.com>
* parse.y (attach_init_test_initialization_flags): Check for
error_mark_node.
2002-10-07 Anthony Green <green@redhat.com>
* parse.y (merge_string_cste): Fix bug in string concatenation.
2002-10-03 Michael Koch <konqueror@gmx.de>
* gcj.texi (Standard properties):
Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
2002-10-02 Roger Sayle <roger@eyesopen.com>
PR optimization/6627
* lang.c (java_init): If storing the vbit in function
pointers, ensure that force_align_functions_log is atleast
one to aid compatability with g++ vtables.
2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
* jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
foul of type-based aliasing.
2002-09-30 Anthony Green <green@redhat.com>
* gcj.texi (Invoking jv-scan): Fix texinfo.
2002-09-28 Anthony Green <green@redhat.com>
* gcj.texi (Invoking jv-scan): Add --no-assert documentation.
(Code Generation): Add -fno-assert documentation.
* jv-scan.c (flag_assert): New global.
(options): Add assert option.
(help): Add --no-assert documentation.
* parse-scan.y (flag_assert): New global.
* lang.c (lang_f_options): Add -fassert/-fno-assert support.
(flag_assert): New global.
* java-tree.h (flag_assert): New global.
* lex.c (java_lex): Obey flag_assert.
* jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
calling cc1.
2002-09-26 Andrew Haley <aph@redhat.com>
* expr.c (build_java_array_length_access): Check for null pointer.
* expr.c (expand_java_arrayload): Likewise.
2002-09-21 Richard Henderson <rth@redhat.com>
* jcf-parse.c (get_constant): Decode from IEEE no matter
what the target format.
2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog: Follow spelling conventions.
* class.c: Likewise.
* decl.c: Likewise.
* expr.c: Likewise.
* gjavah.c: Likewise.
* java-tree.h: Likewise.
* jcf-dump.c: Likewise.
* jcf-parse.c: Likewise.
* jvspec.c: Likewise.
* lang.c: Likewise.
* mangle.c: Likewise.
* parse.y: Likewise.
2002-09-17 Tom Tromey <tromey@redhat.com>
* lex.c (java_read_unicode_collapsing_terminators): Handle case
where \r appears at EOF. Fixes PR java/7950.
2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* jvspec.c (lang_specific_driver): Remove unused variable.
2002-09-16 Geoffrey Keating <geoffk@apple.com>
* java-tree.h (union lang_tree_node): Add chain_next option.
2002-09-16 Richard Henderson <rth@redhat.com>
* jcf-parse.c (get_constant): Runtime check for IEEE format;
use new real.h interface.
* jcf-write.c (find_constant_index): Use new real.h interface.
* lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
* lang.c: Follow spelling conventions.
2002-09-11 Per Bothner <per@bothner.com>
* parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
constant to the type of the field.
(java_complete_tree): Remove now-redundant code.
* parse.y (fold_constant_for_init): 'null' is not a constant expr.
2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
For PR java/5794:
* verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
return label if a ret instruction for the jsr has been reached.
2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
* parse.y (DIR_SEPARATOR): Don't define.
(check_class_interface_creation): Use IS_DIR_SEPARATOR.
2002-08-28 Andrew Haley <aph@redhat.com>
* verify.c (verify_jvm_instructions): Allow exception handler
inside code that is being protected, but generate a warning.
* except.c (link_handler): Initialize `expanded' in new eh_range.
(binding_depth, is_class_level, current_pc): Declare extern.
2002-09-01 Mark Wielaard <mark@klomp.org>
* gcj.texi: Add chapter about system properties.
Fixed some typos.
2002-08-26 Tom Tromey <tromey@redhat.com>
* parse.y (try_builtin_assignconv): Allow narrowing primitive
conversion if RHS_TYPE is byte, short, or char.
2002-08-22 Tom Tromey <tromey@redhat.com>
* gcj.texi (Invoking gij): Document -cp and -classpath.
2002-08-21 Tom Tromey <tromey@redhat.com>
* Make-lang.in (java/jcf-path.o): Use $(datadir), not
$(prefix)/share. For PR libgcj/7633.
For PR java/6005 and PR java/7611:
* lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
(java_can_use_bit_fields_p): New function.
2002-08-16 Tom Tromey <tromey@redhat.com>
* gcj.texi (Class Initialization): Mention class initialization of
arrays.
2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
* Make-lang.in (java-tree-inline.o): New.
(JAVA_OBJS): Add java-tree-inline.o.
* parse.y (source_end_java_method): Call java_optimize_inline.
(java_expand_method_bodies): Save method's tree in
DECL_SAVED_TREE.
(add_stmt_to_compound): Keep track of the number of statments.
* lang.c (java_init): Enable flag_inline_trees.
(java_post_options): If flag_inline_functions is on, enable
flag_inline_trees instread.
(decl_constant_value): New.
(java_tree_inlining_walk_subtrees): New.
* java-tree.h (DECL_NUM_STMTS): New macro.
(java_optimize_inline): Declare.
* expr.c (java_expand_expr): Allow a BLOCK to return a value.
Handle a LABEL_EXPR.
* decl.c (build_result_decl): If we already have a DECL_RESULT
don't make another.
(dump_function): New.
(java_optimize_inline): New.
(dump_function): New.
2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
For PR java/7483:
* parse.y (build_assertion): Invert return from
desiredAssertionStatus.
2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* jcf-write.c (get_access_flags): Return correct access flags for
private and protected inner classes.
2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
* java/Make-lang.in (java.mostlyclean): Remove coverage files.
2002-08-05 Geoffrey Keating <geoffk@redhat.com>
* mangle_name.c: Don't include obstack.h twice.
* xref.c: Don't include obstack.h.
2002-08-04 Geoffrey Keating <geoffk@redhat.com>
* class.c: (permanent_obstack): Delete declaration.
* constants.c: (permanent_obstack): Delete declaration.
* except.c: (permanent_obstack): Delete declaration.
* expr.c: (permanent_obstack): Delete declaration.
* jcf-parse.c: (permanent_obstack): Delete declaration.
(saveable_obstack): Delete declaration.
* parse.h: (permanent_obstack): Delete declaration.
* typeck.c: (permanent_obstack): Delete declaration.
2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
* gcj.texi (version-gcc): Increase to 3.3.
2002-07-22 Tom Tromey <tromey@redhat.com>
* lex.c (java_lex): Check for `e' or `E' after 0.
2002-07-21 Richard Henderson <rth@redhat.com>
* lang.c (java_unsafe_for_reeval): New.
(LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
2002-07-21 Neil Booth <neil@daikokuya.co.uk>
* jcf-path.c (GET_ENV_PATH_LIST): Remove.
(jcf_path_init): Use GET_ENVIRONMENT.
2002-07-10 Roger Sayle <roger@eyesopen.com>
Zack Weinberg <zack@codesourcery.com>
* builtins.c (initialize_builtins): Remove defines that
handled C/C++ specific junk hereby removed from builtins.def.
2002-07-07 Neil Booth <neil@daikokuya.co.uk>
* lang.c (java_post_options): Update prototype.
2002-07-05 Roger Sayle <roger@eyesopen.com>
* builtins.c (initialize_builtins): Ignore the additional
parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
the builtins.def file.
2002-07-01 Tom Tromey <tromey@redhat.com>
For PR libgcj/7073:
* parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
specially.
2002-07-01 Roger Sayle <roger@eyesopen.com>
* java/decl.c (builtin_function): Accept additional parameter.
(java_init_decl_processing): Pass an additional NULL_TREE
argument to builtin_function.
2002-06-29 T.J. Mather <tjmather@maxmind.com>
* gcj.texi: Fixed gcj invocation example so that it compiles.
2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
* parse.y (mark_parser_ctxt): Likewise.
(check_modifiers, declare_local_variables): Avoid incorrect
hardcoded constant 10.
* lex.c (java_read_char): Avoid "comparison is always true"
warning.
2002-06-25 Andreas Schwab <schwab@suse.de>
* expr.c (JSR): Avoid undefined operation on PC.
2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (clear_binding_level): Const-ify.
2002-06-13 Akim Demaille <akim@epita.fr>
* parse.y (class_declaration, interface_declaration): Make sure
all their rules have an action, in order to avoid meaningless `$$
= $1' and their type clashes.
2002-06-11 Tom Tromey <tromey@redhat.com>
* jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
* parse-scan.y (statement_without_trailing_substatement): Added
assert_statement.
(assert_statement): New rule.
* java-tree.h (struct lang_type) [assertions]: New field.
(TYPE_USES_ASSERTIONS): New macro.
(CLASS_USES_ASSERTIONS): Likewise.
(FIELD_SYNTHETIC): New define.
* lex.c (java_lval;): Added ASSERT_TK.
* parse.y (ASSERT_TK): Added.
(statement_without_trailing_substatement): Added assert_statement.
(assert_statement): New rule.
(build_assertion): New function.
(maybe_generate_pre_expand_clinit): Create and initialize
$assertionsDisabled.
(lookup_package_type): Removed decl.
* keyword.h: Rebuilt.
* keyword.gperf (assert): New token.
2002-06-10 Akim Demaille <akim@epita.fr>
* parse.y (interface_type_list, class_member_declaration)
(unary_expression_not_plus_minus): Remove duplicate %type.
Whitespace changes.
2002-06-09 Tom Tromey <tromey@redhat.com>
* Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
* parse.y (method_header): Give error message in all cases.
Fixes PR java/6865.
2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
Don't use RTL inlining. Fix for PR java/6820.
* lang.c (LANG_HOOKS_POST_OPTIONS): Define.
(flag_really_inline): New.
(java_decode_option): Set flag_really_inline if -finline-functions
is seen.
(java_post_options): New function. Turn off inlining unless
flag_really_inline is set.
2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* gjavah.c (throwable_p): Accept argument as either a classname or
signature fragment. Create null-terminated classname string for super
when calling itself recursively.
(decode_signature_piece): Skip first character from class name
signature when calling throwable_p.
2002-06-08 H.J. Lu (hjl@gnu.org)
* jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
2002-06-04 Tom Tromey <tromey@redhat.com>
* jcf-write.c (perform_relocations): Optmize a goto to a goto.
2002-06-04 Michael Koch <konqueror@gmx.de>
* gcj.texi (Input Options): Fixed typo.
2002-06-04 Zack Weinberg <zack@codesourcery.com>
* java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
and all now-pointless local variables. Rename other local
variables to reflect their not being handles.
* java-tree.h, jcf-dump.c, jcf-io.c: Remove all
#if JCF_USE_STDIO blocks.
* parse.y: Add missing semicolon at end of rule.
2002-06-03 Geoffrey Keating <geoffk@redhat.com>
* check-init.c (attach_initialized_static_class): Delete, unused.
* parse.y: Use htab_t instead of struct hashtable, update
all uses.
* java-tree.h: Include hashtab.h instead of hash.h.
(struct lang_decl_func): Use htab_t, set up for gengtype.
(struct init_test_hash_entry): Delete.
(struct treetreehash_entry): New.
(java_treetreehash_find): New
(java_treetreehash_new): New prototype.
(java_treetreehash_create): New prototype.
(java_mark_tree): Delete prototype.
(java_hash_hash_tree_node): Delete prototype.
(java_hash_compare_tree_node): Delete prototype.
(attach_initialized_static_class): Delete prototype.
* expr.c (build_class_init): Update to use java_treetreehash
functions.
(java_expand_expr): Update to use htab_t.
(emit_init_test_initialization): Likewise.
* decl.c (java_mark_tree): Delete.
* class.c (init_test_hash_newfunc): Delete.
(java_hash_hash_tree_node): Delete.
(java_hash_compare_tree_node): Delete.
(add_method_1): Update to use java_treetreehash functions.
(JAVA_TREEHASHHASH_H): New macro.
(java_treetreehash_hash): New function.
(java_treetreehash_compare): New function.
(java_treetreehash_find): New function.
(java_treetreehash_new): New function.
(java_treetreehash_create): New function.
* Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
* Make-lang.in (java/parse.o): Depend on debug.h.
* java-tree.h (struct lang_identifier): Use gengtype.
(union lang_tree_node): New.
(struct lang_decl_func): Use gengtype.
(struct lang_decl_var): Likewise.
(struct lang_decl): Likewise.
* parse.y: Include debug.h.
* lang.c (LANG_HOOKS_MARK_TREE): Delete.
* lang.c (struct language_function): New dummy structure.
* java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
descriminator for DECL_LANG_SPECIFIC.
(struct lang_decl_func): Rename from struct lang_decl.
(enum lang_decl_desc): New.
(struct lang_decl): Make it a union. Update all the accessor macros.
(struct lang_type): Use gengtype.
* class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
* decl.c (java_dup_lang_specific_decl): All lang_decl structures
are now the same size.
(lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
use discriminator to mark DECL_LANG_SPECIFIC.
* Make-lang.in (gt-java-builtins.h): New rule.
(java/builtins.o): Add dependency on gt-<filename>.h.
* builtins.c: Use gengtype for roots.
(union string_or_tree): Use gengtype.
(struct builtin_record): Use gengtype.
* config-lang.in (gtfiles): Add builtins.c.
* Make-lang.in (gt-java-class.h, gt-java-constants.h,
gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
gt-java-parse.h, gtype-java.h): Add rules to generate.
(parse.o): Add dependency on gt-java-parse.h, gt-java.h.
(class.o): Add dependency on gt-*.h.
(constants.o): Likewise.
(decl.o): Likewise.
(expr.o): Likewise.
(jcf-parse.o): Likewise.
(jcf-write.o): Likewise.
(lang.o): Likewise.
* config-lang.in (gtfiles): New.
* class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
* constants.c: Replace uses of ggc_add_* with GTY markers.
Include gt-*.h.
* decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
* expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
* java-tree.h: Replace uses of ggc_add_* with GTY markers.
* jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
Include gt-*.h.
* jcf-write.c: Replace uses of ggc_add_* with GTY markers.
Include gt-*.h.
* lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
* mangle.c: Replace uses of ggc_add_* with GTY markers. Include
gt-*.h.
* parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
Include gtype-java.h.
2002-06-02 Tom Tromey <tromey@redhat.com>
Fix for PR java/5913:
* parse.y (patch_binop): Call patch_string on op1.
2002-06-02 Tom Tromey <tromey@redhat.com>
Fix for PR java/1343, PR java/6336:
* parse.y (make_nested_class_name): Remove extraneous `else'; fix
formatting. Changed return type.
(anonymous_class_counter): Moved to top of file.
(maybe_make_nested_class_name): Append number to class name for
function-local classes.
2002-05-28 Zack Weinberg <zack@codesourcery.com>
* decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
* Make-lang.in: Update dependency lists.
2002-05-18 Mark Mitchell <mark@codesourcery.com>
* gjavah.c (throwable_p): Do not free the name of the class after
passing it to find_class.
* java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
* jcf-io.c (dirent.h): Include it.
(fnmatch.h): Likewise.
(compare_path): New function.
(java_or_class_file): Likewise.
(memoized_dirlist_entry): New type.
(memoized_dirlist_lookup_eq): New function.
(memoized_dirlists): New variable.
(caching_stat): New function.
(memoized_class_lookup_eq): New function.
(memoized_class_lookups): Likewise.
(find_class): Use memoized_class_lookups and caching_stat.
* jcf.h (JCF_USE_SCANDIR): Define.
* parse.y (java_expand_classes): Write the class files in reverse
order.
2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
2002-05-13 Mark Mitchell <mark@codesourcery.com>
* jcf-write.c (write_classfile): Unlink the temporary file if it
cannot be renamed. Use concat to build up the name of the
temporary file.
2002-05-08 Mark Mitchell <mark@codesourcery.com>
* jcf-write.c (write_classfile): Write the file to a
temporary file and then rename it.
2002-05-07 Tom Tromey <tromey@redhat.com>
* gjavah.c (throwable_p): Use xstrdup, not strdup.
Fix for PR java/1200:
* gjavah.c (throwable_p): New function.
(decode_signature_piece): Use it. A `WeakReference' isn't the
same as a `jweak'.
Include hashtab.h.
(gcjh_streq): New function.
2002-05-07 Andreas Jaeger <aj@suse.de>
* parse.y (finish_for_loop): Fix if statement.
2002-05-06 Tom Tromey <tromey@redhat.com>
Fix for PR java/5941:
* parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
loop update expression.
(java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
* java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
2002-05-04 Mark Wielaard <mark@klomp.org>
For PR java/6519:
* parse.y (build_string_concatenation): Return just op1 only when op2
is null and op1 is a STRING_CST, otherwise always construct a
StringBuffer.
2002-04-27 Tom Tromey <tromey@redhat.com>
For PR java/6382:
* parse.y (string_convert_int_cst): New function.
(merge_string_cste): Use it.
2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
* java-tree.h (java_parse_file): Update.
(java_set_yydebug): Remove.
* jcf-parse.c (yydebug): Remove.
(java_set_yydebug): Die.
(java_parse_file): Update.
* lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
2002-04-24 Tom Tromey <tromey@redhat.com>
For PR java/6425:
* parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
EXPR_WFL_QUALIFICATION of qual_wfl.
2002-04-23 Per Bothner <per@bothner.com>
* expr.c (PRE_JSR): Call NOTE_LABEL for return address.
* java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
(BCODE_TARGET): Remove BCODE_RETURN_TARGET.
2002-04-23 Tom Tromey <tromey@redhat.com>
For PR java/6314:
* jvspec.c (lang_specific_driver): Use --resource, not -R. Also
recognize `-fcompile-resource='.
* gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
a bit.
2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
* jcf-parse.c: (yyparse): Don't prepend "./" to relative
paths. Fixes PR java/2791.
2002-04-19 Andrew Haley <aph@redhat.com>
* jcf-write.c (push_long_const): lo, hi: New variables.
Use rshift_double to extract the high part of a 64-bit long.
Use WORD_TO_INT to extract the low part.
* jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
* typeck.c (incomplete_type_error): Remove.
2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* class.c (make_class_data): Set DECL_ALIGN on static class data,
for hash synchronization.
* expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
* decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
class_type_node.
2002-04-16 Mark Wielaard <mark@klomp.org>
* jcf-write.c (generate_bytecode_insns): Only write const_0 if not
negative zero.
2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
Fix for PR java/6294:
* parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
interfaces.
2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
Fix for PR java/6085:
* parse.y (patch_method_invocation): Always use build_access_to_thisn
to get enclosing "this" argument for inner-class constructor
invocation. Pass correct arguments to build_access_to_thisn.
2002-04-10 Andreas Jaeger <aj@suse.de>
* gcj.texi (Input Options): Fix extdirs patch.
2002-04-10 Anthony Green <green@redhat.com>
* jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
2002-04-09 Anthony Green <green@redhat.com>
* gcj.texi (Input Options): Add --extdirs documentation.
* jcf-dump.c (OPT_extdirs): New macro.
(options): Add extdirs option.
(help): Describe --extdirs.
(main): Handle OPT_extdirs.
* gjavah.c (OPT_extdirs): New macro.
(options): Add extdirs option.
(help): Describe --extdirs.
(main): Handle OPT_extdirs.
* jcf-path.c (jcf_path_init): Add extdirs support.
(jcf_path_extdirs_arg): New function.
(extensions): New variable to hold extensions path entries.
* jvspec.c: Remove -fextdirs= when compiling main().
* lang.c (java_decode_option): Handle -fextdirs=.
* jcf.h (jcf_path_extdirs_arg): Declare new function.
* Make-lang.in: Compile jcf-path with version info for use in
identifying the appropriate libgcj.jar.
2002-04-08 Tom Tromey <tromey@redhat.com>
For PR libgcj/5303:
* .cvsignore: Added rmic.1 and rmiregistry.1.
* gcj.texi (Top): Link to new nodes.
(Invoking rmic): New node.
(Invoking rmiregistry): Likewise.
* Make-lang.in (java.generated-manpages): Added rmic.1 and
rmiregistry.1.
(java.maintainer-clean): Likewise.
($(srcdir)/java/rmic.1): New target.
($(srcdir)/java/rmiregistry.1): Likewise.
(java.install-man): Handle rmic.1 and rmiregistry.1.
2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
Add note about handling uncaught exceptions. Add an exception handler
to example.
2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* parse.y (resolve_qualified_expression_name): Clear "from_super" flag
after using it to patch CALL_EXPR.
2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* gcj.texi (Invocation): Document CNI invocation API.
2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
* expr.c (truthvalue_conversion): Rename. Update.
(expand_compare): Update.
* java-tree.h (java_truthvalue_conversion): New.
* lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
* java-tree.h (java_mark_addressable): New.
* lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
* typeck.c (mark_addressable): Rename, update.
2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
* expr.c (build_java_binop): Update.
* java-tree.h (java_signed_type, java_unsigned_type,
java_signed_or_unsigned_type): Update.
* lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
* parse.y (patch_binop): Update.
* typeck.c (signed_or_unsigned_type, unsigned_type,
signed_type): Update.
2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
* lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
(java_dummy_print): Remove.
(lang_print_error): Rename. Exit early if inhibiting output.
(inhibit_error_printing_function): New.
(java_init): Don't set hook.
(lang_init_source): Use new boolean.
2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
* parse.y (do_resolve_class): Fix infinite recursion.
2002-03-29 Tom Tromey <tromey@redhat.com>
* parse.y (check_inner_circular_reference): Ignore incomplete
types.
2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
* Make-lang.in (builtins.o): Update.
* boehm.c (get_boehm_type_descriptor): Update.
* builtins.c: Include langhooks.h.
* decl.c (java_init_decl_processing): Update.
* java-tree.h (java_type_for_mode, java_type_for_size): New.
* lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
Redefine.
* typeck.c (type_for_mode, type_for_size): Update.
2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
* lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
2002-03-28 Tom Tromey <tromey@redhat.com>
* except.c (expand_end_java_handler): If the handler type is NULL,
use java.lang.Throwable. Fixes PR java/5986.
2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
Fix for PR java/4715:
* jcf-parse.c (parse_source_file_3): New function.
(read_class): Call it.
(java_parse_file): Likewise.
2002-03-28 Jan Hubicka <jh@suse.cz>
* java/lang.c (java_init_options): Set flag_trapping_math to 0.
2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* parse.y (resolve_package): Initialize "decl".
(lookup_package_type): Remove unused function.
2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
Fix for PR java/5993:
* parse.y (resolve_package): Return the decl if resolution was
successful. Don't special case "java.lang" and "java.lang.reflect"
packages. Set type_name to the merged identifier.
(resolved_qualified_expression_name): Print error using "name" if
resolve_package returns NULL_TREE.
2002-03-27 Tom Tromey <tromey@redhat.com>
* expr.c (expand_invoke): Don't generate null pointer check if
we're calling <init>.
2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
* expr.c (java_lang_expand_expr): Rename java_expand_expr,
fix prototype.
* java-tree.h (java_lang_expand_expr): Similarly.
* lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
(java_init): Don't set hook.
2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
Fix for PR java/5850:
* parse.y (lookup_field_wrapper): Call itself recursively for enclosing
context if field was not found in the current scope.
* expr.c (lookup_field): Don't look in enclosing contexts.
2002-03-26 Tom Tromey <tromey@redhat.com>
Fix for PR java/5942:
* parse.y (init_src_parse): Added sanity check.
* parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
elements, not 11.
2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
* decl.c (lang_mark_tree): Rename java_mark_tree.
* java-tree.h (java_mark_tree): New.
* java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
2002-03-25 Zack Weinberg <zack@codesourcery.com>
* lex.c: Change java_perform_atof to take normal parameters
instead of a pointer to a parameter block. Call it directly
from java_lex.
2002-03-22 Mark Wielaard <mark@klomp.org>
Fix for PR java/5368:
* parse.y (resolve_qualified_expression_name): Use decl not field_decl
when printing error message.
2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
* decl.c (maybe_build_cleanup): Remove.
2002-03-22 Tom Tromey <tromey@redhat.com>
Andrew Haley <aph@cambridge.redhat.com>
* expr.c (build_field_ref): Don't build a check if the field is a
member of `this'.
2002-03-21 Eric Blake <ebb9@email.byu.edu>
Fix for PR java/6026:
* lex.c (java_lex): Fix parsing of consecutive floats.
2002-03-21 Tom Tromey <tromey@redhat.com>
* parse.y (build_access_to_thisn): Stop when FROM is not an inner
class.
2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, kept_level_p, global_bindings_p): New.
2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
* gcj.texi: @code{gcj} becomes @command{gcj}.
@code{gcc} becomes @command{gcc}.
GcjRaw changed to gnu.gcc.RawData.
2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
* decl.c (start_java_method): Use new hook.
* lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
(java_init): Remove old hook.
2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
* builtins.c (define_builtin): Do nothing if `type' is null.
Fixes PR java/5876.
2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* parse.y (parser_check_super_interface): Fix error message
grammar/order.
2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* jcf-parse.c (get_constant): Delete unused variables.
2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
* java-tree.h (java_parse_file): New.
* jcf-parse.c (yyparse): Rename java_parse_file.
* lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* parse.y (craft_constructor): Return the constructor decl.
(java_expand_classes): Update comments.
(lookup_method_invoke): Call fix_constructors immediately for
anonymous class. Fixes PR java/5935.
2002-03-15 Anthony Green <green@redhat.com>
* jcf-parse.c (yyparse): Don't emit class registration
constructor when compiling resource files.
2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lang.c (java_tree_code_type, java_tree_code_length,
tree_code_name): Delete.
(tree_code_type, tree_code_length, tree_code_name): Define.
(java_init): Don't try to copy into the various tree_code
arrays.
2002-03-12 Tom Tromey <tromey@redhat.com>
* jcf-parse.c (get_constant) [CONSTANT_String]: String values are
UTF-8, not UCS-2. Fixes PR java/5923.
* parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
a call_expr wrapped in a convert. Fixes PR java/5848.
2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* jcf-write.c (write_classfile): Improve error strings.
2002-03-11 Eric Blake <ebb9@email.byu.edu>
* lex.c: Adjust comments to GNU standards.
2002-03-11 Eric Blake <ebb9@email.byu.edu>
Fix for PR java/5902:
* lex.c (java_lex): Fix parsing of literals.
2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
to prevent it getting evaluated twice in the store checking case.
* expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
examining OBJECT.
2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* decl.c (java_init_decl_processing): Make sure class_type_node
alignment is not less than 64 bits if hash synchronization is enabled.
2002-03-08 Per Bothner <per@bothner.com>
* parse.y (java_complete_lhs): Check if patch_assignment
returned an error-mark.
* parse.y (try_builtin_assignconv): Don't special-case zero.
2002-03-08 Per Bothner <per@bothner.com>
Fix for PR java/5812.
* expr.c (build_java_jsr): Take pc arguments, and do lookup_label
here instead of in JSR macro. Likewise with load_type_state call.
Do the latter on if the return_pc has been verified (the jsr returns).
(JSR): Now just call build_java_jsr.
2002-03-07 Jeff Sturm <jsturm@one-point.com>
* java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
(java.install-common): Link native driver to
JAVA_TARGET_INSTALL_NAME.
2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
* builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
* builtins.c(sin_builtin): Likewise
* builtins.c(sqrt_builtin): Likewise
2002-03-03 Zack Weinberg <zack@codesourcery.com>
* java/expr.c, java/jcf-parse.c, java/lex.c:
Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
REAL_ARITHMETIC blocks unconditional. Delete some further
#ifdef blocks predicated on REAL_ARITHMETIC.
2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (init_class_processing): Use ARRAY_SIZE in lieu of
explicit sizeof/sizeof.
* decl.c (java_init_decl_processing): Likewise.
* jcf-parse.c (init_jcf_parse): Likewise.
* parse.y (init_src_parse): Likewise.
2002-03-02 Per Bothner <per@bothner.com>
Make --CLASSPATH by a synonym for --classpath and -classpath.
Implement --bootclasspath.
* jcf-path.c (classpath_u): Rename static variable to classpath_user.
(classpath_l): Remove.
(jcf_path_CLASSPATH_arg): Remove.
(jcf_path_bootclasspath_arg): New function.
(jcf_path_seal): Simplify accordingly.
* jcf.h (jcf_path_bootclasspath_arg): New declarations.
(jcf_path_CLASSPATH): Remove declaration.
* jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
(lang_specific_driver): Translate -bootclasspath.
* lang-options.h: Add --bootclasspath. Update --CLASSPATH.
* lang.c (decode_lang_options): Do jcf_path_init first.
Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
* gjavah.c: Also handle --bootclasspath.
Handle --CLASSPATH as a synonum for --classpath.
* jcf-dump.c: Likewise.
"." is not part of system path, but is the default for --classpath.
* jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
(jcf_path_seal): Add "." if no CLASSPATH specified.
* gcj.texi: Document changes.
2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* expr.c (build_java_arraystore_check): Fix formatting.
2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
Fix for PR java/5758, java/5632:
* jcf-parse.c (load_class): Renamed local variable, consider `.' an
inner-class separator too.
* parse.y (do_resolve_class): New local `decl_result.'
Progressively build a name for what can have been loaded.
2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* expr.c (java_array_data_offset): Removed function.
(JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
(build_java_array_length_access): Obtain "length" value using a
COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
(build_java_arrayaccess): Correct comment. Access "data" using a
COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
(build_java_arraystore_check): New function.
(expand_java_arraystore): Use build_java_arraystore_check.
* parse.y (patch_assignment): Simplify code to insert a store check
when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
* check-init.c (check_init): Update to reflect that an array length
access is now a COMPONENT_REF.
* gcj.texi (Code Generation): Improve documentation of
-fno-bounds-check. Add documentation for -fno-store-check.
* java-tree.h (flag_store_check): Declare.
(build_java_arraystore_check): Declare.
* lang.c (flag_store_check): Initialize to 1.
(lang_f_options): Add store-check option.
* jvspec.c: Don't pass store-check option to jvgenmain.
* lang-options.h: Add help string for -fno-store-check.
2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
* decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
* java-tree.h (java_dup_lang_specific_decl): New.
* lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
2002-02-27 Zack Weinberg <zack@codesourcery.com>
* builtins.c, decl.c: Delete traditional-mode-related code
copied from the C front end but not used, or used only to
permit the compiler to link.
2002-02-22 Tom Tromey <tromey@redhat.com>
Fix for PR java/2369:
* jvspec.c (verify_class_name): New function.
(lang_specific_driver): Call it.
(JAVA_START_CHAR_P): New macro.
(JAVA_PART_CHAR_P): Likewise.
2002-02-22 Per Bothner <per@bothner.com>
* class.c: Change vtable to be more compatible with g++ v3 abi.
(get_dispatch_table): Prepend offset-to-top (always 0) and
type_info pointer (currently unimplemented hence NULL) to vtable.
Specifically, prepend offset-to-top and typeinfo ptr (currently null).
(make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
(build_dtable_decl): Add declarations for new fields.
2002-02-20 Per Bothner <per@bothner.com>
* parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
to finit$ (otherwise generate_bytecode_insns drops it). However, we
don't need to set it on the COMPOUND_EXPR - the caller does that.
2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
* gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
`--CLASSPATH' becomes `--classpath.'
* gjavah.c: Likewise.
* jcf-dump.c: Likewise.
* lang-options.h: Likewise.
* lang.c: Likewise.
* jcf-path.c: Updated comment.
(jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
(jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
* jcf.h (jcf_path_CLASSPATH_arg): Ditto.
(jcf_path_CLASSPATH_arg): Ditto.
(classpath_u): Updated leading comment.
2002-02-20 Per Bothner <per@bothner.com>
* builtins.c (check_for_builtin): New function.
(build_call_or_builtin): Remove.
* java-tree.h: Update accordingly.
* expr.c (expand_invoke): Use build + check_for_builtin instead
of build_call_or_builtin.
* parse.y (patch_invoke): Likewise. This avoids needlessly creating
a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
flag (which had caused jcf-write to incorrectly emit invokevirtual).
2002-02-17 Tom Tromey <tromey@redhat.com>
* java-tree.h (TYPE_STRICTFP): New macro.
(struct lang_type) [strictfp]: New field.
(CLASS_STRICTFP): New macro.
(METHOD_STRICTFP): New macro.
(struct lang_decl) [strictfp]: New field.
* parse.y (method_header): Disallow strictfp constructor or
abstract method.
(STRICT_TK): Move before MODIFIER_TK.
* parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
(METHOD_MODIFIERS): Likewise.
(INTERFACE_MODIFIERS): Likewise.
* jcf-write.c (get_access_flags): Likewise.
* class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
(add_method_1): Likewise.
(get_access_flags_from_decl): Likewise.
* jcf-dump.c (print_access_flags): Print in standard order. Also,
recognize strictfp flag.
* jcf.h (ACC_STRICT): New define.
2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
* class.c(build_utf8_ref): Move declaration of decl_size
2002-02-07 Tom Tromey <tromey@redhat.com>
* gcj.texi (Input Options): --CLASSPATH does not suppress system
path.
2002-02-04 Anthony Green <green@redhat.com>
* class.c (build_utf8_ref): Put UTF-8 constants into merged
sections if available.
2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* parse.y (java_expand_classes): Fix typo in static field loop.
2002-02-02 Richard Henderson <rth@redhat.com>
* class.c (add_field): Mark static fields external.
(build_class_ref): Remove redundant set.
* parse.y (java_expand_classes): Mark static fields of classes
to be compiled as local.
* jcf-parse.c (parse_class_file): Likewise.
2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
* gcj.texi (About CNI): New node.
2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
PR java/5080
* jcf-parse.c : Check for HAVE_LOCALE_H before using
setlocale() with LC_CTYPE as a parameter.
* jv-scan.c: Same.
2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
* gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
Follow GNU Coding Standards for --version.
2002-01-28 Tom Tromey <tromey@redhat.com>
* expr.c (build_jni_stub): Ensure storage for `meth' is
generated.
* parse.y (java_complete_expand_methods): Set
current_function_decl before building JNI stub.
2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
* gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
BUILT_IN_SQRTF.
2002-01-22 Tom Tromey <tromey@redhat.com>
* decl.c (java_init_decl_processing): Use add_predefined_file.
Predefine RawData.java.
(predef_filenames): Removed.
(java_init_decl_processing): Don't register predef_filenames.
* jcf-parse.c (add_predefined_file): New function.
(predefined_filename_p): Rewrote.
(predefined_filename_p): No longer static.
* decl.c (java_init_decl_processing): Call initialize_builtins.
* Make-lang.in (JAVA_OBJS): Added builtins.o.
(java/builtins.o): New target.
* builtins.c: New file.
* parse.y (patch_invoke): Use build_call_or_builtin.
* java-tree.h (build_call_or_builtin): Declare.
(initialize_builtins): Declare.
(java_set_exception_lang_code): Removed unused declaration.
(PREDEF_FILENAMES_SIZE): Removed.
(java_tree_index): Added JTI_PREDEF_FILENAMES.
(predef_filenames): New define.
(add_predefined_file): Declare.
(predefined_filename_p): Declare.
* expr.c (expand_invoke): Use build_call_or_builtin.
2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* parse.y (patch_switch_statement): Fix format specifier.
2002-01-16 Tom Tromey <tromey@redhat.com>
More for PR java/5365:
* gjavah.c (print_stub_or_jni): Cause exception to be thrown by
default.
(process_file): Generate include for
java.lang.UnsupportedOperationExceptions.
2002-01-15 Andreas Jaeger <aj@suse.de>
* .cvsignore: Add man pages.
2002-01-15 Tom Tromey <tromey@redhat.com>
Fix for PR java/5365:
* gjavah.c (process_file): Turn class name into a file name.
2002-01-14 Matthias Klose <doko@debian.org>
* gcj.texi: Fix whitespace and formatting errors in the
synopsis of the man pages. Update copyright.
2002-01-14 Tom Tromey <tromey@redhat.com>
For PR libgcj/5303:
* Make-lang.in (java.install-man): Handle jv-convert man page.
(java.generated-manpages): Added jv-convert.1.
(java.uninstall): Remove jv-convert.1.
(java.maintainer-clean): Likewise.
($(srcdir)/java/jv-convert.1): New target.
* gcj.texi (Top): Link to jv-convert node.
(Individual utilities): Likewise.
(Invoking jv-convert): New node.
2001-01-10 Jeff Sturm <jsturm@one-point.com>
Martin Kahlert <martin.kahlert@infineon.com>
* jcf-parse.c (get_constant): Don't swap lo/hi for big
endian targets when HOST_BITS_PER_WIDE_INT >= 64.
2002-01-03 Graham Stott <grahams@redhat.com>
* class.c (compile_resource_file): Update copyright date.
Constify filename parameter.
(java-tree.h): Update copyright date.
(compile_resource_file): Constify filename parameter.
2002-01-03 Graham Stott <grahams@redhat.com>
* gcc/jcf-parse.c: Update copyright date.
(yyparse): Constify resource_filename.
2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* parse.y (src_parse_roots): Don't needlessly zero init.
2001-12-31 Tom Tromey <tromey@redhat.com>
* parse.y (dump_java_tree): New function.
(source_end_java_method): Call it.
(end_class_declaration): Likewise.
* lang.c (java_decode_option): Call dump_switch_p.
2001-12-28 Tom Tromey <tromey@redhat.com>
* gen-table.pl: Don't process characters after \uffff. Added
comment pointing to input file.
2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gen-table.pl: Const-ify output. Document the location of a
suitable unicode input file.
* chartables.h: Regenerate.
2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* chartables.h: Const-ify.
* gjavah.c (options): Likewise.
* jcf-dump.c (options): Likewise.
* jv-scan.c (options): Likewise.
* lex.c (java_start_char_p, java_part_char_p): Likewise.
* parse.y (binop_lookup): Likewise.
2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (keyword.h): Pass -C to gperf to const-ify
the static arrays that are output.
* jvspec.c (jvgenmain_spec): Make static.
* keyword.gperf (struct java_keyword, java_keyword): Const-ify.
* keyword.h: Regenerate.
* lang.c (string_option, process_option_with_no, lang_f_options,
lang_W_options): Const-ify.
* lex.c (java_lex): Likewise.
2001-12-21 Richard Henderson <rth@redhat.com>
* boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
(get_boehm_type_descriptor): ... here. Arrange for the
TREE_TYPE to get set properly.
2001-12-21 Richard Henderson <rth@redhat.com>
* class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
only if the target requires collect2.
* class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
2001-12-20 Tom Tromey <tromey@redhat.com>
For PR java/4509:
* parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
CAN_COMPLETE_NORMALLY for the node.
* jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
generate code for second branch if first branch can't complete
normally.
(generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
the loop head if the loop body can't complete normally.
2001-12-20 Tom Tromey <tromey@redhat.com>
For PR java/4766:
* jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
case where `finally' clause can't complete normally.
2001-12-20 Tom Tromey <tromey@redhat.com>
Fixes PR java/5057:
* parse.y (analyze_clinit_body): Added this_class parameter.
Check for more cases where we must keep <clinit>.
(maybe_yank_clinit): Cleaned up flow control.
2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* decl.c (java_init_decl_processing): Don't initialize
finit_leg_identifier_node.
* java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
(finit_leg_identifier_node): Remove.
(ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* mangle.c (mangle_member_name): Don't special-case for
NO_DOLLAR_IN_LABEL.
* mangle_name.c (unicode_mangling_length): Likewise.
(append_unicode_mangled_name): Likewise.
* parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
code.
2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* expr.c (build_java_array_length_access): Don't force null pointer
check unless flag_check_references is set.
2001-12-20 Tom Tromey <tromey@redhat.com>
Fix for PR java/3417:
* parse.y (patch_assignment): Added special processing for
`return'.
(patch_return): Don't convert booleans to integers, and don't
special-case `null'.
2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
* config-lang.in (diff_excludes): Remove.
2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
* gcj.texi: Update link to GCC manual.
2001-12-17 Tom Tromey <tromey@redhat.com>
* parse.y (link_nested_class_to_enclosing): Removed useless
statement.
2001-12-16 Tom Tromey <tromey@redhat.com>
* mangle.c (mangle_method_decl): Never emit `C2' constructor.
Fixes PR java/5088.
2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
* ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
spelling errors.
2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* decl.c (java_init_decl_processing): Build otable_type correctly.
otable_decl is an otable_type.
2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java-tree.h (otable_methods, otable_decl, otable_syms_decl,
otable_type, otable_ptr_type, method_symbol_type,
method_symbols_array_type, method_symbols_array_ptr_type): New
field/global tree definitions.
(flag_indirect_dispatch): New flag.
* decl.c (java_init_decl_processing): Initialize new otable and
otable_syms type nodes and decls. Add new field "index" to
method_type_node.
* class.c (build_method_symbols_entry): New function.
(make_method_value): Set "index" to to method's vtable index for
virtual methods when indirect-dispatch is not used.
(make_class_data): For indirect-dispatch, don't emit the dtable_decl,
and set vtable_method_count to -1. Set otable and otable_syms field
if indirect-dispatch is used and there was something to put in them.
(build_method_symbols_entry): New function.
(emit_offset_symbol_table): New function.
* expr.c (get_offset_table_index): New function.
(build_invokevirtual): Build array reference to otable at the index
returned by get_offset_table_index, and use the result as the vtable
offset.
(build_invokeinterface): Similar.
* jcf-parse.c (yyparse): If indirect-dispatch, call
emit_offset_symbol_table at the end of compilation, after all classes
have been generated.
* jvspec.c: Don't pass findirect-dispatch to jvgenmain.
* lang.c (flag_indirect_dispatch): Define.
(lang_f_options): Add indirect-dispatch flag.
2001-12-14 Matthias Klose <doko@debian.org>
* gcj.texi: Markup for man page generation. Document missing
options printed by <tool> --help.
Terminate description of gij's -ms option with a dot.
* Make-lang.in ($(srcdir)/java/*.1): New targets.
(java.generated-manpages java.install-man, java.uninstall,
java-maintainer-clean) Updated.
2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
* class.c (get_dispatch_table): Fix java vtable layout
for TARGET_VTABLE_USES_DESCRIPTORS.
* decl.c (java_init_decl_processing): Initialize
alloc_no_finalizer_node, finalize_identifier_node.
* expr.c (class_has_finalize_method): New function.
(expand_java_NEW): Generate calls for finalizer-free allocation.
(build_invokevirtual): Fix java vtable layout for
TARGET_VTABLE_USES_DESCRIPTORS.
* java-tree.h (enum java_tree_index): New entries:
JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
(alloc_no_finalizer_node, finalize_deintifier_node): New macros.
(class_has_finalize_method): declare.
(HAS_FINALIZER_P): New macro.
* parse.y (patch_invoke): Generate calls for finalizer-free
allocation.
2001-12-12 Matthias Klose <doko@debian.org>
* Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
whitespace at end of line.
2001-12-11 Tom Tromey <tromey@redhat.com>
* lex.c (java_init_lex): Define wfl_to_string as
gnu.gcj.runtime.StringBuffer unless generating bytecode.
2001-12-11 Jeff Sturm <jsturm@one-point.com>
* class.c (make_method_value): Use null_pointer_node to
represent empty exception table.
2001-12-10 Tom Tromey <tromey@redhat.com>
* check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
2001-12-10 Douglas B. Rupp <rupp@gnat.com>
* Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
2001-12-09 Per Bothner <per@bothner.com>
* check-init.c (current_switch_has_default): New static field.
(check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
DEFAULT_EXPR seen, simulate a default alternative that copies state.
2001-12-09 Tom Tromey <tromey@redhat.com>
* check-init.c (check_init): Don't allow pre- or post- increment
or decrement of final variable.
(final_assign_error): Minor error message rewording.
2001-12-08 Tom Tromey <tromey@redhat.com>
* java-tree.h: Fixed typo.
* gjavah.c (decompile_method): Don't decompile to `return this'
for static methods.
* gjavah.c (cxx_keywords): Re-sorted.
* lex.c (cxx_keywords): Re-sorted.
* gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
else.
* gjavah.c (print_namelet): Clear subnamelets.
(HANDLE_METHOD): Set `method_printed' earlier.
2001-12-07 Tom Tromey <tromey@redhat.com>
* lang.c (lang_f_options): Added
optimize-static-class-initialization.
(java_decode_option): Removed special case.
2001-12-07 Per Bothner <per@bothner.com>
* check-init.c (check_init): Fix typo freeing memory twice.
2001-12-05 Per Bothner <per@bothner.com>
Restore support for static class initialization optimization.
* java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
* check-init.c (check_int): At end of BLOCK handle initialization
blocks, which used to be done in java_complete_expand_method but did
not handle the case where check_for_initialization might allocate
more than a word of bits.
* decl.c (lang_make_tree): The smic field is now a tree.
* expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
* java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
* parse.y (emit_test_initialization): Combine hash_lookup calls.
* java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
Change from a hash table to a list.
(struct_lang_decl): Change field 'smic' to match.
* class.c (add_method_1): Initialize
DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
* parse.y (adjust_init_test_initialization): Removed - inlined into -
(java_expand_method_bodies): -here, since 'smic' is now a list.
(patch_invoke): Add to 'smic' list, instead of hash_lookup.
* check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
* class.c (java_hash_compare_tree_node): Fix casts.
2001-12-04 Per Bothner <per@bothner.com>
* check-init.c: Handle definite unassignment to finals in addition
to definite assignment.
(loop_current_locals): New field.
(num_current_locals, int start_current_locals, num_current_words):
Make static.
(SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
(ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
(get_variable_decl, check_final_reassigned): New functions.
(check_init, check_bool_init): Modify as needed for checking finals.
(check_for_initialization): Take extra parameter and return void.
Do extra start-up logic to check final fields for assignment.
* parse.y (check_static_final_variable_assignment_flag,
reset_static_final_variable_assignment_flag, check_final_assignment,
check_final_variable_local_assignment_flag,
reset_final_variable_indirect_assignment_flag,
reset_final_variable_global_assignment_flag): Remove functions.
(java_complete_expand_methods, outer_field_access_fix,
patch_assignment): Remove no-longer used logic.
* java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
* parse.y (register_fields, java_complete_tree): Update accordingly.
* check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
(DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
(check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
* java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
* java-tree.h (DECL FINAL): New bit-field.
(METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
(LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
(DECL_INIT_CALLS_THIS): New macro.
(struct lang_decl): New bit-field init_calls_this.
(DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
(DECL_BIT_INDEX): Change to use pointer_alias_set since we now
use it for both local variables and final fields.
(struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
and local_final.
(struct lang_type): Remove hfv bit-field.
(check_for_initialization): Change to return void.
* java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
* expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
* check-init.c (final_assign_error): New helper function.
(check_final_reassigned, check_init): Use it.
(check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
* java-tree.h (struct lang_decl, struct lang_decl_var): Change all
bit-fields to unsigned.
2001-12-03 Per Bothner <per@bothner.com>
* parse.y (patch_binop): Minor constant folding.
* parse.y (build_current_thisn): Shorter 'buffer'.
2001-12-03 Per Bothner <per@bothner.com>
* decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
* jcf-write.c (generate_bytecode_insns): Remove support for
CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
* check-init.c (check_init): Likewise.
2001-12-03 Per Bothner <per@bothner.com>
* verify.c (subroutine_nesting): New function.
(verify_jvm_instructions): Use it to fix logic for checking that
we're done with the current subroutine.
* verify.c (verify_jvm_instruction): For OPCODE_checkcast and
OPCODE_instanceof use POP_TYPE macro for better diagnostics.
2001-12-03 Per Bothner <per@bothner.com>
* jcf.h: Fix obvious typo in comment.
* typeck.c (build_null_signature): Add comment.
2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
* expr.c: Remove leading capital from diagnostic messages, as
per GNU coding standards.
* jcf-io.c: Similarly.
* jcf-parse.c: Similarly.
* jv-scan.c: Similarly.
* jvspec.c: Similarly.
* mangle.c: Similarly.
2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
Alexandre Petit-Bianco <apbianco@redhat.com>
* expr.c (build_java_arrayaccess): Call save_expr on array for
correct evaluation order, modified comment, fixed indentation.
* parse.y: (patch_assignment): Correctly extract the array base
from the tree generate by build_java_arrayaccess, added comments.
(patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
Fixes PR java/3096, PR java/3803, PR java/3965.
2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
* expr.c (expand_byte_code): Remove trailing periods from messages.
* jcf-parse.c (load_class, jcf_parse): Similarly.
* jcf-write.c (generate_classfile): Similarly.
* lex.c (java_lex): Similarly.
2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* class.c (add_interface_do): Set BINFO_VPTR_FIELD.
2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
* Make-lang.in (java.generated-manpages): New dummy target.
2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
ASM_FINAL_SPEC.
(lang_specific_pre_link): Use set_input to set input_filename.
Append `main' here.
* jvgenmain.c (usage): Append literal `main' to CLASSNAME.
(main): Fix definition.
Strip `main' from classname.
Fixes PR java/227.
2001-11-18 Roger Sayle <roger@eyesopen.com>
* parse.h (java_expand_switch): Remove old prototype.
2001-11-18 Tom Tromey <tromey@redhat.com>
Fix for PR java/1401:
* jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
arg0 is null.
(generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
correctly.
2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
* lang.c (finish_parse): Rename to java_finish.
(LANG_HOOKS_FINISH, java_finish): New.
2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
* decl.c (init_decl_processing): Rename java_init_decl_processing.
* java-tree.h: New prototype.
* lang.c (java_init): Update prototype. Combine with old init_parse.
2001-11-13 Tom Tromey <tromey@redhat.com>
* gjavah.c (method_signature): New global.
(HANDLE_METHOD): Set it.
(decompile_return_statement): New function.
(decompile_method): Use it.
(print_method_info): Removed `synth' argument.
2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
* java-tree.h (java_set_yydebug): New.
* jcf-parse.c (set_yydebug): Rename java_set_yydebug.
* lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
(print_lang_decl, print_lang_type, print_lang_identifier,
print_lang_statistics, lang_print_xnode): Remove.
2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
* jcf-parse.c (init_lex): Remove.
* lang.c (language_string, lang_identify): Remove.
(struct lang_hooks): Constify.
(LANG_HOOKS_NAME): Override.
(init_parse): Update.
2001-11-08 Andreas Franck <afranck@gmx.de>
* Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
program_transform_name the way suggested by autoconf.
(java.install-common): Also transform auxiliary program names with
program_transform_name.
2001-11-08 Tom Tromey <tromey@cygnus.com>
* parse.y (trap_overflow_corner_case): New rule.
(unary_expression): Use it.
* lex.c (java_init_lex): Don't set minus_seen.
(yylex): Don't use minus_seen. Communicate overflow to parser for
it to handle.
(error_if_numeric_overflow): New function.
* parse.h (minus_seen): Removed field.
(JAVA_RADIX10_FLAG): New define.
2001-11-07 Tom Tromey <tromey@redhat.com>
Patch for PR java/1414:
* parse.y (case_label_list): New global.
(goal): Register case_label_list with GC.
(java_complete_lhs): Save new case on case_label_list.
(patch_switch_statement): Check for duplicate case labels.
2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (patch_assignment): Removed unused third argument.
(java_complete_lhs): Removed unused third argument to patch_assignment.
2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
* lang.c: Include langhooks-def.h.
* Make-lang.in: Update.
2001-10-31 Zack Weinberg <zack@codesourcery.com>
* Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* mangle.c (find_compression_record_match): Don't match compression
records for package name elements unless they occur at the start of
the name. Fix for PR java/4717.
2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* expr.c (expand_java_field_op): Don't special-case references to
java.lang.PRIMTYPE.TYPE.
(build_primtype_type_ref): Removed.
* java-tree.h (build_primtype_type_ref): Remove prototype.
* parse.y (maybe_build_primttype_type_ref): Removed.
(complete_function_arguments): Don't special-case references to
java.lang.PRIMTYPE.TYPE.
(patch_assignment): Likewise.
(array_constructor_check_entry): Likewise.
2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
* mangle.c (static tree compression_table): Fixed leading comment.
* parse.h (struct parser_ctxt): Fixed field comment.
* parse.y (check_pkg_class_access): New prototype, fixed leading
comment, new parameter used to emit error only if passed as true.
(parse_check_super): Pass extra argument to check_pkg_class_access.
(do_resolve_class): Likewise.
(process_imports): Likewise.
(read_import_dir): Fixed indentation.
(find_in_imports_on_demand): New local class_type_name. Local
node_to_use deleted. while loop changed into for loop. Report
multiple definition only for accessible classes. Improved error
message.
(start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
assigned to parameter list, fixed indentation. while loop changed
into for loop, restore TREE_CHAIN on local `tem' before the next
iteration.
2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* lang.c (lang_get_alias_set): Deleted.
2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gjavah.c (jni_print_char): Fix thinko in last change.
* gjavah.c (jni_print_char, decode_signature_piece): Use
safe-ctype macros and/or fold extra calls into fewer ones.
* lex.c (java_read_unicode, java_lex): Likewise.
* lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
* mangle_name.c (append_unicode_mangled_name,
unicode_mangling_length): Likewise.
2001-10-17 Richard Henderson <rth@redhat.com>
* Make-lang.in (java/lang.o): Depend on langhooks.h.
2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
* lang.c (langhooks.h): Included.
(LANG_HOOKS_INIT): Redefined.
(LANG_HOOKS_INIT_OPTIONS): Likewise.
(LANG_HOOKS_DECODE_OPTION): Likewise.
(struct lang_hooks lang_hooks): New initialization.
2001-10-11 Per Bothner <per@bothner.com>
* parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
The former is simpler, and jcf-write.c handles it better.
(java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
or WITH_CLEANUP_EXPR.
* jcf-write.c: Revert Alex's change from 2000-10-18. It is no
longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
* parse.y (patch_if_else_statement): If the condition is constant,
optimize away the test.
2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (patch_cast): Call patch_string on the first operand of
the incoming node, update it if necessary. Fixes PR java/4510.
2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* parse.y (find_as_inner_class): Don't disregard the enclosing scope
when name qualifier matches a package name.
2001-10-08 Tom Tromey <tromey@redhat.com>
Fix for PR java/4489:
* jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
force a new label when computing `body_block'.
2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* jcf-io.c (format_uint): Const-ify.
* lang.c (java_tree_code_type, java_tree_code_length): Likewise.
* lex.c (java_get_line_col): Likewise.
* parse.y (build_incdec): Likewise.
2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (register_incomplete_type): Set JDEP_SUPER to be given
a NULL enclosing context if appropriate. Fixes PR java/4466.
2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (patch_assignment): Use lvalue's original TYPE when
building the final COMPOUND_EXPR.
(try_reference_assignconv): Fixed leading comment.
2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (check_final_variable_indirect_assignment): For
COMPOUND_EXPR, return only if finals were found initialized
properly, if not, keep on checking.
(check_final_variable_global_assignment_flag): New local
error_found, set when appropriate and used to decide whether to
report uninitialized finals. Fixed typo in comment.
2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
* decl.c (init_decl_processing): Fixed typo in predef_filenames
last three initializations. Fixes PR java/4360.
2001-09-21 Richard Henderson <rth@redhat.com>
* class.c (get_dispatch_table): Handle function descriptors.
(build_dtable_decl): Likewise.
* expr.c (build_invokevirtual): Likewise.
2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (patch_method_invocation): Build class initialization
when static finals are used to qualify method invocation.
Fixes PR java/4366.
2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.h: (WFL_STRIP_BRACKET): Re-written using
build_type_name_from_array_name.
(STRING_STRIP_BRACKETS): New macro.
* parse.y (build_type_name_from_array_name): New function.
(array_creation_expression:): Accumulate []s instead of [s.
(cast_expression:): Accumulate []s instead of [s after cast type
name.
(build_array_from_name): Local string deleted, use
build_type_name_from_array_name.
(build_unresolved_array_type): Accumulate []s instead of [s after
type name.
(register_fields): Fixed comment.
(resolve_class): Local name, base deleted, new locals tname and
array_dims. Use build_type_name_from_array_name. Use array_dims to
build array type.
(purify_type_name): Use STRING_STRIP_BRACKETS.
2001-09-18 Andreas Jaeger <aj@suse.de>
* parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
* jv-scan.c: Likewise.
2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (patch_method_invocation): Inner class creation context
check not enforced within constructors. Fixes PR java/1873.
2001-09-16 Tom Tromey <tromey@redhat.com>
* jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
NOTE_PUSH for single-case push. Fixes PR java/4189.
2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
* java-tree.h (TYPE_IMPORT_LIST): New macro.
(TYPE_IMPORT_DEMAND_LIST): Likewise.
(struct lang_type): New fields import_list and import_demand_list.
* parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
(do_resolve_class): New local saved_enclosing_type, initialized,
passed as parameter to find_in_imports and find_in_imports_on_demand.
(find_in_imports): Added paramater enclosing_type, use its
TYPE_IMPORT_LIST when applicable.
(find_in_imports_on_demand): Added parameter enclosing_type, use
its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
declaration and initialization.
(fold_constant_for_init): Switch/restore current_class to the
appropriate context.
2001-09-13 Mark Mitchell <mark@codesourcery.com>
* verify.c (verify_jvm_instructions): Fix typo.
2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* expr.c (expand_invoke): Const-ification.
* parse.y (patch_method_invocation): Likewise.
2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gjavah.c (cxx_keywords): Const-ification.
* keyword.gperf (java_keyword): Likewise.
* lang.c (java_tree_code_name): Likewise.
* lex.c (cxx_keywords): Likewise.
* parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
2001-09-11 Richard Henderson <rth@redhat.com>
* parse.h (ctxp_for_generation): Mark extern.
2001-09-10 Richard Henderson <rth@redhat.com>
* class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
* typeck.c (java_array_type_length, build_prim_array_type):
Represent empty arrays by NULL index.
2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
* java-tree.h (compile_resource_file): Grouped with other prototypes.
* jvspec.c (lang_specific_driver): Removed unused local `ptr.'
2001-09-06 Anthony Green <green@redhat.com>
* class.c (O_BINARY): Define if necessary.
(registerResource_libfunc): Declare.
(init_class_processing): Initilize registerResource_libfunc.
(compile_resource_file): New function.
* java-tree.h (resource_name): Declare.
(compile_resource_file): Declare.
* jcf-parse.c (yyparse): Handle compiling java resource files.
* lang.c (java_decode_option): Handle -fcompile-resource option.
* jvspec.c (lang_specific_driver): Handle -R flag for compiling
resource files.
* gcj.texi (Code Generation): Add documentation for -R flag.
2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
* jcf-write.c (generate_classfile): Issue an error in case of
field/initial value mismatch.
* parse.y (analyze_clinit_body): Keep <clinit> if an array is
being initialized and we're generating bytecode.
(java_complete_lhs): In MODIFY_EXPR section: added comments,
set DECL_INITIAL properly when appropriate.
Fixes PR java/4230
Fixes PR java/4204
2001-09-01 Per Bothner <per@bothner.com>
* parse.y (maybe_yank_clinit): A field without an initializer is not
relevant. All initializers except static final and constant require
<clinit>, regardless of flag_emit_class_files.
2001-08-31 Per Bothner <per@bothner.com>
* class.c (set_constant_value): When not emitting class files, then a
String ConstantValue is a utf8const_ptr_type.
2001-08-30 Per Bothner <per@bothner.com>
* jcf-write.c (generate_classfile): Check that field is primitive
or string before emitting ConstantValue attribute.
2001-08-30 Per Bothner <per@bothner.com>
* parse.y (resolve_qualified_expression_name): If creating a
COMPOUND_EXPR, set it's type correctly.
2001-08-30 Per Bothner <per@bothner.com>
* jcf-io.c (open_class): Set filename field.
* jcf-parse,c (parse_class_file): Set current_function_decl
for better error message when Code attribute is missing.
* lang.c (put_decl_node, lang_print_error): Re-arrange for
better diagnostics, especially for constructors.
2001-08-30 Per Bothner <per@bothner.com>
* jcf-write.c (generate_classfile): Don't write ConstantValue
attribute if field is not final, for compatibility with jdk.
* jcf-write.c (generate_classfile): Convert ConstantValue values
to correct type. Work-around for front-end bug.
* class.c (set_constant_value): Error if constant has wrong type.
2001-08-30 Per Bothner <per@bothner.com>
* jcf-dump.c (print_constant): Fix fencepost error so "Float" and
"Double" are printed at verbosity 1.
* jcf-dump.c (main): Disable flag_print_attributes if --javap.
* jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (patch_assignment): Don't verify final re-assignment here.
(java_complete_lhs): Verify assignments to finals calling
patch_assignment. Verify re-assignments to finals before calling
patch_assignment.
2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
Fixes PR java/1413
2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
* lex.c (java_lex): new local found_hex_digits. Set and then used
in test to reject invalid hexadecimal numbers.
* parse.y (java_complete_tree): Prevent unwanted cast with
initialized floating point finals.
(patch_binop): Emit a warning when detecting a division by zero,
mark result not constant, don't simplify non integer division.
2001-08-28 Per Bothner <per@bothner.com>
* jcf-write.c (generate_bytecode_insns): For increments and
decrements just recurse to push constant. Improvement on Mark's patch.
2001-08-28 Mark Mitchell <mark@codesourcery.com>
* jcf-write.c (generate_bytecode_insns): Generate an integer to
real conversion for increments and decrements of reals.
2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (resolve_qualified_expression_name): Handle unresolved
qualified expressions, prevent numerical qualifiers, fixed typo.
Fixes PR java/4141
2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (check_deprecation): Handle TYPE_DECL in a special case,
don't report anything but deprecated class when marked so. Handle
VAR_DECL.
(patch_method_invocation): Check deprecation on methods and types.
(patch_binop): code becomes an enum tree_code, added default: to
switch to handle that. Detect division by zero, try to fold and
return before using a subroutine.
2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
* jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
file smaller than 4 bytes.
* parse.y (check_inner_circular_reference): New function.
(check_circular_reference): Likewise.
(array_initializer:): Accept {,}.
(java_check_circular_reference): Rewritten using
check_circular_reference and check_inner_circular_reference.
(java_complete_expand_method): Unconditionally save and restore
the unpurged exception list.
(build_dot_class_method_invocation): Unmangle signature parameter.
2001-08-21 Tom Tromey <tromey@redhat.com>
* decl.c (init_decl_processing): Add `throws' field to method
descriptor.
* class.c (make_method_value): Compute `throws' field for method.
2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (resolve_inner_class): Keep local_enclosing to NULL if
circularity is detected.
(ctors_unchecked_throws_clause_p): Fixed leading comment.
2001-08-17 Richard Henderson <rth@redhat.com>
* class.c (emit_register_classes): Add align parameter to
call to assemble_integer.
2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
* jcf-parse.c (load_class): New locals saved and class_loaded. If
loading a class_or_name fails, try considering an innerclass name
and load the enclosing context.
* parse.y (resolve_inner_class): New function.
(find_as_inner_class): Added leading comment.
(register_incomplete_type): Keep the current context as enclosing
context for JDEP_FIELD dependencies.
(do_resolve_class): Locals new_class_decl and super initialized to
NULL. Call resolve_inner_class, explore the enclosing context
superclass if necessary.
Fixes PR java/4007
2001-08-16 Tom Tromey <tromey@redhat.com>
* jcf-dump.c (main): Updated for change to jcf_path_seal.
* gjavah.c (main): Updated for change to jcf_path_seal.
* lang.c (version_flag): New global.
(java_decode_option): Recognize `-version'.
(java_init): Update for change to jcf_path_seal.
* jcf.h (jcf_path_seal): Added `print' argument.
* jcf-path.c (jcf_path_seal): Added `print' argument.
2001-08-13 Zack Weinberg <zackw@panix.com>
* Make-lang.in (java/decl.o): Update dependencies.
* decl.c: Include libfuncs.h, don't include toplev.h.
2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
* decl.c (init_decl_processing): exception_type_node,
class_not_found_type_node, and no_class_def_found_type_node
initialized. predef_filenames augmented accordingly.
instinit_identifier_node initialized.
* java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
* java-tree.h (enum java_tree_index): New entries
JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
(exception_type_node): New macro.
(class_not_found_type_node): Likewise.
(no_class_def_found_type_node): Likewise.
(instinit_identifier_node): Likewise.
(PREDEF_FILENAMES_SIZE): Adjusted.
(TYPE_HAS_FINAL_VARIABLE): Fixed typo.
(struct lang_type): Fixed typo in bitfield name.
(DECL_INSTINIT_P): New macro.
(ID_INSTINIT_P): Likewise.
* jcf-write.c (generate_classfile): instinit$ bears the Synthetic
attribute.
* parse.y (encapsulate_with_try_catch): New function.
(generate_instinit): Likewise.
(build_instinit_invocation): Likewise.
(ctors_unchecked_throws_clause_p): Likewise.
(add_instance_initializer): Deleted.
(build_instance_initializer): Likewise.
(in_instance_initializer): Likewise.
(check_method_redefinition): instinit$ not to be verified.
(java_complete_expand_methods): Generate instinit$, simplified code.
(build_dot_class_method): Eliminated unnecessary locals. Use
encapsulate_with_try_catch, removed unnecessary code.
(fix_constructors): New local iii. Use build_instinit_invocation.
(patch_method_invocation): Added comment.
(maybe_use_access_method): Don't consider instinit$.
(find_applicable_accessible_methods_list): Shorten the search for
instinit$ too.
(java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
(patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
(patch_throw_statement): Likewise. Fixed typo.
2001-08-12 David Edelsohn <edelsohn@gnu.org>
Revert:
2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
ASM_FINAL_SPEC.
(lang_specific_pre_link): Use set_input to set input_filename.
Append `main' here.
* jvgenmain.c (usage): Append literal `main' to CLASSNAME.
(main): Fix definition.
Strip `main' from classname.
Fixes PR java/227.
2001-08-11 Zack Weinberg <zackw@panix.com>
* lex.h: Don't include setjmp.h. Don't define
SET_FLOAT_HANDLER or prototype set_float_handler.
2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
* expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
`poplevel' in the right order.
2001-08-09 Richard Henderson <rth@redhat.com>
* Make-lang.in (class.o): Depend on TARGET_H.
* class.c (emit_register_classes): Use target hooks instead of
assemble_constructor and assemble_destructor.
2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
* check-init.c (flags.h): Include
(check_init): Don't report uninitialized static class
initialization flags, don't free bit index when doing static class
initialization optimization.
(check_for_initialization): Return type changed to `unsigned int.'
(attach_initialized_static_class): New function.
* class.c (add_method_1): Create the initialized static class
table if necessary.
(finish_class): Always emit deferred inline methods.
* decl.c (emit_init_test_initialization): Moved to expr.c
(complete_start_java_method): Don't traverse
DECL_FUNCTION_INIT_TEST_TABLE.
(lang_mark_tree): Mark hash tables in function decls.
* expr.c (emit_init_test_initialization): Moved from decl.c.
(build_class_init): Create LAG_DECL_SPECIFIC for the static class
initialization flag, set DECL_CONTEXT and
LOCAL_CLASS_INITIALIZATION_FLAG.
(java_lang_expand_expr): Emit initialization code for static class
initialized flags when entering block, if necessary.
* gcj.texi (-fno-optimize-static-class-initialization): Documented.
* java-tree.h (flag_optimize_sci): New global variable declaration.
(DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
(DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
(LOCAL_FINAL_P): Fixed typo in comment.
(FINAL_VARIABLE_P): Likewise.
(LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
(LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
(struct lang_decl): New fields `ict', `smic' and `cif.'
(check_for_initialization): New returned value for global.
(attach_initialized_static_class): New global function.
(STATIC_CLASS_INIT_OPT_P): New macro.
* lang-options.h (-fno-optimize-static-class-initialization): New flag.
* lang.c (java_decode_option): Handle
`-fno-optimize-static-class-initialization'
* parse.y (start_complete_expand_method): New function.
(java_expand_method_bodies): Likewise.
(attach_init_test_initialization_flags): Likewise.
(adjust_init_test_initialization): Likewise.
(emit_test_initialization): Likewise.
(java_complete_expand_methods): Nullify abstract and native method
bodies.
(java_complete_expand_method): New locals `fbody', `block_body'
and `exception_copy.' Reorganized: directly return on empty method
bodies, call `start_complete_expand_method', remember definitely
initialized static class in function, don't expand method bodies.
(java_expand_classes): Call `java_expand_method_bodies' before
`finish_class' when compiling to native.
(resolve_expression_name): Use `orig' after building outer class
field access.
(patch_invoke): Remember static method invocations.
2001-08-06 Richard Henderson <rth@redhat.com>
* class.c (emit_register_classes): Pass a symbol_ref and priority
to assemble_constructor.
2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
* java-tree.h (all_class_filename): New macro.
(enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
(BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
newly created IDENTIFIER_NODE to `all_class_filename.'
2001-08-01 Jeff Sturm <jsturm@one-point.com>
* java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
Use ggc_add_tree_root to register roots.
2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
* check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
second operand calling check_init.
* decl.c (complete_start_java_method): Swaped second and third
arguments while creating WITH_CLEANUP_EXPR node.
* jcf-write.c (generate_bytecode_insns): Use second operand
instead of third when handling WITH_CLEANUP_EXPR.
* parse.y (java_complete_lhs): Expand second operand of
WITH_CLEANUP_EXPR nodes.
(patch_synchronized_statement): Swaped second and third arguments
while creating WITH_CLEANUP_EXPR node.
2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (create_interface): Avoid cyclic inheritance report when
syntax error encountered during class definition.
Fixes PR java/2956
2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
ASM_FINAL_SPEC.
(lang_specific_pre_link): Use set_input to set input_filename.
Append `main' here.
* jvgenmain.c (usage): Append literal `main' to CLASSNAME.
(main): Fix definition.
Strip `main' from classname.
Fixes PR java/227.
2001-07-18 Tom Tromey <tromey@redhat.com>
For PR java/2812:
* lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
* lex.c (java_new_lexer): Use ICONV_CONST.
(java_read_char): Likewise.
* Make-lang.in (jc1$(exeext)): Link against LIBICONV.
(jv-scan$(exeext)): Likewise.
2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
* parse.y (check_class_interface_creation): Allow `private' if the
enclosing is not an interface.
(create_interface): Interface tagged public if the enclosing
context is an interface.
(create_class): Class tagged public if the enclosing context
is an interface.
Fixes PR java/2959
2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
* class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
Fixes PR java/2665
2001-07-14 Tim Josling <tej@melbpc.org.au>
* check-init.c (check_init): Remove references to EXPON_EXPR.
2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
Fixes PR java/3602
2001-07-13 Tom Tromey <tromey@redhat.com>
* jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
invocation.
2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (patch_method_invocation): Don't override primary if one
is already provided, but let this$<n> be built. Fixed comment.
2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (empty_statement:): Report empty statement error only
when found at class declaration level.
Fixes PR java/3635
2001-07-12 Tom Tromey <tromey@redhat.com>
* expr.c (expand_load_internal): New function.
(LOAD_INTERNAL): Use it.
2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (verify_constructor_super): Compare anonymous class ctor
args with `valid_method_invocation_conversion_p.'
Fixes PR java/3285
2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
* lang-specs.h: Forbit the use if `-femit-class-file{s}' without
`-fsyntax-only.' Fixes PR java/3248
2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
* jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
current function is static. Fixes PR java/1970
2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (patch_method_invocation): Add enclosing context to ctor
calls if necessary. Fixes PR java/2953
2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (resolve_package): Abort if qualified expression member
isn't right.
(qualify_ambiguous_name): Don't qualify as type if `this' in use.
Fixes PR java/1391
2001-07-07 Zack Weinberg <zackw@stanford.edu>
* verify.c: Don't use // comments.
2001-07-05 Tom Tromey <tromey@redhat.com>
* lang.c (flag_assume_compiled): Removed.
* java-tree.h (flag_assume_compiled): Removed.
* lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
-fhash-synchronization, -fuse-divide-subroutine,
-fcheck-references, -femit-class-file, -femit-class-files,
-fassume-compiled. Updated --encoding information. Changed
-foutput-class-dir to `-d'.
2001-07-04 Daniel Berlin <dan@cgsoftware.com>
* jcf-parse.c (parse_class_file): Add lineno parameter to
debug_start_source_file call.
2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
* gcj.texi: Use gpl.texi.
* Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
dependencies and use doc/include in search path.
2001-07-03 Jeff Sturm <jsturm@one-point.com>
* parse.y (fix_constructors): Test if a CALL_EXPR invokes
`this'. If so, don't build instance initializers.
2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (resolve_expression_name): Improved error message for
inner class cases. Fixes PR java/1958
2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
* lang.c: #include diagnostic.h
(lang_print_error): Add a `diagnostic_context *' parameter.
(java_dummy_print): Likewise.
* Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
* jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
* jcf.h (typedef struct JCF): New bitfield `finished.'
(JCF_FINISH): Set `finished.'
(JCF_ZERO): Reset `finished.'
Fixes PR java/2633
2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (class_body_declaration:): Don't install empty instance
initializers.
Fixes PR java/1314
2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
* class.c (set_super_info): Call `set_class_decl_access_flags.'
(set_class_decl_access_flags): New function.
* java-tree.h (set_class_decl_access_flags): New prototype.
* jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
(parse_class_file): New local `decl_max_locals.' Take wide types
into account to compute DECL_MAX_LOCALS.
* parse.y (type_import_on_demand_declaration:): Ignore duplicate
imports on demand.
2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
* zipfile.h: Use GCC_JCF_H instead of JCF_H.
2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
* class.c (java_hash_tree_node): Fixed indentation in leading comment.
* parse.y (do_resolve_class): Moved comments out to leading comment
section. Removed local `start', New local `_ht' and
`circularity_hash.' Record `enclosing' in hash table and search
it to detect circularity. Use `enclosing' as an argument to
`lookup_cl.' Free the hash table when done.
2001-06-19 Tom Tromey <tromey@redhat.com>
* lex.c (java_read_char): Disallow invalid and overlong
sequences. Fixes PR java/2319.
2001-06-05 Jeff Sturm <jsturm@one-point.com>
* decl.c (create_primitive_vtable): Don't call make_decl_rtl.
2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
* expr.c (force_evaluation_order): Match wrapped ctor calls, locate
arguments accordingly.
2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
* gcj.texi: Move contents to just after title page.
2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (type_literals:): Use `build_incomplete_class_ref' with
builtin type.
(patch_incomplete_class_ref): Build the class ref, build the class
init if necessary, complete the tree.
Fixes PR java/2605
2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (lookup_field_wrapper): Test `name' code.
(resolve_qualified_expression_name): Test `qual_wfl' code.
(qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
handle `qual_wfl' by code.
(maybe_build_primttype_type_ref): Test `wfl' code.
2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
* Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
fdl.texi.
(java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
the dvi file in the java directory.
2001-05-25 Sam TH <sam@uchicago.edu>
* gen-table.pl javaop.h jcf.h lex.h,
parse.h: Fix header include guards.
2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
* jv-scan.c (version): Update copyright year.
2001-05-21 Per Bothner <per@bothner.com>
* jcf-parse.c (read_class): If class is from .class or .zip file
and it's already been read, don't push/pop parser context.
2001-05-18 Per Bothner <per@bothner.com>
* jvspec.c (lang_specific_pre_link): Re-arrange the linker
command line so the jvgenmain-generated main program comes first.
2001-05-15 Tom Tromey <tromey@redhat.com>
* class.c (build_utf8_ref): Don't generate identifier based on
utf8const contents.
2001-05-12 Richard Henderson <rth@redhat.com>
* java-tree.def (JAVA_EXC_OBJ_EXPR): New.
* expr.c (java_lang_expand_expr): Expand it.
(process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
calling build_exception_object_ref.
* parse.y (catch_clause_parameter): Likewise.
(build_dot_class_method): Likewise.
(try_reference_assignconv): Likewise.
* check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
* jcf-write.c (generate_bytecode_insns): Likewise.
2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (build_unresolved_array_type): Set
EXPR_WFL_QUALIFICATION on the newly created wfl.
Fixes PR java/2538. Fixes PR java/2535.
2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (fix_constructors): Removed unnecessary assignment to
local. Moved assignment to `this$<n>', fixed comments and
indentation.
(build_wfl_wrap): Fixed indentation.
Fixes PR java/2598, java/2579 and java/2658.
2001-05-03 Mo DeJong <mdejong@redhat.com>
* lex.c (java_new_lexer): Call iconv_close on temp handle used to
check for byte swap.
2000-05-02 Jeff Sturm <jsturm@one-point.com>
* expr.c (build_class_init): Move MODIFY_EXPR
outside of COND_EXPR. Remove variable `call'.
2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c: NULL_PTR -> NULL.
* jcf-write.c: Likewise.
2001-05-01 Tom Tromey <tromey@redhat.com>
* Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
(java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
* gcj.texi: Updated copyright text. Include fdl.texi.
(Top): Link to new node.
2001-05-01 Per Bothner <per@bothner.com>
* parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
2001-05-01 Per Bothner <per@bothner.com>
* parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
import_list contains the name, not the TREE_PURPOSE.
2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* jcf-io.c (read_zip_member): Cast to long in comparison with
signed value.
* jvspec.c (lang_specific_driver): Initialize variables.
* mangle.c (find_compression_record_match): Likewise.
* typeck.c (build_null_signature): Provide static prototype. Mark
parameter with ATTRIBUTE_UNUSED.
* verify.c (verify_jvm_instructions): Initialize variable.
2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* parse.y (do_resolve_class): Check for cyclic inheritance during
inner class resolution.
2001-04-27 Per Bothner <per@bothner.com>
* parse.y (java_expand_classes): Don't change ctxp_for_generation
while iterating, since that could cause gc to lose stuff.
2001-04-26 Per Bothner <per@bothner.com>
Fix method search wrt scope of inner classes to match JLS2.
* typeck.c (build_null_signature): New static function.
(has_method): New function. Uses build_null_signature and lookup_do.
* java-tree.h (has_method): New declaration.
* parse.y (find_applicable_accessible_methods_list): Do not search
context of inner classes here.
(patch_method_invocation): Search scope, ie. current and outer clases,
for method matching simple name, to find class.
2001-04-26 Per Bothner <per@bothner.com>
* jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
Fix thinko: If a single case, use if_icmpeq, not ifeq.
* constants.c (find_methodref_with_class_index): New function.
(find_methodref_index): Use find_methodref_with_class_index.
* java-tree.h (find_methodref_with_class_index): New declaration.
* jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
DECL_CONTEXT, instead use new find_methodref_with_class_index function.
If context changed from interface to class, don't use invokeinterface.
2001-04-25 Per Bothner <per@bothner.com>
* verify.c (verify_jvm_instructions): For field instructions,
check that field index is valid. For invoke instructions, check that
method index is valid.
2001-04-25 Alexandre Oliva <aoliva@redhat.com>
* config-lang.in (target_libs): Copy from $libgcj_saved.
2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* decl.c (init_decl_processing): Add new class "protectionDomain"
field.
* class.c (make_class_data): Set initial value for "protectionDomain".
2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* jvspec.c (lang_specific_driver): Fix memory allocation
deficit, by using concat in lieu of xmalloc/sprintf.
2001-04-20 Per Bothner <per@bothner.com>
Fixes to compile multiple .class files at once.
* decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
* java-tree.h (CLASS_PARSED_P): New macro.
(CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
* jcf-parse.c (jcf_parse_source): Inline into read_class.
(read_class): Avoid some code duplication.
Don't call JCF_FINISH for a .class file - might be needed later.
(jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
rather than CLASS_LOADED_P, since latter implies class laid out.
(yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
* parse.y: Don't need to set CLASS_LOADED_P for array types.
2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (java/boehm.o): Depend on toplev.h.
* boehm.c: Include toplev.h.
2001-04-06 Tom Tromey <tromey@redhat.com>
Alexandre Petit-Bianco <apbianco@redhat.com>
Fix for PR gcj/1404 and PR gcj/2332:
* parse.y (build_array_from_name): If we use the type_wfl then
accumulate dimensions from the original type as well.
(build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
2001-04-06 Tom Tromey <tromey@redhat.com>
* parse.y (analyze_clinit_body): Return true if the second operand
of a METHOD_EXPR is nonzero.
2001-04-06 Tom Tromey <tromey@redhat.com>
* Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
directory.
($(srcdir)/java/parse.c): Likewise.
2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
* gcj.texi: Use `which-gcj' instead of `which-g77.'
(version-gcc): Initialized.
(which-gcj): Likewise.
2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
* java-tree.h (struct lang_decl): New macro
`DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
* parse.y (build_instance_initializer): New function.
(add_instance_initializer): Use it.
(java_fix_constructors): Set `current_class' before fix pass.
(fix_constructors): Just return if already fixed. Move `super()'
invocation ahead. Use `build_instance_initializer.'
Fixes PR java/1315.
2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (resolve_qualified_expression_name): Pass field's
DECL_CONTEXT to `not_accessible_p.'
(not_accessible_p): Changed parameters order in `inherits_from_p'
invocation.
2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
* lang-options.h: Add flag_check_references.
2001-04-04 Per Bothner <per@bothner.com>
* java-tree.h (CONSTANT_VALUE_P): New macro.
* jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
* parse.y (maybe_build_class_init_for_field): New static function.
(resolve_expression_name, resolve_field_access): Use
maybe_build_class_init_for_field instead of build_class_init
This does not do the init if the field is compile-time-constant.
(resolve_field_access): Simplify.
* parse.y (fold_constant_for_init): Merge test into switch.
2001-04-03 Zack Weinberg <zackw@stanford.edu>
* Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
on gansidecl.h.
* buffer.c, jvgenmain.c: Don't include gansidecl.h.
2001-04-02 Zack Weinberg <zackw@stanford.edu>
* expr.c (pop_type_0): Save the result of the first
lang_printable_name call in a scratch buffer, so it
won't be clobbered by the second call.
2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse-scan.y (array_type:): Rewritten.
(type_declaration:): `empty_statement' replaces `SC_TK.'
(class_member_declaration:): `empty statement' added.
(method_body:): Simplified.
(static_initializer:): Likewise.
(primary_no_new_array:): Use `type_literals.'
(type_literals:): New rule.
(dims:): Set and update `bracket_count.'
Fixes PR java/1074. Fixes PR java/2412.
2001-03-28 Hans Boehm <boehm@acm.org>
* boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
(get_boehm_type_descriptor): Set type on returned value to be a
pointer length integer.
2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* expr.c (pop_type_0): Call `concat' rather than building the
string manually.
(pop_type): Add format specifier in call to `error'.
* parse.y (patch_method_invocation): Avoid casting away
const-ness.
2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
* jvgenmain.c (do_mangle_classname): End string constant with '\0'.
2001-03-28 Richard Henderson <rth@redhat.com>
IA-64 ABI Exception Handling:
* Make-lang.in (except.o): Don't depend on eh-common.h.
* check-init.c (check_init): Handle EXC_PTR_EXPR.
* decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
[soft_exceptioninfo_call_node]: Remove.
[eh_personality_libfunc, lang_eh_runtime_type]: New.
(end_java_method): No emit_handlers.
* except.c (java_set_exception_lang_code): Remove.
(method_init_exceptions): Don't call it.
(prepare_eh_table_type): No CATCH_ALL_TYPE.
(build_exception_object_ref): New.
(expand_end_java_handler): Update for except.h name changes.
(emit_handlers, expand_resume_after_catch): Remove.
* expr.c (java_lang_expand_expr): Update for except.h name changes.
(process_jvm_instruction): Use build_exception_object_ref.
* java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
(soft_exceptioninfo_call_node): Remove.
(build_exception_object_ref): Declare.
* jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
soft_exceptioninfo_call_node. Move processing ...
[EXC_PTR_EXPR]: ... here.
* parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
* parse.y (catch_clause_parameter): Use build_exception_object_ref.
(source_end_java_method): No java_set_exception_lang_code or
emit_handlers.
(build_dot_class_method): Use build_exception_object_ref.
(try_reference_assignconv): Check EXC_PTR_EXPR not
soft_exceptioninfo_call_node.
2001-03-28 Richard Henderson <rth@redhat.com>
* java-tree.h (throw_node): Define as a single member of
java_global_trees instead of a separate array.
(JTI_THROW_NODE): New.
* decl.c (throw_node): Don't declare.
(init_decl_processing): Init a scalar throw_node.
Don't register it for gc.
* check-init.c (check_init): Reference scalar throw_node.
* expr.c (build_java_athrow): Likewise.
* jcf-write.c (generate_bytecode_insns): Likewise.
* parse.h (BUILD_THROW): Likewise.
2001-03-28 Richard Henderson <rth@redhat.com>
* decl.c (end_java_method): Do not save and restore
flag_non_call_exceptions.
* parse.y (source_end_java_method): Likewise.
* lang.c (flag_exceptions): Don't declare.
(java_init_options): Set flag_non_call_exceptions. Set
flag_exceptions here ...
(java_init): ... not here.
2001-03-27 Richard Henderson <rth@redhat.com>
* expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
exceptions_via_longjmp.
* lang.c (flag_new_exceptions): Don't declare it.
(java_init_options): Or set it.
2001-03-27 Richard Henderson <rth@redhat.com>
* decl.c (end_java_method): Rename asynchronous_exceptions to
flag_non_call_exceptions.
* parse.y (source_end_java_method): Likewise.
2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in: Depend on $(SYSTEM_H), not system.h.
2001-03-26 Mark Mitchell <mark@codesourcery.com>
* parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (find_as_inner_class): Follow current package
indications not to mistakingly load an unrelated class.
2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* constants.c (PUTN): Use memcpy, not bcopy.
* lex.c (java_read_char): Use memmove, not bcopy.
* parse.y (java_parser_context_resume): Use memcpy, not bcopy.
2001-03-23 Per Bothner <per@bothner.com>
* verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
macro for better error pin-pointing.
* java-tree.h: Fix typo in comment.
* jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
Don't include jsr/goto in exception range.
Check if start and end of exception range are the same (also TRY_EXPR).
Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
However, do emit the following goto even if try_block is empty.
Defer freeing exception_decl until after the finalizer, to make
sure the local isn't reused in the finalizer. Fixes PR java/1208.
* parse.y (java_complete_lhs): If the try-clause is empty, just
return the finally-clause and vice versa.
2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
* gcj.texi (Input Options): documented the check for attribute
`gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
* java-tree.h (flag_force_classes_archive_check): Declared extern.
* jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
(jcf_parse): Check for the right classes archive if necessary.
* jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
(jcf_parse_fields): Fixed indentation.
* jcf-write.c (append_gcj_attribute): New function.
(generate_classfile): Compute the attribute count, invoke
`append_gcj_attribute'.
* jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
turned into bit-fields. New bit-field `right_zip.'
(JCF_ZERO): Set `right_zip' to zero.
* lang-options.h (-fforce-classes-archive-check): Added flag.
* lang.c (flag_force_classes_archive_check): New flag.
(lang_f_options): New entry `force-classes-archive-check.'
Fixes PR java/1213.
2001-02-07 Andrew Haley <aph@redhat.com>
* gcj.texi (Configure-time Options): Add -fcheck-references.
* expr.c (build_java_indirect_ref): New function.
(java_check_reference): New function.
(build_java_array_length_access): Use build_java_indirect_ref to
check for null references.
(build_java_arrayaccess): Likewise.
(build_get_class): Likewise.
(build_field_ref): Likewise.
(invoke_build_dtable): Likewise.
(build_invokeinterface): Likewise.
* lang.c (lang_f_options): Add flag_check_references.
* jvspec.c (jvgenmain_spec): Add flag_check_references.
* java-tree.h (flag_check_references): New variable.
* lang.c (flag_check_references): Likewise.
* parse.y (patch_invoke): Use java_check_reference.
(patch_assignment): Allow for extra nesting in
_Jv_CheckArrayStore.
2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
* gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
* lex.c (cxx_keywords): Likewise.
2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (qualify_ambiguous_name): Broaden `length'
recognition. Help MODIFY_EXPR be resolved as expression names.
Fixes PR java/2066. Fixes PR java/2400.
2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
* gjavah.c (process_file): Mark interface definitions with
"__attribute__ ((java_interface))".
2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
* class.c (layout_class): Fixed push_super_field's second
argument. Fixes PR java/2333.
(jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
too early to lay innerclasses out.
2001-03-20 Tom Tromey <tromey@redhat.com>
Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (patch_assignment): Handle the case of a SAVE_EXPR
inside an array reference. Insertion of the array store check
rewritten. Fixes PR java/2299.
2001-03-20 Tom Tromey <tromey@redhat.com>
* lex.c (java_read_unicode): Only accept leading `u's.
2001-03-20 Tom Tromey <tromey@redhat.com>
* jcf-parse.c (read_class): Initialize `class'.
2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
* jcf_parse.c (jcf_parse): Eliminate unused variable.
2001-03-19 Mark Mitchell <mark@codesourcery.com>
* class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
(layout_class): Likewise.
(layout_class_method): Likewise.
(emit_register_classes): Likewise.
* decl.c (builtin_function): Likewise.
(give_name_to_locals): Likewise.
2001-03-19 Per Bothner <per@bothner.com>
* jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
before trying to load an inner class.
Fixes to process to command-line .class files in two passes.
* java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
(CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
(CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
* class.c (is_compiled_class): Fix for renamed flag.
* parse.y (maybe_create_class_interface_decl): Likewise.
* jcf-parse.c (yyparse): Also set if compiling .class files.
* jcf-parse.c (read_class); Read current_class.
(jcf_parse): Make static.
(load_inner_classes): New function, with code moved from jcf_parse,
because we need to inner classes after the command-line files are read.
(yyparse): Set finput to NULL when it doesn't need to be closed.
Reduce use of main_jcf (basically only for archive) and
use finput instead of main_jcf->read_state.
Inline jcf_figure_file_type into yyparse.
Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
Defer load_inner_classes and parse_class_file to a second pass,
after we've correctly mapped command-line .clas fiels to classes.
(jcf_figure_file_type): Removed.
* jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
(JCF_ZERO): Also clear zipd field.
* zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
* jcf-parse.c (yyparse): Change ch from char * to char.
2001-03-19 Per Bothner <per@bothner.com>
* jvspec.c (lang_specific_driver): Check for .zip and .jar files.
Add constructed filelist-file at end, following -xjava. Thus any .o
and library files are not affected by the -xjava. Also wrap
explicit @FILE with -xjava and -xnone.
2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
* class.c (build_static_field_ref): Call make_decl_rtl() after
setting the DECL_EXTERNAL flag.
2001-03-17 Per Bothner <per@bothner.com>
* decl.c (clear_binding_level): Fix initializer (broke 03-15).
* jcf-write.c (generate_bytecode_insns): Handle emitting iinc
when result is is needed (target is STACK_TARGET).
* parse.h (JDEP_SOLV): Removed.
* parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
* parse.y (incomplete_class_list): Removed.
(obtain_incomplete_type): Don't use or set incomplete_class_list.
It doesn't work if resolve_class changes the name of an array type
that is on the list and then someone else looks for the modified name.
Also, seems liable to break when compiling multiple source files at
once. So the simplest is to just remove incomplete_class_list -
it is only a minor space win and it is not even clear it saves time.
* parse.y (resolve_class): Remove unneeded promote_type.
2001-03-15 Per Bothner <per@bothner.com>
* java-tree.h (BLOCK_IS_IMPLICIT): New flag.
* parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
* parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
* jcf-parse.c (yyparse): Set/reset input_filename for source file.
* parse.y (java_expand_classes): Likewise.
* parse.y (expand_start_java_method): Was only called once and had a
misleading name, so inline in caller java_complete_expand_method.
(enter_a_block): Likewise inline in enter_block and remove.
Remove junk from when gcc/java was created (by copying from C/C++).
* decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
(struct binding_level): Remove fields keep, keep_if_subblocks,
more_cleanups_ok, have_cleanups (which have never been used).
(pushlevel, poplevel): Remove related useless code.
* class.c (make_class_data): The class_dtable_decl (i.e. the
vtable for Class) should be external, except when compiling Class.
* jvspec.c (lang_specific_driver): Fix -C handling.
Check -save-temps to see if temp @FILE should be deleted.
Follow-up to/fix for February 16 patch.
* verify.c (verify_jvm_instructions): Better error msgs for dup.
(type_stack_dup): Remove no-longer neded error check.
2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
* mangle.c (mangle_record_type): Rename 'from_pointer' argument
to 'for_pointer'. If this type is for a pointer (argument) mangling,
don't surround the element with 'N..E' if the type name is
unqualified.
2001-03-14 Mark Mitchell <mark@codesourcery.com>
* class.c (build_static_field_ref): Use COPY_DECL_RTL,
DECL_RTL_SET_P, etc.
(make_method_value): Likewise.
(get_dispatch_table): Likewise.
* decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
2001-03-07 Tom Tromey <tromey@redhat.com>
* config-lang.in (lang_requires): Define.
2001-03-07 Brad Lucier <lucier@math.purdue.edu>
* typeck.c (convert): Check flag_unsafe_math_optimizations,
not flag_fast_math.
2001-03-05 Per Bothner <per@bothner.com>
Fix a problem where rest_of_decl_compilation applied to
class_dtable_decl causes problems because it was done too early,
before output file was opened.
* decl.c (init_decl_processing): Remove init of class_dtable_decl.
* class.c (class_dtable_decl): Add macro - element of class_roots.
(make_class_data): Define class_dtable_decl.
* java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
2001-03-01 Zack Weinberg <zackw@stanford.edu>
* java/class.c, java/decl.c, java/java-tree.h: Replace all
uses of 'boolean' with 'bool'.
2001-03-01 Zack Weinberg <zackw@stanford.edu>
* lang-specs.h: Add zero initializer for cpp_spec field to all
array elements.
2001-02-16 Per Bothner <per@bothner.com>
Handle compiling multiple input files at once, and @FILE syntax.
* gcj.texi: Updated documentation to match.
* java-tree.h (flag_filelist_file, init_src_parse): New declarations.
* jcf-parse.c (parse_source_file): Split into ...
(parse_source_file_1): New function - and:
(parse_source_file_2): New function.
(yyparse): On -ffilelist-file, open and scan named file.
On first pass over files, only do parse_source_file_1.
A new second pass calls parse_source_file_2 for each file to compile.
(init_jcf_parse): Call init_src_parse.
* jvspec.c (INDIRECT_FILE_ARG): New flag.
(lang_specific_driver): Support @FILELIST-FILE syntax, as well
as multiple input file combined in one compilation.
* lang-options.h: Add -ffilelist-file
* lang.c (flag_filelist_file): New flag variable.
(lang_f_options): Handle -ffilelist-file.
* lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
* parse.h (struct parse_ctxt): Remove fields incomplete_class and
gclass_list - use global fields of src_parse_roots instead.
* parse.y (src_parse_roots): New array.
(incomplete_class_list, gclass_list): New macros.
(push_parser_context, java_pop_parser_context,
java_parser_context_resume): Don't fiddle with deleted fields.
(various): Use incomplete_class gclass_list and global macros
instead of parse_ctxt fields - the lists are global.
(init_src_parse): New function.
2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (check_inner_class_access): Moved declaration of local
`enclosing_decl_type' to the right location.
2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
* parse.y (parser_check_super_interface): Don't call
check_pkg_class_access for an inner interface.
(parser_check_super): Don't call check_pkg_class_access for inner
class.
(do_resolve_class): Simplify enclosing type loop. Don't call
check_pkg_class_access if CL and DECL are not set.
(find_in_imports_on_demand): Set DECL if class_type needed to be
loaded. Don't call check_pkg_class_access for an inner class.
(check_inner_class_access): Rewritten to implement member access
rules as per spec 6.6.1.
(check_pkg_class_access): Handle the empty package correctly.
(in_same_package): New function. Determine if two classes are in the
same package.
2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
* typeck.c (build_java_array_type): Don't try to poke a public `clone'
method into array types.
* parse.y (patch_method_invocation): Bypass access check on clone call
to array instance.
2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
* expr.c (build_instanceof): Check for arrays when trying fold to
false.
2001-02-15 Jim Meyering <meyering@lucent.com>
* Make-lang.in (java.install-common): Depend on `installdirs'.
(java.install-info): Likewise.
2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
* Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
2001-02-14 Tom Tromey <tromey@redhat.com>
Alexandre Petit-Bianco <apbianco@cygnus.com>
Fix for PR java/1261.
* typeck.c (build_java_array_type): Add public `clone' method to
arrays.
* parse.y (resolve_qualified_expression_name): Use current_class
when checking for inaccessibility.
(patch_method_invocation): Fixed error message when accessibility
denied. Added `from_super' argument.
2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (resolve_class): Don't build a fake decl. Use the one
already built.
* typeck.c (build_java_array_type): Build and assign decl to array
type.
2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (not_accessible_p): Changed leading comment. Added extra
`where' argument. Use it to enforce protected access rules.
(resolve_qualified_expression_name): Added extra argument to
not_accessible_p.
(patch_method_invocation): Use argument `primary' to provide
not_accessible_p with an extra argument.
(lookup_method_invoke): Added extra argument to not_accessible_p.
(search_applicable_method_list): Likewise.
2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (resolve_qualified_expression_name): Try to resolve as
an inner class access only if `decl' is a TYPE_DECL.
2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (classdollar_identifier_node): Initialize.
* java-tree.h (enum java_tree_index): New entry
`JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
(classdollar_identifier_node): New macro.
(ID_CLASSDOLLAR_P): Likewise.
* parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
(build_dot_class_method_invocation): Likewise.
(find_applicable_accessible_methods_list): `class$' can't be
inherited.
2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
* Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
* Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
* jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
gone.
2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
* mangle_name (append_unicode_mangled_name): Emit `_' or `U'
outside of the `__U' sequence too.
(unicode_mangling_length): Count `_' or `U' outside of the `__U'
sequence too.
2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
* jvgenmain.c (error): Reversed 2001-02-01 deletion.
2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
(JVGENMAIN_OBJS): Likewise.
* java-tree.h (append_gpp_mangled_name): New prototype.
* jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
Removed cast calling `gcc_add_root.'
* jvgenmain.c (mangle_obstack): New global, initialized.
(main): Use it.
(do_mangle_class): Constify local `ptr.'
Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
append_gpp_mangle_name and update `count' if necessary.
Use `mangle_obstack.'
* mangle.c (append_unicode_mangled_name): Removed.
(append_gpp_mangled_name): Likewise.
(unicode_mangling_length): Likewise.
(mangle_member_name): Return type set to `void.'
(mangle_field_decl): Don't append `U' in escaped names.
(mangle_method_decl): Likewise.
(mangle_member_name): Just use `append_gpp_mangled_name.'
* mangle_name.c: New file.
2001-02-07 Per Bothner <per@bothner.com>
* check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
* check-init.c (check_init): Don't call done_alternative after
processing loop code, as a LOOP_EXPR never terminates normally.
2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
* gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
DECLs.
2001-02-06 Tom Tromey <tromey@redhat.com>
* lex.c (java_new_lexer): Longer error message.
2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
Alexandre Petit-Bianco <apbianco@cygnus.com>
* typeck.c (build_prim_array_type): Added leading comment.
(build_java_array_type): Moved locals out of
block. Always create the `data' field, fixed alignment to match
C++.
2001-02-04 Tom Tromey <tromey@redhat.com>
* expr.c (java_lang_expand_expr): Don't bother recomputing
`length'. Use rest_of_decl_compilation, not make_decl_rtl.
Fixes PR java/1866.
2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (process_imports): Save the original name of the import
for better error report.
2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
* Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
of macros used when compiling jvspec.c.
* jvspec.c (lang_specific_driver): Link with the shared
libgcc by default.
2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* check-init.c (check_init): Call internal_error instead of fatal.
* expr.c (java_lang_expand_expr): Likewise.
* jcf-parse.c (get_constant): Likewise.
* mangle.c (java_mangle_decl): Likewise.
* parse.y (make_nested_class_name, java_complete_lhs): Likewise.
(operator_string): Likewise.
* check-init.c (check_init): Call abort instead of fatal.
* class.c (build_class_ref): Likewise.
* constants.c (write_constant_pool): Likewise.
* decl.c (start_java_method): Likewise.
* expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
(java_stack_dup, encode_newarray_type): Likewise.
(build_java_array_length_access): Likewise.
(build_java_check_indexed_type, expand_java_pushc): Likewise.
(build_java_soft_divmod, build_invokeinterface): Likewise.
* java-tree.h (INNER_CLASS_P): Likewise.
* jcf-parse.c (parse_signature, get_name_constant): Likewise.
(give_name_to_class, get_class_constant): Likewise.
* jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
(find_constant_index, generate_bytecode_conditional): Likewise.
(generate_bytecode_insns, perform_relocations): Likewise.
* lex.c (java_unget_unicode, java_lex): Likewise.
* mangle.c (mangle_type, mangle_record_type): Likewise.
(mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
(finish_mangling): Likewise.
* parse.h (MARK_FINAL_PARMS): Likewise.
* parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
(obtain_incomplete_type, java_complete_class): Likewise.
(java_check_regular_methods, java_complete_expand_method): Likewise.
(cut_identifier_in_qualified, check_deprecation): Likewise.
(patch_invoke, find_applicable_accessible_methods_list): Likewise.
(java_complete_lhs, lookup_name_in_blocks): Likewise.
(check_final_variable_indirect_assignment, build_unaryop): Likewise.
* typeck.c (set_local_type, parse_signature_type): Likewise.
(parse_signature_string, build_java_signature): Likewise;
(set_java_signature): Likewise.
* verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
* class.c (add_method): Call fatal_error instead of fatal.
(build_static_field_ref): Likewise.
* expr.c (build_known_method_ref, expand_invoke): Likewise.
* jcf-parse.c (get_constant, jcf_parse): Likewise.
* lex.c (java_new_new_lexer): Likewise.
* jv-scan.c (main): Likewise.
(fatal_error): Renamed from fatal.
* jcf-parse.c (yyparse): Call fatal_io_error instead of
pfatal_with_name.
* jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
(yyparse): Likewise.
* jcf-write.c (make_class_file_name, write_classfile): Likewise.
* lex.c (java_get_line_col): Likewise.
* jcf-parse.c (load_class): Make errors non-fatal.
* lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
* jvgenmain.c (class_mangling_suffix): Remove unused string.
(error): Remove unused function.
(main): Don't use "__attribute__ alias" on generated class symbol.
2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
argument.
* parse.y (finish_method_declaration): Code accounting for WFLed
method DECL_NAMEs deleted.
(check_abstract_method_definitions): Likewise.
(resolve_type_during_patch): Layout resolved type.
* typeck.c (lookup_do): Removed unused local.
2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
* java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
* decl.c (init_decl_processing): Use integer_minus_one_node, not
integer_negative_one_node.
* expr.c (build_java_binop): Likewise.
2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
* zextract.c (read_zip_archive): Read file_offset before writing
zipd and consequently clobbering the header contents.
2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in: Remove all dependencies on defaults.h.
* decl.c: Don't include defaults.h.
* expr.c: Likewise.
* parse.y: Likewise.
2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* ChangeLog (2001-01-21): Fixed typo.
* class.c (layout_class_method): Code accounting for WFLed
method DECL_NAMEs deleted.
* constant.c (find_methodref_index): Likewise.
* decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
* java-tree.h (DECL_FUNCTION_WFL): New macro.
(struct lang_decl): New field `wfl'.
(java_get_real_method_name): Prototype deleted.
* mangle.c (mangle_method_decl): Code accounting for WFLed
method DECL_NAMEs deleted.
* parse.h (GET_METHOD_NAME): Macro deleted.
* parse.y (reset_method_name): Deleted.
(method_header): Set DECL_FUNCTION_WFL.
(check_abstract_method_header): Code accounting for WFLed method
DECL_NAMEs deleted.
(java_get_real_method_name): Deleted.
(check_method_redefinition): Code accounting for WFLed method
DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
(java_check_regular_methods): Likewise.
(java_check_abstract_methods): Likewise.
(java_expand_classes): Don't call `reset_method_name.'
(search_applicable_method_list): Use DECL_NAMEs instead of
GET_METHOD_NAME.
* typeck.c (lookup_do): Code accounting for WFLed method
DECL_NAMEs deleted.
2001-01-25 Richard Earnshaw <rearnsha@arm.com>
* lex.c (java_read_char): Check for EOF from getc first.
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class): Don't lay the superclass out if it's
already being laid out.
* jcf-parse.c (handle_innerclass_attribute): New function.
(HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
handle_innerclasses_attribute.
(jcf_parse): Don't load an innerclasses if it's already being
laid out.
* jcf-write.c (append_innerclass_attribute_entry): Static
`anonymous_name' and its initialization deleted. `ocii' and `ini'
to be zero for anonymous classes.
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
necessary.
* jcf-parse.c (set_source_filename): Use
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
gets a unique asm name.
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
(HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
if necessary.
(HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
* jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
* parse.y (lookup_package_type_and_set_next): Deleted.
(resolve_package): Removed unnecessary code.
(find_applicable_accessible_methods_list): `finit$' can't be
inherited.
* verify.c (pop_argument_types): Added missing prototype.
2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
* config-lang.in: Disable java by default.
2001-01-23 Tom Tromey <tromey@redhat.com>
* gcj.texi (Copying): New node.
Added copyright information.
2001-01-21 Per Bothner <per@bothner.com>
Various fixes to allow compiling a compressed .jar/.zip archive.
* zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
(struct ZipFile): Add fields name and next (from ZipFileCache).
(struct ZipDirectory): New field zipf points to owning ZipFile.
* jcf.h (struct ZipDirectory): Add forward declaration.
(struct JCF): Declare zipd field to have type struct ZipDirectory.
Remove seen_in_zip and zip_offset fields.
(JCF_SEEN_IN_ZIP): New macro.
* zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
* jcf-io.c: Change all ZipFileCache to ZipFile.
(read_zip_member): New function.
(open_in_zip): Call read_zip_member.
* jcf-parse.c (find_in_current_zip): Remove function.
(read_class): Merge in find_in_current_zip functionality.
Call read_zip_member if needed.
(parse_zip_file_entries): Use read_zip_member.
(process_zip_dir): Update for removed and added JCF fields.
(jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
2001-01-21 Per Bothner <per@bothner.com>
Minor optimization of static ggc roots.
* jcf-parse.c (parse_roots): New static field.
(current_field, current_method, current_file_list): Replace by macros
naming fields of parse_roots.
(init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
* class.c (class_roots): New static field.
(registered_class, fields_ident, info_ident, class_list):
New macros naming fields of parse_roots.
(build_static_field_ref): Don't register roots here.
(layout_class): Static field list replaced by macro class_list.
(init_class_processing): Call ggc_add_tree_root for 4 roots.
Initialize fields_ident and info_ident here.
2001-01-21 Per Bothner <per@bothner.com>
* jcf-parse.c (ggc_mark_jcf): New function.
(init_jcf_parse): Register current_jcf as ggc root.
2001-01-21 Per Bothner <per@bothner.com>
* lang.c (put_decl_node): Print method's name.
2001-01-21 Per Bothner <per@bothner.com>
* verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
(verify_jvm_instructions): Use it, for better error messages on loads.
2001-01-21 Per Bothner <per@bothner.com>
* verify.c (merge_type_state): Still may have to merge even if
LABEL_VERIFIED (label).
2001-01-21 Per Bothner <per@bothner.com>
* parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
2001-01-19 Per Bothner <per@bothner.com>
* expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
if expeting an interface type. Refines Tom's change of 2000-09-12.
2001-01-18 Per Bothner <per@bothner.com>
* gcj.texi (Input Options): Mention .java files.
2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lang-options.h (-Wunsupported-jdk11): Removed.
* lang.c (flag_not_overriding): Deleted.
(flag_static_local_jdk1_1): Likewise.
(lang_W_options): Removed "unsupported-jdk11" entry.
* parse.y (java_check_methods): Removed dead code.
2001-01-17 Tom Tromey <tromey@redhat.com>
Changes suggested by Per Bothner:
* gcj.texi (Input Options): Don't mention input files.
(Code Generation): Updated --main information.
(Invoking jcf-dump): Mention that --javap is incomplete.
From Alexandre Petit-Bianco:
(Warnings): Don't mention -Wunsupported-jdk11.
My stuff:
(Compatibility): Mention JDK 1.2-ness of libraries.
(Resources): Mention resources used when writing gcj.
2001-01-17 Tom Tromey <tromey@redhat.com>
* gcj.texi: New file.
* Make-lang.in ($(srcdir)/java/gcj.info): New target.
(java.info): Depend on gcj.info.
(java/gcj.dvi): New target.
(java.dvi): Depend on gcj.dvi.
(java.install-info): Wrote.
2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
* expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
having called make_decl_rtl.
2001-01-14 Per Bothner <per@bothner.com>
Various patches to emit better messages on verification errors.
* expr.c (push_type_0): Return error indication on stack overflow,
instead of callinfg fatal.
(push_type): Now just call push_type_0 (nd fatal on overflow).
(pop_type_0): Return detailed error message (in a char** argument).
(pop_type): If pop_type_0 fails, print error message.
(pop_argument_types): Moved to verify.c.
* verify.c (pop_argument_types): Moved from expr.c.
Return a (possible) error message, rather than void.
(POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
(verify_jvm_instruction): Use new macros, improving error messages.
For case OPCODE_astore use object_ptr_type_node.
* java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
(pop_type_0, push_type_0, pop_argument_types): Update accordingly.
* parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
constant, return body without wrapper. (Improves constant folding.)
* lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
2001-01-13 Per Bothner <per@bothner.com>
* expr.c (expand_java_field_op): Assigning to a final field outside
an initializer does not violate JVM spec, so should be warning, not
error. (Sun's verifier does not complain - though MicroSoft's does.)
2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
* gjavah.c (version), jcf-dump.c (version): Update copyright year
to 2001.
2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
* parse.y (resolve_expression_name): Permit instance variables from
enclosing context in super constructor call.
(resolve_qualified_expression_name): Permit enclosing class's qualified
"this" in super constructor call.
2001-01-10 Mark Mitchell <mark@codesourcery.com>
* class.c (build_utf8_ref): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
(build_class_ref): Likewise.
(build_static_field_ref): Likewise.
(get_dispatch_table): Likewise.
(layout_class_method): Likewise.
(emit_register_classes): Likewise.
* constants.c (build_constant_data_ref): Likewise.
* decl.c (builtin_function): Likewise.
(create_primitive_vtable): Likewise.
* expr.c (build_known_method_def): Likewise.
(build_jni_stub): Likewise.
(java_lang_expand_expr): Likewise.
2001-01-10 Tom Tromey <tromey@redhat.com>
* jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (lang_printable_name_wls): New prototype.
* lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
rather than `current_class' to print type name. Don't prepend type
names when printing constructor names.
(lang_printable_name_wls): New function.
* jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
`build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
* parse.y (patch_method_invocation): Message tuned for constructors.
(not_accessible_p): Grant `private' access from within
enclosing contexts.
2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
All files with updated copyright when applicable.
* Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
* class.c (mangle_class_field): Function removed.
(append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
(utf8_cmp, cxx_keyword_p): Moved to lex.c.
(build_class_ref): Call `java_mangle_class_field' instead of
`mangle_class_field.'
(build_dtable_decl): Rewritten to call `java_mangle_vtable.'
(layout_class): Call `java_mangle_decl' instead of
`mangle_static_field.'
(cxx_keywords): Initialized static array moved to `lex.c.'
(layout_class_method): Changed leading comment. Simplified to
call `java_mangle_decl.' Local `ptr' moved in for loop body.
* decl.c (lang_mark_tree): Mark field `package_list.'
* java-tree.h (TYPE_PACKAGE_LIST): New macro.
(struct lang_type): New field `package_list.'
(unicode_mangling_length): Prototype removed.
(append_gpp_mangled_name, append_gpp_mangled_classtype,
emit_unicode_mangled_name): Likewise.
(cxx_keyword_p): New prototype.
(java_mangle_decl, java_mangle_class_field,
java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
* jcf-parse.c (jcf_parse_source): Constify `file' argument to
`build_expr_wfl.'
* jvgenmain.c (main_method_prefix): Global variable removed.
(main_method_suffix): Likewise.
(do_mangle_classname): New function.
(main): Call it. Format changed to accommodate new mangling scheme.
* lex.c: (utf8_cmp): Conditionally prototyped.
(cxx_keywords): Moved from class.c, conditionally defined.
(utf8_cmp, cxx_keyword_p): Likewise.
* mangle.c (obstack.h, ggc.h): Included.
(mangle_field_decl): New function.
(mangle_method_decl, mangle_type, mangle_pointer_type,
mangle_array_type, mangle_record_type,
find_compression_pointer_match, find_compression_array_match,
find_compression_record_match,
find_compression_array_template_match, set_type_package_list,
entry_match_pointer_p, emit_compression_string, init_mangling,
finish_mangling, compression_table_add, mangle_member_name): Likewise.
(mangle_obstack): New global.
(MANGLE_RAW_STRING): New macro.
(unicode_mangling_length): Turned static.
(append_unicode_mangled_name): Renamed from
`emit_unicode_mangled_name.' Turned static. `mangle_obstack'
replaces `obstack', removed from the parameter list.
(append_gpp_mangled_name): Turned static. `mangle_obstack'
replaces parameter `obstack', removed from the parameter list. Call
`append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
(append_gpp_mangled_classtype): Removed.
(compression_table, compression_next): New static variables.
* parse.y (temporary_obstack): Extern declaration removed.
2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_binop): Compute missing type in error situations.
2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
* class.c (make_class_data): Push initial value for "arrayclass".
* decl.c (init_decl_processing): Add new class field "arrayclass".
2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
From patha@softlab.ericsson.se:
* parse.y (switch_label): Use build, not build1, to construct
DEFAULT_EXPR.
2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
* lang.c (lang_decode_option): Change -MA to -MP.
* jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
Update to new prototype; do quote targets.
(jcf_dependency_write): Update.
2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
Shorten primitive array allocation path:
* decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
to create new primitive arrays.
* expr.c (build_newarray): If generating native code, call
soft_newarray_node with a reference to the primitive TYPE identifier
instead of type_value.
2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
Fix for PRs gcj/312 and gcj/253:
* parse.y (valid_ref_assignconv_cast_p): Load classes for source and
dest if they arn't already.
* class.c (layout_class): Call maybe_layout_super_class on
superinterfaces also, but only if compiling from bytecode.
Fix for PR gcj/373:
* parse.y (create_class): Set ACC_STATIC if class is declared in an
interface.
2000-12-15 Tom Tromey <tromey@redhat.com>
* jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
set.
2000-12-14 Andrew Haley <aph@redhat.com>
* boehm.c (mark_reference_fields): Change test to correctly detect
bitmap overflow.
2000-12-15 Andreas Jaeger <aj@suse.de>
* config-lang.in (lang_dirs): Added.
2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (end_artificial_method_body): Fixed undefined behavior.
Credits go to rth for finding it.
2000-12-13 Mike Stump <mrs@wrs.com>
* parse.y (check_static_final_variable_assignment_flag): Fix spelling.
2000-11-07 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (JAVA_LEX_C): Added chartables.h.
* lex.c (java_ignorable_control_p): Removed.
(java_letter_or_digit_p): Removed.
(java_start_char_p): New function.
(java_read_char): Return `int', not `unicode_t'. Changed
callers.
(java_read_unicode): Likewise.
(java_read_unicode_collapsing_terminators): Likewise.
(java_get_unicode): Likewise.
(java_new_lexer): Initialize hit_eof.
(java_parse_end_comment): Take `int' argument.
(java_parse_doc_section): Likewise.
(java_parse_escape_sequence): Don't allow backlash-newline.
Return `int'.
* lex.h (JAVA_DIGIT_P): Removed.
(_JAVA_LETTER_OR_DIGIT_P): Removed.
(_JAVA_IDENTIFIER_IGNORABLE): Removed.
(JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
(JAVA_PART_CHAR_P): New macro.
(UEOF): Now -1.
(JAVA_CHAR_ERROR): Now -2.
(java_lexer): New field `hit_eof'.
* chartables.h: New file.
* gen-table.pl: new file.
2000-11-20 Tom Tromey <tromey@cygnus.com>
Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_complete_lhs): Only allow compound assignment of
reference type if type is String.
2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
jcf-path.c: Likewise.
2000-12-09 Anthony Green <green@redhat.com>
* zipfile.h (ZipDirectory): Declare size, uncompressed_size,
filestart and filename_length as int values.
2000-12-07 Mo DeJong <mdejong@redhat.com>
* jcf-io.c (find_class): Correct the logic that tests to see if a
.java file is newer than its .class file. The compiler was
incorrectly printing a warning when file mod times were equal.
2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
* jvgenmain.c: Use ISPRINT not isascii.
2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (end_artificial_method_body): Fixed typo.
2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_method_invocation): Pick the correct enclosing
context when creating inner class instances.
Fixes gcj/332.
2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
* gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
Update copyright year to 2000.
2000-11-23 Anthony Green <green@redhat.com>
* jcf-parse.c (init_jcf_parse): Register current_file_list root.
Move current_file_list out of yyparse and make it static.
* expr.c: Declare quick_stack and tree_list_free_list as static
(init_expr_processing): Register quick_stack and
tree_list_free_list roots.
2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (build_outer_field_access): New local `decl_ctx', use
it. Check for field's context and current class immediate outer
context inheritance.
(outer_field_access_p): Consider fields inherited from the last
enclosing context.
(build_access_to_thisn): Stop at the last enclosing context if
necessary.
Fixes gcj/367.
2000-11-23 J"orn Rennecke <amylaar@redhat.com>
* Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
* jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
scratch buffer.
2000-11-20 Tom Tromey <tromey@cygnus.com>
* jv-scan.c (help): Document --complexity.
(options): Added --complexity.
(flag_complexity): New global.
(main): Call `report'.
* parse-scan.y (complexity): New global.
(if_then_statement, if_then_else_statement,
if_then_else_statement_nsi, switch_block_statement_group,
while_expression, do_statement, for_begin, continue_statement,
throw_statement, catch_clause, finally, method_invocation,
conditional_and_expression, conditional_or_expression,
conditional_expression): Update complexity.
(reset_report): Reset complexity.
(report): New function.
2000-11-20 Tom Tromey <tromey@cygnus.com>
* lex.c (yylex): Added STRICT_TK case.
* parse.y (STRICT_TK): Added.
* parse-scan.y (STRICT_TK): Added.
* Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
`;'. Use 4, not 3, with -k option. Correctly rename resulting
file.
* keyword.h: Rebuilt.
* keyword.gperf (strictfp): Added.
2000-11-20 Tom Tromey <tromey@cygnus.com>
* lex.c (yylex): Recognize floating point constants with leading
0.
2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* java-tree.h (cyclic_inheritance_report): Constify.
* parse.y (cyclic_inheritance_report): Likewise.
2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
* parse.y (goal): Remove call to ggc_add_string_root.
2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
* jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
Create string in scratch buffer, then pass to build_string.
2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
* parse.y (issue_warning_error_from_context): Add
ATTRIBUTE_PRINTF.
2000-11-11 Anthony Green <green@redhat.com>
* jcf-parse.c (process_zip_dir): Add finput parameter.
(jcf_figure_file_type): Call process_zip_dir with appropriate
argument.
2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (copy_lang_decl): Use memcpy, not bcopy.
* jcf-parse.c (jcf_figure_file_type): Likewise.
2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
* parse.y (create_new_parser_context): Use memset () instead of
bzero ().
2000-11-08 Tom Tromey <tromey@cygnus.com>
* gjavah.c (process_file): Only include gcj/cni.h when generating
CNI stubs.
2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
* expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
(init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
instead of bzero ().
2000-11-05 Tom Tromey <tromey@cygnus.com>
* lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
* lex.c (IS_ZERO): New define.
(java_perform_atof): Error on floating point underflow.
2000-11-04 Tom Tromey <tromey@cygnus.com>
* lex.c (java_parse_escape_sequence): Only read two octal
characters if the first one is greater than 3. Don't allow
"octal" numbers to include the digits 8 or 9.
2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
* Make-lang.in (java.distdir): Remove.
2000-11-03 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (java.dvi): New target.
Partial fix for PR other/567.
* lang-options.h: Mention -Wout-of-date.
* jcf-dump.c (flag_newer): New global.
* gjavah.c (flag_newer): New global.
* jcf-io.c (find_class): Only warn when flag_newer set.
* lang.c (flag_newer): New global.
(struct string_option): New declaration.
(lang_W_options): New global.
(process_option_with_no): New function.
(lang_decode_option): Use it.
* class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
* gjavah.c (cxx_keyword_subst): Handle any number of trailing
`$'.
* lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
(JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
* lex.c (java_read_unicode): Removed `term_context' argument.
Recognize any number of `u' in `\u'.
(java_read_unicode_collapsing_terminators): New function.
(java_get_unicode): Use it.
(java_lineterminator): Removed.
(yylex): Produce error if character literal is newline or single
quote. Return if eof found in middle of `//' comment. EOF in
`//' comment is only an error if pedantic.
(java_ignorable_control_p): New function.
(java_parse_end_comment): Return if eof found in middle of
comment.
Include flags.h.
* jv-scan.c (pedantic): New global.
2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (outer_field_access_p): Inherited fields aren't
consider outer fields.
(maybe_build_thisn_access_method): Use
PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
(resolve_expression_name): Trigger an error if a static field
is being accessed as an outer field.
2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
Fixes gcj/365.
2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
* Make-lang.in: Move all build rules here from Makefile.in,
adapt to new context. Wrap all rules that change the current
directory in parentheses. Expunge all references to $(P).
When one command depends on another and they're run all at
once, use && to separate them, not ;. Add OUTPUT_OPTION to
all object-file generation rules. Delete obsolete variables.
* Makefile.in: Delete.
* config-lang.in: Delete outputs= line.
2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_method_invocation): NULLify this_arg when already
inserted.
(maybe_use_access_method): Handle call to methods unrelated to the
current class. Fixed comment.
Fixes gcj/361.
2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
scope.
2000-10-24 Tom Tromey <tromey@cygnus.com>
* lex.c (java_new_lexer): Initialize new fields. Work around
broken iconv() implementations.
(java_read_char): Swap bytes if required. Use fallback decoder if
required.
(byteswap_init, need_byteswap): New globals.
(java_destroy_lexer): Only close iconv handle if it is in use.
* lex.h (java_lexer): New fields read_anything, byte_swap,
use_fallback.
Made out_buffer unsigned.
2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (register_incomplete_type): Include JDEP_FIELD as a case
where an enclosing context can be set on the jdep.
(do_resolve_class): Fixed identation.
2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
* jcf-reader.c (peek_attribute, skip_attribute): Only define
when requested.
* parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
* verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (OP1): Update `last_bc'.
(struct jcf_block): Fixed indentation and typo in comments. New
field `last_bc'.
(generate_bytecode_insns): Insert `nop' if `jsr' immediately
follows `monitorenter'.
* parse.y (patch_synchronized_statement): New local `tmp'. Call
`patch_string'.
Fixes gcj/232.
2000-10-16 Tom Tromey <tromey@cygnus.com>
* jvspec.c (lang_specific_driver): Recognize -MF and -MT.
* lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
* lang-options.h: Added -MA, -MT, -MF..
* lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
(DEPEND_TARGET_SET): New macro.
(DEPEND_FILE_ALREADY_SET): Likewise.
(init_parse): Handle new flags.
* jcf.h (jcf_dependency_print_dummies): Declare.
* Make-lang.in (s-java): Added mkdeps.o.
* Makefile.in (BACKEND): Added mkdeps.o.
(../gcjh$(exeext)): Added mkdeps.o.
(../jcf-dump$(exeext)): Added mkdeps.o.
* jcf-depend.c: Include mkdeps.h.
(struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
add_entry): Removed.
(jcf_dependency_reset): Rewrote.
(dependencies): New global.
(jcf_dependency_set_target): Rewrote.
(jcf_dependency_add_target): Likewise.
(jcf_dependency_add_file): Likewise.
(munge): Removed.
(print_ents): Removed.
(jcf_dependency_write): Rewrote.
(print_dummies): New global.
(jcf_dependency_print_dummies): New function
(jcf_dependency_write): Call deps_dummy_targets if required.
2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
* gjavah.c (add_class_decl): Removed unused variables `tname',
`tlen' and `name_index'.
* java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
* jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
in `wfl_operator' with value.
(yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
(jcf_figure_file_type): Fixed identation.
* lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
* parse.y (analyze_clinit_body): New function.
(static_initializer:): Reset `current_static_block'.
(java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
`wfl_operator' with new value.
(lookup_cl): Use EXPR_WFL_FILENAME.
(maybe_yank_clinit): Handle bogus <clinit> bodies, call
analyze_clinit_body.
(build_outer_field_access): Access to this$<n> built from
current_class, not its outer context.
(build_access_to_thisn): Fixed leading comment. Tidied things up.
(resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
(patch_method_invocation): Use `is_static_flag' when already
initialized.
(patch_newarray): Removed assignment in ternary operator.
2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* except.c (free_eh_ranges): Don't free `whole_range'.
2000-10-15 Anthony Green <green@redhat.com>
* decl.c (init_decl_processing): Call init_class_processing before
anything else.
2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* check-init.c (check_init): Fixed leading comment. Use
LOCAL_FINAL_P.
* decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
(give_name_to_locals): Likewise.
(lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
fields in lang_decl_var.
* java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
(FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
(FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
(LOCAL_FINAL): Rewritten.
(LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
(struct lang_decl): Fixed comments. Added `synthetic_ctor' and
`init_final' fields.
(struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
`final_uid', `final_liic', `final_ierr' and `local_final' fields.
(TYPE_HAS_FINAL_VARIABLE): New macro.
(struct lang_type): Added `afv' field.
* parse.y (check_static_final_variable_assignment_flag): New function.
(reset_static_final_variable_assignment_flag): Likewise.
(check_final_variable_local_assignment_flag): Likewise.
(reset_final_variable_local_assignment_flag): Likewise.
(check_final_variable_indirect_assignment): Likewise.
(check_final_variable_global_assignment_flag): Likewise.
(add_inner_class_fields): Use LOCAL_FINAL_P.
(register_fields): Handle local finals and final variables.
(craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
(declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
(source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
on local finals.
(java_complete_expand_methods): Loop to set
TYPE_HAS_FINAL_VARIABLE. Call
`reset_final_variable_local_assignment_flag' and
`check_final_variable_local_assignment_flag' accordingly before
and after constructor expansion. Call
`reset_static_final_variable_assignment_flag'
before expanding <clinit> and after call
`check_static_final_variable_assignment_flag' if the
current_class isn't an interface. After all methods have been
expanded, call `check_final_variable_global_assignment_flag' and
`check_static_final_variable_assignment_flag' if the current class
is an interface.
(maybe_yank_clinit): Fixed typo in comment.
(build_outer_field_access_methods): Removed old sanity check. Use
FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
Don't create access methods for finals.
(resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
(java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
existing DECL_INIT has been processed.
(java_complete_lhs): Likewise.
(check_final_assignment): Filter input on `lvalue''s TREE_CODE.
Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
logic.
(patch_assignment): Use LOCAL_FINAL_P.
(fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
DECL_INITIAL is nullified.
Fixes gcj/163.
2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (parse.c, parse-scan.c): Create atomically.
* Makefile.in (parse.c, parse-scan.c): Likewise.
2000-10-12 Mark Mitchell <mark@codesourcery.com>
* class.c (temporary_obstack): Remove.
(make_class): Don't mess with obstascks.
(push_class): Likewise.
(set_super_info): Likewise.
(add_method_1): Likewise.
(add_method): Likewise.
(add_field): Likewise.
(build_utf8_ref): Likewise.
(build_class_ref): Likewise.
(build_static_field_ref): Likewise.
(finish_class): Likewise.
(push_super_field): Likewise.
(layout_class): Likewise.
(layout_class_methods): Likewise.
(init_class_processing): Likewise.
* constants.c (get_tag_node): Likewise.
(build_constant_data_ref): Likewise.
* decl.c (ggc_p): Remove.
(copy_lang_decl): Use ggc_alloc.
(complete_start_java_method): Don't mess with obstacks.
(start_java_method): Likewise.
(end_java_method): Likewise.
* except.c (link_handler): Use xmalloc.
(free_eh_ranges): New function.
(method_init_exceptions): Use it.
(add_handler): Use xmalloc.
(expand_start_java_handler): Don't mess with obstacks.
(prepare_eh_table_type): Likewise.
(expand_end_java_handler): Likewise.
* expr.c (push_value): Likewise.
(create_label_decl): Likewise.
(build_jni_stub): Likewise.
(java_lang_expand_expr): Likewise.
(note_instructions): Use xrealloc.
(java_push_constant_from_pool): Don't mess with obstacks.
(process_jvm_instruction): Likewise.
* java-tree.h (cyclic_inheritance_report): Remove duplicate
declaration.
* jcf-parse.c (get_constant): Don't mess with obstacks.
(read_class): Likewise.
(jcf_parse): Likewise.
* lex.c (expression_obstack): Remove.
(java_lex): Don't use obstack_free.
* parse.h (exit_java_complete_class): Don't mess with obstacks.
(MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
(MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
(MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
* parse.y (gaol): Add more GC roots.
(add_inner_class_fields): Adjust calls to MANGLE_* macros.
(lookup_field_wrapper): Likewise.
(obtain_incomplete_type): Don't mess with obstacks.
(build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
macros.
(craft_constructor): Don't mess with obstacks.
(safe_layout_class): Likewise.
(java_complete_class): Likewise.
(source_end_java_method): Likewise.
(build_outer_field_access_methods): Likewise.
(build_outer_method_access_method): Likewise.
(maybe_build_thisn_access_method): Likewise.
(build_dot_class_method_invocation): Likewise.
(java_complete_tree): Likewise.
(java_complete_lhs): Likewise.
(do_merge_string_cste): Likewise.
(patch_string_cst): Likewise.
(array_constructor_check_entry): Likewise.
* typeck.c (build_java_array_type): Likewise.
(parse_signature_string): Likewise.
(build_java_signature): Likewise.
2000-10-12 Tom Tromey <tromey@cygnus.com>
Fix for PR gcj/356:
* gjavah.c (add_class_decl): Don't special-case inner classes.
(add_namelet): Likewise.
2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
* java-tree.h: Constify current_encoding.
* lang.c: Constify current_encoding.
2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
* jvgenmain.c (class_mangling_suffix): Omit `.'.
(main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
patch. Fixes gcj/340.
2000-10-10 Tom Tromey <tromey@cygnus.com>
* lex.c (java_new_lexer): Initialize out_first and out_last
fields.
* lex.h (java_lexer): Added out_buffer, out_first, out_last.
2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (pop_current_osb): New function.
(array_type:): Use `dims:', changed actions
accordingly. Suggested by Anthony Green.
(array_creation_expression:): Used pop_current_osb.
(cast_expression:): Likewise.
(search_applicable_method_list): Fixed indentation.
2000-10-08 Anthony Green <green@redhat.com>
* parse.y (array_type_literal): Remove production.
(type_literals): Refer to array_type, not array_type_literal.
2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
Patch contributed by Corey Minyard.
* decl.c (check_local_named_variable): New function.
(tree check_local_unnamed_variable): Likewise.
(find_local_variable): Splitted. Call check_local_{un}named_variable.
2000-10-07 Anthony Green <green@redhat.com>
* class.c (layout_class): Handle case where superclass can't be
layed out yet.
2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
* Makefile.in (keyword.h): Refer to GNU FTP site for updated
gperf.
2000-10-05 Tom Tromey <tromey@cygnus.com>
* jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
* jvgenmain.c (class_mangling_prefix): Removed.
(class_mangling_suffix): New global.
(main): Use it.
* gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
`$'.
(print_method_info): Handle overrides for static and final
methods.
(process_file): Generate declaration for class object field.
* class.c (cxx_keywords): New array.
(utf8_cmp): New function.
(cxx_keyword_p): New function.
(layout_class_method): Mangle C++ keywords by appending `$'.
(mangle_field): New function.
(mangle_class_field): Use mangle_field. Mangle class name as
`class$'.
(mangle_static_field): Use mangle_field.
2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (find_local_variable): Removed uncessary type check and
fixed range check typo. From Corey Minyard.
2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (give_name_to_locals): New local `code_offset'. Call
`maybe_adjust_start_pc'.
* expr.c (note_instructions): New function.
(expand_byte_code): Don't collect insn starts here.
(peek_opcode_at_pc): New function.
(maybe_adjust_start_pc): Likewise.
* java-tree.h (maybe_adjust_start_pc): Declare.
(note_instructions): Likewise.
* jcf-parse.c (parse_class_file): Call `note_instructions'.
2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (field_access:): Fixed indentation.
(qualify_ambiguous_name): Properly qualify `this.a[b].c'.
2000-09-07 Tom Tromey <tromey@cygnus.com>
Fix for PR gcj/307:
* parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
JPRIMITIVE_TYPE_P, for arithmetic operators.
(patch_method_invocation): Indentation fix.
(try_builtin_assignconv): Handle boolean specially. Fixed typo.
(valid_builtin_assignconv_identity_widening_p): Handle boolean.
(do_unary_numeric_promotion): Cleaned up code.
(valid_cast_to_p): Handle boolean correctly.
2000-09-27 Tom Tromey <tromey@cygnus.com>
* lex.c (java_read_unicode): Reset bs_count when finished with
`\u' sequence.
2000-10-01 Mark Mitchell <mark@codesourcery.com>
Convert to GC.
* Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
* Makefile.in (BACKEND): Don't include ggc-callbacks.o.
(typeck.o): Depend on ggc.h.
* class.c (add_method_1): Use GC functions for allocation.
(init_class_processing): Register roots.
* decl.c (ggc_p): Set to 1.
(pending_local_decls): Make it static.
(push_jvm_slot): Use GC functions for allocation.
(init_decl_processing): Register roots.
(give_name_to_locals): Use GC functions for allocation.
(lang_mark_tree): New function.
* java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
functions for allocation.
* jcf-parse.c (jcf_parse_source): Use ggc_strdup.
* lex.c (java_lex): Use build_string, rather than replicating it
inline.
* parse.y (goal): Add more roots.
(mark_parser_ctxt): New function.
* typeck.c: Include ggc.h.
2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (maybe_yank_clinit): Also keep <clinit> if its body
contains something else than MODIFY_EXPR.
2000-09-23 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (JAVA_SRCS): Include java-tree.h.
* Makefile.in (parse.o): Depend on ggc.h.
(class.o): Likewise.
(constants.o): Likewise.
(decl.o): Likewise.
(expr.o): Likewise.
(jcf-parse.o): Likewise.
(jcf-write.o): Likewise.
(mangle.o): Likewise.
* class.c: Include ggc.h.
(build_static_field_ref): Register GC roots.
(layout_class): Likewise.
(init_class_processing): Likewise.
* constants.c: Include ggc.h.
(current_constant_pool_data_ref): Remove.
(tag_nodes): Move it to ...
(get_tag_node): ... here. Register GC roots.
* decl.c: Include ggc.h. Remove many global tree definitions.
(throw_node): Define.
(java_global_trees): Likewise.
(predef_filenames): Make the size a constant.
(init_decl_processing): Adjust accordingly.
(init_decl_processing): Call init_jcf_parse. Register GC roots.
* expr.c: Include ggc.h.
(init_expr_processing): Register GC roots.
(build_invokeinterface): Likewise.
* java-tree.h: Replace extern tree declarations with macros.
(java_global_trees): New variable.
(java_tree_index): New enumeration.
(init_jcf_parse): Declare.
* jcf-parse.c: Include ggc.h.
(current_class): Remove declaration.
(main_class): Likewise.
(all_class_list): Likewise.
(predefined_filename_p): Adjust for constant size of
predef_filenames.
(init_jcf_parse): New function.
* jcf-write.c: Include ggc.h.
(generate_classfile): Register GC roots.
(append_synthetic_attribute): Likewise.
(append_innerclass_attribute_entry): Likewise.
* lang.c: Include ggc.h.
(lang_print_error): Register GC roots.
* parse.h (struct parser_ctxt): Rename fields to avoid conflicts
with macros.
* parse.y: Include ggc.h.
(wfl_operator): Remove.
(goal): Register GC roots.
(java_pop_parser_context): Adjust for new field names.
(java_parser_context_save_global): Likewse.
(java_parser_context_restore_global): Likewise.
(java_parser_context_suspend): Likewise.
(java_parser_context_resume): Likewise.
(verify_constructor_circularity): Register GC roots.
(lookup_cl): Likewise.
(java_reorder_fields): Likewise.
(build_current_this): Likewise.
(class_in_current_package): Likewise.
(argument_types_convertible): Likewise.
(patch_cast): Rename wfl_op parameter to avoid macro conflicts.
2000-09-14 Tom Tromey <tromey@cygnus.com>
* lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
2000-09-13 Tom Tromey <tromey@cygnus.com>
* jcf-parse.c: Include <locale.h>.
* jv-scan.c: Include <locale.h>.
2000-09-12 Tom Tromey <tromey@cygnus.com>
* expr.c (pop_type_0): Return `Object' if trying to merge two
interface types.
* verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
interface types; `Object' is always a valid supertype.
2000-09-12 Tom Tromey <tromey@cygnus.com>
Fix for PR gcj/33:
* jv-scan.c (help): Document --encoding.
(options): Added `encoding' entry.
(OPT_ENCODING): New define.
(main): Handle --encoding.
Include <langinfo.h> if nl_langinfo exists.
* lang-options.h: Document --classpath, --CLASSPATH, --main, and
--encoding.
* jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
(parse_source_file): Correctly call java_init_lex. Added `finput'
argument. Use nl_langinfo to determine default encoding.
* java-tree.h (current_encoding): Declare.
* parse.y (java_parser_context_restore_global): Don't restore
`finput'.
(java_parser_context_save_global): Don't set `finput' field.
(java_pop_parser_context): Don't restore `finput'. Free old lexer
if required.
* lang.c (current_encoding): New global.
(lang_decode_option): Recognize `-fencoding='.
(finish_parse): Don't close finput.
* parse.h (struct parser_ctxt): Removed `finput' and
`unget_utf8_value' fields. Added `lexer' field.
(java_init_lex): Fixed declaration.
* lex.c (java_new_lexer): New function.
(java_destroy_lexer): Likewise.
(java_read_char): Added `lex' argument. Handle iconv case.
(java_read_unicode): Added `lex' argument. Count backslashes in
lexer structure.
(java_init_lex): Added `finput' and `encoding' arguments. Set
`lexer' field in ctxp.
(BAD_UTF8_VALUE): Removed.
(java_lex): Handle seeing UEOF in the middle of a string literal.
* lex.h: Include <iconv.h> if HAVE_ICONV defined.
(java_lexer): New structure.
(UNGETC): Removed.
(GETC): Removed.
(DEFAULT_ENCODING): New define.
(java_destroy_lexer): Declare.
2000-09-12 Tom Tromey <tromey@cygnus.com>
Fix for PR gcj/343:
* lex.c (java_init_lex): Initialize java_io_serializable.
* parse.y (java_io_serializable): New global.
(valid_ref_assignconv_cast_p): An array can be cast to
serializable.
2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
* decl.c, expr.c: Include defaults.h if not already included.
Don't define the *_TYPE_SIZE macros.
2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
* typeck.c (build_java_array_type): Correct first parameter
in ADJUST_FIELD_ALIGN invocation.
2000-09-06 Tom Tromey <tromey@cygnus.com>
* lang-specs.h: Also recognize `-femit-class-files'.
2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
* verify.c (merge_types): Load the types to merge if necessary.
2000-09-02 Anthony Green <green@redhat.com>
* jcf-io.c: Include zlib.h.
(open_in_zip): Read compressed class file archives.
* zipfile.h (ZipDirectory): Add uncompressed_size and
compression_method fields.
* zextract.c (read_zip_archive): Collect file compression info.
2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
* parse.y (do_resolve_class): Also explore superclasses of
intermediate enclosing contexts when searching for inner classes.
2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (variable_declarator_id:): Better error message.
(expression_statement:): Use YYNOT_TWICE.
(cast_expression:): Likewise.
(assignment:): Likewise.
2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (do_merge_string_cste): New locals. Create new
STRING_CSTs each time, use memcpy. Fixes gcj/311.
2000-08-07 Hans Boehm <boehm@acm.org>
* boehm.c (mark_reference_fields): Set marking bits for all words in
a multiple-word record.
(get_boehm_type_descriptor): Use the procedure marking descriptor for
java.lang.Class.
2000-08-31 Mike Stump <mrs@wrs.com>
* Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
jcf-dump$(exeext)): Make parallel safe.
2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
* jcf-parse.c (set_source_filename): Constify a char *.
* jcf-write.c (append_innerclasses_attribute,
make_class_file_name): Constify a char *. Don't recycle a
variable for an unrelated purpose.
* parse.y: (build_alias_initializer_parameter_list): Constify a char *.
(breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (can_widen_reference_to): Fixed indentation.
* java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
* parse.y: `finit$' replaces `$finit$' in comments.
(try_builtin_assignconv): Fixed leading comment.
2000-08-25 Greg McGary <greg@mcgary.org>
* gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
2000-08-24 Greg McGary <greg@mcgary.org>
* lang.c (lang_decode_option): Use ARRAY_SIZE.
* parse.y (BINOP_LOOKUP): Likewise.
2000-08-22 Andrew Haley <aph@cygnus.com>
* javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
sign extending. Fixes gcj/321.
* jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
combining to make a jlong. Fixes gcj/321.
2000-08-21 Nix <nix@esperi.demon.co.uk>
* lang-specs.h: Do not process -o or run the assembler if
-fsyntax-only.
2000-08-16 Andrew Haley <aph@cygnus.com>
* typeck.c (build_java_array_type): Rewrite code to do array
alignment. Take into account back-end macros when aligning array
data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
user to set alignment. Fixes gcj/252 and 160.
2000-08-09 Tom Tromey <tromey@cygnus.com>
* parse.y (check_abstract_method_definitions): Now return `int'.
Check implemented interfaces. Fixes PR gcj/305.
* parse.y (patch_switch_statement): Disallow `long' in switch
expressions. Fixes PR gcj/310.
2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (finit_leg_identifier_node): New global.
(init_decl_processing): Use `finit$' to initialize
finit_identifier_node. Use `$finit$' to initialize
finit_leg_identifier_node.
* expr.c (expand_java_field_op): Use ID_FINIT_P.
* java-tree.h (finit_identifier_node): Changed attached comment.
(finit_leg_identifier_node): New declaration.
(ID_FINIT_P): Take finit_identifier_node and
finit_leg_identifier_node into account. This is a backward
compatibility hack.
2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_bytecode_conditional): Re-installed lost
Jan 6 2000 patch.
(generate_bytecode_insns): Check `nargs' before emitting it.
* verify.c (merge_type_state): Fixed typo.
* ChangeLog: Fixed typo in some jcf-write.c entries mentioning
generate_bytecode_{conditional,insns}.
2000-08-13 Anthony Green <green@redhat.com>
* check-init.c (check_init): Add case for BIT_FIELD_REF (required
for -pg builds).
2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (maybe_layout_super_class): Fixed indentation.
* java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
(java_check_methods): New function declaration.
* jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
instead of `str_ptr'.
* jcf-write.c (generate_bytecode_insns): Emit number the of args
of a `invokeinterface' at the right time.
* parse.h (WFL_STRIP_BRACKET): New macro.
(SET_TYPE_FOR_RESOLUTION): Use it.
* parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
(check_class_interface_creation): Don't check for cross package
innerclass name clashes.
(method_header): Behave properly if MDECL is `error_mark_node'.
(method_declarator): Return `error_mark_node' if bogus current
class.
(resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
(resolve_and_layout): New local `decl_type', set and used. Call
java_check_methods.
(java_check_methods): New method.
(java_layout_classes): Use it.
(resolve_qualified_expression_name): No EH check necessary in
access$<n>.
(java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
`case' statement.
(patch_assignment): Set DECL_INITIAL on integral final local.
2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (flag_extraneous_semicolon): New extern.
* lang-options.h: (-Wextraneous-semicolon): New option.
* lang.c (flag_redundant): Fixed typo in leading comment.
(flag_extraneous_semicolon): New global.
(lang_decode_option): Set `flag_extraneous_semicolon' when
-Wall. Decode `-Wextraneous-semicolon'.
* parse.y (type_declaration:): Removed `SC_TK' hack, added
`empty_statement' rule.
(class_body_declaration): Likewise.
(method_body:): Accept `;' as a method body.
(static_initializer:): Removed `SC_TK' hack.
(constructor_block_end:): Likewise.
(empty_statement:): Report deprecated empty declaration. Fixes
gcj/295
2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (build_dot_class_method_invocation): Changed parameter
name to `type'. Build signature from `type' and convert it to a
STRING_CST if it's an array.
(patch_incomplete_class_ref): `build_dot_class_method_invocation'
to use `ref_type' directly.
2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
* lang-options.h: Added a comma after the last element to avoid
syntax errors when other languages define additional options.
2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
* Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
* Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
(jc1): Link with $(BACKEND).
(jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
* jvspec.c: Adjust type of second argument to
lang_specific_driver, and update code as necessary.
* class.c (build_dtable_decl): Initialize dummy.
2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (maybe_yank_clinit): When generating bytecode: non empty
method bodies not to rule out discarding `<clinit>'; don't use
<clinit> to initialize static fields with constant initializers.
2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* gjavah.c (print_method_info): Added `synth' parameter. Skip
synthetic methods.
(method_synthetic): New global.
(HANDLE_METHOD): Recognize synthetic method and tell
`print_method_info' about it.
(HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
processing a synthetic method.
* jcf-reader.c (skip_attribute): New function.
( skip_attribute): Likewise.
2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (build_outer_field_access): Fixed comments.
(fix_constructors): Emit the initialization of this$<n> before
calling $finit$.
(resolve_qualified_expression_name): Build an access to `decl' if
necessary.
2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse-scan.y (curent_class): Non longer const.
(inner_qualifier, inner_qualifier_length): Deleted.
(current_class_length): New global.
(bracket_count): Fixed typo in leading comment.
(anonymous_count): New global.
(class_instance_creation_expression:): Handle anonymous classes.
(anonymous_class_creation:): New rule.
(push_class_context): Rewritten.
(pop_class_context): Likewise.
(INNER_QUALIFIER): Macro deleted.
(report_class_declaration): call `push_class_context' when
entering the function. `fprintf' format modified not to use
INNER_QUALIFIER.
(report_class_declaration): Assign `package_name' and
`current_class' to NULL separately.
2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (build_invokeinterface): Call layout_class_methods on
target interface.
2000-07-27 Tom Tromey <tromey@cygnus.com>
Anthony Green <green@cygnus.com>
Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (make_class_data): Create vtable for abstract classes.
(get_dispatch_table): Changed to cope with abstract classes.
2000-07-27 Tom Tromey <tromey@cygnus.com>
* parse.y (patch_method_invocation): Don't reverse the argument
list when dealing with anonymous class constructors. Fixed typo in
comment.
2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (build_alias_initializer_parameter_list): Reverse
crafted list when building aliases for anonymous class
constructors.
2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (jdep_resolve_class): Don't bother checking potential
innerclass access if `decl' is NULL.
(find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
WFL.
2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.c: Remove (again.)
2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (find_as_inner_class): Removed 2000-07-19 patches.
* jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
outside the `if' statement, alias to innerclass removed, `decl'
used to mark the class complete.
2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (simple_name:): Fixed typo in error message.
2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
or its first operand can be error marks.
2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
* parse.y (method_header): Likewise.
2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (process_imports): Consider that one might be trying to
import an innerclass. Fixes gcj/254
2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (find_as_inner_class): Handle the case where the
enclosing context of an innerclass has been loaded as bytecode.
2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (simple_name:): Reject `$' in type names.
(resolve_type_during_patch): Use `type' as a second
argument to resolve_no_layout. Fixes gcj/257.
2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
* parse.y (find_most_specific_methods_list): Select the only
non-abstract method even if max has been set.
Fixes gcj/285, gcj/298.
2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
* lang-specs.h: Added %(jc1) to java compiler options.
2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
* .cvsignore: New file.
2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (not_accessible_p): Access granted to innerclasses
(indirectly) extending the reference type. Fixes gcj/249.
2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_method_invocation): Fixed comment.
(maybe_use_access_method): Build this$<n>s to the context of the
target method, or a type that extends it. Fixes gcj/242.
2000-07-13 Mark Mitchell <mark@codesourcery.com>
* parse.c: Remove.
2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (fold_constant_for_init): Avoid bullish conversion.
2000-07-13 Tom Tromey <tromey@cygnus.com>
* lang-specs.h: Added %{I*}.
2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
* lang-specs.h: Use the new named specs. Remove unnecessary braces.
2000-07-12 Mark Mitchell <mark@codesourcery.com>
* parse-scan.c: Remove.
2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (set_super_info): Handled protected inner classes.
(common_enclosing_context_p): Bail early if arguments aren't both
inner classes.
(get_access_flags_from_decl): Handle private and protected inner
classes.
* java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
(CLASS_PROTECTED): Likewise.
(struct lang_type): New bitfield `poic'.
* parse.y (jdep_resolve_class): Call check_inner_class_access on
inner classes only.
(check_inner_class_access): Renamed arguments, added
comments. Handles protected inner classes (fixes gcj/225)
(not_accessible_p): Fixed comments. Avoid handling inner classes.
2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_qualified_expression_name): Verify qualified
access to `this'. Fixes gcj/239.
2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_classfile): Don't install ConstantValue
for null pointers.
2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_qualified_expression_name): Handle inner class
access. Fixes gcj/256.
2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_classfile): Properly install the
ConstantValue attribute and the initial value constant pool index
on string constants.
* parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
class files.
2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
construct.
* parse.y (find_as_inner_class): Fixed typo.
(do_resolve_class): Explore enclosing contexts when searching for
innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
(check_inner_class_access): Check `decl' which can be null in case
of previous errors.
2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (java_debug_context): Declared `extern'.
(safe_layout_class): Likewise.
* parse.y (resolve_field_access): Field must be `static' in order
to be replaced by its initial value. Added comments.
(find_applicable_accessible_methods_list): Fixed typo.
(find_most_specific_methods_list): Methods found in innerclasses
take over methods founds in the enclosing contexts.
(java_complete_tree): Loosen restrictions on the type of DECLs
that can be replaced by their initialization values.
(valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
2000-07-05 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (PARSE_DIR): New macro.
(PARSE_RELDIR): Likewise.
(PARSE_C): Likewise.
(PARSE_SCAN_C): Likewise.
($(PARSE_C)): New target.
($(PARSE_SCAN_C)): Likewise.
(SET_BISON): New macro.
(BISONFLAGS): Likewise.
(JAVABISONFLAGS): Likewise.
2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
* gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
argument on the first pass for CNI as well as JNI.
(print_method_info): Set up method name on the first pass only.
2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (parser_qualified_classname): Removed parameter
`is_static'.
(create_interface): Removed first passed parameter to
parser_qualified_classname.
(create_class): Likewise. Don't install alias on static
innerclasses. Fixes gcj/275.
2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (maybe_generate_pre_expand_clinit): Don't build a
debugable statement with empty_stmt_node. Fixes gcj/272
2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (build_instanceof): Layout type after it's loaded. Fixes
gcj/271.
2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (push_long_const): Appropriately cast short negative
constant to jword.
2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (verify_constructor_super): Use loop variable
`m_arg_type' initialized with `mdecl_arg_type'.
2000-06-29 Tom Tromey <tromey@cygnus.com>
* parse.y (resolve_field_access): Handle case where `type_found'
is NULL.
2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (lookup_field): The same field can be found through two
different interface. Don't declare it ambiguous in that case.
2000-06-27 Tom Tromey <tromey@cygnus.com>
* lex.c (java_lineterminator): Don't recognize \r after \n. If \r
follows \r, then unget it at a lower level.
2000-06-26 Tom Tromey <tromey@cygnus.com>
* parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
java_complete_tree.
2000-06-25 Tom Tromey <tromey@cygnus.com>
* parse.y (for_statement): Wrap expression in a WFL if it is a
constant. For PR gcj/268.
2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (do_resolve_class): Minor optimiztion in the package
list search. Removed unnecessary test and return statement.
(valid_ref_assignconv_cast_p): Order of arguments to
enclosing_context_p fixed.
2000-06-24 Tom Tromey <tromey@cygnus.com>
* expr.c (lookup_field): Print error and return error_mark_node if
field reference is ambiguous.
* parse.y (check_abstract_method_definitions): Also check if
`other_method' is abstract.
2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (set_super_info): Handle ACC_PRIVATE for (inner)
classes.
* java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
(struct lang_type): New field `pic'.
(CLASS_PRIVATE): New macro.
* parse.y (check_inner_class_access): New function.
(jdep_resolve_class): Call it.
2000-06-23 Tom Tromey <tromey@cygnus.com>
* parse.y (patch_incomplete_class_ref): Initialize the returned
class. For PR gcj/260.
2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
* except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
Java specific checks.
* expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
screened by DECL_P.
* java-tree.def (CASE_EXPR): Marked 'e'.
(DEFAULT_EXPR): Likewise.
* jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
screened by DECL_P.
* jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
Java specific checks.
(generate_bytecode_insns): Test try_block for BLOCK before using
BLOCK_EXPR_BODY.
* parse.y (build_wfl_wrap): Added `location' argument. Set
EXPR_WFL_LINECOL accordingly.
(dim_expr:): Wrap constants with WFLs.
(method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
(resolve_package): Check for `stmt' not being a BLOCK before
building a debuggable statement with it.
(make_qualified_primary): Added extra parameter to build_wfl_wrap
invocation.
(resolve_field_access): Make sure `decl' is a DECL before treating
it as such.
(maybe_build_primttype_type_ref): Make sure `wfl''s node is an
IDENTIFIER_NODE before treating it as such.
(patch_new_array_init): Make sure `elt' is a TREE_LIST before
treating it as such.
(find_applicable_accessible_methods_list): CLASS_INTERFACE macro
to be applied only on non array types.
2000-06-16 Per Bothner <per@bothner.com>
* java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
define in terms of DECL_RESULT, as that fails when --enable-checking.
2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
types the same in comparison.
(CHECK_OP): Add static prototype.
2000-06-13 Jakub Jelinek <jakub@redhat.com>
* typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
* parse.y (java_complete_class): Set DECL_USER_ALIGN.
* parse.c: Rebuilt.
2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c (create_primitive_vtable): Prototype.
* jcf-write.c (generate_bytecode_insns): Initialize variable
`saved_context'.
* lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
* parse.y (find_applicable_accessible_methods_list): Use a hashtable
to track searched classes, and do not search the same class more than
once. Call find_applicable_accessible_methods_list on immediate
superclass, instead of search_applicable_method_list on all ancestors.
Fix for PR gcj/238.
2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
* parse.y (register_fields): Permit static fields in inner classes
if they are final. Fix for PR gcj/255.
2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
* parse.y (find_in_imports): Returned type changed to void,
leading comment fixed.
(register_package): New function.
(qualify_and_find): Likewise.
(package_declaration:): Use `register_package'.
(single_type_import_declaration:): Removed local variable
`node'. Added missing `;' for consistency.
(type_import_on_demand_declaration:): Use `chainon' to link new
entries.
(lookup_field_wrapper): Lookup local variables defined in outer
contexts first.
(java_complete_class): Don't reverse the list of imported on demand.
(do_resolve_class): Reorganized. Removed local variable
`original_name'. Call `qualify_and_find' with the current package
name, invoke `find_in_imports_on_demand' right after. Call
`qualify_and_find' with the packages we've seen so far. Fixed
operations numbering in comments.
(java_expand_class): Don't reverse `package_list'.
(find_most_specific_methods_list): New local variables `abstract'
and `candidates'. Use them to pick the right method.
2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
* parse.y (check_modifiers_consistency): Don't subtract out
`PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
2000-06-04 Philipp Thomas <pthomas@suse.de>
* Makefile.in (INTLLIBS): New.
(LIBS): Add above.
(DEPLIBS): Ditto.
2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (get_dispatch_table): Build the vtable dummy entry list
element with a null purpose. Fixed leading comment.
(build_dtable_decl): Build an accurate dtable type when appropriate
and use it.
2000-06-02 Richard Henderson <rth@cygnus.com>
* lang.c (lang_get_alias_set): New.
2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_field_access): Complete the DECL_INITIAL tree
before using it as the accessed field.
2000-05-31 Tom Tromey <tromey@cygnus.com>
* java-tree.h (boolean_array_vtable, byte_array_vtable,
char_array_vtable, short_array_vtable, int_array_vtable,
long_array_vtable, float_array_vtable, double_array_vtable):
Declare.
* expr.c (get_primitive_array_vtable): New function.
(create_primitive_vtable): New function.
(java_lang_expand_expr): Enable code to statically generate
arrays.
* decl.c (init_decl_processing): Create primitive vtables.
(boolean_array_vtable, byte_array_vtable, char_array_vtable,
short_array_vtable, int_array_vtable, long_array_vtable,
float_array_vtable, double_array_vtable): Define.
2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
* java/parse.y (find_applicable_accessible_methods_list):
Don't add an uninitialized value to the list.
2000-05-25 Tom Tromey <tromey@cygnus.com>
* parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
when trying to see if field's class should be initialized. Always
initialize field's declaring class, not qualified class.
For PR gcj/162.
* parse.y (array_constructor_check_entry): Pass `wfl_value', not
`wfl_operator', to maybe_build_primttype_type_ref.
Fixes PR gcj/235.
2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
* parse.y (patch_method_invocation): Don't try to lookup methods
in primitive types.
2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_field_access): Call the appropriate <clinit>
before accessing the length of a static array. Craft a decl for
the field while its time. Fixes PR gcj/129.
2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_package): Correctly set `*next' (was off by
one.)
(resolve_qualified_expression_name): Fixed comment.
2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (jcf_parse_source): Reset current_class and
current_function_decl to NULL before parsing a new file.
2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (block_end:): If the collected block doesn't feature a
statement, insert an empty statement.
2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (maybe_yank_clinit): New function.
(maybe_generate_pre_expand_clinit): Always link <clinit> at the
end of the list of methods belonging to a class.
(java_complete_expand_method): Check whether <clinit> is really
necessary and expand it accordingly.
2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
processed by the method's switch statement.
2000-05-19 Tom Tromey <tromey@cygnus.com>
* java-tree.h: Added init state enum.
* decl.c (emit_init_test_initialization): Initialize class
initialization check variable by looking at class' state.
2000-05-19 Tom Tromey <tromey@cygnus.com>
* java-tree.h (build_instanceof): Declare.
(build_get_class): Declare.
* parse.y (patch_binop): Use build_instanceof.
* expr.c (build_instanceof): New function. If class is final,
don't make a function call.
(expand_java_INSTANCEOF): Use it.
(build_get_class): New function.
2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* jcf-write.c (generate_classfile): Scan the source_file for
slashes with the right pointer variable.
2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
* lang.c (lang_decode_option): Update -Wunused flags by calling
set_Wunused.
* decl.c (poplevel): Replace warn_unused with warn_unused_label.
2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
* check_init.c (check_init): Constify local char *.
* class.c (push_class): Constify local char *.
* java_tree.h: Update prototypes.
* jcf-io.c (open_class): Constify filename parameter and
return value.
(find_class): Remove redundant string copy. Cast return from
open_class.
* jcf-parse.c (read_class, parse_class_file, yyparse):
Constify local char *.
* jcf-write.c (generate_bytecode_insns, generate_classfile):
Constify local char *.
* jcf.h (JCF): Constify filename and classname.
(JCF_FINISH): Cast args to FREE to char * when appropriate.
* lang.c (init_parse): Constify parameter and return value.
* lex.c (java_get_line_col): Constify filename parameter.
* parse.h: Constify parser_ctxt.filename. Update prototypes.
* parse.y (java_parser_context_suspend,
issue_warning_error_from_context, safe_layout_class): Constify
local char *.
* parse.c: Regenerate.
2000-05-08 Tom Tromey <tromey@cygnus.com>
* expr.c (build_jni_stub): Cache the result of
_Jv_LookupJNIMethod.
2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (predef_filenames_size): Now 7.
(predef_filenames): New seventh entry.
2000-05-04 Tom Tromey <tromey@cygnus.com>
* boehm.c (mark_reference_fields): Don't mark RawData fields.
Keep track of when we've seen a reference field after a
non-reference field.
(get_boehm_type_descriptor): Handle case where we see
non-reference fields but no trailing reference field.
* decl.c (rawdata_ptr_type_node): Define.
(init_decl_processing): Initialize rawdata_ptr_type_node.
* java-tree.h (rawdata_ptr_type_node): Declare.
2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
specifiers in calls to fprintf.
2000-05-03 Andrew Haley <aph@cygnus.com>
* expr.c (build_java_jsr): Use emit_jump, not expand_goto.
* javaop.h (WORD_TO_INT): New function.
(IMMEDIATE_s4): Use WORD_TO_INT.
* jcf.h (JPOOL_INT): Ditto.
* gjavah.c (decode_signature_piece): Don't treat `$' as namespace
separator.
2000-04-19 Tom Tromey <tromey@cygnus.com>
* class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
on native function.
* jcf-parse.c (parse_class_file): Call build_jni_stub for native
JNI methods.
* expr.c (build_jni_stub): New function.
* lang-specs.h: -fjni and -femit-class-file are incompatible.
* parse.c: Rebuilt.
* parse.y (java_complete_expand_methods): Expand a native method
and call build_jni_stub if -fjni given.
* lang-options.h: Document -fjni.
* lang.c (flag_jni): New global.
(lang_f_options): Added `jni' entry.
* java-tree.h (soft_lookupjnimethod_node,
soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
Declare.
(flag_jni): Declare.
(build_jni_stub): Declare.
(struct lang_decl): Added `native' flag.
(METHOD_NATIVE): Redefined to use `native' field of lang specific
structure.
* decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
soft_jnipopsystemframe_node): New globals.
(init_decl_processing): Set them. _Jv_InitClass only takes one
argument.
* java-tree.def: Put into `C' mode.
2000-04-27 Tom Tromey <tromey@cygnus.com>
Fix for PR gcj/2:
* expr.c (expand_invoke): Generate check to see if object pointer
is null in nonvirtual invocation case.
* java-tree.h (soft_nullpointer_node): Declare.
* decl.c (soft_nullpointer_node): New global.
(init_decl_processing): Initialize soft_nullpointer_node.
* parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
or `private' methods.
(patch_invoke): Handle INVOKE_NONVIRTUAL case.
2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (complete_start_java_method): Don't call _Jv_InitClass
from <clinit>
2000-04-26 Tom Tromey <tromey@cygnus.com>
* zextract.c (find_zip_file_start): New function.
(read_zip_archive): Use it.
2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (common_enclosing_context_p): New function.
* java-tree.h (common_enclosing_context_p): Added prototype.
* parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
classes sharing an outer context with the current instance.
* parse.y (build_access_to_thisn): Fixed leading comment.
(verify_constructor_super): New local `supper_inner'. Skip
enclosing context argument in the case of inner class constructors.
(patch_method_invocation): Insert proper context as second
parameter to pure inner class constructor super invocations.
2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (end_class_declaration): Reset the interface number
counter.
2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (source_start_java_method): Deleted unnecessary code.
(patch_method_invocation): Fixed comment.
2000-04-24 Robert Lipe <robertlipe@usa.net>
* parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
2000-04-23 Tom Tromey <tromey@cygnus.com>
* boehm.c (mark_reference_fields): Use int_byte_position.
2000-04-22 Tom Tromey <tromey@cygnus.com>
* boehm.c (mark_reference_fields): Only call byte_position on
non-static fields.
2000-04-22 Tom Tromey <tromey@cygnus.com>
* boehm.c (mark_reference_fields): Added `last_view_index'
argument. Use DECL_FIELD_OFFSET to determine field's offset.
2000-04-20 Mo DeJong <mdejong@cygnus.com>
* parse.h (INTERFACE_INNER_MODIFIERS): New macro.
* parse.y (check_class_interface_creation): Fixed comments. Select
permitted modifiers for (inner) interfaces. Changed error message
to report rejected modifiers used with local classes.
2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
of directly inherited type considered in scope.
* parse.y (do_resolve_class): Search inherited classes for inner
classes.
2000-04-20 Tom Tromey <tromey@cygnus.com>
* parse.y (not_accessible_p): Use member's class, not current
class, when doing inheritance check for protected reference.
Fixes PR gcj/124.
2000-04-20 Jason Schroeder <shrode@subnature.com>
* jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (lookup_field_wrapper): Search for final local aliases.
(resolve_expression_name): Let lookup_field_wrapper search for
final local aliases. Force the value of `name' if one is found.
(qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
an expression name. Fixed comments.
2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (yyerror): `msg' can be null, don't use it in that case.
2000-04-19 Tom Tromey <tromey@cygnus.com>
* gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
2000-04-18 Tom Tromey <tromey@cygnus.com>
PR gcj/211:
* gjavah.c (utf8_cmp): Changed return value.
(cxx_keyword_subst): Handle all C++ keywords. Allocate new return
result.
(cxx_keywords): New global.
(get_field_name): Handle new result of cxx_keyword_subst.
(print_method_info): Likewise.
2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
* gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
with a newline, for CNI.
(print_stub_or_jni): Print a space or newline before method name for
CNI as well as JNI.
(print_cxx_classname): Don't write leading "::" in CNI stub method.
(process_file): Include gcj/cni.h if generating CNI stubs.
2000-04-16 Tom Tromey <tromey@cygnus.com>
* gjavah.c (decompile_method): Use print_field_name.
Fixes PR gcj/205.
2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_expand_classes): Reverse the package list once.
(java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
reduction.
(patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
the `==' and `!=' operators.
2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_bytecode_insns): At invocation time,
always relate an interface method to the type of its selector.
2000-04-05 Tom Tromey <tromey@cygnus.com>
Fix for PR gcj/2:
* expr.c (expand_invoke): Generate check to see if object pointer
is null in nonvirtual invocation case.
* java-tree.h (soft_nullpointer_node): Declare.
* decl.c (soft_nullpointer_node): New global.
(init_decl_processing): Initialize soft_nullpointer_node.
* parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
or `private' methods.
(patch_invoke): Handle INVOKE_NONVIRTUAL case.
2000-04-05 Tom Tromey <tromey@cygnus.com>
Fix for PR gcj/140:
* parse.y (check_final_assignment): Recognize assignments to the
`length' field of an array when generating class files.
2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (decl_hash): Prototype removed.
(decl_compare): Likewise.
2000-04-05 Tom Tromey <tromey@cygnus.com>
* parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
* parse.y (check_modifiers_consistency): Check for final/volatile
clash. Fixes PR gcj/164.
2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
made global.
(java_hash_compare_tree_node): Renamed from `decl_compare, made
global.
(add_method_1): Use `java_hash_hash_tree_node' and
`java_hash_compare_tree_node'.
* java-tree.h: (java_hash_hash_tree_node): Prototyped.
(java_hash_compare_tree_node): Likewise.
* parse.y (find_applicable_accessible_methods_list): Create,
delete and use a hash table to remember already searched interfaces.
2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
* jcf-depend.c (add_entry): Fixed bug where list was always replaced
with latest entry.
2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* boehm.c (mark_reference_fields, set_bit): Prototype.
(set_bit): Un-ANSI-fy definition.
* class.c (init_test_hash_newfunc, decl_hash, decl_compare):
Prototype.
* decl.c (emit_init_test_initialization): Likewise.
* gjavah.c (jni_print_char): Likewise.
* parse.y (create_new_parser_context): Likewise.
2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
patch missing hunk. Fixed indentation.
2000-03-30 Tom Tromey <tromey@cygnus.com>
* gjavah.c (D_NAN_MASK): Only define as word-reversed when
HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
when negative *before* using it as an array index.
* ChangeLog: Fixed typo.
2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
to 0 when it reaches -1.
2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (get_constant): Properly cast `num' during the
invocation of `add_double'.
* jcf-write.c (push_long_const): Properly cast `lo' before
comparing it to short bounds.
* parse-scan.y (interface_declaration:): Rule re-arrange so that
`interface_body:' is reduced after the current interface is
pushed.
2000-03-26 Tom Tromey <tromey@cygnus.com>
* jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
Java-specific `-f' option.
2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* decl.c (init_decl_processing): Only call initialize_sizetypes once.
Adjust order of making types.
Make bitsize_*_node values.
2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (make_field_value): Use byte_position.
* expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
(java_array_data_offset): Likewise.
* java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
bzero call.
2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (check_abstract_method_definitions): New local
`end_type_reached'. Make sure we also consider `end_type'.
(java_check_abstract_method_definitions): Make sure we eventually
consider `java.lang.Object'.
(maybe_use_access_method): Don't use access method if not in the
context of a pure inner class or if the method's context is right.
(find_applicable_accessible_methods_list): New static flag
`object_done'. Don't search abstract classes as interfaces. Fixed
indentation. Fixed the `java.lang.Object' only search. Search
class interface(s) first, then fully search enclosing contexts.
(find_most_specific_methods_list): Pick the closest candidate when
they're all abstract.
2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
properly initialize `finished_label'. Don't emit gotos for empty
try statements.
2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* except.c (emit_handlers): Clear catch_clauses_last.
2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (check_method_types_complete): New function.
(create_class): Reset anonymous class counter only when seeing an
non inner classe.
(java_complete_class): JDEP_METHOD: Don't recompute signature
if incomplete.
2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (build_static_ref): Fixed indentation in comment.
* java-tree.def (TRY_EXPR): Fixed typo in name.
(CLASS_LITERAL): Likewise.
* java-tree.h: (TYPE_DOT_CLASS): New macro.
(struct lang_type): New field `dot_class'.
* jcf-write.c (generate_bytecode_insns): Fixed error message.
(generate_classfile): Method `class$' is synthetic.
* parse.y (build_do_class_method): New function.
(build_dot_class_method_invocation): Likewise.
(java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
(resolve_qualified_expression_name): Handle CLASS_LITERAL.
(qualify_ambiguous_name): Likewise.
(patch_incomplete_class_ref): Invoke synthetic method if necessary.
(build_try_statement): Fixed leading comment.
2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (make_field_value): Properly handle sizes.
(get_dispatch_vector): Use tree_low_cst and host_integerp.
(layout_class_method): Count using trees.
* decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
* expr.c (java_array_data_offset): Use int_bit_position.
(build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
(build_invokevirtual): Use tree_low_cst and do computations with trees.
2000-03-16 Tom Tromey <tromey@cygnus.com>
* lang.c (flag_hash_synchronization): New global.
(lang_f_options): Added `hash-synchronization'.
* lang-options.h: Mention -fhash-synchronization.
* java-tree.h (flag_hash_synchronization): Declare.
* expr.c (java_lang_expand_expr): Only push `sync_info' value when
hash table synchronization is disabled.
* decl.c (init_decl_processing): Only push `sync_info' value when
hash table synchronization is disabled.
* class.c (make_class_data): Only push `sync_info' field when hash
table synchronization is disabled. Removed dead code.
2000-03-16 Tom Tromey <tromey@cygnus.com>
* lang.c (lang_decode_option): Enable -Wunused when -Wall given.
2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
classes.
* parse.y (patch_method_invocation): Handle anonymous classes
creation in static context.
2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
* parse.y (resolve_qualified_expression_name): Use it.
(patch_method_invocation): Likewise.
2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (register_incomplete_type): JDEP_ENCLOSING set
depending on the type of dependency which dictates what the
current class is.
(unresolved_type_p): Resolved types limited to the current class.
2000-03-15 Tom Tromey <tromey@cygnus.com>
* decl.c (init_decl_processing): Set type of `sync_info' to be
pointer to Object.
* boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
Correctly compute bit number for current slot. Zero `high' and
`low' in DS_LENGTH case. Don't skip inherited fields. Use
mark_reference_fields.
(mark_reference_fields): New function.
2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (register_incomplete_type): Fixed initialization of
JDEP_ENCLOSING.
2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse-scan.y (inner_qualifier, inner_qualifier_length): New
static globals.
(push_class_context, pop_class_context): New function.
(class_body:): Call pop_class_context.
(interface_body:): Likewise.
(INNER_QUALIFIER): New macro.
(report_class_declaration): Changed output format and use
INNER_QUALIFIER. Call push_class_context.
2000-02-14 Andrew Haley <aph@cygnus.com>
* check-init.c (check_init): Add new cases for unary and binary
tree nodes.
2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_package): Set `next' once a type name has been
progressively discovered.
(resolve_qualified_expression_name): Propagate resolution only if
there are remaining qualifiers. Take into account `q' might have
been cleared after re-qualification.
* parse.y (patch_method_invocation): New local `resolved'.
Section dealing with qualified expression rewritten to use
resolve_field_access.
2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (PUSH_CPC): Fixed indentation.
(DEBUG_CPC): New macro.
(SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
* parse.y (class_body_declaration:): Use
SET_CPC_INSTANCE_INITIALIZER_STMT.
(method_declaration:): Check for null current_function_decl.
(static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
(java_parser_context_pop_initialized_field): Better handling of
empty lists.
(maybe_make_nested_class_name): Mark nested class name as
qualified when necessary.
(end_class_declaration): Don't call java_parse_context_resume when
one or more error occurred.
(add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
(register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
SET_CPC_INITIALIZER_STMT.
(method_header): Check for inner classes declaring static methods.
(resolve_qualified_expression_name): Handle situation where `this'
is implied.
2000-03-13 Hans Boehm <boehm@acm.org>
* typeck.c (build_prim_array_type): Correctly set the high word too.
2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_complete_expand_methods): Leave <clinit> out of
ordinary methods.
(maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
list of methods for interfaces.
2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (qualify_ambiguous_name): Properly handle expressions
using `null'.
2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (check_final_assignment): Extended to process
COMPOUND_EXPR.
(patch_assignment): Have check_final_assignment called only once.
2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (IS_INIT_CHECKED): New flag.
* check-init.c (check_init): Test and set IS_INIT_CHECKED.
* parse.y (patch_string): Call force_evaluation_order on the
completed string concatenation tree.
* expr.c (force_evaluation_order): Call force_evaluation_order on
function's arguments too.
2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* decl.c (emit_init_test_initialization): Mark KEY as unused.
* expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
(build_anewarray): Likewise.
* parse.y (patch_newarray): Likewise.
* parse.c: Regenerated.
2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
* decl.c (init_decl_processing): Added new class fields `depth',
`ancestors', and `idt' to class_type_node. Use
_Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
* class.c (make_class_data): Push initial values for new fields.
* java-tree.h: Updated prototype for `build_invokeinterface'.
* expr.c (build_invokeinterface): Changed parameters to accept
`method' tree. Calculate index of `method' in its declaring
interface. Build call to _Jv_LookupInterfaceMethodIdx.
(expand_invoke): Call `build_invokeinterface' with new parameters.
* parse.y (patch_invoke): Call `build_invokeinterface' with new
parameters.
2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
* typeck.c (lookup_do): Search superinterfaces first
when looking up an interface method. From Godmar Back
<gback@cs.utah.edu>
2000-03-06 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (lookup_argument_method2): Declared.
(safe_layout_class): Prototype moved from parse.h.
* parse.h (safe_layout_class): Prototype moved to java-tree.h.
* parse.y (java_check_regular_methods): Local `super_class' gone.
Call lookup_argument_method2 instead of lookup_argument_method.
Perform modifier match for methods found declared in implemented
interfaces. Fixed indentation problem. Overriding/hiding error
report to take place only for methods found in classes.
* typeck.c (lookup_argument_method): Changed leading
comment. Re-written by calling lookup_do.
(lookup_argument_method2): New function.
(lookup_java_method): Re-written by calling lookup_do.
(lookup_do): New function.
2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
* check-init.c (check_init): Removed dead code. Handle (blank)
final variables.
* parse.y (declare_local_variables): New local `final_p', set it
and use it to initialize LOCAL_FINAL.
(check_final_assignment): Only check FIELD_DECLs.
2000-02-17 Tom Tromey <tromey@cygnus.com>
* Makefile.in (JAVA_OBJS): Added boehm.o.
(boehm.o): New target.
* Make-lang.in (JAVA_SRCS): Added boehm.c.
* java-tree.h (flag_use_boehm_gc): Declare.
(get_boehm_type_descriptor): Declare.
* lang.c (lang_f_options): Added `use-boehm-gc'.
(flag_use_boehm_gc): New global.
* lang-options.h: Added -fuse-boehm-gc.
* boehm.c: New file.
* class.c (get_dispatch_table): If class uses a Boehm type
descriptor, put it in the vtable.
(make_class_data): Removed dead code.
2000-03-03 Per Bothner <per@bothner.com>
* decl.c (init_decl_processing): Initialize sizetype properly.
2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
(PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
* jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
* jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
(jcf_parse): New local `current'. Load innerclasses seen in outer
context being processed.
* jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
* jcf-write.c (append_innerclasses_attribute): New function.
(append_innerclasses_attribute_entry): Likewise.
(get_access_flags): Handle static classes. Set anonymous and local
classes to be private.
(generate_classfile): Attribute count adjusted. Call
append_innerclasses_attribute.
* parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
PURE_INNER_CLASS_TYPE_P.
* parse.y (parser_qualified_classname): New parameter `is_static',
produce non qualified name accordingly.
(block_statement:): Set LOCAL_CLASS_P when declaring local class.
(create_interface): Added argument to parser_qualified_classname.
(create_class): Added argument to parser_qualified_classname. Setup
alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
(add_inner_class_fields): Fixed indentation.
(method_declarator): Use PURE_INNER_CLASS_DECP_P.
(method_declarator): Fixed typo in comment.
(craft_constructor): Use PURE_INNER_CLASS_DECP_P.
(build_current_thisn): Likewise.
(patch_method_invocation): Likewise.
2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
* decl.c (current_function_decl): Move to toplev.c.
2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
(DECL_BIT_INDEX): Use underlying representation.
* parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (build_java_ret): Pass proper type to size_binop.
2000-02-25 Anthony Green <green@cygnus.com>
* expr.c (build_class_init): Mark the decl to be ignored by
check_init.
* java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
* check-init.c: Move DECL_BIT_INDEX to java-tree.h
* class.c (init_test_hash_newfunc): New function.
(decl_hash): New function.
(decl_compare): New function.
* decl.c (emit_init_test_initialization): New function.
(complete_start_java_method): Traverse the init test hashtable,
calling emit_init_test_initialization.
(always_initialize_class_p): Define.
* expr.c (build_class_init): Use initialization tests when
emitting class initialization code.
(always_initialize_class_p): Declare.
* jcf-parse.c (parse_class_file): Set always_initialize_class_p to
1.
* java-tree.h: Include hash.h.
(DECL_FUNCTION_INIT_TEST_TABLE): Define.
(struct lang_decl): Add init_test_table field.
(init_test_hash_entry): Define.
2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* gjavah.c (main): Avoid using `argi' to report unimplemented
options.
2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
initialize locals to avoid warnings. Local `exception_type' moved
into if statement.
2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_expression_name): Use `orig' as a second
argument to resolve_field_access.
(resolve_field_access): Removed unnecessary code when dealing with
static fields.
2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (push_super_field): Don't push the field twice.
* jcf-parse.c (parse_source_file): Call java_reorder_fields.
* parse.h (java_reorder_fields): Prototyped.
* parse.y (java_reorder_fields): New function.
(java_layout_class): Simplified not to worry about re-ordering.
2000-02-23 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_name): In JNI case, correctly quote string.
(print_method_info): Don't handle overrides in JNI mode.
2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
value type set to `boolean_type_node'.
2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
* jcf-dump.c (main): Test for correct condition after
output file creation.
2000-02-19 Anthony Green <green@cygnus.com>
* jcf-depend.c (add_entry): Fix test for first list entry.
2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
* constants.c (build_constants_constructor): Likewise.
2000-02-19 Anthony Green <green@cygnus.com>
* jcf-depend.c (add_entry): Add entries to the end of the list.
1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
* decl.c (INT_TYPE_SIZE): Define if necessary.
(expand_java_return): Handle the case of a native integer smaller
than a JVM integer.
2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
* gjavah.c (help): Use GCCBUGURL.
* jv-scan.c (help): Likewise.
* jcf-dump.c (help): Likewise.
2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_bytecode_insns): Don't generate empty
`finally' clauses.
2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (load_class): Call `fatal' if no file containing
the target class are found.
2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
* Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
lex.c, lex.h, and PARSE_H to...
(parse.o, parse-scan.o): ...here, respectively.
* lex.c: Split out code that may trigger SIGFPE from yylex()
to its own function.
* lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (outer_field_access_p): Stop in time when outer contexts
are exhausted.
(resolve_qualified_expression_name): Properly qualify *everything*
after a package.type to be resoled as expression names.
(find_applicable_accessible_methods_list): Save/restore `class' to
isolate it from a possible outer context search.
2000-02-15 Tom Tromey <tromey@cygnus.com>
* gjavah.c (jni_print_char): New function.
(print_full_cxx_name): Use it.
(decode_signature_piece): Likewise.
(print_cxx_classname): Likewise.
2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
version.o.
(jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
* gjavah.c: Include version.h.
* jcf-dump.c: Likewise.
* jv-scan.c: Likewise.
2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (outer_field_access_fix): First parameter now a tree
node. Check for assignment to final. First argument to
build_outer_field_access_fix modified to accommodate prototype.
(build_outer_field_access): Don't check for assignment to final
here.
(java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
possibly returned by outer_field_access_fix. Changed
outer_field_access_fix's first argument.
(check_final_assignment): $finit$'s context is OK.
(patch_unaryop): Use node instead of its line/column value when
calling outer_field_access_fix.
2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (interface_declaration:): No longer tagged
<node>. Re-installed default action.
(class_member_declaration:): Handle inner interfaces.
(interface_member_declaration): Handle inner interfaces and
classes.
(create_interface): Push error if one seen. Suspend parsing
context when processing an inner interface.
(register_fields): Inner class static field limitations not to
apply to inner interfaces.
2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (load_class): Update `java_error_count' when a
class' file can't be found.
(parse.y): Avoid (byte)code generation when errors seen.
2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
decodes a valid node.
(patch_binop): Handle TRUNC_DIV_EXPR.
2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_package): New local `acc'. Try to progressively
build and guess a package and type name.
2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (find_applicable_accessible_methods_list): Load and
layout the search class if necessary.
(java_complete_tree): Keep to original type of the folded initial
value.
2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
Generate error message if circularity is detected. New static
local `list'.
* java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
* jcf-write.c (generate_bytecode_insns): Very simply handle
SAVE_EXPR.
* parse.y (java_check_circular_reference): Use
`cyclic_inheritance_report' during report, if necessary.
(java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
walking NEW_ARRAY_INIT twice.
2000-02-09 Tom Tromey <tromey@cygnus.com>
* parse.y (check_class_interface_creation): Allow inner classes to
be `private' or `protected', check modifiers' consistency. Prevent
block local classes from bearing any modifiers.
2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* except.c (check_start_handlers): Re-add prototype lost in last
patch.
(maybe_start_try): Remove excess argument to `check_start_handlers'.
2000-02-09 Andrew Haley <aph@cygnus.com>
* decl.c (clear_binding_level): Remove excess initializer.
(maybe_poplevels): Remove unused variable.
(force_poplevels): Ditto.
(struct binding_level): Add comment.
2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_classfile): Don't consider
pre-initialization with reference value (use <clinit> instead.)
* parse.y (java_fix_constructors): No generated constructor for
interfaces.
(build_outer_field_access): Removed debug message.
(outer_field_expanded_access_p): Adapted to bytecode generation.
(build_outer_field_access_method): Use fix_method_argument_names.
(build_outer_method_access_method): Fixed indentation. Added
comment. Handle access method generation for static and also void
methods.
(build_access_to_thisn): Inserted debug message.
(maybe_build_thisn_access_method): Use fix_method_argument_names.
(resolve_qualified_expression_name): Fixed comment.
(not_accessible_p): Adapted to bytecode generation. Added comment.
(patch_method_invocation): Added comment.
(maybe_use_access_method): Fixed leading comment. Handle static
methods.
(java_complete_lhs): Don't shortcut handling of initialized upon
declaration String type static fields when generating bytecode.
(patch_unaryop): Handle outer field access when generating
bytecode.
2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (FIELD_THISN): New macro.
* jcf-write.c (append_synthetic_attribute): New function.
(generate_classfile): Set "Synthetic" attribute on this$<n>,
val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
* parse.y (add_inner_class_fields): Set FIELD_THISN for created
this$<n> fields.
(build_outer_field_access): Turned on access functions usage and
generation when compiling to bytecode.
(maybe_use_access_method): Likewise.
2000-01-25 Andrew Haley <aph@cygnus.com>
* java-except.h (struct eh_range): Add `expanded' field.
(maybe_start_try): Add end_pc arg.
(maybe_end_try): Ditto.
* java-tree.h (force_poplevels): new function.
* expr.c (expand_byte_code): Don't call maybe_start_try or
maybe_end_try.
* except.c (add_handler): Reset expanded.
(expand_start_java_handler): Set expanded.
(check_start_handlers): Don't expand a start handler that's
already been expanded.
(maybe_start_try): Add end_pc arg. Only expand a handler which
ends after end_pc.
(expand_end_java_handler): call force_poplevels.
(force_poplevels): new function.
* decl.c (binding_level): Add start_pc of binding level.
(maybe_pushlevels): Call maybe_start_try when pushing binding
levels.
(maybe_poplevels): Call maybe_end_try when popping binding levels.
(LARGEST_PC): Define.
(clear_binding_level): Use LARGEST_PC.
* java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
* decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
(binding_depth, is_class_level, current_pc): new variables.
(struct binding_level): ditto.
(indent): new function.
(push_jvm_slot): add debugging info.
(maybe_pushlevels): ditto.
(maybe_poplevels): ditto.
(pushlevel): ditto.
(poplevel): ditto.
(start_java_method): ditto.
(give_name_to_locals): comment only.
* except.c (binding_depth, is_class_level, current_pc):
new variables.
(expand_start_java_handler): add debugging info.
(expand_end_java_handler): ditto.
2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gjavah.c (overloaded_jni_method_exists_p): Add prototype.
(print_name_for_stub_or_jni, process_file): Constify a char*.
2000-02-03 Tom Tromey <tromey@cygnus.com>
* jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
2000-01-31 Scott Bambrough <scottb@netwinder.org>
* gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
defined to be 1.
2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
* java-tree.h (TYPE_II_STMT_LIST): New macro.
(struct lang_type): New field `ii_block'.
* lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
* parse.h (struct parser_ctxt): New field `instance_initializers'.
(CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
macros.
* parse.y (add_instance_initializer): New function.
(in_instance_initializer): New static global.
(class_body_declaration:): Link instance initializer block.
(static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
(array_creation_expression:): Remove unused local.
(java_parser_context_push_initialized_field): Fixed leading
comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
CPC_INSTANCE_INITIALIZER_LIST.
(java_parser_context_pop_initialized_field): Likewise.
(add_inner_class_fields): Use CPC_INITIALIZER_STMT.
(register_fields): Use CPC_STATIC_INITIALIZER_STMT and
CPC_INITIALIZER_STMT.
(fix_constructors): New local `class_type'. Use it. Call
add_instance_initializer.
(java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
(patch_return): Forbid return in instance initializers.
(patch_throw_statement): Enforce exception handling in the context
of instance initializers.
2000-02-03 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (java.mostlyclean): Remove executables in
`mostlyclean'.
2000-01-31 Scott Bambrough <scottb@netwinder.org>
* gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
(java_float_finite): Convert to use union Word from javaop.h.
(java_double_finite): Convert to use union DWord from javaop.h.
2000-02-02 Tom Tromey <tromey@cygnus.com>
* gjavah.c (options): Added `jni' entry.
(help): Document -jni.
(flag_jni): New global.
(process_file): Handle JNI output. Don't print text from
-prepend, -add, etc, when generating stubs. Only remove `.class'
suffix if it actually exists.
(main): Create a `.c' file when run with `--jni --stubs'. Create
correct output file name with `--jni'.
(print_include): Mangle header name differently in JNI case.
(HANDLE_METHOD): In JNI mode, call print_method_info to generate
method list.
(print_method_info): Handle JNI case. Put signature info into
method name. Handle case when STREAM is NULL.
(print_name_for_stub_or_jni): New function.
(print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
(print_cxx_classname): Handle JNI.
(print_full_cxx_name): Likewise.
(decode_signature_piece): Likewise.
(overloaded_jni_method_exists_p): New function.
(struct method_name): Added `signature' and `sig_length' fields.
(HANDLE_END_FIELD): Do nothing in JNI mode.
2000-02-02 Tom Tromey <tromey@cygnus.com>
* jv-scan.c: Include version.c, <getopt.h>.
(LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
(options): New array.
(usage): New function.
(version): New function.
(main): Use getopt_long to parse command line.
* jcf-dump.c: Include version.c, <getopt.h>.
(LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
OPT_JAVAP): New macros.
(options): New array.
(usage): Return `void'. Changed message.
(help): New function.
(version): New function.
(main): Use getopt_long_only to parse command line.
* gjavah.c: Include <getopt.h>.
(LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
(options): New array.
(java_no_argument): Removed.
(help): Updated with missing options.
(main): Use getopt_long_only to parse command line.
(usage): Changed message.
2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
* parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
ANONYMOUS_ARRAY_INITIALIZER): New access macros.
* parse.y (array_creation_expression:): Handle anonymous arrays.
(build_array_from_name): Don't set `ret_name' if null.
(resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
(qualify_ambiguous_name): Likewise.
(java_complete_expand_class): Likewise.
2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
* parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
(MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
(SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
(AIPL_FUNCTION_FINIT_INVOCATION): Replaces
AIPL_FUNCTION_COMPLETED_INVOCATION.
(AIPL_FUNCTION_CTOR_INVOCATION): Replaces
AIPL_FUNCTION_INVOCATION_READY.
(AIPL_FUNCTION_DECLARATION): New enum entry.
* parse.y (reorder_static_initialized): New function.
(java_parser_context_pop_initialized_field): Use it.
(add_inner_class_fields): Use
MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
augmented. Install marker after last alias initializer, if any.
(generate_finit): Fixed typo. Don't try to retain only the used
fields.
(method_header): Compute and set DECL_FUNCTION_NAP.
(method_declarator): Fixed comment. Insert alias initializer in
parameter list.
(build_alias_initializer_parameter_list): Fixed leading
comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
(java_complete_expand_class): Code to retain only used aliases
removed.
(java_complete_expand_methods): New local `first_decl'. Generate
$finit$ first, then expand the constructors, regular methods and
<clinit>.
(java_complete_expand_method): Don't report error on missing
return statement if previously detected bogus.
(fix_constructors): Don't patch constructor parameters list.
(patch_method_invocation): Use new AIPL enum values. Reverse
alias initializer list for anonymous classes.
2000-01-30 Anthony Green <green@redhat.com>
* jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
determine how many stack slots to pop.
2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
error handling/recovery.
* java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
FIELD_LOCAL_ALIAS_USED): New macros.
(DECL_FUNCTION_NAP): New macro.
(struct lang_decl): New field `nap'.
(TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
(struct lang_type): New fields `finit_stmt_list' and
`clinit_stmt_list'.
(CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
* parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
(SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
(AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
AIPL_FUNCTION_INVOCATION_READY): New enum fields.
(BUILD_THROW): Macro line separator re-indented.
* parse.y (end_class_declaration): New function.
(maybe_generate_pre_expand_clinit): New name for
java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
pre-expand static fields.
(maybe_generate_clinit): Function deleted.
(check_for_static_method_reference): Prototype's parameter list
indented.
(generate_finit): New name for maybe_generate_finit. Changed
leading comment. Function rewritten to use
TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
(build_alias_initializer_parameter_list): New function.
(java_parser_context_pop_initialized_field): Likewise.
(add_inner_class_fields): Likewise.
(type_declaration:): Call end_class_declaration.
(class_member_declaration:): Likewise.
(formal_parameter_list:): Fixed typos.
(formal_parameter:): Use ARG_FINAL_P to mark created tree list
element. Improved error handling.
(block_statement:): Call end_class_declaration.
(anonymous_class_creation:): Likewise.
(create_anonymous_class): Fixed comments.
(create_class): Call add_inner_class_fields.
(register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
(method_header): Use MARK_FINAL_PARMS.
(finish_method_declaration): Use UNMARK_FINAL_PARMS.
(method_declarator): Propagate final argument flag.
(craft_constructor): New local `artificial'. Call
build_alias_initializer_parameter_list. Use
CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
(source_start_java_method): Mark parm decls with LOCAL_FINAL if
necessary.
(complete_expand_class): Get rid of unused outer context local
alias fields.
(java_complete_expand_methods): Fixed leading
comment. Generate/pre-expand <clinit> first. Changed method
expansion order to regular, $finit$, constructors, <clinit>.
(java_complete_expand_method): Set current_function_decl.
(fix_constructors): Fix constructor parameter list to account for
outer context local alias initializers.
(verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
(resolve_expression_name): Lookup outer context local aliases. New
local `access', use it.
(patch_method_invocation): Patch inner class ctor invocation with
outer context local aliases initialization values. $finit$
invocation patching now includes things generated with
build_alias_initializer_parameter_list.
(argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
(build_super_invocation): Likewise.
(patch_assignment): Changed comment.
2000-01-27 Andrew Haley <aph@cygnus.com>
* jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
(emit_if): Ditto.
(emit_jsr): Ditto.
2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
concatenation.
(OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
* parse.y (register_fields): Don't pass a format specifier to
OBSOLETE_MODIFIER_WARNING.
(check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
specifier.
(check_modifiers): Change function into a macro.
(check_class_interface_creation): Pass a literal format string.
2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* buffer.h: PROTO -> PARAMS.
* check-init.c: Likewise.
* class.c: Likewise.
* constants.c: Likewise.
* convert.h: Likewise.
* decl.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* gjavah.c: Likewise.
* java-except.h: Likewise.
* java-tree.h: Likewise.
* jcf-depend.c: Likewise.
* jcf-dump.c: Likewise.
* jcf-parse.c: Likewise.
* jcf-path.c: Likewise.
* jcf-reader.c: Likewise.
* jcf-write.c: Likewise.
* jcf.h: Likewise.
* jv-scan.c: Likewise.
* jvgenmain.c: Likewise.
* jvspec.c: Likewise.
* lang.c: Likewise.
* lex.c: Likewise.
* lex.h: Likewise.
* parse-scan.y: Likewise.
* parse.h: Likewise.
* parse.y: Likewise.
* typeck.c: Likewise.
* verify.c: Likewise.
* xref.c: Likewise.
* xref.h: Likewise.
* zextract.c: Likewise.
* zipfile.h: Likewise.
2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
(is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
* constants.c (build_constant_data_ref): Check for cached
current_constant_pool_data_ref. Cache current_constant_pool_data_ref
in TYPE_CPOOL_DATE_REF.
* java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
(struct lang_type): New fields `cpool' and `cpool_data_ref'.
(LOCAL_FINAL): New macro.
* jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
constant pool -- don't try to reuse.
(parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
TYPE_LANG_SPECIFIC.
(find_in_current_zip): Use TYPE_JCF.
* parse.h (java_check_final): Prototype removed.
* parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
(maybe_create_class_interface_decl,
check_class_interface_creation): Likewise.
(java_expand_finals): Function removed.
(class_declaration:): Reversed Jan 12, 2000 extra argument patch.
(block_statement:): Fixed comment.
(anonymous_class_creation:): Likewise.
(check_class_interface_creation): Reversed Jan 12, 2000 extra
argument patch.
(check_class_interface_creation): Loosened error report on (inner)
public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
(link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
(maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
argument patch.
(create_interface): Likewise.
(anonymous_class_counter): New static global.
(create_anonymous_class): Reversed Jan 12, 2000 extra argument
patch. Fixed comments.
(create_class): Reversed Jan 12, 2000 extra argument patch. Reset
anonymous_class_counter when declaring a toplevel class.
(craft_constructor): Fixed constructor name when handling
anonymous classes. Anonymous class constructors to feature hidden
this$<n> parameter.
(java_fix_constructors): Added comment.
(java_check_final): Function removed.
(java_complete_expand_methods): Fixed comment. Don't generate
class data, save its outgoing constant pool instead.
(verify_constructor_super): Skip anonymous class constructor
hidden this$<n> parameter.
(java_expand_classes): New local `saved_ctxp'. Removed call to
java_expand_finals and java_check_final. Expand anonymous class
constructors. Generate class data.
(build_super_invocation): Skip anonymous class hidden this$<n>
parameter.
* typeck.c (build_java_signature): Use TYPE_SIGNATURE and
MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
(set_java_signature): Likewise.
2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
* gjavah.c: Delete ACC_VISIBILITY define.
* jcf.h: Add ACC_VISIBILITY define.
* parse.y: final: rule tagged <value>.
(java_check_regular_methods): Use ACC_VISIBILITY define for
default package access check.
(local_variable_declaration_statement): Use final: rule.
2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
* parse.y (format_parameter:): Use final: rule instead of modifiers:.
(final:): New rule.
2000-01-17 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_field_info): Allow non-static final fields.
2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
* parse.y (patch_anonymous_class): New function.
(create_anonymous_class): Register incomplete type when the
class/interface to extends/implement isn't known yet.
(parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
(verify_constructor_super): Tuned error message.
2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
(ANONYMOUS_CLASS_P): New macro.
(TYPE_SIGNATURE, TYPE_JCF): New macros.
(INNER_CLASS_TYPE_P): Fixed typo in leading comment.
* parse.y (create_class): Added leading argument.
(maybe_create_class_interface_decl,
check_class_interface_creation): Likewise.
(craft_constructor): New function.
(verify_constructor_super): Added argument in prototype.
(class_declaration:): Inserted leading argument.
(for_begin:): Use FOR_LOOP_P.
(anonymous_class_creation): Create WFL of the anonymous class to
instantiate. Call build_new_invocation. Added comments.
(check_class_interface_creation): Handle parameter `anonymous' in
verbose mode class creation announce.
(link_nested_class_to_enclosing): Exclude anonymous classes.
(maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
anonymous class, even though they appear to have an enclosing
context.
(create_interface): Pass extra argument to
check_class_interface_creation.
(create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
(create_class): Call check_class_interface_creation and
maybe_create_class_interface_decl with extra new argument. Don't
add private this$<n> to anonymous classes.
(method_declarator): Insert hidden this$<n> to anonymous class
constructors.
(java_fix_constructors): Deleted code creating default
constructor. Call craft_constructor instead.
(java_check_regular_methods): Set `saw_constructor' to 1 for
anonymous classes.
(fix_constructors): Pass extra argument to verify_constructor_super.
(verify_constructor_super): New local `sdecl', use it. Search for
matching constructor (possibly featuring arguments) in super
class.
(lookup_method_invoke): Craft constructor according to arguments
list when dealing with anonymous class constructors.
(build_super_invocation): Pass arguments to anonymous class super
constructors.
(search_loop): Use FOR_LOOP_P.
(labeled_block_contains_loop_p): Likewise.
2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (set_super_info): Set CLASS_STATIC when appropriate.
(enclosing_context_p): New function.
(get_access_flags_from_decl): Handle CLASS_STATIC.
(maybe_layout_super_class): Extra first argument passed to
do_resolve_class.
(layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
ID_INIT_P.
* decl.c (access0_identifier_node): New global.
(init_decl_processing): access0_identifier_node initialized.
(pushdecl): Set DECL_CONTEXT only on non type decls.
* expr.c (lookup_field): Lookup inner class fields in enclosing
contexts.
(expand_invoke): Use ID_INIT_P.
(expand_java_field_op): Use DECL_CLINIT_P.
* java-tree.def (CLASS_LITERAL): New tree code.
* java-tree.h (DECL_FUNCTION_ACCESS_DECL,
DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
(struct lang_decl): New field `inner_access'.
(enclosing_context_p): Prototyped.
(DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
ID_CLINIT_P): New macros.
(CLASS_STATIC): New macro.
(CLASS_ACCESS0_GENERATED_P): New macro.
(OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
INNER_CLASS_P): New macros.
(DECL_INNER_CLASS_LIST): New macro.
* jcf-parse.c (yyparse): Avoid the use of ANSI string
concatenation.
* jcf-write.c (generate_bytecode_insns): binop: Change the type of
the shift value to int. Fixed typo in comment.
* lex.c (inst_id, wpv_id): Initialize.
* mangle.c (unicode_mangling_length): Take `$' into account.
* parse.h (DRECOVER, RECOVER): Terminate properly.
(IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
(typedef struct _jdep): New field `enclosing'.
(JDEP_ENCLOSING): New macro.
(IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
(struct parser_ctxt): New fields `marker_beginning', `marked_end'.
(GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
GET_ENCLOSING_CPC_CONTEXT): New macros.
(PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
(do_resolve_class): Added extra argument in prototype.
* parse.y (resolve_class): Added extra argument in prototype.
(maybe_create_class_interface_decl): Likewise.
(maybe_use_access_method, build_wfl_wrap): New functions.
(java_complete_expand_classes, java_complete_expand_class):
Likewise.
(java_parser_context_push_initialized_field,
java_parser_context_suspend, java_parser_context_resume):
Likewise.
(maybe_make_nested_class_name, make_nested_class_name,
set_nested_class_simple_name_value,
link_nested_class_to_enclosing, find_as_inner_class,
find_as_inner_class_do, check_inner_class_redefinition,
build_thisn_assign, build_current_thisn, build_access_to_thisn,
maybe_build_thisn_access_method, build_outer_field_access,
build_outer_field_access_methods, build_outer_field_access_expr,
build_outer_method_access_method, build_new_access_id,
build_outer_field_access_method, outer_field_access_p,
outer_field_expanded_access_p, outer_field_access_fix,
build_incomplete_class_ref, patch_incomplete_class_ref,
create_anonymous_class): Likewise.
(inst_id, wpv_id): New static global variables.
(synchronized:): New rule, tagged <node>.
(type_declaration:): No longer tagged <node>. Call POP_CPC in sub
rules.
(anonymous_class_creation:): New rule, tagged <node>.
(NEW_TK): Tagged <node>.
(type_literals, array_type_literal): New rules, tagged <node>.
(class_declaration:): Removed action when reducing by class_body:
(class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
using GET_CPC in sub-rules.
(class_member_declaration): Handle inner classes.
(method_declaration): When reducing method_header:, reset
current_function_decl when appropriate.
(method_declarator:): Set the number of formal parameter to 0 for
method declared without arguments.
(constructor_declarator:): Likewise.
(static_initializer:): List of elements kept in a list.
(static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
use of the keyword `static' for type declarations.
(block_statement:): Handle inner class declarations.
(primary_no_new_array:): Use type_literals:. Fixed comment. Handle
type qualified `this'.
(class_instance_creation_expression): Use anonymous_class_creation:
to handle inner class instances creation. Handle qualified `new'.
(something_dot_new): Added appropriate actions.
(create_new_parser_context): New function.
(java_push_parser_context, java_parser_context_save_global,
java_parser_context_suspend): Use create_new_parser_context.
(check_modifiers): Changed leading comment.
(check_class_interface_creation): Handle interclasses.
(add_superinterfaces): Fixed comment.
(create_interface): Build qualified name from the raw_name instead
of its matching WFL. Push the initialized fields list. raw_name added
as an extra argument to maybe_create_class_interface_decl.
(create_class): Build qualified name from the raw_name instead of
its matching WFL. Removed assignment to current_parsed_class_un.
Call PUSH_ERROR before returning an error. Suspend the current
parser context when processing an inner class. Push the
initialized fields list. raw_name added as an extra argument to
maybe_create_class_interface_decl. Add the private this$<n>
field.
(duplicate_declaration_error_p): Use GET_CPC when calling find_field.
(register_fields): Get the class type from GET_CPC and handle
previous errors. Added code to handle the creation of static
fields in inner classes. Initialized fields initialization
statements kept in a list of lists.
(maybe_generate_finit): Initialized fields initialization
statements kept in a list of lists. Use GET_CPC.
(maybe_generate_clinit): Likewise.
(method_header): Use GET_CPC and GET_CPC_UN.
(parser_qualified_classname): Handle inner classes.
(register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
(java_fix_constructors): Hide pointer to enclosing context
instance in constructor list when dealing with inner classes.
(jdep_resolve_class): Call resolve_class with extra first argument
JDEP_ENCLOSING.
(resolve_class): Add enclosing context as a first extra argument
to do_resolve_class.
(do_resolve_class): Call find_as_inner_class. Handle WFLs
properly.
(resolve_no_layout): Extra argument added to resolve_class
invocation.
(reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
(java_get_real_method_name): Use GET_CPC_UN.
(check_abstract_method_definitions): Use DECL_CLINIT_P.
(java_check_abstract_methods): Handle static method declared in
inner classes by an error.
(java_check_regular_methods): Use DECL_CLINIT_P.
(source_start_java_method): Also set DECL_MAX_LOCALS.
(create_artificial_method): Call java_parser_context_save_global
and java_parser_context_restore_global instead of saving/restoring
the context by hand.
(expand_start_java_method): Improved verbose mode message.
(java_complete_expand_methods): Fixed leading comment. Use
DECL_CLINIT_P.
(fix_constructors): Added assignment to this$<n> if necessary.
(java_expand_classes): Call java_complete_expand_classes instead
of java_complete_expand_methods.
(make_qualified_primary): Simplified.
(merge_qualified_name): Optimized for missing left or right parts.
(resolve_expression_name): Handle access to outer class fields from
interclasses.
(resolve_qualified_expression_name): New macro
RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
classes. Report error on non appropriate qualification of
`new'. Handle qualified `this'.
(not_accessible_p): Allow access to outer class private fields from
inner classes.
(patch_method_invocation): Handle method invocations through
access methods and inner class constructor invocations.
(find_applicable_accessible_methods_list): Search enclosing
contexts of an inner class.
(search_applicable_methods_list): Fixed typo.
(argument_types_convertible): Handle inner class constructors'
hidden outer context reference argument.
(qualify_ambiguous_name): Handle qualified `this'.
(java_complete_lhs): Handle use of field accessed through
artificial access methods in various cases of assignments. Handle
CLASS_LITERAL node.
(check_final_assignment): Use DECL_CLINIT_P.
(valid_ref_assignconv_cast_p): Handle the destination being an
enclosing context of the source.
(patch_unaryop): Handle use of field accessed through artificial
access methods.
(patch_return): Use DECL_CLINIT_P.
(patch_throw_statement): Use DECL_CLINIT_P.
(check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
* verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
ID_INIT_P.
2000-01-16 Anthony Green <green@cygnus.com>
* parse.y (build_string_concatenation): Only use
StringBuffer(String) shortcut if String arg is constant.
2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_bytecode_insns): binop: Change the type of
the shift value to int. Fixed typo in comment.
2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
* jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
* jcf-write.c: Likewise.
* parse.y: Likewise.
* parse.c: Regenerate.
2000-01-09 Anthony Green <green@cygnus.com>
* jcf-write.c (generate_bytecode_insns): Emit invokeinterface
bytecodes in the correct order.
2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
2000-01-06 Anthony Green <green@cygnus.com>
* expr.c (java_lang_expand_expr): Switch to permanent obstack
before building constant array decl.
2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_bytecode_conditional): Fixed indentation in
method invocation and typo in conditional expression.
(generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
the appropriate NOTE_POP.
* parse.y (patch_binop): Shift value mask to feature the right
type.
1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (assume_compiled, assume_compiled_node): Add static
prototype.
(add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
* jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
* jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
* parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
to `__modifier' to avoid stringifying it.
* parse.y (verify_constructor_circularity): Don't call a variadic
function with a non-literal format string.
(java_check_abstract_methods): Move unreachable code inside
`continue' statement.
(lookup_method_invoke): Call xstrdup, not strdup.
* expr.c (expand_java_field_op): Avoid the use of ANSI string
concatenation.
* jcf-parse.c (yyparse): Likewise.
* jv-scan.c (main): Likewise.
1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
concatenation.
* parse.y (synchronized, variable_redefinition_error,
check_class_interface_creation, create_interface, create_class,
method_header, finish_method_declaration,
check_modifiers_consistency, method_declarator,
complete_class_report_errors, check_abstract_method_definitions,
java_check_regular_methods, check_throws_clauses,
java_check_abstract_methods, read_import_dir,
check_pkg_class_access, declare_local_variables, fix_constructors,
cut_identifier_in_qualified, resolve_expression_name,
resolve_qualified_expression_name, patch_method_invocation,
java_complete_lhs, patch_assignment, try_builtin_assignconv,
patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
patch_exit_expr, patch_exit_expr, patch_switch_statement,
patch_try_statement, patch_synchronized_statement,
patch_throw_statement, check_thrown_exceptions,
patch_conditional_expr): Likewise.
1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Makefile.in (LIBDEPS): Added gcc's errors.o
(../jcf-dump$(exeext):): Link with gcc's errors.o
(../gcjh$(exeext):): Likewise.
* expr.c (expand_java_NEW): Layout the entire target type instead of
laying out its methods only.
(lookup_field): Layout the class after having loaded it.
* java-tree.h (java_debug_context): Declared.
* jcf-io.c (toplev.h): Included.
(find_class): Removed assignment to jcf's outofsynch
field. Force source file to be read if newer than its matching
class file. Tweaked debug messages.
* jcf-parse.c (jcf_out_of_synch): Deleted.
(read_class): Call to jcf_out_of_synch removed.
* jcf.h (typedef struct JCF): Field `outofsynch' deleted.
(jcf_out_of_synch): Prototype deleted.
* parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
`deprecated' and `class_err': integer turned into bit-fields.
New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
* parse.y (package_list): New global.
(package_declaration:): Record newly parsed package name.
(extra_ctxp_pushed_p): Static global deleted.
(java_parser_context_save_global): Create buffer context for the
purpose of saving globals, if necessary.
(java_parser_context_restore_global): Pop context pushed for the
purpose of saving globals, if necessary.
(java_debug_context_do): New prototype and function.
(java_debug_context): Likewise.
(do_resolve_class): Use already parsed package names to qualify
and lookup class candidate.
(java_pre_expand_clinit): Removed unnecessary local variable.
1999-12-17 Tom Tromey <tromey@cygnus.com>
* gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
fixes PR gcj/119.
(process_file): Use `\n\' at end of each line in string.
1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (expand_invoke): Layout the loaded class before
attempting to use it.
(expand_java_field_op): Allow final field assignments to take
place in $finit$.
* typeck.c (convert): Return error_mark_node if expr is null.
1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (class_depth): Return -1 if the class doesn't load
properly.
* expr.c (can_widen_reference_to): Check for errors during depth
computation and return 0 accordingly.
* jcf-parse.c (parse_source_file): Call java_fix_constructors to
create default constructors and add an other error check.
* parse.h (java_fix_constructors): Prototyped.
* parse.y (java_pre_expand_clinit): Likewise.
(build_super_invocation): Re-prototyped to feature one argument.
(java_check_circular_reference): Directly use `current'.
(java_fix_constructors): New function.
(java_check_regular_methods): Don't create default constructors
here, but abort if none were found.
(java_complete_expand_methods): Pre-process <clinit> calling
java_pre_expand_clinit.
(java_pre_expand_clinit): New function.
(fix_constructors): build_super_invocation invoked with the
current method declaration as an argument.
(build_super_invocation): Use the context of the processed method
decl argument instead of current_class.
* typeck.c (lookup_java_method): Take WFLs in method names into
account.
1999-12-14 Per Bothner <per@bothner.com>
* class.c (make_class_data): flag_keep_inline_functions to keep
private methods in the method array.
1999-12-15 Anthony Green <green@cygnus.com>
* check-init.c (check_init): Take into account both types of
`throw's when checking for uninitialized variables.
1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_complete_lhs): Force conversion of array
dimensions to int_type_node, that's what runtime's ABI expects.
1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
operand of a WFL, until the Java front-end gets fixed with regard
to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
1999-12-10 Andrew Haley <aph@cygnus.com>
* parse.h (BUILD_THROW): Add support for sjlj-exceptions.
decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
expr.c (build_java_athrow): Add support for sjlj-exceptions.
java-tree.h: Ditto.
jcf-write.c: Ditto.
1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (java_lang_expand_expr): Switch to permanent obstack
before calling expand_eh_region_start and expand_start_all_catch.
* except.c (expand_start_java_handler): Switch to permanent
obstack before calling expand_eh_region_start.
(expand_end_java_handler): Switch to permanent obstack before
calling expand_start_all_catch.
1999-12-5 Anthony Green <green@cygnus.com>
* decl.c (init_decl_processing): Mark throw_node as a noreturn
function with side effects.
(init_decl_processing): Mark all memory allocating DECLs with
DECL_IS_MALLOC.
1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* except.c (expand_end_java_handler): Call
expand_resume_after_catch and end_catch_handler.
1999-11-30 Anthony Green <green@cygnus.com>
* verify.c (verify_jvm_instructions): Create new return label
chain if non existent (don't rely on the verified state of the jsr
target.)
1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_bytecode_insns): Fixed indentation for
COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
* parse.y (patch_assignment): Removed bogus final class test on
lhs when checking on whether to emit an ArrayStoreException runtime
check.
* expr.c (expand_java_arraystore): Likewise.
1999-11-28 Anthony Green <green@cygnus.com>
* decl.c (find_local_variable): Reuse single slot decls when
appropriate.
1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (saw_java_source): Global variable removed.
(read_class): Don't use `saw_java_source'. Added extra braces.
(yyparse): Code setting `saw_java_source' removed.
1999-11-24 Mark Mitchell <mark@codesourcery.com>
* except.c (emit_handlers): Zero catch_clauses after emitting them.
1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* verify.c (merge_type_state): Non verified subroutines being
considered more than once to trigger passive type merge.
1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
in case of error. Error message tuned.
1999-11-21 Anthony Green <green@cygnus.com>
* constants.c (find_methodref_index): Unwrap method names before
inserting them in the constant pool.
* jcf-parse.c (jcf_parse): Display `interface' when appropriate.
* class.c (assume_compiled_node): New typedef.
(assume_compiled_tree): New static data.
(find_assume_compiled_node): New function.
(add_assume_compiled): New function.
(assume_compiled): New function.
* class.c (make_class_data): Use assume_compiled.
(is_compiled_class): Use assume_compiled.
* java-tree.h (add_assume_compiled): Declare.
* lang.c (lang_decode_option): Parse new options.
1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class): Always convert TYPE_SIZE_UNIT to
int_type_node: that's what `_Jv_AllocObject' expects.
1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (lookup_method_invoke): Use lang_printable_name to
reliably build the type name during error report. Fixes PR gcj/97.
1999-11-09 Tom Tromey <tromey@cygnus.com>
* jcf-path.c: Include <sys/stat.h>.
(jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
(DIR_UP): New macro.
1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (source_end_java_method): Resume permanent allocation,
reversing Apr 27 1998 patch.
(patch_string_cst): Pop obstacks after having pushed the permanent
ones.
1999-11-05 Tom Tromey <tromey@cygnus.com>
* class.c (finish_class): Emit inlined methods if any native
methods exist in the class. Fixes PR gcj/85.
1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
(qualify_ambiguous_name): Likewise.
1999-11-03 Godmar Back <gback@cs.utah.edu>
* typeck.c: (lookup_java_method): search all inherited
interfaces when looking up interface method.
1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (method_header:): Issue error message for rule `type
error'.
(synchronized:): Error report when not using synchronized.
1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_qualified_expression_name): Prevent `this' from
being used before the superclass constructor has been called.
(complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
instead of `CALL_THIS_CONSTRUCTOR_P'.
1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
* check-init.c: Fix typo in comment.
1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (add_method_1): Set DECL_INLINE to 1 for private, static
and final method.
1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (expression_statement:): Call function to report
improper invocation of a constructor.
(parse_ctor_invocation_error): New function.
1999-10-26 Mark Mitchell <mark@codesourcery.com>
* decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
remember_end_note.
1999-10-21 Tom Tromey <tromey@cygnus.com>
* jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
in generated `main'.
1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
(qualify_ambiguous_name): Likewise.
1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_complete_tree): fold_constant_for_init to work on
permanent_obstack.
(java_complete_lhs): Likewise.
(array_constructor_check_entry): Complete an initializer element
on permanent_obstack.
1999-10-19 Tom Tromey <tromey@cygnus.com>
* jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
From Mike Moreton <mike@pillim.demon.co.uk>.
1999-10-15 Greg McGary <gkm@gnu.org>
* java-tree.h (flag_bounds_check): Remove extern decl.
* lang.c (flag_bounds_check): Remove global variable.
(lang_f_options): Remove "bounds-check" entry.
(lang_init_options): Default flag_bounds_check to "on".
1999-10-14 Tom Tromey <tromey@cygnus.com>
* jvgenmain.c (usage): New function.
(main): Use it. Also, handle `-D' options.
* jvspec.c (lang_specific_driver): Recognize -D.
(jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
* jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* jcf-dump.c (print_constant, disassemble_method): Don't call a
variadic function with a non-literal format string.
* parse-scan.y (report_main_declaration): Likewise.
* parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
* parse.y (read_import_dir, patch_assignment, patch_binop,
patch_array_ref): Likewise.
* typeck.c (build_java_array_type): Likewise.
* verify.c (verify_jvm_instructions): Likewise.
1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
1999-10-07 Anthony Green <green@cygnus.com>
* jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
where CHECK_PUT may fail for valid reasons.
* jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
UNSAFE_PUTN): New macros.
1999-10-04 Tom Tromey <tromey@cygnus.com>
* lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
well. Fixes Java PR gcj/59.
* parse-scan.y (yyerror): Report errors.
1999-09-24 Glenn Chambers <GChambers@provsol.com>
* decl.c (insert_block): Remove unconditional `abort'.
1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
* decl.c (builtin_function): No longer static. New arg CLASS. Arg
FUNCTION_CODE now of type int. All callers changed.
Set the builtin's DECL_BUILT_IN_CLASS.
1999-09-23 Tom Tromey <tromey@cygnus.com>
* jvspec.c (lang_specific_driver): Don't read spec file if
-fsyntax-only given.
1999-09-22 Tom Tromey <tromey@cygnus.com>
* lang-specs.h: Added `%(jc1)' to the jc1 spec.
* javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
(WORDS_TO_LONG): Likewise.
(WORDS_TO_DOUBLE): Likewise.
1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (RELOCATION_VALUE_0): New macro.
(RELOCATION_VALUE_1): Likewise.
(emit_iinc, emit_reloc, push_constant1, push_constant2,
push_in_const, push_long_const): Prototyped.
(push_constant1): Argument `index' is of type HOST_WIDE_INT.
(push_constant2): Likewise.
(push_int_const): Cast find_constant1's integer arguments to `jword'.
(find_constant_wide): Cast find_constant2's integer arguments to
`jword'.
(find_constant_index): Cast find_constant2's and find_constant2's
integer arguments to `jword'.
(emit_pop): Argument `value' is of type HOST_WIDE_INT.
(emit_switch_reloc): Use RELOCATION_VALUE_0.
(emit_if): Use RELOCATION_VALUE_1.
(emit_goto): Likewise.
(emit_jsr): Likewise.
(generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
argument to push_long_const to HOST_WIDE_INT.
1999-09-15 Andreas Schwab <schwab@suse.de>
* Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
1999-09-20 Nick Clifton <nickc@cygnus.com>
* lang.c (lang_decode_option): Extend comment.
1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
instead of fndecl.
1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gjavah.c (get_field_name, print_method_info, print_include,
add_namelet): Use xmalloc, not malloc.
* jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
(munge): Use xrealloc, not realloc, trust xrealloc to handle a
NULL pointer.
* jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
* jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
* jcf-path.c (add_entry): Likewise.
* jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
* jv-scan.c (xmalloc): Remove definition.
* jvgenmain.c (xmalloc): Likewise.
* jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
* lex.c (java_store_unicode): Use xrealloc, not realloc.
* parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
concat, not xmalloc/sprintf.
(java_push_parser_context): Use xcalloc, not xmalloc/bzero.
(xstrdup): Remove definition.
* parse.y (duplicate_declaration_error_p,
constructor_circularity_msg, verify_constructor_circularity,
check_abstract_method_definitions, java_check_regular_methods,
java_check_abstract_methods, patch_method_invocation,
check_for_static_method_reference, patch_assignment, patch_binop,
patch_cast, array_constructor_check_entry, patch_return,
patch_conditional_expr): Use xstrdup, not strdup.
* zextract.c (ALLOC): Use xmalloc, not malloc.
1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
* jvspec.c: Include gcc.h. Don't include gansidecl.h.
(do_spec, lang_specific_pre_link, lang_specific_driver,
input_filename, input_filename_length): Don't declare.
(main_class_name, jvgenmain_spec, lang_specific_driver):
Constify a char*.
(lang_specific_driver): All calls to the function pointer
parameter now explicitly call `fatal'.
1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (find_applicable_accessible_methods_list): Search
abstract classes as interfaces.
1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (finish_class): We're now outside a valid method
declaration. Tell the rest of gcc so.
1999-09-08 Bruce Korb autogen@linuxbox.com
* Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
1999-09-07 Tom Tromey <tromey@cygnus.com>
* gjavah.c (add_class_decl): Generate include for gcj/array.h, not
java-array.h.
(decode_signature_piece): Don't emit "::" in JArray<>.
(print_namelet): Only print trailing `;' when printing a class.
1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
* java-tree.h: Delete declarations for all tree nodes now moved to
global_trees.
* decl.c: Delete their definitions.
1999-09-04 Mark Mitchell <mark@codesourcery.com>
* Make-lang.in (jc1): Depend on ggc-callbacks.o.
* Makefile.in (OBJS): Add ggc-callbacks.o.
(OBJDEPS): Likewise.
1999-09-03 Tom Tromey <tromey@cygnus.com>
* parse.y (strip_out_static_field_access_decl): Return operand if
it satisfies JDECL_P.
1999-09-02 Tom Tromey <tromey@cygnus.com>
* gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
Handle nested arrays, like `[[I'.
1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (finish_class): Remove unused parameter, all callers
changed.
* expr.c (build_java_athrow): Change return type to void.
(java_lang_expand_expr): Make sure each case in switch returns a
value.
* java-tree.h (finish_class): Fix prototype to take void args.
* jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
(main): Issue return from main, not exit.
* jcf-parse.c (parse_class_file): Fix call to `finish_class'.
* jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
* jv-scan.c (main): Issue return from main, not exit.
* parse.y (check_abstract_method_definitions,
java_check_abstract_method_definitions): Add static prototypes.
(java_complete_expand_methods): Fix call to `finish_class'.
* verify.c (verify_jvm_instructions): Initialize variables `oldpc'
and `prevpc'.
1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lang.c (language_string): Constify.
1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (LIBS): Fix definition so we link with $(CLIB).
Remove hacks for stuff which comes from libiberty.
* Make-lang.in: Likewise.
1999-08-30 Hans-Peter Nilsson <hp@axis.se>
* Makefile.in (xref.o): Depend on xref.c explicitly.
1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* java-tree.h (lang_printable_name): Constify a char*.
* lang.c (lang_printable_name): Likewise.
1999-08-27 Jeffrey A Law (law@cygnus.com)
* gjavah.c, jcf-write.c, verify.c: Do not use C++ style
comments in C code.
1999-08-26 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_cxx_classname): Print "::" before qualified
name.
1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (lookup_cl): Changed leading comment. Now does its best
to set the column number.
(qualify_ambiguous_name): Take WFL wrappers into account.
1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
* verify.c (verify_jvm_instructions): Don't check instruction
validity beyond end of method.
1999-08-25 Tom Tromey <tromey@cygnus.com>
* jvspec.c (lang_specific_driver): Correctly handle --help again.
1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gjavah.c (print_name, print_base_classname, utf8_cmp,
cxx_keyword_subst, generate_access, name_is_method_p,
get_field_name, print_field_name, super_class_name, print_include,
decode_signature_piece, print_class_decls, usage, help,
java_no_argument, version, add_namelet, print_namelet): Add static
prototype.
(print_base_classname, utf8_cmp, cxx_keyword_subst,
name_is_method_p): Constify a char*.
(get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
Provide a final else clause in an if-else-if.
(print_field_info): Add missing final arg in function call to
`print_field_name'.
(print_method_info, decompile_method, decode_signature_piece,
print_c_decl, print_full_cxx_name, print_stub,
print_mangled_classname, super_class_name, print_include,
add_namelet, add_class_decl, print_class_decls, process_file,
help): Constify a char*.
* jcf-write.c (jcf_handler, push_constant1, push_constant2,
push_int_const, find_constant_wide, find_constant_index,
push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
emit_if, emit_goto, emit_jsr, call_cleanups,
make_class_file_name): Add static prototypes.
(generate_bytecode_return, generate_bytecode_insns): Pass a
NULL_PTR, not a NULL_TREE.
* jv-scan.c: Include "jcf.h".
(main): Declare using DEFUN macro.
* jvspec.c (find_spec_file, lang_specific_pre_link,
lang_specific_driver): Add prototypes.
(find_spec_file): Constify a char*.
* keyword.gperf (hash, java_keyword): Add prototypes.
* lang.c (lang_print_error): Add static prototype.
(lang_init): Prefer memcpy over bcopy to avoid casts.
* lex.c (yylex): Add static prototype.
* parse-scan.y: Include "lex.c" earlier.
* parse.h: Remove redundant declaration for `yylex'.
* parse.y (java_decl_equiv, binop_compound_p, search_loop,
labeled_block_contains_loop_p): Add static prototypes.
(not_accessible_p): Make static to match prototype.
* verify.c (start_pc_cmp): Don't needlessly cast away const.
1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (check_method_redefinition): Changed leading comment.
(check_abstract_method_definitions): New function.
(java_check_abstract_method_definitions): New function.
(java_check_regular_methods): Call it.
(verify_constructor_super): Fixed indentation.
(lookup_method_invoke): Likewise.
1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (method_header): Return a null pointer if the current
class node is null.
(finish_method_declaration): Return if the current function decl
is null.
(source_start_java_method): Likewise.
(java_method_add_stmt): Likewise.
1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (emit_register_class): Removed unnecessary call to
start_sequence.
* parse.y (labeled_block_contains_loop_p): Removed unused local
variable.
1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_refold): Added prototype.
1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
(java_stabilize_reference): Removed unnecessary `else'.
(java_complete_lhs): Set flag to remember boolean. Call
java_refold. Added comments.
(java_decl_equiv): New function.
(binop_compound_p): Likewise.
(java_refold): Likewise.
(patch_unaryop): Striped static field access assigned to decl and
op. Changed promotion scheme for ++/-- operators.
(search_loop): New function.
(labeled_block_contains_loop_p): Likewise.
(patch_loop_statement): Call labeled_block_contains_loop_p. Added
comment.
(patch_bc_statement): Call search_loop. Fixed comment.
1999-08-14 Anthony Green <green@cygnus.com>
* expr.c (java_lang_expand_expr): Mark static array data as
referenced.
1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* jvgenmain.c (main): NUL-terminate name_obstack.
1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* check-init.c (check_bool2_init, done_alternative): Add static
prototypes.
* class.c (add_interface_do, maybe_layout_super_class): Likewise.
(add_method, build_utf8_ref, build_class_ref,
append_gpp_mangled_type, layout_class_method): Constify a char*.
* decl.c (push_promoted_type, make_binding_level): Add static
prototypes.
(push_promoted_type, pushdecl): Constify a char*.
* except.c (find_handler_in_range, link_handler,
check_start_handlers): Add static prototypes.
* expr.c (process_jvm_instruction): Constify a char*.
* gjavah.c (main): Constify a char*.
* java-tree.h (verify_jvm_instructions, process_jvm_instruction):
Constify a char*.
* jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
static prototypes.
(add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
munge, print_ents): Constify a char*.
* jcf-dump.c (disassemble_method): Constify a char*.
(print_constant_pool, print_exception_table): Add static prototypes.
(print_constant, print_exception_table, main, disassemble_method):
Constify a char*.
* jcf-io.c (find_classfile, find_class): Likewise.
* jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
(set_source_filename, predefined_filename_p): Add static prototypes.
(set_source_filename, get_constant, get_class_constant,
find_in_current_zip): Constify a char*.
* jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
static prototypes.
(add_entry, add_path, jcf_path_classpath_arg,
jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
* jcf-reader.c (get_attribute, jcf_parse_preamble,
jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
jcf_parse_one_method, jcf_parse_methods,
jcf_parse_final_attributes): Add static prototypes.
(get_attribute): Constify a char*.
* jcf.h (find_class, find_classfile, jcf_dependency_set_target,
jcf_dependency_add_target, jcf_path_classpath_arg,
jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
* jv-scan.c (main): Constify a char*.
(gcc_obstack_init): Add prototype arguments.
* jvgenmain.c (gcc_obstack_init): Likewise.
(main): Constify a char*.
* lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
static prototypes.
(put_decl_string, lang_print_error): Constify a char*.
(lang_init): Remove redundant extern prototype.
* mangle.c (emit_unicode_mangled_name): Constify a char*.
* typeck.c (convert_ieee_real_to_integer, parse_signature_type):
Add static prototypes.
(get_type_from_signature): Constify a char*.
* verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
Add static prototypes.
(start_pc_cmp): Prefer PTR over GENERIC_PTR.
(verify_jvm_instructions): Constify a char*.
* xref.c (xref_flag_value): Likewise.
* xref.h (xref_flag_value): Likewise.
* zextract.c (makeword, makelong): Add static prototypes.
(makeword, makelong): Constify a uch*.
1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lang.c (java_dummy_print): Constify a char*.
(lang_print_error): Likewise.
(lang_init): Remove redundant prototype for `print_error_function'.
(lang_init_source): Likewise.
(lang_identify): Constify a char*.
1999-08-09 Tom Tromey <tromey@cygnus.com>
* javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
(WORDS_TO_LONG): Likewise.
(WORDS_TO_DOUBLE): Likewise.
1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
* expr.c (java_stack_pop, java_array_data_offset,
build_java_throw_out_of_bounds_exception, case_identity,
build_java_check_indexed_type): Add static prototypes.
(linenumber_table, expand_invoke, expand_java_field_op,
build_primtype_type_ref, expand_byte_code): Constify a char*.
* java-tree.h (build_primtype_type_ref, linenumber_table):
Constify a char*.
(java_lang_expand_expr): Add prototype.
* lang.c: Include rtl.h and expr.h. Remove extern prototype for
`java_lang_expand_expr'.
* lex.c (java_lex_error): Constify a char*.
(java_get_unicode, java_read_char, java_allocate_new_line,
java_unget_unicode, java_sneak_unicode): Prototype.
* parse-scan.y (current_class, package_name, method_declarator,
report_class_declaration, yyerror): Constify a char*.
* parse.h (java_report_errors): Prototype.
(yyerror): Constify a char*.
* parse.y (classitf_redefinition_error, check_modifiers,
parse_jdk1_1_error, lookup_package_type,
lookup_package_type_and_set_next, get_printable_method_name,
purify_type_name): Constify a char*.
(build_super_invocation, maybe_generate_finit,
verify_constructor_super, parser_add_interface,
add_superinterfaces, jdep_resolve_class, note_possible_classname,
java_complete_expand_methods, java_expand_finals,
cut_identifier_in_qualified, java_stabilize_reference,
do_unary_numeric_promotion, operator_string, do_merge_string_cste,
merge_string_cste): Prototype.
(single_type_import_declaration, yyerror,
variable_redefinition_error, build_array_from_name,
build_unresolved_array_type, check_class_interface_creation,
resolve_class, complete_class_report_errors,
note_possible_classname, read_import_dir,
find_in_imports_on_demand, resolve_package, fix_constructors,
check_deprecation, lookup_method_invoke,
maybe_build_primttype_type_ref, array_constructor_check_entry):
Constify a char*.
(java_complete_expand_methods, java_expand_finals): Make static.
(convert_narrow): Remove static prototype.
1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
* Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
1999-08-02 Richard Henderson <rth@cygnus.com>
* decl.c: Include defaults.h instead of expr.h.
* parse.y: Likewise.
1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
* java/decl.c (start_java_method): Change all uses of
PROMOTE_PROTOTYPES, so that it tests it as a C expression.
Ensure expr.h is included.
* java/expr.c (pop_arguments): Ditto.
* java/parse.y (expand_start_java_method): Ditto.
1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
* decl.c: Include "function.h".
* except.c: Likewise.
* parse.y: Likewise.
* Makefile.in: Update dependencies.
1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* expr.c (build_java_soft_divmod): Provide a default case in switch.
(java_lang_expand_expr): Mark parameters `target', `tmode' and
`modifier' with ATTRIBUTE_UNUSED.
* gjavah.c (process_file): Add braces around ambiguous `else'.
* jcf-dump.c (print_access_flags, localvar_free): Change return
type to void.
* parse.y (java_complete_expand_method): Initialize variable
`exception_copy'.
(resolve_qualified_expression_name): Likewise for `field_decl'.
(patch_method_invocation): Likewise for `class_to_search'.
(qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
(patch_assignment): Likewise for `lhs_type'.
* verify.c (verify_jvm_instructions): Remove unused variable
`caller'.
1999-07-25 Richard Henderson <rth@cygnus.com>
* decl.c (va_list_type_node): New.
1999-07-25 Anthony Green <green@cygnus.com>
* gjavah.c (print_stub): New function.
(METHOD_IS_NATIVE): New macro.
(print_mangled_classname): Make static.
(HANDLE_END_FIELD): Don't emit fields during stub generation.
(process_file): Perform stub generation.
(HANDLE_METHOD): Don't emit class decls during stub
generation.
(HANDLE_END_METHOD): Take into account stub generation.
(print_method_info): Handle stub generation.
(print_stub): New function.
(print_cxx_classname): Make signature consistant with others.
(help): Describe -stubs option.
(main): Create stub file.
(version): Use version.c.
(print_full_cxx_name): New function.
(print_c_decl): Use print_full_cxx_name.
1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
* check-init.c (check_init): Handle MAX_EXPR.
1999-07-15 Andrew Haley <aph@cygnus.com>
* lang.c (flag_use_divide_subroutine): New variable.
* typeck.c: (convert_ieee_real_to_integer): Bounds check
fp-to-integer conversion.
(convert): Call convert_ieee_real_to_integer when flag_fast_math
is not set.
* expr.c (build_java_soft_divmod): New function.
(build_java_binop): Call build_java_soft_divmod if
flag_use_divide_subroutine is set.
* decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
soft_lrem_node: new builtin functions.
(init_decl_processing) Initialize the new builtins.
* java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
soft_lrem_node: new builtin functions.
(build_java_soft_divmod): New function.
* parse.y: Call build_java_soft_divmod if
flag_use_divide_subroutine is set.
* parse.c: Rebuilt.
* jvspec.c (lang_specific_driver): Always allow an extra arg (for
a --specs= arg) even if not linking.
* lang-options.h (DEFINE_LANG_NAME ("Java")): Add
-fuse-divide-subroutine
1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_and_layout): Check methods only once.
(resolve_qualified_expression_name): Verify thrown exceptions
compatibility.
(check_thrown_exceptions): Reject exceptions thrown in
initializer. Error message tuned.
1999-07-14 Andrew Haley <aph@cygnus.com>
* expr.c (expand_expr): Do not return the last statement in a
block as the block's value.
1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
CALL_EXPR, to avoid order of evaluation changes.
1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (qualify_ambiguous_name): Do not use
IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* check-init.c (check_init): Handle MAX_EXPR.
* expr.c (force_evaluation_order): Force method call arguments to
be evaluated in left-to-right order.
* parse.y (qualify_ambiguous_name): Loop again to qualify
NEW_ARRAY_EXPR properly.
1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_invoke): Resolve unresolved invoked method
returned type.
(qualify_ambiguous_name): STRING_CST to qualify expression for
type name resolution.
1999-06-24 Andrew Haley <aph@cygnus.com>
* class.c (finish_class): Whenever a deferred method is
output, rescan the list of methods to see if a new candidate for
output can be found.
1999-06-28 Tom Tromey <tromey@cygnus.com>
* jvspec.c (lang_specific_driver): Recognize --help.
1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_package): Fixed bogus return statement.
(patch_method_invocation): Resolve method invocation beginning with
a package name qualifier.
1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (java.stage1): Depend on stage1-start.
(java.stage2): Likewise for stage2-start.
(java.stage3): Likewise for stage3-start.
(java.stage4): Likewise for stage4-start.
1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_complete_lhs): When doing cross referencing, don't
try to keep file location on a WFL expanded as a CALL_EXPR.
1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (finish_method_declaration): Insert a RETURN_EXPR when
compiling to class file a void method with an empty method body.
As a side effect, the bytecode backend will generate the
appropriate `return' instruction.
1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (lookup_package_type_and_set_next): New function prototype.
(resolve_package): Search current and imported packages.
(lookup_package_type_and_set_next): New function.
1999-06-22 Andrew Haley <aph@cygnus.com>
* verify.c (verify_jvm_instructions): Check for pending blocks
before invalid PC test and opcode switch, not after.
1999-06-21 Andrew Haley <aph@cygnus.com>
* except.c (find_handler_in_range): The upper limit for exception
ranges is exclusive, not inclusive: (start <= pc < end).
(link_handler): find child pointer which points to outer by
searching sibling list: previous code incorrectly assumed that
outer->outer->first_child must point to outer.
* verify.c (verify_jvm_instructions): FIXME added to code for
`athrow'.
(verify_jvm_instructions): Do not assume that the last block
processed in a subroutine is a block which ends with a `ret'
instruction. With some control flows it is possible that the last
block ends with an `athrow'.
1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (qualify_ambiguous_name): Reorganized the post
evaluation of non WFL leading expression nodes.
1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
CONVERT_EXPR.
1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (qualify_ambiguous_name): Handle qualified expression
beginning with a STRING_CST.
1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (register_fields): Set DECL_INITIAL on both
pre-initialized static and public fields.
(resolve_field_access): Static field access expressions to always
use pointer types.
(qualify_ambiguous_name): Work out buried CALL_EXPR for proper
qualification. CONVERT_EXPR to be resolved as an expression name.
(java_complete_lhs): Identify and access qualified final
initialized field in switch statement case expression.
(fold_constant_for_init): Pre-initialized field decl constant to
be folded.
1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (note_possible_classname): Mark returned node with
QUALIFIED_P only if the original class name contained a '/'.
1999-06-05 Anthony Green <green@cygnus.com>
* Make-lang.in (gcjh): More parallel build fixes.
1999-06-03 Mike Stump <mrs@wrs.com>
* Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
1999-06-02 Anthony Green <green@cygnus.com>
* except.c (link_handler): Chain exception handlers in order.
1999-06-02 Anthony Green <green@cygnus.com>
* expr.c (expand_byte_code): Fill unreachable bytecode regions
with nops and process as usual in order to always set correct EH
ranges. Emit detailed warnings about unreachable bytecodes.
1999-06-02 Anthony Green <green@cygnus.com>
* class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
constant.
1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (lookup_field_wrapper): Unified returned value to NULL
or the searched field decl.
1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (fold_constant_for_init): Convert numerical constant
values to the type of the assigned field.
1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (lookup_field): Relaxed the test on class loading error
detection.
* parse.y (fold_constant_for_init): Enabeled old code.
1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
decide the validity of the cast of a java.lang.Cloneable reference
to an array.
(patch_conditional_expr): Fixed first argument passed to
binary_numeric_promotion.
1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (qualify_ambiguous_name): Take into account that a
CONVERT_EXPR might specify a type as a WFL.
1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_assignment): Save the rhs before using it as an
argument to _Jv_CheckArrayStore.
1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lex.c (java_parse_doc_section): Fixed `tag' buffer size.
1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lex.c (java_lex): Accepts `+' or `-' after the beginning of a
floating point literal only when the exponent indicator has been
parsed.
1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (formal_parameter:): Construct argument tree list
element even if a yet unsupported final parameter was encountered.
1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (finish_method_declaration): Issue errors for native or
abstract methods declared with a method body, as well as for non
native or non abstract methods with no method body.
1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (build_utf8_ref): Initialize variable `field'.
* decl.c (init_decl_processing): Initialize variable `field'.
* expr.c (build_known_method_ref): Mark parameters `method_type',
`method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
(process_jvm_instruction): Likewise for parameter `length'.
* jvspec.c (lang_specific_driver): Mark variables `saw_math',
`saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
ATTRIBUTE_UNUSED.
* parse.y (maybe_generate_clinit): Remove unused variable
`has_non_primitive_fields'.
(find_in_imports_on_demand): Initialize variables `node_to_use'
and `cl'.
(patch_binop): Likewise for variable `prom_type'.
(patch_unaryop): Likewise for variable `prom_type'.
* verify.c (verify_jvm_instructions): Likewise for variable `last'.
* xref.c (xref_table): Add missing initializer.
1999-05-14 Tom Tromey <tromey@cygnus.com>
* java-except.h (struct eh_range): Removed unused `next' member.
* verify.c (verify_jvm_instructions): Call check_nested_ranges
after adding all exception handlers. Sort exception ranges in
order of start PC.
(struct pc_index): New structure.
(start_pc_cmp): New function.
* except.c (add_handler): Return `void'. Don't call link_handler;
instead construct an ordinary linked list and do range
coalescing.
(check_nested_ranges): New function.
(link_handler): Changed interface to allow merging of eh_ranges.
Split overlapping ranges. Return `void'.
1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (constructor_block_end:): New rule, tagged <node>.
(constructor_body:): Use `constructor_block_end' instead of
`block_end'.
1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (statement_nsi:): Pop `for' statement block.
(java_complete_lhs): Labeled blocks containing no statement are
marked as completing normally.
1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* xref.c (xref_set_current_fp): New function, defined.
* xref.h (xref_set_current_fp): New function, prototyped.
1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* check-init.c (check_init): Take into account that
LABELED_BLOCK_STMT can be empty.
1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_check_regular_methods): Warning check on not
overriding methods with default access in other packages does not
apply to `<clinit>'.
(java_complete_lhs): If block body is an empty_stmt_node, replace
it by NULL_TREE. This prevents gcc from generating an irrelevant
warning.
1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* check-init.c (check_init): Removed code accepting to see things
falling through default:, when doing xrefs.
* java-tree.h (do_not_fold): New global variable, declared.
* parse.y (do_not_fold): New global variable, defined.
(java_complete_expand_method): Set `do_not_fold' to the value of
`flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
and reinstall them after them have been purged; do not check for
initializations; do not issue missing return errors.
(java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
when doing xrefs.
(patch_binop): Skip the fold part when doing xrefs.
(build_string_concatenation): Skip the concatenation part when
doing xrefs.
(patch_synchronized_statement): Do not generate a try-finally when
doing xrefs.
(patch_throw_statement): When doing xrefs, do not call BUILD_THROW
and keep the location where the throw was seen.
* typeck.c (convert): When `do_not_fold' is set, do not attempt
any treatment on the converted node an simply return a NOP_EXPR of
the targeted type.
* xref.c (xref_get_data): New function, defined.
* xref.h (xref_get_data): New function, declared.
(XREF_GET_DATA): Use xref_get_data.
1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gjavah.c (print_include): Cast the result of `strlen' to int
when comparing against a signed value.
(add_namelet): Likewise.
1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* expr.c (expand_invoke): Mark parameter `nargs' with
ATTRIBUTE_UNUSED.
(PRE_LOOKUP_SWITCH): Likewise for variable `match'.
* jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
ATTRIBUTE_UNUSED.
* jcf-reader.c (get_attribute): Cast a value to long
when comparing against a signed expression. Likewise.
* lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
HOST_BITS_PER_CHAR.
1999-05-11 Andrew Haley <aph@cygnus.com>
* parse.y (source_end_java_method): If the current method contains
any exception handlers, force asynchronous_exceptions: this is
necessary because signal handlers in libjava may throw exceptions.
* decl.c (end_java_method): Ditto.
1999-05-11 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
flags.
* jvspec.c (THREAD_NAME): Removed.
(GC_NAME): Likewise.
(MATHLIB): Likewise.
(WITHLIBC): Likewise.
(GCLIB): Likewise.
(THREADLIB): Likewise.
(MATH_LIBRARY): Likewise.
(lang_specific_driver): Don't add `-l' options to command line.
Instead, add a single --specs option. Recognize `-L' options and
use them to search for spec file.
(find_spec_file): New function.
(SPEC_FILE): New define.
1999-05-11 Dave Brolley <brolley@cygnus.com>
* lang-options.h: -MD, -MMD, -M and -MM not needed here for
cpplib-enabled build.
1999-05-05 Per Bothner <bothner@cygnus.com>
* class.c (make_field_value): DECL_INITIAL may be a string literal;
temporarily zero it while calling rest_of_decl_compilation.
* java-tree.h (string_ptr_type_node): Add declaration.
* decl.c: Define and initialize string_ptr_type_node.
* parse.y (patch_string_cst): Use string_ptr_type_node.
* parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
* parse.y (for_statement): Now unconditionally exit_block.
(finish_labeled_statement): No longer exit_block if for-loop.
(patch_loop_statement): Check harder if the loop is already labeled.
* parse.y (patch_initialized_static_field): Removed function.
(maybe_generate_clinit): Removed special handling for interfaces.
(java_complete_expand_methods): Do a preliminary java_complete_tree
on <clinit> to determine if it can be removed.
(java_complete_expand_method): Remove special handling for <clinit>.
(java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
optimize if we get back empty_stmt_node.
For MODIFY_EXPR, re-do checking of static initializers.
(fold_constant_for_init): Don't return immediate if VAR_DECL.
For VAR_DECL, pass correct context.
* verify.c (verify_jvm_instructions): Better error messages.
1999-05-03 Tom Tromey <tromey@cygnus.com>
* parse-scan.y (interface_declaration): Call
report_class_declaration for interfaces.
1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
* Makefile.in: Remove -v from bison command lines.
1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
* check-init.c (check_init): Exclude a case of error when doing
xrefs.
* class.c (layout_class_method): Don't generate the error message
twice when compiling from source.
* lang-options.h: Added `-Wredundant-modifers' and
`-Wunusupported-jdk11' flags and help text.
* lang.c (lang_decode_option): Added support for
`-Wunsupported-jdk11' and `-Wredundant-modifiers'.
flag_static_local_jdk11 and flag_redundant set accordingly.
* lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
* parse.h (EXPR_WFL_ADD_COL): New macro.
(DECL_END_SOURCE_LINE): Likewise.
(DECL_INHERITED_SOURCE_LINE): Likewise.
* parse.y (static_ref_err): New function, prototyped.
(CCB_TK): Now tagged <operator>.
(class_body:): Remember the location of the closing '}' of a class
definition when doing xrefs.
(block:): Likewise.
(block_end:): Likewise.
(create_class): Remember the location of the inherited class
identifier when doing xrefs.
(register_fields): Added test on first operand of `init' before
testing it TREE_CODE.
(method_header): Store the location of the class identifier in the
class decl when doing xrefs.
(finish_method_declaration): Don't combine first/last method line
when doing xref.
(java_check_regular_methods): Warning check on not overriding
methods with default access on other packages move before check on
static methods. Initialization of `aflags' also moved up.
(resolve_expression_name): Call static_ref_err to report the error.
(static_ref_err): New function, implemented.
(resolve_field_access): Returned simplified static field access
when doing xrefs.
(resolve_qualified_expression_name): Check for illegal use of
static fields in a non static context. Call static_ref_err to
report error in various places.
(java_complete_tree): Do not fold initialized static fields when
doing xrefs.
(java_complete_lhs): Likewise.
1999-04-29 Anthony Green <green@cygnus.com>
* expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
create internal labels.
(lookup_label): Ditto.
1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class_method): Generate <clinit>'s rtl for
interfaces.
* decl.c (complete_start_java_method): Don't call _Jv_InitClass
for interfaces' <clinit>.
* expr.c (lookup_field): Search for fields in interfaces.
(expand_invoke): Fixed indentation.
(expand_java_field_op): Likewise. Use IS_CLINIT.
* parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
(IS_CLINIT): New macro.
* parse.y (type_declaration:): Call maybe_generate_clinit after an
interface was parsed.
(maybe_generate_clinit): Don't generate if the current class is an
interface with only fields of primitive types.
(reset_method_name): Use IS_CLINIT.
(java_complete_expand_method): Expand <clinit> when it exists for
interfaces. Use IS_CLINIT.
(resolve_expression_name): Use DECL_CONTEXT instead of
current_class to build static field references.
(java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
ARRAY_REF when doing xreferencing.
(check_final_assignment): Fixed typo in leading comment. Use
IS_CLINIT.
(patch_array_ref): Don't fully expand array references when
xreferencing.
(patch_return): Use IS_CLINIT.
(patch_throw_statement): Likewise.
1999-04-22 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (JAVA_SRCS): Added check-init.c.
1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (predef_filenames, predef_filenames_size): New globals
(init_decl_processing): predef_filenames and predef_filenames_size
initialized.
* java-tree.h (predef_filenames, predef_filenames_size): Declared
extern.
* jcf-parse.c (predefined_filename_p): New function.
(yyparse): Check that files on the command line are specified only
once and issue a warning otherwise.
* parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
* parse.y (source_end_java_method): Nullify NOP method bodies, to
avoid a gcc warning with -W -Wall turned on.
(java_expand_classes): Abort if errors were encountered.
(java_complete_lhs): If the cross reference flag is set, wrap
field DECL node around a WFL when resolving expression name.
1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lang.c (lang_decode_option): Fixed returned value when parsing
`-fxref=...' and `-Wall'.
* parse.y (source_end_java_method): Do not generate code when
flag_emit_xref is set.
(resolve_expression_name): Do not build static field access when
flag_emit_xref is set.
(resolve_field_access): No special treatment on `length' when
flag_emit_xref is set. Do not build qualified static field access
when flag_emit_xref is set.
(patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
when flag_emit_xref is set.
(patch_assignment): Do not generate array store runtime check when
flag_emit_xref is set.
* xref.c (xref_flag_value): Fixed function declaration
indentation.
(xset_set_data): New function.
* xref.h (xref_set_data): Added prototype for new function.
(typedef struct xref_flag_table): New field data.
(XREF_GET_DATA): New macro.
1999-04-19 Tom Tromey <tromey@cygnus.com>
* xref.h (enum): Removed trailing comma.
* parse.y (resolve_qualified_expression_name): Added missing
`break'.
1999-04-15 Anthony Green <green@cygnus.com>
* gjavah.c: New prototypes for java_float_finite and
java_double_finite.
1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_unaryop): Fixed ++/-- operator check on array
references.
1999-04-06 Jeffrey A Law (law@cygnus.com)
* Makefile.in (TREE_H): Add tree-check.h.
(RTL_H): Add genrtl.h.
1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_assignment): Added ArrayStoreException runtime
check.
1999-04-06 Per Bothner <bothner@cygnus.com>
* expr.c (pop_type_0): New function.
(pop_type): Use pop_type_0.
* java-tree.h (pop_type_0): New declaration.
* verify.c (verify_jvm_instructions): Check return instructions.
* parse.y (patch_binop): Don't fold if non-constant and emiting
class files.
1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
* gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
(main_jcf): Don't define.
(process_file): Don't set `main_jcf'.
* java-tree.h (main_jcf): Don't declare.
* jcf-parse.c (main_jcf): Add static definition.
* lang.c (main_jcf): Don't define.
1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (add_method_1): Cast the argument of `bzero' to PTR.
* decl.c (copy_lang_decl): Likewise for `bcopy'.
* jcf-depend.c: Include "config.h", not <config.h>.
* jcf-parse.c (jcf_figure_file_type): Cast the arguments of
`bcopy' to PTR.
* jcf-path.c: Include "config.h", not <config.h>.
* lex.c: Don't include various system header files.
(java_init_lex): Cast the argument of `bzero' to PTR
* parse-scan.y (java_push_parser_context): Likewise.
* parse.y (java_push_parser_context): Likewise.
(patch_bc_statement): Match format specifier to variable argument.
* xref.c: Don't include <stdio.h>.
1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (struct parser_ctxt *ctxp): Now global.
(declare_local_variables): Use WFL compound value for the
declaration source line value, when doing cross-referencing.
1999-03-31 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_field_info): Allow constants of other types.
(print_include): Generate include when new name is proper prefix
of already printed name.
(add_namelet): Likewise.
(cxx_keyword_subst): New function.
(print_method_info): Use it.
(print_field_name): New function.
(get_field_name): New function.
(print_field_info): Use get_field_name and print_field_name.
1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (keyword.h): Generate using gperf language 'C', not
'KR-C', so gperf uses the `const' keyword on strings.
* keyword.gperf (java_keyword): Const-ify a char*.
1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_bc_statement): Fixed identation and a bogus
`printf' format.
1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_assignment): Allow static variables in other
classes to be assigned.
1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (maybe_add_interface): Remove unused variable
`interface_binfo'.
(make_class_data): Use = for assignment, not ==. Likewise.
(emit_register_classes): Remove unused variable `decl'.
* lex.c: Fix comment so as not to contain an embedded `/*'.
* verify.c (verify_jvm_instructions): Remove unused variable
`self_type'.
1999-03-27 Per Bothner <bothner@cygnus.com>
* parse.y (complete_loop_body): Rename to finish_loop_body.
(complete_labeled_statement): Rename to finish_labeled_statement.
(complete_for_loop): Rename to finish_for_loop.
(complete_method_declaration): Rename to finish_method_declaration.
* java-tree.h (continue_identifier_node): New global node.
* decl.c: Define and initialize continue_identifier_node.
* parse.y (generate_labeled_block): Remove - no longer needed.
(build_loop_body): Use continue_identifier_node for continue block.
(finish_labeled_statement): Also do pop_labeled_block actions.
(java_complete_lhs): POP_LOOP even if error.
(build_labeled_block): Special handling for continue_identifier_node.
(patch_loop_statement): Re-organize.
(patch_bc_statement): Re-write.
1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
using a WFL compound value.
* parse.y (xref.h): Include.
(maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
WFL compound value.
(register_fields): Set WFL compound value to lineno if doing
xrefs.
(java_complete_expand_method): Call expand_xref if flag_emit_xref
is set.
* xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
* xref.h (expand_xref): Prototype renamed from xref_generate.
1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
(GET_CURRENT_BLOCK): New macro.
* parse.y (current_static_block): New global variable.
(method_body:): Define action.
(complete_method_declaration): Set current_function_decl to NULL
when work on the current method is done.
(declare_local_variables): Use GET_CURRENT_BLOCK.
(java_method_add_stmt): Likewise.
(java_complete_expand_method): Disable the use of `this' when
expanding <clinit>.
(enter_a_block): If no current method exist, use
current_static_block to link static initializer blocks.
(exit_block): Rewritten to use current_static_block when no current
method decl exists.
(lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
(patch_return): Forbid the use of `return' in static initializers.
(patch_throw_statement): Fixed indentation. Issue specific error
for uncaught thrown checked exception in static initializer
blocks. Removed FIXME.
1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
* java/Make-lang.in: Remove all references to gcj.o/gcj.c.
Link gcj from gcc.o.
1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (find_applicable_accessible_methods_list): When dealing
with interface: ensure that a given interface or java.lang.Object
are searched only once.
1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gjavah.c (print_c_decl): Remove unused argument `flags'.
* jcf-dump.c (print_access_flags): Add braces around if-else.
* jvspec.c (lang_specific_driver): Wrap variable `len' in macro
COMBINE_INPUTS.
* lex.c (build_wfl_node): Add static prototype.
* lex.h (build_wfl_node): Remove static prototype.
* parse.y: Include lex.c early enough to declare everything needed.
Ensure calls to `build_wfl_node' pass the proper arguments.
(create_class): Remove unused variable `super_decl'.
(get_printable_method_name): Initialize variable `name'.
1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Changelog: Fixed 1999-03-22 typos.
* lang.c (lang_decode_option): Fixed typo in error string in the
XARG section.
1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Makefile.in (JAVA_OBJS): Added entry xref.o.
(xref.o): New rule.
* java-tree.h (flag_emit_xref): Declared extern.
* lang.c (xref.h): Included.
(flag_emit_xref): New global variable.
(lang_decode_option): Added support for -fxref.
* xref.c: Created.
* xref.h: Likewise.
1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
* Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
linked with.
1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
$(srcdir)/../system.h and $(JAVA_TREE_H).
(jcf-io.o): Depend on $(JAVA_TREE_H).
(mangle.o): Likewise.
* check-init.c (check_cond_init): Add static prototype.
* class.c (build_java_method_type, hashUtf8String,
make_field_value, get_dispatch_vector, get_dispatch_table,
append_gpp_mangled_type, mangle_static_field): Likewise.
(strLengthUtf8): Hide unused definition.
(hashUtf8String): Const-ify.
(make_field_value): Un-ANSI-fy.
* constants.c: Move inclusion of jcf.h above java-tree.h.
(set_constant_entry, find_class_or_string_constant,
find_name_and_type_constant, get_tag_node,
build_constant_data_ref): Add static prototype.
* decl.c (push_jvm_slot, builtin_function,
lookup_name_current_level): Likewise.
(builtin_function): Const-ify.
* except.c (expand_start_java_handler, expand_end_java_handler):
Add static prototype.
* expr.c (flush_quick_stack, push_value, pop_value,
java_stack_swap, java_stack_dup, build_java_athrow,
build_java_jsr, build_java_ret, expand_java_multianewarray,
expand_java_arraystore, expand_java_arrayload,
expand_java_array_length, build_java_monitor, expand_java_pushc,
expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
expand_compare, expand_test, expand_cond, expand_java_goto,
expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
expand_java_field_op, java_push_constant_from_pool): Likewise.
(decode_newarray_type, expand_iinc): Un-ANSI-fy.
(build_java_arraynull_check): Mark parameters `node' and `type'
with ATTRIBUTE_UNUSED.
(note_label): Likewise for parameter `current_pc'.
(expand_java_call, expand_java_ret): Hide unused definition.
* java-tree.h (make_class, build_constants_constructor,
java_set_exception_lang_code, pop_labeled_block, emit_handlers,
init_outgoing_cpool, register_class, emit_register_classes,
java_layout_seen_class_methods): Prototype.
(unicode_mangling_length): Const-ify.
(append_gpp_mangled_name, append_gpp_mangled_classtype,
emit_unicode_mangled_name, format_int, format_uint,
jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
jcf_print_utf8_replace, open_class): Prototype.
* jcf-dump.c: Include "config.h", not <config.h>. Don't include
<stdio.h>. Include tree.h/java-tree.h.
(utf8_equal_string usage, process_class): Add static prototype.
(open_class): Don't prototype this here.
(utf8_equal_string): Match arguments to format specifiers.
(HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
TABLE_SWITCH, disassemble_method): Likewise.
* jcf-io.c: Include tree.h/java-tree.h.
(open_class, find_classfile, jcf_print_utf8,
jcf_print_utf8_replace): Const-ify.
* jcf-parse.c (parse_zip_file_entries, process_zip_dir,
parse_class_file): Add static prototype.
(find_in_current_zip): Match definition to existing static
prototype.
* jcf-write.c: Include jcf.h before tree.h/java-tree.h.
(alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
finish_jcf_block, define_jcf_label, get_jcf_label_here,
put_linenumber, localvar_alloc, localvar_free, get_access_flags,
write_chunks, adjust_typed_op, generate_bytecode_conditional,
generate_bytecode_return, perform_relocations, init_jcf_state,
init_jcf_method, release_jcf_state, generate_classfile):
Add static prototype.
(emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
(make_class_file_name): Const-ify.
* jcf.h (find_classfile): Const-ify.
* jv-scan.c (reset_report): Remove prototype.
* jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
(error): Rewrite to allow varargs.
* lang.c (lang_f_options): Const-ify.
* lex.c (java_parse_escape_sequence): Add static prototype.
(java_allocate_new_line): Match definition to existing static
prototype.
* mangle.c Include tree.h/java-tree.h.
(unicode_mangling_length, emit_unicode_mangled_name,
append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
* parse.h (jdep_code): Remove trailing comma in enumeration.
(java_get_line_col): Move prototype outside of !JC1_LITE test.
(reset_report): Add prototype.
* verify.c (push_pending_label, merge_types): Add static
prototypes.
* zipfile.h (opendir_in_zip, open_in_zip): Prototype.
1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (find_applicable_accessible_methods_list): Extend the
search to superinterfaces when relevant.
(search_applicable_methods_list): New function.
1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (unmangle_classname): Implemented stricter testing
before setting the QUALIFIED_P flag on an identifier.
1999-03-16 Per Bothner <bothner@cygnus.com>
* parse.y (java_complete_lhs): Call force_evaluation_order
after patch_newarray.
(patch_binop): Don't call fold if there are side effects.
1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_stabilize_reference): Use save_expr instead of
building a SAVE_EXPR node.
(java_complete_lhs): Patch the resulting string of the `+='
operator (if necessary) and complete the RHS after having built
the cast.
1999-03-15 Per Bothner <bothner@cygnus.com>
* class.c (make_class): Don't set CLASS_P here (because
this function is also called by build_java_array_type).
(push_class): Set CLASS_P here instead.
* parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
* jcf-dump.c (print_access_flags): Take extra parameter to indicate
context. If the context is class, perfer "super" over "synchronized".
* jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
* parse.y (create_class): Don't call parser_check_super here;
it is not robust. Always wait until later.
* parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
match what JDK 1.2 does), but don't set ACC_PUBLIC.
1999-03-13 Per Bothner <bothner@cygnus.com>
* lex.c (java_read_char): UNGET invalid non-initial utf8 character.
* lex.h (UNGETC): Change misleading macro.
1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (java_stabilize_reference): Return NODE when patching a
COMPOUND_EXPR.
(java_complete_lhs): Put parenthesis around truth values.
1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class_method): Don't make rtl for interface
methods.
* parse.h (GET_TYPE_NAME): New macro.
* parse.y (if_then_statement:): Fixed indentation.
(if_then_else_statement:): Likewise.
(for_statement:): Fixed spacing.
(try_statement:): Fixed indentation.
(create_interface): Don't force interfaces to be abstract.
(method_header): Abstract methods are OK in interfaces.
(declare_local_variables): Fixed typo in comment.
(java_complete_expand_method): Fixed indentation.
(resolve_qualified_expression_name): Use GET_TYPE_NAME to report
non accessible fields.
(java_stabilize_reference): New function.
(java_complete_lhs): Fixed indentation. Use
java_stabilize_reference in compound assignment. Insert the
cast. If not processing `+' fix string constants before processing
binop.
1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* constants.c (find_class_or_string_constant): Cast variable `j'
to a `jword' when comparing against one.
* expr.c (java_lang_expand_expr): Remove unused variables
`has_finally_p' and `op0'.
* gjavah.c (print_field_info): Cast a value to jint when comparing
against one. Likewise for a jlong.
(add_namelet): Likewise cast a `sizeof' to an int when comparing
against a signed quantity.
* jcf-dump.c (print_signature_type): Remove unused variable `digit'.
(print_signature): Don't needlessly dereference variable `str'
* jcf-reader.c (get_attribute): Mark variables `max_stack' and
`max_locals' with ATTRIBUTE_UNUSED.
(jcf_parse_class): Likewise for variable `index'.
* parse.h (reverse_jdep_list): Remove static prototype.
* parse.y (build_jump_to_finally): Remove prototype and definition.
(reverse_jdep_list): Add static prototype.
* typeck.c (convert_ieee_real_to_integer): Remove unused variables
`assignment' and `expr_decl'.
* verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
1999-03-12 Andrew Haley <aph@cygnus.com>
* jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
we'll need a directory separator and a null character.
1999-03-10 Per Bothner <bothner@cygnus.com>
* jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (method_header): Don't set ACC_ABSTRACT flags on
interfaces.
1999-03-05 Per Bothner <bothner@cygnus.com>
* lex.c (java_parse_end_comment): Take extra parameter (next char).
* class.c (build_utf8_ref): Fix possible name class/ambiguity.
* class.c (layout_class_method): A static method in a base class
is never overridden, so treat it like it doesn't exist.
However, do complain about private non-static method overriding
public static method.
* parse.y: Don't set unused INITIALIZED_P flag.
* java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
* parse.y (find_expr_with_wfl): Optimize tail-calls.
(build_array_from_name): Re-order &index[string] to &string[index].
* parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
error_mark (it might catch more errors, but it is more likely to lose).
1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
(parse-scan.o): Depend on toplev.h.
* class.c (make_method_value): Add prototype. Make it static.
Remove unused second argument, caller changed.
* expr.c (java_lang_expand_expr): Remove unused variable
`return_label'.
* java-tree.h: Don't prototype find_in_current_zip.
Add prototypes for verify_constant_pool, start_java_method,
end_java_method, give_name_to_locals, expand_byte_code,
open_in_zip, set_constant_value, find_constant1, find_constant2,
find_utf8_constant, find_string_constant, find_class_constant,
find_fieldref_index, find_methodref_index, write_constant_pool,
count_constant_pool_bytes and encode_newarray_type.
* jcf-dump.c: Remove unused variable `LONG_temp'.
* jcf-parse.c: Include parse.h.
(jcf_parse_source): Remove unused parameter, all callers changed.
(jcf_figure_file_type): Add static prototype.
(find_in_current_zip): Likewise. Also remove unused parameter,
all callers changed.
(read_class): Initialize variable `saved_pos'.
* jcf-reader.c (jcf_parse_preamble): Mark variables
`minor_version' and `major_version' with ATTRIBUTE_UNUSED.
* lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
(java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
(java_parse_doc_section): Initialize variable `seen_star'.
(java_lex): Wrap variable `number_beginning' in !JC1_LITE.
(java_lex_error): Mark parameters `msg' and `forward' with
ATTRIBUTE_UNUSED.
(java_get_line_col): Mark parameters `filename' and `line' with
ATTRIBUTE_UNUSED.
* parse-scan.y: Include toplev.h.
(yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
* parse.h: use `struct JCF', not plain `JCF'.
(java_parser_context_save_global, java_expand_classes
java_parser_context_restore_global, java_parse): Add prototypes.
* typeck.c (convert_ieee_real_to_integer): Remove unused variable
`node'.
1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
* check-init.c (check_init): COPYN takes word count, not bit count.
1999-02-26 Per Bothner <bothner@cygnus.com>
* typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
explicit build_decl. (Avoids crash in reload when optimizing.)
1999-02-25 Per Bothner <bothner@cygnus.com>
* decl.c (complete_start_java_method): Handle synchronized method
even when compiling from bytecode.
1999-02-26 Tom Tromey <tromey@cygnus.com>
* gjavah.c (add_class_decl): Only generate `#include' if outer
class is not the name of the class we are processing. Correctly
append `.h' in #include.
(process_file): Clean up newlines around generated `#include's.
(decode_signature_piece): Correctly handle inner classes.
(struct include): New structure.
(all_includes): New global.
(print_include): New function.
(add_class_decl): Use it.
(process_file): Likewise.
(add_class_decl): Generate include for java-array.h if array
seen.
(process_file): Don't generate java-array.h include.
* gjavah.c (add_namelet): Check for standard package names here.
(add_class_decl): Don't check for standard package names here.
1999-02-25 Tom Tromey <tromey@cygnus.com>
* parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
When reading a zip file, only use strncmp if both strings are
bigger than the buffer length. Initialize `k' when looping
through zip file.
1999-02-24 Tom Tromey <tromey@cygnus.com>
* gjavah.c (struct namelet): New structure.
(add_namelet): New function.
(print_namelet): New function.
(print_class_decls): Use add_namelet and print_namelet to generate
namespaces and not classes.
(method_printed): New global.
(HANDLE_END_METHOD): Examine method_printed.
(print_method_info): Set method_printed when required. Print
error if function to be ignored is marked virtual. Handle $finit$
method.
(METHOD_IS_FINAL): New macro.
(print_field_info): Use it.
(HANDLE_METHOD): Clear method_printed.
(method_pass): New global.
(HANDLE_END_FIELD): Call add_class_decl on the first pass.
(process_file): Do two passes over both fields and methods.
(HANDLE_METHOD): Examine method_pass.
(root): New global.
(add_class_decl): New function.
(print_class_decls): Don't scan over entire constant pool.
1999-02-23 Tom Tromey <tromey@cygnus.com>
* jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
disable linking in that case.
1999-02-20 Tom Tromey <tromey@cygnus.com>
* jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
not 0x1f.
1999-02-21 Per Bothner <bothner@cygnus.com>
* decl.c (build_result_decl), java-tree.h: New method.
(complete_start_java_method): Handle synchronized methods.
Don't build DECL_RESULT here. (Ordering dependency problem.)
(start_java_method): Call build_result_decl here instead ...
* parse.y (java_complete_expand_method): ... and here.
(expand_start_java_method): Don't call complete_start_java_method here.
(java_complete_expand_method): Call it here instead.
* parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
* java-tree.h: ... here.
* expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
* parse.y (java_complete_lhs): Don't call force_evaluation_order
for ARRAY_REF - it doesn't work when array bounds are checked.
(patch_array_ref): Handle it here instead.
* jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
1999-02-19 Per Bothner <bothner@cygnus.com>
Force left-to-right evaluation of binary operations etc.
* expr.c (force_evaluation_order), java-tree.h: New function.
* parse.y (java_complete_lhs): Pass binary operations, procedure
calls, and ARRAY_REFs to force_evaluation_order.
(various): Set TREE_SIDE_EFFECTS more carefully.
Tolerate random (non-UTF8) encoding in comments without complaining.
* lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
(java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
* parse.y (resolve_qualified_expression_name): Handle error_mark.
(java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
* parse.y (java_complete_lhs): Ignore an empty statement in a
COMPOUND_EXPR. Don't complain about empty statement after return.
1999-02-19 Per Bothner <bothner@cygnus.com>
* parse.y (obtain_incomplete_type): Don't wrap unknown types
in TREE_LIST - just chain the POINTER_TYPEs together.
(resolve_class): If type already resolved, return decl.
After resolving, update TREE_TYPE(class_type), and name (if array).
* parse.h (do_resolve_class), parse.y: Make non-static.
* class.c (maybe_layout_super_class): Take this_class argument.
Do do_resolve_class if necessary.
(layout_class, layout_class_methods): Adjust calls appropriately.
* parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
* typeck.c (build_java_array_type): Don't call layout_class.
1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (check_pkg_class_access): Allow private class access
within the same package.
(strip_out_static_field_access_decl): New function.
(patch_unaryop): Call strip_out_static_field_access_decl on ++/--
operator argument before testing its nature.
1999-02-03 Per Bothner <bothner@cygnus.com>
* java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
(TRY_EXPR): Simplify - it no longer has a finally clause.
* check-init.c (check_init): Handle TRY_FINALLY_EXPR.
Simpler handling of TRY_EXPR, which no longer has a finally clause.
* expr.c (java_lang_expand_expr): Likewise.
* java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
* parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
* parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
(build_try_statement): Remove finally parameter and handling.
(build_try_finally_statement): New function.
(patch_try_statement): No longer need to support finally clause.
(try_statement): Update grammar action rules.
* jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
Simpler handling of TRY_EXPR, which no longer has a finally clause.
1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
* jcf-parse.c (get_constant): Add braces around computation of 'd'
when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
1999-02-17 Andrew Haley <aph@cygnus.com>
* class.c (build_utf8_ref): Back out broken patch which was
intended to to output signatures using '.' as a separator.
* class.c (make_class_data): Output signatures using '.' as a
separator, rather than '/'.
(mangled_classname): Likewise.
(make_field_value): Likewise.
(make_method_value): Likewise.
* constants.c (alloc_class_constant): Likewise.
* expr.c (build_invokeinterface): Likewise.
1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
of an ancient workaround.
1999-02-10 Jeffrey A Law (law@cygnus.com)
* jvspec.c (xmalloc): Kill the prototype. It does not belong
here anymore.
1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lex.c (yylex): Encode \0 as UTF8.
1999-02-10 Tom Tromey <tromey@cygnus.com>
* jvspec.c (lang_specific_driver): Use libgcj, not libjava.
* Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
(libgcj_zip): Renamed.
* jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
LIBJAVA_ZIP_FILE.
(jcf_path_init): Use LIBGCJ_ZIP_FILE.
* jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
(GC_NAME): Renamed -lgc to -lgcjgc.
1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lex.c (java_lang_cloneable): Initialize.
* parse.y (java_lang_cloneable): New static variable.
(qualify_ambiguous_name): Take CONVERT_EXPR into account when
doing one more qualification round.
(valid_ref_assignconv_cast_p): Reject null source or
destination. Allow an array to be cast into java.lang.Cloneable.
(patch_cast): Swapped two first arguments to first call to
valid_ref_assignconv_cast_p.
1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h: DECL_P renamed JDECL_P.
* parse.y: DECL_P replaced by JDECL_P.
(build_array_from_name): Always use pointer's type.
(patch_bc_statement): Extra code to search continue target in a
for loop. Fixed comments. Continue target is current loop when
unlabeled.
1999-02-05 Andrew Haley <aph@cygnus.com>
* class.c (make_class_data): The superclass of an interface should
be null, not class Object.
* lex.c (java_lex): Sign extend hex literals.
1999-02-04 Andrew Haley <aph@cygnus.com>
* class.c (build_utf8_ref): Output signatures using '.' as a
separator, rather than '/'.
(make_class_data): Likewise.
1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
* Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
mkstemp.o. Get them from libiberty now.
1999-02-02 Jeffrey A Law (law@cygnus.com)
* jcf-io.c: Do not include sys/stat.h or sys/wait.h
1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* jvspec.c (xmalloc): Fix the prototype to match the one obtained
from libiberty.h
1999-02-02 Per Bothner <bothner@cygnus.com>
Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
* jcf-write.c (generate_bytecode_return): New function.
(generate_bytecode_insns): Use it, for RETURN_EXPR.
* jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
generate special [fd]const_[01] instructions.
* jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
* verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
handling OPCODE_lookupswitch or OPCODE_tableswitch.
1999-02-01 Per Bothner <bothner@cygnus.com>
* parse.y (patch_method_invocation): Handle calling static methods,
even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
* parse.y (java_complete_lhs): Don't complain about unreachable
exit condition in a do-while statement.
1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lex.c (java_read_char): Fixed utf8 decoding.
(java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
range.
* parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
comments. Local variable `all_primitive' is gone. Broadened
acceptance of `0' to floating point targets. `long' can now be
widened to `double' or `float'.
(valid_method_invocation_conversion_p): Added leading
comment. Fixed tabulation.
(build_string_concatenation): Optimize out left or right empty
string constants.
1999-01-28 Per Bothner <bothner@cygnus.com>
* jcf-write.c (localvar_alloc): Only emit entry for
LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
(generate_bytecode_insns): Only call put_linenumber if
debug_info_level > DINFO_LEVEL_NONE.
* jvspec.c (lang_specific_driver): If no -O* or -g* option
is specified, add -g1 (for compatibility wih javac).
1999-01-28 Hans-Peter Nilsson <hp@axis.se>
* java/Makefile.in: Add missing dependencies for jcf-dump.o,
gjavah.o, check-init.o, jv-scan.o
1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
* gjavah.c: Include config.h and system.h.
* javaop.h (inline): Don't define, its handled by system.h.
(WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
from `inline' to `static inline'.
* jcf.h (inline): Don't define, its handled by system.h.
* lex.c (inline): Likewise.
1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
* lang-specs.h: Map -Qn to -fno-ident.
1999-01-29 Richard Henderson <rth@cygnus.com>
* check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
1999-01-29 Tom Tromey <tromey@cygnus.com>
* parse.h (BUILD_APPEND): If ARG is a non-String object reference,
then cast it to Object before calling `append' method.
1999-01-28 Per Bothner <bothner@cygnus.com>
* check-init.c (check_bool2_init, check_bool_init, check_init):
Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
* jcf-write.c (generate_bytecode_insns): Likewise.
1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (jcf_parse): Don't parse the same class file twice.
* parse.y (patch_cast): Allow a boolean to be cast into a
boolean.
1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y: (class_declaration:): Fixed indentation.
(class_member_declaration:): Extra `;' after field declaration now
accepted.
(interface_declaration:): Removed debug messages in error reports.
(patch_binop): Nodes created and returned inherit the orignal
node's COMPOUND_ASSIGN_P flag value.
(patch_cast): Fix cast from char to floating point.
1999-01-25 Andrew Haley <aph@cygnus.com>
* except.c, java-except.h (expand_resume_after_catch): new
function.
* expr.c (java_lang_expand_expr): call expand_resume_after_catch
to branch back to main flow of control after a catch block.
1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (parse.o): Depend on $(CONFIG_H) and
$(srcdir)/../system.h.
(class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
(jcf-parse.o): Depend on $(srcdir)/../toplev.h.
(jcf-write.o): Likewise.
(jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
(mangle.o): Depend on $(srcdir)/../toplev.h.
(parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
(zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
* class.c: Include output.h and parse.h.
(mangled_classname): Add the `const' keyword to a char*.
(find_named_method): Hide unused function definition.
(build_utf8_ref): Change type of variable `c' to unsigned char.
Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
(build_class_ref): Add the `const' keyword to a char*.
(layout_class_method): Remove unused variable `buf'.
* decl.c (find_local_variable): Remove unused variable `rtl'.
(pushdecl): Likewise for variables `different_binding_level' and
`oldglobal'.
(pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
(maybe_build_cleanup): Likewise for parameter `decl'.
* except.c (expand_start_java_handler): Mark parameter `range'
with ATTRIBUTE_UNUSED.
* expr.c: Include except.h.
(pop_type): Remove unused variable `i'.
(pop_value): Likewise for variables `n_words' and `i'.
(expand_java_arrayload): Likewise for variable `convert'.
(java_lang_expand_expr): Likewise for variables `op0', `type',
`mode', `unsignedp', `node' and `elements'.
(expand_byte_code): Likewise for variables `prev_eh_ranges' and
`eh_ranges'.
(process_jvm_instruction): Add a `const' qualifier to a char*.
* gjavah.c (output_directory): Add the `const' keyword to a char*.
(temp_directory): Likewise.
(print_c_decl): Likewise.
(print_method_info): Likewise.
(decode_signature_piece): Likewise.
(print_mangled_classname): Likewise.
* java-except.h: Provide prototypes for maybe_start_try,
maybe_end_try and add_handler.
* java-tree.h (mangled_classname): Add the `const' keyword to a char*.
(parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
(pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
init_expr_processing, push_super_field, init_class_processing,
can_widen_reference_to, class_depth, verify_jvm_instructions,
maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
set_local_type, merge_type_state, push_type, load_type_state,
add_interface, find_in_current_zip, append_gpp_mangled_classtype,
emit_unicode_mangled_name): Add prototypes.
* jcf-dump.c (print_constant): Add the `const' keyword to a char*.
(print_signature_type): Use ISDIGIT, not isdigit.
(print_signature): Remove unused variable `j'.
* jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
int when comparing against one.
* jcf-parse.c: Include toplev.h.
* jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
(localvar_free): Remove unused variable `i'.
(generate_bytecode_conditional): Likewise for variable `kind'.
* jv-scan.c: Include config.h and system.h. Remove redundant
OS header and gansidecl.h includes.
(warning): Add the `const' keyword to a char*. Also add
ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
__STDC__, when determining whether to use ANSI-isms.
(fatal): Likewise. Also add ATTRIBUTE_UNUSED.
(xmalloc): Don't redundantly prototype here.
(main): Remove unused parameter `envp'. Also fix the arguments
passed to function `fatal' to match the format specifier.
* lang.c (java_tree_code_name): Add the `const' keyword to a char*.
* mangle.c: Include toplev.h.
(emit_unicode_mangled_name): Declare parameter `len'.
* parse.y (parse_warning_context): Add the `const' keyword to a
char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
`ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
(issue_warning_error_from_context): Add the `const' keyword to
a char*.
(parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
not `__STDC__' for whether to use ANSI-isms.
* typeck.c (incomplete_type_error): Mark parameters `value' and
`type' with ATTRIBUTE_UNUSED.
(parse_signature_type): Use ISDIGIT, not isdigit.
* verify.c (check_pending_block): Add the `const' keyword to a char*.
(verify_jvm_instructions): Likewise. Remove unused variables
`field_name' and `default_val'.
* zextract.c: Include config.h and system.h. Remove redundant
OS header includes.
* zipfile.h: Prototype `read_zip_archive'.
1999-01-21 Andrew Haley <aph@cygnus.com>
* typeck.c (convert): Allow conversions to void type: some
optimizations in gcc do this.
1999-01-21 Andrew Haley <aph@cygnus.com>
* typeck.c (convert_ieee_real_to_integer): New function.
(convert): When not using fast-math and using hardware fp, convert
an IEEE NaN to zero.
1999-01-18 Andrew Haley <aph@cygnus.com>
* parse.y (patch_binop): Do a type conversion from signed to
unsigned and then back to signed when a ">>>" is found.
1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h: (check_for_initialization): Added prototype.
* lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
* parse.y (do_resolve_class): Removed unused locals.
(read_import_dir): Likewise.
(resolve_qualified_expression_name): Array creation
expressions are valid primary expressions.
(qualify_ambiguous_name): Likewise.
(patch_synchronized_statement): Removed unused local.
1999-01-17 Jeffrey A Law (law@cygnus.com)
* Makefile.in (zextract.o): Add dependencies.
* Makefile.in: Do not put ^Ls at the start of a line.
1999-01-15 Per Bothner <bothner@cygnus.com>
* expr.c (process_jvm_instruction): Coerce to correct Throwable
sub-type the result of the call that gets the exception value.
* parse.y (java_complete_expand_methods): If flags_syntax_only,
don't call finish_class.
* parse.y (java_check_regular_methods): If METHOD_PRIVATE,
clear found before continuing.
* verify.c (verify_jvm_instructions): On an array load, allow
and handle top of stack to be TYPE_NULL.
* gjavah.c (generate_access): Translate Java package private or
protected access to C++ public, but with a comment.
1999-01-13 Andrew Haley <aph@cygnus.com>
* expr.c (generate_name): Name prefix changed to avoid clashes
with assembler temp labels.
* parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
MODIFY_EXPR. Without this, code for the assignment may not be
generated at all and the synchronized statement will read an
uninitialized variable.
1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (maybe_layout_super_class): Fixed returned value.
* lex.c: Added 1999 to the copyright.
(java_init_lex): Initialize java_lang_imported.
* lex.h: Added 1999 to the copyright.
* parse.h: Added 1999 to the copyright.
(REGISTER_IMPORT): Fixed typo in trailing macro.
(CURRENT_OSB): New macro.
(struct parser_ctxt): New fields osb_depth, osb_limit.
* parse.y (java_lang_id): New global variable.
(type_import_on_demand_declaration): Don't import java.lang.* twice.
(array_creation_expression:): Use CURRENT_OSB.
(dims:): Uses a stack to keep track of array dimensions.
(cast_expression:): Use CURRENT_OSB.
(find_expr_with_wfl): Return NULL if node found doesn't meet the
conditions.
(register_fields): Fixed typos in comment.
(check_method_redefinition): Fixed comment indentation.
(java_check_regular_methods): Set saved found wfl to NULL after
having reinstalled it in the previously found DECL_NAME.
1999-01-10 Richard Henderson <rth@cygnus.com>
* gjavah.c (java_float_finite): Use a union to do type punning.
(java_double_finite): Likewise.
1999-01-09 Per Bothner <bothner@cygnus.com>
* parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
on CONSTRUCTOR (since that trashes TREE_CST_RTL).
(patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
(register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
CONSTRUCTOR (which causes expand_expr to call output_constant_def).
* expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
1999-01-08 Per Bothner <bothner@cygnus.com>
* check-init.c (check_init): If compiling to native, we don't
see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
1999-01-08 Tom Tromey <tromey@cygnus.com>
* parse-scan.y (variable_declarator_id): Set or increment
bracket_count.
(bracket_count): New global.
(formal_parameter): Handle case where bracket pairs trail variable
declarator id.
1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
* jcf-parse.c (yyparse): variable len changed from a char to an
int to prevent overflow.
1999-01-06 Per Bothner <bothner@cygnus.com>
* java-tree.h: Declare read_class.
* jcf-parse.c (read_class): New function.
(load_class): Now just call read_class.
* java-tree.h (java_parse_abort_on_error): Only return if new errors.
* jcf-parse.c (parse_source_file): Declare save_error_count,
which is needed by java_parse_abort_on_error macro,
* parse.y (java_layout_classes, java_expand_classes): Likewise.
* parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
constructor, if initializing a static field.
(patch_new_array_init): Set TREE_CONSTANT if it is.
* expr.c (java_lang_expand_expr): For a static array constructor
of primitive elements, allocate the array itself statically.
Disabled until we can set the vtable field statically.
* check-init.c: New file. Checks for definite assignment.
* Makefile.in (JAVA_OBJS): Add check-init.o.
* parse.y (java_complete_expand_method): Call check_for_initialization.
* parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
1999-01-06 Graham <grahams@rcp.co.uk>
* parse.y : include system.h instead of including
standard headers directly with the exception of <dirent.h>.
1999-01-06 Per Bothner <bothner@cygnus.com>
* lex.h: Moved static function declarations to lex.c,
to shut up some -Wall warnings.
* lex.c: Static function declarations moved here.
* jcf-dump.c: Small fixes to shut up -Wall warnings.
1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in ($(GCJ).o): Depend on prefix.h.
1998-12-22 Per Bothner <bothner@cygnus.com>
* expr.c (process_jvm_instruction): Do load_type_state after JSR.
* verify.c (verify_jvm_instructions): Fix off-by-one error.
* jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
(localvar_alloc): Change return type to void,
(emit_unop): Remove unused variable size.
* jcf-write.c (struct jcf_block): Add new union.
(PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
(call_cleanups): New functions.
(struct jcf_partial): New fields num_finalizers and return_value_decl.
(generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
* lang.c (lang_init): Call using_eh_for_cleanups.
* parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
completing operands to patch_synchronized_statement.
Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
(patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
WITH_CLEANUP_EXPR instead of TRY_EXPR.
1998-12-20 John F. Carr <jfc@mit.edu>
* Make-lang.in: Comment out control-Ls; they upset some makes.
1998-12-18 Tom Tromey <tromey@cygnus.com>
* parse.y (check_class_interface_creation): Use DIR_SEPARATOR
consistently.
1998-12-17 Tom Tromey <tromey@cygnus.com>
* parse.y (DIR_SEPARATOR): New define.
(check_class_interface_creation): Use it.
* parse-scan.y (report_main_declaration): Recognize
`java.lang.String' in argument to main.
1998-12-16 Per Bothner <bothner@cygnus.com>
* parse.y (create_interface): Remove bogus test.
1998-12-16 Per Bothner <bothner@cygnus.com>
* jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
(HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
1998-12-16 Tom Tromey <tromey@cygnus.com>
* parse-scan.y (qualified_name): Use correct sprintf format.
1998-12-15 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_field_info): Changed how most negative number is
printed.
1998-12-14 Per Bothner <bothner@cygnus.com>
* parse.y (fold_constant_for_init): New function.
(resolve_expression_name): Don't replace static final
constant-initialized fields by its value.
(java_complete_lhs): New. Same as java_complete_tree, except does
not replace static final constant-initialized fields by their values.
(register_fields): If there is an initializer, set DECL_INITIAL and
MODIFY_EXPR_FROM_INITIALIZATION_P.
(java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
Only call patch_initialized_static_field if
MODIFY_EXPR_FROM_INITIALIZATION_P.
(patch_initialized_static_field): If not valid constant, clear
DECL_INITIAL.
* parse.y (lookup_field_wrapper): Fix thinko.
* parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
set and restore global lineno.
1998-12-14 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_field_info): If value to print is the smallest
value of its size, then print as hex to avoid later warnings from
C++ compiler.
1998-12-14 Tom Tromey <tromey@cygnus.com>
* gjavah.c (decompile_method): Decompile `return null'.
(process_file): Generate `#pragma interface'.
(method_declared): New global.
(print_method_info): Set it.
(HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
(print_method_info): Handle abstract methods.
1998-12-13 Per Bothner <bothner@cygnus.com>
* parse.y (patch_method_invocation): If class_decl is null
(e.g. an array type), use original type.
* parse.y (check_thrown_exceptions): Temporary hack to suppress
errors about uncaught exception from clone (of array, specifically).
1998-12-13 Tom Tromey <tromey@cygnus.com>
* gjavah.c (decompile_method): Handle all types of `return'
opcode. Decompile `return this' and `return'.
(method_access): New global.
(print_method_info): Set it.
(decompile_method): Don't decompile a synchronized method.
1998-12-13 Tom Tromey <tromey@cygnus.com>
* jcf-reader.c (jcf_parse_one_method): Recognize
HANDLE_END_METHOD.
* gjavah.c (HANDLE_END_METHOD): New macro.
(HANDLE_CODE_ATTRIBUTE): New macro.
(decompile_method): New function.
(print_method_info): Don't print `;\n' at end of function decl.
Include java-opcodes.h.
(decompiled): New global.
1998-12-12 Per Bothner <bothner@cygnus.com>
* class.c (build_class_ref): Handle PRIMTYPE.class if
flag_emit_class_files.
* expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
if flag_emit_class_files.
* parse.y (java_complete_tree): Pre-liminary support for
COMPONENT_REF - only to handle PRIMCLASS.TYPE.
* parse.y (patch_synchronized_statement): Don't call monitorexit
unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
* java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
* zipfile.h (opendir_in_zip): New declaration.
* jcf-io.c (saw_java_source): Moved to jcf-parse.c.
(opendir_in_zip): New function, using code from open_in_zip.
(open_in_zip): Call opendir_in_zip.
(find_class): Remove no-longer-used do_class_file parameter,
but add source_ok parameter. Change logic so if we find a .java file,
we don't look for .class in later classpath emtries.
* jcf-parse.c (load_class): Pass saw_java_source to find_class.
(jcf_figure_file_type): Only call open_in_zip if correct magic number.
* gjavah.c: Update call to find_class.
* jcf-dump.c: Likewise.
* jcf-write.c (put_linenumber): Handle duplicate line numbers.
(generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
nothing if body is empty_stmt_node.
Various little fixes so SP gets correctly adjusted.
For NEW_ARRAY_INIT, handle IGNORE_TARGET.
For CALL_EXPR, test if static first.
(generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
such as the ones we create for Object and Class.
Set and restore current_function_decl.
* parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
(note_possible_classname): New function.
(read_import_entry): Removed. Merged with read_import_dir.
(read_import_dir): Don't call find_class - that only gives us
the first classpath entry having the needed package.
Use the struct buffer data structure from buffer.h.
(read_import_dir, find_in_imports_on_demand): The remembered
class names now use '.' (not '/') as package separator.
* parse.y (java_complete_expand_methods): Call write_classfile
here, and not in java_expand_classes (which only gets first class).
1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (<type_declaration>): Do maybe_generate_clinit last.
(register_fields): If a static fields has an initializer, just
chain it on ctxp->static_initialized, and handle later.
(java_complete_expand_methods): Force <clinit> first.
(resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
- it's already been completed.
(patch_initialized_static_field): New function.
(java_complete_field): Call it.
1998-12-12 Per Bothner <bothner@cygnus.com>
* expr.c (encode_newarray_type, build_new_array): New functions.
* java-tree.h: Declare build_new_array.
* jcf-write.c (patch_newarray): Use build_new_array.
* expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
* jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
* parse.y (patch_new_array_init): Re-organize.
Now is passed the actual array (pointer) type of the value.
Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
(patch_array_constructor): Removed - merged into patch_new_array_init.
(java_complete_tree): Update patch_new_array_init.
* jcf-write.c (find_constant_index): New function.
(generate_bytecode_insns): Use find_constant_index.
(generate_classfile): Use find_constant_index for ConstantValue.
1998-12-11 Tom Tromey <tromey@cygnus.com>
* expr.c (invoke_build_dtable): Renamed dtable -> vtable.
* decl.c (init_decl_processing): Renamed dtable -> vtable.
* class.c (make_class_data): Renamed dtable -> vtable, and
dtable_method_count -> vtable_method_count.
1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (long_zero_node, float_zero_node, double_zero_node): New
global variables, initialized.
* java-tree.h (long_zero_node, float_zero_node, double_zero_node):
Declared new global variables.
* lex.c (java_lex): Return long_zero_node, float_zero_node,
double_zero_node, integer_zero_node upon direct matching.
* parse.y (purify_type_name): Added function prototype.
(duplicate_declaration_error_p): Consider new_type as potentially
being a incomplete type. Use purify_type_name on type string.
(method_header): saved_type: unused variable removed. Don't figure
return type if method name is invalid.
(java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
processed by patch_unaryop.
(patch_unaryop): Fixed typo in comment. Re-convert pre/post
increment/decrement node into its original type after binary
numeric promotion on its operands.
1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (array_initializer:): Array init operand is NULL_TREE
instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
now an error. Fixed indentation problems.
(patch_string): Handle error_mark_node as an argument.
(patch_new_array_init): Fixed indentation problems.
(array_constructor_check_entry): Removed check on null wfl_value.
Return an error if wfl_value's walk returns an error.
1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.def (NEW_ARRAY_INIT): New Java tree code.
* lex.c (java_lex): Remember column position before advancing one
token. Retain location information on OCB_TK.
* lex.h (typedef struct java_lc): Added new field.
* parse.h (GET_SKIP_TYPE): New macro.
(QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
* parse.y (build_new_array_init, patch_new_array_init,
patch_array_constructor, maybe_build_array_element_wfl,
array_constructor_check_entry): New function prototypes.
(switch_block:): Tagged <node>.
(OCB_TK): Tagged <operator>.
(array_initializer:): Installed actions.
(variable_initializer): Build location information on element if
necessary.
(switch_statement:): Fixed indentation typo.
(switch_block:): Redefined default action.
(java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
(patch_assignment): Removed duplicate code.
(maybe_build_array_element_wfl, build_new_array_init,
patch_new_array_init, patch_array_constructor,
array_constructor_check_entry): New functions.
1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (array_initializer): Tagged <node>.
(variable_initializer:): Use default rule.
(array_initializer:): Defined actions.
(variable_initializers:): Likewise.
(resolve_qualified_expression_name): Use DECL_CONTEXT to build
non-static field accesses.
(patch_invoke): Fixed indentation typo.
(java_complete_tree): Likewise.
(build_labeled_block): Changed leading comment. Generate an error
in case of duplicate loop labels.
(patch_conditional_expr): Patch results of string concatenation
operations.
1998-12-06 Per Bothner <bothner@cygnus.com>
* constants.c (find_methodref_index): When the class is an interface,
generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
* decl.c (finit_identifier_node): Use "$finit$", rather than
"<finit>" (which Sun's verifier rejects).
* parse.y (maybe_generate_finit): Leave out meaningless final flag.
(generate_field_initialization_code): Removed.
(fix_constructors) Don't add call to $finit$ here (wrong order).
(patch_method_invocation): Add $finit$ call here.
* java-tree.h (CALL_USING_SUPER): New macro.
* parse.y (patch_invoke): Remove im local variable.
(patch_method_invocation, patch_invoke): Don't pass super parameter.
(patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
(resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
* jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
* parse.y (java_complete_tree): Don't complain about unreachable
statement if it is empty_stmt_node.
* jcf-write.c (find_constant_wide): New function.
(push_long_const): Use find_constant_wide.
* jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
(generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
Emit invokeinterface when calling an interface method.
Emit invokespecial also when calling super or private methods.
* jcf-write.c (generate_classfile): Emit ConstantValue attributes.
1998-12-06 Per Bothner <bothner@cygnus.com>
* jcf-dump.c (INVOKE): If invokeinterface, print number of args.
1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (java_layout_seen_class_methods): New function
prototype.
(LAYOUT_SEEN_CLASS_METHODS): Macro removed.
* jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
* parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
* parse.y (method_declarator:): Defined action.
(issue_warning_error_from_context): input_filename saved, set to
the appropriate value and restored after java_error is called.
(build_unresolved_array_type): Fixed comment.
(register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
(method_header): Deal with return type the same way type are
handled for fields and method's parameters and local variables
types are handled.
(check_method_redefinition): Removed extra CR.
(declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
(java_layout_seen_class_methods): New function.
(java_layout_classes): Call java_layout_seen_class_methods.
1998-12-03 Per Bothner <bothner@cygnus.com>
* parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
1998-12-03 Per Bothner <bothner@cygnus.com>
* jcf-dump.c (main): Fix error message.
* jcf-path.c (add_entry): Style fix.
1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class_method): Call build_java_argument_signature
on constructors too.
* parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
(patch_method_invocation): Define a primary when resolving an
expression name. Augmented comment on code checking illegal `this'
usage. Loosened it test by accepting NEW_CLASS_EXPR.
1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class_method): Don't report error on non-static
overriding static if the method is private.
* java-tree.h (finish_class): Prototype added.
* lex.c (java_get_line_col): Handle col argument -2 value.
* parse.h: All static method declarations moved to parse.y.
* parse.y: Now contains all static method declarations previously
found in parse.h.
(find_expr_with_wfl, missing_return_error,
unreachable_stmt_error): New functions.
(java_get_real_method_name): Identify constructors bearing class
names in source code compiled classes only.
(java_complete_expand_methods): Call missing_return_error.
(invocation_mode): Private methods invoked as static methods.
(java_complete_tree): Call unreachable_stmt_error.
1998-12-01 Tom Tromey <tromey@cygnus.com>
* Makefile.in (+target): Removed.
(+xmake_file): Likewise.
(+tmake_file): Likewise.
(.NOEXPORT): Removed duplicate.
1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
* jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
* jvgenmain.c: Remove the xmalloc prototype, we get it from
libiberty.h. Provide an xmalloc definition.
* jvspec.c: Remove the xmalloc prototype.
* parse-scan.y: Include config.h and system.h. Don't include
OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
Provide an xstrdup definition.
1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
* jcf-path.c (add_entry): Recognize ".jar" too.
* lang-specs.h: Likewise.
1998-11-26 Per Bothner <bothner@cygnus.com>
* jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
soft_monitorenter_node, soft_monitorexit_node, throw_node.
* jcf-write.c (generate_bytecode_insns):
Handle pre/post-increment/decrement of long.
* jcf-write.c (generate_bytecode_insns):
Handle missing exception handler (finally for synchronized).
1998-11-25 Per Bothner <bothner@cygnus.com>
* java-tree.h (end_params_node): Declare global.
* decl.c (end_params_node): New global.
(init_decl_processing, start_java_method): Use end_params_node for
end of list of parameter types. Follows correct gcc conventions.
* expr.c (pop_argument_types, pop_arguments): Likewise.
* lang.c (put_decl_node): Likewise.
* typeck.c (various places): Likewise.
* class.y (various places): Likewise.
* parse.y (various places): Likewise.
* parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
(build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
* class.c: Add #include flags.h, remove no-longer needed declaration.
* class.c (layout_class_method): Remove commented-out code, re-format.
Don't add vtable entry (or index) for private methods.
* expr.c (expand_invoke): A private method is implicitly final.
* class.c (make_class_data): If inlining or optimizing,
skip private methods.
* class.c (finish_class): New function. Calls existing methods,
but alls emits deferred inline functions.
* jcf-parse.c (parse_class_file): Call finish_class.
* parse.y (java_complete_expand_methods): Likewise.
* expr.c (build_java_binop): Explicit default, to silence -Wall.
* expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
* jcf-write.c (generate_bytecode_conditional): Fix typo.
1998-11-24 Per Bothner <bothner@cygnus.com>
* (generate_classfile): Always write class access flag with
ACC_SUPER set.
1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (maybe_layout_super_class): New function.
(layout_class): Reorganized. Loop on class methods dispatched into
a new function. Call maybe_layout_super_class.
(layout_class_methods, layout_class_method): New functions.
* expr.c (expand_java_NEW): Call layout_class_methods on loaded
class.
(expand_invoke): Likewise.
* java-tree.h (all_class_list): New global variable declared.
(layout_class_methods, layout_class_method): New function
prototypes.
(LAYOUT_SEEN_CLASS_METHODS): New macro.
* jcf-parse.c (all_class_list): New global variable.
(load_class): Extended what class_or_name can be. Use parser
context mechanism to save globals before calling jcf_parse.
(jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
is set on the file name.
(jcf_parse): Layout class methods when Object is loaded, otherwise
record class in all_class_list for delayed method layout.
(parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
* lang.c (put_decl_node): Decode <init> into the decl context
class name.
* lex.c (java_allocate_new_line): Use xmalloc.
* parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
pointers, not TREE_LIST elements.
(struct parser_ctxt): Fixed comment indentations, added comments
and reordered some fields.
(java_check_methods): Function prototype removed.
* parse.y (java_push_parser_context): Use xmalloc.
(java_parser_context_restore_global): Pop extra pushed ctxp only
when there's nothing next.
(maybe_create_class_interface_decl): Fixed comment, add new
created class decl to all_class_list.
(method_header): Use GET_REAL_TYPE on argument's types.
(method_declarator): Use GET_REAL_TYPE, change type to the real
type in TREE_LIST dependency node. Build argument list with the
real type.
(create_jdep_list): Use xmalloc. Removed allocation error message.
(obtain_incomplete_type): Fixed leading comment. Broadened
incoming argument meaning.
(register_incomplete_type): Use xmalloc. Removed allocation error
message.
(safe_layout_class): Fixed leading comment.
(jdep_resolve_class): Reversed if statement condition and switch
if and else bodies.
(resolve_and_layout): Fixed leading comment. Broadened incoming
argument meaning.
(complete_class_report_errors): New local variable name, for
clarity. purify_type_name used for all error cases.
(java_get_real_method_name): Stricter check on constructors.
(java_check_regular_methods): Reverse methods list only if not
already laid out. Layout artificial constructor.
(java_check_methods): Deleted.
(source_start_java_method): Obtain incomplete type for patchable
method arguments.
(java_layout_classes): Fixed leading comment. Use
LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
before returning. Fixed comments.
(java_expand_classes): Check for errors up front.
(patch_method_invocation): Class to search is resolved and laid
out.
1998-11-24 Per Bothner <bothner@cygnus.com>
* expr.c (java_lang_expand_expr): Add missing emit_queue.
* javaop.h (int8): Removed - not used.
(jbyte): Redefine portably with correct signedness.
* jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
* jcf-write.c (generate_bytecode_insns): Fix typo
OPCODE_getstatic to OPCODE_getfield.
* java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
* parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (jcf_parse_source): Function returned type is
void. Added prototype.
(jcf_parse): Function returned type is void.
(yyparse): Remove call to fclose on the last parsed file.
* java-tree.h (jcf_parse): Changed jcf_parse prototype.
1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
(layout_class): Cope with methods featuring WFL in decl names.
* decl.c (unqualified_object_id_node): New global variable,
initialized.
(build_decl_no_layout): Removed.
* expr.c (build_primtype_type_ref): Handle Double.
(java_lang_expand_expr): Fixed indentations.
* java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
(flag_wall, flag_redundant, flag_not_overriding,
flag_static_local_jdk1_1, unqualified_object_id_node): Global
variable declarations.
(build_decl_no_layout): Removed prototype.
(java_get_real_method_name): Added prototype.
(IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
(java_parse_abort_on_error): Macro now just returns.
* jcf-parse.c (jcf_parse_source): Check fclose returned
value. Call emit_register_classes if java_report_errors returns
zero.
* lanc.c (flag_wall, flag_redundant, flag_not_overriding,
flag_static_local_jdk1_1): New integer flags.
(lang_decode_option): New flags set here.
* parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
(OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
the flag_redundant variable.
(SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
when parsing java.lang.Object class.
(BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
NULL_TREE to build.
(resolve_qualified_expression_name): Fixed indentation.
(patch_array_ref): Changed prototype.
(not_initialized_as_it_should_p): Prototype removed.
(java_report_errors): Added function prototype.
* parse.y (formal_parameter:): Changed error message for not yet
supported final parameters.
(class_type_list:): Set both PURPOSE and VALUE of created
TREE_LIST to be class_type.
(primary_no_new_array:): Handle class literals on primitive types.
(parse_warning_context): Reinstalled correct force_error and
do_warning flags setups.
(java_report_errors): Changed prototype. Return java_error_count
value.
(variable_redefinition_error): Consider treating variable type as
a fake pointer.
(create_interface): Warn about redundant abstract modifier if
flag_redundant is set. Changed error message.
(lookup_field_wrapper): Save/restore globals before/after looking
up field.
(duplicate_declaration_error_p): Consider treating declaration
type as a fake pointer.
(register_fields): Extract real type from dependency node. Check
for duplicate field declaration after type adjustment. Use
DECL_INITIAL to store static final initialized values.
(method_header): Extract real function type from dependency node.
(check_abstract_method_header): Use GET_METHOD_NAME.
(obtain_incomplete_type): Layout fake pointer type.
(safe_layout_class): Don't try to check for methods before layout.
(java_complete_class): Don't check for correct throws clause
elements inheritance here.
(resolve_and_layout): Broadened name parameter meaning.
(reset_method_name): Use GET_METHOD_NAME.
(java_get_real_method_name): New function.
(java_check_regular_methods): Don't check methods in
java.lang.Object. Verify lineage of throws clause elements. Use
flag_no_overriding in warning report.
(check_throws_clauses): Don't check if class was from
bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
(java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
(declare_local_variables): Use flag_static_local_jdk1_1 to report
warning on unsupported final local variables. Use build_decl
instead of build_decl_no_layout. Get real local variable type from
dependency node.
(source_start_java_method): Get real parameter type from
dependency node. Call build_decl instead of build_decl_no_layout.
(java_layout_classes): Reverse tree and layout type and class as
required. Mark class as loaded when done.
(resolve_field_access): Fixed indentation. Restricted condition
leading to static field access code generation. Set field_type
decl's TREE_TYPE if QUAL_DECL_TYPE not available.
(resolve_qualified_expression_name): Initialize type_found to
null. Handle static field resolved during qualification. Fixed
layout on non primitive field decl types.
(not_accessible_p): Fixed typo in comment.
(patch_method_invocation): Resolve and layout class to search from
type.
(lookup_method_invoke): Keep integer constant 0 as is. Resolve and
layout non primitive type, if necessary. Make method node only to
report errors.
(find_applicable_accessible_methods_list): Consider WFL'ed method
decl names. Fixed indentation.
(argument_types_convertible): Resolve and layout target type if
necessary.
(java_complete_tree): Fixed indentation problems. Rewrote
CALL_EXPR thrown exceptions check. Re-installed further processing
of the assignment in certain cases.
(patch_assignment): Call maybe_build_primttype_type_ref to perform
inlining on class literals.
(valid_builtin_assignconv_identity_widening_p): Cope with constant
0 literal.
(valid_method_invocation_conversion_p): Likewise.
(patch_string): Temporary disable forbidden use of `this' in
explicit constructor invocations when doing string concatenation
within their scope.
(patch_unaryop): Added comment. Reinstalled code to disable
further check on assignment operation with cast expression RHS.
(patch_switch_statement): Fixed indentation.
(build_try_statement): Call build_decl instead of
build_decl_no_layout.
(patch_synchronized_statement): Likewise.
(patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
IS_UNCHECKED_EXPRESSION_P.
(check_thrown_exceptions_do): Changed leading comment. Resolve and
layout argument exception type.
(purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
of IS_UNCHECKED_EXPRESSION_P.
1998-11-18 Anthony Green <green@cygnus.com>
* jcf-parse.c (yyparse): Open class file in binary mode.
1998-11-15 Per Bothner <bothner@cygnus.com>
* jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
* jcf-write.c (perform_relocations): Move check out one loop.
1998-11-15 Anthony Green <green@hoser.cygnus.com>
* Make-lang.in: Fix reference to srcdir.
* jv-scan.c: Add missing xmalloc prototype.
* jvgenmain.c: Ditto.
1998-11-15 Per Bothner <bothner@cygnus.com>
* decl.c (error_mark_node), java-tree.h: New global.
* parse.y: Use empty_stmt_node instead of size_zero_node.
(build_if_else_statement): If missing else, use empty_stmt_node.
* parse.y (not_initialized_as_it_should_p): Removed, with its callers.
(java_complete_expand_method): Complain if return is missing.
(java_check_regular_methods): Comment out incorrect error check.
(not_accessible_p): Fix incorrect handling of protected methods.
(patch_method_invocation): Pass correct context to not_accessible_p.
(find_applicable_accessible_methods_list): Likewise.
(qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
(java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
(patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
* jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
(push_int_const): Remove reundant NOTE_PUSH.
(generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
(- case SWITCH_EXPR): Fix code generation bug.
(- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
(generate_classfile): More robust for abstract methods.
1998-11-15 Anthony Green <green@cygnus.com>
* Makefile.in: jv-scan and jvgenmain all require libiberty.
* Make-lang.in: Ditto.
* jv-scan.c: Remove xmalloc and xstrdup definitions.
* jvgenmain: Ditto.
1998-11-15 Per Bothner <bothner@cygnus.com>
* jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
* jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
1998-11-14 Per Bothner <bothner@cygnus.com>
Allow uses of interface types to verify. This is not really
type-safe, but it matches what Sun does, and is OK as long as
there are appropriate run-time checks.
* verify.c (merge_types): If merging two interface types,
just set the result to java.lang.Object.
* expr.c (pop_type): Any interface is matches by java.lang.Object.
1998-11-13 Tom Tromey <tromey@cygnus.com>
* gjavah.c (main): Handle --output-class-directory argument.
* jvspec.c (lang_specific_driver): Translate `-d' into
-foutput-class-dir.
* jcf.h (jcf_write_base_directory): Declare.
* lang.c (lang_decode_option): Recognize -foutput-class-dir.
* lang-options.h: Mention -foutput-class-dir.
* jcf-write.c (jcf_write_base_directory): New global.
(make_class_file_name): Put generated .class file into `-d'
directory, or into source directory if -d not given. Function now
static.
(write_classfile): Free class file name. Handle case where class
file name is NULL.
(DIR_SEPARATOR): New macro.
Include <sys/stat.h>
* Makefile.in (prefix): New macro.
1998-11-12 Per Bothner <bothner@cygnus.com>
* parse.y (patch_invoke): Do less if flag_emit_class_files.
* expr.c (build_known_method_ref): Don't check flag_emit_class_files
here (done in patch_invoke instead).
(case_identity): Moved here from parse.y.
* java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
* parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
* parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
so they can be efficiently scanned without recursion.
Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
* expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
in BLOCK iteratively, rather than recursively.
* parse.y (do_unary_numeric_promotion): New function.
(patch_unaryop, patch_binop, patch_array_ref): Use it.
* parse.y (patch_newarray): Various fixes.
Re-do handling of switch statements (for proper block scoping).
* parse.y: Add just a single block for the enture switch block,
but don't create any "case blocks".
(group_of_labels): Rmeoved unneeded non-terminal.
CASE_EXPR and DEFAULT_EXPR are added to current block.
* expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
Now also need to handle CASE_EXPR and DEFAULT_EXPR.
* java-tree.h (SWITCH_HAS_DEFAULT): New macro.
* parse.y (wfl_operator, print_int_node): Make non-static.
(java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
as part of recursive scan of block.
(java_expand_switch ): Removed - inlined into java_lang_expand_expr.
(patch_switch_statement): Most tests move dinto java_complete_tree.
* parse.y: Make various production be non-typed (void).
* parse.y (parse_error): Merged into issue_warning_error_from_context.
* parse.y (add_stmt_to_compound): Don't create/change extra node.
(patch_method_invocation_stmt): Renamed to patch_method_invocation.
* jcf-write.c (struct jcf_handler): New type.
(struct jcf_switch_state): New type.
(SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
(alloc_handler, emit_unop, emit_reloc): New functions.
(adjust_typed_op): Add extra parameter ("max type" offset).
(emit_switch_reloc, emit_case-reloc): New function.
(generate_bytecode_conditional): Handle REAL_TYPE comparisons.
(generate_bytecode_insns): Support REAL_CST, switch statements,
exception handling, method calls, object/array creation, and more.
* class.c: Remove some unused variables.
* constants.c (find_string_constant): New function.
(count_constant_pool_bytes): Fix to correctly handle wide constants.
* decl.c (complete_start_java_method): Don't _Jv_InitClass
if flag_emit_class_files.
1998-11-12 Tom Tromey <tromey@cygnus.com>
* jcf-io.c (find_class): Added explanatory comment.
* jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
trailing slash to `.zip' entries.
* jvspec.c (lang_specific_driver): Correctly handle case where
GC_NAME not defined.
1998-11-11 Tom Tromey <tromey@cygnus.com>
* jvspec.c (GC_NAME): New define.
(lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
if required.
* Make-lang.in (jvspec.o): Define WITH_GC_<name>.
1998-11-11 Per Bothner <bothner@cygnus.com>
* jcf-dump.c (TABLE_SWITCH): Fix typos.
1998-11-11 Tom Tromey <tromey@cygnus.com>
* jcf-dump.c (main): Correctly recognize `--'-style long options.
1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (is_compiled_class): Call safe_layout_class for class
compiled from source.
* conver.h (convert_to_integer, convert_to_real,
convert_to_pointer): Added prototypes.
* decl.c (init_decl_processing): Non longer push the decls of
`methodtable', `constants', `Class', `Field', `dispatchTable'
`jexception' and `Method'.
* expr.c (build_invokeinterface): New function.
(expand_invoke): static variable CLASS_IDENT now in
build_invokeinterface. Use build_invokeinterface.
(expand_java_field_op): Moved code to inline
java.lang.PRIMTYPE.TYPE into a function.
(build_primtype_type_ref): New function.
* java-tree.def (INSTANCEOF_EXPR): New tree code.
* java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
(DECL_CONSTRUCTOR_P): Fixed typo in comment.
(DECL_LOCAL_STATIC_VALUE): New macro.
(build_invokeinterface, build_primtype_type_ref): New function
prototypes.
(java_parse_abort_on_error): Macro rewritten.
* jcf-parse.c (current_method): Add comment to declaration.
(parse_zip_file_entries, process_zip_dir, void parse_source_file):
Function prototypes fixed.
(jcf_parse_source): push/pop parser context. save/restore global.
(parse_source_file): Fixed leading comment. Now take a
IDENTIFIER_NODE as an argument. Doesn't check methods, layout
classes and pop the parser context anymore.
(yyparse): Push parser context, save globals, parse the source
file, restore globals and pop the parser context when processing a
source file.
* jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
* lex.c (java_parse_doc_section): New function.
(java_lex): Call java_parse_doc_section when appropriate. Build an
operator around INSTANCEOF_TK.
* lex.h (java_lineterminator, java_sprint_unicode,
java_unicode_2_utf8, java_lex_error, java_store_unicode):
Prototypes rewritten.
(java_parse_escape_sequence, java_letter_or_digit_p,
java_parse_doc_section, java_parse_end_comment, java_get_unicode,
java_read_unicode, java_store_unicode, java_read_char,
java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
Added function prototypes.
* parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
define.
(JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
New macros
(struct parser_ctxt): New fields: deprecated,
current_parsed_class_un, gclass_list.
(fix_method_argument_names, issue_warning_error_from_context,
resolve_package, lookup_package_type): New function prototypes.
(resolve_expression_name): Fixed function prototype.
(find_applicable_accessible_methods_list): Fixed indentation, added
extra argument in prototype.
(check_final_assignment, build_null_of_type, check_deprecation,
check_method_redefinition, reset_method_name,
java_check_regular_methods, java_check_abstract_methods,
maybe_build_primttype_type_ref): New function prototype.
* parse.y (conver.h): Include.
(INSTANCEOF_TK): Tagged <operator>.
(single_type_import_declaration): Use REGISTER_IMPORT macro.
(relational_expression:): Build binop for instanceof.
(java_push_parser_context): Remember ctxp->gclass_list across
contexts.
(java_pop_parser_context): Simply return if no context
exists. Remember gclass_list across contexts.
(issue_warning_error_from_context): New function.
(parse_error_context): Don't setup ctxp->elc here. Call
issue_warning_error_from_context instead.
(parse_warning_context): Likewise.
(maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
setup. Link new class/interface to ctxp->gclass_list.
(add_superinterfaces): Register interface as incomplete if not
loaded.
(create_class): Remember class unqualified name in
ctxp->current_parsed_class_un. Check class deprecation.
(register_fields): Check field deprecation. Remember static final
field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
processing INIT.
(method_header): New local variable ORIG_ARG. Use unqualified
current class name for check on constructor errors. Promote return
type if of record type. Argument list fix moved in
fix_method_argument_names, called here. Check method deprecation.
(fix_method_argument_names): New function.
(method_declarator): Promote record typed arguments.
(safe_layout_class): Check class methods before layout.
(java_complete_class): Compute field layout when patched.
(do_resolve_class): Try to load class after having it renamed
after the package name.
(get_printable_method_name): Use DECL_CONTEXT.
(reset_method_name): New function.
(check_method_redefinition): Use reset_method_name.
(java_check_regular_methods): New local variable
SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
names for error report. Check for compile-time error when method
found has default (package) access.
(java_check_abstract_methods): Now takes an interface DECL node as
an argument. Also reinstall real name on unchecked
overriding/hiding methods for error report.
(java_check_methods): Fixed leading comment. Get classes to verify
from ctxp->gclass_list. Use CHECK_METHODS macro and set
CLASS_METHOD_CHECKED_P on class verification.
(lookup_java_method2): Get real method name if necessary.
(find_in_imports): Don't check package class access here.
(resolve_package, lookup_package_type): New functions.
(java_layout_classes): Fixed leading comment. Take classes to be
laid out from ctxp->gclass_list.
(java_complete_expand_methods): Don't expand native and abstract
methods.
(java_expand_classes): New function.
(resolve_expression_name): Use additional argument ORIG. Retrieve
values of static final field of primitive types.
(resolve_field_access): Handles static final field of promotive
type.
(resolve_qualified_expression_name): Handle STRING_CST as
primaries and package name resolution. Check deprecation on found
decls. Set where_found and type_found on non static field resolved
during qualification. Layout non primitive field decl types.
(check_deprecation): New function.
(maybe_access_field): Simplified.
(patch_method_invocation_stmt): Local variable CLASS_TYPE
removed. Reverse method's argument when primary is a type. Don't
use CLASS_TYPE to report problems, use IDENTIFIER_WFL
instead. Include abstract class in the list of class searchable
for constructors. Use DECL_CONTEXT of found method for access
checks. Check method deprecation.
(patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
converting arguments. Handle INVOKE_INTERFACE.
(lookup_method_invoke): Search constructor using existing
infrastructure (don't rely on lookup_java_constructor anymore).
(find_applicable_accessible_methods_list): Extra argument flag
LC. Now include constructor in the search.
(qualify_ambiguous_name): Conditional expression are primaries.
(not_initialized_as_it_should_p): static final are always
initialized.
(java_complete_tree): Pass extra NULL argument to
resolve_expression_name. Stricter test to carry on patching
assignments. New case for INSTANCEOF_EXPR.
(complete_function_arguments): Inline PRIMTYPE.TYPE read access.
(check_final_assignment, maybe_build_primttype_type_ref): New
functions.
(patch_assignment): Detect resolved static finals and carry normal
assignment error check on them. Inline PRIMTYPE.TYPE read access.
(try_builtin_assignconv): Access constant 0 on all primitive
types.
(valid_builtin_assignconv_identity_widening_p): Accept identical
types. Accept all promoted type on int type.
(valid_ref_assignconv_cast_p): Accept a null pointer to be
assigned to a reference.
(valid_method_invocation_conversion_p): Accept to check null
pointers.
(build_binop): Merge declaration and initialization of local
variable BINOP.
(patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
numeric types. Improved validity test for qualify operators on
references.
(patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
and PREINCREMENT_EXPR. Also detect resolved static finals of a
primitive type and issue the appropriate error message.
(resolve_type_during_patch): Mark class loaded when resolved.
(patch_cast): Allow null to be cased to reference types.
(build_null_of_type): New function.
(patch_array_ref): Handle array on references correctly.
(patch_return): Removed unused local variable MODIFY. Force
boolean to be returned as integers. Allows null to be returned by
a function returning a reference.
* typeck.c (convert_to_integer, convert_to_real,
convert_to_pointer): Prototypes moved to convert.h
(lookup_argument_method): Use method real name, if necessary.
1998-10-30 Tom Tromey <tromey@cygnus.com>
* class.c (build_class_ref): Changed name of primitive classes to
start with `_Jv_'.
* class.c (make_class_data): Renamed fields: nmethods to
method_count, method_count to dtable_method_count. Always set
`state' field to 0.
* decl.c (init_decl_processing): Likewise.
1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class): Don't mangle <finit>, produce
__finit<class> instead. Don't verify artificial methods.
* decl.c (finit_identifier_node): New declared global.
(init_decl_processing): finit_identifier_node initialized.
* java-tree.def (CONDITIONAL_EXPR): New Java tree code.
* java-tree.h (finit_identifier_node): Declared as extern.
(struct lang_decl): New field called_constructor.
(DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
(CLASS_HAS_FINIT_P): New macro.
(CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
explicit constructor invocation.
(CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
CALL_SUPER_CONSTRUCTOR_P): New macros.
(write_classfile): Added prototype.
* jcf-parse.c (jcf_parse_source): Parse and remember for
generation if the file was seen on the command line.
(parse_source_file): Don't write the class file here.
(yyparse): Loop on files rewritten. Set current_jcf.
(parse_zip_file_entries): Parse class file only if it was found.
* lang.c (init_parse): Don't open command line provided filename
here.
(lang_parse): Don't set main_jcf anymore.
* parse.h (ABSTRAC_CHECK): Capitalized arguments.
(JCONSTRUCTOR_CHECK): New macro.
(JBSC_TYPE_P): New macro.
(IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
(COMPLETE_CHECK_OP_2): New macro.
(struct parse_ctxt): New field explicit_constructor_p.
(check_class_interface_creation): Fixed prototype indentation.
(patch_method_invocation_stmt): Prototype reflects added argument.
(patch_invoke): Likewise.
(complete_method_declaration, build_super_invocation,
verify_constructor_circularity,
build_this_super_qualified_invocation, get_printable_method_name,
patch_conditional_expr, maybe_generate_finit, fix_constructors,
verify_constructor_super, create_artificial_method,
start_artificial_method_body, end_artificial_method_body,
generate_field_initialization_code): New function prototypes.
* parse.y: Fixed leading comment
(constructor_header:, constructor_body:, block_end:): Rules tagged
<node>.
(type_declaration:): Call maybe_generate_finit.
(method_declaration:): Action for method_body: placed in new
function complete_method_declaration, called here.
(constructor_declaration:): Defined actions. Removed leading
FIXME.
(constructor_header:): New rule with action.
(constructor_body:): Rule rewritten using block_begin: and
block_end:. Defined actions.
(constructor_declarator:, explicit_constructor_invocation:):
Defined actions.
(block:): Use new rules block_begin: block_end:.
(block_begin:, block_end:): New rules and actions.
(block_statements:): Fixed error message for explicit
constructors.
(method_invocation:): Call build_this_super_qualified_invocation
if primary is `this' or `super' was seen.
(conditional_expression:): Action defined.
(extra_ctxp_pushed_p): New static global flag.
(java_parser_context_save_global): Create parser context if
necessary. Use extra_ctxp_pushed_p to remember it.
(java_parser_context_restore_global): Pop extra parser context if
one exists.
(build_array_from_name): Array on primitive types are marked
loaded.
(register_fields): Restore new name in field initializer
expression if type was altered. Non static fields initialized upon
declaration marked initialized.
(maybe_generate_finit): New function.
(maybe_generate_clinit): Use create_artificial_method,
start_artificial_method_body, end_artificial_method_body. Generate
debug info for enclosed initialization statements.
(method_header): Fixed leading comment. Check constructor
flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
accordingly.
(complete_method_declaration, constructor_circularity_msg,
verify_constructor_circularity): New functions.
(get_printable_method_name): New function.
(check_method_redefinition): Don't rename <finit> methods. Fix
declared constructor names. Error message for
constructors modified.
(java_check_regular_methods): Local variable seen_constructor
renamed saw_constructor. Skip verification on constructors. Create
default constructor with create_artificial_method.
(java_check_methods): Removed unnecessary empty line.
(create_artificial_method, start_artificial_method_body,
end_artificial_method_body): New functions.
(java_layout_classes): Changed leading comment. Reverse fields
list if necessary. Always layout java.lang.Object if being
defined.
(java_complete_expand_methods): Verify constructor circularity.
(java_complete_expand_method): Call fix_constructor on
constructors. Local variable no_ac_found removed. Restore
bindings if method body expansion failed.
(fix_constructors, verify_constructor_super,
generate_field_initialization_code): New function.
(java_expand_classes): Fixed leading comment. Write class file
here.
(resolve_expression_name): Check for illegal instance variable
usage within the argument scope of an explicit constructor
invocation.
(resolve_qualified_expression_name): Pass extra from_super flag
when invoking patch_method_invocation_stmt. New case for
conditional expression when used as a primary. Check for error
when acquiring super.
(patch_method_invocation_stmt): Added extra argument super. New
local variable is_static_flag. Set class_to_search according to
the nature of the constructor invocation. Don't add `this'
argument when expanding NEW_CLASS_EXPR. Check for illegal method
invocation within the argument scope of explicit constructor
invocation. Set is_static according to is_static_flag. Provide
extra `super' argument to patch_invoke invocation.
(patch_invoke): New argument from_super. Loop on arguments
indentation fixed. Pass from_super to invocation_mode. New switch
case INVOKE_SUPER. Fixed error message in switch default case.
Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
value.
(invocation_mode): Return INVOKE_SUPER mode when appropriate.
(lookup_method_invoke): Fixed prototypes in candidates list. Error
message takes constructors into account.
(find_applicable_accessible_methods_list): Fixed indentation.
(qualify_ambiguous_name): Take explicit constructor invocation
into account. Deal with a conditional expression as a primary to
a method call.
(java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
case. Added extra argument to patch_method_invocation_stmt.
Register calls made to explicit constructor `this'. Don't call
save_expr in ARRAY_REF case when emitting class files. Check for
illegal use of this when expanding explicit constructor invocation
arguments.
(complete_function_arguments): Set and reset parser context
explicit_constructor_p field value when appropriate.
(build_super_invocation, build_this_super_qualified_invocation):
New functions.
(patch_assignment): Fixed typo.
(patch_unaryop): Check on final fields occurs only when a decl
exits.
(patch_return): Take constructors into account.
(patch_conditional_expr): New function.
* typeck.c (build_java_signature): Removed unnecessary empty line.
1998-10-28 Jeffrey A Law (law@cygnus.com)
* Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
1998-10-28 Tom Tromey <tromey@cygnus.com>
* decl.c (init_decl_processing): Renamed fields.
* class.c (make_class_data): Renamed bfsize, nfields, nsfields,
interface_len, msize fields.
* class.c (make_class_data): Removed subclass_head and
subclass_next fields.
* decl.c (init_decl_processing): Removed subclass_head and
subclass_next fields.
1998-10-28 Jeffrey A Law (law@cygnus.com)
* jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
* mangle.c (emit_unicode_mangled_name): Similarly.
1998-10-26 Nick Clifton <nickc@cygnus.com>
* jcf-parse.c (get_constant): Place braces around code to compute
'd' when REAL_ARITHMETIC is not defined.
1998-10-25 H.J. Lu (hjl@gnu.org)
* Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
dependency.
1998-10-23 Tom Tromey <tromey@cygnus.com>
* lang-specs.h: `.zip' files are input to jc1.
1998-10-22 Per Bothner <bothner@cygnus.com>
* jvspecs.c: Add (but don't enable) support for combining multiple
.class and .java input filenames to a single jc1 invocation.
Add support for -C flag (copile to .class files).
Translate -classpath and -CLASSPATH arguments.
* lang-specs.h: Don't set %2 spec.
1998-10-22 Tom Tromey <tromey@cygnus.com>
* jcf-path.c (add_entry): Don't add trailing separator if entry is
a .zip file.
(add_path): Don't add trailing separator to non-empty path
elements.
* lang.c (lang_decode_option): Check for -fclasspath and
-fCLASSPATH before examining other `-f' options.
* java-tree.h (finalize_identifier_node): Don't declare.
* class.c (make_class_data): Don't push "final" field.
* decl.c (init_decl_processing): Don't push "final" field.
(finalize_identifier_node): Removed.
(init_decl_processing): Don't set finalize_identifier_node.
* config-lang.in (stagestuff): Added jcf-dump and jv-scan.
1998-10-11 Anthony Green <green@cygnus.com>
* Make-lang.in (java): Depend on jcf-dump and jv-scan.
(JV_SCAN_SOURCES): New macro.
(JCF_DUMP_SOURCES): Likewise.
(jcf-dump$(exeext)): New target.
(jv-scan$(exeext)): New target.
1998-10-22 Tom Tromey <tromey@cygnus.com>
* Makefile.in (LEX): Removed.
(LEXFLAGS): Likewise.
(SET_BISON): New macro.
(BISON): Removed.
($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
spurious diffs in parse.c.
($(PARSE_SCAN_C)): Likewise.
(PARSE_DIR): New macro.
(PARSE_C): Use it.
(PARSE_SCAN_C): Likewise.
(PARSE_RELDIR): New macro.
* jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
* jcf-io.c (find_class): Use saw_java_source to determine when to
look for `.java' file.
* jcf-parse.c (saw_java_source): New global.
(yyparse): Set it if `.java' file seen.
* Make-lang.in (JAVA_SRCS): Added jcf-path.c.
(GCJH_SOURCES): Likewise.
* Makefile.in (datadir): New macro.
(libjava_zip): Likewise.
(JAVA_OBJS): Added jcf-path.o.
(../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
(../gcjh$(exeext)): Likewise.
(jcf-path.o): New target.
* java-tree.h (fix_classpath): Removed decl.
* jcf-parse.c (fix_classpath): Removed.
(load_class): Don't call fix_classpath.
* parse.y (read_import_dir): Don't call fix_classpath.
* lex.h: Don't mention classpath.
* lex.c (java_init_lex): Don't initialize classpath.
* jcf-io.c (classpath): Removed global.
(find_class): Use jcf_path iteration functions. Correctly search
class path for .java file.
(open_in_zip): New argument `is_system'.
* jcf-dump.c (main): Call jcf_path_init. Recognize all new
classpath-related options.
* lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
and -I.
(lang_init): Call jcf_path_init.
* lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
* lang-specs.h: Handle -I. Minor cleanup to -M options.
Correctly put braces around second string in each entry.
* gjavah.c (main): Call jcf_path_init. Recognize all the new
classpath-related options.
(help): Updated for new options.
* jcf.h: Declare functions from jcf-path.c. Don't mention
`classpath' global.
* jcf-path.c: New file.
* jcf-depend.c: Include jcf.h.
* jcf-write.c (localvar_alloc): Returns `void'.
(localvar_free): Removed unused variable.
* lang.c (OBJECT_SUFFIX): Define if not already defined.
(init_parse): Use OBJECT_SUFFIX, not ".o".
1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (emit_register_classes): Renamed from
emit_register_class.
* java-tree.h (emit_register_classes): Prototype renamed from
emit_register_class.
* jcf-parse.c (yyparse): Call emit_register_classes once before
returning.
* parse.y (java_expand_classes): No longer register classes.
1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (is_compiled_class): New local variable
seen_in_zip. Identify classes found in currently compiled source
file(s).
* decl.c (complete_start_java_method): Fixed typo.
* java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
(CLASS_P): Moved around.
(java_parse_abort_on_error): Macro moved from jcf-parse.c
* jcf-parse.c (java_parse_abort_on_error): Macro moved to
java-parse.h
(jcf_parse_source): Changed leading comment. Removed unnecessary
fclose and CLASS_FROM_SOURCE_P marking.
(parse_source_file): New local variables remember_for_generation
and filename. Mark parsed file name identifier node. Removed block
executed when parse_only was null. Set remember_for_generation.
Use it as an argument to java_pop_parser_context.
(yyparse): New local variables several_files, list, next node and
current_file_list. Split ampersand separated file names into
current_file_list. Iterate through the list and parse accordingly.
* parse.h (java_pop_parser_context): New function prototype.
* parse.y (ctxp_for_generation): New static global variable.
(java_pop_parser_context): New argument generate. Link popped ctxp
to ctxp_for_generation list accordingly.
(java_complete_expand_methods): Fixed indentation.
(java_expand_classes): New function.
1998-10-17 Per Bothner <bothner@cygnus.com>
* Makefile.in: Link with libiberty.a instead of memmove.o.
1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lex.c (setjmp.h): No longer included.
* lex.h (setjmp.h): Included.
* parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
(duplicate_declaration_error_p): Renamed from
duplicate_declaration_error.
(build_array_from_name): New function prototype.
* parse.y (setjmp.h): No longer included.
(variable_declarator_id): Define action.
(build_array_from_name): New function.
(duplicate_declaration_error_p): Renamed from
duplicate_declaration_error. Fixed leading comment.
(register_fields): Main `for' loop reorganized. Uses
SET_TYPE_FOR_RESOLUTION and build_array_from_name.
(method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
build_array_from_name.
(resolve_class): Set CLASS_LOADED_P on newly build array dimension
types.
(read_import_dir): Don't try to skip `.' and `..'.
(declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
build_array_from_name. Main `for' loop reorganized.
(resolve_qualified_expression_name): When building access to a
field, use the type where the field was found, not its own type.
(maybe_access_field): Use field DECL_CONTEXT if the type where the
field was found is null.
(qualify_ambiguous_name): Sweep through all successive array
dimensions.
1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (pop_labeled_block, lang_printable_name,
maybe_add_interface, set_super_info, get_access_flags_from_decl,
interface_of_p, inherits_from_p, fix_classpath,
complete_start_java_method, emit_handlers, init_outgoing_cpool,
make_class_data, register_class, alloc_name_constant): New
function prototypes.
* lang.c (lang_decode_option): Set argc argument unused. Fixed
indentation. Added cast to remove warning.
(lang_printable_name): Set v argument unused.
(lang_print_error): Added argument to lang_printable_name call.
(java_dummy_print, print_lang_decl, print_lang_type,
print_lang_identifier, lang_print_xnode): All argument marked
unused.
* lex.c (java_unget_unicode): Removed unnecessary argument.
(java_allocate_new_line): Unused local variable is gone.
(java_read_char): Added parenthesis in expressions to remove
warnings. Added final return statement.
(java_read_unicode): Added parenthesis in expression to remove
warning.
(java_parse_end_comment): Fixed java_unget_unicode invocation.
(java_parse_escape_sequence): Likewise.
(java_lex): Unused local variables are gone. Fixed
java_unget_unicode invocation.
* lex.h (set_float_handler): Prototype added when JC1_LITE not
defined.
* parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
lang_printable_name invocation in macro.
(ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
Likewise.
(duplicate_declaration_error): Suppressed unused argument in
prototype.
(identical_subpath_p): Function declaration is gone.
(patch_invoke): Suppressed unused argument in prototype.
(patch_cast, build_labeled_block, check_thrown_exceptions):
Likewise.
* parse.y (setjmp.h): Included
(toplev.h): Likewise.
(field_declaration:): Suppressed unused local
(label_decl:): Fixed build_labeled_block invocation.
(java_pop_parser_context): Put extra parenthesis around assignment
in if.
(yyerror): Suppressed unused local variables.
(variable_redefinition_error): Fixed lang_printable_name
invocation.
(create_interface): Suppressed unused local variables.
(create_class): Likewise.
(duplicate_declaration_error): Suppressed unused argument. Fixed
lang_printable_name invocation.
(register_fields): Suppressed unused local variable. Fixed
duplicate_declaration_error invocation.
(method_header): Suppressed unused local variable.
(method_declarator, parser_check_super): Likewise.
(java_complete_class): Suppressed unused local variable. Fixed
fatal error message.
(complete_class_report_errors): Added default: in switch.
(java_check_regular_methods): Fixed lang_printable_name
invocations.
(check_throws_clauses): Likewise.
(java_check_abstract_methods): Suppressed unused local
variable. Fixed lang_printable_name invocation.
(read_import_entry): Added supplemental return statement.
(read_import_dir): Suppressed unused local variables.
(check_pkg_class_access, declare_local_variables): Likewise.
(source_start_java_method): Suppressed unused extern variable
declarations
(expand_start_java_method): Suppressed unused extern and local
variable declarations.
(java_complete_expand_methods): Likewise.
(java_complete_expand_method): Suppressed unused local variables.
(make_qualified_name): Likewise.
(resolve_qualified_expression_name): Added default: in
switch. Fixed lang_printable_name invocation.
(class_instance_creation_expression): Added parenthesis around
expressions.
(patch_method_invocation_stmt): Fixed lang_printable_name and
patch_invoke invocations.
(check_for_static_method_reference): Fixed lang_printable_name
invocation.
(patch_invoke): Suppressed unused arguments and local variables.
(lookup_method_invoke): Suppressed unused local variables.
(qualify_ambiguous_name): Added default: in switch.
(identical_subpath_p): Function removed.
(patch_assignment): Suppressed unused local variables. Suppressed
unnecessary if statement. Fixed lang_printable_name invocations.
(try_builtin_assignconv): Fixed lang_printable_name invocations.
(valid_ref_assignconv_cast_p): Parenthesis around
expression. Suppressed unused local variables.
(build_binop): Suppressed unused local variables. fixed
lang_printable_name invocations.
(string_constant_concatenation): Suppressed unused local
variables.
(patch_unaryop): Fixed lang_printable_name invocation.
(patch_cast): Suppressed unnecessary argument. Fixed
lang_printable_name invocation.
(patch_array_ref): Fixed lang_printable_name invocation.
(patch_newarray, patch_return, patch_if_else_statement): Likewise.
(build_labeled_block): Suppressed unused argument.
(generate_labeled_block): Fixed build_labeled_block invocation.
(build_loop_body): Suppressed unused local variables.
(patch_loop_statement): Likewise.
(patch_exit): Fixed lang_printable_name invocation.
(patch_switch_statement): Likewise.
(case_identity): First argument marked unused.
(patch_try_statement): Fixed lang_printable_name invocations.
(patch_synchronized_statement, patch_throw_statement): Likewise.
(check_thrown_exceptions): Fixed check_thrown_exceptions and
lang_printable_name invocations.
(check_thrown_exceptions_do): Suppressed unused argument.
1998-10-14 Tom Tromey <tromey@cygnus.com>
* jcf-write.c (write_classfile): Add output class file as target.
* lang-options.h: Added -MD, -MMD, -M, and -MM.
* jcf.h: Added declarations for dependency-tracking functions.
* lang-specs.h: Handle -M, -MM, MD, and -MMD.
* lang.c (lang_decode_option): Recognize -MD and -MMD.
(finish_parse): Call jcf_dependency_write.
(dependency_tracking): New global.
(DEPEND_SET_FILE): New define.
(DEPEND_ENABLE): New define.
(init_parse): Enable dependency tracking if required.
Include "flags.h".
* Makefile.in (JAVA_OBJS): Added jcf-depend.o.
(../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
(../gcjh$(exeext)): Likewise.
(jcf-depend.o): New target.
* Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
(GCJH_SOURCES): Likewise.
* jcf-io.c (open_class): Call jcf_dependency_add_file. Added
dep_name argument.
(find_classfile): Added dep_name argument.
(find_class): Compute name of dependency.
(open_in_zip): Call jcf_dependency_add_file.
* gjavah.c (output_file): No longer global.
(usage): Don't mention "gjavah".
(help): Likewise.
(java_no_argument): Likewise.
(version): Likewise.
(main): Recognize and handle -M family of options.
(print_mangled_classname): Return is void.
(process_file): Handle case where output is suppressed.
(HANDLE_END_FIELD): Likewise.
(HANDLE_METHOD): Likewise.
* jcf-depend.c: New file.
1998-10-13 Jeffrey A Law (law@cygnus.com)
* java-tree.def: Add missing newline at EOF.
1998-10-13 Tom Tromey <tromey@cygnus.com>
* jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
(main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
function.
Include <config.h> and "system.h".
(disassemble_method): Undefine RET to avoid clash with
config/i386/i386.h.
1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (runtime_exception_type_node, error_exception_type_node):
New global variables.
(init_decl_processing): Initialized.
* expr.c (java_lang_expand_expr): Set caught exception type to
null if catch handler argument doesn't exit.
* java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
tree codes.
* java-tree.h (runtime_exception_type_node,
error_exception_type_node): Global variables declared.
(DECL_FUNCTION_THROWS): New macro.
(DECL_FUNCTION_BODY): Modified comment.
(DECL_SPECIFIC_COUNT): Likewise.
(struct lang_decl): New field throws_list.
(IS_UNCHECKED_EXPRESSION_P): New macro.
* lex.c (java_lex): Generate location information for THROW_TK.
* parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
EXCEPTIONS_P): New macros.
(enum jdep_code): New value JDEP_EXCEPTION.
(BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
PATCH_METHOD_RETURN_ERROR): New macros.
(patch_method_invocation_stmt): Added new argument to prototype.
(patch_synchronized_statement, patch_throw_statement,
check_thrown_exceptions, check_thrown_exceptions_do,
purge_unchecked_exceptions, check_throws_clauses): New function
prototypes.
* parse.y Fixed typo in keyword section.
(throw:): Rule tagged <node>.
(THROW_TK): Keyword tagged <operator>.
(method_header:): Last argument to call to method_header passed
from throws: rule.
(throws:, class_type_list:, throw_statement:,
synchronized_statement:, synchronized:): Defined actions.
(method_header): New local variable current. Register exceptions
from throws clause.
(java_complete_tree): Complete and verify exceptions from throws
clause.
(complete_class_report_errors): Error message on exceptions not
found
(java_check_regular_methods): Fixed typo. Shortcut on private
overriding methods. Changed error message on method
redefinition. Check for throws clause compatibility.
(check_throws_clauses): New function.
(java_check_abstract_methods): Use DECL_NAME for wfl or current
method. Changed error message on method redefinition.
(currently_caught_type_list): New static variable.
(java_complete_expand_methods): Purge unchecked exceptions from
throws clause list. Call PUSH_EXCEPTIONS before walk and
POP_EXCEPTIONS after.
(resolve_qualified_expression_name): Pass new argument as NULL to
patch_method_invocation_stmt.
(patch_method_invocation_stmt): New argument ref_decl. Invoke
PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
argument list when appropriate. Use new argument if non null to
store selected method decl.
(patch_invoke): Convert if necessary args of builtin types before
forming CALL_EXPR. Argument list no longer reversed here.
(invocation_mode): Treat final methods as static methods.
(java_complete_tree): New cases for THROW_EXPR: and
SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
function call.
(complete_function_arguments): No more RECORD_TYPE
conversion. Function parameter nodes no longer saved.
(valid_ref_assignconv_cast_p): Avoid handling null type.
(patch_binop): Fixed null constant reference handling.
(build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
BUILD_THROW macros.
(patch_try_statement): Fixed comments. Record caught types in
list, push the list, expand try block and pop the list.
(patch_synchronized_statement, patch_throw_statement,
check_thrown_exceptions, check_thrown_exceptions_do,
purge_unchecked_exceptions): New functions.
* typeck.c (lookup_argument_method): Allow WFL in place of method
DECL_NAME during method definition check
1998-10-09 Tom Tromey <tromey@cygnus.com>
* gjavah.c (decode_signature_piece): New function.
(print_c_decl): Use it. Added `name_override' argument.
(print_method_info): Use name_override argument to print_c_decl.
(seen_fields): Removed.
(print_field_info): Don't update seen_fields.
(struct method_name): New structure.
(method_name_list): New global.
(print_method_info): Add new method to list of methods.
(name_is_method_p): New function.
(print_field_info): If field name has same name as method, then
change field name.
(process_file): Parse methods before fields.
(field_pass): New global.
(HANDLE_END_FIELD): Take field_pass into account.
1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
(keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
1998-10-03 Anthony Green <green@cygnus.com>
* jvspec.c: Fix bug in jvgenmain_spec patch.
1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Makefile.in (lang.o:): Install dependency on java-tree.def.
* decl.c (soft_exceptioninfo_call_node): New global variable.
(init_decl_processing): Fixed indentation. soft_badarrayindex_node
takes extra integer argument. soft_exceptioninfo_call_node
initialized.
* except.c (java_set_exception_lang_code): New function
(method_init_exceptions): Called here.
(prepare_eh_table_type): New function.
(expand_end_java_handler): Called here.
* expr.c (build_java_throw_out_of_bounds_exception): Now features
one argument. Modified generation of call to
soft_badarrayindex_node to use new argument.
(build_java_arrayaccess): Pass faulty index value to
build_java_throw_out_of_bounds_exception.
(generate_name): New function.
(java_lang_expand_expr): New local variables node, current,
has_finally_p. Expand TRY_EXPR node.
(process_jvm_instruction): Replace top of the stack with thrown
object reference when entering exception handler.
* java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
specific tree codes.
* java-tree.h (soft_exceptioninfo_call_node): Declaration of new
global.
(DECL_SPECIFIC_COUNT): New macro.
(prepare_eh_table_type, java_set_exception_lang_code,
generate_name): New function declarations.
(match_java_method): Declaration deleted.
(FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
macros.
* lex.c (TRY_TK, CATCH_TK): Generate location information.
* parse.h (redefinition_error, refine_accessible_methods_list,
can_cast_to_p): Function declaration removed.
(classitf_redefinition_error, variable_redefinition_error,
parse_jdk1_1_error, find_applicable_accessible_methods_list,
find_most_specific_methods_list, argument_types_convertible,
enter_a_block, valid_builtin_assignconv_identity_widening_p,
valid_cast_to_p, valid_method_invocation_conversion_p,
try_reference_assignconv, add_stmt_to_compound,
build_jump_to_finally, build_tree_list, patch_try_statement,
java_get_catch_block): New function declarations.
* parse.y (string_buffer_type): Global variable deleted.
(group_of_labels, catches, catch_clause, catch_clause_parameter,
finally): Rules tagged <node>.
(TRY_TK, CATCH_TK): Token tagged <operator>.
(class_body_declaration:, class_member_declaration:,
formal_parameter:, explicit_constructor_invocation:,
interface_member_declaration:, constant_declaration:,
primary_no_new_array:, class_instance_creation_expression:,
array_creation_expression:): Issue error on unsuported JDK1.1
features.
(try_statement:, catches:, finally:): Define actions.
(catch_clause_parameter): New rule.
(catch_clause:): Use new rule catch_clause_parameter.
(parse_jdk1_1_error): New function.
(redefinition_error): Renamed classitf_redefinition_error.
(variable_redefinition_error): New function.
(check_class_interface_creation): Call
classitf_redefinition_error.
(java_complete_tree): Added error message on JDEP_TYPE: case.
(complete_class_report_errors): Fixed indentation.
(declare_local_variables): Call variable_redefinition_error.
(source_end_java_method): Call java_set_exception_lang_code and
emit_handlers where appropriate.
(java_method_add_stmt): Call add_stmt_to_block.
(add_stmt_to_block): New function.
(lookup_method_invoke): Fixed outside comment. new local variable
candicates. Call find_applicable_accessible_methods_list and
find_most_specific_methods_list when searching for a
method. Modified error report to list possible candidates when
applicable.
(find_applicable_accessible_methods_list,
find_most_specific_methods_list, argument_types_convertible): New
function.
(refine_accessible_methods_list): Function deleted.
(java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
expr (if applicable) before calling patch_array_ref.
(build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
(enter_block): Fixed comment.
(enter_a_block): New function.
(patch_assignment): Reorganized. Call try_reference_assignconv for
references. Call valid_cast_to_p instead of can_cast_to_p.
(try_reference_assignconv,
valid_builtin_assignconv_identity_widening_p): New functions.
(valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
(valid_cast_to_p, valid_method_invocation_conversion_p): New
functions.
(build_string_concatenation): Don't resolve StringBuffer.
(patch_cast): Fixed inverted arguments.
(patch_array_ref): Code to save array expr deleted. Call
valid_cast_to_p instead of can_cast_to_p.
(generate_labeled_block): Call generate_name.
(build_jump_to_finally, build_try_statement, java_get_catch_block,
patch_try_statement): New functions.
* typeck.c (match_java_method): Function deleted.
1998-10-02 Anthony Green <green@cygnus.com>
* jvspec.c: jvgenmain_spec uses different temporary file names.
1998-10-02 Anthony Green <green@cygnus.com>
* jvspec.c (lang_specific_driver): Fail if user specifies
--main= when not linking.
1998-09-28 Tom Tromey <tromey@cygnus.com>
* class.c (make_class_data): Push value for `thread' field.
* decl.c (init_decl_processing): Added `thread' field to class.
* class.c (add_field): Always make static fields externally
visible.
1998-09-26 Anthony Green <green@cygnus.com>
* expr.c (build_java_athrow,
build_java_throw_out_of_bounds_exception, expand_invoke,
build_newarray, expand_java_multianewarray, build_java_monitor):
Update comments to reflect _Jv_* function names.
1998-09-25 Per Bothner <bothner@cygnus.com>
* decl.c (complete_start_java_method): DECL_RESULT is always promoted.
* decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
* parse.y (expand_start_java_method): Likewise.
1998-09-24 Per Bothner <bothner@cygnus.com>
* expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
* class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
(add_field): No longer need to convert from RECORD_TYPE to pointer,
* expr.c: Remove no-longer-needed calls to promote_type.
* decl.c (give_name_to_locals): Liekwise.
* jcf-parse.c (get_class_constant): Compensate for new signatures.
* parse.y: Add/remove promote_type calls as appropriate.
* typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
(parse_signature_string): Likewise.
(build_java_array_type): Fix for now signature convenions.
* lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
1998-09-23 Tom Tromey <tromey@cygnus.com>
* class.c (init_class_processing): libjava function renamed to
_Jv_RegisterClass.
1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
* java-tree.def: Fixed DEFTREECODE third argument.
(UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
* java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
(JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
JAVA_THIS_EXPR): Now replaced by tree code definitions.
(CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
* lang.c (java_tree_code_type, java_tree_code_length,
java_tree_code_name): New arrays.
(lang_init): Append Java tree node definitions to Gcc ones.
* lex.c (expression_obstack): Declared as extern when JC1_LITE
defined.
(java_init_lex): Initialize wfl_append, wfl_string_buffer,
wfl_to_string.
(java_lex): Allow declaration of empty string constants. Retain
location information on CASE_TK and DEFAULT_TK.
* parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
Modified to be more robust.
(BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
(build_new_invocation, try_builtin_assignconv,
patch_switch_statement, string_constant_concatenation,
build_string_concatenation, patch_string_cst, patch_string,
java_expand_switch): New function declarations.
* parse.y: Rules related to switch and EH tagged <node>.
(label_id): Set to NULL_TREE
(wfl_string_buffer, wfl_append, wfl_to_string): New static global
tree nodes.
(this_or_super:): Fixed indentation.
(statement:, statement_nsi:, statement_without_trailing_substatement:,
statement_expression:): Removed call to RULE on all sub-rules.
(switch_expression:, switch_labels:): New rules.
(switch_statement:, switch_block:, switch_block_statement_groups:,
switch_block_statement_group:, switch_labels:, switch_label:):
Defined actions.
(throw_statement:, synchronized_statement:, try_statement:):
Defined temporary actions.
(class_instance_creation_expression:): Call
build_new_invocation. Fixed indentation.
(field_access): Fixed indentation.
(method_invocation): Likewise.
(make_qualified_primary): Use THIS_EXPR.
(resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
resolving from SUPER, set *type_found.
(qualify_ambiguous_name): Use NEW_CLASS_EXPR.
(java_complete_tree): Removed unused local variable `location'. Case
for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
on MODIFY_EXPR: and all binary operator tree code cases. Removed
STRING_CST: case. default: checks for patchable strings.
(complete_function_arguments): Transform string constant or
crafted StringBuffer if necessary.
(build_method_invocation): Fixed comments.
(build_new_invocation): New function.
(patch_assignment): Call try_builtin_assignconv to figure a valid
assignment conversion between builtin types.
(try_builtin_assignconv): New function.
(build_binop): Use URSHIFT_EXPR directly to call build.
(operator_string): Use UNARY_PLUS_EXPR.
(patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
operator.
(do_merge_string_cste, merge_string_cste,
string_constant_concatenation, build_string_concatenation,
patch_string, patch_string_cst): New function.
(build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
(patch_unaryop): Likewise. New test of valid ++/-- operands.
(build_newarray_node): Use NEW_ARRAY_EXPR.
(build_this): Use THIS_EXPR.
(build_return): Enable debug information on return statement.
(build_if_else_statement): Likewise.
(complete_labeled_statement): Fixed related comment.
(build_loop_body): Fixed comment.
(build_bc_statement): Enable debug information on break/continue
statements.
(patch_bc_statement): Fixed typos. Handle SWITCH statement
context.
(patch_switch_statement, case_identity, java_expand_switch): New
functions.
1998-09-21 Per Bothner <bothner@cygnus.com>
* buffer.h (BUFFER_INIT): New macro.
* jcf-write.c (struct jcf_partial): New type. Put global stuff here.
Pass (struct jcf_partial *state) to most functions.
(jcf_block, jcf_relocation): New types.
Support labels, branches, conditionals, loops.
1998-09-21 Tom Tromey <tromey@cygnus.com>
* decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
1998-09-21 Per Bothner <bothner@cygnus.com>
* decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
* verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
not integer_type_node (INT_TYPE_SIZ bits).
* parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
* jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
* jcf-dump.c (print_exception_table): New function.
(disassemble_method): Better handling of wide instructions.
Make more robust for bad input.
1998-09-30 Jeffrey A Law (law@cygnus.com)
* jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
FreeBSD.
1998-09-17 Jeffrey A Law (law@cygnus.com)
* Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
1998-09-17 Tom Tromey <tromey@cygnus.com>
* Makefile.in ($(PARSE_H)): Removed target.
1998-09-17 Jeffrey A Law (law@cygnus.com)
* Makefile.in (JAVA_OBJS): Add memmove.o
(memmove.o): New target & rules.
1998-09-15 Tom Tromey <tromey@cygnus.com>
* expr.c (expand_invoke): Don't generate a call to the class init
code.
1998-09-14 Jeffrey A Law (law@cygnus.com)
* Makefile.in: Add many missing dependencies.
* buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
as appropriate.
* except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
* jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
1998-09-11 Per Bothner <bothner@cygnus.com>
* decl.c (complete_start_java_method): If method is static (and
not private) call _Jv_InitClass.
* expr.c (expand_invoke): Don't call build_class_init.
* jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
1998-09-10 Jeffrey A Law (law@cygnus.com)
* Make-lang.in (GCJ): Define before using.
1998-09-09 Jeffrey A Law (law@cygnus.com)
* gjavah.c (java_no_argument): Renamed from no_argument to avoid
losing due to namespace pollution in GNU getopt.h
1998-09-09 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
(java.all.cross): Likewise.
(java.rest.encap): Likewise.
1998-09-08 Jeffrey A Law (law@cygnus.com)
* gjavah.c (print_class_decls): Fix thinko in arglist
* jcv-io.c (find_classfile): Similarly.
1998-09-07 Jeffrey A Law (law@cygnus.com)
* Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
1998-09-05 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (java.maintainer-clean): Don't remove parse.h.
(java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
* Makefile.in (PARSE_C): New macro.
(PARSE_H): Likewise.
(PARSE_SCAN_C): Likewise.
($(PARSE_C)): Target renamed from parse.c.
($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
(clean): Remove parse-scan.c as well.
(parse.o): Depend on $(PARSE_C).
1998-09-05 Anthony Green <green@cygnus.com>
* README, license.terms: Removed.
* Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
and Java trademark attribution.
1998-09-04 Tom Tromey <tromey@cygnus.com>
* Makefile.in: Use gcjh, not gjavah.
* config-lang.in (stagestuff): Use gcjh, not gjavah.
* Make-lang.in: Changed gjavah to gcjh everywhere.
1998-09-03 Per Bothner <bothner@cygnus.com>
* gjavah.c: Support new -prepend -add -append flags.
(print_method_info): Method is not virtual if class is final.
1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jv-scan.c: Fixed copyright assignment.
* keyword.gperf: Likewise.
* keyword.h: Likewise.
* lex.c: Fixed copyright assignment.
(java_lex): Push unicode back when parsing '<'.
* lex.h: Fixed copyright assignment.
* parse-scan.y: Likewise.
* parse.h: Fixed copyright assignment.
(build_debugable_stmt, complete_for_loop): New function prototypes.
* parse.y: Fixed copyright assignment.
(for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
size_zero_node when completing a loop with no exit condition.
(for_statement_nsi:): Define action.
(for_init:, for_update:): Return size_zero_node when empty.
(declare_local_variables): Call build_debugable_stmt.
(build_debugable_stmt): New function.
(build_loop_body): Build debugable statement around loop
condition part.
(complete_loop_body): Take into account the debugable statement
around the EXIT_EXPR.
(complete_loop_body): New function.
(patch_exit_expr): Fixed condition inversion.
1998-09-02 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
name of thread define.
* jvspec.c (THREAD_NAME): New macro.
(GCLIB): Likewise.
(THREADLIB): Likewise.
(lang_specific_driver): Recognize attempt to link with thread
library or gc library. Recognize -ljava on command line so it
isn't linked against more than once.
1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse-scan.y (report_main_declaration): Name of the class
containing `main' can be a qualified name.
1998-08-31 Tom Tromey <tromey@cygnus.com>
* config-lang.in: Changed gjavac to gjc everywhere.
* Make-lang.in: Changed gjavac to gjc everywhere.
1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
(java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
and install the files.
* Makefile.in (JAVA_OBJS_LITE): New variable.
(compiler:): Now include jv-scan as a dependency.
(../jv-scan$(exeext), parse-scan.c): New targets.
(../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
* config-lang.in (compilers): Removed gcj, gjavah from the list.
* jcf-parse.c (parse_source_file): Call java_layout_classes and
check for errors even if parse_only.
* lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
defined.
(yylex): New function. Uses java_lex body.
(java_lex): Removed commented out statement. Remove local variable
literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
where appropriate.
(java_lex_error): Empty if JC1_LITE is defined.
(java_get_line_col): Return 0 if JC1_LITE is defined.
* lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
SET_MODIFIER_CTX): Moved into the section containing the macros
conditionally defined by JC1_LITE.
(BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
argument if JC1_LITE is defined.
(HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
is defined.
(DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
to different values according to JC1_LITE.
* parse.h (int_fits_type_p, stabilize_reference): Prototype not
declared if JC1_LITE set.
(jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
defined if JC1_LITE not set.
(struct parser_ctx): Reorganized and skip the jc1 front end part
if JC1_LITE set.
(java_layout_classes): New function definition.
(java_push_parser_context, java_init_lex, yyparse, yylex,
yyerror): Prototype always declared. All other static function
prototypes declared only if JC1_LITE is not set.
* parse.y (yyparse, yylex, yyerror): No longer declared here. Now
declared in parse.h.
(java_layout_classes): New function.
(java_complete_expand_methods): No longer layout the class here.
* parse-scan.y: New file.
* jv-scan.c: New file.
1998-08-25 Tom Tromey <tromey@cygnus.com>
* gjavah.c (main): Handle -friend option.
(friend_specs): New global.
(generate_access): Handle friend_specs.
(process_file): Likewise.
(MAX_FRIENDS): New macro.
(friend_count): New global.
(print_cxx_classname): Added `prefix' argument. Ignore arrays.
Changed all callers.
1998-08-24 Per Bothner <bothner@cygnus.com>
* jcf-dump.c (process_class): Move JCF_FINISH use to main,
(main): Handle processing all the entries of a named .zip archive.
* jcf-io.c (jcf_trim_old_input): New function.
* jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
1998-08-24 Per Bothner <bothner@cygnus.com>
* lang.c (flag_assume_compiled): Make default be on.
1998-08-21 Per Bothner <bothner@cygnus.com>
* jcf-dump.c: Add bunches of flags to control output more.
(process_class): New function; support printing more than one class.
(main): Support new --print-main and --javap flags.
* jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
* jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
1998-08-20 Per Bothner <bothner@cygnus.com>
Change mangling of dispatch table to match C++ vtable (w/thunks).
* class.c (build_dtable_decl), java-tree.h: New function.
(make_class_data): Call it.
* decl.c (init_decl_processing): Likewise.
1998-08-19 Warren Levy <warrenl@cygnus.com>
* decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
soft_anewarray; adjust args passed.
* expr.c (build_anewarray): Adjust args for soft_anewarray_node to
match _Jv_NewObjectArray.
1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (push_labeled_block, pop_labeled_block): New functions.
* expr.c (loopup_label): Call create_label_decl.
(create_label_decl): New function.
(java_lang_expand_expr): Call expand_start_bindings with argument
set to zero.
* java-tree.h Added space after PROTO in function declarations
when necessary.
(IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
(create_label_decl, push_labeled_block): New function
declarations.
* lex.c (label_id): Initialize.
(SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
switch.
* parse.h Added space after PROTO in function declarations when
necessary.
(LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
macros.
(struct parser_ctxt): New fields current_loop,
current_labeled_block.
(build_if_else_statement, patch_if_else_statement,
add_stmt_to_compound, patch_exit_expr, build_labeled_block,
generate_labeled_block, complete_labeled_statement,
build_bc_statement, patch_bc_statement, patch_loop_statement,
build_new_loop, build_loop_body, complete_loop_body): New function
declarations.
* parse.y (java_warning_count): New global variable.
(label_id): New static variable.
(BREAK_TK, CONTINUE_TK): Token tagged <operator>.
(block:): Return size_zero_node when block is empty.
(empty_statement:): Return size_zero_node.
(statement:): Implement supplemental action when for_statement: is
reduced.
(label_decl:): New rule.
(labeled_statement:): Rewritten using label_decl. Actions
implemented.
(labeled_statement_nsi:): Likewise.
(if_then_statement): Actions implemented.
(while_expression): New rule.
(while_statement:): Rewritten using while_expression. Actions
implemented.
(while_statement_nsi:): Likewise.
(do_statement_begin:): New rule.
(do_statement:): Rewritten using do_statement_begin. Actions
implemented.
(for_statement:): Rewritten using for_begin. Actions implemented.
(for_statement_nsi:): Likewise.
(for_header:, for_begin:): New rules.
(for_init:): Actions implemented.
(statement_expression_list:, break_statement:,
continue_statement:): Likewise.
(yyerror): Count number of issued warning(s).
(java_report_errors): Report error(s) and/or warning(s).
(java_complete_class): Use build_java_argument_signature to
recompute completed method signature.
(java_check_regular_methods): New locals method_wfl and aflags.
Use method_wfl instead of lookup_cl during error reports. Fixed
indentation and modified some error messages. Use
lang_printable_name in method instead of the DECL_NAME. New code
to issue warnings on methods not overriding corresponding methods
private to a different package.
(java_method_add_stmt): Call add_stmt_to_compound.
(add_stmt_to_compound): New function.
(java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
LOOP_EXPR, EXIT_EXPR and COND_EXPR.
(build_if_else_statement, patch_if_else_statement,
build_labeled_block, generate_labeled_block,
complete_labeled_statement, build_new_loop, build_loop_body,
complete_loop_body, patch_loop_statement, build_bc_statement,
patch_bc_statement, patch_exit_expr): New functions.
* typeck.c (build_java_signature): Build argument signature before
enclosing it in between parenthesis.
1998-08-17 Warren Levy <warrenl@cygnus.com>
* Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
(JAVA_OBJS): Added reminder comment
1998-08-13 Nick Clifton <nickc@cygnus.com>
* gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
be interpreted as a long long.
1998-08-13 Warren Levy <warrenl@cygnus.com>
* decl.c (init_decl_processing): Use _Jv_InitClass, not
soft_initialise_class. Use _Jv_NewMultiArray, not
soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
_Jv_CheckArrayStore, not soft_checkarraystore. Use
_Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
1998-08-12 Per Bothner <bothner@cygnus.com>
* decl.c, java-tree.h (this_identifier_node, super_identifier_node,
length_identifier_node): New global tree node constants.
* parse.y (kw_super, kw_this, kw_length): Removed globals.
Replace uses by super_identifier_node etc.
* lex.c (kw_super, kw_this, kw_length): Don't initialize.
* parse.y (resolve_field_access): Don't special-case ".length" if
flag_emit_class_files.
(patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
* jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
and ARRAY.length.
1998-08-11 Per Bothner <bothner@cygnus.com>
* decl.c (init_decl_processing): Remove unused method_type_node fields.
* class.c (make_method_value): Remove init for removed fields.
* class.c (layout_class): Use build_java_argument_signature.
* java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
* typeck.c (push_java_argument_signature): Removed. Merged into ...
(build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
(build_java_signature): Don't use push_java_argument_signature.
* typeck.c (lookup_argument_method): New function.
* parse.y (java_check_regular_methods): Use lookup_argument_method
instead of lookup_java_method2 followed by lookup_java_method.
* parse.y (check_method_redefinition): Minor optimization.
* jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
1998-08-10 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
c-pragma.o.
* gjavah.c (java_float_finite): Use K&R-style definition.
(java_double_finite): Likewise.
(generate_access): Now returns void. Changed all callers.
(last_access_generated): Removed.
(process_file): Only make a single pass over the .class file.
1998-07-29 Per Bothner <bothner@cygnus.com>
* class.c (get_dispatch_table): Add extra dummy vtable entry,
for compatibility for G++ (with -fvtable-thunks).
* expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
* gjavah.c (process_file): Use public inheritance for super-class.
1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lex.c (java_init_lex): Initialize ctxp->package.
* parse.h (struct parser_ctxt): package and package_len replaced
by tree package, an identifier node. Field method_decl_list is
gone. Fixed comments.
(lookup_field_wrapper, merge_qualified_name, not_accessible,
class_in_current_package): New function prototypes.
* parse.y (array_type:): Set class loaded flag on primitive type
arrays.
(package_declaration:): Assign ctxp->package to the
identifier node.
(method_invocation:): Handle invocation of method qualified by
`super'.
(single_type_import_declaration:): Removed ambiguity check.
(java_pop_parser_context): New local variable `next'. Reset and
set IMPORT_CLASSFILE_NAME flags on current and previous import
list.
(java_accstring_lookup): Use new local macro COPY_RETURN.
(lookup_field_wrapper): New function.
(parser_qualified_classname): Use merge_qualified_name.
(parser_check_super_interface): Broaden error message.
(do_resolve_class): Check for qualified class name in the current
compilation unit if appropriate.
(process_imports): Check for already defined classes.
(check_pkg_class_access): Got rid of call to
get_access_flags_from_decl.
(java_complete_expand_methods): Call safe_layout_class based on
the current class size.
(make_qualified_primary): Build a WFL qualification on primary if
none exists.
(merge_qualified_name): New function.
(make_qualified_name): Use merge_qualified_name.
(resolve_expression_name): Use safe_lookup_field.
(resolve_field_access): Got rid of call to get_access_flags_from_decl.
(resolve_qualified_expression_name): Likewise. Check on resolved
element accessibility.
(not_accessible_p, class_in_current_package): New functions.
(maybe_access_field): Got rid of call to get_access_flags_from_decl.
(patch_method_invocation_stmt): Merged common pieces. Check
accessibility of invoked method.
(check_for_static_method_reference): Add returned type in error
message.
(invocation_mode): Get rid of bogus check on PRIVATE methods.
(refine_accessible_methods_list): Merged two conditions in test.
(java_complete_class): Sanity check on stabilize_ref gone.
* zextract.c (read_zip_archive): Cast lseek second argument to long.
1998-07-28 Per Bothner <bothner@cygnus.com>
* class.c (hashUtf8String): Fix - use new JavaSoft specification.
1998-07-24 Tom Tromey <tromey@cygnus.com>
* gjavah.c (F_NAN): Removed.
(F_NAN_MASK): New macro.
(F_POSITIVE_INFINITY): Removed.
(F_NEGATIVE_INFINITY): Likewise.
(java_float_finite): Rewrote.
(D_NAN_MASK): Renamed.
(java_double_finite): Rewrote.
(D_POSITIVE_INFINITY): Removed.
(D_NEGATIVE_INFINITY): Likewise.
* jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
If verbose, print underlying representation of value in hex.
1998-07-24 Per Bothner <bothner@cygnus.com>
* buffer.h, buffer.c: New files.
* Makefile.in (JAVA_OBJS): Add buffer.o.
Support locals variables and writing their debug entries to .class.
* jcf-write.c: Simplify some by user new buffer type.
(vode_buffer_grow): Removed.
(struct localvar_info): New type.
(localsvars, localvartable): New buffers.
(localvar_alloc, localvar_free): New functions.
(generate_bytecode_insns): Handle local variables.
(generate_classfile): Write LocalVariableTable attribute.
1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-io.c (open_in_zip): Check the zipfile magic number.
* zipfile.h (ZIPMAGIC): New macro.
1998-07-24 Tom Tromey <tromey@cygnus.com>
* Makefile.in (gjavah.o): Updated dependencies.
(jcf-dump.o): Likewise.
(all.indirect): Use ../gjavah.
(../gjavah$(exeext)): Likewise.
(clean): Don't remove gjavah.
(clean): Remove parse.c, not java/parse.c.
* Make-lang.in (java): Added gjavah.
(gjavah$(exeext)): New target.
(GJAVAH_SOURCES): New macro.
(java.all.build): Added gjavah.
(java.all.cross): Likewise.
(java.rest.encap): Likewise.
* config-lang.in (compilers, stagestuff): Added gjavah.
1998-07-23 Tom Tromey <tromey@cygnus.com>
* gjavah.c (java_float_finite): New function.
(java_double_finite): Likewise.
(F_POSITIVE_INFINITY): New macro.
(F_NEGATIVE_INFINITY): Likewise.
(F_NAN): Likewise.
(D_POSITIVE_INFINITY): Likewise.
(D_NEGATIVE_INFINITY): Likewise.
(D_NAN): Likewise.
(print_field_info): Use java_float_finite and java_double_finite.
1998-07-23 Per Bothner <bothner@cygnus.com>
* parse.y (method_header): Name "this" implicit argument.
1998-07-22 Per Bothner <bothner@cygnus.com>
* jcf-write.c: Write out LineNumberTable attribute in .class file.
(linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
(put_linenumber): New function.
(generate_bytecode_insns, generate_classfile): Write line numbers.
1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
(lookup_name, build_known_method_ref, build_class_init,
build_invokevirtual, invoke_build_dtable, match_java_method,
build_field_ref, pushdecl_force_head, build_java_binop,
binary_numeric_promotion, build_decl_no_layout,
build_java_arrayaccess, build_newarray, build_anewarray,
build_java_array_length_access, build_java_arraynull_check): New
extern function prototypes.
(JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
java-tree.h.
* jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
to NULL
* jcf.h (jcf_out_of_synch): New extern function prototype.
* parse.h: Static/global function implemented in parse.y
prototyped and declarations moved at the end of the file.
(DECL_P): Check that the argument isn't null.
(JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
JAVA_THIS_EXPR): No longer defined here. See java-tree.h
(QUAL_DECL_TYPE): New macro.
(PARAMS): Macro definition removed.
* parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
(return_statement:): Call build_return.
(field_access:): Call make_qualified_primary in sub rule.
(method_invocation:): Build method invocation and call
make_qualified_primary when processing primaries.
(java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
get_type_from_signature.
(java_check_regular_method): Extra integer 0 argument when calling
lookup_java_method2.
(lookup_java_interface_method2): Extra method DECL argument when
calling lookup_java_interface_method2.
(java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
COMPOUND_EXPR node.
(java_complete_expand_method): Layout current class iff not
already done. Don't process interface's methods.
(java_complete_expand_method): Use super class only if it
exists. Use current class otherwise.
(make_qualified_primary): New function.
(resolve_expression_name): Process qualified expression or
expression from primary the same way.
(resolve_expression_name): Two last arguments to
resolve_field_access are now NULL_TREEs.
(resolve_field_access): New variable is_static. Local field must
be DECLs. is_static computed on field DECLs only. Append code in
where_found to the field access if necessary. Use QUAL_DECL_TYPE
to initialize field_type.
(resolve_qualified_expression_name): New local variable,
previous_call_static and is_static. Handle primaries with function
calls, casts, array references and `this'. `super' now handled as
`(super_class)this'. Use is_static to clarify boolean expressions.
Added code to handle case where a proper handle is required to
access a field. Use QUAL_DECL_TYPE where applicable.
(maybe_access_field): New function.
(patch_method_invocation_stmt): New arguments primary, where,
is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
deleted. Use `where' as a type to search from if specified. Check
for static method reference where forbidden. Append primary or
current_this to the argument list if not calling constructor nor
static methods.
(check_for_static_method_reference): New function.
(patch_invoke): Layout the class on which new is done if
necessary.
(lookup_method_invoke): Changed format to report errors on
methods.
(qualify_ambiguous_name): New local variable this_found. Now
handle things from primaries. Method call are considered
expression names.
(identical_subpath_p): NULL_TREE arguments to breakdown_qualified
changed into NULLs.
(not_initialized_as_it_should_p): Comply with the new DECL_P.
(java_complete_tree): New case fo RETURN_EXPR. Process function
call arguments in separate function.
(complete_function_arguments): New function.
(build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
anymore.
(patch_assignment): Take the return function slot into account as
a RHS. Distinguish assignment from a return.
(valid_ref_assignconv_cast_p): Use build_java_argument_signature
when checking methods in interfaces.
(resolve_type_during_patch): NULL argument to unresolve_type_p
instead of NULL_TREE.
(patch_newarray): Fixed typo in comment.
(buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
(build_return, patch_return): New functions.
* typeck.c (lookup_java_constructor): Fixed typo in comment.
1998-07-21 Per Bothner <bothner@cygnus.com>
* constants.c (find_name_and_type_constant, find_fieldref_index,
find_methodref_index): New methods.
* expr.c (build_invoke_non_interface): If flag_emit_class_files,
just return given method. Also, rename to build_known_method_ref.
(expand_invoke): Rename call to build_invoke_non_interface.
* java-tree.h, parse.h: Update prototype.
* parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
(such as expand_expr_stmt) if flag_emit_class_files.
* jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
STACK_TARGET, IGNORE_TARGET): New macros.
(code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
(generate_bytecode_insn): New function to generate method's bytecode.
(generate_classfile): Node generate Code attribute for a method.
(code_buffer_grow, push_constant1, push_constant2, push_int_const,
push_long_const, field_op, adjust_typed_op, maybe_wide):
New functions used by generate_bytecode_insn.
* typeck.c (signature_include_return): Remove variable.
(push_java_argument_signature, build_java_argument_signature): New.
(build_java_signature): Use push_java_argument_signature.
* parse.y: Use build_java_argument_signature instead of fiddling
with signature_include_return.
1998-07-17 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_c_decl): Always generate JArray<>* for array
types.
* Makefile.in (all.indirect): Added gjavah$(exeext).
(gjavah$(exeext)): Added $(exeext).
(clean): Likewise.
1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class): Call to java_layout_parsed_class replace
by safe_layout_class.
* expr.c (build_java_array_length_access): Removed static storage
class in the function definition.
(build_java_arraynull_check): Likewise.
Also fixed typos in two comments.
* lex.c (java_init_lex): Initialize static global kw_length.
(java_lex): Use BUILD_OPERATOR on RETURN_TK.
* lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
java_lex_error.
(JAVA_INTEGRAL_RANGE_ERROR): Likewise.
* parse.h (resolve_no_layout): New static function declaration.
(get_identifier_in_static): Declaration removed.
(java_layout_parsed_class): Function name declaration changed to
safe_layout_class.
(build_newarray_node, patch_newarray, resolve_type_during_patch,
not_initialized_as_it_should_p, build_this): New static function
declarations.
(pushdecl_force_head, build_java_binop, int_fits_type_p,
binary_numeric_promotion, stabilize_reference,
build_decl_no_layout, build_java_arrayaccess): Extern function
declarations moved into their own section.
(build_newarray, build_anewarray, build_java_array_length_access,
build_java_arraynull_check): New extern function declarations.
(UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
(JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
fake tree codes.
(CALL_CONSTRUCTOR_P): New macro.
* parse.y (kw_length): New static global tree node.
(return_statement): Tagged <node>.
(RETURN_TK): Tagged <operator>.
(variable_declarator_id:): Build variable declaration with an
empty initialization value if a syntax error was found in the
initialization part of the variable declaration.
(statement_without_trailing_substatement:): return_statement: now
uses the default rule.
(return_statement:): Temporarily fixed to return NULL_TREE.
(primary_no_new_array:): Call build_this when THIS_TK was parsed.
(class_instance_creation_expression:): Class creation rules now
call build_method_invocation upon reduction.
(array_creation_expression:): Rules call build_newarray_node upon
reduction.
(dim_exprs:): Build a list of dimension expressions.
(dim_expr:): Store location of the OSB_TK in the dimension
expression node.
(method_invocation:): Added a new error rule.
(build_unresolved_array_type): WFL argument may also be an array
on a primitive type. Name of the argument changed to reflect this.
(method_declarator): Insert argument type at the beginning of the
argument type list and later reverse the list.
(unresolved_type_p): Argument 'returned' may be optionally
NULL_TREE.
(java_layout_class_from_source): Function renamed
safe_layout_class.
(resolve_and_layout): Now call resolve_no_layout and
safe_layout_class.
(resolve_no_layout): New function.
(purify_type_name): New function.
(complete_class_report_errors): Call purify_type_name during error
report on a type not found.
(process_imports): error_found local variable doesn't need to be
initialized to zero.
(declare_local_variables): New local type_wfl. Fixed typo in error
message. type_wfl assigned to unresolved type and used to register
incomplete type. Build a WFL around the variable initialization
statement so that debug info can be generated on it.
(source_start_java_method): Reverse argument list after they've
been processed.
(current_this): New static global variable.
(java_complete_expand_methods): Set current_this when appropriate.
(resolve_expression_name): Build correct static and non static
field access bearing a simple name.
(resolve_field_access): Resolve the length field of arrays. Handle
f.m() cases.
(patch_method_invocation_stmt): Set the type of the method
invocation to error_mark_node. This value is later overridden by a
valid type, if any. Don't handle qualified constructor invocation
as qualified method invocation. Call lookup_method_invoke with its
new flag. It's no longer necessary to access the selected method
as the value of a tree list. Handle constructor invocation.
(patch_invoke): Reverse argument list when invoking non interface
methods. Insert call to new as the first argument of the
constructor.
(invocation_mode): Return a INVOKE_STATIC is the invoked method is
defined within a final class. Return INVOKE_STATIC if the invoked
method is a constructor.
(lookup_method_invoke): New lc argument is a flag to indicate a
constructor lookup. Now handle constructor lookup. Choose the most
specific method in case several were matching the invocation
requirements. Return a method decl instead of a tree list featuring
one single method decl element.
(refine_accessible_methods_list): New lc flag argument to
indicate that a constructor is being looked up.
(not_initialized_as_it_should_p): New function.
(java_complete_tree): Now process fake tree codes
JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
save_expr on resolved function call arguments. Case on
UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
(patch_assignment): LHS can be a field access expression. When
dealing with reference, lhs_type is the promoted type of the
rhs_type, not the RHS. Use not_initialized_as_it_should_p where
applicable.
(operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
(patch_binop): Use not_initialized_as_it_should_p where
applicable.
(build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
(patch_unaryop): Likewise. And use not_initialized_as_it_should_p
where applicable.
(resolve_type_during_patch): New function.
(patch_cast): Call resolve_type_during_patch to resolve type and
report error accordingly.
(patch_array_ref): Use not_initialized_as_it_should_p where
applicable. Array base expression is saved before being
used. Promote the type of an array elements if it contains non
builtin types.
(build_newarray_node, patch_newarray, build_this): New functions.
1998-07-16 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
increment it in `for' statement.
(print_field_info): If number is inf or nan, don't print it.
(print_method_info): If method name is `delete', just ignore it.
(print_c_decl): Special-case jstringArray.
* gjavah.c (help): New function.
(no_argument): New function.
(usage): Changed text.
(main): Rewrote argument handling. Now handles -v, --help,
--version.
(version): New function.
(found_error): New global.
(main): Return found_error.
(generate_access): Set found_error.
(print_c_decl): Likewise.
1998-07-15 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_c_decl): Don't print "," when examining field.
Skip type name when looking at "[L" types.
(process_file): Now static.
(generate_access): Now returns int.
(last_access_generated): New global.
(process_file): Clear last_access_generated; make multiple passes
over the class.
(print_field_info): Just return if generate_access returns true.
(print_method_info): Likewise. Also, allow <init> functions to
pass through.
(print_c_decl): Added is_init argument. Print constructors
properly.
(print_cxx_classname): Use UTF8_GET to extract characters from
string.
(print_base_classname): New function.
(print_class_decls): New function.
(process_file): Use it.
(utf8_cmp): New function.
1998-07-13 Nick Clifton <nickc@cygnus.com>
* lang-options.h: Format changed to match changes in gcc/toplev.c
to implement a --help option.
1998-07-10 Brendan Kehoe <brendan@cygnus.com>
* decl.c (init_decl_processing): Revert change to dtable_type.
1998-07-09 Per Bothner <bothner@cygnus.com>
* java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
1998-07-08 Brendan Kehoe <brendan@cygnus.com>
* decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
* lang.c (lang_init): Default flag_exceptions to 1, without
checking to see if it's 2 first.
1998-07-08 Jeffrey A Law (law@cygnus.com)
* constants.c: Include "system.h".
* decl.c: Likewise.
* lang.c (flag_new_exceptions): Get via extern now.
(lang_init_options): New functions. Turn on flag_new_exceptions.
1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* lex.c (java_lex): Return 0 when we see an invalid character in
the input.
* lex.c (java_read_char): Specify extra argument when calling
java_lex_error.
(java_read_unicode, java_parse_end_comment,
java_parse_escape_sequence): Likewise,
(java_lex): Specify extra argument when calling
java_lex_error. Test that IDs are beginning with a legal character
for IDs. Handle invalid characters with an error message and a
call to java_lex_error.
(java_lex_error): Adjust column position by new argument
`forward'. Issue an error even if in the middle of reporting an
other error.
1998-07-07 Brendan Kehoe <brendan@cygnus.com>
* jcf-io.c (find_class): Zero out BUFFER before we use it, since
we don't explicitly put a null pointer when we're copying it.
1998-07-07 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_cxx_classname): New function.
(super_class_name): Likewise.
(print_super_fields): Removed.
(in_super): Removed.
(print_field_info): Never generate #defines.
(print_c_decl): Changed generated types to match JNI. No longer
print class name before method name.
(print_method_info): Print "static" before static methods.
Print "virtual" before non-final methods.
(usage): Use exit(1), not exit(-1).
(main): Likewise.
(print_field_info): Use %.17g to print a double.
(last_access): New globals.
(process_file): Initialize last_access.
(usage): Now static.
(ACC_VISIBILITY): New define.
(generate_access): New function.
(print_field_info): Call it.
(print_method_info): Likewise. Also, generate information for all
methods, not just native methods. Return void.
(print_c_decl): Return void.
(print_field_info): Return void.
1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Makefile.in (JAVABISONFLAGS): Specific flag for bison when
processing the jc1 grammar file. Prefix bison functions and
variables with java_.
(parse.c): Dependencies on parse.h and lex.h
* expr.c (build_java_arrayaccess): Function now global.
* java-tree.h: Comment reorganized to carry on previous
classification effort.
(RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
RESOLVE_TYPE_NAME_P): New flags on WFLs.
* jcf-parse.c (parse_source_file): java_parse_source_file renamed
java_parse (new prefix java_ generated by bison).
(java_layout_parsed_class, java_register_parsed_class): Function
call removed.
(yyparse): Removed unnecessary call to init_outgoing_cpool.
* lex.c (static tree wfl_op): Variable deleted.
(java_init_lex): Initialize kw_super and kw_this. Initialize more
ctxp fields to NULL_TREE.
(java_lex): No longer create WFL for operators. Filename caching
mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
created as STRING_CST and later expanded. Removed extra argument
to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
and SUPER.
(build_wfl_node): Removed code in comments.
* lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
store token and location data in the current bison token.
* parse.h: Removed pre-processor based symbol prefixes hack. Moved
static/extern function declaration at the beginning of the file.
(struct qualification): Data structure definition deleted.
(RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
(qualify_ambiguous_name): Function declaration modified. Function
now returns nothing.
(build_array_ref, patch_array_ref, make_qualified_name,
resolve_qualified_expression_name, maybe_generate_clinit,
resolve_field_access): New static function declarations.
(build_java_arrayaccess): New extern function declaration.
(enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
(CALL_EXPR_PRIMARY): Macro deleted.
(EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
(struct parser_ctxt): Field initialized_final
removed. non_static_initialized, static_initialized: New fields.
* parse.y (static tree kw_super, static tree kw_this): New global
static.
(%union): tree wfl field of operator member replaced by int
location. WFLs are non longer created for operators.
(OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
(qualified_name:): Now calls make_qualified_name to build the
identifier.
(type_declaration:): Consider generating <clinit> when class
parsing completed.
(variable_declarator:): Directly build an assignment node when the
variable is initialized when declared.
(this_or_super:): Build a WFL and set current location when THIS
or SUPER are parsed.
(expression_statement:): Wrap statement around a WFL.
(primary_no_new_array:): Fixed typo. Changed value returned by
THIS_TK because of its new type (temporary).
(dim_exprs:): Temporary fix because of OSB_TK's new type.
(field_access:): Build qualified name with SUPER.
(method_invocation:): Fixed returned value because of SUPER's new
type.
(array_access:): Use OSB_TK location information.
(post_increment_expression:, post_decrement_expression:,
unary_expression:, pre_increment_expression:,
pre_decrement_expression:, unary_expression_not_plus_minus:,
cast_expression:, multiplicative_expression:,
additive_expression:, shift_expression:, relational_expression:,
equality_expression:, and_expression:, exclusive_or_expression:,
inclusive_or_expression:, conditional_and_expression:,
conditional_or_expression:, assignment:): Use new location/token
information available on operators.
(create_class): Set super_decl_type to NULL_TREE when processing
java.lang.Object.
(register_fields): Field initialization is now a MODIFY_EXPR
node. Chain initialization code to the matching lists (according
to the field declaration modifiers).
(maybe_generate_clinit): New function.
(method_header): Don't set method's DECL_NAME to a WFL when adding
methods to java.lang.Object.
(resolve_and_layout): Now can return NULL_TREE if the type
resolution fails. Otherwise, return the class DECL instead of its
TYPE.
(check_method_redefinition): Don't patch method DECL_NAME if it
belongs to java.lang.Object.
(process_imports): Simply assign error_found to the value returned
by check_pkg_class_access.
(declare_local_variables): Don't use their init statements (if
any) when parsing error were previously found. Reuse MODIFY_EXPR
build during parsing as an init statement.
(java_method_add_stmt): Now return the current method body.
(java_layout_parsed_class, java_register_parsed_class): Functions
removed.
(java_complete_expand_methods): Initialize the constant pool on a
per class basis. Layout the classes before expanding their method
bodies. Don't try expand artificial constructor code if error were
found. Make the classes data and register them if no error were
found.
(java_complete_expand_method): Retrieve an artificial constructor
argument list before entering its body. Assign the top block to
the artificial constructor function body and set types of declared
blocks and compound statements to void. Walk method body if not an
artificial constructor.
(make_qualified_name, cut_identifier_in_qualified): New functions.
(resolve_expression_name): Fixed comments. Save/restore the
current class CLASS_LOADED_P flag value. Build non qualified
static field access and handle qualified expression names.
(resolve_field_access, resolve_qualified_expression_name): New
functions.
(patch_method_invocation_stmt): Use the new expression resolution
scheme, calling resolve_field_access when the function call is
resolved as an expression.
(qualify_ambiguous_name): Function rewritten to work on qualified
expression produced by make_qualified_name.
(java_complete_tree): Promote type when function's argument are
RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
the assignment to discover further errors if RHS is a expression
name that fails to evaluate. Declare LHS initialized even though
the assignment failed. Don't use the location variable and removed
extra argument in patch function calls. Now handle the ARRAY_REF
case and build internal string representation when STRING_CSTs are
walked.
(build_method_invocation): Don't wrap function call around a WFL.
(build_assignment): Likewise. Use the operator location
information.
(patch_assignment): Handle array access LHSs. Handle error
provenance, resulting in a better error report.
(build_binop): Use op_location from operator as binop location
information.
(build_unaryop, build_incdec, build_cast): Likewise.
(patch_binop): Extract location information from the node. Fixed
typo in error message.
(patch_unary_op): Extract location information from the node.
(build_array_ref, patch_array_ref): New functions.
1998-07-01 Tom Tromey <tromey@cygnus.com>
* expr.c (expand_java_INSTANCEOF): Changed calling convention to
match _Jv_IsInstanceOf.
* decl.c (init_decl_processing): Use _Jv_NewArray, not
soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
1998-06-30 Tom Tromey <tromey@cygnus.com>
* decl.c (init_decl_processing): Functions are now named
_Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
1998-06-29 Per Bothner <bothner@cygnus.com>
* java-tree.h (load_class): Add prototype.
* class.c (is_compiled_class): Add missing arg to load_class.
* expr.c (expand_java_NEW): Call load_class.
* parse.y (process_import): Removed bogus use of void return value.
1998-06-25 Per Bothner <bothner@cygnus.com>
* decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
Function name is "_Jv_Throw" instead of "soft_athrow".
* decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
Function name is "_Jv_AllocObject" instead of "soft_new".
Takes an extra parameter (object size).
* expr.c: Update calls.
1998-06-24 Per Bothner <bothner@cygnus.com>
* lex.c (java_get_line_col): Handle end-of-file.
* except.c (expand_end_java_handler): Handle null type (i.e. finally).
1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
* lang.c (lang_init): Make -fexceptions the default.
* except.c (maybe_start_try, maybe_end_try): Don't do anything if
exception handling is not turned on.
1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
* lang.c (flag_new_exceptions): Make this this default.
* decl.c (end_java_method): Call emit_handlers.
* except.c (method_init_exceptions): Set language code and version.
(expand_start_java_handler): Enable exception, and call
expand_eh_region_start.
(expand_end_java_handler): Enable exception, and set up catch blocks.
(emit_handlers): New routine to generate the saved handlers.
* java-except.h (emit_handlers): Add prototype.
1998-06-12 Per Bothner <bothner@cygnus.com>
We used to have three different representations of the constant pool:
the CPool structure, the tree_constant_pool, and the constructures
used to build the Class object (which may need class and string
constants) in compiled code. None were appropriate for compiling
to .class files, so I did a major overhaul.
First, the tree_constant_pool array was removed. Things were
modified to the CPool structure in the JCF could be used.
Second, a "capacity" field was added to the CPool, and functions
written to search for a matching constant, adding one if not found.
The code that generated the Class object was changed to use a CPool.
The actual TREE_LISTs used to build the CONSTRUCTORs used for
the static Class object are now only in build_constants_constructor.
Finally, I wrote code which can generate a .class file (including its
constant pool) from the RECORD_TYPE of a class. This is a big step
on the way to compiling Java source into .class files.
* jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
* Makefile.in (JAVA_OBJS): Added jcf-write.o.
* java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
(NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
(COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
(lang_type): Removed constant_pool field.
* jcf.h (CPool): Renamed size to count. Added field capacity.
(CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
* constants.c (current_constant_pool_tags, current_constant_pool_data,
current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
* constants.c (build_constants_constructor): Use new outgoing_cpool.
(set_constant_entry, find_constant1, find_constant2,
find_class_constant, count_constant_pool_bytes, write_constant_pool,
find_utf8_constant, find_class_or_string_constant): New functions.
* jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
(get_constant): Use current_jcf.cpool instead of tree_constant_pool.
(give_name_to_class, get_class_constant): Likewise.
* jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
(get_name_and_type_constant, get_ref_constant): Removed.
* parse.h (parser_ctxt): Remove field tree_constant_pool.
* parse.y: Don't save/restore tree_constant_pool.
* verify.c (verify_jvm_instructions): Update for new approach.
* expr.c (expand_invoke, expand_java_field_op): Likewise.
* lang-options.h: Added -femit-class-file, -femit-class-files.
* lang.c (flag_emit_class_files), java-tree.h: New flag.
(lang_f_options): Added "emit-class-file(s)".
* expr.c (build_java_arrayaccess): Generate more efficient array
bounds checking, by using unsigned compare.
* expr.c (expand_invoke): Re-arrange error checks to make more robust.
1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.h: New comment on the handling of unresolved type
identifiers. JDEPs are now part of the jdep_code enum.
(typedef struct jdep): Now use enum jdep_code or int, depending on
availability. Both are narrowed down to an 8 bits bitfield.
(CALL_EXPR_PRIMARY): Fixed comment.
1998-06-10 Tom Tromey <tromey@cygnus.com>
* Make-lang.in (java): Added gjavac and jvgenmain.
(java.start.encap): Depend on gjavac.
(java.rest.encap): Depend on jvgenmain.
* Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
(JAVA_CROSS_NAME): Likewise.
(java.all.build): Depend on jvgenmain and gjavac.
(java.all.cross): Depend on jvgenmain and gjavac-cross.
(jvgenmain$(exeext)): New target.
(java.install-common): Wrote.
* config-lang.in (compilers, stagestuff): Added gjavac and
jvgenmain.
1998-06-10 Dave Brolley <brolley@cygnus.com>
* lang.c (lang_decode_option): New argc/argv interface.
1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
* ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
* decl.c (build_decl_no_layout): New function.
* expr.c (java_lang_expand_expr): Layout declarations found in
blocks before they're pushed.
* jcf-parse.c (load_class): Save current line when parsing class
file.
(parse_source_file): Register class before expanding their
methods.
* lang.c (put_decl_node): Produce `null' when `void *' is
processed.
* lex.c (static tree wfl_op): New static global, for error report
on casts.
(java_init_lex): wfl_operator and wfl_op initialized
here. Filename caching added for wfl_op. Return wfl_op when `(' is
parsed.
* parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
build_unresolved_array_type): New static function definitions.
(build_decl_no_layout): New extern function declared.
(OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
faulty modifier exists.
(TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
(ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
(UNARY_PLUS_EXPR): New fake operator.
(struct parser_ctxt): New field osb_number.
* parse.y (static tree wfl_operator): New static WFL for operator
bound error messages.
(DECR_TK, INCR_TK): Moved.
(OP_TK): Tagged <operator>.
(array_type:): Now call build_unresolved_array_type.
(dim_expr:): Count the number of '[' seen.
(post_increment_expression, post_decrement_expression,
pre_increment_expression, pre_decrement_expression,
unary_expression_not_plus_minus, unary_expression:): Actions are
now building the corresponding unary expressions.
(cast_expression:): Actions are now building cast expressions.
(build_unresolved_array_type): New function.
(create_interface): Reset the number of declared interfaces.
(create_class): Likewise.
(method_header): Methods declared within the scope of an interface
are now implicitly set public and abstract.
(java_complete_class): Variable's and parameter's type are patched
with a promoted type.
(declare_local_variables): Resolved non builtin types are promoted
before being used to build a variable decl. Removed type patch
posted on variable initialization statement.
(source_start_java_method): Use build_decl_no_layout to build the
decl of a parameter of incomplete type.
(java_register_parsed_class): Process interfaces too. Call
rest_of_decl_compilation on each processed class declarations.
(java_complete_expand_methods): Don't attempt to expand things in
interfaces.
(java_complete_tree): Process CONVERT_EXPR, even though it always
has a type. Propagate error_mark_node to node's type too. Promote
method's call argument type and return error_mark_node if
argument's completion didn't work. MODIFY_EXPR can have a WFL as a
RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
handle unary operator nodes.
(build_assignment): Added comment.
(print_int_node): New function.
(patch_assignment): New second argument. New error handling. Use
print_int_node. Handle references. Use can_cast_to_p to issue
different error message according to the context and check upon
the initialization of the RHS.
(can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
(operator_string): Handle more operators.
(patch_binop): No longer use a function static
wfl_operator. Improved error message on shift distance.
(build_unaryop, build_incdec, build_cast, patch_unaryop,
patch_cast): New functions.
1998-06-05 Per Bothner <bothner@cygnus.com>
* jvspec.c: New file.
* Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
* java-tree.h (identifier_subst): Add declaration.
1998-06-04 Tom Tromey <tromey@cygnus.com>
* jvgenmain.c (main): Generate call to JvRunMain.
* class.c (make_class_data): Push value for "sync_info" field.
* decl.c (init_decl_processing): Push "sync_info" field.
1998-06-03 Per Bothner <bothner@cygnus.com>
* typeck.c (build_java_array_type): Set TYPE_NAME to actual
Java (source) name, not signature.
Set TYPE_ALIGN to (at least) that of element_type.
1998-06-02 Per Bothner <bothner@cygnus.com>
* class.c: Moved classname-mangling-rekated code to ...
* mangle.c: ... this new file.
* jvgenmain.c: New program (needs mangle.c) to generate main program.
* Makefile.in: Update for above changes.
1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (truthvalue_conversion): Convert integer and floating
point value to their truth value.
* lex.c (java_lex): Handle the `null' literal.
* parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
(ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
New macros.
* parse.y: Reorganization/documentation on token declaration.
(binop_lookup[]): New added new tree codes.
(relational_expression): Build corresponding binary operators.
(equality_expression, conditional_and_expression,
conditional_or_expression): Likewise.
(java_complete_class): Fix crash in debug message.
(java_complete_tree): Check initialization of method call
arguments. Further bogus node evaluation to detect more error
during assignments. Handles more binary operators.
(patch_assignment): Use DECL_P.
(build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
code.
(operator_string): Handle more case. Compacted source.
(patch_binop): Changed function comment. Checking for
uninitialized first operand takes the compound assignment into
account and uses DECL_P. Checking for uninitialized second operand
delayed to routine's end. Use macros to issue type bound error
messages and issue messages on both operands if their types are
different. Force fixed type into node. Handle all binary
operators.
1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
* lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
build operator node and return tokens.
* lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
* parse.h (java_complete_tree): Changed returned type in prototype.
(build_method_invocation, build_assignment, patch_assignment,
patch_binop): New static function declarations.
(JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
BUILD_EXPR_WFL): New macros.
* parse.y (enum tree_code binop_lookup[]): New static for token to
TREE_CODE lookup.
(%union): Parser union has new sub-structure `operator'.
(ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
ASSIGN_ANY_TK): Tokens tagged `operator'.
(EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
(assignment_operator:): Rule tagged `operator'.
(expression_statement:): Re-installed default rule.
(method_invocation:): Sub rules call build_method_invocation.
(postfix_expression:): Don't attempt to resolve name here. Just
return an ID.
(multiplicative_expression:): Sub-rules build corresponding binop
expression node.
(additive_expression:, shift_expression:, and_expression:,
exclusive_or_expression:, inclusive_or_expression:): Likewise.
(assignment:): Sub rule invoke build_assignment.
(assignment_operator:): Default rules on sub rules.
(force_error): Added documentation on this variable.
(declare_local_variables): Build initialization calling
build_assignment.
(expand_start_java_method): Removed unused rtx declaration. Mark
arguments as already initialized.
(java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
(java_complete_expand_methods): Don't process next method if
completion of the previous one triggered errors.
(java_complete_expand_method): Call source_end_java_method if no
error were found during completion.
(resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
locals declaratilon. Handle names found within a class. Return
error_mark_node when things aren't found.
(patch_method_invocation_stmt): Return error_mark_node on failures.
(patch_invoke): Removed unused local. Return the correct node.
(java_complete_tree): Now returns a value. The BLOCK section binds
local identifiers and the type of a BLOCK is now void. Assign the
result of operand completion on COMPOUND_EXPR. Assign the
encapsulated node of a WFL to the result of its completion, except
when the node is an identifier. Now handle MODIFY_EXPR and several
binary operators. Return error_mark_node on errors.
(build_method_invocation, build_assignment, patch_assignment,
build_binop, operator_string, patch_binop): New functions.
* typeck.c (binary_numeric_promotion): New function.
1998-05-21 Per Bothner <bothner@cygnus.com>
* class.c (identifier_subst): New convenience wrapper for ident_subst.
Replace most uses of ident_subst by identifier_subst.
* class.c (push_class_static_dummy_field): Removed function.
(build_class_ref): Find Class object decl by looking up "CNAME.class",
instead of looking got "class" static field. Create that decl here.
(class_identifier_node): Removed; no longer needed.
(init_class_processing): Don't init class_identifier_node.
* jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
Do nreverse 0 times (instead of twice) for Object and Class.
* parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
1998-05-20 Per Bothner <bothner@cygnus.com>
* jcf-parse.c (parse_class-file): Set lino to smallest line number,
while initializing linenumber_count and linenumber_table.
Do it before init_function_start (which calls emit_line_note).
* expr.c (expand_byte_code): Don't need to clear lineno here.
1998-05-18 Tom Tromey <tromey@cygnus.com>
* class.c (append_gpp_mangled_type): If `qualifications' is >=9,
then mangle number as _N_.
* class.c (mangle_class_field): New function.
(build_class_ref): Set assembler name of class reference using
mangle_class_field.
(push_class_static_dummy_field): Likewise.
1998-05-17 Michael Tiemann <tiemann@cygnus.com>
* parse.y (source_start_java_method): Use TREE_SET_CODE instead
of assigning to TREE_CODE. The latter method exploits a feature
of GCC that is not ANSI compliant.
1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (pushdecl_force_head): New function.
(pushlevel): Removed conditional printf.
(complete_start_java_method): Don't enter local variable scope if
function is compiled from source code.
* expr.c: parse.h now included
(java_lang_expand_expr): New function.
* jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
printf. Terminate buffer when doing directories.
* jcf-parse.c (parse_source_file): Call lang_init_source before
parsing and before code generation.
* jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
use printf if the macro is defined.
* lang.c (lang_init): Install lang_expand_expr hook on
java_lang_expand_expr.
(java_dummy_print): New function.
(lang_init_source): New function.
* lex.c (java_lex): Remember location of an opening brace at the
second nesting level.
(java_is_eol): Unget character seen after a CR if it is EOF.
* parse.h: Now includes lex.h
(SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
printf if the macro is defined.
(expand_start_java_method, build_expr_block, enter_block,
exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
New static function declarations.
(pushdecl_force_head): New extern function declaration.
(INCOMPLETE_TYPE_P): New macro.
(JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
(BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
BLOCK_EXPR_ORIGIN): New macros.
(DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
DECL_SOURCE_LINE_LAST): New macros.
(struct parser_ctxt): Removed field current_method_decl, redundant
with the field current_function_decl. Added fields
first_ccb_indent1 and pending_block.
* parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
tagged <node>
(SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
(compilation_unit:): Cosmetic on sub rule.
(type_declaration:): Cosmetic on sub rules. Added an error rule.
(variable_initializer:): Installed default rule on expression:.
(method_declaration:): method_header: starts a new
method. method_body: installs the function body, absorbs blocks
emitted for temporary variable scopings, pops function's body block
and merges function's last statement lineno in DECL_SOURCE_LINE.
(method_body:): Installed default rules.
(block:): Call enter_block when an opening brace is seen. Absorb
scoping blocks and call exit_block when a closing brace is seen.
(block_statement:): Cosmetic changes.
(method_invocation:): Create WFL around CALL_EXPR node.
(patch_stage): Added comment around definition.
(method_header): Try to use first_ccb_indent1 as the first line of
the method, so BP debug info are emitted at the first opening
brace of the function. If the function has no body, use the
location of the function's name. Override currently defined method
name with the matching WFL so we can point redefinition errors
using the location where the function's name was declared.
(check_abstract_method_header): Interprets DECL_NAME as an
identifier or as a WFL, accordingly.
(java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
(check_method_redefinition): Use DECL_NAME as a WFL. Extract
location and name information out of it and reinstall DECL_NAME to
its original identifier node value.
(lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
function's source code).
(read_import_dir): Test the value returned by find_class and issue
a fatal accordingly.
(declare_local_variables): Push a new block for the scope of the
new variable(s) if code has been already generated at that nesting
level. Pinpoint redefinition errors using the variable id
WFLs. Generate initialization code if necessary. If the variable
type is incomplete, register a patch on its decl.
(source_start_java_method): Rewritten. Define a new block for the
function's parameters. Build parameter decl out of function's
arguments and register them for a patch if their types are
incomplete.
(expand_start_java_method): Includes the part of
source_start_java_method that was pushing the parameter decls and
completing the method start code.
(source_end_java_method): Removed call the expand_end_bindings and
poplevel (already taken care of). Reinstall function's arguments
and get function's last line of code before calling
expand_function_end.
(java_method_add_stmt): New comment before the function's
code. Complement the second operand of the current COMPOUND_EXPR
if necessary.
(java_complete_expand_methods): Don't generate debug info on line
zero when expanding a generated constructor.
(java_complete_expand_method): Set start and end line numbers for
a artificially generated constructor to one and manually call
enter_block and exit_block when defining it. For all methods:
expand function's start calling the new expand_start_java_method
and invoke java_complete_tree on the effective method's body, if
any.
(resolve_expression_name): Now use lookup_name_in_blocks to search
local variable decls and print out an error when variables are
undefined.
(patch_method_invocation_stmt): Inserted comment before the
function's code.
(lookup_method_invoke): Chain method's arguments using chainon
with the current arg list as a second argument. Inserted missing
IDENTIFIER_POINTER when reporting an error on methods not found.
(refine_accessible_methods_list): Don't retain constructors.
(patch_arguments): Function removed.
(java_complete_tree): Inserted comment before the function's
code. New case for BLOCKs. Moved the WFL case a bit
further. Complete function's arguments.
(build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
maybe_absorb_scoping_blocks): New functions.
1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
previously set.
* jcf-parse.c (parse_source_file, java_error_count): New forward
and extern declarations.
(java_parse_abort_on_error): Macro moved.
(jcf_parse_source): fatal called if fopen fails. Now calls
parse_source_file.
(parse_source_file): New parse_only parameter. Reflects the
elimination of the second pass.
(yyparse): parse_source_file called with argument set to 0.
* jcf.h (JCF_ZERO): Sets java_source to zero.
* lex.c (java_init_lex): pass argument is gone. Function modified
to be called once during the analysis of a file.
(java_unget_unicode): Fixed typo in fatal message.
(java_get_line_col): Likewise.
(java_lval): Likewise. String literals no longer built during
second pass.
* lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
account.
* parse.h (MODIFIER_WFL): New macro.
(parse_check_super, parser_check_super_interface): Now return int.
(parser_chain_incomplete_item, not_builtin_p,
complete_method_decl): Declarations removed.
(build_method_invocation_stmt, build_invoke): Renamed using the
`patch' instead of `build'
(register-incomplete_type, obtain_incomplete_type,
java_complete_tree, java_complete_expand_method,
unresolved_type_p, create_jdep_list): New function declarations.
(IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
(jdep): New typedef on new struct _jdep.
(JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
JDEP_RESOLVED_P): New macros.
(JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
JDEP_VARIABLE): New enum values and jdep kinds.
(jdeplist): New typedef on struct _jdeplist.
(CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
macros.
(CALL_EXPR_PRIMARY): New macro.
(struct parser_ctxt): Fields java_pass, current_method_decl,
method_decl_list deleted. New field jdeplist.
(INCOMPLETE_P): Macro deleted.
* parse.y (single_type_import_declaration:): Removed pass switch.
(type_import_on_demand_declaration): Likewise.
(field_declaration:): Removed pass switch on all sub rules.
(class_declaration:): Call the complete_class_decl removed on
class_body rules.
(method_declaration:): Removed second pass switch. No longer chain
methods decl when method_header reduced.
(method_header:): Sub rules no longer depend on pass switch.
(method_declarator:): Likewise.
(method_body:): Likewise.
(abstract_method_declaration:): Likewise.
(block_statement:): Likewise.
(local_variable_declaration:): Likewise.
(argument_list:): Likewise.
(method_invocation:): Likewise. Call to build_method_invocation_stmt
removed. Partial CLASS_EXPR tree node built instead.
(postfix_expression:): Removed pass switch on all sub rules.
(java_pop_parser_context): Free classd_list content.
(yyerror): Call obstrack_grow0 to finalize error message.
(check_class_interface_creation): Comment modified to reflect new
returned value meaning. Removed second pass switch. Return 1 if an
error was found, 0 otherwise. Adjust pointer on filename if a
leading path separator was found.
(maybe_create_class_interface_decl): Removed first pass switch
when linking the class decl to the class_list. Install a new
jdep_list for the class.
(add_superinterfaces): List of unresolved interfaces is
gone. Unresolved interfaces are directly added to the current
dependencies list.
(create_interface): Second pass shortcut removed.
ctpx->modifier_ctx access through MODIFIER_WFL.
(create_class): Second pass shortcut removed. Call to
register_incomplete_type replaces the call to
parser_chain_incomplete_item.
(complete_class_decl): Function removed.
(duplicate_declaration_error): New way of retrieving redeclared
item type.
(register_fields): Call to lookup_modifier_cl replaced by
MODIFIER_WFL. New way of handling unresolved type, using
unresolved_type_p and obtain_incomplete_type.
register_incomplete_type replaces call to parser_chain_incomplete_item.
(patch_stage): New static global variable.
(method_header): New way of handling unresolved type, using
unresolved_type_p and obtain_incomplete_type. patch_stage used to
indicates that the method decl needs to be patched.
(check_abstract_method_header): Call to lookup_modifier_cl
replaced by MODIFIER_WFL.
(method_declarator): Incomplete argument type are registered
calling register_incomplete_type. Patch on the declared method is
issued in that case.
(unresolved_type_p): New function.
(parser_check_super_interface): New comment to reflect function's
modified returned type (int). Function and has a new argument
this_wfl. Call to parse_error_context uses this_wfl instead of
relying on lookup_cl.
(parser_check_super): Comment reflects function's new returned
type (int). Function returns nonzero value on error.
(create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
register_incomplete_type, jdep_resolve_class): New functions to
handle incomplete types in declarations.
(java_complete_class): Rewritten to work with the new incomplete
type handling scheme.
(complete_class_report_errors): Likewise.
(complete_method_decl): Removed: it jobs is now handled by
java_complete_class.
(do_resolve_class): Class loaded in not already loaded and not
found in Java source code.
(java_check_regular_methods, java_check_abstract_methods): Don't
call complete_method_decl anymore.
(lookup_modifier_cl, not_builtin_p): Functions deleted.
(read_import_dir): Got rid of the pass number dependency.
(declare_local_variables): New handling of unresolved types (patch
issued).
(source_start_java_method): New parameter level. Function called
with level set to 1 when argument types are potentially
unresolved. Called to complete the job with level set to 2 once
types are complete.
(source_end_java_method): Call to permanent_allocation
removed. Waiting to be replaced by a more suitable obstack
management.
(java_complete_expand_methods, java_complete_expand_method,
java_expand_finals): New functions.
(build_method_invocation_stmt): Renamed
patch_method_invocation_stmt. Extracts function call expression
(wfl) and arguments (args) from CALL_EXPR tree operands.
(build_invoke): Renamed patch_invoke. Fixed typo in fatal
call. Patch the function and argument operand of the CALL_EXPR
tree argument.
(patch_argument, java_complete_tree): New functions.
1998-04-20 Per Bothner <bothner@cygnus.com>
Recover from missing fields and methods (i.e. error instead of fatal).
* decl.c, java-tree.h (TYPE_identifier_node): New global constant.
* expr.c (expand_invoke): Recover from missing method.
(expand_java_field_op): Recover from missing field.
Inline references to java.lang.{Integer,Char,...}.TYPE.
* typeck.c (get_type_from_signature), java-tree.h: New function.
* class.c (add_method): Use get_type_from_signature.
(build_class_ref): Handle a class that was not found.
* typeck.c (convert): Handle conversion to pointers (for convenience).
* verify.c (verify_jvm_instructions): Use get_type_from_signature
instead of lookup_field to handle missing fields.
* jcf-parse.c (process_zip_dir): Set java_source.
1998-04-20 Brendan Kehoe <brendan@cygnus.com>
* jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (load_class): Don't change input_filename before
calling jcf_parse_source (but still do it before calling
jcf_parse).
(jcf_parse_source): Assign input_filename after having saved the
parser context.
* lex.c (java_init_lex): Chain a WFL node to the import on demand
list. ctxp->modifier_ctx zeroed according to its new
definition. ctxp->filename initialized. Removed
JAVA_MODIFIER_CTX_UNMARK.
(java_unget_unicode): Update the character based column position.
(java_allocate_new_line): ref_count not used anymore. Always free
ctxp->p_line. Initialize c_line->char_col to 0.
(java_get_unicode): Update the character based column position.
(java_lex): Use ctxp->elc to store current position in source
file, at the beginning of the parsed token. Set modifier_ctx entry
corresponding to the parse modifier to a WFL node. Return a WFL
node when an identifier is parsed.
(java_lex_error): Now uses ctxp->elc to store current position in
source.
(build_wfl_node, java_is_eol, java_get_line_col): New functions.
* lex.h (build_wfl_node): New function definitions.
(struct java_line): ref_count and next fields are gone. New field
char_col.
(JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
(JAVA_COLUMN_DELTA): New macro.
(java_lc): New typedef on new struct _java_lc.
* parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
(parse_error_context, parse_warning_context): Changed prototypes.
(java_get_line_col): Added as an available global function.
(JAVA_MODIFIER_CTX_UNMARK): Macro removed.
(IC_DECL): Replaced by macro IC_TYPE
(DEPEND_WFL): New macro.
(THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
wrong modifier.
(exit_java_complete_class): Removed a commented out statement.
(struct parser_ctxt): Added comments on fields. modifier_ctx is
now an array of tree nodes. Deleted fields line_list and
e_line. New field elc, to replace e_line.
* parse.y (array_type:): Build WFL node.
(qualified_name:): Build a single WFL node out of two. Retain
the location information of the first node in the resulting node.
(package_declaration:): Use package name as a WFL node
(single_type_import_declaration:): Use imported name as a WFL node.
(type_import_on_demand_declaration:): Use root of the imported
packages as a WFL node.
(field_declaration:): Removed unused local variable cl.
(method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
(yyerror): New static elc. Removed static error_line, error_pos.
New local code_from_source. Save ctxp->elc into elc at the first
pass. Call java_get_line_col to get a string of the line where
the error occurred.
(debug_line): Removed static function.
(parse_error_context, parse_warning_context): Parameter cl is now
a WFL node. Use its value to initialize ctxp->elc.
(redefinition_error): Parameter cl is now a WFL node.
(parse_add_interface): New parameter wfl. No longer call
lookup_cl, use wfl instead.
(check_class_interface_creation): Parameter cl is now a WFL node.
(maybe_create_class_interface_decl): Likewise.
(add_superinterfaces): New function.
(create_interface): Removed local cl, node, super_decl,
super_decl_type. Function now uses id as a WFL node. Better
warning/error report on obsolete or forbidden mix of
modifiers. Now calls add_superinterfaces to register interfaces.
(create_class): Removed local cl, node. Local variable id is used
as a WFL node. Better error report on forbidden modifier
mix. Uses add_superinterfaces to register interfaces.
(find_field): Argument cl is now a WFL node. Now store the WFL
node of a fields that needs to be checked for their
initialization.
(method_header): Local variable node non longer used. Local
variable id replaces cl.
(check_modifiers_consistency): Local variable cl is now a WFL
node.
(method_declarator): Local variable cl replaced by parameter id.
(parser_qualified_name): Now uses parameter name as a WFL node.
(parser_check_super_interface): New parameter wfl, for achieve
greater accuracy during error reports.
(parser_chain_incomplete_item): New parameter named location. Used,
along the decl, to construct the incomplete item node.
(java_complete_class): resolve_class now uses WFL node extracted
from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
where appropriate.
(complete_method_decl): Unresolved function's argument types are WFL.
(resolve_class): Parameter cl is now a WFL node.
(resolve_and_layout): Likewise.
(do_resolve_class): Likewise. Try first to use cl and then do the
lookup on the decl when calling check_pkg_class_access.
(complete_class_report_errors): Use IC_TYPE in place of
TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
instead of doing a lookup over the decl.
(java_check_final): Use WFL info from field tree list.
(lookup_cl): Rewritten and returns a statically defined WFL node.
(lookup_modifier_cl): Now uses information from WFL nodes.
(process_imports): Likewise.
(read_import_dir): name and cl arguments replaced by a single WFL
node. Function modified accordingly.
(find_in_imports_on_demand): Now uses WFL node.
(check_pkg_class_access): cl argument is now a WFL node.
(declare_local_variables): Fixed to use WFL nodes.
(resolve_expression_name): Likewise.
(build_method_invocation_stmt): name_combo argument renamed
wfl. Function modified to use WFL nodes.
(build_invoke): cl used as a WFL node when calling build_expr_wfl.
(lookup_method_invoke): cl is now a WFL node. Added missing
IDENTIFIER_POINTER to class type decl name.
1998-04-14 Dave Brolley <brolley@cygnus.com>
* lang.c (init_parse): Now returns char* containing the filename.
1998-04-10 Per Bothner <bothner@cygnus.com>
* class.c (layout_class): Mangle repeated arg types to match cc1plus.
* decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
* class.c (make_class_data): If flag_assume_compiled, initial class
state is CSTATE_PREPARED; make superclass and interfaces direct
references, rather than constant pool indexes.
1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parser.y: Include flags.h. Removed debug variable pl.
(method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
(block:): Likewise.
(labeled_statement_nsi:): Generate debug info when reducing
expression_statement:.
(check_pkg_class_access): get_access_flags_from_decl invocation
fixed for new CLASS_* flags location.
(source_end_java_method): Save/restore parser context when
entering/leaving this routine. Restore lineno to its right value
before calling expand_end_bindings.
(build_method_invocation_stmt): build_invoke called with the
current line information.
(build_invoke): New argument cl. Wrap the function call around a
wfl node.
(refine_accessible_methods_list): Changed comment, removed
unnecessary code.
* parse.h: Fixed typo in comments.
(CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
(JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
(struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
parser_ccb_indent.
* lex.c (java_lex): Record the last closing curly bracket of a
function.
* jcf-parse.c (jcf_parse_source): Now calls
java_check_methods. Clarified comment, fixed typo.
1998-04-09 Dave Brolley <brolley@cygnus.com>
* lang.c (init_parse): Expose for non USE_CPPLIB builds.
(finish_parse): Expose for non USE_CPPLIB builds.
1998-04-08 Jeffrey A Law (law@cygnus.com)
* lang.c (lang_print_xnode): New function.
1998-04-03 Per Bothner <bothner@cygnus.com>
* decl.c (class_dtable_decl), java-tree.h: New tree node.
* class.c (get_dispatch_vector, get_dispatch_table): New functions
used to build a class's dispatch table.
(make_class_data): Generate dispatch table if flag_assume_compiled.
Set dtable of class object to address of class_dtable_decl.
* decl.c (int_decl_processing): Make soft_badarrayindex_node
be volatile and have side effects - generates better code.
* class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
* expr.c (expand_invoke): If class is final, method is
effectively final, so can call it directly.
* java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
* Makefile.in, Make-lang.in: Add missing $(exeext)s.
1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (build_method_invocation_stmt): Removed extra argument
to build_invoke.
1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (dtable_indent): Now static global.
(expand_invoke): Now call invoke_build_dtable and
build_invokevirtual.
(invoke_build_dtable, build_invokevirtual): New functions.
* jcf-io.c (find_class): Defer issuing a warning by setting
jcf->outofsynch to 1.
* jcf-parse.c (jcf_out_of_synch): New function.
(load_class): Test this_jcf.outofsynch flag and call
jcf_out_of_synch accordingly.
* jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
comment indentation.
* lex.c (java_get_unicode): Fixed code indentation.
(java_lex): Create string literal. Fixed typo. Removed several
premature obstack_free.
* parse.h: New enums for name resolution and invocation mode.
(struct qualification): New data structure.
(RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
(do_resolve_class, build_method_invocation_stmt,
breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
debug_line, identical_subpath_p, invocation_mode,
refine_accessible_methods_list, build_invoke,
lookup_method_invoke): New functions declared.
(build_invokevirtual, invoke_build_dtable, match_java_method,
build_field_ref, jcf_out_of_synch): New references to external
functions.
(struct parse_ctxt): Removed artificial_constructor field.
* parse.y: (array_type:): Type defined for this rule.
(class_type:): Installed default rule for interface_type:.
(array_type:): Now build Java array type.
(qualified_name:): Now use obstack_grow0.
(method_declaration:): Skip the artificial constructor added to
the list, if any.
(abstract_method_declaration:): Execute the code only during pass 1.
(block:): Installed default rule in block_statements:.
(block_statement:): Add the statement to the method during pass 2.
(statement_expression): Installed default rule for
method_invocation:.
(argument_list:): Added code to build the argument list.
(method_invocation:): Added call to create the method invocation
node.
(yyerror): Now use obstack_grow0. Removed bogus obstack_free.
(debug_line): New function for debug.
(complete_class_decl): No longer do something during pass 1.
(method_header): Use BUILD_PTR_FROM_NAME.
(parser_qualified_classname): Use obstack_grow0. Removed bogus
obstack_free.
(parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
function's main comment.
(java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
classes.
(complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
(resolve_class): Now works with arrays.
(do_resolve_class, resolve_and_layout): New functions.
(java_check_regular_methods): Reverse method list before and after
having processed it. No longer set ctxp->artificial_constructor.
(read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
accordingly. Fixed typo in issued error message. Now use
obstack_grow0.
(find_in_imports_on_demand): Now use obstack_grow0.
(declare_local_variables): Use BUILD_PTR_FROM_NAME.
(source_end_java_method): Call expand_expr_stmt instead of
expand_expr. Calls it before calling expand_function_end.
(java_method_add_stmt): Do nothing if errors were found during
parsing.
(java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
(build_method_invocation_stmt, build_invoke, invocation_mode,
lookup_method_invoke, refine_accessible_methods_list,
qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
New functions.
* typeck.c (build_java_signature): Properly end method signature
if return type skipped.
(match_java_method): New function.
1998-03-16 Per Bothner <bothner@cygnus.com>
* jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (build_invoke_non_interface): New function.
(methods_ident, ncode_ident): Now static globals.
(expand_invoke): Use build_invoke_non_interface.
* java-tree.h (struct lang_decl): New field function_decl_body.
(DECL_FUNCTION_BODY): New macro.
* jcf-parse.c (jcf_parse_source): Deeper check before setting
CLASS_FROM_SOURCE_P.
(parse_source_file): Fixed typos. Call java_layout_parsed_class
before starting pass 2. Call to java_generate_parsed_class replaced
by java_register_parsed_class.
* lex.c: Fixed typo in header. Some line width related formating.
* lex.h: Some line width related formating.
* parse.h (source_end_java_method, resolve_expression_name,
complete_class_decl, maybe_create_class_interface_decl,
check_class_interface_creation): New static function declarations.
(java_layout_parsed_class, java_method_add_stmt): New function
declarations.
(struct parser_ctxt): Field mark_class_generate removed. New
fields class_list and artificial_constructor.
* parse.y: Fixed typo in header.
(class_declaration:): Call complete_class_decl when class body
parsed.
(method_declaration:): Call source_end_java_method in pass 2 when
the method body is defined.
(postfix_expression:): Do expression name resolution on sub-rule
name during pass 2.
(create_class, create_interface): Merged common pieces.
(check_class_interface_creation, maybe_create_class_interface_decl):
New functions.
(complete_class_decl): New function.
(register_fields): Fixed line width related typo.
(method_header): Correctly skip first argument when fixing
argument line. Changed the loop.
(java_check_circular_reference): Now use ctxp->class_list.
(java_complete_class): Removed start/stop marking.
(java_check_regular_methods): Now takes a class decl as an
argument. Add default constructor if none were encountered.
(java_check_methods): Now use ctxp->class_list. Changed call to
java_check_regular_methods.
(source_start_java_method): Set DECL_ARG_TYPE for each function
arguments.
(source_end_java_method, java_method_add_stmt): New functions.
(java_generate_parsed_class): No longer exists.
(java_layout_parsed_class, java_register_parsed_class): New functions.
(resolve_expression_name): New function.
1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c: (parse_source_file): Check on errors after init lex.
* lex.c: (java_init_lex): Defer ctxp->java_pass initialization
until pass initializations are done. Call read_import_dir with
pass set to 0.
* parse.h: (lookup_modifier_cl): New function declared.
(INTERFACE_FIELD_MODIFIERS): New macro.
(OBSOLETE_MODIFIER_WARNING): New macro.
* parse.y: (register_fields): Class type and current field name in
local variables. Check modifier(s) if adding field(s) to an interface.
(check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
and report errors using the faulty modifier line context.
(lookup_modifier_cl): New function.
(read_import_dir): Detect and report default import processing
failure.
1998-02-11 Brendan Kehoe <brendan@cygnus.com>
Add a pair of -fassume-compiled/-fno-assume-compiled options.
* class.c (is_compiled_class): Return 1 after making sure it
qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
* lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
* java-tree.h (flag_assume_compiled): Add decl.
* lang.c (lang_f_options): Add the flag.
(flag_assume_compiled): Add decl, default to 0.
1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (class_depth): Call to load_class uses extra VERBOSE arg.
(is_compiled_class): Likewise.
(layout_class): Likewise.
(layout_class): Detect and lay out classes defined in source code.
(interface_of_p, add_interface_do, may_add_interface): New
function.
(add_interface): Now use add_interface_do.
(add_method_1): New function.
(add_method): Now use add_method_1.
(pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
(complete_start_java_method): New function.
(start_java_mehod): Now call complete_start_java_method.
* expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
(expand_invoke): Likewise and fixed typo.
*gjava.c: (print_super_field): Use new argument to find_class
DO_CLASS_FILE.
(main): Likewise.
*java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
(IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
IDENTIFIER_NODE.
(CLASS_COMPLETE_P): New flag on TYPE_DECL.
(add_method_1, push_class): New prototypes.
*jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
*jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
directory where the class was found.
(find_class): New argument DO_CLASS_FILE. Function find_class
modified accordingly.
*jcf-parse.c: (fix_class_path): New function.
(load_class): Use new VERBOSE argument. load_class now finds and
loads/parses .class/.java files. Save read_state of current_jcf
if necessary.
(java_parser_abort_on_error): New macro.
(jcf_parse_source, parse_source_file): New function.
(jcf_parse): Fixed typo.
(yyparse): Call parse_source_file () only.
(process_zip_dir): Fixed typo, fix zdir->filename_length when
writing the real class name back in the zip directory entry.
(find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
(jcf_figure_file_type): Fixed bogus alloc and bcopy.
*jcf.h: (typedef struct JCF): New fields java_source and zipd.
(find_class): Prototype fixed.
*lex.c: Added 1998 time stamp.
Removed all static global variables, moved into the parser
context data structure.. Now include unistd.h if SEEK_SET not
defined.
(java_init_lex): Rewritten.
(java_sneak_unicode): Modified current unicode access in current line.
(java_unget_unicode): Likewise.
(java_allocate_new_line): New allocation management.
(java_read_char): Modified access and storage of unget_utf8_value.
New way of processing current unicode.
(java_store_unicode, java_read_unicode): Fixed typo in declaration.
(java_get_unicode): Now use the parser context.
(java_lineterminator): Likewise.
(java_lex): Now used java_lval argument (pointer to YYSTYPE), part
of the reentrant parser implementation. Function now use the
parser context data structure and java_lval. Fixed production of
the float and double constant "out of range" error message. Fixed
obstack use. Return integer value when hitting a modifier. Now
return type for TRUE, FALSE and other predefined types. Return
identifier as a TREE_LIST list containing the current line context
as the TREE_VALUE sub-node.
(java_unicode_2_utf8): Fixed typo in declaration.
(java_lex_error): Now use the parser context data structure.
*lex.h: Added 1998 time stamp.
(struct java_line): New fields ref_count and next.
(JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
(JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
*parse.h: Added 1998 time stamp.
(java_parse_source_file): Renamed from parse_source_file.
(YYERROR_NOW, YYNOT_TWICE): Fixed.
(CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
(struct parser_ctxt): New data structure to keep the parser context.
*parse.y: Added 1998 time stamp, got rid of static global variables.
(java_error_count, ctxp): New global variables.
(%union): New value field.
(numeric_type, integral_type): Rules removed.
(primitive_type): Rule defined to handle integral, float, double and
boolean types.
(qualified_name, package_declaration,
single_type_import_declaration, type_import_on_demand_declaration,
modifiers, class_declaration, super, interfaces,
interface_type_list, class_body, field_declaration,
field_declaration, variable_declarators, variable_declarator,
variable_declarator_id, method_declaration, method_header,
formal_parameter_list, formal_parameter, method_body, block,
static, interface_declaration, extends_interfaces,
abstract_method_declaration, local_variable_declarators): Rules now
define actions.
(force_error, do_warning): New global statics.
(push_parser_context, parser_context_save_global,
parser_context_restore_global, pop_parser_context): New functions.
(yyerror): Now uses the global parser context. Fixed use of obstack.
(parse_error, parse_error_context, parse_warning_context,
java_accstring_lookup, redefinition_error, check_modifiers,
parser_add_interface, create_interface, create_class, find_field,
duplicate_declaration_error, register_fields, method_header,
check_modifiers_consistency, check_abstract_method_header,
method_declarator, parser_qualified_classname,
parser_check_super_interface, parser_check_super,
parser_chain_incomplete_item, java_check_circular_reference,
layout_class_from_source, java_complete_class,
complete_method_decl, resolve_class, complete_class_report_errors,
java_check_final, check_method_redefinition,
java_check_regular_methods, java_check_abstract_methods,
java_check_methods, lookup_java_interface_method2,
lookup_java_method2, lookup_cl, find_name_in_single_imports,
process_imports, find_in_imports, read_import_entry,
read_import_dir, find_in_imports_on_demand,
check_pkg_class_access, not_builtin_p, declare_local_variables,
source_start_java_method, java_generate_parsed_class): New
functions.
*typeck.c: (signature_include_return): New global variable.
(build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
to add the function returned type in the signature.
1998-02-09 Brendan Kehoe <brendan@cygnus.com>
* jcf-io.c (open_in_zip): Use strncmp and LEN.
1998-01-29 Dave Brolley <brolley@cygnus.com>
* Make-lang.in (java.info): Added.
(java.install-info): Added
1998-01-27 Brendan Kehoe <brendan@cygnus.com>
* Makefile.in (clean): Also remove java/parse.c.
1998-01-26 Brendan Kehoe <brendan@cygnus.com>
Add a pair of -fbounds-check/-fno-bounds-check options.
* lang.c (lang_decode_option): Add code to grok arguments.
(flag_bounds_check): Add decl.
(lang_f_options): New array w/ the option in it.
* java-tree.h (flag_bounds_check): Add decl.
* lang-options.h: New file.
* expr.c (build_java_arrayaccess): Use flag_bounds_check instead
of a static macro value.
(JAVA_ARRAY_EXCEPTION): Delete macro.
1998-01-23 Per Bothner <bothner@cygnus.com>
* typeck.c (build_java_array_type): Fix two bugs in previous change.
* expr.c (build_anewarray): Add missing promote_type.
1998-01-22 Per Bothner <bothner@cygnus.com>
Add array types with known length to optimize bounds checking.
* typeck.c (build_java_array_type): Take length parameter.
(java_array_type_length, build_prim_array_type): New functions.
* java-tree.h: Update for new functions.
* expr.c, typeck.c, verify.c: Update build_java_array_type calls.
* class.c: Use build_prim_array_type.
* expr.c (can_widen_reference_to): Handle known-length array types.
(verify_jvm_instructions): Keep track of integer push instructions
followed by newarray/anewarray, so we can build known-length arrays.
(JAVA_ARRAY_DATA_OFFSET): Replace by ...
(java_array_data_offset): New function.
(build_java_array_length_access): New function. Optimize if constant.
(build_java_arrayaccess): Constant fold bounds check.
(expand_java_newarray, expand_java_anewarray): Replaced by ...
(build_newarray, build_anewarray): New functions.
(ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
* verify.c (merge_types): Handle known-lengh array types.
1998-01-19 Per Bothner <bothner@cygnus.com>
* expr.c (expand_byte_code): Fix performace bug, which caused
searching linenumber_table to be linear rather than constant.
1997-12-12 Per Bothner <bothner@cygnus.com>
* Makefile.in (BISON, BISONFLAGS): Add missing macros.
* decl.c, java-tree.h (soft_fmod_node): New global.
* decl.c (init_decl_processing): Define __builtin_fmod.
* expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
using __builtin_fmod.
1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
* keyword.h: New file, output of keyword.gperf as processed by
gperf.
* lex.c (java_lex_init): Initialize java_error_flag.
* parse.c (YYERROR_NOW): Uses java_error_flag.
* parse.y: New static java_error_flag. Useless definition of
buffer_error gone.
* parse.y (java_error): Portable error recovery using
java_error_flag (not yet completely tuned).
1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
* Makefile.in (parse.c): Use $(srcdir) for parse.y.
1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
(parse.c, lex.c, keyword.h): New rules for Java source code
front-end.
* parse.c: Renamed into jcf-parse.c.
* jcf-parse.c (yyparse): Invoke the parser to process Java source code.
* keyword.gperf: New file, Java keywords.
* parse.y: New file, Java language grammar.
* parse.h: New file, Java language grammar definitions.
* lex.c: New file, Java language lexer.
* lex.h: New file, Java language lexer definitions.
1997-12-03 Per Bothner <bothner@cygnus.com>
* decl.c (clinit_identifier_node), java-tree.h: New global.
* java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
* verify.c (verify_jvm_instructions): Inline use of removed macros.
* expr.c (expand_java_field_op): Check for invalid assignment
to final field.
* jcf-reader.c (get_attribute): Test for wrong attribute length.
1997-10-27 Per Bothner <bothner@cygnus.com>
* verify.c (verify_jvm_instructions): When processing a handler,
attempt to set the current_subr to the right value.
(More complicated code combines Sep 17 and Oct 22 versions.)
1997-10-24 Per Bothner <bothner@cygnus.com>
* class.c (push_class): Figure out (guess) name of source file.
* parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
(give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
(parse_class_file): Change return type from int to void.
Call debug_start_source_file/debug_end_source_file.
* expr.c (build_java_binop): Fix masking 2nd operand.
* decl.c (init_decl_processing): Set sizetype first.
1997-10-22 Per Bothner <bothner@cygnus.com>
* verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
(Revert Sep 17 change.)
1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.c (process_zip_dir): Skip ZIP entries not bearing the
.class extension in their name and fix thing so we don't process
them parse_zip_file_entries().
(parse_zip_file_entries): Cleaned unused local variables.
1997-10-20 Per Bothner <bothner@cygnus.com>
* expr.c (can_widen_reference_to): Allows equal array element types.
(expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
* jcf-dump.c (RET): Get (and print) index.
* verify.c (verify_jvm_instructions case OPCODE_anewarray):
Promote element type to POINTER_TYPE.
1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
find_in_current_zip, jcf_figure_file_type): Moved from
jcf-reader.c to parse.c.
* zextract.c: (read_zip_archive): takes file_comment_length possible
field into account.
1997-10-20 Per Bothner <bothner@cygnus.com>
* verify.c (verify_jvm_instructions): Var can also be promoted to int.
* verify.c (merge_types): Handle array types even better ...
1997-10-17 Per Bothner <bothner@cygnus.com>
* expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
* java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
* class.c (make_class_data): Don't build fields_decl if no fields.
When building fields_decl, skip if DECL_ARTIFICIAL.
* expr.c (java_stack_swap): Update stack_type_map.
* verify.c (merge_types): Handle array types better.
1997-10-15 Per Bothner <bothner@cygnus.com>
* class.c (add_field): Don't promote short integral fields to
int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
* expr.c (push_value): Promote and convert short integral values.
* decl.c, java-tree.h (integer_two_node): New constant node.
* verify.c (merge_types): Check for TYPE_RETURN_ADDR.
1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (append_gpp_mangled_type): Use function argument
unpromoted type to generate mangled name.
1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* constants.c (build_constant_data_ref): Now uses current_class
instead of main_class.
(build_constants_constructor): Now uses current_class instead of
main_class.
* zipfile.h: (struct ZipFileCache): Now defined here. Declaration
of the global variable SeepZipFiles done here.
* zextract.c (read_zip_archive): extra_field optional field taken
into account while computing the position of the class file in the
archive.
* verify.c (verify_jvm_instructions): Use current_jcf to search
the constant pool.
* parse.c (load_class): First search for the class to load in the
current zip file. Saves current_jcf (restored before returning
from that function). Don't call JCF_FINISH in the class was found
in the current ZIP file.
(jcf_parse): If the class was found in the current ZIP file, save
its tree_constant_pool (for later reuse).
(parse_class_file): New function. Process each method defined in
the current class and record the class as to be later registered.
(yyparse): Rewritten. Figure the type of the current file and switch
accordingly.
* lang.c: New global variable current_jcf.
(lang_init): Removed compiling_from_source test (done later, in
yyparse). Removed call the jcf_parse ().
* jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
(typedef struct JCF): New fields seen_in_zip (to mark a class found
in the current ZIP file) and zip_offset (offset to the class data in
the current zip file).
* jcf-reader.c: zipfile.h included.
localToFile: New ZipFileCache static global variable
(parse_zip_file_entries): New function. Browse the current ZIP
file directory and process each class found.
(process_zip_dir): New function. Register each class found in the
ZIP file directory. The class aren't parsed but a valid JCF is
link to each of them.
(find_in_current_zip): New function. Search for a class in the
current ZIP file directory. If found, prepare the class so that it
can be loaded.
(jcf_figure_file_type): New function. Examine the file structure
to figure a class file, a ZIP file. If none of these categories are
matched, a source file is assumed.
* jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
SeenZipFile: New global variable.
(open_in_zip): Use zipmember's length to accelerate the search for
a member. If zipmember was NULL and zip file successfully read,
return 0.
* java-tree.h: New global variable current_jcf declared. Added
declaration for current_constant_pool_tags, current_constant_pool_data,
current_constant_pool_length, current_constant_pool_data_ref.
(struct lang_type): Augmented with two fields. struct JCF *jcf (to
store the JCF of classes seen in a zip file) and tree *constant_pool
(to save a loaded class constant pool). current_class declared here.
* expr.c (expand_invoke): Use current_jcf instead of main_jcf to
retrieve method_ref_constant.
(PUSHC): java_push_constant_from_pool now uses current_jcf.
(OBJECT): get_class_constant now uses current_jcf.
(ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
(ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
(expand_invoke): Now uses current_class instead of main_class
(build_class_init): Now uses current_class instead of main_class
* class.c: New static global variable registered_class.
(register_class): New function.
(emit_register_class): Modified to use registered_class instead of
main_class
(is_compiled_class): Now take into account class seen in the archive.
1997-10-06 Per Bothner <bothner@cygnus.com>
* except.h: Renamed to: java-except.h.
* parse.c, except.c, expr.c, verify.c: Update #include accordingly.
* except.c: Add semi-working (commented out) implementation.
* expr.c (expand_iinc): Add needed flush_quick_stack.
* parse.c (set_source_filename): New function.
(give_name_to_class): Set input_filename from package.classname.java.
* jcf-io.c (find_class): Don't look first in ".".
1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* zextract.c (read_zip_archive): Now takes into account the
extra_field field.
* expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
1997-09-20 Per Bothner <bothner@cygnus.com>
* constants.c, java-tree.h (build_internal_class_name): New function.
(alloc_class_constant): Re-implement using build_internal_class_name.
* class.c (make_class_data): Likewise.
* class.c (hashUtf8String): Make hash algorithm match String.hashCode.
1997-09-17 Per Bothner <bothner@cygnus.com>
* verify.c (verify_jvm_instructions): Temporarily set current_subr
to NULL before pushing an exception handler target.
* expr.c (flush_quick_stack): Save from low stack indexes to high.
(java_stack_swap, java_stack_dup): Re-write to be safe from
clobbering registers.
(build_class_init): New function.
1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
* typeck.c (build_java_array_type): Temporary use
permanent_obstack to create the array 'length' field.
* expr.c (lookup_label): Temporay use permanent_obstack to create
label if not found.
* class.c (push_super_field): Tempory use permanent_obstack.
1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
* typeck.c (type_for_mode): Now handles double_type_node and
float_type_node.
* verify.c (verify_jvm_instructions): The instruction following
the wide bytecode is checked. OPCODE_ret added to the list of
wide.
1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (make_class): Temporary use permanent_obstack. Set the
class CLASS_P field to 1.
(push_class): Temporary use permanent_obstack.
(set_super_info): Temporary use permanent_obstack.
(add_method): Temporary use permanent_obstack, set
METHOD_TRANSIENT().
(add_field): Temporary use permanent_obstack. Sets
FIELD_VOLATILE() and FIELD_TRANSIENT().
(build_class_ref): Temporary use permanent_obstack if the class
isn't compiled.
(build_static_field_ref): Temporary use permanent_obstack when
creating field's rtl.
(get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
and fields. Function finalized, as far as flag handling.
(push_class_static_dummy_field): Temporary use permanent_obstack.
(emit_register_class): Force generation of class registration at
-O3 or deeper.
* decl.c (end_java_method): Call permanent_allocation() before
returning.
* expr.c (can_widen_reference_to): Added comment to interface
handling, fixed typo.
(lookup_field): Now uses CLASS_P() to correct FIXME
(expand_invoke): Verification on public && !static &&
!abstract moved into soft_lookupinterfacemethod (kaffe).
Use Object class dtable if objectref is an array when expanding
invokeinterface.
(java_push_constant_from_pool): Temporary use permanent_obstack
for CONSTANT_string
* parse.c (get_ref_constant): Temporary use permanent_obstack to
create constant references.
(get_constant): Temporary use permanent_obstack to create constant.
(load_class): Temporary use permanent_obstack to load class.
(jcf_parse): Temporary use permanent_obstack to perform class
layout.
* typeck.c: (parse_signature_string): Temporary use permanent_obstack.
(build_java_signature): Temporary use permanent_obstack.
* verify.c: (verify_jvm_instruction): removed unnecessary verification
on ACC_SUPER flag.
* java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
(FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
(CLASS_P): Defined
1997-09-11 Per Bothner <bothner@cygnus.com>
* class.c (append_gpp_mangled_type): Fix typo.
(emit_register_class): Use main_class to get class object, rather
than looking for no-longer-existing static decl starting with _CL.
* typeck.c (parse_signature_type): Promote array element type
if it is a RECORD_TYPE.
1997-09-10 Per Bothner <bothner@cygnus.com>
* class.c (push_class_static_dummy_field): New function.
(mangle_static_field): New. Do G++-style mangling of static fields.
(layout_class): Mandle static fields here, not in add_field.
(build_class_ref): The class object is now a dummy static field.
* decl.c (find_local_variable): Look for best, instead of first match.
* expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
(build_java_athrow): Don't check here if exception is Throwable.
* java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
(TYPE_USED): Removed. No longer used ...
* parse.c (jcf_parse): Call push_class_static_dummy_field.
* verify.c (push_pending_label): New function.
(push_pending_block): Renamed to check_pending_block.
(merge_types): Remove unneeded suuport for TYPE_UNUSED.
(verify_jvm_instructions): Only reset prev_eh_ranges (to force
re-checking possible handlers) after a store (less wasted work).
Check for null handler (finally) before calling add_handler.
Various changes to (finally?) correctly handle try/finally.
1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
* class.c: Include stdio.h.
1997-09-04 Per Bothner <bothner@cygnus.com>
* expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
to make sure class is initialized before static/special invoke.
* verify.c (verify_jvm_instructions): On a store instruction,
call find_local_variable to force pre-allocation of decl and rtx.
* decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
1997-09-03 Per Bothner <bothner@cygnus.com>
* class.c (build_class_ref): Strip off "promoted_" if need be.
(make_field_value): Call build_java_signature when needed.
(layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
* expr.c (build_java_athrow): Don't push_value of exception.
(build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
match specification of [fd]cmp[lg] for NaNs.
(expand_byte_code): Add support for exception handler ranges.
* except.c: Add skeleton for EH code-generation.
* verify.c (merge_types): Treat all promoted integral types as equal.
* constants.c (build_constants_constructor): To force creation of
current_constant_pool_data_ref, call build_constant_data_ref.
* javaop.def (lload): Fix typo.
* jcf-dump.c (main): Clear filename to prevent possibly-bad free.
1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
* parse.c: Don't include function.h.
1997-08-27 Per Bothner <bothner@cygnus.com>
* except.[ch]: New files.
* Makefile.in (JAVA_OBJS): Add except.o
* expr.c: Temporary warning about unimplemented exceptions.
* verify.c: Verify exception handlers.
* jcf-dump.c (disassemble_method): Print exception table.
1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (verify_jvm_instructions): Started a thorough
verification of invoke* bytecodes.
(expand_byte_code): flush quick stack if PC is the target of a
branch. and undef RET (conflicting with config/i386/i386.h).
(expand_java_arrayload): Fixed bogus cast, when Boolean type is
used.
(expand_invoke): Now handles invokeinterface and do more
verification according to the bytecode.
(lookup_field): Don't try to load the class if processing
dtable_type.
(can_widen_reference_to): Now handles interfaces.
* decl.c (init_decl_processing): New global variable
soft_lookupinterfacemethod_node, declared in java-tree.h.
Call set_super_info on string_type_node.
* java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
defined.
* class.c (set_super_info): Fills the CLASS_* flags according to
access_flags.
(get_access_flags_from_decl): Handles all class flags.
1997-08-26 Per Bothner <bothner@cygnus.com>
* class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
* parse.c (yyparse): Check for abstract method, and missing code.
* expr.c (expand_byte_code): Change interface.
* lang.c (put_decl_node): Print promoted types prettier.
* verify.c (verify_jvm_instruction): Change interface.
Partial support for scanning exception table.
For load instructions, handle promoted integral types.
1997-08-21 Per Bothner <bothner@cygnus.com>
* verify.c: New file, with contents moved from expr.c.
* expr.c: Bunch of stuff (mostly verification) moved to verify.c.
* typeck.c (is_array_type_p): Moved here from expr.c.
* java-tree.h: Add some now-needed function declarations.
* Makefile.in (JAVA_OBJS): Added verify.o.
1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
METHOD_ABSTRACT flag.
* java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
(IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
(METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
* decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
variables.
(start_java_method): Hook for SYNCHRONIZED methods.
* expr.c (build_java_jsr, build_java_ret): New functions
(JSR,PRE): New macros
(PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
(verify_jvm_instructions): tableswitch, lookupswitch,
monitorenter, monitorexit, goto_w: verified.
(LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
(build_java_monitor): New function.
(MONITOR_OPERATION): Modified to call build_java_monitor()
(verify_jvm_instructions): Started a thorough verification of
invoke* bytecodes.
1997-08-19 Per Bothner <bothner@cygnus.com>
Support verification of jsr/ret subroutines (used for try/finally).
* decl.c (return_address_type_node): New type node.
* java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
(TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
TYPE_USED): New macros for special types in type_map.
* java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
(BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
BCODE_JUMP_TARGET.
* expr.c (expand_byte_code): Fix logic to warn of unused instructions.
* expr.c (can_widen_reference_to): New function.
(pop_type): Use it.
(merge_type_state): Support handling start of subroutine.
(push_pending_block): Return char* error message, instead of calling
fatal on an error. Also handle subroutines.
(verify_jvm_instructions): Handle errors from push_poending_block.
Support jsr and ret instructions.
1997-08-19 Per Bothner <bothner@cygnus.com>
* jcf-io.c (find_classfile): Fix thinko.
* jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
* Makefile.in (BISON): Remove.
1997-08-07 Per Bothner <bothner@cygnus.com>
* Makefile.in: Convert to autoconf.
* config-lang.in (outputs): Added java/Makefile.
* Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
Rename cc1java to jc1.
* lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
* Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
* class.c (class_depth): Do load_class if needed.
Mostly better verification.
* decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
(init_decl_processing): Change return type of soft_checkcast.
* expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
* lang.c (put_decl_string, put_decl_node, lang_printable_name,
lang_print_error): New functions.
(lang_init): Set global hook print_error_function to lang_print_error.
* expr.c: In the type_map ptr_type_node is only used for null now.
(pop_type, merge_types): Hence ptr_type_node matches any reference.
(merge_types): Dererence pointer to record types before comparing.
(decode_newarray_type, merge_types): On error just return NULL.
(build_java_binop): Add preliminary implementation (with warning)
for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
(lookup_label): Set DECL_IGNORED_P (for dwarf2out).
(expand_compare, expand_java_goto, expand_java_call): Don't
push_pending_block, since that only makes sense when verifying.
(merge_type_state): Different return codes.
(push_pending_block): A block may need to be verified more than once.
(expand_byte_code): Warn about unused code at code generation time.
(verify_jvm_instruction): Changed logic, since code may need to be
re-verified if type-state has changed. Also, better error handling.
Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
Improve newarray, anewarray, ?aload, athrow,
* java-tree.h (LABEL_CHANGED): New macro.
1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl.c (soft_athrow_node): New global variable initialized.
* javaop.def (i2b, i2c, i2s): Invoke CONVERT2
* typeck.c (convert): Added support for REAL_TYPE.
(convert_to_char): New function.
(convert): Handle CHAR_TYPE.
* expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
(expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
promoted type.
(verify_jvm_instructions): Added break a the end of bogus unop: label.
(OPCODE_<b|c|s>astore): Pop an int operand from the type stack
(OPCODE_<b|c|s>astore): Push the promoted type onto the stack
(process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
(JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
to Use The Right Things.
(pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
compatible with INT. BOOLEAN is made equivalent to BYTE.
(OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
OPCODE_ifnonnull): Now supported.
(build_java_athrow): New function.
1997-08-04 Per Bothner <bothner@cygnus.com>
Rename method name <init> to match G++ (and fix mangling).
* class.c (layout_class): Replace method name of <init> by class name.
(make_method_value): Do inverse renaming of constructor from <init>.
* java-tree.h (DECL_CONSTRUCTOR_P): New macro.
* typeck.c (lookup_java_constructor): New function.
* expr.c (expand_invoke): If method_name is <init>, call
lookup_java_constructor to find constructor.
* parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.c (get_class_constant): Modified to handle array "classes"
* typeck.c (set_local_type): Bug fixed when filling type_map[] with
wide type.
(convert): Modified to handle real type.
* java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
soft_multianewarray, soft_newarray_node, soft_throw_node): New global
variables declared.
* decl.c (soft_badarrayindex_node, soft_anewarray_node,
soft_multianewarray, soft_newarray_node, soft_throw_node): New
global variables initialized.
(find_local_variable): Handles the case of a pointer
(end_java_method): Restore the use of one more scope
* expr.c (build_java_arraynull_check, build_java_arrayaccess,
build_java_array_length_access, expand_java_arrayload,
expand_java_arraystore, expand_java_array_length,
expand_java_multianewarray, expand_java_anewarray,
build_java_check_indexed_type, is_array_type_p,
build_java_throw_out_of_bound_exception): New functions.
(STORE_INTERNAL): Now forces type of the decl to be type of the value.
(OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
OPCODE_<t>aload): Implemented code for verification.
(ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
ARRAY_NEW_MULTI): Macro defined.
(CONVERT): Modified to invoke convert().
(case OPCODE_aload2): Fixed index typo from 2 to 1.
1997-07-31 Per Bothner <bothner@cygnus.com>
* class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
(build_class_ref, is_compiled_class): Handle pointer-to-record types.
(make_class_data): Field name needs '/' as package prefix.
* expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
1997-07-25 Per Bothner <bothner@cygnus.com>
Implement debug information for local variables.
* java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
DECL_LOCAL_SLOT_CHAIN): New macros.
(struct lang_decl_var): New type.
* parse.c (give_name_to_locals): Move to decl.c.
* decl.c (give_name_to_locals): Re-written to Do The Right Thing.
(start_java_method): Re-write parameter handling.
(pending_local_decls): New global variable.
(push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
(find_local_variable): Accept pc so we can skips decls not in range.
(struct binding_level): Add end_pc field.
* expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
(various): Change so current pc gets passed to find_local_variable.
* decl.c (init_decl_processing): Re-arrange fields in
class_type_node and and method_type_node to match kaffe 0.9.1.
* class.c (make_method_value, make_class_data): Update
initializations to match.
1997-07-16 Per Bothner <bothner@cygnus.com>
* class.c (unicode_mangling_length, emit_unicode_mangled_name,
append_gpp_mangled_name, append_gpp_mangled_type): New functions.
(push_super_field): New function.
(make_class_data): Handle inheritance of class static initializer.
(layout_class): New name mangling.
* constants.c (build_constant_data_ref): Init type of data array
to a one-element array.
(build_constants_constructor): Set DECL_SIZE from complete array type.
* decl.c: Rename class_type, object_type etc to class_type_node,
object_type_node etc. Make former inherit from latter.
* expr.c (expand_invoke): Add cast of function address.
* java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
* parse.c (yyparse): Don't call layout_class here.
* typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
1997-06-14 Per Bothner <bothner@cygnus.com>
* decl.c, class.c: Update method type to match latest Kaffe snapshot.
* constants.c (lookup_name_constant): Renamed to alloc_name_constant.
(alloc_class_constant): New.
* expr.c (expand_invoke): Make sure method's class is initialized.
* class.c (interits_from_p, emit_register_class): New functions.
* parse.c (yyparse): Call emit_register_class.
1997-06-09 Per Bothner <bothner@cygnus.com>
* constants.c: New file, to handle constant pool.
* Makefile.in (JAVA_OBJS): Add constants.o.
* decl.c (init_decl_processing): Update, fix, finish various structs.
(pushdecl_top_level): New.
* parse.c (layout_class): Moved to class.c.
* expr.c (java_push_constant_from_pool): New function.
* class.c (build_class_ref): Make work fully
(make_class_data): Emit super-class, constant pool, interface vector.
1997-06-03 Per Bothner <bothner@cygnus.com>
java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
(LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
* class.c (class_depth): New function.
(lookup_named_class): Replaced by new function lookup_class.
* decl.c (object_type_node, string_type_node): New.
Remove various types that we no longer need.
* expr.c (verify_jvm_instructions): New separate verifier pass.
(push_type, pop_type): New functions for verifier.
(type_stack_dup, pop_argument_types, merge_types): Likewise.
(expand_byte_code): Simplify, since we assume already verified.
(expand_invoke): Now mostly works.
* javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
* lang.c (main_class): Move to parse.c. Don't make_class yet.
* parse.c: Wait to allocate class object until we know its name.
(layout_class): Calculate DECL_VINDEX for each virtual method.
* typeck.c (get_array_type): Rename to ...
(build_java_array_type): ... and provide working implementation.
(build_java_signature): New function - build Java signature of type.
(set_java_signature): New function - cache signature with type.
(lookup_java_method): New function.
1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
* class.c (ident_subst): Take extra SUFFIX parameter.
(add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
(set_constant_value, build_static_field_ref, is_compiled_class): New.
(build_class_ref): Actually implement.
* decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
* decl.c (builtin_function): New.
(init_decl_processing): Update for current Kaffe. Declare some
builtin Kaffe functions.
* expr.c (build_address_of): New.
(expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
Renamed (from expand_java_new etc), and added working implementations.
(build_field_ref): Now also handle static fields.
(expand_invoke): Implement invokestatic, and start implement rest.
* java-opcodes.h: Use javaop.def to avoid duplicated list.
* javaop.def: Rename invokevirt -> invokevirtual.
* lang.c (use_handles): Removed.
* parse.c: Add support for ConstantValue attribute.
Handle nested loading of a class. (JPOOL_UTF): New.
1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
* expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
* Make-lang.in (java.install-man): New empty rule.
* typeck.c (set_local_type): New function.
* expr.c (STORE_INTERNAL): Call find_local_variable,
not find_stack_slot. Call set_local_type.
1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
* java-tree.h: Various new macros for constructing RECORD_TYPEs,
and building RECORD_TYPE CONSTRUCTORs.
Also support for creating Utf8Const objects from an INDETIFIER_NODE.
* lang.c (use_handles): Change the default to 0.
* decl.c: Define and build class_type, field_type, utf8const_type.
* class.c (make_class_data, make_field_value,
get_access_flags_from_decl, build_class_ref, build_utf8_ref,
hashUtf8String, strLengthUtf8, mangled_classname:
Functions to build reflective data structures.
* parse.c (yyparse): Call make_class_data.
* jcf-io.c (open_class, find_classfile): New functions.
* jcf-dump.c: Support reading classfile from explicitly-named
class file (without CLASSPATH searching).
1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
* jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
* parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
(get_constant): Now trivial for CONSTANT_Utf8.
* jcf.h: Make NEW_CPOOL the default.
* jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
New directory.
|