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
|
# This file is similar to a weblog an shows activities and certain
# discussions during the development of the next scripting framework,
# starting around march 2008. we keep it as a potential source for
# explaining development, changes and chosen design options.
#
# The actual todos start in the line with the string "TODO:"
#
<- handle change in tcl 8.5.8: http://tcl.cvs.sourceforge.net/viewvc/tcl/tcl/generic/tclObj.c?sortby=date&r1=1.139.2.1&r2=1.139.2.2&pathrev=core-8-5-branch
in xotcl:
* when e.g. the parent namespace is deleted with a "namespace delete", the change
above causes, the no xotcl methods could be resolved (and called) anymore.
* therefore, e.g. a "C dealloc c1" did not work, since dealloc passes
c1 via tcl_obj, and the tcl_obj is as well converted to an xotcl object via
Tcl_GetCommandFromObj(), which fails as well.
- to bypass this problem, xotcl has now a C-function DoDealloc(), which
is called, when this situation is detected.
- some more cases, where xotcl could reference already freed memory
were fixed (thanks to enable-symbols=mem)
- as collateral damage, parts of the regression test don't work currently
- added refcounting in ObjectDispatch() to make sure, obj survives until
the end of the function
- added existence test for slot extractor (needed for 8.5.8)
- added refcounting CallStackDoDestroy() to ensure existence of
object until end of function
- make sure to call PrimitiveDestroy() before DeleteCommandFromToken(),
otherwise e.g. unset traces on this object cannot be executed
- regression test works again
- get rid of rst->deallocCalled (not needed due to reference counting
on xotcl objects)
- reduce verbosity
- reactivated XOTclErrInProc()
- renamed "ClassName info instmixinof ?-closure? ?pattern?" into
"ClassName info class-mixin-of ?-closure? ?pattern?"
- renamed "ClassName info mixinof ?-closure? ?pattern?" into
"ClassName info object-mixin-of ?-closure? ?pattern?"
- added emulation "ClassName info instmixinof|mixinof" for xotcl1
- update to TEA 3.7 (from TEA 3.5)
- use of INT2PTR to avoid warnings about different sizes on 64bit
architectures
- defined HAVE_INTPTR_T as a macro to make definition of INT2PTR working
- use INT2PTR and PTR2INT macros in generated stubs
- handle HAVE_UINTPTR_T like HAVE_INTPTR_T
- use ::xotcl::setinstvar instead of ::xotcl::setinstvar in serializer
- change and rename cmd instvar
::xotcl::instvar -object someObject newVar
into
::xotcl::importvar someObject newVar
Rationale of change:
only needed in xotcl2 for importing variables
from different objects
- changed assertions:
old (xotcl1) interface: 3 methods + 3 info methods
* <object> check Options
* <object> info check
* <object> invar Conditions
* <object> info invar
* <class> instinvar Conditions
* <class> info instinvar
new (xotcl2) interface: 1 cmd (similar to ::xotcl::relation)
::xotcl::assertion check|object-invar|class-invar ?arg?
- added emulation for xotcl1
- deleted name-specific C macros:
isInfoString, isInstinvarString, isInvarString, isInstprocString, isProcString
- made some more xotcl2 methods protected
(no big need to call these from different objects):
unknown, uplevel, upvar
- added ::xotcl::exists as cmd
- added ::xotcl::method as cmd instead of methods object-method and
class-method
- added ::xotcl::forward as cmd instead of method
now, all method-defining-methods (alias, method, forward, setter)
are defined as cmds (this should make life of serializer easier)
- moved "-per-object" consequently immediately after obj in the
following commands
: ::xotcl::alias, ::xotcl::methodproperty, ::xotcl::setter
to achieve conformance with ::xotcl::forward and ::xotcl::method
-per-object
nach methodName:
vor methodName: alias forward method methodproperty setter
- added experimental flag for alias "-noleaf" to force a stack frame
to be written (e.g. necessary for "next"). makes only sense for
aliases to c-implemented cmds
- fix inconsistent behaviour of dotVarResolver
"o eval {set .x 1}" was setting var ".x" instead of "x"
The problem was due to a interaction between
the namespace varResolver() and the DotVarResolver()
- fix for DotCmdResolver during compilation of a proc by Tcl.
- extended regression text
- found 2 potential bugs (not fixed yet)
- fix eval method with requirenamespace
- removed dependency on proc/instproc in copy/move.
code is now independent of class system
- changed results of "filtersearch" and "self next" to new naming
Caveat: for xotcl1, there is no mapping for the names to the
old style in "self next" and "self filterreg"
- backwards compatible mapping of filtersearch in xotcl1
- removed XOTclInstVar from the C-level API.
still todo add all xotcl*cmds to C api, including importvar
- removed all unreferenced entries from XOTE_*
- regrouped XOTE_* for easier comprehension
- used XOTE_* on more occasions
- used XOTclCallCommand() for calling Tcl
"format" and "interp"
- added option "arg=.." to parameter options; this argument
can be passed to converter; used currently for "type=relation"
to flag, that the relation type is different from the parameter
name
- extended "objectparameter" to handle such cases
- removed relationtypes "mixin", "filter", "instfilter" and
"instmixin" since not needed due to converterArg
- xotcl.c: removed all names starting with "inst"
(exception: instvar)
- added option "-application" to "info callable" to
omit methods from base classes
- extended regression test
- changed naming of methodtype "system" to "builtin"
- added "info methods" to migration guide
- added "info method" to migration guide
- modernize test a little: all local definitions of proc "?" are gone.
- added interface to test: "Test parameter count SOMEVALUE" to
specify conveniently e.g. the number of tests the be executed
- add XOTCL_CM_NO_UNKNOWN to dispatch of defaultmethod
- added option "objectsystems" to ::xotcl::configure to
obtain the currently defined object systems
- added option "baseclass" to ::xotcl::is to check, whether
a class is a baseclass of an object system
(root class or root meta-class of object system)
- changed result of "... info methods -methodtype scripted"
to return only truly scripted methods (no aliases)
- some more cleanup in regression tests
- first version of serializer for xotcl1 + xotcl2
- serializer: move checking of the requested objects
to be exported to the invocation of "Serializer all"
- replace "namespace import ::xotcl::*" by "xotcl::use xotcl1"
- make allocation sizes for dynamically allocated parameterContexts
consistent between alloc and realloc
- added sanity check in getAllClassMixinsOf()
It seems as it would be possible with __defaultSupeclass to define
a class which has itself als a subclass. Just a quick
fix, we have investigate more on this.
- improved naming of resolvers: use InterpDot*Resolver and
NsDot*Resolver for interp wide and namespace specific resolvers
- added possibility to escape the call of commands starting
with a dot from method bodies by prefixing with a second dot.
- make sure to have an xotcl frame pushed, when byte-code-compiler
is invoked. This is necessary for providing the context for
dotCmd resolvers
- use uplevel in slot add/delete to evaluate in calling namespace
(for not fully qualified object names)
- determine namespace in test method "?" to allow its execution
in an "namespace eval"
- added regression tests
- NsDotVarResolver: don't create variables on CMETHOD frames
when their names do not start with a "."
- general overhaul of XOTcl_PushFrame()XOTcl_PopFrame():
new functions:
* XOTcl_PushFrameCsc()/XOTcl_PopFrameCsc(): for CMETHOD fames
* XOTcl_PushFrameObj()/XOTcl_PopFrameObj(): for OBJECT frames
(objscope)
- preallocate obj->vartable in XOTcl_PushFrameObj() to
avoid situations where to non-existing vartable is created
on demand at different places (e.g. on stack and in
var resolver)
- caller of convertToRelationtype(): make sure that last argument
keeping the result is large enough to held pointer (in case of
sizeof(void) != sizeof(int)
- Serializer: include ObjectSystemSerializer in "Serializer all"
- Serializer: use class-mixin in dependency order
- Serializer: add appropriate "::xotcl::use xotcl1|xotcl2"
- Serializer: fix syntax in exportMethods
- Serializer: provide limited support for exporting aliases for xotcl1 objects
- add calltype to tcl85showStack
- keep orignial objc/objc in call stack context such that
next/self args works with canonical args (allow e.g.
different order of nonpos args in a next)
- make naming in xotcl.c more consistent
- ensure to return empty, when "info callable -which" fails
- extend regression test
- exithandler is different in xotcl2 -> comment, check OpenACS
- ensure relation filter/instfilter etc. mit guards
- extended migration guide
- defined eval in predefined via "-nonleaf", used at various places
- added "info mixinof ?-scope all|object|class? ?pattern?", dropped
"object-mixin-of" and "class-mixin-on" from registered method
- extended regression test
- xotcl1: make "-volatile" invoked via unknown behave correctly
- provide minimal xotcl2 compatibility
- added non positional parameter "type" to "get_parameter"
- removed "required" from parameters, which is in XOTcl 1 just a comment
- minor cleanup
- experimental change of resolver name prefix char from dot to single colon
- making methodDefinitions NULL terminated
- passing optional arg to user-defined argument converter
- refuse to redefine type converters for a single parameter
- adding regression test for parameters
- added instance variable arg for interfacing with parameter
interface. "arg" acts like a clientdata for type converter
- added multiple parameter options handling to method "parameter"
to obtain similar functionality from object parameters
as from method parameters
- added convenience method "??" to test to indicated test
that should fail with an error
- added severity type converters to achieve same
object type checking as in ::xotcl::is
(these are currently in the regression test, should move
finally into predefined.xotcl)
- extended regression test
- new function ::xotcl::parameterFromSlot (used in argument checker as well)
- use ::xotcl::forward in Slot constructor (instead of dispatch)
- checking methods on slots for single- and multivalued slots
(can be optimized)
- extended regression test
- don't run multiple queries in "??"
- fixed last changes to regression test as usual
- added "multivalued" to parameter options
- made error message produced by XOTclObjErrType look like Tcl's error
messages
- extended regression test
- test utility: changed "?" to return error msg in case of error
- checking multivalued types in "-parameters" by using argument
checker
- some cleanup
- extend regression test
valuecheck.001: 5.27 mms, ::xotcl::valuecheck object o1
valuecheck.002: ::xotcl::valuecheck object 1 ok
valuecheck.003: 3.06 mms, ::xotcl::is o1 object
- new cmd "::xotcl::valuecheck <valueConstraints> <value>"
where "valueConstraints" is whatever is allowed in e.g. parameters
(including user defined types)
- new Tcl_ObjType "xotclParam"
- parameterFromSlot returns now pair object-param & method-param
- define disallowed parameter options for object parameter, method
parameter and value-check command
- make canonical table of parameter options (currently in
tests/parameter.xotcl)
- extend regression test
- systematic checking, what value constraints should be allowed/not
allowed in valuecheck
- pass arg from objectparameter as first argument to objparms
(similar to client data)
- support for parameter spec of form "type=XXX" to denote that
the parameter must be an object of the specified type (class;
directly or indirectly)
- new built-in converter: convertToObjectOfType()
- keep parameterObj (source for conversion to XOTclParam)
for making introspection less work. However, this is
only used for XOTclParams generated via ParamParse().
- extending regression test
- name XOTclObjects always "object" instead of "obj" to avoid
potential confusion with Tcl_Objs
- remove unneeded push and pop operations in ListChildren() and
ObjectHasChildren()
- allow syntax "object,type=::SomeClass" and "class,type=::SomeMetaClass"
(currently identical, we should as well check for class/meta-class
in case of "class,type=SomeClass")
- define everything concerning basic slot setup in a single
"namespace eval ::xotcl {...}"
- undefine ::xotcl::createBootstrapAttributeSlots after this block
- fix default DefaultSuperClass() with isMeta==1 in cases,
where we are already at the root meta class
- use "-parameter" in xotcl1 instead of createBootstrapAttributeSlots
- cleanup of legacy stuff in slot management.
* merged InfoSlot and InterceptorSlot into RelationSlot
* get rid of legacy "mixin set ...." command
- renamed "parameterSlot" into "methodParameterSlot" to avoid
potential confusions
- refactor Slot class hierarchy
- new methods in ObjectParameterSlot "toParameterSyntax" and
"createFromParameterSyntax"
- some more cleanup
- removed legacy syntax for "-parmeters"
- moved slot optimizer from ::xotcl::ObjectParameterSlot::Optimizer to
::xotcl::Attribute::Optimizer
- support for all string constraints provided by "string is ... $value"
in object and method parameters ("alum", "alpha", ..., "xdigit").
Technically, these types are tclobjs (using converter convertToTclobj)
having pParm->converterArg set to the constraints.
- extended regression test
- get rid of convertToObjectOfType(), make convertToClass() and
converterToObject() more general, accepting type constraints
- predefined.xotcl: move toParameterSyntax and objectparameter to
a position, where basic slot definitions are provided
- fixed default value setting in bootstrap code
- provide more precise error message in converter,
when object type are used
- extend regression test
- added error message when substdefault is specified without a default value
- extend regression test
- added parameter option slot= to pass slotobj to a certain parameter
- use slot option to keep relation between parameter and slot
- object parameter dispatch type checker on slot objects
- allow transformation via user-defined converter (can be use to
standardize parameter values)
experimental implementation, refcounting has to be looked
in detail, maybe we need a different interface for the converters
- provide checker-methods for
-> objectParameter
-> methodParameter
- slotobject specific checker-methods
- treat currently unknown converters in valuecheckcmd as error
- fix the regression test from the last changes
- added argument for converter to return the converted tcl_obj, which
should be passed on (currently only used for viaCmd); this way,
we could remove the kludge of querying the converter after the conversion
for special handling.
- handle multivalued + values converted viaCmd converter the new
output list is only built when needed via ArgumentCheckHelper()
- fix counter initialization in ::xotcl::importvar
- register alternate "new" method in "contains" for xotcl2 and
(if available) for xotcl1 objects
- provide error message for cases, where parameter options are not
allowed (or ignored)
- move methodParameter checkers for "mixin", "baseclass" and "metaclass"
to predefined.
- deactivated checkMethods in gentclAPI.decls and in xotcl.c
- renamed "::xotcl::is ... mixin ..." to "::xotcl::is ... hasmixin ..."
(effects parametertypes as well)
- made error messages for failed conversions more consistent
(note that tcl does not provide the parameter name in the error message,
but user-defined converters do)
- fixed valuecheck in connection with modifying converters
- extended regression test
- fixed compilation for tcl 8.6b1
- Allowed parameter specification for setters.
One can define now a setter with constraints like e.g.
::xotcl::setter o a:integer
to define a setter named "a" for object "o" which
has to be integer.
- Extended regression test
- Followed naming conventions for several structures
- setterCmd(): Do not allow methodNames start with "-"
- setterCmd(): Do not allow defaults for setters
- extend regression test
- removed duplicate error message in "hasmixin" converter
- fixed refcounting in converting user-types in case of errors
- extended regression test
- added a "-nocomplain" option to ::xotcl::valuecheck
- changed semantic of ::xotcl::valuecheck: per default,
valuecheck raises an error or returns true.
If "-nocomplain" is used, valuecheck returns
0 or 1 like implemented befor this change
- extended regression test
- added parameter "incremental" to ::xotcl::Attribute:
when set, one can use "object paramname add|delete $value" etc.
- use setters with parameter constraints in slot optimizer
- as a consequence, setting attributes via slot names is about
twice as fast as before, when parameter constraints are used.
- extended regression test
- fixed returned method name when setter was used on objects
- reduce verbosity
- implemented "info method definition|parameter|args $name" for
settercmds (with parameter constraints)
- extended regression test
- fixed result resetting for user defined converters
- ::xotcl::valuecheck: moved "-nocomplain" to first position
(similar to e.g. unset)
- experimental: allow to shadow built-in types provided that
a) slot= is specified explicitly, and
b) the specified slot is not the default slot.
This should guarantee that we do not interfere with
the predefined converters for the c-level interface.
- incremented ref count on results of all-level converter
- extended regression test
- new methods for MetaSlot to factor out common code:
+ slotName (to ease name-construction, care about
slot container)
+ createFromParameterSyntax: essentially move from
::xotcl::Attribute to the meta class
- test environment: make sure to avoid confusions between
the "namespace" method and command
- added a version of the "attribute" method to predefined
- removed the following classes and methods
::xotcl::Attribute->check_single_value
::xotcl::Attribute->check_multiple_values
::xotcl::Attribute->mk_type_checker
class ::xotcl::Attribute::Nocheck
- centralize fetching of tcl-obj-types in xotcl_init
- support for method modifier "object", "protected" and "public"
for method "attribute". One can use now e.g.
Class create C {
:attribute a
:public attribute b
:protected attribute c
:object attribute A
:public object attribute B
:protected object attribute C
}
"protected" and "public" refers to the registered accessor functions
- experimental checking function ::xotcl::is2 implemented, which generalizes
between ::xotcl::is and ::xotcl::valuecheck (it is a valuecheck -nocomplain
with an ::xotcl::is syntax and switched arguments)
- Unified on c-level "info class-mixin-of" and "info object-mixin-of"
to "info mixinof ?-scope all|object|class? ?-closure? ?pattern?
The former "info class-mixin-of"
is now "info mixinof -scope class"
- adapted xotcl1 layer for this change
- extended experimental ::xotcl::is2 to handle flags -type and -hasmixin
::xotcl::is2 <obj> object ?-type <type>? ?-hasmixin <class>?
- renamed old "xotcl::is" -> "xotcl::objectproperty"
- renamed old "xotcl::is2" -> "xotcl::is"
- we have now is tests for objects in ::xotcl::objectproperty
::xotcl::objectproperty $obj object
::xotcl::objectproperty $obj class
::xotcl::objectproperty $obj baseclass
::xotcl::objectproperty $obj metaclass
::xotcl::objectproperty $obj type XXXX
::xotcl::objectproperty $obj hasmixin XXXX
- "::xotcl::is" is the higher level command,
supporting string constraints "e.g. upper", user defined type checkers
and as well object properties (every parameter type supported for object
and method parameter). Examples:
::xotcl::is $obj object ?-type $type? ?-hasmixin $mixin?
::xotcl::is $cl class ?-type $type? ?-hasmixin $mixin?
::xotcl::is obj metaclass
::xotcl::is $num integer
::xotcl::is $string upper
- implemented 2nd level reference counting for paramObjType
- defined "info is" as alias of "::xotcl::objectproperty"
- renamed ::xotcl::valuecheck -> ::xotcl::parametercheck
- replaced in predefined occurrences of ::xotcl::is by ::xotcl::objectproperty
- fixed namespace handling on stack for objects with namespaces
(before, it was possible that a variable was created in
an object's namespace without -objscope)
- as a consequence, ListChildren() had to be adjusted, since
it depended on the previous namespace handling on the stack
- fixed object resolving in NsDotVarResolver()
(before, it was possible that NsDotVarResolver could
create variables in the wrong namespace)
- simplified NsDotVarResolver()
- more cleanup in name resolver
* USE_DOT is gone
* XOTclDotDotCmd() removed
* improved performance of InterpCompiledDotVarResolver()
* made LookupVarFromTable() obsolete and removed it
* renamed DotVarResolver() and friends to ColonVarResolver() etc.
- extended regression test
- call XOTclObject always "object" instead of "obj"
- initcmd: use for initcmds CMETHOD frames instead of OBJECT stack frames
- initcmd: skip parent-stack frame's objscope for initcmd
- changed hash-based lookup of children into a cmd-based lookup
- extended regression test
- cleanup in stack handlers (naming, arguments)
- XOTclCallStackFindLastInvocation(): return last scripted invocation
- use xotcl1 in webserver test to make rull regression test working
- make xotcl::use silent
- added option "-nonleaf" for method alias
- added introspection (for "info method definition") for "alias ... -nonleaf ..."
- removed obsolete ::xotcl::configure option "cacheinterface"
- removed XOTclCreateClass() and XOTclDeleteClass();
both are identical with XOTclCreateObject() and XOTclDeleteObject()
- renaming of instance variable specific primitiva for more
consistency with ::xotcl::importvar:
::xotcl::exists -> ::xotcl::existsvar
::xotcl::setinstvar -> ::xotcl::setvar
- requireNameSpace:
* fix potential crash in requireNameSpace in objscoped methods
by swapping all vartable references in objscopes on stack
to the vartable in the namespace, when it is created
- extending regression test
- working towards KEEP_VARS_IN_CMETHOD_FRAME
- enable compilation with assertion turned on (via NDEBUG)
- fix potentially uninitialized flags for ArgumentCheck()
- some further cleanup, tested with 32 bit under Mac OS X 10.6
- removed obsolete generic/xotclAppInit.c
- changed loading method in xotclsh from Xotcl_Init() to Tcl_PkgRequire()
- updating tcl.m4 to the actual version (TEA 3.7)
- minor cleanup (varresolution test and comment)
- defined "xotcl::current" as synonym for "::xotcl::self"
- new options for ::xotcl::current
current object == current
current method == current proc
current callingmethod == current callingproc
- "self proc" and friends are for backward compatibility for xotcl1,
"current method" and friends are for xotcl2
- namespace exported "::xotcl::current"
- use "::xotcl::current" instead of "xotcl::self" in predefined
- use "CONST char *" in generated interface and below
- further cleanup using "CONST char *"
- remove dependency from xotcl1 in handling of forwarders in method "copy"
- further cleanup using "CONST char *", improving on naming conventions
- added an experimental "info frame" handler, which appends "object" and
"class" pairs
- fixed wrong name for per-object filter in RelationSlot
- fixed condition in filter-invocation to top-level frames
- added frametype to information returned by "info frame"
- change frametype in "info frame" form bit-pattern to symbolic names
- use a more recent version of unix/tclAppInit.c
- fix syntax in predefined
- let serializer call "init" of attributes, even if it is protected
- fixing "-parameter" with empty content
- more variable naming cleanup
- fix line breaking in serializer for "exportedObjects"
- call c-implemented methods directly, when this is safe
(implemented for XOTE_ALLOC, XOTE_CLEANUP, XOTE_CONFIGURE,
XOTE_CREATE, XOTE_DEALLOC); this improves create/destroy
speed by up to 15%
- allocate namespaces for objects less eager
- make naming more consistent
(change newObj into newObject when variable is an xotcl object)
- get rid of misleading RCS: lines
- passing --prefix to subdirs
- regenerated configure files
- added stefan's expat library linking extension
- define RecreateObject() for internal call via direct invocation
- doCleanup is just called by recreate; merge it into
XOTclCRecreateMethod.
Is method cleanup necessary? is recreate not sufficient?
Delete "cleanup" from internally called methods in next,
keep it for compatibility in XOTcl
- make XOTcl_FrameDecls transparent (use variable declarations
in place instead of the macro)
- fix variable shadowing bug in error handling
(could cause crashes when initcmd lead to errors)
- call all truly essential methods directly if possible
(Object.destroy, Class.alloc, Class.dealloc, Class.create)
The basics of XOTcl can work now also in cases,
when these are not defined as methods.
- handling OBJECT-frames in CallStackPopAll()
(for handling exit with active stack frames)
- deactivate filters in finalize
- new method InvokeMethodObj() to replace finally CanInvokeDirectly()
- remove some more obsolete RCS Ids
- call Tcl_Objs "Obj", not "Object"
- replace all CanInvokeDirectly() by InvokeMethodObj()
- block call-stack deletes during XOTCL_EXITHANDLER_ON_SOFT_DESTROY;
however, this seems to create a small leak during exit
(relevant for threads); so currently, debug still turned on
- fix last issue, with freeing objects, when exit happens from
higher stack frames
- first part of allowing arbitrary named internally called methods.
- move refcount fixing logic for exit from higher stack-frames to new function: finalObjectDeletion()
- created new functions:
ObjectSystemFree(), ObjectSystemAdd(), ObjectSystemsCheckSystemMethod(),
ObjectSystemsCleanup(), GetObjectSystem(), CallDirectly()
for better separation of systems. We keep track which essential system
methods are defined and which which methods are potentially overloaded.
- replaced hard-coded method calls for XOTE_DEFAULTMETHOD, XOTE_INIT,
XOTE_OBJECTPARAMETER with MethodObj()
- renamed MethodObj() to XOTclMethodObj() (it is an exported symbol)
- eliminated XOTE_MOVE
- eliminated XOTE_RESIDUALARGS
- eliminated XOTE_UNKNOWN
- eliminated XOTE___UNKNOWN
- renamed __unknown to requireobject
- provide prefix for internally called methods to distinguish between
methods called on objects or classes
- handling of minimal object systems. For example, the
following three command create an object system around
::object and ::class ...
::xotcl::createobjectsystem ::object ::class
::xotcl::alias ::class + ::xotcl::cmd::Class::create
::xotcl::alias ::object - ::xotcl::cmd::Object::destroy
... where no internal message dispatch are used (e.g. no
constructor "init", and where just two methods ("+" and "-")
are used to create and destroy objects
- extended regression test
- get rid of reminder of tcl 8.4 compatibility and remove range of
ifdefs, such as PRE85, FORWARD_COMPATIBLE, TCL85STACK,
CANONICAL_ARGS, USE_COMPILED_VAR_RESOLVER
- rename CallStackPush() to CscInit()
- rename CallStackPop() to CscFinish()
- remove "buffer" from compiled var structures
- remove xotcl1 dependency from aol-tcl
- removed conditional var table creation by assertion
- make clean compile with assertions turned on
- xotcl 1.6.6: make sure to load always xotcl 1 versions when needed
- xotcl 1.6.6: make compilation clean when compiled with assertions on
- xotcl 1.6.6: more cases for the regression test, where we want to load xotcl1 not 2
- xotcl 1.6.6: one more cases for the packaging, where we want to load xotcl1 not 2
- replace hash-lookup in namespace in ObjectHasChildren() by pointer lookup
to reduce namespace dependency.
- fix memcpy size
- add check for optional match arguments in tcl stub generator
- fix potential memory leaks
all "definitely losts" from valgrind (except 24 bytes from Tcl_PkgRequire) gone
- fix a potential ordering problem with cyclic dependencies created by
namespace import commands
- Handle cases, where objects/classes are created with the name
of pre-exiting namespaces. Cases, where pre-existing namespaces
contained classes/objects lead to problems, since xotcl did not
see the object/classes of the pre-exiting namespace as children
of the new object/class.
- Allow to specify last arg of objectparameter to replace scripted init
block. The redefinition of objectparameter allows us to specify whether
no/some/classical/altered/additional arguments should be allowed during
object creation
- Naming
namespaces:
::next
::next-core
file extension:
options:
.tcl
.xotcl
.next
.nxt
file names:
composite words with - instead of capitalization
package names
next::pkgname
next::doc-tools # use - instead of _ or capitalization
Classes
use first name capitalized to distinguish from objects
Objects
typically, first charaction small
- next::core as namespace name not perfect for addressing variables:
set ::xotcl::version ${::next-core::version}
set ::xotcl::patchlevel ${::next-core::patchlevel}
do we need:
checkMethod "::next::core::cmd::ParameterType"
- namespace changes:
mostly due to marketing reasons, the naming of the top-level namespace
changed from "xotcl2" to "next".
reasons: xotcl is hard to pronounce for beginners, sounds like "exotic"
(but who wants to program in an exotic language) has a certain stigma
of strange naming (e.g. "instproc"), is seen as a precursor of tcloo,
the top-level namespace ::xotcl2:: is not very nice either, the separation
of framework and language is not clear.
We have now:
::next (the new object system, former ::xotcl2)
::next::core (framework, primitives)
::xotcl (former xotcl1)
- "::xotcl::use" no longer needed, use Tcl standard mechanisms instead
(e.g. "package req next"; "package req XOTcl", "namespace import ::next*")
- [self next] returns
instead of "proc" and "instproc" => "method"
instead of "parametercmd" and "instparametercmd" => "setter"
instead of "instforward" => "forward"
instead of "instcmd" => "cmd"
prefixed with the modifier "object" when needed
- [self filterreg] returns
instead of "instforward" => "forward"
prefixed with the modifier "object" when needed
- We have now:
::nx (the new object system, former ::xotcl2)
::nx::core (framework, primitives)
::xotcl (former xotcl1)
- naming next scripting framework
::nx::core::existsvar <==> nx::var exists
::nx::core::importvar <==> nx::var import
::nx::core::setvar <==> nx::var set
- copied infoObjectMethod and infoClassMethod decls as comments
to xotcl.c, aligned order of method definitions
- removed "[o exists varname]" from next scripting language
- reanimated "info vars" to show locals in eval method
- provide error messages for [objectproperty ... type ...]
- replace 0 by NULL in calls to GetClassFromObj()
- extended regression test
- use size_t where appropriate
- added nonnull annotations
- Implemented "Class info parameter" in Tcl, aliases for xotcl.
Now both definition of parameters and setting of __parameter are
in Tcl.
- get rid of ":::xotcl::use"
- renamed tests based on next from .xotcl to .tcl
- extended regression tests
- use namespace ::nx::test instead of ::xotcl::test
- use namespace ::nx::serializer instead of ::xotcl::serializer
- rename xotcl1.xotcl to xotcl.tcl
- some cleanup (version variables, etc.) in xotcl.tcl
- renamed tests/method-modifiers.xotcl to tests/method-modifiers.tcl
- changed "require xotcl::test" to "... next::test"
- changed "require next" to "... nx"
- changed "require next::test" to "... nx::test"
- changed "require next::doc" to "... nx::doc"
- added missing ./tests/var-access.tcl to git
- added section about registering filters and mixin to migration guide
- moved and transformed to next tests/mixinoftest.xotcl -> tests/mixinoftest.tcl
- moved and transformed to next tests/object-system.xotcl -> tests/object-system.tcl
- changed pkgIndex reference for .so file from next ot nx
- changed stubs from xotcl to nx
- first part of OpenACS updates
- changed "Serializer.xotcl" to "serializer.tcl"
(package name from xotcl::serializer to nx::serializer)
- added stub for xotcl::serializer for backward compatibility
- changed serializer to new namespaces
- renamed xotcl.tcl to xotcl2.tcl
- added proc finalize to xotcl2.tcl
- renamed mk_predefined.xotcl -> mk_predefined.tcl
- renamed predefined.xotcl -> predefined.tcl
- additional subcommand "info method parametersyntax <methodname>"
returns parameters in a syntax similar to the tcl man pages
- added ability to pass syntax for forwarded methods
via set ::nx::core::signature(::nx::Object-method-forward)
(experimental)
- fixed documentation system to work with actual version
- added undocumented methods for quality control in documentation
- added checks for documented, but unavailable methods in documentation
- added comparison of documented parameters vs. actual parameters in documentation
- added @properties and has_property to the documentation classes.
Current primary purpose: define, which methods are internally-called
- added internally-called to the method object template
- added redefine-protected to the object template
- added methodtype to object template
- some documentation updates
- some indentation/spacing improvements on xotcl.c
- let ".... info method .... METHOD" return values,
when METHOD contains namespace prefix. This can be
used to obtain the parmeter definitions from nx::core
- get forward definition from the original command
- created own directory structure xotcl under library
containing doc, tests, apps, lib etc. and moved
obvious content here.
- adjusted regression test and old documentation
system to work with new structure
old structure
xotcl
apps
actiweb
comm
persistence
scripts
utils
xml
config
doc
library
lib
comm
patterns
rdf
registry
serialize
store
xml
man
tests
unix
win
new structure
nx
config
doc
library
lib
serialize
xotcl
apps
actiweb
comm
persistence
scripts
utils
xml
doc
library
comm
lib
patterns
rdf
registry
store
xml
tests
man
tests
unix
win
- moved some more xotcl specific tests to library/xotcl
- transformed forwardtest from xotcl to next
- moved slottest to library/xotcl
- added new Makefile target test-xotcl
- finished test migration for now
- deactivated __next for now
- iterated through doc.tcl-TODOs
- changed CheckVarName to allow array names like e.g. a(::b)
- extended regression test
- fixed serializer to handle sub-objects of explicitly exported objects
- xotcl.c:
* new function GetObjectFromNsName() to obtain object or class
from a fully qualified namespace name used in method handles (such as e.g.
::nx::core::classes::X)
* new function MethodHandleObj() to return a tcl_obj containing the method handle
* removed obsolete method getFullProcQualifier()
* info methods obtain now object and/or class from fully qualified method
names (method handles) if possible
* return message handles in "current next", "current filterreg" and
"... info filter ... -order", which can be used in "info method .... "
for obtaining more details.
* change all occurrences of "self" in next regression tests to current.
- xotcl2.tcl
* implemented "self" as a proc to provide extensibility and
full backward compatibility; this opens opportunity
to replace now e.g. "self proc" by "current method", etc.
* provide full compatibility for "self next", "self filterreg" and
"... info filter ... -order", returning old-style multiword method handles
(such as e.g. "::C instproc foo")
- changed "next" to current in documentation framework and templates
- updated migration guide, added section for call-stack introspection
- updated serializer for new names
- Introduced $xotcl_target_doc_dir for generated xotcl documentation.
Generate xotcl documentation in this directory.
- moved more (hopefully all) xotcl doc components into library/xotcl/doc
- added interp alias "nx::self" to "nx::core::current method"
- changed "current proc" into "current method" in scripts and tests
- file extension for next scripting .tcl DONE
- changed ::nx::core to ::nsf
- made the "next scripting language" a own, loadable tcl package
(currently named nx, name is subject of change)
- predefined.tcl is now pretty minimal.
- updated to TEA 3.8
- moved all exports of nsf to predefined.tcl
- made imports in xotcl2 and nx explicit
- adjusted path in documentation system for nx/nx.tcl
- Implemented "interp alias" support for classes.
In some cases. interp-aliased classes worked already
without additional code, but e.g. in "... -superclass C ..."
it failed. Without this feature, one could not reuse a
class with a different namespace, unless it was explicitly
"namespace exported" in the source. The problem was the
implementation of "::nx::Attribute", which should not be
exported in nx (most people do a "namespace import ::nx::*")
because there is no need to do so, but ::xotcl::Attribute
should reuse it - without subclassing). .... However,
we still seem to have a problem, when the interp-aliased
Class is exported and imported to a different namespace.
- info methods shows finally "slots" and "slot". Wanted? Actually no.
- removed definition of slots from nx, changed regression tests
examples from slots to ::attribute
- replaced several occurrences of "eval" in nx.tcl and xotcl2.tcl
- implemented parameter option "allowempty"
- extended regression test
- commented out XOTCL_CMD_NOT_FOUND, since it seems to be obsolete by now
- extended regression test to avoid CallDirectly on dealloc (the last place,
where XOTCL_CMD_NOT_FOUND was used)
- implemented return value checker (for scripted and c-implemented methods)
- additional methodproperty returns (for registering a return value checker)
- support for incrementally adding stuff to paramDefs (such as slotobj or return value)
- new c-function ParamDefsNew()
- added regression test for return value checker
- upgraded to TEA 3.9
- nsf: provided scripted support for "require/provide methods"
- nx: new method ":require namespace" ":require method" "require object method"
- added regression test method-require
- removed requireNamespace from nx.tcl (still exists in xotcl)
- replaced "requireNamespace" by "require namespace" in nx regression tests
- updated migration guide
- removed method "autoname" from nx.tcl
- added "method require autoname"
- added "method require exists"
- removed method "filtersearch" from nx.tcl
- added "obj info method filter methodName" to nx
- updated xotcl2 to use new filtersearch implementation
- updated migration guide
- renamed "info method name ..." into "info method handle ...",
since it returned already the handle
- renamed ListMethodName() to ListMethodHandle()
- changed output of "info callable -which ..." from definition to method handle
- renamed "info callable -which ..." into "info callable method ..."
- updated regression test to reflect the changes
- changed "info method filter ...." into "info callable filter ..."
- fixed "o info callable method" in some cases with mixins
- extended regression test
- updated migration guide
- made Class.info, Class.mixin, Class.filter robust against per-object
mixins from meta-classes
- extended regression test
- checked safety of Class.method, Class.alias, Class.setter, Class.forward
- made Class.filterguard, Class.mixinguard, Class.attribute
robust against per-object mixins from meta-classes
- fixed mixin/filter delete methods with guarded operations
- extended regression test
- all methods defined on both, Object and Class are now safe in respect
to per-object mixins with meta-classes
- make slot optimizer more robust
- removed methods object-mixin and object-filter from the interface.
(Caused some duplication of logic in the method "object")
_ added option noforwarder to RelationSlots
- some minor cleanup
- removed XOTCL_METHODTYPE_OBJECT from XOTCL_METHODTYPE_BUILTIN
- default methodtype returns now everything, which is a true method
(except objects)
- methodtype -all includes objects
- the object "slot" does not appear now in the method listing per default
for classes having slots
- changed __invalidateobjectparameter from a method of class
to framework primitiv ::nsf::invalidateobjectparameter
- experimental method-property "class-only": this allows to
make object save against per-object mixins of meta-classes.
the flag is only used in the mixin-resolver
- used for the time being in nx only for Class.info,
but would apply as well for methods defined on both Object and Class.
- use now class-only for all methods methods of meta-classes.
Methods of meta-classes are intended to be applied on classes,
one should not change this via per-object mixins.
- respect class-only in "info callable methods|method"
- extended regression test
- provided relation name "object-filter" to slot filter.
- replaced "obj|cls filterguard name cond" by "obj|cls filter guard name cond"
- replaced "obj|cls info filterguard name" by "obj|cls info filter -guard name"
- replaced "cls object info filterguard name" by "cls object info filter -guard name"
- removed XOTclObjInfoFilterguardMethod()
- removed XOTclClassInfoFilterguardMethod()
- extended regression test
- updated migration guide
- replaced "obj|cls mixinguard name cond" by "obj|cls mixin guard name cond"
- replaced "obj|cls info mixinguard name" by "obj|cls info mixin -guard name"
- replaced "cls object info mixinguard name" by "cls object info mixin -guard name"
- removed XOTclObjInfoMixinguardMethod()
- removed XOTclClassInfoMixinguardMethod()
- extended regression test
- updated migration guide
- deactivated "abstract"
- implemented experimental delegating version of "object as method"
that keeps the original self.
- changed requireNamespace to "require namespace" in lib/make.tcl
- use prefix sub= for methods invoked on "object as method"
- change further instances of "my connection" to "[self]::connection" in xo*comm*
- implemented "object-methods-only" as alternative for prefix for
invoke "object as a method"
- added option "-returns" to Object.method
- added option "-returns" to Class.method
- added subcmd to method/object method in nx
- delete class methods in freeAllXOTclObjectsAndClasses() explicitly
to handle potential double-deletes
- extended regression test for subcmds
- started new interface bundles, objectInfoMethod and classInfoMethod
for using new infrastructure
- added object info methods filterguard, filtermethods, vars to objectInfoMethod
- added class info methods filterguard, filtermethods to classInfoMethod
- built a temporary solution for dispatcher "filter", since forward mangles args
- nx: we have now "obj info filter guard name" instead of "obj info filter -guard name"
- nx: we have now "obj info filter methods ...." instead of "obj info filter ...."
- added object info methods mixinguard, mixinclasses to objectInfoMethod
- added class info methods mixinguard, mixinclasses to classInfoMethod
- built a temporary solution for dispatcher "mixin", since forward mangles args
- nx: we have now "obj info mixin guard name" instead of "obj info filter -guard name"
- nx: we have now "obj info mixin classes ...." instead of "obj info filter ...."
- updated migration guide
- changed info to new interface (partly done for nx, migration for xotcl to be done)
- fixed "info methods" and added "-methodtype all" for setting class-only
- regression test works now until first XOTcl reference
- Changed handling of "child objects": now, they are shown by default.
- At the same time, the subobject "slot" was made protected to avoid
its listing per default in "info methods"
- unified slot parent-object creation handling
- changed XOTcl info to new interface
- reanimated 5 tests in xotcl/tests/testx.xotcl
- reanimated 5 tests in tests/destroytest.tcl
- changed resolve_method_path to __resolve_method_path and made it protected
- fix requiredness of last argument in parametercheck
- return "object" for "info method type ...." when method is an object.
- return valid creation command in "info method definition ...."
when method is an object.
- extend regression test
- eliminated "info classparent" and "info classchildren"
- added tests to xotcl/tests/testx.xotcl to assure equivalence
- back-ported fix for xotcl 1.6.6 reported by kristoffer lawson,
which helps just partly here
- extended regression test
- added class ::nx::EnsembleObject
- factored out DispatchUnknownMethod()
- added flag XOTCL_CM_NO_OBJECT_METHOD to ObjectDispatch() and friends
- added tests/subcmd.tcl
- added methods "defaultmethod" and "unknown" to ::nx::EnsembleObject
(together with a set of helper methods to provide user-friendly information)
- scripted "info slotobjects" to return only objects of class ::nx::Slot
- fixed test with UnknownClass in xotcl/tests/testx.xotcl
- fixed silent (scripted) unknown handler.
- reactivated corresponding regression test
- extended regression tests (call unknown method
with filter with and without unknown handlers)
- make sure to test next to non-existing shadowed
method in connections with filters and unknown handlers
- documented incompatibility of object-invocation via method
interface (due to ensemble objects) in migration guide
- implemented XOTclObjInfoHasMixinMethod() and XOTclObjInfoHasTypeMethod()
- renamed "$obj info hasnamespace" to "$obj info has namespace"
- added "$obj info has mixin $class"
- added "$obj info has type $class"
- extended regression test for parametercheck/objectproperty/is
- updated interface definitions for info methods, sort these alphabetically
- removed "objectproperty .... hasmixin"
- removed "nsf::is ... -hasmixin ...."
- removed type-converter "type=hasmixin"
- adopted emulation layer in xotcl2 accordingly
- added two tests for "info has mixin" to regression tests
- removed "objectproperty .... type"
- renamed isSubType() to IsSubType()
- adopted emulation layer in xotcl2 accordingly
- added two tests for "info has type" to regression tests
- removed "nsf::is ... -type ...."
- adopted emulation layer in xotcl2 accordingly
- extended regression test
- introduced ::nsf::isobject
- replaced in all scripts "::nsf::objectproperty ... object" by isobject
- removed "infoObjectMethod" and "infoClassMethod"
- replaced ::nsf::cmd::ClassInfo2 by ::nsf::cmd::ClassInfo
- replaced ::nsf::cmd::ObjectInfo2 by ::nsf::cmd::ObjectInfo
- changed argument order on objectproperty to make it conformant with Tcl conventions
- updated migration guide
- changed argument order on nsf::is to make it conformant with Tcl conventions
- removed objectproperty, replaced it by ::nsf::is
- move functionality of objectproperty to make "obj info is ..." more efficient
- report "invalid parameter" in nsf::is and parametercheck, even when
no-complain is used.
- fixed reference counting problem with user-defined converters
- added flag -complain to ::nsf::is
- removed ::nsf::parametercheck
- new parameter option "convert" to signal that an application
specific parameter checker should convert the value
(takes the result of the methods as conversion result)
- added parameters for slots "allowempty" and "convert"
- extended regression test
- added handling of parameter options "allowempty" and "convert"
in createFromParameterSyntax
- renamed slot attribute "noforwarder" to "nosetter"
- method parameter can now use option "nosetter" to allow
object parameterization without providing a setter method
(example: "Class create C -parameter {x:integer,nosetter}")
- extended regression test to include "nosetter"
- new flag for configure: "nx::configure checkresult on|off"
- turn off result-checking for non-converters, when checking is off
(per default, it is on)
- extended regressi
- new flag for configure: "nx::configure checkarguments on|off"
- turn off argument-checking for non-converters, when checking is off
(per default, it is on)
- extended regression test for optional argument checking
- reflected changes in /is/objectproperty/info has/info is/ in migration guide
- changed stub naming from "[Nn][Xx]*" to nsf (for next scripting framework)
- checked "my" vs. "nsf::dispatch" in nx.tcl and xotcl2.tcl
- "child objects" are showed per default in "info methods"
- big renaming orgy (BRO):
- changed filenames starting to "xotcl" into filename starting with "nsf"
- adopted Makefile infrastructure accordingly
- removed compile flag XOTCL_METADATA and generic/xotclMetaData.c
- changed compile flag PROFILE into NSF_PROFILE
- BRO continues:
- changed all XOTCL_ into NSF_
- changed all XOTCLINLINE into NSF_INLINE
- changed all XOTCLOBJ_TRACE into NSFOBJ_TRACE
- changed all XOTcl_ into Nsf_
- changed all XOTcl([A-Z]) into Nsf\1
- changed all xotcl into nsf
- changed changeClass into ChangeClass
- changed XOTclpGetObject into GetObjectFromString
- changed XOTclpGetClass into GetClassFromString
- changed callDestroyMethod into DispatchDestroyMethod
- BRO continues:
- overworked function prototype definitions in nsf.c
- renamed some static definitions on the way to follow
Tcl conventions (start with a capital character)
- added flag "-type" to NsfObjInfoChildrenMethod
- added flag "-type" to NsfObjInfoSlotObjectsMethod
- removed dummy argument "pattern" from NsfObjInfoSlotObjectsMethod
- removed NsfClassInfoSlotsMethod (implemented via "children ... -type ...")
- moved "info slots" from nx::Class to nx::Object
(to report e.g. per-object attributes)
- extended regression test
- [::nx::Object info method parameter info] returns now empty instead of error.
- extended regression test
- splitted "info callable" into an ensemble
(submethods have quite different signatures)
- added "info callable slots" with functionality of "info slotobjects"
- removed "info slotobjects"
- handle aliases to (sub)ensemble objects during final
cleanup to improve sharing of logic.
- share definition of "info callable" and "info has" ensemble
between object info and class info
- new function AliasDeleteObjectReference() to delete
aliases to objects
- removed some obsolete functions
- changed "info available" into "info lookup"
(and accordingly c definitions, migration guide)
- pass tclobj instead of string to NsfObjInfoMethodMethod and NsfObjInfoMethodsMethod
- first part of ensemble name resolver. We can resolve now e.g.
[nx::Object info method parameter "info lookup methods"]
- second part of ensemble name resolver, distinguish between
registration object and definition object
- new functions: GetRegObject()
- extended regression test
- fixed handles with subcommands used on objects without namespaces
- new functions: GetRegObject()
- fixed handles with subcommands for class methods when called on classes or objects
- extended regression test
- changed "cls object method ..." and friends into
"cls class-object method ..."
- added "info method subcommands ..." to return list of subcommands (of the ensemble)
- extended regression test
- use always NULL instead of 0 when assigning to a pointer variable
- improve comments in nsf.c
- follow closer naming of Tcl style guide
- removed overhead on ::nsf::dispatch when called with absolute paths
- absolute paths have to start with ":".
- checked equivalence of the following two commands
in respect to fully-qualified names
::nsf::dispatch $obj ::nsf::cmd::ObjectInfo2::hastype $class
::nsf::parametercheck object,type=$class $obj
extended regression test (parameters.tcl)
- renamed "parameter" into "attributes" in nx
- renamed "info parameter" into "info attributes" in nx
- updated migration guide
- fixed several common typos
- documented behavior of upvar/uplevel with aliases on scripted procs
through regression test
- implemented next within ensemble methods
- added regression tests for next within ensembles
- added regression tests for upvar with ensembles
- refactored next and argument passing (new methods
NextGetArguments(), NextSearchAndInvoke() and
CallStackFindEnsembleCsc())
- doing an internal next in cases where a method
ensemble does not contain the called submethod
- added regression tests for partial ensembles
- renamed "... info ... subcommands ..." into "... submethods ..."
- renamed tests/subcmd.tcl info tests/submethods.tcl
- moved relevant tests from tests/parameters into tests/submethods.tcl
- renamed functions in nsfStack.c to follow Tcl naming guidelines
- call internal NextSearchAndInvoke (without NextGetArguments)
from the implicit next in ensemble methods
- made NsfNextMethod() obsolete to ease different noarg handling policies
- new nsf::next cmd. receives 0 or 1 argument, which might be a list
of arguments. This avoids ambiguity of ::xotcl::next with "--noArgs".
- renamed namespace_copycmds and namespace_copyvars to
nscopycmds and nscopyvars (we don't use "_" in nsf::*-names as delimiters
elsewhere)
- renamed __qualify to qualify (it is a non-exported cmd)
- handle next in ensemble with arguments
- extended regression test
- removed obsolete code
- made methods (for now just scripted methods) by default protected.
- provide methode __default_method_protection to obtain the default
method protection when neither protected or public is used.
- per default methods are now protected
- provide ::nx::configure defaultMethodProtection true|false
as convenient interface
- update regression test and serializer to handle default protection
- decide on paths for documentation of next and xotcl 2, with
version numbers; what should be included in distro, what on web-site
- decide on syntax subcomponent. Candidates are
* Object.method
* Object->method
* Object#method
- handling namespaces in documentation
# @object ::nx::Slot
vs.
# @object Slot
(best allow both variants, write fully qualified name via introspection)
- why only @object? there seems to be no @class. what to do with metaclasses?
- systematic way of specifying results of methods
- systematic way of reporting results in documentation
- handle line-breaking in long @definitions (e.g. @param; e.g. via indented next line)
- danger, tcl-commands in comments (see :method get_unqualified_name)
especially for code commented out....
- kann man "[:? {[$attr eval {info exists :default}]}" durch "[:?var :@param ..." ausdrücken?
oder vielleicht besser die variablen mit leerstring initialisieren + infrastruktur anpassen?
- listing von methoden im left-bar, ähnlich http://developer.yahoo.com/yui/docs/YAHOO.util.Connect.html
- "Objects" im left-bar irreführend, sollten eher "Classes" sein. Allerdings sollten
auch objekte dokumentierbar sein
- doc-tools: was machen die argumente von :? (bspw. ops?); ich nehme an, das ist work in progress.
sinnvoll wäre: [:?var obj varname body], da viele (die meisten) operationen
auf anderen objeken ausgeführt werden
- die Dokumentation der Objekt- und Klassenmethoden muss aus gentclapi weg
und in predefined.tcl und xotcl2.tcl hineinwandern. Es werden nicht alle
möglichen methoden in next und/oder xotcl2 registiert, ein paar namen sind
anders, etc.
- fixed a crash for tcl 8.6b1 in return value checking.
now it complains about missing cmdPtr; it is not clear, why this
is missing at the first place in 8.6b1 while working in 8.5
- improved library/lib/make.tcl once more
- fixed handling of TclNRRunCallbacks, such that coroutines can be easily
used (more testing required)
- added temporary routine ::nsf::yieldcheck for coro debugging
- renamed Tcl85showStack() to TclShowStack()
- Big internal changes for handling nre-enabled procs in more
situations. Handles now all nx regression tests, but fails in
testx.xotcl (just nre-enabled)
- passing part of dispatch flags in cscPtr->callType
- runs now full regression test NRE enabled, but still much debugging and
options for less conservative behaviour
- some cleanup concerning TCL_STACK_ALLOC_TRACE
- make ::nsf::next and ::xotcl::next NRE-enabled
- make coloncmd are NRE-enabled
- make every internal method invokation (NsfCallMethodWithArgs()
and CallMethod()) NRE-configurable
- use "Nsf" prefix for global vars to avoid potential conflicts
- minimal support for sane-NRE patch
- failed so far to make my NRE-enabled
- new compile-flag for tracing: NRE_CALLBACK_TRACE
- extended regression test (added test for 8.6 apply)
- renamed tests/coroutines.tcl to tests/tcl86.tcl
- some refactoring for making code structure more sane for NRE
(but not done yet)
- save snapshot; refactoring in order to ease NRE
development with unified method and dispatch exit.
- named debugging cmds __db_*
- new cmd __db_run_assertions to perform checking of the internal state
- simplification and unification of unknown handling and method finalization
- some cleanup
- make "createobjectsystem" more robust (allow to provided not fully
qualified names).
- added tcl-cool as an additional sample-object-system for nsf
- changed internal method name requireNamespace to "require_namespace"
- changed debug command __db_yield (unportable between various 8.6b* version)
into __db_show_stack
- some more cleanup
- provide flag for DispatchDefaultMethod() to control immediate execution.
- nre-enable DispatchDefaultMethod() for simple cases
- removed TCL85STACK_TRACE
- renamed cscPtr->callType to cscPtr->flags, since this is now more appropriate
- some more minor cleanup
- changed "info method lookup -application" into
"info method lookup -source application"
- introduced "info method lookup -source application|baseclasses|all"
- updated migration guide
- extended regression test
- provide debugging output when varFramePtr in GetSelfObj() is NULL
- filter misleading "proc" entry for "info frame" for nsf-stack entries
- add "method" for "info frame" for nsf-stack entries
- defined SKIP_LEVELS to omit optionally skipping of
tcl-stack entries in GetSelfObj()
- added scripted replacement for binary nxsh
- new define SKIP_LAMBDA to make apply tests working without SKIP_LEVELS
- renamed ::nsf::cmd::ObjectInfo into ::nsf::methods::object::info
- renamed ::nsf::cmd::ClassInfo into ::nsf::methods::class::info
- renamed ::nsf::cmd::Object into ::nsf::methods::object
- renamed ::nsf::cmd::Class into ::nsf::methods::class
- removed capitalization from exit handler interface
- reduced interface of exithandler to
::nsf::exithandler set|get|unset ?arg?
- renamed/removed remaining ::nsf::commands with capitalized names:
parametersFromSlots ==> parametersFromSlots
unsetUnknownArgs ==> __unset_unknown_args
infoError removed
- renamed predefined.tcl into nsf.tcl
- remaining cmds in nsf (except __*) containing
"_": ::nsf::provide_method, ::nsf::require_method
- removed DISPATCH_TRACE
- moved return-value checking into ObjectDispatchFinalize()
- perform invariants checking after cmd execution, not additionally before
- commented dispatch machinery
- added nxwish.in (scripted replacement for former xowish)
- added xotclsh.in (scripted replacement for former xotclsh)
- added xowish.in (scripted replacement for former xowish)
- added error handling to all scripted shells
- removed old xotclsh.in and xowish.in (from apps/utils)
- altered xotcl.m4 to nsf.m4 in
.,
library/xotcl/library/store/XOTclGdbm/,
library/xotcl/library/store/XOTclSdbm/,
library/xotcl/library/xml/TclExpat-1.1/
- removed traces of xotcl.m4
- removed build flags with-nxsh, with-xowish
(since these are scripted now)
- removed flag --with-tk (not needed anymore)
- removed NXSH and XOWISH from Makefile.in
- used Tcl_ObjCmdProc in prototypes
- allow CMETHOD to be target of calling-object/calling-level
- added NSF_CSC_CALL_IS_TRANSPARENT to handle proc aliases transparently
- access self in NsfProcAliasMethod() from tcl->object;
- added public|protected to output of "info method definition"
(needed to make serializer more sane, necessary on the longer range)
- reduce size of output of serializer
- make nx::Object.serialize public
- XOTcl 2: allow info slots for objects as well
- serializer:
* added support for ordering on aliases referencing other objects/classes
* provide shared version of the method warn via alias
and removed direct output to stderr
- slots:
* change name "initcmd" of "experimental slot features" to
"defaultcmd" to avoid naming conflict the the initcmd executed
at the initialization of a slot object (effects XOTcl as well)
* make defaultcmd/valuecmd/valuechangedcmd working for nx
(absence of trace method)
* provide error message, when default/defaultcmd/valuecmd are used
non-exclusively
* make sure to init per-object slots after copy operations
* make nx::Attribute.destroy more defensive
* extend test cases
- nsf: added flag NSF_DESTROY_CALLED_SUCCESS in addition
to NSF_DESTROY_CALLED to distinguish between attempted
and successful destroy method invocations (important for
cleanup)
- fix potential crash in
::nx::Object info method definition ::nsf::methods::object::instvar
- "info method submethods": return all submethods, independent
from protection
- serializer: experimental code to serialize submethods
- new option "-expand" for "obj|class info methods" to
return compound names (i.e. it lists the full ensemble names)
Example:
::nx::Object info methods -expand "*filter*"
returns
filter {info filter guard} {info filter methods} {info lookup filter}
- allow ensemble names in nsf::methodproperty
- fix compound name lookups when aliases link to shared ensemble objects
- make objectName() NULL-safe
- fix option "-source application" when applied directly on base-classes
- extend regression test
- nsf.c: use name "varTablePtr" instead of "varTable" when referring to the table
- new option "slotcontainer" for "methodproperty" to flag slotcontainer to make
them easier to process in the serializer
. don't report slot container in "info methods -expand"
- new function "::nx::isSlotContainer" to centralize checking for slotcontainers
(used by serializer)
- support export of method ensembles in serializer
- "info lookup methods": order of non-pos parameters alphabetically
- added option "-expand" to "info lookup methods ". It collects
ensemble methods along the precedence path
- added support for ensemble methods in "info lookup method"
- extended regression test
- provide full set of ensemble methods from EnsembleObject.unknown
(i.e. from all classes along the precedence order. It was necessary
to pass calling object as first argument)
- "info method parametersyntax" returns now for all nonpos args the
type instead of "arg" when possible (eg ..... ?-x object? ....)
- extended regression test
- factored out ParamGetType() to obtain from a paramPtr a type string
- parametersyntax:
* changed "... -x arg ..." into ".... -x value ..."
* changed multiple values notation from "list" to "..."
- nsf::current: new option "methodpath", returns the full name of an ensemble
method starting from the ensemble root.
- documented functions in nfsStack.c
- removed obsolete CallStackGetFrame(), replaced by CallStackGetTopFrame()
- push stack frame before calling the defaultcmd of an ensemble object to
make implementation more simple.
- simplified EnsembleObject.defaultcmd and EnsembleObject.unknown significantly,
scripted support methods are removed.
- extended regression test for "current methodpath"
- allow %method in forwarder.
- defined unknown methods as call-protected
- make __default_method_protection protected
- added syntax "?arg ...?" in parameter syntax output for "args"
- removed "info forward" from nx::Object and nx::Class
(can be replaced by "info methods" and "info method")
- Methodpaths can be used now in the definition of "method",
"alias" and "forward." We do not support it for "setter"
and "attribute", since these require a parameter spec,
which does not have clear semantics for a method path.
- scripted definition of nx::Object.forward and nx::Class.forward
- cleanup of __resolve_method_path
- change TclShowStack into NsfShowStack() to avoid possible interference
with the Tcl* namespace
- made the following function static to avoid pollution of the
global link namespace: CompiledColonVarFree(), GetRegObject(), ParamGetType()
- changed option -expand in "info methods" and "info lookup methods" into
"-path" to associate with the method path
- changed method property name from "protected" to "call-protected"
- changed nx::defaultMethodProtection to nx::defaultMethodCallProtection
- nx::defaultMethodCallProtection is used for
scripted methods, forwarders and aliases
- added nx::defaultAttributeCallProtection,
used for setter and attributes
- call scripted converters without checking protection
- removed defaultMethodCallProtection from tests/parameters.tcl
- Implemented built-in-converter for "baseclass" and "metaclass".
Change in performance for this call. >8 times faster
before: parameters/parametercheck.007: 19.49 mms, ::nsf::is baseclass C
after: parameters/parametercheck.007: 2.32 mms, ::nsf::is baseclass C
- remove scripted definition of "baseclass" and "metaclass"
- keep track of defaultMethodCallProtection and defaultAttributeCallProtection
in serializer
- cleanup aol-xotcl.tcl and document usage in aolserver and naviserver
- iteration over TODO file
- removed obsolete entries from generic/nsf.decls und generic/nsfInt.decls
- removed NSF_CMD_NOT_FOUND
- fixed aliasing warning for gcc 4.4.4
- removed CheckAllInstances()
- added functionality to show enumerated values in
"info parametersyntax"
- extended regression test
- added experimental code to avoid "variable :x" crash based
on shadowCommands, but this does not work, when variable is
bytecompiled. deactivated for now.
- added support for aolserver (essentially Makefile + aol-xotcl.tcl)
- removed unneeded content from serializer output
- the two flags "-objscope" and "-nonleaf" are for adding frames,
and they are mutual exclusive. Make them a single flag?
check if both options are in every case sensible.
possible realizations:
-scope object|method
-varscope instance|proc
-varscope instance|resolver|none
-frame object|method|default
* instance|object: within this method, all non-prefixed var names
refer to instance variables; the method can use most
probably not "next"
(actually, only needed for XOTcl)
* method|proc|resolver: within this method, we can use colon-prefixed
variables; the method can use "next"
"object" könnte mit dem -per-object (dem registierungpunkt)
leicht verwechselt werden. es ginge auch
-varscope instance|method
allerdings, meint method eigentlich "scripted method".
"none" would be dangerous for "-frame", since it could imply
to avoid frame stacking at all.
effected are:
alias, forward, dispatch
für "alias" betrifft das in gleicher form auch die cmds,
bei "dispatch" und "forward" gibt es dzt. kein "-nonleaf"
- replaced "-objscope" and "-nonleaf" by
"-frame object|method|default"
for nsf::alias and nsf::default
- added functionality for "-frame method" to nsf::dispatch
- made the order of argument in ::nsf::alias and method "alias"
the same (always first the method, then "-frame ...")
- extended regression test
- renamed some arguments of tcl interface to increase consistency
- make requiredness explicit for nsf::cmds
- introduce ::nsf::parametersyntax to provide syntax for potentially
missing definitions
- provided ::nsf::parametersyntax for 3 ::nsf commands
and 7 nx methods (from relationslots)
- fix requiredness of several info methods
- added "nsf::configure debug ?level?"
- use "nsf::configure debug" for
value 1: complain about protected
value >1: provide load messages for nx and xotcl
- unset unneeded variables in ::nx namespace
- copied decls for objectMethod and classMethod as comments
to nsf.c, fixed order
- documented a few functions
- enabled nsf::__db_run_assertions in nx::test
(lead before to false positives in destroy-test)
- eliminated deleted objects and objects from deleted
namespaces in GetAllInstances()
- added handling of unstacked csc entries (removed all DEBUG warnings).
- made handling of unstacked entries optional by defining
macro CHECK_ACTIVATION_COUNTS)
- added macro NSF_DEVELOPMENT for toplevel handling
if NDEBUG and CHECK_ACTIVATION_COUNTS
- cleanup of method-modifiers.tcl
- updated next migration guide
- follow current Tcl convention for patchlevel var:
- changed name of ::nsf::patchlevel to ::nsf::patchLevel
- changed content ::nsf::patchLevel from eg .0 to full
number including release details
- fixed bug in ::variable with colon-prefixed name
(shadowCommands does not help, see above)
- removed traces of Nsf_VariableObjCmd()
- extended regression test
- provided parametersyntax definitions for XOTcl 2.0
similar to nx for all methods without a spec
(e.g. fur builtin Tcl cmds, forwarders)
- make sure not to return CompiledLocal vars
from InterpColonVarResolver() when TCL_NAMESPACE_ONLY
is requested.
- delegate always from InterpColonVarResolver() to
other resolvers, when TCL_NAMESPACE_ONLY is requested.
- implemented exported command ::nsf::self as fast convenience
replacement for "::nsf::current object".
- removed bug-alert from nx.tcl (wrong false-positives for
compiled locals in slots)
- added a few small optimization. nsf appears to run on
the shootout benchmark the same speed like a year ago
(which much less functionality)
- added a few more small optimization.
- code-generator: don't call argument parser,
when no arguments are specified
- fixed bug when calling aliased proc not via method interface
- fixed bug when calling destroy in initcmd
- allowed public|protected for method deletion
such as "Object public method foo {} {}"
- removed defaultMethodCallProtection in alias test
- extended regression tests for aliases to procs
- renamed nx regression tests .test to follow tcl conventions
- added regression tests for destroy-during-init
- removed debugging from NsfCleanupObject when compiled without DEVELOPMENT
- removed debugging from CscFinish when compiled without DEVELOPMENT
- changed CallStackGetActiveProcFrame() to return also CMETHD frames
This allows to execute :volatile in a initcmd and to delete the
object at its end. As a consequence, code like
[CopyHandler new -volatile] copy [::nsf::self] $newName
has to be changed to
CopyHandler new {
:copy [:uplevel ::nsf::self] [uplevel set newName]
:destroy
}
- renamed CallStackUseActiveFrames() to CallStackUseActiveFrame()
and ctx->framesSaved to ctx->frameSaved to reflect implementation
- new function MethodNameString() to obtain name without colon prefix
from tcl_obj
- fix bad interaction between filters and cmd name resolvers
- output object frame to ease interpretation of [info frame]
- fixed scoping issue, when "-volatile" was used for object creation
- added regression test for interaction between filters and
function resolver (and volatile)
- reactivated new volatile test in destroy.test
- undone temporary fixes for volatile in serializer and nx.tcl
- improved NsColonVarResolver, made some assumptions explicit
- gentclApi.tcl: added optimizer rule for single argument of type tclobj
- improved speed of CompiledLocalsLookup slightly
- added an experimental code for setting parent namespace path as
default for child-objects. At the time when an object namespace is
created, the namespace path of the parent object is copied to the
child as default value.
- added new contains definition based on "apply" instead of
"namespace eval". Main intention is to replace SKIP_LEVELS
by SKIP_LAMBDA
- added functionality to use ":attribute contains:method,nosetter"
- added regression test for contains and attributes of type method
- activated SKIP_LAMBDA in nsfCallstack. As a consequence, we
disallow resolving self/my ... from tcl-proc frames
(use uplevel if necessary, avoid "namespace eval")
- improving error messages from argument parser
- test "namespace current" and "self" in "contains" and "slots" regression test
- added "nosetter" automatically, when attribute "<name>:method" is used
- fix a bug, where "o configure" (without arguments) resetted
initialized values to the defaults.
- show "unwind unstacked entry" message appear only when debug level>0
- removed fixed TODO entries
- New function NsfNamespaceInit() to initialize pre-existing
namespaces in PrimitiveOInit() and in RequireObjNamespace()
- provide error message, when provided setter name starts with a colon
- Make sure that DispatchDestroyMethod() calls as well protected destructors
- New function NSCheckNamespace() as replacement for NSCheckForParent()
- pass parentNsPtr around instead of recomputing it in NSCheckForParent()
- removed unneeded argument from NSGetFreshNamespace()
- switched to DString operations in NameInNamespaceObj() (seems slightly faster)
- factored out NSRequireParentObject()
- by the measures above, we obtained some speed improvements
- moved some more debug output to be controlled by the debug-level
- extended regression test with testcases for creation of parent
objects via method "__unknown"
- disallow object parameter of type "switch" to avoid possible
confusion between (a) providing a value for the o.p., (b) calling
it as a setter, and (c) calling it as a getter. For providing a
value, no arg is used for switch. For calling a setter, it is
necessary to provide a value even for a switch.
- disallow type "switch" in setter definition (use boolean instead)
- disallow type "switch" for positional arguments (use boolean instead)
- extended regression test
- configure.in: removed --with-tclinclude option, since it
appears to be included in tcl.m4 (since a while). Many thanks
to Victor Guerra for noticing it.
- perform relation handling in objectparameters outside of object-frame
- For preexisting namespaces, we do not set the deleteProc. Is this
desired? Should nsPtr->deleteProc be moved to NsfNamespaceInit()?
.... It is ok on the current labor distribution between object and
namespace: if an object is deleted, it takes care about the deletion
of sub-objects, not the namespace. However, it might be an option in
the future to overthink this strategy and to bush (sub)object
deletion into the namespace deletion.
- work on replacing SKIP_LEVELS by SKIP_LAMBDA for OpenACS (works with
regression test, has problems with OrderedComposite::ChildManager.init)
Note concerning treating CMETHOD_FRAME like METHOD_FRAMES: we did
this change for NsfCallStackFindLastInvocation(), but nsfStack.c has
still several occurrences, where they are treated differently.
- changed relation handling by evaluating the relationcmd in the parent
context to keep evaluation order.
- extend introspection "nsf::configure objectsystem": the command
returns now all system methods in the syntax of nsf::createobjectsystem
- "nsf::createobjectsystem" creates now a warning when an existing
objectsystem is redefined and ignores the new definition attempt.
This was done with the purpose to allow
"package forget nx; package require nx"
- Allow overwriting of redefine protected method during bootstrap
to ease "package forget nx; package require nx"
- forward had just "-objscope", no general "-frame method|object".
Since forwarder have client data, they always push a method frame.
So, the situation is different to nsd::alias and ::nsf::dispatch.
Therefore, the flag "-objscope" was renamed to "-objectframe"
to provide better consistency with "-frame object"
- fixed bug, where error handling of invalid options in
ForwardProcessOptions() could lead to a crash
- return forwardoption "-earlybinding" via introspection
- extended regression test
- provide a more explicit way to handle resourcing after a "package
forget" in the info methods (similar to Stefan's suggestion).
- xotcl2.tcl: added empty namespace eval to make package indexer happy
- nx.tcl: removed debugging output
- nx.tcl: added syntactic sugar to "method" and "alias" for
return value checking. One can write now:
Class create C {
:public method foo {a:int b:int} -> int {
return [expr {$a + $b}]
}
}
- extended regression test
- changed returns syntax from '->' to '-returns'
- xotcl2: fixed and completed results of "info instforward" and "info forward"
- serializer: fixed handling of nsf::configure options
- nx: added "-returns" to forwarder
- added regression test for forwarder and returns
- rebuild pkgIndex.tcl more eagerly
- added error handler to pkg_mkIndex when called via "make libraries-pkgindex"
* just show warning and errors when rebuilding pkgIndex files
* stop make in case of errors in pkg_mkIndex
- don't leave error message when __default_superclass (or
__default_metaclass) is not set
- Fixed switching between INACTIVE_MIXIN frames to ACTIVE_MIXIN frames
- Extended regression test
- make handling of redefinitions in system methods more robust
- follow Tcl naming convention (uppercase functions)
- Don't allow to call objects as methods (for the time being) via
absolute names. Otherwise, in line {2} below, ::State is
interpreted as an ensemble object, and the method "unknown"
won't be called (in the XOTcl tradition).
{1} Class ::State
{2} Class ::State -parameter x
- Converted migration guide to asciidoc
- Overhaul of several sections in asciidoc
- Developed styles for nx for migration guide (.css and source-highlight)
- fixed bug in xotcl 2.0 "info forward"
- extended regression test
- NSDeleteChildren: delete objects before classes
- NSDeleteChildren: delete here aliases as well
- fix potential crash when "next" is called from a non-proc frame.
- nx.tcl: cleanup of forward implementation
- xotcl2.tcl: cleanup of forward implementation
- xotcl2.tcl: provide debug version of default init method
- nsf.c: acquire parameter structure for returns more lazily
(otherwise, a serializer handling returns would acquire the
structure for every argument)
- extend regression test
- xotcl2.tcl: fix the default init handler
- nsf.c: provide warnings when unchecked parameter values might conflict with nonpos args
- provide a generic logging interface
* predefined for plain Tcl and aolserver/naviserver
* C-level: NsfLog()
* Tcl-level: ::nsf::log
- quote name of referenced parameter in error message to ease reading
- new parameter checker "parameter", performing an approximate checking
for valid parameter specs
- set NSF_ARG_CHECK_NONPOS only when there are multiple arguments
- remove space checking in values for NSF_ARG_CHECK_NONPOS in favor of parameter checker
- make "... info children ?pattern?" compliant with XOTcl 1;
if pattern contains no wildcard and is no absolute path, nsf completes it.
(eg. Object create o; Object create o:x; o info children x" will return ::o::x)
- extended regression test
- introduced a few forms of multiplicity
* 0..1 allow empty value
* 0..* list, can be empty (equivalent to 0..n)
* 1..* list, cannot be empty (equivalent to 1..n)
- deprecate multivalued in parameter specs in favor of multiplicity
- deprecate allowempty in parameter specs in favor of multiplicity
- adjust regression test
- fixed bug with required last object parameter without provided value
- extended regression test
- new printf-style error message generator: NsfPrintError()
- simplified error handling: removed NsfVarErrMsg() and NsfErrMsg()
and replaced it by NsfPrintError()
- testx.xotcl: fix messages when test fails
- further cleanup of error procs: eliminated NsfObjErrArgCnt()
- improve error message, when too many arguments are passed
- extended und overworked migration guide (added e.g. multiplicity)
- extended regression test
- added returns handling for nx in serializer
- extended regression test
- provide warning if non-positional argument is passed more than once
- made error messages more consistent
- improved error messages for "returns" and "nsf::is" (omit parameter name)
- streamlined error messages
- removed NsfErrBadVal() and replaced it with a generalized version of NsfObjErrType()
- "/obj/ info method parametersyntax /method/": return results of
::nsf::parametersyntax in case, the parametersyntax cannot obtained
from a parameter definition (e.g. the method is a forwarder to a tcl
cmd).
doctools
- interfaces in documentation for slots (see for more details
::nx::Class#superclass in nx.tcl)
- handle object methods as well in quality checks
- why does one have to specify @superclass rather than determining the
superclass via introspection?
- use tcl parametersyntax for short description of commands/methods
- deal with internally called methods (can be overloaded by the application)
* user-called and internally called (e.g. from "create" or "new")
XO_c_create_idx, XO_o_destroy_idx, XO_o_move_idx,
* not documented yet:
XO_c_requireobject_idx, XO_o_defaultmethod_idx, XO_o_init_idx,
XO_o_objectparameter_idx, XO_o_unknown_idx
* only XOTCL2:
XO_o_cleanup_idx, XO_o_residualargs_idx,
text
- use term "callprotection" in documentation for public|protected
(to be consistent with "... info methods ...")
- reduce indenting for code examples in documentation
(high indentation makes readability worse).
i use usually just 2, 4 are ok as well; we should decide.
- removed method "setter" from nx
- removed method "setter" from migration guide
- nx method "attribute": changed name of nonposarg from "slotclass" to "class"
- fix bug for "C class-object attribute foo" (incorrect forwarder)
- extended regression test
- doctools: changed "-slotclass" to "-class"
- nx::test: made differences in regression test easier to read
- serializer: updated serializer to avoid calls to "setter"
- extended regression test
- fixed in bug in ensemble-next (removed colon-prefix from methodname
in next)
- extended regression test
- Experimental Object-System specific resolver in method bodies
(allows resolving to the "right" next, self, etc. without
namespace imports/paths)
- deactivated automatic namespace path copying for child-objects
- extended regression test
- added deletion functionality to nsf::mixin
- moved handling of methodNames of c-cmds to ResolveMethodName()
- extended regression test
- nsf.c: renamed MethodNameString() to MethodName() (for consistency
with ObjectName() and ClassName())
- raise error, when "obj :method ..." is invoked (colon misleading und not necessary)
- remove colon from method name in error message "unable to dispatch method ...."
- extended regression test
- nsf.c: code cleanup and documentation improvements
- made assertion code optional
- added and renamed additions compile flags
NSF_WITH_INHERIT_NAMESPACES
NSF_WITH_OS_RESOLVER
NSF_WITH_ASSERTIONS
- added flag NSF_WITH_VALUE_WARNINGS
- defined nsf::deprecated as tcl proc, using ::nsf::log
- some minor refactoring
- "info parameter": return :switch as parameteroption for
C-defined cmds, when a nonpos-arg gets no arguments
- updated regression test
- added experimental ::nsf::proc for realization of procs with next
scripting argument passing. These nsf::procs improve the
orthogonality of the code (using e.g. nonpos args and value checker
for procs) and allows the same introspection interface (info method
parameter|parametersyntax, ...)
- removed unneeded functions: NsfComputePrecedence(), NsfComputeDependents(),
Nsf_SetVar2Ex(), NsfOSetInstVar(), Nsf_ObjGetVar2(), NsfOGetInstVar(),
qNsfCreateObject()
- removed unneeded external declarations: NsfClassListAdd() NsfClassListFree()
- make extern declarations explicit
- grouped most extern definitions together
- improved documentation
- moved variable declarations to inner scopes
- removed warning from cppcheck()
- added block for none-one-liner if statements
- added methodtype "nsfproc" to "... info methods ...",
to be used with namespace qualified names
- return "nsfproc" as methodtype for nsfprocs
- refactored InvokeShadowedProc()
- some minor code cleanup and improved documentation
- added flag "-ad" to ::nsf::proc for obtaining the semantics of
ad_proc in OpenACS (boolean with no arguments, append "_p" to
variable names)
- added "... info method definition ..." for nsfprocs
- new function DStringAppendQualName() to append qualified name
to a DString
- removed obsolete function NSCmdFullName()
- serializer.tcl: export nsf::procs via "Serializer all"
- nsf::proc: alloc shadowed methods in ::nsf::procs
- new helper function ::proc strip_proc_name to strip nsf::procs prefix
- improve error messages
- reduce verbosity
- removed the following obsolete macros:
ALLOC_NAME_NS, ALLOC_TOP_NS, ALLOC_DSTRING
- some refactoring of the argument parser
- argument parser handles now as well OpenACS like single-word
parameter values (such as ... -flag=1 ....)
- improve error messages and warnings for nsfprocs
- extended regression test
- no need to define "-class" as objectparameter
- no need to define "Object.cleanup" as a method
- let "obj class NEWCLASS" return NEWCLASS
- doc-tools: added "-where" to !get
- doc-tools: title to internal links, provided css class, added nicer label
- updated reference doc
- removed leftover -public flag in nsf::method
- general cleanup: removed unused arguments
- defined UNUSED macro to get more checking on unused arguments
- nx::pp: added flag "-linenumbers on|off" to render method
- added first version of next-tutorial.[txt|html]
- xotcl2.tcl: defined ::xotcl::MetaSlot
- make sure, that classes of the intrinsic class hierarchy are
of the same object system
- add regression test
- removed c-implementation of method vwait, it was replaced
by "vwait :varName". We had to allow flag TCL_GLOBAL_ONLY
in InterpColonVarResolver(), since Tcl vwait implementation
calls it with that flag.
- added a scripted implementation for vwait in xotcl2
- added regression test for vwait
- removed TCL_VWAIT from the code, since we have it in git
- nx.tcl: defined method unknown as protected
- nx.tcl: never pass "substdefault" to a setter
- nx.tcl: define a minimal value-checker any to suppress warnings
for potential conflicts with non-positional parameters, when the
values start with a dash
- doc-tools.tcl: make -name parameter of method new always required and "any"
- doc-tools.tcl: make object parameter of Entity of type "any"
- nsf.c: added wideinteger to list of value-checkers
- nsf.c: provide context for warning messages
- extended regression test
- next-tutorial: documentation updates
- add explicit reference counting for oacs-style flag value passing
- parameter specs: use "arg=" in object parameter type "method" as
name of a called method to allow to call unregistered methods
- eliminate protected method "noinit" for nx and allow it just as an
object parameter
- added first implementation of object parameter type "forward"
- renamed object parameter type "method" to "alias"
- removed parameter option "slotobj=" in toParameterSyntax
- renamed to [from|to]parameterSyntax to [from|to]parameterSpec
- serializer.tcl: reactivated methodSerialize
(used in api-browser of OpenACS)
- nx.tcl:
* new method requireClass to Combine two classes and return the
more specialized one
* make slot objects for parameter aliases and parameter forwarder
instances of ObjectParameterSlot
* get rid of attributes "isforward" and "isalias" and replace it
by "disposition"
* complete list of predefined value checkers
* we have now three approaches for providing parameter
-object-filter and -object-method
Approach 1: create RelationSlot with nosetter
Approach 2: use parameter forwarder
Approach 3: use parameter alias
we switched from approach 1 to approach 3
- extended regression test
- fixed potential crash with missing parent namespace
- added shadowing for ::tcl::info::body to allow "info body"
to be called on ::nsf::procs
- commented nsfShadow.c
- added regression test
- removed NSF_INFO
- fixed potential access to freed memory (actually when checking if
namespace was removed by Tcl); found this problem when compiling Tcl
with SYSTEM_MALLOC (own modified version of tclThreadAlloc.c)
- fixed memory leak (namespace names and structures)
- nx.tcl:
* full rewrite of slot machinerie, much simpler structure
* relation handling via parameter aliases instead of pseudo converter
* mixinclass SlotOptimizer removed
* new class BootStrapAttributeSlot
- ConvertToRelation() and handling of parametertype "relation"
- Make CompiledColonVarFetch() more robust in case of
half initialized objects (create vartable on the fly if needed)
- allow empty parameter options in parameter parser
- removed nsf::parametersfromslots (became simple, part of objectparameter now)
- removed hardcoded objectparameter (attributes, volatile and noinit)
- updated regression test
- updated class diagram
- nx.tcl: needsForwarder is true, when method "get" is specified on a slot
- nx.tcl: Don't generate per-slot add/assign handlers, when not needed
- nsf.c: fixed a nasty bug within namespace deletion, when a deletion
of one tcl cmd caused implicit deletions of other cmds in the same
namespace. The classical idiom for looking over hash tables with
Tcl_GetHashValue() and Tcl_NextHashEntry(hSrch) can lead to crashes
(and has different behavior depending on the number of buckets).
- added regression test
- nx.tcl: added default/initcmd for ObjectParameterSlot
- added ::nx::Object as default for "superclass" slot
to make default superclass explicit
- unified interface for getParameterOptions
- extended regression test
- update class diagram of slots
- new function Nsf_NextHashEntry() simular Tcl_NextHashEntry(),
but handles triggered hash entry deletions
- fixed reference count in AliasDeleteObjectReference()
- nsf.c: changed handling of cmdPtrs in call-stack content.
* we use now explicit reference counting using
NsfCommandPreserve/NsfCommandRelease
* as a consequence, we do not need the following
functions Nsf_DeleteCommandFromToken() and
CallStackClearCmdReferences() any more.
* the flag NSF_CSC_OBJECT_ACTIVATED is not needed
anymore and was removed
- removed a small memory leak when a destroy method of an object o
deletes its grandparents namespace, containing also this class of o
(and its methods). Significantly eased by the change above.
- use NsfCommandPreserve/NsfCommandRelease for tcd->aliasCmd as well.
In case of epoched cmdPointers, refetch the cmd and it client data.
- added regression tests
- added flag to AliasGet() to leave optional error message if alias
data is removed
- some cleanup in NsfProcAliasMethod(): handle not existing alias data,
more careful refcounting
- added experimental flag WITH_IMPORT_REFS to deactivate automated
alias deletion (seems, that this solves all issues we had before)
- added flushing of bytecode on alias registration
- added regression test
- update slot UML diagram
- fixed incorrect (unwanted) call to unknown that caused creation
of objects names __unknown when classes could not be resolved
- nsf::relation: fixed error message when receiving and invalid
class for relation type "class"
- updated documentation
- reanimated NSF_PROFILE (when activated, needs more stack and slows execution slightly down)
- fixed a problem with object-level alias
- nsf.c: provide low-level commands for managing profile data
- nsfStack.c: provide hook to obtain callers information in profiling code
- nx.tcl: provide caching for computed values of object slots to make
method objectparameter nearly twice as fast; direct changes on slots
require a reconfigure call.
- nsf.c: removed SUBST from shadow commands (does not appear to be
necessary any more)
- nsf.c: fixing a memory leak (some substituted values were not freed correctly)
- nsf.c: fix potential crash for epoched cmds
- some minor updates for profiling support
- The fix of yesterdays subst reference counting bug triggered an
other problem: If the last arg was "args", the flags array for
checking the need for decr of refcounts was not extended. There are
multiple possible fixes, i have just extended the flags array for
now as well.
- When profiling is activated, perform now a more sane shutdown order,
all hash tables are now correctly freed.
- Improve behavior, when object system creation fails
- Drop function NsfProfilePrint()
- Altered Nsf_NextHashEntry() to re-init hSrchPtr when the number
of expected entries differs from the number of real entries. This
fixes a bug that Michael Aram detected, that happens when multiple
hash buckets exist, but on deletion of an hash entries triggers
some other deleted from the same hash table.
- extended regression test.
- made default setting more compatible with XOTcl 1
* set variables to defaults only when not set already
* flag init_called already before init is called, not afterwards
(a call to "configure" within init does not clear the already
set instance variables)
- extend regression test
- configure: added flag --with-profile to enable profiling support
- cleanup and documentation of nsf-specific interp state
- nsf::configure: added an option "profile on|off" (per default off)
- profiling: return object data with method information
- the following is obsolete since valgrind 3.6
=========== reminder for valgrind testing
svn co svn://svn.valgrind.org/valgrind/tags/VALGRIND_3_5_0 valgrind
curl http://bugsfiles.kde.org/attachment.cgi?id=36999 > 10.6.patch
mv 10.6.patch ./valgrind
cd valgrind
patch -p0 < 10.6.patch
./autogen.sh
./configure ./configure --build=amd64-darwin
make
sudo make install
====================
- doc:
* This package contains 12 classes.... 3 objects ....
Why are all these marked with "mismatch"?
* (optional) protected method elimination in left bar
* heading "Glossary" missing.
It ist not clear, what the list of items is, when one sees index.html
* make quality checks (missing documentation, ...) optional?
how to deal with non-resolvable quality checks?
* provide a renderer for XOTcl @-notation to produce object structure
for the new doctool (makes the old documentation usable, eg. for XOTcl2)
- first steps towards DTrace support
- DTrace:
* track objects in method invocations
* trace result codes in method-return
* add some DTrace sample scripts
* add DTrace header file dependency
* add --enable-dtrace flag for configure
* --enable-dtrace sets DTRACE_OBJ on mac os x empty (since not needed for mac os x DTrace)
* added "nsf::configure dtrace on|off" for skipping package initialization
(to be handled in D script)
* make compilation clean
* extended README file
* handle self->tracing in D scripts (and in dtrace/sample.tcl, tests/object-system.tcl)
* add probes for object creation and freeing
* add sample d-script for object bookkeeping
* renamed object-create into object-alloc (counterpart of object-free, no confusion with create)
* fire probes as well for classes created by the object system
- configure
* make "configure --help" more pretty
* simplify configure.in
- added first version of "nsf::methoddelete"
- extended regression test
- updated TODO
- fixed potential crash with -param:switch
- added "... info method exists ...."
- updated migration guide
- changed names of method handling commands in nsf:
::nsf::methodproperty => ::nsf::method::property
::nsf::method => ::nsf::method::create
::nsf::methoddelete => ::nsf::method::delete
::nsf::alias => ::nsf::method::alias
::nsf::forward => ::nsf::method::forward
::nsf::setter => ::nsf::method::setter
::nsf::provide_method => ::nsf::method::provide
::nsf::require_method => ::nsf::method::require
(updated regression test, docs, ...)
- Fixed cases of -flag=$value for type switch outside the context of
"nsf::procs -ad"
- extended regression test
- removed hardcoded name "init" from CallConfigureMethod()
- improved documentation
- removed isInitString()
- changed names of var handling commands in nsf:
::nsf::existsvar => ::nsf::var::exists
::nsf::importvar => ::nsf::var::import
::nsf::setvar => ::nsf::var::set
- improved misleading error message for method modifiers "public" and
"protected", as well as for "class-object"
- extended regression test
- serializer: catch for object-level alias apparently
not needed anymore (search for ns_cache_flush)
- silence compilation when compiled without DTrace
- nx:
* removed methods ::nx::Class.alloc and
::nx::Class.dealloc from predefined method-set
* added definitions such that these methods can be loaded via
::nsf::method::require ::nx::Class alloc
::nsf::method::require ::nx::Class dealloc
* make explicit that "method ... require" returns a method-handle
* removed misleading reference in error message, when a class-spefic
method was called on an object; solution is somewhat dangerous for
potentially unknown client data
* added regression tests
* removed methods ::nx::Class.recreate and
::nx::Class.recreate from predefined method-set
::nx::Object.configure from predefined method-set
* added definitions such that these methods can be loaded via
::nsf::method::require ::nx::Class recreate
::nsf::method::require ::nx::Object configure
nsf:
* added CallDirectly() wrapper for calls to "init"
* reactivated "configure", since we plan to use it more prominently
* added a configure flag for "class"
* removed method "class" (should be used via "/obj/ configure -class ...")
* removed method residualargs from nx
* added C-implemented method "init" for orthogonality
* allow specification of system method handles in nsf::createobjectsystem
* automatically register alias, when system-method handle
was provided and a same-named method is defined
* provided a fast path implementation for "defaultmethod"
* provided default system methods for "init", "defaultmethod" and "unknown"
* provided handles for system methods "alloc", "dealloc", "recreate", and
"defaultmethod"
* strip in dispatch invocations of "unknown" potential leading colons
* removed c-level implementation of init again, since scripted one can
be used now as well in registration of createobjectsystem
* reduced verbosity
* added definitions such that these methods can be loaded via
::nsf::method::require ::nx::Object unknown
* added methods ::nsf::methods::object::class and
::nsf::methods::class::superclass in order to make faster and nicer
looking objectparameters (compared with forwarders)
* nx: changed parameter -class to use ::nsf::methods::object::class
* ns: fixed chicken egg problem of method objectparameter needing
objectparameter by creating/destroying slot Class::slot::dummy;
otherwise default values for slots would not be available
* reduced verbosity of parameter forwarder
* Hopefully the last big naming change:
Instead of writing "C class-object method foo {} {...}"
one can write now "C class method foo {} {...}" to define
a class method named "foo" for class "C". This naming change
became possible by defining XOTcl's "class" (and "superclass")
as object parameter only. To change a class of an object o,
one has to use "o configure -class NEWCLASS". The term
"object-class" looks alien to language beginners, the term
"class" is much more straightforward. Changing classes
or superclasses is seldom used by typical application programs.
For already existing nx scripts, changing "object-class" into
class should be straightforward.
* various documentation updates (migration guide, nx tutorial)
* fixed bad interaction between filter and parameter alias
* some documentation/todo updates
* fix compilation for tcl-head in fossil
* deactivate coro regression test, since it is apparently broken
for tcl-head in fossil (stack frame seems to be lost after a yield)
* make sure to create the cmds for objects with Tcl_NRCreateCommand()
to choose trampoline-path in the trunk version of Tcl
* The newest trunk version of Tcl in fossil has TclStackFree() and
TclStackAlloc() removed We had to substitute this
functions. Unfortunately, the lifetime of the strack structures has
changed, so we had shuffle some internals around.
- nsf.c: remove unnecessary test when compiled without NRE
- nsf.c: make sure, validCscPtr is always initialized
- tested all regression tests with valgrind against tcl-trunk
- gentclAPI.tcl:
* renamed "nsfCmd" to simply "cmd", since the code can generate arbitrary
tcl commands
* allow type "int" in the .decl files
- nsf.c
* move several functions from "static" to "external" to make
the code generator usable for submodules as well
- added flag ?-type ...? to "info lookup slots"
- made all useful converters external symbols
- added flag ?-type ...? to "info slots"
- delete accessor when slot is destroyed
- added pattern to "info slots"
- added to "info slot /attName/"
- Fixed dispatch of defaultmethod for ensemble methods
- Added compile flag DISPATCH_ALWAYS_DEFINED_METHODS (deactivated).
So far, nx just uses dispatch on overloads or filters, but not on
defines (possible to call e.g. "destroy" from a script, but
internally the direct dispatch is used, as long there is no
overload). The compileflag would force to use the slower
dispatch always.
- Extended regression test
- Improve locality
- Let "info slot" return the slot object
- nx::mongo: Initial commit of the experimental mongoDB interface for nx
- nx.tcl: fix handling of arg in converter
- nx::mongo:
* first step towards handling embedded objects
* one more example script: example-nx-bi.tcl
- nsf:c: fix dispatch of setter without current method
- extended regression tests
- nsf.c: added nsf::var::unset (provided so far just var::set)
- nx::mongo:
* added mongo::count
* obtain _id from mongo::insert
* added mongo::Object.delete method for embedded and
non-embedded objects
* handling of mongo-embedded objects when destroying objects
* simple bson pretty print function
* extended examples
* handle fetch of embedded objects
* added method count for mongo mapped classes
* improve documentation
* added handling of bson types for timestamps and dates
* provide setup based on mongo_db, mongo_collection and mongo_ns
* implemented type "reference" similar to "embedded"
* all referenced objects are for the time being auto-dereferenced
* new method "show" for mongo mapped classes
* added two new example files example-nx-reference-many.tcl and
example-nx-reference-one.tcl
* replaced "arg" by "type" in spec for mongo attributes to make
spec less strange
- nsf.c: made potentially unknown clientData more safe (error message,
when something is passed via clientData to a method expecting
an object/class as clientData).
- renamed NsfNoDispatchObjectError() to NsfDispatchClientDataError(),
extended interface
- Makefile.in: fixed name methods.test
- nsf: renamed nsf::isobject to nsf::object::exists
- nsf: renamed nsf::qualify to nsf::object::qualify
- nx.tcl: added support for positional object parameter and
removed special handling of the last argument for the init block;
added attributes "position" and "positional" to ObjectParameterSlots,
removed last argument of method "objectparameter"
- nx.tcl: simplified createBootstrapAttributeSlots
(second round of default value setting seems not necessary)
- nx.tcl: some cleanup
- test.tcl:
* don't export Test per-default
* define Test as nx::Test
* make Test parameter count 1 the default, change to higher numbers where needed
- nsfmongo.c:
* upgrade to newest c-driver (version 0.3) from git.
* support connection to replica sets
* support attribute selection lists for ::mongo::query
(positive and negative selection)
- nx-mango.tcl:
* support for unique indices
* support for query operators "in" and "all"
- extended migration guide (introduction, feature lists, etc.)
- serializer:
* prefix warnings to ease tracking of warnings
* some cleanup for handling aliased methods
- nsf.c:
* moved implementation of ::nsf::method::delete to C
* produce same error messages when methods are delete
via nsf::method::delete and nsf::method::create {} {}
* Prohibit deletion of methods during shutdown. Otherwise
when destructors delete methods, some other destructors
depending on these methods will fail. Cleanup deletes
all methods anyway.
* Provided alternative (faster) way of dispatching
nsf::procs (can be tured off with NSF_INVOKE_SHADOWED_TRADITIONAL)
* renamed NsfMethodCmd() into NsfMethodCreateCmd() for consistency
* nsf works with OpenACS again (requires new nstrace.tcl,
aolserver-openacs.tcl, and 01-debug-procs.tcl).
- nsf.c:
* factor out NsfClassListAddPerClassMixins()
* factor out NsfClassListFind()
* let result of "cls info heritage" return per-class mixins
as well, otherwise it would be useless, since
"cls info superclass -closure" would return the same
* replaced loops with NsfClassListFind()
- nsf.c:
* handle direct dispatches for aliased methods
* new generalized error message: NsfNoCurrentObjectError()
- nx.tcl: replace loops ::nsf::methods::[object|class]::*
by explicit command registrations
- nsf.c:
* added NsfClassListNoDup() to allow just single inserts
* added NsfClassListPrint() for debugging
* info heritage returns no duplicates
* added prototype for NsfNoCurrentObjectError()
* report "no current object" when no object is
passed to a method.
* code cleanup
- extended regression test
- nsf.c:
* ensure that explicit per-object-mixins are kept at the front in "info
heritage" order and in "info precedence" when classes are added as
POMs and PCMs
* extended regression test
- nsf.c:
* renamed old flag "-order" of "info mixin classes" to "-heritage"
since it computes same heritage as in "info heritage" (but
potentially for a list of classes)
* added compatibility layer for xotcl2
* added lost option "-heritage" to "/cls/ info mixin classes"
(was only there for "/obj/ info mixin classes")
* extended regression test
- nsf.c
* first version of c-bases "info slots" for classes
* switch "-closure" just for class info method
* added switch "-source" to "info slots -closure"
and "info lookup slots"
(similar to "info lookup methods")
* extended regression test
* base objectparameter on "info slots"
- nsf.c
* added "pattern" to "info lookup slots"
* added "pattern" to "info slots"
* extended regression test
- nx.tcl, xotcl2.tcl: removed unsafe {*}$pattern
- added:
"info slot handle /name/"
"info slot parameter /name/"
- nsf.c: Since the method "objectparameter" is just based on the class
(and object parameters are invalidates as well over the class), we
moved the method from obj to class to avoid potential confusions
- nsf:c
* added C-implemented class level method
"info objectparameter list|name|parameter|parametersyntax"
* added enum to handle different print styles for parameters
* renamed ParamDefsList() to ParamDefsNames(), added true ParamDefsList()
- nx.tcl:
* removed "info slot handle" and "info slot parameter"
* added "info parameter spec", "info parameter list",
"info parameter name", and "info parameter syntax"
* extended regression test
- nsf.c:
* Added argument "-reg-object" to ::nsf::method::create to
distinguish between a registration and a definition object for
ensemble methods, similar as on other places. If no reg-object is
provided, it is the same as the definition object. One should
take care that the registration objects are deleted after the
definition objects, which is the case for the usages of the
reg-objects in nx/xotcl.
* The namespaces within plain scripted methods and scripted
ensemble objects are now the same.
* Extended regression test
* Code cleanup and documentation
- nx.tcl:
* added method "delete" to delete methods and attributes
* extended regression test
- nsf.c: removed all but one occurrence of Tcl_AppendElement()
- nsf.c: removed all occurrences of Tcl_AppendElement()
- nsf.c: passed around resultObj explicitly
- nsf.c: fix and document GetMatchObject()
- extend regression test
- nx.tcl:
* splitted method "delete" into a "delete method" and
"delete attribute"
* remove flag "-per-object" in method "delete"
* delete per-object methods of classes with
"/cls/ class delete method name" and
"/cls/ class delete attribute name"
* extended regression test
- added test cases for "info slots"
- nsf.c:
* handling of same named per-object and provided slots for Class objects
* per-object slots are saved now under <obj>::per-object-slot::*
* returning correct results when per-object slots are used
* removed obsolete functions: NsfObjectListFree(), NsfObjectListAdd()
* removed obsolete type NsfObjects
* transformed ComputeSlotObjects() into a more generic AddSlotObjects()
that can handle per-object slots as well
- nx.tcl:
* generalized slot object handling.
* extended regression test
- xotcl2:tcl
* made "info heritage" in xotcl2 compatible with xotcl1
* fixed "info slots" in xotcl2
* extended regression test
- nsf.c: require NSF_IS_SLOT_CONTAINER for slot-container
- nx.tcl: ne proc ::nx::setSlotContainerProperties to handle slot
container properties in a uniform way
- reduce verbosity
- nx.tcl: improve code documentation
-nsf.c: added c-implementation of "/object/ info slots" to
share implementation details and reduce scattering
- migration guide
* included change in "info heritage"
* included "info slots"
* included "info parameter"
* included "delete method"
* included "delete attribute"
- nsf.c: NsfRelationCmd() returns per default list of actual
values, therefore mixin add|... return now as well the
actual values
- nx.tcl: added "info parameter slot" to return slotobject(s)
- added "info parameter slot" to migration guide
- extended regression test
- nsf.c: changes to use trunk-branch with and without TclStackAlloc()
- migration-guide: add third level to toc
- fix regression test for 8.6 to use nx prefix
- nsf.c: added cmd "::nsd::method::registered /handle/" that returns
the object on which the method identified by the handle was registered,
or empty.
- extended regression test
- bring defined commands in the source code in alphabetical order
- generate interface for NsfUnsetUnknownArgsCmd()
- delete some obsolete code
- added "link" from 2.4 (parameters) to "info parameters" in migration
guide
- remove alias warnings from gcc under ubuntu (4.2.4)
- nsf.c: fixed possible crash in tcl8.6 with nsfprocs, still one inconsistency
- nsf.c: fixed bad interaction between mixins and ensembles in tcl8.6
- nsf.c: document two more functions
- nsf.c: removed unneeded casts to (ClientData)
- nsf.c: generalized disposition handling (forward, alias, initcmd) for
object parameter
* disposition is now an option for object parameters rather than
than an own type. Therefore, one can check the arguments passed
to the disposition cases
* changed specification of name of method from arg= to method=
* this way "type" info in "info parameter syntax" is handled automatically
- nsf.c:
* added a new converter for converting mixins with guards (named mixinspec)
* used mixinspec in nx.tcl and xotcl2.tcl
* extended nx regression test.
* added profiling support for nsf::proc when
NSF_INVOKE_SHADOWED_TRADITIONAL is turned off.
- removal of unneeded flags "-incontext" and "-nomixins" from
* /obj/ info methods
* /cls/ info methods
These flags are correct for "info lookup", but unneeded for
"info methods"
- cleanup of ListDefinedMethods()
- nsf.c: use NsfObjectRefCountIncr() instead of object->refCount++
- nsf.c: fix small memory leak for nsf::is in error cases
- renamed converter from "mixinspec" to "mixinreg"
- Use mixinregObjType as well in NsfRelationCmd(), so this is the only
place, where mixin and guards are processed.
- Since the type converter converts Tcl-Objs, we have less context
information (e.g. we have no base class, on which we can decide to
call e.g. __unknown on on of the objects systems). - because of the
point above, i removed ::xotcl::Class->__unknown and
::nx::Class->__unknown in favor of a global proc ::nsf::unknown, for
which unknown handlers can be registered
- GetClassFromObj() receives as last argument "withUnknown" instead of
baseClass to indicate, when unknown should be tried.
- new function NsfCallUnknownHandler()
- moved mixin reg type converter to a new file (nsfObj.c)
- added NsfFilterregObjType, to provide a converter for filter
registration similar to mixin registrations
- replaced dummy dupIntRepProc and updateStringProc in nsfObj.c by NULL
- fixed memory leak in "... info mixin classes -heritage"
- added tests for integer, wideinteger and bignums
- added value checker type int32 (similar to "string is integer") and
changed value checker "integer" to accept all integers
- library/mongodb:
* use type int32
* updated to new nx/nsf interfaces
* updated for mongo-c-driver post 0.3
(supporting result MONGO_OK for mongo_cursor_next)
* factored out "mongo cond" from "mongo query"
- fixing part of the memory leak introduced for bignum handling above
(for some unknown reasons, we see crashes from mp_clear)
- extend regression test
- improve bignum conversion handling further
- found memory leak in tcl
- provided nicer registration and inspection interface for unknown handlers
- added documentation for unknown handlers in tutorial
- cleanup of __unknown
- added handling for provided arguments to positional object parameters with
disposition alias and forward
- provided better error messages for unknown parameter options
- provided error messages for multiple disposition parameters
- reduce redundancy by introducing macro NSF_ARG_METHOD_INVOCATION
- gentclAPI.tcl:
* renamed "nrArgs" to "nrParams"
* switched default for nrargs from 0 to 1
- gentclAPI.decls:
* added "-nrargs 0" where needed
-nsf.c:
* switched parameter logic from default for nrargs from 0 to 1
* simplified logic to detect additional arguments in argument parser
* improved error message for missing required argument
- regression tests:
* added disposition.test
* extended regression test
- xotcl2: use filterreg instead of plain arg for registration of filters
- nsf.c:
* improved source code documentation
* added parameter option "args" in order to get eventually rid of
hard-wired call to residualargs.
* improved a few error messages
* fixed object parameters consisting only of plain parameters
(previously, no parameters were returned in this case, e.g.
for method parameters; but object parameter code depends on it)
- extended and updated regression tests
- nsf.c:
* added refcounting to parameter definitions (needed, when
aliased object parameter redefined the actual objectparameters)
* removed hardcoded call to remaining args
* switched implementation of xotcl2 to use object parameter with
parameter option "args"
* removed residualargs from object system definition
* extended regression test
- nsf.c:
* Don't output non-consuming procs (which are always called)
via parametersyntax (shows, what a user can input)
* additional command ::nsf::object::initialized to check whether
an object is already initialized
* new function DispatchInitMethod() similar to DispatchDefaultMethod()
* let residualargs call init directly instead of doing it the indirect way
* provided ability to call init with object parameters at arbitrary
times
* switch from Tcl_ObjCmdProc style interface (ClientData first)
to a C style interface for DispatchDefaultMethod(), DispatchUnknownMethod()
* bring cmd definitions for nsf::object in right order
- extended regression test
- genAPI.decls and nsf.c: bring cmds in same order
- nsf.c: align naming conventions
- renamed gentclAPI.decls to nsfAPI.decls
- renamed tclAPI.h to nsfAPI.h
- added nsf.m4 to git for the time being
- mongodb:
* added preliminary gridfs interface
* refactored some code
* added new types for "gridfs" and "gridfile"
* added new example file example-nsf-gridfs.tcl
- nsf.c: no good reason to disallow user defined types for for alias,
forward or initcmd
- library/nx/nx-zip.tcl: added a zip file generator as package
- nsf.c:
* new file nsfPointer.c
* generic new value checker ConvertToPointer to handle c-level
conversions (which can be registered from nsf extensions)
* extern defined interface for the pointer converter:
Nsf_PointerTypeLookup(), Nsf_PointerTypeRegister(),
Nsf_PointerAdd(), Nsf_PointerDelete(),
Nsf_PointerInit(), Nsf_PointerExit().
- library mongodb
* changed mongoAPI to pointer converter interface
- C-code generator:
* additional parameter "-withObj" to allow passing
of internal representation and the according TclObj *
* c-implemented methods: report types in "info parameter" for
more builtin types.
* use "-withObj" in mongodb interface
* adapted regression test
- mongodb interface:
* mongo::gridfile::seek: added a seek command for gridfiles
* added example for the low-level interface to show how
to access gridfs via the plain mongodb interface, how
to add some additional metadata (e.g. dublin core meta
data) and how to retrieve this via the gridfile interface
- nsf.c:
* report only fully initialized slot objects via "info slots" to
avoid chicken-egg problem during method "objectparameter"
* added flag -array to ::nsf::var::exists to check, whether
the variable is an array (to avoid "o eval {array exists ...}"
in the serializer.
* provided flags to VarExists instead of multiple args
* don't add new pointer entries in Nsf_PointerTypeLookup()
- preliminary fix for volatile called through residual args
- new regression test file volatile.test
- fix the comparison with "unknown" in residual args
- provide backward compatibility for unknown method (when
method contains spaces).
- some minor cleanup
- extended regression test
- fix typos in string "unknown"
- reduce verbosity
- reduce scope of variables
- renamed ObjectParameterSlot attribute from nosetter => accessor
(positive formulation)
- nsf.c: make sure to always initialize variables
- first draft of separation of attribute -> variable + accessor
- library/mongodb:
* updated to current interface in git HEAD
* added flag timeout to mongo::connect
* added new index options "-sparse" and "-background"
- regularized more nsf::* names:
renamed "nsf::createobjectsystem" => "nsf::objectsystem::create"
renamed "nsf::unknown" => "nsf::object::unknown"
renamed "nsf::dispatch" => "nsf::object::dispatch"
- generalized "nsf::object::initialized" to
nsf::object::property objectName initialized|class|rootmetaclass|rootclass|slotcontainer
- nx: factor out method createFromParameterSpec
- method variable:
* check default value
* added shortcut, when no slot object is needed
* extended regression test
- nx::Attribute: changed method 'checkInstVar' to 'setCheckedInstVar'
- set only fresh variables via per-object method "variable" and "attribute"
- added flag -noncomplain to per-object method "variable" and "attribute"
- extended regression test
- added support for "class variable"
- added tests for "variable" + multiplicity and "class variable"
- provide error message, when method variable is a noop
(e.g. no value provided and no accessor is wanted)
- added tests for object specific "variable" and "attribute
+ application defined value checker
- library/mongodb:
* updated to current interface in git HEAD
- nx.tcl: added switch "incremental" to "variable" and "attribute"
- added regression test
- nsf.c: improve performance (branch prediction) by using
likely/unlikely macros for gcc
- nx.tcl:
* added support for "variable" on the class-level
* added flag "noconfig" to object parameter options
* parameters with "noconfig" are omitted in
"info parameter syntax" and "info parameter list"
* used switches for all configurable boolean options for
"variable" and "attribute"
* regularized the interface of "variable" and "attribute"
* extended regression test
- fixed a possible crash in the ExitHandler:
Object create o {exit -1}
- nsf.c:
* added flag "-array" to nsf::var::set such we have
now "::nsf::var::set ?-array? object varName ?value?"
With "-array", nsf::var::set behaves like "array get"
or "array set" (on instance variables)
* use "::nsf::var::set -array" in serializer symmetrically
to scalar case
* extended regression test
- nsf.c:
* fixing compilation with NSF_MEM_COUNT
* New function DeleteProcsAndVars() to trigger deletion of
ParamDefs (fixes a small memory leak);
* improved comments
* improved INCR_REF_COUNT/DECR_REF_COUNT for easier
tracking of potential refcount errors
* added macros DECR_REF_COUNT2() and INCR_REF_COUNT2()
for easing the association of refcounts to locations
in the code by providing names for refcounts.
* fixed a refcount bug for valueObjs in non-NRE-enabled
versions in the argument vector of scripted methods
(found via INCR_REF_COUNT2/DECR_REF_COUNT2)
- nsf.c:
* refined refcounting debugging
* fixed various refcounting bugs, especially
in error cases.
* added explicit INCR_REF_COUNTs on Tcl_Objs
with 0-refCount to ease debugging
* added explicit names for refcounting for "paramDefsObj"
* added explicit names for refcounting for "freeList" (for forwarders)
* provide debug-refcounts for "NSNamespace"
* provide debug-refcounts for "nextArgumentVector"
nsf.c:
* change DeleteProcsAndVars, such it deletes procs and vars
explicitly in all namespaces
* added more sanity checks for parameterContexts,
testing in ParseContextRelease() in DEBUG mode
* provide debug-refcounts for "pcPtr.objv"
* provide debug-refcounts for "pcPtr.clientData"
nsf.c:
* provide debug-refcounts for "class.activationCount"
* provide debug-refcounts for "object.activationCount"
* deactivated CHECK_ACTIVATION_COUNTS oer default
* tested refcounts with Tcl 8.6b2, found bug in Tcl and submitted patch to sourceforge
http://sourceforge.net/tracker/?func=detail&aid=3383616&group_id=10894&atid=110894
- nsf.c:
* fixed a bug in "info parameter list|... name" when the named
parameter is not found (returns now empty, before, it was
returning the full list).
* added flag "-nocomplain" to nsf::var::unset
- nx.tcl
* added "delete variable" analogous to "delete attribute"
* unset instance variable for object-level "delete attribute"
* extended regression test
- library/mongodb:
* updated to current interface in git HEAD (resp.
"git checkout v0.4")
- nx.tcl:
* fixed copy for object created with new
* copy returns now the fully qualified name of the copied object
* extended regression test
- library/mongodb:updated to current interface in git HEAD
- nx.tcl: implemented copy without a provided name. If argument
of copy is omitted, the copied object is created with a fresh
name (i.e. created with the method "new"). Example
set x [o copy]
- extended regression test
- nx.tcl:
* added protected and public for "require method"
The following forms are now valid
"... require public method"
"... require protected method"
"... require method"
"... require public class method"
"... require protected class method"
"... require class method"
* extended regression test
- library/mongodb:
* replaced NsfMongoGetHostPort() with the newly available
function mongo_parse_host()
* updated error codes according to git head
* factored out mapping of error code to string
- nsf.c:
added cmd __db_compile_epoch for compile-epoch introspection
- Mystery solved, why in the script below the interp>compileEpoch is
incremented, when D is redefined, but in other cases not. In the
script below the method D.init is compiled by tcl, since it has a
trivial body. Therefore, a redefinition of D will remove this
compiled body and all its potential usages. Therefore the
interp->epoch is incremented. If the body is e.g. "return", the
epoch is not incremented (observed with Tcl 8.5.10)
=================================================
# -*- Tcl -*-
package require XOTcl; namespace import -force ::xotcl::*
package require nx::test; namespace import nx::Test
Class C; C c
Class D -superclass C
D instproc init args {}
Test new \
-count 100 \
-pre {
puts stderr ===create-D;Class create D; puts stderr ===D-created;
Class E; Class E1; Class X -instmixin {D E E1}} \
-cmd {X info instmixin ::E*} \
-expected {::E ::E1} \
-post {foreach o {D E E1 X} {$o destroy}}
Test new \
-count 100 \
-pre {Class D; Class E; Class X -instmixin {D E}} \
-cmd {X info instmixin ::E*} \
-expected {::E} \
-post {foreach o {D E X} {$o destroy}}
Test run; exit
=================================================
- nsf.c:
* enabled MEM_COUNT debugging for multi-threaded
apps. We collect the MEM_COUNT statistics now
per interp. Therefore, we have to pass around
"interp" in case where alloc() and free()
or refCount functions are used (textually,
a big change)
* verified, that nsf runs clean in aolserver/naviserver
(all INCR_REF_COUNTS all balanced)
* added paramPtr->name to MEM_COUNT tracing
* renamed NEW_STRING to STRING_NEW
* added STRING_FREE, calling MEM_COUNT macros
* checked all ckfree in nsf.c, everything allocated
is covered by the MEM_COUNT macros
- nsf.c: fixed autoname problem with code from tcl trunk
- fixed book-keeping for TclNamespace refcounting such that now
alias.test, destroy.test and test.xotcl run now clean,
2 test are still open with tcl 8.5.10 (contains.test and xotcomm.test)
- documented functions in nsfTrace.c
- updated next-tutorial to the current naming conventions
- added tests for using submethod handles
- changed Stack example in tutorial from constructor to :variable
- allow just valid specs for :attribute and :variable methods
- improved error message for invalid parameter specs (with leading colons)
- extended regression test
- library/mongodb:updated to current interface in git HEAD
-nsf.c:
* move to greedy assert to an inner scope ("info method ...")
* allow testwise "switch" as object parameter (when it is used,
accessors are deactivated for this attribute)
* extended regression test
- nx.tcl: extended object-parameter "switch" implementation:
now, accessors of type boolean are created, when type "switch" is used.
- nsf.c: implemented "... info method origin ..." which returns the
implementation handle (in contrast to the registration handle) of
a method.
- nx.tcl
* renamed "attribute" to "property"
* renamed "defaultAttributeCallProtection" to "defaultPropertyCallProtection"
* renamed "nx::Attribute" to ""nx::VariableSlot"
* renamed "BootStrapAttributeSlot" to "BootStrapVariableSlot"
* renamed "createBootstrapAttributeSlots" to "createBootstrapVariableSlots"
* removed method attributes
* implemented old "attributes" definition in xotcl2 as method "parameter"
- nx.tcl
* renamed "info parameter name" to "info parameter names" (since it returns a list of names)
* renamed "info parameter name" to "info parameter names" (since it returns a list of names)
* renamed "info slots" to "info slot objects"
* additional method "info slot definition"
* additional method "info slot name"
* additional method "info properties" (alias to "info slot definition")
* removed "info parameter slot"
* use term "noaccessor" and "noconfig" to deactivate accessors or object-parameters
in property definitions
* don't show slots with noconfig in "info parameter names"
* don't show slots with noconfig in "info parameter definition"
* renamed slot property "configparam" to "config"
* renamed "::nsf::methods::class::info::slots" to "::nsf::methods::class::info::slotobjects"
* additional public method ObjectParameterSlot.getPropertyDefinition
* updated and extended regression test
- nx.tcl:
* added "/obj/ info slot definition"
* added "/obj/ info slot name"
* added "/obj/ info properties" (alias to "/obj/ info slot definition")
* extended regression test
- nx.tcl:
* added parameter option incremental for "property" and "variable"
* removed the nonpos argument "-incremental" from "property" and "variable"
* adapted regression test for these cases
- new folder example-scripts
* Added 8 of the rosetta examples and one classical OTcl example
* all examples are tested via regression test
* all examples are pretty-printed via asciidoc
* added example rosetta-abstract-type.tcl
* added example rosetta-unknown-method.tcl
* added ./apps/utils/source-doc-beautifier.tcl
* fixed the file-handle output/formatting in rosetta-serialization.tcl; using proc "!"
- nsf.c:
* fixed next path computation in cases where command handles
are used to refer to methods in the current mixin order.
* extended regression test
- nx.tcl:
* made "/cls/ class ..." using ensemble methods and therefore extensible.
* This introduces some definition order dependencies in nx.tcl and
some redundancy ("class filter" and "class mixin"), but maybe
this can be eliminated.
- nsf.c:
* fixed "nsf::my -local ..." (never worked in nsf)
* added regression test
- documenting current behavior
* test method-handle + next + dispatch (unwanted)
* test "my -local" vs my + method handle
* test "my -local" vs dispatch + method handle
- nsf.c:
* added preliminary/minimal "private" support
* private can be called via "my -local", direct
dispatches are forbidden, ignored in mixins
and next;
* extended regression test
* fixed name path in unknown called from ensemble
methods (erroneous colon could show up)
* added -system flag to:
- ordinary dispatch (e.g. "o1 -system info vars")
- nsf::object::dispatch with plain methodName
- nsf::my (mutual exclusive with -local)
- nsf.c:
* change mem-count statistics from per-interp to per-thread
* generalized GetObjectFromCmdTable() to ReverseLookupCmdFromCmdTable()
* changed GetObjectScreenedByCmdName() to GetHiddenObjectFromCmd()
* modularized interp.test to locate potential problems faster
* partly simplified interp.test syntactically
* deactivated a few tests in interp.test for the time being
(runs commands after finalize)
* re-established assertion checking for deleted cmds in cmd lists
* added flag "-keepvars" to nsf::finalize for handling cases in interp.test
* reactivated tests and simplified interp.test
- disposition.test:
* remove/check exit (see comments in the file)
* handle exit from eval/inticmd with proper refcounts
- nsf.c:
* integrated "-local" and fully qualified handling with ObjectDispatch
to ensure proper behavior of mixins/next etc.
* added "/obj/ -local ..." similar to "/obj/ -system ..."
* added "nsf::object::dispatch /obj/ -local ..." similar to "/obj/ -local ..."
* extended regression test (next from -local,
fully qualified names, private methods, "...dispatch -local")
* provide error message for "/obj/ -system"
- nx.tcl:
* make calls from "protected", "public", and "private" system calls,
such that "obj -system protected method foo {} ..." works, even
when obj has a method named "method".
* extended regression test
- nsf.c:
* added "/obj/ -intrinsic ..." similar to "/obj/ -system ..."
* added "nsf::my /obj/ -intrinsic ..." similar to "/obj/ -intrinsic ..."
* added "nsf::object::dispatch /obj/ -intrinsic ..." similar to "/obj/ -intrinsic ..."
* extended regression test
- nsf.c:
* simplified permission handling
* made private/protected mutual exclusive
* extended regression test for private methods
* per-thread MEM_COUNT tested with aolserver/naviserver
* removed INTERP macros for MEM_COUNT (since we use now
per-thread tables instead of per-interp tables as in the
first implementation)
* re-enabled transparency of private method in mixins
* added transparency for per-object private methods
* extended regression test
- nsf.c:
* allow protected and private methods to be used as filters
* added regression tests
* some cleanup in regression tests
* added support for calling private methods via -local and filters
* extended regression test for private + filters
* removed "-local", "-system" and "-intrinsic" from plain dispatch
(like e.g. "o1 -system method")
* removed flag "-local" from nsf::object::dispatch
* made nsf::my and nsf::object::dispatch available in the nx namespace
- nsf.c:
* factored out CmdIsNsfObject() for NRE handling with slave interpreters.
* added flag ZSE_NRE_PROC for using nreProc instead of objProc
- nsf.c
* implemented NsfObjDispatchNRE and NsfObjDispatch
* this fixed all issues of tcl8.6 and interp.test (xocomm still hangs in 8.6)
- nsf.c:
* "private" implies now "protected". This means, setting "private"
sets as well "protected", unsetting "protected" unsets "private"
* make sure the "... method definition" of private methods is returned as "private"
* extended regression test
- nsf.c:
* removed warning about resetting cmd to 0 for private method invocations.
- fixed interp.test for tcl 8.6
- fixed xocomm.test for tcl 8.6
- fixed mem_count on xocomm.test (was 26 / 26)
- nsf.c: small performance improvements
- nsf.c: experimental implementation of ::nsf::method::dispatch
- renamed "nsf::method::dispatch" to "nsf::directdispatch"
- renamed "nsf::object::dispatch" to "nsf::dispatch"
- nsf.c:
* added permissible value "private" to flag "-callprotection" for
"info lookup method" and "info methods".
* extended regression test
- doc:
* fixed naming of "attribute" in migration guide
* added "private" to migration guide
* some textual improvements in migration guide
* fixed spacing in documentation
* fixed documentation of "info slot objects", "info slot names",
"info slot definition"
- nx:
* added namespace "nx::internal"
* delete procs via "rename to empty" instead of
"defining procs with empty argumentes and body"
* provided "-properties" as a replacement for -attributes,
but without magic variable
* extended regression test
* changed "info slot name" to "info slot names"
(like "info parameter names")
- library/lib/pp.tcl: improved handling of placeholders
- doc:
* added section about ":variable" to the tutorial
* fixed a few outdated places in tutorial
- nsf.c:
* reduce eagerness of methodName computation in ResolveMethodName()
and GetRegObject()
* reduce eagerness of DString computation in ResolveMethodName()
* use conditional assignments in ResolveMethodName()
* make use of Tcl_Obj type in ResolveMethodName() to reduce
number of string operations
- gentclAPI.tcl:
* added option handling for every cmd/method/...
* added option "-nxdoc" for outputting an index
to ease maintenance in nxdoc
- nsf.nxd:
* adapted to new naming
* tend to use fully qualified names (make maintenance easier)
* bring cmds to an alphabetical order (make maintenance easier)
* add optical separators between doc items to ease reading
- fixed mem_count on contains.test
- nsf.c:
* minor cleanup
* added regression tests
* fixed recreation of object alias with a alias to a different cmd
- xotcl2.tcl:
* added a backward compatible ::xotcl::alias method
- Switched to the tcl numbering scheme. Version is now 2.0a1
Warning: From the Tcl point of view, this is a regression in
numbering relative to the previous 2.0.0. Make sure to
remove old releases from you installation path like e.g.
rm -rf /usr/local/lib/libnsf2.0.0* /usr/local/lib/nsf2.0.0
- use same version numbers in nsf, nx and xotcl2
- library/lib/nx-zip.tcl: refactored implementation,
improved utf-8 file-name handling (which is a mess in pkzip)
- configure options:
* improved and extended configure options to reduce
necessity to switch features on and off in the nsf.h.
Optional Features:
--enable-profile build nsf with profile support (default disabled)
--enable-memcount=yes|trace
build nsf with memcount debug support (default
disabled)
--enable-development build nsf with development support (assertion
checking, etc.; default disabled)
Optional Packages:
--with-dtrace build nsf with DTrace (default: without)
- nsf.c:
* report configuration options via "parray nsf::config"
sample output
% parray nsf::config
nsf::config(development) = 1
nsf::config(dtrace) = 0
nsf::config(memcount) = 0
nsf::config(memtrace) = 0
nsf::config(profile) = 0
- build-environment:
* make configure.in Makefile.in more in line with the TEA sample app
(removing leftovers from prior versions of TEA)
* remove GNU-Makefile-isms from Makefile.in
- nsf.c:
* provide an intermediary fix for the final memcount problem
of elements in on the iPtr->errorStack
* improve iPtr cleanup for memcount debugging
- added configure option: enable-assertions (default on)
- nsf.c:
* allowed to call ":" like "my" or "self"
Object create o
o public method bar2 {} {return bar2-[: foo]}
o public method bar5 {} {return [self]::bar5}
o public method bar6 {} {return [:]::bar6}
* extended regression test
- nx.tcl: moved "properties" from nx::Class to nx::Object
- nsf.c: make ":" a full equivalent vor nsf::my
(i.e. support -local, -system and -intrinsic)
- extend regression test
nsf.c:
- reform of argument parse. new parser uses NsfFlagObjType
to reuse earlier parse results. Improved speed for
for methods with primitive bodies: 5%-25%.
- added regression tests for argument parsing
- nsf.c
- added experimental parameter option noleadingdash
- additional regression test file method-parameter.test
- provide selective error messages for unknown nonpos args
nsf.c:
- reform of method lookup. new code uses
NsfInstanceMethodObjType and NsfObjectMethodObjType
to reuse earlier lookup results. Improved speed for
for methods with primitive bodies (over version before
argument parse reform: 10%-43%.
- additional compile-time option: METHOD_OBJECT_TRACE
- experimentation version of unknown handler for non-pos args
- extending regression test
nsf.c:
- moved methodEpochCounters from global vars to the interp state
to improve reuse in multi threaded apps
- separated objectMethodEpoch and instanceMethodEpoch
- bump version number to 2.0a2
nsf.c:
- new cmd for debugging: nsf::__db_show_obj
- added MethodDupInternalRep() and FlagDupInternalRep()
since they appear to be required in Tcl 8.6b2.
tests:
- added "package prefer latest" to avoid confusions of alpha and beta releases
with install versions
nsf.c:
- added MixinregDupInternalRep() and FilterregDupInternalRep
- perform more eager invalidation on objectMethodEpochs
- cleanup on nsfObj.c
nsf.c:
- don't convert obj types tclCmdName and parsedVarNameType
to instanceMethodObjType
nx: added traits package
noleadingdash handling:
- doc: added "noleadingdash" to UML class diagram
- nsf.c: added error message, when "noleadingdash" is used on
non-positional parameters
- nsf.c: use same logic for "noleadingdash" to "value in argument"
- nsf.c: deactivated rudimentary unknown handler non nonpos args
for the time being
- nx.tcl: added handling of parameter option "noleadingdash"
in objectParameterSlots
- doc:
* integrated ::nx::doc::make with Makefile.in
(provide shell calls and, targets and dependencies)
* provided a different flag for the generation of the documentation
(-develop, .... or -final) to show/hide it.
* separated entries for methods and hooks (can't be called if not defined)?
hooks:
* recreate should only be called internally, similarly "init" etc.
* __unknown
unknown is a hook for Object but a method for Class
- fixed strange ref-counting bug in 8.6b2 bug-is-86.tcl
where 2 ref-counted items are not freed (value:class,
issued from nx.tcl around line 120). Compile with DEBUG86B2
for more info
=================================================
# -*- Tcl -*-
package req nx
package require nx::test
nx::Test case ensemble-next-with-colon-prefix {
nx::Object create obj {
:public method foo {} { return [:info class] }
#:public method bar {} { return [:info] }
:method info {} {;}
}
? {obj foo} {wrong # args: should be ":info"}
}
=================================================
- nsf.c: cleanup on DEBUG86B2
- nx.tcl:
* do not namespace import my into ::nx
* replace usages of "my" by colon invocations
- doc:
* extended method resolution section
* documented invocation flags for colon
- nsf.c:
* add flags "-closure" and "-source" to "/cls/ info methods"
(the cases for "/obj/ info methods" are already covered by
"/obj/ info lookup methods")
* extend regression test
- nx-traits:
* use "info methods -closure" instead of instantiating a
class at trait-insertion time
* added trait as package nx::callback
- example scripts: added tk-mini and tk-horse-race
- make "/object/ require" an ensemble method
- traits: renamed "useTrait" into "require trait"
- added per-object traits (and per-class-object traits)
- added tk-spread and tk-locomotive to example scripts
- altered default handling to honor side effects of aliased object
parameters. This slows down evaluation a little. Side-effects from
aliased parameters are discouraged, since the order of the
evaluation should not matter of an declarative evaluation of the
argument vector.
- extended regression test
- library/mongo:
* updated interface to current nx
* updated to mongo-c-driver 0.4 (current version)
* The mongo c-driver does not allow to add DBRefs, since
it refuses to accept field names with leading '$'. So we skip these
tests for the time being.
-nsf.c:
- remove quadratic behavior when adding many classes (10 thousands)
- deletion is still for huge number of classes quite slow.
- nx.tcl, xotcl.tcl:
* remove proc "register_system_slots" since 'rename
register_system_slots ""' fails on aolserver
* bump version number to 2.0b1
- nsf.c: extended "new":
* nonpos-arg "-childof" accepts now a namespace
(required an object before). Therefore, one can
use now "... new -childof [namespace current]",
even when the current namespace is not an object
- nx.tcl: simplified ::nx::ScopedNew to ::nx::NsScopedNew:
before it was necessary to create a new volatile class for every
invocation of contains.
- extended regression test
- nx.tcl: don't use mixins in method "contains", but remap the new
implementation. If there are ten thousands of classes defined,
adding mixins to the root meta-class degrades linearly on the number
of classes defined (the mixin paths for all classes must be
invalidated). This might be a problem for frequent "contains"
invocations.
- bump version numbers for nx, xotcl2 and nsf to 2.0b2
- rename "info method handle /methodName/" into
"info method registrationhandle /methodName/"
- rename "info method origin /methodName/" into
"info method definitionhandle /methodName/"
- added "info method handle" as short form of "info method definitionhandle"
- added "info method origin" to return the target of an alias (or empty)
- update migration guide and tutorial
- cleanup "//" in sources
nsf.c:
- adding method epoch incr to NsfAddObjectMethod() and NsfAddClassMethod()
- added function CmdListAddSorted() to improve mixinof management
serializer.tcl:
- Use directdispatch to query existing traces without the need
of an extra method. By this change, the serializer works in
constant time independent on the number of existing objects.
nsf.c:
- reduce number of RUNTIME_STATE(interp) in favor of a variable.
- make time of the definition of a method independent on the
number of defined instances (unless, when filters are defined)
nsf.c:
- fixed bug with recursive aliases
- extended regression test
- updated and shorted README.aol and TODO
- removed the following files from the repository.
deleted: COMPILE
deleted: COMPILE.win
deleted: ChangeLog
deleted: unix/xotcl.spec.in
deleted: win/Makefile.vc
These files should be probably added again at some later time,
but need some rework. Old versions are still available from the
2.0.0-develop branch
- Replaced hash-table for GetAllInstances() with a linear list.
As a result, mass-destroy on exit is now much faster. Valgrind
reports that the full circle of creating 100.000 objects and
destroying it on exit became about 15% faster.
- added additional argument adEnd to CmdListAdd()
- renamed CmdListRemoveList() to CmdListFree()
- improved code documentation
- removed unneeded AddInstance() and RemoveInstance()
- deactivated uncalled ReverseLookupCmdFromCmdTable() and
GetHiddenObjectFromCmd() since apparently not needed any more
nsf.c:
- removed conditionals in AddInstance() and RemoveInstance()
- dropped result from RemoveInstance()
nsf.c:
- added method NsfMethodNamePath() to compute the ensemble path
in error messages
- reduce verbosity
- extended regression test
- nsf.c: fix call of DispatchDefaultMethod() in cases it triggers an error for 8.6b
- nx.tcl: give a slightly better error message in case the root-object of an ensemble is called directly
nsf.c:
- handle duplicates in the cmd-list during cleanup
- Avoid duplicate entries in instance lists for diamond inheritance by
maintaining the set of already processed entries in
NsfClassInfoInstancesMethod1() and GetAllInstances().
- extended regression test
- removed "namespace import" in object-system test
nsf.c:
- Reform of subclass/superclass handling.
* unifying transitive subclass handling
* localizing and documenting caching of subclass/superclass lists
* eliminating repetitious computation of subclass lists
* re-factored code, renamed some functions to better reflect their purpose
* improved documentation
- fixed a potential crash for class deletion triggering implicit deletions
further deletions referencing the parent class
- extended regression test
nsf.c, nsf.h, nsfStack.c, nx.tcl, tcl-cool.tcl, xotcl2.tcl
- fix spelling in comments
- strip unneeded space
- fixed potential crash when generating error message about argument usage
when called without a call-stack
- added regression test
nsf.c:
- change argument of IsMetaClass() to type *NsfObject
- provide basic protection against most likely unintended
deletion/overwriting of base classes.
- extend regression test
- fix typos
- extend regression test to improve coverage
- improve branch prediction
- simplify macro handling with __WIN32__
- regroup some macro definitions
- "info method": missing an option to return the "-returns
specification". Also: "-returns" spec is not included in "info
method definition".
- simplified usage of ObjectName() and ClassName() macros (no caller parenthesis needed)
- added experimental object property keepcallerself (currently only evaluated by aliased objects)
- removed TODOs from keepcallerself in destroy.test; calls were truly recursive,
behavior was correct.
- Added experimental object property "allowmethoddispatch" for
child-objects to be called from parent objects via method interface.
Background: both, per-object methods and child objects are
implemented via cmds in the same tcl namespace. Without special
care, both are callable via the standard dispatch. Apparently, this
is not always wanted.
- handled allowmethoddispatch and keepcallerself in copy/move
- set allowmethoddispatch per-default in XOTcl
- removed visibility of objects with "allowmethoddispatch" false in
"info methods" and "info search methods"
- extended regression test
- improve handling of multiple error messages in a single command
- alias reform: instead of calling first an alias with a stack frame
followed by the dispatched of the aliased cmd, resolve aliases
internally in dispatch. This has the advantage that we do not
have to ignore the "transparent" stack frame in some situations,
and we have much less problems with the names of the aliased cmds
(e.g. objects) in the introspection methods. Additionally, several
problem cases disappeared from the regression test cases.
In addition, the new approach is faster.
- eliminating obsolete flag NSF_CSC_CALL_IS_TRANSPARENT
- use alias-stubs for aliases pointing to objects. This allows
us to distinguish between cases, where an object is dispatch-able
due to the alias or due to allowmethoddispatch (when the object
happens to be a subobject and has therefore its cmd in the same
namespace). The semantics are now:
- aliases to objects are always dispatch-able, no matter, how
allowmethoddispatch is set.
- direct sub-objects of objects are currently on dispatch-able
when allowmethoddispatch is set. Note, that this could
be seen as a method-property of the method-name, which
could be made "private" as well to avoid such direct dispatches.
- nsf.c: start all error messages with a lower case word for consistency
and to follow closer to Tcl's conventions
- deactivate for the time being allowmethoddispatch
(make it behave always like true)
- added instead new flag "perobjectdispatch" to make
behavior of ensemble objects configurable.
- The behavior for keepcallerself is currently
only activated for the method-interface
for object dispatch, since otherwise the following
would be dangerous, since "o2 foo" would destroy o2
nx::Object create o1
nsf::object::property o1 keepcallerself true
nx::Object create o2 {
::public method foo {} {o1 destroy}
}
o2 foo
- fixed potential crash from method caching, when permissions on cmds are
changed and become e.g. unresolvable
- removed flag allowmethoddispatch, since behavior can be archived via
private flag.
- extended regression test
- extend regression test for interactions between "keepcallerself" and
"perobjectdispatch"
- some minor cleanup
- fixed NRE memory management (for Tcl 8.6) by refactoring
alias handling
- removed documentation about incompatibility to XOTcl1 in
respect of the method interface for object invocations
- doc fixed line-number handling locally
- changed object->flags from "unsigned short" to "unsigned int"
- reintroduced NSF_TCL_DELETE to address bug flagged from memdebug
- extended regression test
- Cleanup for compilation under MSC
(avoid unsupported forward declaration of array)
- further documentation of functions, better grouping of functions
- use fixed array size for method_definitions for MSC
- Don't export symbols in the general case just because of MSC/C89 compliance
- Forward setting of object parameters to the slot object, when assign
method is user-defined on the slot object
- Cleanup and extend regression test
- additional object parameter option "invokesetter" managed by nx.tcl
This was necessary, since the previously implemented strategy
called the setter whenever slot= was provided. This has the problem,
that values could be converted twice (once by "configure", once
by the setter method", which lead for the converter to a double
refcounting on the value.
- use Tcl's EXTERN macro instead of "extern"
- treating incompatible forwarding to slot vs. slot option noaccessor
- extended regression test
- don't allow object creation to overwrite non-object cmds (e.g. procs)
- don't allow method to overwrite child object
- extended regression test
- documented cmd overwrite protection feature as incompatibility with XOTcl 1
- documented dependencies between configure flags and feature activation cpp macros
nsf.c:
- Fixed a bad interaction between Tcl's apply (pushing lambda frames)
and the variable resolvers. The variable resolver was not able to
resolve variables, while the command resolver was still working
correctly.
- Extended regression test
nsf.c:
- added object parameter option "slotinitialize"
- renamed object parameter option "invokesetter" -> "slotassign"
- call slot.assign instead of setter of object
- removed restriction on nosetter/invokesetter: nosetter can
be used in connection with slotassign
- added regression test for slot.initialize
nsf.c:
- pass property name to slot "initialize" method to conform
with the interface to "assign", "get" ... (all these receive
the property name as well)
- allow slot "initialize" method to be protected
(handled similarly to "init")
- extended regression tests for yield
- implemented "next" for ruby-like enumerators (each needs still more work)
- tcl86.test: better implementation of method "each",
cleanup and extension of enumerator tests
- fix compilation when compiled without threads (many thanks for
r.zaumseil for noting this).
- protect serial generation for parameters via mutex
- added compile macro NSF_STACKCHECK to provide stack monitoring/debugging
(especially useful for multi threaded programs, where stack
is more limited)
- make ::nsf::log more robust for aolserver/naviserver, since ::ns_log is
not always around when an output is needed
- serializer:
* make [::Serializer deepSerialize -ignoreVarsRE "" $o] behave like
[::Serializer deepSerialize $o], since learn@wu depends on that, and
a value for ignoreVarsRE of empty looks more like an omitted value than
a regular expression, that should match everything.
* extended regression test
nsf.c:
- generalize stack monitor by handling growing and shrinking stacks
- refactor into function CheckCStack()
- serializer:
* pertain perobjectdispatch and keepcallerself in serializer
* extend regression test
nsf.c:
- refactor ObjectCmdMethodDispatch() for clarity
- prepare work on object method dispatches with
KEEP_CALLER_SELF and no NSF_PER_OBJECT_DISPATCH
- explorative implementation of object method dispatches with
KEEP_CALLER_SELF and no NSF_PER_OBJECT_DISPATCH
- extend regression test
nsf.c:
- implement escaping for comma in value of parameter options:
escaping in values can be achieved via duplicating the comma.
In the following example is the value for arg "1,3"
D public method foo {a:commaRange,arg=1,,3,optional} {..}
Escaping via \ would actually require 4 backslashes
due to Tcl's escaping rules (two, to get a single backslash,
another two due to list-splitting to obtain default from arg).
- extend regression test
nsf.c:
- allow parens in property names (array syntax)
- added "/obj/ info name" (as alternative to "namespace tail [self]")
nx.tcl:
- added "private property foo"
- extended regression test
- start error messages with a lower case word for consistency
and to follow closer to Tcl's conventions
Documentation:
- added design study ruby-mixins.tcl to example-docs and regression test
- added documentation for "/obj/ info name" to migration guide and
.nxd file
- adding more comments to examples in migration guide
- document private properties in tutorial and migration guide
- improve wording in documenting
- extend regression test
nsfShadow.c
- bump MethodEpoch when a tcl ::rename command happens
on a nsf method (which might be cached in a Tcl_Obj)
This fixes a crash reported by Arthur Schreiber
nsf.c:
- make NsfInstanceMethodEpochIncr() and NsfObjectMethodEpochIncr()
accessible from all files using nsfInt.h
- remove experimental code (backslash escaping for "," in parameter
option parse
nsf.c:
- added a SlotContainerCmdResolver() to avoid interaction of slot
names with names of callable tcl commands. Without the
SlotContainerCmdResolver() the call to "list" in a property named
"list" leads to a call to the container object ::Test2::slot::list
instead to the intended ::list. The implementation is not perfect,
since it ignores the namespace path inside the slot container.
- added regression test.
nsf.c:
- ignore in internal calls to "dealloc" protection settings
- handle cyclical class dependencies during object system finalize
- extend regression test
nsf.c:
- handle cyclical superclassclass dependencies during object system finalize
- extend regression test
nx.tcl:
- set multiplicity for mixins and filters by default from 1..n to 0..n
to avoid error messages, when e.g. empty mixin lists are configured.
Setting empty mixin-lists is strictly speaking not necessary,
but this eases the code in cases the lists are sometimes empty.
nx::test:
- added summary at the end of "make test" via log file
- updated .gitignore
nsf.c
- rename nx::Object.configure to nx::Object.__configure
to free method name "configure" for an e.g. tk-like configure
- refactored code to allow to parameterize handling of required flag for parameters
- don't flag an error when configure is called on an initialized object
(logic: if the object is initialized, configure must have been called
before, and the required action must have been already taken).
nx.tcl:
- rename the following internally called methods (not for XOTcl).
alloc -> __alloc
dealloc -> __dealloc
objectparameter -> __objectparameter
recreate -> __recreate
- from these methods, only __objectparameter is defined per default,
the others are defined on demand
- updated 34 copyright notices
nsf.c:
- extended nsf::method::delete to handle ensemble names
nx.tcl:
- added tk/incr-tcl style cget methods on class/object levels as
ensemble methods.
- improve copy handling with other child-types of the slot container working
- make sure to ignore non-slot-type objects in slot introspection
- worked on regression test until "methods.test". others are missing,
but maybe reconsideration
nsf.c:
- implemented cget as a configure-like method, dropped ensemble method variant
nx.tcl:
- simplified "/obj|cls/ delete method" due to resolving capabilities in
nsf::delete::method
xotcl2.tcl:
- made destructor of Connection more robust such it does not depend on
accessor methods.
- fixed regression test to run all test again correctly
nsf.c:
- made argument of cget required
nx.tcl:
- added Tk-style methods "configure" and "cget"
- added additional regression test set for cget and configure
- renamed testlog file, remove it on "make clean"
nx.tcl:
- remove debugging output
nsf.c:
- fixed parmeter syntax for required nonpos args
- deactivate deletion of methods via nsf::object::delete
during shutdown to avoid missing slot forwarders called from
destructors
nx::Class create C {
:property {b b1}
:public property {c c1}
:protected property -accessor {d d1}
:variable foo
}
Property reform part 1:
- disallow protection modifiers for "properties" and
add new flag "-accessor" to "property" and "variable"
This changes definitions like
Class create C {
:property {a a1}
:public property {b b1}
:protected property {c c1}
:private property {d d1}
}
to
Class create C {
:property {a a1}
:property -accessor public {b b1}
:property -accessor protected {c c1}
:property -accessor private {d d1}
}
since "properties" are always public accessible
over the "configure" and "cget" interface, but the
accessors methods might not be public. The value of
the accessor might be also "none" (specifying explicitly
that no accessor is wanted) or "", which means: use the default.
Same holds for "variable"
- disallow parameter option "incremental" and change it to a flag
of the property or variable. The motivation for this is due to
the fact, that "incremental" is a property of the accessor, and
not of the value.
old:
Class create C {
:property foo:int,incremental
:variable bar:int,incremental
}
new:
Class create C {
:property -incremental foo:int
:variable -incremental bar:int
}
- disallow "public class property" and friends since these are not needed
- removed parameter property "noaccessor"
- removed "nx::configure defaultPropertyCallProtection" and
method hook "__default_property_call_protection"
- introduced "nx::configure defaultAccessor" and
method hook "__default_accessor"
- for the time being, "defaultAccessor" is "public" for NX and XOTcl,
will be changed to "none" in NX
- extended regression test (new file properties.test)
Property Reform Part 2: better handling of per-object properties
nsf.c:
- changed "/class/ __objectconfigure" to "/obj/ __objectconfigure"
to be able to handle per-object properties on classes properly.
- renamed "info method parametersyntax" -> "info method syntax"
- renamed "/obj|cls/ info method parametersyntax" into "/obj|cls/ info method syntax"
- replaced "::nsf::methods::class::info::objectparameter" by
"::nsf::methods::object::info::objectparameter"
- new command "::nsf::parameter::specs ?-configure? ?-noposargs? slotobjs":
convert provided slotobjs into a list of parameter specs
- new command "::nsf::parameter::get list|name|syntax parameterspec":
convert parameter spec into syntax form, or retrieve pieces of
information from it (can be extended in the future)
- added more or less generic list handling functions TclObjListFreeList(), TclObjListNewElement()
and TclObjListAdd() used by "::nsf::parameter::specs"
- replaced "::nsf::method::property /obj/ -per-object /name/ slotcontainer ?value?"
by "::nsf::object::property /obj/ slotcontainer ?value?"
- added "::nsf::object::property /obj/ hasperobjectslots ?value?"
nx.tcl:
- new info methods
* "/obj/ info lookup parameter definitions"
* "/obj/ info lookup parameter names"
* "/obj/ info lookup parameter list"
* "/obj/ info lookup parameter syntax"
- changed "/cls/ info parameter definition ?name?"
into "/cls/ info parameter definitions ?name?"
since ir returns a list. Still, "list" or "syntax" won't
be plural
XOTcl 2
- don't blindly register all object/class methods for XOTcl
nsf.c:
- fix potential bad interaction between per-object mixins and
per-class caching of object-parameters
- first draft of per-object parameter caching (for
per-object-mixins and per-object properties).
nsf.c:
- rename invalidateobjectparameter -> parameter:invalidate::classcache
- rename invalidateobjobjectparameter -> parameter:invalidate::objectcache
- bring cmds into alphabetical order
- NsfObjInfoObjectparameterMethod(): return not only the first matching
parameter, but the list of all matching ones. The last optional
argument was renamed from "name" to "pattern" accordingly
- invalidation of per-object parameter cache
* on mixin changes and
* on deletion/adding of per-object slots
- activate PER_OBJECT_PARAMETER_CACHING per default
(flipping this parameter makes regression test more than 20 faster).
- extended regression test
nsf.c
- added functionality for "cget" to call parameter-methods
(e.g. "... cget -class"). The method cget calls either
"/slot/ get ..." (when slot=... is provided in the parameter spec)
or it assumes that the method without argument returns the value
- added "::nsf::object::property /obj/ volatile" to query
whether a object is volatile or not
- "/obj/ cget -volatile" returns now the volatile state of the object
- factored out ParameterMethodDispatch() from OConfigureMethod()
- extended regression test
nx.tcl:
- change parameter name in "/cls/ info parameter ... ?pattern?"
from "name" to "pattern"
- changed name "/obj|cls/ slot info definition" to
"/obj|cls/ slot info definition" since result is a set
- dropped parameter method "properties"
- dropped "/obj/ info properties"
(since "properties" or "variables" are returned")
- extended regression test
nsf.c:
- factored out ParameterMethodForwardDispatch() to
call a parameter method defined as a forwarder
the same way from "configure" and "cget"
- extended regression test
nx.tcl:
- property has now a boolean non-positional argument "-config"
/obj|cls/ property ?-accessor value? ?-config boolean? ?-incremental? ?-class value? spec ?initblock?
in symmetry with "-accessor" (parameter option "noconfig" is still needed
to flag nsf for variables that should be initialized, which are
not configurable
- "/obj|cls/ info slot definitions" returns a full command
(containing flags and property|variable)
- extended regression test
nsf.c:
- handling of method names in error messages from nsfAPI.h. Make sure
that error message is generated with the actual method name.
Object-method Reform:
- changed interface to object specific commands by requiring an
ensemble named "object". The rational behind is essentially
to use always the same info command to retrieve object
specific methods, no matter whether these are defined
on a plain object or an a class object (does not break
the "contract" what e.g. "info method" returns).
Now we define methods via:
/cls/ method foo {args} {...body...}
/cls/ object method foo {args} {...body...}
/obj/ object method foo {args} {...body...}
Similarly, aliases, forwards and mixins are defined, e.g.
/cls/ mixin add ...
/cls/ object mixin add ...
/obj/ object mixin add ...
/obj/ require object method ...
/obj/ object property ...
/obj/ object variable ...
The same change propagated as well to the "info" method.
Now we have:
/cls/ info methods ...
/cls/ info object methods ...
/obj/ info object methods ...
Similar, the object parametererization uses
/cls/ create obj -object-mixin M
/cls/ create obj -object-filter f
/metacls/ create cls -mixin M1 -object-mixin M2
/metacls/ create cls -filter f1 -object-filter f2
- as a consequence,
a) "/cls/ class method ..."
"/cls/ class alias ..."
"/cls/ class forward ..."
"/cls/ class filter ..."
"/cls/ class filterguard ..."
"/cls/ class mixin ..."
"/cls/ class mixinguard ..."
"/cls/ class info ..."
"/obj/ class method require method ..."
"/obj/ class method require public method ..."
"/obj/ class method require protected method ..."
"/obj/ class method require private method ..."
"/cls/ class property ..."
"/cls/ class variable ..."
"/cls/ class delete property ..."
"/cls/ class delete variable ..."
"/cls/ class delete method ..."
"/cls/ require class method ..."
"/cls/ require public class method ..."
"/cls/ require protected class method ..."
"/cls/ require private class method ..."
were dropped
b) "/obj/ method ...."
"/obj/ alias ...."
"/obj/ forward ...."
"/obj/ filter ...."
"/obj/ mixin ...."
"/obj/ info method*"
"/cls/ create obj -mixin M"
"/cls/ create obj -filter f"
"/obj/ require method ..."
"/obj/ require public method ..."
"/obj/ require protected method ..."
"/obj/ require private method ..."
were dropped
- added package nx::class-method to allow optionally the "class" notation
"/cls/ class method ..." (and friends, see (a)), and
"/cls/ class info ...
- added package nx::plain-object-method to allow optionally plain method
b) "/obj/ method ...." (and friends, see (b))
- added support to slots to use ensemble methods as setters
- added "/obj/ object variable" and "/obj/ object property"
- bumped version number to 2.0b5
- tested with NaviServer and OpenACS
(new version of nx needs as well a newest NaviServer,
since ns_cache implementation needs to be objectified;
newest NaviServer version works as well with older nx)
- moved "/obj/ info slot definition|..." to
"/obj/ info object slot definition|..." for consistency
- provided "parametersyntax()" for "object mixin" and "object filter"
Method and configure parameter reform:
- unify handling / naming / parameterization of method parameters and
configure parameters
- New Interface:
/cls/ info configure parameters ?pattern? -> list of params
/cls/ info configure syntax -> syntax output
/obj/ info method parameters /methodName/ ?/pattern/? -> list of params
/obj/ info method syntax -> syntax output
/obj/ info lookup configure parameters ?/pattern/? -> list of params
/obj/ info lookup configure syntax -> syntax output
/cls/ info parameter list|name|syntax /param/ -> value
"... method syntax" and "... configure syntax" return the full method/configure call,
and not only the parameters as in previous versions. Therefore, providing a pattern
could lead to unexpected results, therefore the argument was dropped.
- Replacements relative to 2.0b4:
{/cls/ info parameter definitions} -> {/cls/ info configure parameters}
{/cls/ info parameter definitions x} -> {/cls/ info configure parameters x}
{/cls/ info parameter syntax ?pattern?} -> {/cls/ info configure syntax}
{/obj/ info lookup parameter definitions ?pattern?} -> {/obj/ info lookup configure parameters ?pattern?}
{/obj/ info lookup parameter syntax ?pattern?} -> {/obj/ info lookup configure syntax}
- Dropped calls:
/cls/ info parameter list ?/pattern/?
/cls/ info parameter names ?/pattern/?
syntax of a single parameter via this interface
/cls/ info configure syntax ?/pattern/?
/obj/ info lookup parameter names ?/pattern/?
/obj/ info lookup parameter list ?/pattern/?
Method and configure parameter reform, Part 2:
In order to streamline the interface further, we tried to follow the idea to use
"... info /plural word/" to obtain a set of handles, and then a separate call
to obtain the details. Therefore, we replaced
/cls/ info slot objects
/cls/ info slot definitions
/cls/ info slot names
/obj/ info object slot objects
/obj/ info object slot definitions
/obj/ info object slot names
/obj/ info lookup slots
by
/cls/ info slots ?-type /type/? ?-closure? ?-source all|application|baseclasses? ?/pattern/?
/obj/ info object slots ?-type /type/? ?/pattern/?
/obj/ info lookup slots ?-type /type/? ?-source all|application|baseclasses? ?/pattern/?
- nx.tcl: handle "incremental" in slot reconfigure
- nx.tcl: change defaultAccessor to "none"
- dropped "/obj/ info slot definition /slotobj/" in favor of "/slotobj/ definition"
Method and configure parameter reform, Part 3:
- added
/obj/ info lookup variables -> list of handles
/obj/ info lookup object variables -> list of handles
/obj/ info variable definition|name|parameter /handle/
- nx.tcl: added forward compatible scripted implementation of "lmap"
- nsf.c: handle names for private slots in pattern provided to AddSlotObjects(),
used e.g. in "info lookup slots /pattern/"
- added new regression test info-variables.test
- nx-pp.tcl: fixed changed accessor handling, added cget to highlight words
- updated next-migration guide to reflect changes from the configure reform
- "info method syntax" returns now "/cls/ ...."
- "info object method syntax" returns now "/obj/ ...."
- hopefully the last changes for ?object? method|variable|property:
defined
* "/obj/ delete object method"
* "/obj/ delete object property"
* "/obj/ delete object variable"
- extended parameter extractor: new functionality
::nsf::parameter get default /parameter/ ?/varname/?
::nsf::parameter get type /parameter/
/obj/ info parameter get default /parameter/ ?/varname/?
/obj/ info parameter get type /parameter/
- nsf.c: handle full-qualified name for private slots (AddSlotObjects())
- extended regression test
- C-code Generator: added "-typeName" for enumeration types that
allows for disambiguation of enumerations with different argument
names. Before that, the argument name determined the c-type of the
enumeration. Therefore it was not possible to use argName "-type"
for two different functions with a different list of enumerators.
- changed "-methodtype" to simply "-type" in
/obj/ info methods ... ?-type all|scripted|builtin|alias|forwarder|object|setter|nsfproc? ...
/obj/ info object methods ... ?-type all|scripted|builtin|alias|forwarder|object|setter|nsfproc? ...
/obj/ info lookup methods ... ?-type all|scripted|builtin|alias|forwarder|object|setter|nsfproc? ...
- removed some TODOs from tests/parameters.test
- parameter dispositions:
We differentiate now between "initcmd" and "cmd": an "initcmd" is only
evaluated once, but one can provide configure values for this parameter
later. a "cmd" is executed on every evaluation, it is only possible
to pass cmds to it. The trailing argument of the configure parameters
(used e.g. for scripted object/class definitions) is now of type "cmd".
Implementation not yet complete (object cases are not correct).
- nsf.c: fix crash when "nsf::my" is called with a single
argument outside the object context.
- fixed cases, where valuechangedcmd (and the other traces) did not
work with "configure" method. When slot traces are used, it cleans
other traces for the same operations.
- extended regression test
- added implementation for slots with traces+types for classes
- exception for incorrect defaults are thrown during slot creation
- extended nsf::is, added parameter
* ?-configure? -- accept configure parameter options
* ?-name /name/? -- provide a parameter name for error message
- simplified nx.tcl by using new nsf::is
- extended regression test
- changed ::nsf::parametersyntax(..) to ::nsf::parameter::syntax(..)
- xotcl2: adjusted manual parameter syntax entries to new conventions
Cleanup of nsfAPI.decls
- remove unneeded enumeration types
- use "typeName" to shorten reported names of parameters
- use camel case for reported names
Traits:
- changed from traits-as-objects to traits-as-classes. This
allows for higher orthogonality of traits and class definitions
and allows in principle traits for object-specific methods
(not fully implemented/tested)
- fixed property/variable inheritance in traits.
nsf.c:
- changed enumeration values for "-source" in
"info lookup methods"
"info lookup slots"
"info methods"
"info slots"
of "all|application|baseclasses"
to "all|application|system"
for consistency with "nsf::my" and "nsf::dispatch"
which uses "-system" as well
nx.tcl:
- removed "info is .." since it might raise more questions than it solves
- renamed initblock parameter from __initcmd to __initblock
- renamed nsf::configure parameter from "keepinitcmds" to "keepcmds"
- saving "keepcmds" in an associative array named "__cmd(/parameternName)"
to allow saving of multiple parmeters with less name clash danger
(when application stays away from variables stating with double
underscore)
- completed coverage if plain-object-method.tcl
- provided warnings via plain-object-method.tcl via "nsf::log warn ..."
nsf.c
- fixed potential infinite loop in pattern matching for precedence lists
- cget: make error message closer to tcl conventions
- extended regression test
package nx::plain-object-method:
- made warnings configurable via
nx::configure plain-object-method-warning on|off
- completed coverage and test cases
package nx::class-method:
- convenience package similar to nx::plain-object-method
- allow for usage "C class method ..." in addition to
"C object method".
- made warnings configurable via
nx::configure class-method-warning on|off
- completed coverage and test cases
nx.tcl:
- replaced functionality of "/obj/ configure" by
"/obj/ info configure" to re-enable semantics
of the plain configure method, even when called without
arguments. "/obj/ info configure" is actually a
convenience method to allow to write
o1 info configure
instead of
o1 info lookup configure syntax
- traits: added ability to turn on verbosity for traits
by using
nx::configure trait-verbosity on|off
nx.tcl:
- renamed variable option "-config" to "-configurable"
to make its intention clearer
- changed multiplicity of mixin, object-mixin, filter, object-filter
from 1..n to 0..n; rationale: when one has a list of eg. mixins,
which should be passed, one has to test for the length before
passing it, otherwise the empty list would generate an error.
Allowing 0..n makes the usage simpler and the program shorter.
Removed oboslete item. At least in this concrete form, the
warning does not show up.
- NSF_WITH_VALUE_WARNINGS: Right now, value warnings are also fired
for arg vectors with a delimiting "--"; right now, this gives a warning:
Object create o {
:public object method foo {-np1 -np2 p1} {
return $p1
}
}
? {o foo -np1 1 -np2 2 -- -X} "-X"
nsf.c:
- when creation with an required configure parameter failed,
delete the half-baked object to avoid confusing states.
- improved handling of required configure parameters
when classes are changed dynamically.
When configure parameter are defined required, checking
for the absence of required parameter was only performed
at creation time. When objects were re-classed or their
classes extended with required parameters, later
calls to configure did not trigger exceptions. Now
we check for the existence of the instance variable
which addresses most of these points, but in future
we might wish a more general solution (see comment
for futures releases)
nx::test:
- deactivate calling overhead calculation, since this
is not reliable (sometimes larger than the call).
- Old TODO maybe obsolete:
handling of recreate (see regression test for class-level properties)
Could not find references about this in the parameters
or properties tests.
nsf.m4:
- nsf.m4 currently unused (SC_PATH_NSFCONFIG and SC_LOAD_NSFCONFIG)
We can delete it from the current version.
nsf.c
- fixed a bug in "info methods returns" in cases, where
no returns info was available.
- we can "/obj/ copy" now objects/classes containing
* aliases
* setter
* ensemble methods
* method protections
Instead of handling cmd copying in NsfNSCopyCmdsCmd,
it is replaced now by introspection.
- extended regression test
nsf.c
- fixed a potential crash on destroy for objects having a
wrapper-less alias defined
- removed obsolete function AssertionAppendPrePost()
- removed obsolete function NsfNSCopyCmdsCmd()
and ::nsf::nscopycmd (handled now more general on
scripting level in the "copy" method)
nx.tcl:
- "copy" method: fixed copying of class-level per-object methods
- extended regression tests
serializer.tcl
- added flag -objmap to Serialzer.deepSerialize
to make serializer usable for copying (-map is to coarse)
- extended regression test
nsf.c:
- Eliminate all use of Tcl_GetStringFromObj() function.
nx::test:
- use the standard configure interface for
configuring instead of own version
- changed from nx::Test to nx::test
(user never has to know that nx::Test is a class).
- change test cases to newer interface
- don't use "namespace import nx::*" in test cases
when not required
nsf.c:
- reduce variable scopes
- fix a bug in SlotContainerCmdResolver() when NSF_MEM_COUNT
is activated
- fix a small memory leak for PER_OBJECT_PARAMETER_CACHING
- all cases detectable with --enable-memcount=yes are fixed
- recheck Announce
- concatenate Changelog
- update next-scripting doc + examples, pdf-files?
- build tar etc. as in README.release
nsf.c:
- dont't use the default of a invocation parameter in "configure"
when the object is already initialized. The default is in
general only used when the parameter is not specified. We do not want
e.g. superclass to be reset to ::nx::Object, when configure is
called on a class without arguments.
- extended regression test
- prepare for providing nx as a tcl module (.tm file).
this is just a preparation, since for testing, one cannot set up a path
that prefers a local copy over a global installed one (the global tcl-site is
preferred over the one specified in e.g. TCL8_5_TM_PATH)
Moving to tcl modules works in essence via
git mv library/nx/nx.tcl tcl8/site-tcl/nx-2.0b5.tm
This is really usable, when
http://core.tcl.tk/tcl/tktview?name=86ceb4e2b6
is through
mongodb:
- updated to most recent version of c-driver (0.7.1)
- adapted to nx 2.0b5 (use everywhere cget interface)
- tested with mongodb 2.4.5
- added example scripts rosetta-sudoku.{tcl,html} and tk-ludo.{tcl,html}
- added sample script doc/example-scripts/tk-geo.tcl
mongodb:
- integrated configuration of mongodb into toplevel config file
option: --with-mongodb=MONGO_INCLUDE_DIR,MONGO_LIB_DIR
- added regression test files for mongodb support
(low-level (tcl-only) and highlevel (nx based oo support))
- integrated mongodb-testfiles with "make test"
- reduced verbosity of nx-mongo.tcl (added verbosity variable)
nsf.c
- don't call postcondition, when the command/invariant have returned already an error
- fixed a bug where turning on assertions could swallow result-codes
- fix potential crash when preconditions are empty
- extended regression test
serializer
- fix object method serializeExportedMethod: targetName might have been uninitialized
nsf.c
- reduce variable scope
- remove uncalled static function
nsf.c
- fixed a bug where turning on assertions could swallow result-codes
- extended regression test
nsf.c:
- added flag -checkalways to nsf::proc and nsf::asm::proc (for the
latter just a placeholder for now). If the flag is used, it will cause argument
testing independently from the "configure checkarguments" setting.
To force argument checking always is useful e.g. for checking
external values (e.g. in a web server)
- nsf: added switch "-checkalways" to nsf::method::create
- nx: added switch "checkalways" to "method" and "object method"
- extended regression test
xotcl2:
- fixed "... info defaults ..." and "... info instdefaults ..."
emulation in XOTcl 2
- fixed error message
- extended regression test
- bumped revision of nsf/xotcl/nx to 2.0b6
gentclAPI.tcl, generic/nsf.decls
- make converter usable from c-based packages compiled with subs activated
- add parameter parser and converter to stub tables
generic/nsfStubLib.c:
- change base stub table from XOTcl to NSF.
- improve wording of error messages.
generic/nsfPointer.c:
- add reference counter to avoid double-inits and double-frees
in case the table of converters is used from multiple interpreters
generic/nsf.c:
- made linearization monotonic (for multiple inheritance)
via single-inheritance linearization merging
while preserving overall linearization rules
- added flag NSF_LINEARIZER_TRACE
- extended regression test
library/lib/make.tcl:
- don't try to load nx when building pkgindex for a binary package (.so or dylib)
mongodb
- upgrade to mongo-c-driver to 0.8.1
- added new flag "-ttl" to mongo::index
- there seems to be now a differen mongo-c-driver to be the preferred
one, the old one is renamed to mongo-c-driver-legacy
- link against nsf-stublib
- bump version number to 0.2
generic/nsf.c:
- add more assertions
- ensure computation of requires orders for recursive merges
mongodb:
- add flag "-puts" to method "show" of nx::mongo::Class to turnoff
output to stdout
- handle empty find operations for "find first"
- added method pretty_variables to output available variables
of a class in a similar style as in the definition
- added low-level method "close" to nx::mongo
nsf.c:
- new command ::nsf::object::alloc /class/ /obj/ ?/script/?
alloc an object and execute script in the context. Can be
used to regenerate an object in a old state.
serializer:
- fixed loading of objects with required data in the blueprint
(many thanks for david hopfmueller for reporting this)
- make use of nsf::object::alloc (1 command instead of 1 create + 2 evals)
- these changes improved loading time of blueprint by about 25%
for OpenACS+xowiki
- don't rely on the existence of a "trace" method
nsf.c:
- when ::nsf::object::alloc is passed an empty name (2nd argument),
behave like "new" method
nx:
- allow copy of objects with required arguments
- use ::nsf::object::alloc in "copy" method
- don't depend on method "trace", use directdispatch instead
- remove method "-noinit" (nsf::object::alloc makes it obsolete)
- extend regression test
serializer:
- restore traces after object-serialize
nsf.c:
- fix stub provisioning for Tcl 8.6
- reduce verbosity for FreeUnsetTraceVariable
- return TCL_OK, even when FreeUnsetTraceVariable() fails (warning stays)
nx-mongo:
- implement simple persistent handle management based on per-thread objects
-nsf.c:
- fix bug in interaction between uplevel method and interceptor transparency
- fix bug in interaction between uplevel method from tcl procs
- extend regression test
build-system:
- provide datarootdir to get rid of warning during configure
nx-mongo:
- updated documentation (switch back to mongo-c-driver, but comment usage
of tagged version v0.8.1)
- added support for rep types (allow for mappings between certain instance
variables such as arrays or dicts to customizable representations in
MongoDB)
- added nx-serialize to test cases (simple state persistence for nx objects)
- added nx-rep to test cases (rep types for "array" and "dict")
- improve performance of mongo->tcl conversion by using predefined global strings
nx-monogo:
- Updated the mongo-c-driver and libbson to the actual tip version from github
(this is a significant change, since 10gen essentially changed the
officially supported c-driver of MongoDB)
- mongo-c-driver was more or less new-implementation, since structure and
names changed in the mongo-c-driver substantially, several functions
were added, several were dropped. The new interface supports now
e.g. mongo URIs, and should be faster (by using collection objects
instead of connection handles)
- Although the low-level nsf interface changed significantly, the high level
(nx level) interface remained unaffected.
- Configure has now --with-mongoc=... and --with-bson instead of --with-mongodb
- New commands:
mongo::collection::open /mongoConn/ /dbName/ /collectionName/
mongo::collection::close /collection/
mongo::gridfs::store_string /content/ /name/ /contentType/
- Make use of the new collection handle
mongo::count /mongoConn/ /ns/ ... -> mongo::collection::count /collection/ ...
mongo::index /mongoConn/ /ns/ ... -> mongo::collection::index /collection/ ...
mongo::insert /mongoConn/ /ns/ ... -> mongo::collection::insert /collection/ ...
mongo::query /mongoConn/ /ns/ ... -> mongo::collection::query /collection/ ...
mongo::remove /mongoConn/ /ns/ ... -> mongo::collection::delete /collection/ ...
mongo::update /mongoConn/ /ns/ ... -> mongo::collection::update /collection/ ...
mongo::cursor::find /mongoConn/ /ns/ ... -> mongo::cursor::find /collection/ ...
- nsf::mongo::connect receives now a mongoc_uri
https://github.com/mongodb/mongo-c-driver/blob/master/doc/mongoc_uri.txt
- The gridfs interface allows now to store multiple revisions of a file
- The gridfs interface allows now upload files from a string
- The gridfs interface allows to refer to files by other attributes than
just the filename (e.g. the mongo id).
- Modified/new gridfile functions
mongo::gridfile::create ?-source file|string? /gridfs/ /value/ /name/ /contentType/
mongo::gridfile::delete /gridfs/ /query/
mongo::gridfile::open /gridfs/ /query/
- Updated README
- Updated regression test
- Added editor hints for a more uniform appearance
nsf.c:
- change name of enumeratorConverterEntry to Nsf_EnumeratorConverterEntry,
move it with NSF_ARG_* flags to tcl.h to make it available in derived
modules using the converter
- Added editor hints for a more uniform appearance
nx.tcl:
- raise an error, when an ensemble methods redefined a plain method
nsf.c:
- fix small memory leak in multiple inheritance code.
- all regression tests run cleanly with --enable-memcount=yes
- let [current methodpath] return full path (similar to -path option
in "info methods"
- handle collateral damage in regression test due to changed result
of "current methodpath"
nx::traits:
- handle ensemble methods correctly (use full method path for resolution)
- add new regression tests for traits
nx-mongo:
- optional support for mongodb connection pools (compile time macro
USE_CLIENT_POOL controls this, per default, this is on)
- allow to pass "-metadata" to gridfile::create to ease metadata attachment
to gridfiles
- some convenience improvements in nx-mongo.tcl (ability to ignore
attributes in "bson encode", ability to unset attributes in gridfs, ...)
- bump version numbers of nsfmongo to 0.3 and nx-monogo to 0.5
- represent BSON_TYPE_REGEX as pairs (regex + options) in the Tcl
representation to preserve regular expression options
- update to newest version of mongo-c-driver and libbson from github
- tested with mongodb-c-driver 0.93.0
nx-mongo:
- fixed surprising compiler message
"alignment of array elements is greater than element size"
when using e.g. "bson_iter_t i[1]"
- some c-code cleanup
- tested with mongodb-c-driver 0.92.3
- added mongo::collection::stats
- added mongo::cursor::aggregate
- extended regression test
nsf.c:
- fix case, where NsfDStringPrintf() failed (when print llength including
\0 was 1 byte longer than print buffer)
- make sure, that the list kept for the cached parameter is just built
from unshared objects; otherwise Tcl append will abort
nx.tcl:
- new package "nx::volatile"
- don't define configure parameter "-volatile" per default;
use "package req nx::volatile" instead
- don't define per method "volatile" per default;
use "::nsf::method::require ::nx::Object volatile" instead
- get rid of -volatile in nx.tcl and serializer
- updated/extended regression test
nx-mongo:
- added command "::mongo::status /mongoConn/"
- extended regression test
nsf.c:
- invalidate parameter caches of subclasses on
NsfParameterInvalidateClassCacheCmd unless during
shutdown. Otherwise some classes might not become aware of
properties added later to superclasses.
- extend regression test
nsf.c:
- remove redundant NULL tests
- improve safety mof macro ObjStr()
build-process:
- replace make.tcl by the much simpler mkIndex.tcl:
* Does not use pkg_mkIndex
* Does not load binary files (problem for cross compiling)
* Requires package provide with constant in one line.
small introspection reform:
- Introspection for commands and arguments did not work for
cmds defined in sub-packages (such as mongodb). We keep
now this information in hash-tables and maintain a slim
interface for this.
- fix generation of pkgIndex.tcl for mongodb
Configuration:
- stick closer to TEA conventions (keep tclconfig-sh in tclconfig directory)
- remove obsolete version of install-sh, copy manifested version to
mongodb library
- fix configure.ac quoting
forwarders:
- RFE "provide %method" as keyword like %proc"
was already implemented. Dropping %proc would break XOTcl2
compatibility.
- adding a test case
- use for output of forward ... -verbose NsfLog(...NSF_LOG_NOTICE...)
instead of fprintf() to make it redirect-able
- use in forwarders "-frame object" instead of "-objframe" in nx
for consistency with other calls (e.g. dispatch). Other values for
"-frame" are not allowed. (btw, XOTcl has "-objscope")
- deactivated "-onerror", since its semantics are expressible via
try/catch, and there are no regression tests for xotcl and nx,
and we could not find any script that uses this
- renamed "-methodprefix" to "-prefix" in nx, since the prefix
can be applied as well applied to a cmd.
- use nx rather than xotcl2 terminology in nsf::method::forward
nsf.c:
- de-spaghetti precedence computations for multiple inheritance and
improve documentation
- get rid of // comments
- use nonnull variable attributes for prototypes (nsf.h, nsfInt.h, nsf.c)
- add returns_nonnull assertion
- simplify few inner code pieces based on assertions
- add several more assertions based on nonnull specifications.
- made nsf::is using the "-strict" option when tcl's "string is" is called.
- let the c-code generator produce as well nonnull assertions
- simplify FilterInvalidateObjOrders() and FilterRemoveDependentFilterCmds()
- simplify SuperclassAdd()
- improve code documentation
nx.tcl:
- Define method "value" as a slot forwarder to allow for calling
value-less slot methods like e.g. "get" despite of the arity-based
forward dispatcher.
- extend regression test
- added more test cases for multiplicity and incremental
- preserve lower bound of multiplicity when incremental is added
- added log-level Info which prints always, e.g. for "-verbose" flag
of forwarder
nsf.c:
- add flag "-onerror" to nsf::forward::method to handle errors during
dispatch of a forwarder (not all error messages of forwarder are
already transformed)
- added log-level Info which prints always, e.g. for "-verbose" flag
of forwarder
- drop setter-rule from properties (use always forwarder)
- drop "/obj/ /prop/" and "/obj/ /prop/ /value/" in favor of
"/obj/ /prop/ get" and "/obj/ /prop/ set /value/"
to achieve better orthogonality with e.g. incremental properties
- allow parameter option "method=" for slotassign as well. rationale:
this allows to use the parameter "forwardername" to specify a
different forwarder target method (e.g. in case of object-mixins).
The method is used both in "configure" and "cget".
- allow methodname to consist of max two words in relation slots
(e.g. "-methodname {mixin set}"}
- allow configuration of internally called "slot.get" and
"slot.assign" methods via objectsystem::create
- rename default slot methods add/get to value=add/value=get
- provide an error message, when referring to a non-existing slot object
- added likely/unlikely to result == TCL_OK etc.
- fix one more subtle case of an error being swallowed: for xotcl, the
constructor returns the list of residual arguments. In case there
was an error, it was possible that the returned residual arguments
overwrote the error message in the interp result
- finish implementation of NsfForwardPrintError()
- use NsfForwardPrintError() in ForwardArg() for all error messages
nx.tcl:
- replace empty-named arrays by dicts
- remove setter methods from BootstrapVariableSlots
- reducing interface of BootstrapVariableSlots by setting methods protected
- use value=* as names for internally called and forwarder-called
accessor methods
- enforce using "set" for filter/object-filter in slot operations
(same as for mixins)
- add "set" as a method name for relation slots
- implemented relation slot "mixin" and "object-mixin" via "slotassign" to disallow
"/obj/ mixin /value/" and "/obj/ object mixin /value/" to use instead
"/obj/ mixin set /value/" and "/obj/ object mixin set /value/"
while keeping "configure" and "cget" working.
This has the advantage that "/obj/ mixin set" does not try
to replace the mixin chain by "set"
- disallow "assign" for nx::variableSlots
- use set/get/add as slot methods for get/configure/incremental
operations
- de-mangle slots for nx/xotcl2 further
- enforce usage of "get" for all slots in nx
- put test cases for all kind of mix setter / getter together in one test case
xotcl2.tcl:
- use object system configuration for -slot.get and -slot.set
- use value=set instead of value=assign
- simplify "-parameter" implementation
- add setters for "name", "domain", and "default" to xotcl::Attribute
for backward compatibility
mongodb
- by directing calls to the setter, it is now more complex to
determine the true calling object for an converter, since the
set operation might be routed though the slot object.
It would be nice to have framework support for this.
- fix 2 error messages
- provide shorter tracebacks by using "return -code error ..." rather
than "error ..."
nx::test:
- don't delete system slot ::xotcl::Attribute on cleanup
nx.tcl:
- add slot method value=unset to nx::RelationSlot and nx::VariableSlot
- extended regression test
- reworked error message generation of slot-forwarder
(list all available slot methods with prefix value=)
- cleaned up relation slot mixin variants
xotcl2:
- use xotcl::RelationSlot instead of nx::Relationslot in xotcl2
(we can more value=assign here).
Makefile:
- fix load paths for sublibs (e.g. mongodb) in regression test
nsf.c:
- added nsf::var::get and "::nx::var get" to provide selector
based interface for variable reading (used in slot-method get
of nx::VariableSlot)
- renamed nsf::relation to nsf::relation::set and added
nsf::relation::get in accordance with nsf::var::get
- fixed unary argument passing notation for "-nocomplain"
of nsf::var and for 42 other options of other commands
nx.tcl:
- added flag -nocomplain to "/obj/ /prop/ unset ?-nocomplain?"
- use "mixin|filter clear" instead of "mixin|filter unset"
- name parameter option "slotset" instead of "slotassign"
- have "filter|mixin clear" return the list of former|removed
filters|mixins.
nsfObj.c:
- allow to omit "-guard" within arguments to flag
definition of a filter/mixin guard
- extended regression test
nsf.c:
- improve handling of space in object names
- added methods
"info lookup filters ?-guards? ?/pattern/?" and
"info lookup methods ?-guards? ?/pattern/?"
nsf.c
- force again literal "-guard" in a "mixinreg" type to avoid
potential confusions
- Base nsfRelationSet for mixins on cmds rather than TclObjs
to avoid confusions and duplication of guard detection logic
- Add interp to NsfMixinregGet() and NsfFilterregGet() to be
able to return error messages
- return more error message from mixinreg converter
- provide at least minimal support for "funny class names"
(i.e. containing spaces)
- FinalObjectDeletion: don't enforce namespace = 1 for cases
with weird namespace deletion order
- extended regression test
nx.tcl
- switch from "/obj/ info parameter" -> "nsf::parameter::get"
to reduce potential semantic confusion of info options.
"info parameter" was not object/class specific at all, but
is just a syntax extractor
nsf.c:
- extend nsf::parameter::get to obtained more detailed information
for objects/classes/metaclasses/baseclasses and specified types
- extend regression test
- Updated tutorial and migration guide
nx.tcl
- drop short form "/obj/ info configure" for now
- make output of "/obj/ info lookup configure syntax" equivalent to
"/obj/ info configure"
gentclAPI.tcl:
- handle duplicated domains by folding these to a single definition
nsf.c:
- added command nsf::method::get.
Rationale: provide a central place to obtain information
about all kind of method handles, which might be
- scripted and c-based methods
- nsf::procs
- plain tcl procs
- cmds (with and without parameter definitions)
- make results of ListMethod() robust against missing
information (e.g. plain tcl cmds, missing object registrations,
etc.)
- factor out common code for ListMethod call sites
for per-object methods, instance methods and procs/cmds
to ListMethodResolve()
- return errors from failing converter registrations
- extend regression test (new test set nsf-method.test)
nsf.c
- renamed parameter::get -> parameter::info
- renamed method::get -> cmd::info
nsf.c, gentclAPI.tcl:
- new argument types "virtualobjectargs" and "virtualclassargs" for
context-specific argument resolutions: when a context object
is provided, arguments of type "virtualobjectargs" are determined
based on the slots applicable for the object (like "... lookup ..."),
arguments of type "virtualclassargs" are resolved against a class.
These types are used as follows:
/obj/ configure /virtualobjectargs/
/cls/ create /name/ /virtualclassargs/
/cls/ recreate /name/ /virtualclassargs/
/cls/ new ?-childof /obj/? /virtualclassargs/
This new feature allows us to provide better error messages and
to make much of the "... info ... configure parameter ..."
infrastructure much less important.
- For "virtualclassargs" we need the functionality to obtain
from the C-Code based on a class the configure parameters
applicable to objects of this class.
- add argument "-context ..." to "cmd::info" to pass the context object
(so far the only place where the context-object is used)
- object system configuration parameters changes:
new: -class.configureparameter
new: -object.configureparameter
removed: -class.objectparameter
nsf.c:
- added options to filter output from ::nsf::cmd::info parameter options
(args, syntax, parameter)
- deleted:
- "/obj/ info lookup configure parameters ?pattern?"
- "/obj/ info lookup configure syntax"
- added:
- "/obj/ info lookup parameters /methodName/ ?pattern?"
- "/obj/ info lookup syntax /methodName/ ?pattern?"
This covers as well
- "/obj/ info lookup parameters configure|create|new|... ?pattern?"
- extend regression test
mongo:
- upgrade to the newly released version 0.96 of the c-driver
- replace deprecated function mongoc_collection_delete by mongoc_collection_remove
- tested with MongoDB v2.6.1
nx.tcl:
- removed
/cls/ info configure parameters
/cls/ info configure
/cls/ info syntax
Use e.g. "/cls/ info lookup parameters create" instead
moved block here for keeping arguments
=====
- configure parameters: we have to cleanup
Given:
nx::Class create Person {
:property name
:create p1
}
Person info configure says, how object "Person" can be configured
Person info configure syntax says, how instances of "Person" can be configured
p1 info configure says, how object p1 can be configured
p1 info lookup configure syntax says, how object p1 can be configured (long form of above)
p1 configure -help gives a reasonable error message, "p1 configure" does not work, since no args are needed
Person new -help gives a reasonable error message, except, that "configure" is not perfect
Person create just complains about missing name, does not know about configure arguments
Person create -help creates an object named "-help"
Person create foo -help gives a reasonable error message, except, that "configure" is not perfect
possible path:
1) "Person info configure" is dangerous, too close to "Person info configure syntax" but completely different.
maybe: use "Person info configure" as short form of "Person info configure syntax", or drop it,
since the lookup variant is at least not surprising.
2) It would be nice if we would be not to need the "info" at all but improve the errors in 5-9,
maybe special switch "-?" or "--"
3) another possible path:
p1 info lookup syntax configure (short form of nsf::method::get syntax [p1 info lookup method configure])
where "configure" is a method name, would work the same way as "p1 info lookup syntax create|foo|..."
(under the assumption, we get the "right" syntax for configure).
Similar:
p1 info lookup parameter configure (short form of nsf::method::get parameter [p1 info lookup method configure])
this way, we would not need "info configure" and friends at all.
Tk uses "/obj/ configure" for obtaining possible values
Furthermore:
The command
p1 info method definition [p1 info lookup method configure]
gives an error, since "info method" is not defined for p1, we could have used
p1 info object method definition [p1 info lookup method configure]
which is somewhat strange, since configure is not an object method.
Probably: nsf-level command for handles.
====
nsf.c:
- Let "/cls/ info mixinof -closure" return as well implicit mixin classes
to make it easier to determine class dependencies.
Example:
nx::Class create M0
nx::Class create M1 -superclass M0
nx::Class create M2 -superclass M1
nx::Class create C
nx::Class create D -superclass C
C mixin add M2
# M2 is mixed into C, and implicitly into D
#
# Since M2 is a subclass of M1, classes C and D depend as well
# on M1 and M0, as seen in the heritage:
? {C info heritage} ":M2 ::M1 ::M0 ::nx::Object"
? {D info heritage} ":M2 ::M1 ::M0 ::C ::nx::Object"
# previously, only "M2 info mixinof -closure" showed the
# mixin relations, even with "-closure", while M1 and M0 did not.
? {M2 info mixinof -closure} "::C ::D"
# now these show the same relations (in this example).
? {M1 info mixinof -closure} "::C ::D"
? {M0 info mixinof -closure} "::C ::D"
- adapt mixinof.test to the additional information
- transform mixinof.test to newer style regression test with automated object deletion
- updated migration guide and tutorial to reflect recent changes
nsf.c:
- cleanup of NsfParameterInvalidateClassCacheCmd(): performance improvements.
After the fixing of indirect mixin validation, performance of invalidation
went up by a factor of 5. At least, in some important cases (invalidation of
root-classes like nx::Object / xotcl::Object), we are again on the same level
as before (actually slightly faster).
- use functions IsRootClass(), IsRootMetaClass() and IsBaseClass()
to access object/class properties
- add gcc attribute "pure"
- rename
nsf::parameter:invalidate::classcache -> nsf::parameter::cache::classinvalidate
nsf::parameter:invalidate::objectcache -> nsf::parameter::cache::objectinvalidate
reasons: (a) remove single colon inside the name, (b) put verb to the end
- fixed error message for forward ... onerror and method paths. The command
"C object mixin" returns now
"::C object mixin add|clear|delete|get|guard|set" and not
"::C mixin add|clear|delete|get|guard|set" as before.
nsf.c:
- new function DependentSubClasses() to determine all classes that inherit
from a given class. The result extend TransitiveSubClasses() by including
class mixin relationships.
- simplify NsfParameterCacheClassInvalidateCmd() by using the new function
DependentSubClasses(). With the new implementation,
NsfParameterCacheClassInvalidateCmd() is as efficient as before without
to MostGeneralSuperclass optimization (but being complete now) when
working on the root classes (an more efficient on subclasses).
- added experimental code feature CYCLIC_MIXIN_ERROR
nsf.c:
- improve performance of MixinInvalidateObjOrders() by about 30%
by recompiling the list of the dependent classes over and over again,
since MixinInvalidateObjOrders() iterates over the full list already.
- Document NsfRelationClassMixinsSet() and add nonnull declarations and
the usual assertions()
nsf.c
- base MixinInvalidateObjOrders() on DependentSubClasses() and
avoid the need of using a separate hash table for class-mixin
handling. The new implementation is several times faster and
improves the speed of the functions CleanupDestroyClass(),
SuperclassAdd() and NsfRelationClassMixinsSet(). Adding a
class-mixin to ::xotcl::Object in OpenACS is more than 4x faster.
- remove obsolete function MixinResetOrderForInstances()
- rename ResetOrderOfClassesUsedAsMixins() to
ResetOrderOfObjectsUsingThisClassAsObjectMixin()
- used consistently DependentSubClasses() instead of TransitiveSubClasses()
for invalidations.
- extended regression test
nsf.c:
- added option "-dependent" to "info subclass"
- extended regression test
nsf.c:
- move NsfMethodNamePath() out of NsfObjWrongArgs()
- move NsfMethodNamePath() out of NsfUnexpectedArgumentError() and NsfUnexpectedNonposArgumentError()
- fix name paths in error messages triggered from ArgumentParse()
- use 3-argument version of NsfMethodNamePath()
- don't invalidate class-level param caches during shutdown
nsf.c: parameter passing reform
- don't pass full argument list for filtering methods calle further
methods from C (such as new/create/... ) to allow processing of e.g. "--" in "new"
to separate arguments to "new" cleanly from arguments passed to "create".
Now we can use e.g. "C new -- -childof 123" in case class C has a property "childof".
- extend c-generator to accept option "-objv0" to pass the original "objv[0]" to the
called command. Since we had previously "allargs", we have to pass the objv[0] now
differently
- more thorough checking ISOBJ(someObj) macro for asserts
(use "assert(ISOBJ(someObj))" instead of just "assert(someObj)")
- extend regression test
nsf.c:
- checked, that all CallDirectly() cases, where method is dispatched
(no direct call) are covered by the regression tests
- avoid double memcpy() in dispatch recreate by using ObjectDispatch()
rather than CallMethod()
- removed memcpy() in call-directly for "create"
- some more cleanup
gentclAPI.tcl:
- added option "-flags", which can be used for every parameter.
example: .... -flags NSF_ARG_NOLEADINGDASH ....
- experimental: use NSF_ARG_NOLEADINGDASH for pattern "info subclass"
to improve error messages.
- extended regression test
nsf.c:
- relax the meaning of noleadingdash to allow negative numbers
- rename noleadingdash to e.g. nodashalnum
nsf.c:
- define means to protect "undefined" internally-directly called methods
__alloc and __dealloc in nx. This is achieved mostly via a an
additional value in a method declaration in ::nsf::objectsystem::create.
Example:
-class.dealloc {__dealloc ::nsf::methods::class::dealloc 1}
- extend regression test
nsf.c:
- allow abbreviated nonpos args
- change name of relation slot "superclass" to "superclasses".
(part of a planned change to use plural for set-valued parameters,
"info superclasses" and similar changes for mixins/filters will
probably follow)
nx.tcl: pluralism reform part 2
- changed methods
/cls/ info subclass -> /cls/ info subclasses
/cls/ info superclass -> /cls/ info superclasses
/cls/ mixin ... -> /cls/ mixins
/cls/ filter ... -> /cls/ filters
/cls/ object mixin ... -> /cls/ object mixins
/cls/ object filter ... -> /cls/ object filters
- changed configure parameters
/cls/ configure -mixin -> /cls/ configure -mixins
/cls/ configure -filter -> /cls/ configure -filters
/obj/ configure -object-mixin -> /obj/ configure -object-mixins
/obj/ configure -object-filter -> /obj/ configure -object-filters
- added handling for calling relation slot with unknown sub method
nx.tcl:
- make all __* system methods in nx redefine-protected
- let "nsf::configure objectsystem" return handles and protections as well
nx.tcl: pluralism reform part 3
- introduced simple plural form "mixins" and "filters" for introspection
- moved differentiated interface into slot methods.
the slot methods "get" stay symmetrically to "set",
but additional methods "classes" or "methods" are used
like "guard" to obtain partial results of the
mixin and filter specs
- changed info methods
/cls/ info mixin classes -> /cls/ info mixins
/cls/ info filter methods -> /cls/ info filters
/obj/ info object mixin classes -> /obj/ info object mixins
/obj/ info object filter methods -> /obj/ info object filters
- dropped
/cls/ info mixin guard
/cls/ info filter guard
/obj/ info object mixin guard
/obj/ info object filter guard
- added
/cls/ mixins classes
/cls/ filters methods
/obj/ object filters methods
/obj/ object mixins classes
- asymmetry between "/obj/ info lookup mixins" vs. "/obj/ info ?object? mixin classes" resolved.
nsf.c:
- dropped unused object::info::is
- renamed
::nsf::methods::class::info::filtermethods -> ::nsf::methods::class::info::filters
::nsf::methods::object::info::filtermethods -> ::nsf::methods::object::info::filters
::nsf::methods::class::info::mixinclasses -> ::nsf::methods::class::info::mixins
::nsf::methods::object::info::mixinclasses -> ::nsf::methods::object::info::mixins
nsf.c:
- provide error messages for ambiguous abbreviations
- extend regression test (now 5460 tests)
nsf.c:
- see no need, why we should "set nodashalnum for int types"
- extended regression test
nsf.c:
- remove redundant null check for object and add assertion
documentation:
- add current args to migration guide
- fix cut&paste error: replace "current currentclass" by "current calledclass"
Migration guide and tutorial:
- updated "/cls/ info superclasses" and "/cls/ info subclasses"
- updated "/cls/ info mixins" and "/obj/ info object mixins"
- updated "/cls/ info filters" and "/obj/ info object filters"
- dropped "/cls/ info mixin guard" and "/obj/ info object mixin guard"
dropped "/cls/ info filter guard" and "/obj/ info object filter guard"
(use "-guard option instead)
- updated "/cls/ mixins ...", "/obj/ object mixins ...",
"/cls/ filteres ...", "/obj/ object filters ..."
nsf.h
- In Tcl 8.6.1 it might be that a Tcl_Obj has length > 0 but bytes == NULL. We have
to relax out tcl_obj-sanity test for this case from assertions.
nsf.c:
- remove redundant definition
- reduce variable scope
- make sure to follow nonnull assumptions
nsf.c:
- implement a new approach to error reporting in ensembles:
instead of trying to find the "right" place to report the best "error",
compute the longest valid ensemble prefix from all the stack frames.
nx.tcl:
- simplify the info ensembles on nx::Object or nx::Class significantly,
by making use if ensemble-next.
- delete "info unknown", since this is not called.
nsf.c:
- make types for bit operations unsigned (mostly flags)
build system:
- don't call genstubs from configure, since Debian does not seem
to have genstubs.tcl installed. Now, we pre-generate the
stub files for tcl8.5 and tcl8.6 and copy the "right" version
depending on the configured version.
- Make dtplite configurable in Makefile, e.g.
make "DTPLITE=/usr/local/ns/bin/tclsh8.5 /usr/local/ns/bin/dtplite" man
- regenerate documentation
- bump version number to 2.0.0 (also in .man files)
- write body-blocks of if on separate lines
- change variable name "validCscPtr" to "isValidCsc", since
it is a boolean and not a ptr (tcl coding guidelines)
- prefer explicit comparisons
- remove test, since it is covered already by assertions
- Is NsfParamDefs.slotObj obsolete?
Right now, the slot objs responsible for (method) parameters are
stored along with each Nsf_Param, and not as a
NsfParamDefs.slotObj. NsfParamDefs.slotObj is not used actively,
::nsf::method::property slotobj is dysfunctional (expects extra
argument, which cannot be provided + control-flow issue CID 88767).
pt. 1: For the time being, I removed ::nsf::method::property slotobj
entirely (also to fix CID 88767). Seems harmless, not tested
explicitly, not required by object-system scripts, ...
pt. 2: NsfParamDefs.slotObj and its memory-management statements all
over remain in place, to be reviewed.
- removed NsfParamDefs.slotObj (and single occurrence for memory-management)
since it is not used for the time being
- fix potential bug on tcl-triggered cmd-delete operations, where
destroy returns non-TCL_OK and name of the object could not be
retrieved anymore in error message.
- move dereferencing of members after assertions
- improve robustness of destroy: in case an error happened in a
destroy method in implicit delete operations, a crash was possible,
since the state of the object to be delete was somewhat unclear
(it might or might not have been deleted). Now, the object
is explicitly kept longer around to allow proper handling).
- update licenses
- reduce implicit conversions
- write body of if-statements as blocks
- whitespace changes
- prefer boolean expressions
- add likely/unlikely hints
- added optional parameter "-target" for serializer to ease
changing name of object in serialization
- new command nsf::method::forward::property in analogy to nsf::method::property
for reading+writing introspection of forwarders (important for serializer,
when different target objects are specified, to map the per-object forwarder)
- extended regression test
- bumped version number of serializer to 2.1
- Fixed a bug that disallowed the combination of valuecmd and
valuechangedcmd for a single property (many thanks to Zoran
for pointing this out)
Removed implicit substdefault for configure parameters in nx:
- The syntax of substdefault for method parameters and configure
parameters was different. For method parameters, it was necessary to
specify :substdefault per parameter to activate it, for configure
parameter is was based in the XOTcl tradition on the content of the
default (whether it contains [...]) One problem is, that there was
no easy way to turn this feature off. If one wants to provide a
script block as a default, it was necessary to escape all square
brackets.
- Now, in nx, one has to specify :substdefault for configure
parameter explicitly as well, syntax for configure and method
parameters is the same.
- XOTcl 2.0 keeps implicit substdefaults (backward compatible)
- fix bug: never try to substdefault, when there is no default given.
- don't swallow errors triggered from variable write traces in configure
- handle result of Tcl_ObjSetVar2() in all cases
- Use standard logging for
nsf::__profile_trace ... -verbose true ...
By using the standard logging mechanism, we can redefining
::nsf::log to output e.g. trace in a GUI.
- Add argument "-dontsave" to nsf::__profile_trace
to avoid saving trace in memory
- Refactor trace and debug output to deliver lists.
This makes it easier to postprocess the results from Tcl.
Profile trace enhancements:
- add optional argument "-builtins" to nsf::__profile_trace
to trace a selected list of builtins. Every element of the
list passed to "-builtins" might contain a cmd name and
optionally a maximum number of arguments to be shown
(typically 0 or 1)
- generalized NsfReplaceCommand* logic to become more general
usable (e.g. for the builtins mechanism of nsf::__profile_trace)
- New macros NSF_nonnull_assert() and nonnull_assert()
Background: The unreleased gcc6 with "-pedantic"
complaints since recently about asserts, in which nonnull
conditions implied by nonnull declarations are explicitly
tested, and spits out warnings like
... warning: nonnull argument ... compared to NULL ...
The new macros turns off asserts, when gcc6 is used.
- new introspection methods:
"/obj/ info object method callprotection /m/"
"/cls/ info method callprotection /m/"
"/obj/ info baseclass"
- extended regression test
- added nsf::method::property /obj/ /method/ debug ?0|1?
when debug is activated, a debug line written to the log file when
the function is called and exited
- added nsf::method::property /obj/ /method/ deprecated ?0|1?
when deprecated is activated, a warning written to the log file when
the function is called
- added flags to nsf::proc: -debug and -deprecated
(can als be set via nsf::method::property with an arbitrary object
and proc passed fully qualified)
- bumped version number to 2.0.1
- handling flags "-deprecated" and "-debug" properties for nsf::proc
(in "nsf::cmd::info definition /proc/" and serializer)
- extended regression test for introspecting nsf::cmd::info definition
and flags "-deprecated" and "-debug"
- nx: added new introspection options
/cls/ info method debug
/cls/ info method deprecated
/obj/ info object method debug
/obj/ info object method deprecated
- nx: added flag "-debug" and "-deprecated" to methods
"method"
"object method"
"alias"
"object alias"
"forward"
"object forward"
such one can use e.g.
/cls/ public alias -deprecated|-debug /method/ ...
/cls/ public forward -deprecated|-debug /method/ ...
/cls/ public method -deprecated|-debug /method/ ...
/obj/ public object alias -deprecated|-debug /method/ ...
/obj/ public object forward -deprecated|-debug /method/ ...
/obj/ public object method -deprecated|-debug /method/ ...
- added new cmd:
nsf::method::property /obj/ ?-per-object? /method/ exists
to check, whether a method is defined for an object.
- output triggered via "-debug" is now generated via the
tcl functions "nsf::debug::call" and "nsf::debug::exit",
that can be redefined (similar to e.g. nsf::deprecated)
- cleanup of nsfProfile.c commands
- defined macros ObjectName_() and ClassName_() that behave
like the versions without "_", but do not check the passed
arg against NULL. This avoids warnings in newest versions
of gcc6 and cppcheck.
- extended regression test
serializer:
- added handling of "-debug" and "-deprecated" in serializer
- allow export of nsfprocs via "exportMethods declaration"
in order to keep otherwise excluded cmds in the result.
this allows us to keep nsf::debug::* or nsf::deprecated
definitions in the blueprint in OpenACS.
- hardened serializer (use e.g. "::namespace" instead
of "namespace" when there is a potential conflict with
a method named "namespace", prefer nsf::directdispatch, etc.)
- extended regression test
- fix potential memory corruption bug in NsfDStringVPrintf()
- replace all remaning ObjectName and ClassName with variant with
trailing "_" when appropriate
- allow nsf::procs with zero arguments or plain arguments (when
"-debug" is used
- extended regression test
- bump version number to 2.1
- make use of Tcl_SaveInterpState() and friends for saving results
in NsfDStringEval()
- added results in debug exit calls
- changed interface of NsfDStringEval to control behavior via bitflags
(this is after all more readable than a argument list of "0" and "1"s)
- added optional recursion prevention for functions called via NsfDStringEval
(handling NSF_EVAL_DEBUG, NSF_EVAL_LOG, NSF_EVAL_DEPRECATED)
- added regression tests for potential recursive calls
- added flags "-debug" and "-deprecated" to XOTcl 2 "instproc", "proc",
"instforward" and "forward" methods
- turned all for-loops controlled over a nonnull value into while loops
- updated TODO, copyright notices, version number
- Let nsf create classes with ::nsf::object::unknown handler in the fly, when
c-function are called with objects of type class. This is necessary for
triggering creation attempts in ttrace via
::nsf::object::alloc SOMECLASS SOMEOBJ
- added Tcl_HashKeyType cmdPtrHashKeyType for command pointers
- gcc6:
* gcc6 seems to have a bug: when e.g. a variable "foo" is declared as nonnull,
then the construct
do {
...
foo = foo->nextPtr;
} while (foo != NULL);
will raise a warning, despite of the fact that foo is overwritten.
This was reported and confirmed as a false positive; to be fixed
in future gcc6.
- Re-factored new hash-table infrastructure (based on function-pointer
keys) to support method-definitions (and future uses as well).
- Allow combination of "-trace get" with default value (was previously disallowed)
- Extend regression test
xotcl2:
- added "-returns" flag to XOTcl's instprocs/procs and methods,
very similar to "-returns" in nx
- extended serializer to handle "-returns" flag
- extended regression test
cmd resolver work
- fix test, when OS specific cmd resolver is used
from a NSF_CSC_CALL_IS_COMPILE frame
- improved output from __db_show_obj: put results into one line
instead of multiple lines
- new debug function __db_get_obj: return into about a tcl_obj in form
of a dict (in general, one should not rely on Tcl_Obj internals,
especially when upgrading over major Tcl versions, but for
testing/understanding behavior etc., such a command is helpful).
- extend regression test
- make effects of namespace-imported classes more local
remove various code smells:
- add const declarations
- prefer boolean tests
- don't write "for" loops without a block
- don't pass non-initialized value in an array on index [0]
- reduce variable scope
- prefer single returns statements in functions
- dont't use CONST unless defined by Tcl-API
code generator changes:
- create enum types instead of enum values for nsf API
- use enum types in code
- improve variable for logging from "debugLevel" to "logSeverity"
(print logging messages which have a severity larger equal the then given value;
so; "nsf::configure debugLevel 0" will print everything, and
"nsf::configure debugLevel 3" will print just error messages and omit warnings etc.)
- this is not a change in sematics, but removes some confusion in the code.
therefore the configure name was not changed
- Remove occurrences of deprecated Tcl Call Tcl_AppendResult() in overall code
- Remove unused NsfObjInfoObjectparameterMethod()
(:nsf::methods::object::info::objectparameter). Makes CID 88775
obsolete. Entails removal of the then unused NsfParamDefsFilter()
(which has been effectively replaced by performed by
::nsf::parameter::filter at the script level).
- Added Rosetta example: https://rosettacode.org/wiki/Tokenize_a_string_with_escaping
- Added Rosetta example: https://rosettacode.org/wiki/Tree_traversal
- Added Rosetta example: https://rosettacode.org/wiki/Multiple_distinct_objects
- Added Rosetta example: https://rosettacode.org/wiki/Add_a_variable_to_a_class_instance_at_runtime
- Improve error message with {*} operator, not 'unknown'.
Object new {
:object method foo {a b c args} { puts --[current method]}
{*}[list :foo 1 2 3 4 5 6];
: {*}[list foo 1 2 3 4 5 6];
catch {:{*}[list foo 1 2 3 4 5 6]} msg; puts msg=$msg
}
proc =foo {a b c args} { puts foo }
catch {={*}[list foo 1 2 3 4 5 6]} msg; puts msg=$msg
- Added Rosetta example: https://rosettacode.org/wiki/Polymorphic_copy#Tcl
- Added Rosetta example: https://rosettacode.org/wiki/Inheritance/Multiple#Tcl
- make nsf compilable with "-DTCL_NO_DEPRECATED"
- Why is the following warning popping up?
% Object info method parameters configure x*
Warning: Could not find value checker type=virtualobjectargs defined on ::nx::methodParameterSlot
ParamOptionParse(): 'virtualobjectargs' and 'virtualclassargs'
defaulted to ConvertViaCmd when parsed from Tcl spec; explicitly set
ConvertToNothing to match the intended semantics and to avoid false
warnings (e.g., missing type=virtualobjectargs type checker)
- Added Rosetta example: https://rosettacode.org/wiki/Inheritance/Single
- new subcommand "nsf::current level", returns empty, if we are not on a nsf frame/level.
- improve sanity test in ISOBJ(): obj->bytes might only be NULL when type is given.
- under core-8-5-branch, nxsh yields on exit:
% exit
Warning: RefCount for obj 0x7fc98a050890 4 (name ::nx::shell2) > 1
- don't call tcl eval operations from NsfLog() in phyical destroy round
- extend regression test for shell with tests in [info nameofexecutable] rather than in nxhs
- hint:
> SS the 'consider' recommendation of nx::Class->unknown message is irritating:
>
> % Class create Book
> ::Book
> % Book price set 10
> method 'price' unknown for ::Book; consider '::Book create price set 10' instead of '::Book price set 10'
> ::Book ::nx::Class->unknown
> invoked from within
> "Book price set 10"
> ...
> As this is only relevant for someone with XOTcl legacy in mind, NX is
> not about source compatibility with XOTcl anyways.
GN: in XOTcl, it is hard to avoid NX (e.g. slots). we have this mix there. Reality shows,
that users are confused, if they want to create an instance, but they receive just
an error message. Mybe on the longer range, we can drop the hint.
For the time being, I've made the hint even more verbose.
- Investigate NsfMethodContext mem-bookkeeping/ possible leak: Turned
out to be false positives due to Tcl history retaining references
beyond NsfFinalizeCmd. An explicit script [exit] in interactive Tcl
shells will still lead to unbalanced refcounts (NsfMethodContext),
no way around that. But at least for exit-free scripts in tclshs, we
should be fine.
$ tclsh
% package req nx; nx::Object new
::nsf::__#0
% exit
******** NSF MEM Count *********
* count peak
* 0 1 INCR_REF_COUNT-converterNameObj
* 0 14 Tcl_InitHashTable
* 0 1 INCR_REF_COUNTkeyObj
* 0 7 INCR_REF_COUNTtcd->onerror
* 0 6 INCR_REF_COUNTcmdName
* 0 1 INCR_REF_COUNTfullParamObj
* 0 12 object.activationCount
* 0 1 NsfClass**
* 0 56 NsfParamDefs
* 0 2 INCR_REF_COUNTnameObj
* 1 18 NsfMethodContext
(without "nx::Object new", "package req" only, the NsfMethodContext
counts are balanced)
========================================================================
TODO:
- /obj/ uplevel + upvar should behave different when being provided a
relative level specifier, to provide filter/ mixin transparency at
all times, and then move upwards as requested:
/obj/ uplevel 1 set x 1
should be equal to
/obj/ uplevel {uplevel 1 set x 1}
It is rather pointless to provide for TclObjGetFrame resolution in
uplevel/upvar methods, because then this use is just unnecessary
sugar for using uplevel/ upvar commands directly. However, this
would be a change that potentially breaks exisiting client code.
- add value=isSet as a new VariableSlot method, to wrap around [info exists] and others.
- DTrace: --with-dtrace vs. --enable-dtrace (as in Tcl)? generate
header file only for distributions, auto-generated otherwise? -G
option not supported anymore on Mac OS X (although man dtrace
maintains references to it?)
- coloncmd reform:
* memcheck
* use free list rather then obj list for freeing NsfColonCmdContext
since the Tcl_Obj might be changed
* maybe merge approach with Tcl obj type nsfInstanceMethod (and nsfObjectMethod)
- IsObjectOfType(): the error messages provided could be improved:
rather than saying
"expected object of type ::C but got "::nsf::__#6" for parameter "s2""
one could report
"expected object of type ::C but got "::nsf::__#6" of type ::D (::A ::B ::C ::nx::Object) for parameter "s2""
Otherwise, the instance name ::nsf::__#6 can be easily confused for
the (sought) type name.
- Refactoring option: Why not use ParameterCheck for setters? That is,
rather than ParamParse on setter definition time, call
ParameterCheck() when calling the setter (and have the param
structure build lazily, on first use). Tcl_Obj intrep will do good,
in most cases. And we gain a more unified interface (stripping away
one unique path to Param* machinery)?
- nsf::proc should also have a -returns option, right?
% ::nsf::proc x
required argument 'arguments' is missing, should be:
::nsf::proc ?-ad? ?-checkalways? ?-debug? ?-deprecated? /procName/ /arguments/ /body/
% nsf::proc x {-a:integer} -returns alnum {;}
invalid argument 'alnum', maybe too many arguments; should be "nsf::proc ?-ad? ?-checkalways? ?-debug? ?-deprecated? /procName/ /arguments/ /body/"
- nsf::parseargs would need some more love:
* what is the intended behavior, in these edge cases?
# TODO: Are the below cases intended?
? {apply {{} {nsf::parseargs {a} {}; llength [info vars];}}} 0
? {apply {{} {nsf::parseargs {} {1}; llength [info vars];}}} 0
Right now, parseargs is more or less a NOOP in these cases (which is
not consistent with arg-handling otherwise).
* Should the behavior in the Tcl-only case be more like [lassign] or
procedure-like record checking?
* dependency inversion: parseargs is provided by nsf, but requires
nx, occasionally. See:
% package req nsf
2.1.0
% nsf::parseargs a:foo b
non-existing slot object "::nx::methodParameterSlot"
- Refactor: on the property/variable-creation paths,
parseParameterSpec is currently called twice. once before
createFromParameterSpec, once within. This should not be needed. -
1. extract the parseParameterSpec call out, and pass a parse result
to createFromParameterSpec?
2. handle all cases requiring the early call to parseParameterSpec
in createFromParameterSpec?
My preference is 1.
- various on slots:
* RelationSlot value=delete -nocomplain is dead API.
* value=delete semantics: I think we should provide a full-pass
deletion, rather than the first occurrence of an element only (too
specific); a capture-all deletion is more in line with a
multivalued, which is a not necessarily unique list of elements:
return [lsearch -glob -inline -all -not $l $value]
* custom value checkers (type=*) inconsistency:
Depending on whether the type=* method is called directly
(configure, ArgumentCheck) or indirectly (per-slot value=* methods),
the method parameter "prop" gets different values:
* direct calls: name of the variable/parameter
* indirect calls: name of the value=* method parameter which is the
hardcoded 'value'
error messages using $prop (rather than ${:name} of the type=*
method-hosting slot) then turn out different depending on the call
context.
a) drop the 'prop' parameter of type= methods, because we can get
the info from the slot.
b) change the value=* method generator from hardcoding 'value' to substitute ${:name}, e.g.:
set vspec [:namedParameterSpec {} ${:name} $options_single]
in any way, this will require changing many test for errorm essages
in the test suite.
- XOTcl2, creates via unknown "fails" (does not trigger
create/recreate) if intercepted by filters (because ::c1 is
considered an existing cmd and ::c1 defaultmethod is dispatched):
package req XOTcl
xotcl::Class create C
xotcl::Object instproc f args {
puts f([self calledproc]); next
}
xotcl::Object instfilter f; # turn off to see regular behavior.
puts [C ::c1]; # Class->unknown is called!
puts ---
puts [C ::c1]; # With filter 'f' on, Class->unknown is *not* called anymore. It should, otherwise (re-)create etc. is never triggered ...
Some background: NextSearchAndInvoke() on a filter next does not check
for dispatches based on object commands (as ObjectDispatch() *after*
filter processing), but introducing a:
if (cmd != NULL && CmdIsNsfObject(cmd)) { /* ... */ cmd = NULL; }
leads to unwanted interactions with ensemble objects/methods.
- Should we add exists to the Variableslot-Interface, to surface ::nsf::var::exists.
+ ::nx::VariableSlot public method value=exists {obj prop} {
+ ::nsf::var::exists $obj $prop
+ }
Right now, one has to resort to a "low-level" /obj/ eval {info
exists :/propVar/} or the like for checks before calling /obj/
/prop/ get|set ...
- Add Rosetta examples:
(more substantial)
https://rosettacode.org/wiki/Active_object
? https://rosettacode.org/wiki/Window_creation/X11
? https://rosettacode.org/wiki/Scope_modifiers
- maybe add "nsf::configure logSeverity" as a new name for "debugLevel"
and mark the latter as deprecated.
- Shouldn't we add debug/deprecated filters for "info methods", i.e.:
... info methods ?-debug? ?-deprecated? ?-callprotection all|public|protected|private? ?-closure? ?-type all|scripted|builtin|alias|forwarder|object|setter|nsfproc? ?-path? ?-source all|application|system? ?/pattern/?"
- add to doc:
"-returns" flag for instproc/proc in XOTcl2
# in case, when similar cmds are commented, add:
#
nsf::proc -debug /name/ ...
nsf::proc -deprecated /name/ ...
nsf::method::property /obj/ ?-per-object? /method/ exists
nsf::method::property /obj/ ?-per-object? /method/ debug ?0|1?
nsf::method::property /obj/ ?-per-object? /method/ deprecated ?0|1?
- maybe better handling of single-colon prefixed vars in trace procs,
when passing values to nsf::var::set/get/...
- maybe more complete handling of other forward "properties"
- should we change "/obj/ info lookup syntax /methodName/" to return obj and method as well?
(similar to "info method syntax /methodName/")
- we could drop methods::object::info::objectparameter
- check deactivated tests in tests/serialize.test
C(One), C(IgnoreAll), C(None2)
and xlloc fix
Stefan: doc items
- make rough comparison table with NX, XOTcl, tclOO, itcl, Ruby, Python
comparison NX vs. TclOO is most probably the most important
Most general superclass
Metaclass
Per-object methods
Per-Object mixins -- none, class, or class hierarchy
Per-Class mixins -- none, class, or class hierarchy
transitive mixins classes
Per-object filters
Per-class filters
aliases
Traits
Composite Traits
Method protection public/protected/private
positional arguments none, leading args, arbitrary
argument value checkers
Create objects classes with no callable methods
- doc/tutorial2.html
- warnings for "numeric" names for args and nonpos-args?
- special handling of values looking like nonpos-flags,
but which are not ones (-1, "- a b c", ....) in detection
when to throw unknown.
- interface of "variable" and "attribute":
* add switch -array for "variable"? (Just setting is trivial,
handling setters and incremental setter is more work)
- extend mongo::gridfs::store_file with a switch -metadata to
pass metadata together at gridfs file creation time
- do we have to adjust the documentation in xotcl2 for object initialization?
- maybe optional arg (true) to ::nsf::object::initialized
to generalize -noinit
- maybe: add a disposition=pipe
- maybe: add "-asHTML" as style option to parametersyntax
- MixinComputeOrderFullList() could receive a flag to store
source classes in checkList
- if the check on eg. info-heritage-circular in test/info.method.tcl
reports a warning on exit, if we get an exception.
- what to do with metadata analyzer?
Still needed? Already replaced by new doctool?
Does it have to run on make? Can doctool run on Make?
- Higher binary compatibility for future versions:
* It is not nice to have the full Nsf_Param structure in nsf.h
(required for Nsf_methodDefinition in the c code generator)
* It is not nice to have the full ParseContext structure in nsfmongo
(required for the allocation of the parse context in the stubs)
Adding fields to these structures would kill alder binaries
- when alloc|dealloc are loaded via require, we have
no redefined-protection on those. Since the script does not know,
on which class|object these are defined one cannot make assumption
on these. Problem?
- The structure of the script body requires currently that
"class|object ?-per-object?" is inserted at the 1st pos.
This is not sufficient, if we would like to test in this
script, whether the first arg is e.g. a class.
- document value added replacements of Tcl functions
- configure parameter type forward:
- regression test
- get rid of eager tcd creation (optimization, can go to future releases)
- slotmachinerie 2
- should we deactivate add/delete for non-multivalued cases?
- allow noarg+default/initcmd ?
- default/initcmd/subsdefault: can we simplify these?
or add messages for conflicting usages.
- Makefile/::nsf::config: Integrate git meta-data (commit hash, branch/tag labels)
- doc:
* no-accessor properties/slots are still reported as methods: class
* method parameters need indentation ...
* method ensembles are reported as "Implementation details: alias", is this ok?
* doc validator reports weird info submethods: info definition,
info names, info objects -> mean "info slot *" ... smells like
generator garbage ...
* inconsistency: "info slot *" are built on "slotsobjects" which
does not take -source and -closure parameters ... still, they
are in the NX method interfaces ... review and document accordingly.
* sub-method cross-references per @use does not work (parameters
are not reproduced, probably no [:origin] resolution is
performed: See the case for "info properties" -> "info slot
definition"
* "info method": elaborate on the options, right now the doc is
minimal ...
* "info method" -> why does the parameter syntax does not report all
enumeration literals, rather than ?infomethodsubcmd? ???
* fix sub methods validation reporting -> mismatch?
* Ensemble methods: obj info & friends ... there is no
parametersyntax reported; add something literal in the template:
<sub-method> ?
* Object|Class mixin|filter guard -> how to document (and not
reported by nxdoc as missing either, as their as slot-specific)?
And link to Class class filterguard|mixinguard ... Why not
defining the latter as ensembles "Class class filter|mixin
guard"?
* Ensemble methods, i.e. intermediate ones, should not be filter
by inheritance in the nxdoc output. For example, info() in Class
shares many details of info in Object, but it does not visualize
this quasi-inheritance
* @package.@require(): really needed?
* @package.@version: fix validation mode ... expected/actual
version numbers are not compared ...
* NextScriptingLanguage/index.html: glossary entries in nsf.nxd
should be sorted (in the source) ...... Maybe, a single glossary.nxd
file? SS: Right now, the name of the nxd file derives from the the
script name. I mark this as TODO for the future.
* doc/langRef2.xotcl vs library/xotcl/doc/langRef.xotcl
* @author: how to visualise the authorship in the generated markup
(yuidoc)?
- do we need contains in nx?
- nsf::proc
* check, if there are parameter types that should not be applicable
for nsf::proc
* toplevel (object less) introspection
- documentation
* migration guide
3.8. Dispatch, Aliases, etc.: to be done or omitted
- check performance implications of value checker
- library + XOTcl apps
- work on binary packages of xotcl (store + xml)
- nicht gewartete/nicht getestete library aus distro entfernen?
- migration von einzelnen paketen nach next? von welchen?
Ein paar Punkte im folgenden könnten obsolet sein:
TODO "Kleinigkeiten"
- should we continue to work on the problem of the interp-aliased class,
exported from one ns, imported into another one?
- constants in type converter (in and out)
#if 1
/* the following check operations is xotcl1 legacy and is not
generic. it should be replaced by another methodproperty.
Most of the is*String()
definition are then obsolete and should be deleted from
xotclInt.h as well.
*/
if (isCheckString(methodName)) {
return TCL_OK;
}
#endif
For future releases (after first alpha/beta release)
- cmd introspection:
nsf defines a commands (e.g. nsf::proc) and unregistered methods.
The interfaces of these commands can be queried via methods
% nx::Object info method parameters ::nsf::proc
-ad:switch procName arguments body
% nx::Object info method syntax ::nsf::proc
/cls/ proc ?-ad? /procName/ /arguments/ /body/
% nx::Object info method definition ::nsf::proc
Warning: Could not obtain alias definition for proc...
which return only partially correct results (the first is correct,
the second one is misleading, the error message can be improved
for the third case.
maybe
::nsf::info command parameters|syntax /cmd/
might make sense, but there might be more candidates
for nsf::info around. OTOH, we have already
nsf::object::exists, nsf::is, etc.
* generalizing parameter-specific per-object info
Now we have
__initcmd(varname) for init-cmds of variable traces
__cmd(varname) for the eval-ed cmds (mostly
for documentation purposes
to postprocess the init block
We could need
__required_satisfied(varname) to handle
required parameter aliases
As generalization, we could use a dict
__parameterstate(varname)
or even
__parameterstate
with a dict to collect the various aspects.
for performance reasons, we do not want to set this
variable too frequent, serialization and blueprint
aspects have to be considered. This would as well
address cases, where the parameter has a different name
than the associated variable (e.g. private properties)
* Currently, in NX, specifying mandatory parameters may break
object construction as init won't receive any arguments (no
residual args). We should provide a warning when a user
defines arguments for init (or provide some other syntactic sugar)
* extend traits (object-specific traits, test cases, etc.)
* RFE: forwarders/aliases: -checkalways is missing.
Issues:
1) limit to -returns only?
checkalways affects only input-parameters, not return.
(purpose: make it possible to rely on parameter checking
from external sources, no matter whether checking is turned
on/off). furthermore, it effects only checking for procs.
For C-implemented commands, there is no way to avoid e.g.
checking if something is an integer, since the binary
representation of the integer is passed.
so i don't understand "limit to -returns".
2) cover value checkers of method parameters also,
effectively overruling -checkalways settings of the
aliased/forwarded nsf::proc or method?
i guess that this is based on the assumption,
there would be value-checkers for forwarders
or aliases. Then one would have to handle the
conflicts. However, forwarders and aliases
pass arguments around without having any knowledge
about parameter definitions. They don't check
anything by design.
* RFE Revisit nsf::*::assertion interface? Why does nsf::method::assertion
allow for setting invariants. One would rather expect a
::nsf::object|class::assertion or the like?
The reason for the current naming is simply that assertions
are only implemented for scripted methods.
* pre/post conditions are just checked for scripted methods,
since only these have stack frames, which are necessary
to access self or the resolver variables.
* invariants are only checkable during scripted methods,
there is no way to intercept c-based functions.
Checking these before/after c-implemented functions
should be possible though.
* REF: feature request 'remove "-guard" from mixin and filter specs, just have two-element lists'
would require to have different sets of converters for slots depending on object system
* add maybe "::nsf::object::property /obj/ volatile 0|1" to alter
volatile state.
* Reduce / remove hard-code names. Right now, "method"/"alias"/
"forward" is returned by "info definition" introspection.
This is not serious, since e.g. XOTcl handles this on the
script level by mapping these names to the XOTcl counterparts.
We could as well make this configurable via the object-system
parameters.
* Consider alternate method name/place for subcmds (and/or slots) on classes
- currently, there are potential conflicts between slots and ensemble objects
- provide a different place in the namespaces could simplify this
* Cleanup the set of active filters when filters are removed (only relevant
for the speed of scripts with filters and a high number of instances)
* Ensembles
- It could be possible to reduce stack frames in ensembles. Just a
top ensemble frame could be sufficient.
- The full names for ensemble methods could be stored in the cmd tables
to make lookup faster.
* Serializer: handing of xo::at_cleanup in serializer
(either generalization or move to OpenACS/aolserver init/naviserver init)
* Parameter/argument handling
- Add an unknown handler for unknown non-pos args to Argument parser.
The problem is to find a way to avoid method deletions or redefinitions
or to recover from these gracefully (when e.g. the unknown handler
deletes the parameters currently being worked on).
- Canonical parameter representations:
"p:integer,multivalued" => "-name p -type integer -multivalued"
"x:type,arg=::D d1" => "-name x -type type -arg ::D -default d1"
- Argument passing of C functions is currently based on an
interpreter of the argument lists. It should be possible to turn
the interpreter into a compiler to speed up argument passing. But
maybe, this would bloat the code-size.
- Use parameter syntax in genTclAPI
- better handling of "c1 cget -noinit" ?
* experimental features:
- document/extend/generalize/remove the experimental object properties
perobjectdispatch and keepcallerself
- behavior on keepcallerself on ordinary dispatches with implicit/explicit
receiver (currently the flag is ignored, the code just commented out)
* C-Code
* Several of the tracing options in nsf.h could be replaced by DTrace
* Rework implicit namespace completion (NameInNamespaceObj(),
maybe based on BeginOfCallChain()).
* Rework C-interface (maybe for post-alpha, but we have be first
clear on scope and intention. A possibility would be to provide
all entries from gentclAPI, but we would loose most likely
static property and the newly achieved ease of changing is
effectively frozen by the stubs interface, which has to be
stable.
* NsfClassListAdd() and friends could be made generic
* Coroutines
- extend coro regression test
- coro-enable nsf::proc
* reenable/translate deleted XOTcl demo scripts, such as
e.g. those from library/xotcl/apps/scripts
observation:
- [current isnextcall] does not work for ensemble next:
... but should probably not, since this is an implicit
next call just for resolving an ensemble call.
Object create o {
:public object method foo {} {return [current isnextcall]}
:public object method "x y" {} {return [current isnextcall]}
}
Class create M {
:public method foo {} {next}
:public method "x y" {} {next}
}
? {o foo} 0
? {o x y} 0
o object mixins add M
? {o foo} 1
? {o x y} 1; # gives 0 ...
|