1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105 14106 14107 14108 14109 14110 14111 14112 14113 14114 14115 14116 14117 14118 14119 14120 14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 14137 14138 14139 14140 14141 14142 14143 14144 14145 14146 14147 14148 14149 14150 14151 14152 14153 14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 14165 14166 14167 14168 14169 14170 14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 14191 14192 14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 14263 14264 14265 14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 14286 14287 14288 14289 14290 14291 14292 14293 14294 14295 14296 14297 14298 14299 14300 14301 14302 14303 14304 14305 14306 14307 14308 14309 14310 14311 14312 14313 14314 14315 14316 14317 14318 14319 14320 14321 14322 14323 14324 14325 14326 14327 14328 14329 14330 14331 14332 14333 14334 14335 14336 14337 14338 14339 14340 14341 14342 14343 14344 14345 14346 14347 14348 14349 14350 14351 14352 14353 14354 14355 14356 14357 14358 14359 14360 14361 14362 14363 14364 14365 14366 14367 14368 14369 14370 14371 14372 14373 14374 14375 14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426 14427 14428 14429 14430 14431 14432 14433 14434 14435 14436 14437 14438 14439 14440 14441 14442 14443 14444 14445 14446 14447 14448 14449 14450 14451 14452 14453 14454 14455 14456 14457 14458 14459 14460 14461 14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 14476 14477 14478 14479 14480 14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 14494 14495 14496 14497 14498 14499 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517 14518 14519 14520 14521 14522 14523 14524 14525 14526 14527 14528 14529 14530 14531 14532 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 14550 14551 14552 14553 14554 14555 14556 14557 14558 14559 14560 14561 14562 14563 14564 14565 14566 14567 14568 14569 14570 14571 14572 14573 14574 14575 14576 14577 14578 14579 14580 14581 14582 14583 14584 14585 14586 14587 14588 14589 14590 14591 14592 14593 14594 14595 14596 14597 14598 14599 14600 14601 14602 14603 14604 14605 14606 14607 14608 14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 14630 14631 14632 14633 14634 14635 14636 14637 14638 14639 14640 14641 14642 14643 14644 14645 14646 14647 14648 14649 14650 14651 14652 14653 14654 14655 14656 14657 14658 14659 14660 14661 14662 14663 14664 14665 14666 14667 14668 14669 14670 14671 14672 14673 14674 14675 14676 14677 14678 14679 14680 14681 14682 14683 14684 14685 14686 14687 14688 14689 14690 14691 14692 14693 14694 14695 14696 14697 14698 14699 14700 14701 14702 14703 14704 14705 14706 14707 14708 14709 14710 14711 14712 14713 14714 14715 14716 14717 14718 14719 14720 14721 14722 14723 14724 14725 14726 14727 14728 14729 14730 14731 14732 14733 14734 14735 14736 14737 14738 14739 14740 14741 14742 14743 14744 14745 14746 14747 14748 14749 14750 14751 14752 14753 14754 14755 14756 14757 14758 14759 14760 14761 14762 14763 14764 14765 14766 14767 14768 14769 14770 14771 14772 14773 14774 14775 14776 14777 14778 14779 14780 14781 14782 14783 14784 14785 14786 14787 14788 14789 14790 14791 14792 14793 14794 14795 14796 14797 14798 14799 14800 14801 14802 14803 14804 14805 14806 14807 14808 14809 14810 14811 14812 14813 14814 14815 14816 14817 14818 14819 14820 14821 14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 14853 14854 14855 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 14877 14878 14879 14880 14881 14882 14883 14884 14885 14886 14887 14888 14889 14890 14891 14892 14893 14894 14895 14896 14897 14898 14899 14900 14901 14902 14903 14904 14905 14906 14907 14908 14909 14910 14911 14912 14913 14914 14915 14916 14917 14918 14919 14920 14921 14922 14923 14924 14925 14926 14927 14928 14929 14930 14931 14932 14933 14934 14935 14936 14937 14938 14939 14940 14941 14942 14943 14944 14945 14946 14947 14948 14949 14950 14951 14952 14953 14954 14955 14956 14957 14958 14959 14960 14961 14962 14963 14964 14965 14966 14967 14968 14969 14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032 15033 15034 15035 15036 15037 15038 15039 15040 15041 15042 15043 15044 15045 15046 15047 15048 15049 15050 15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 15070 15071 15072 15073 15074 15075 15076 15077 15078 15079 15080 15081 15082 15083 15084 15085 15086 15087 15088 15089 15090 15091 15092 15093 15094 15095 15096 15097 15098 15099 15100 15101 15102 15103 15104 15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 15120 15121 15122 15123 15124 15125 15126 15127 15128 15129 15130 15131 15132 15133 15134 15135 15136 15137 15138 15139 15140 15141 15142 15143 15144 15145 15146 15147 15148 15149 15150 15151 15152 15153 15154 15155 15156 15157 15158 15159 15160 15161 15162 15163 15164 15165 15166 15167 15168 15169 15170 15171 15172 15173 15174 15175 15176 15177 15178 15179 15180 15181 15182 15183 15184 15185 15186 15187 15188 15189 15190 15191 15192 15193 15194 15195 15196 15197 15198 15199 15200 15201 15202 15203 15204 15205 15206 15207 15208 15209 15210 15211 15212 15213 15214 15215 15216 15217 15218 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15229 15230 15231 15232 15233 15234 15235 15236 15237 15238 15239 15240 15241 15242 15243 15244 15245 15246 15247 15248 15249 15250 15251 15252 15253 15254 15255 15256 15257 15258 15259 15260 15261 15262 15263 15264 15265 15266 15267 15268 15269 15270 15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 15285 15286 15287 15288 15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 15306 15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 15321 15322 15323 15324 15325 15326 15327 15328 15329 15330 15331 15332 15333 15334 15335 15336 15337 15338 15339 15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 15351 15352 15353 15354 15355 15356 15357 15358 15359 15360 15361 15362 15363 15364 15365 15366 15367 15368 15369 15370 15371 15372 15373 15374 15375 15376 15377 15378 15379 15380 15381 15382 15383 15384 15385 15386 15387 15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452 15453 15454 15455 15456 15457 15458 15459 15460 15461 15462 15463 15464 15465 15466 15467 15468 15469 15470 15471 15472 15473 15474 15475 15476 15477 15478 15479 15480 15481 15482 15483 15484 15485 15486 15487 15488 15489 15490 15491 15492 15493 15494 15495 15496 15497 15498 15499 15500 15501 15502 15503 15504 15505 15506 15507 15508 15509 15510 15511 15512 15513 15514 15515 15516 15517 15518 15519 15520 15521 15522 15523 15524 15525 15526 15527 15528 15529 15530 15531 15532 15533 15534 15535 15536 15537 15538 15539 15540 15541 15542 15543 15544 15545 15546 15547 15548 15549 15550 15551 15552 15553 15554 15555 15556 15557 15558 15559 15560 15561 15562 15563 15564 15565 15566 15567 15568 15569 15570 15571 15572 15573 15574 15575 15576 15577 15578 15579 15580 15581 15582 15583 15584 15585 15586 15587 15588 15589 15590 15591 15592 15593 15594 15595 15596 15597 15598 15599 15600 15601 15602 15603 15604 15605 15606 15607 15608 15609 15610 15611 15612 15613 15614 15615 15616 15617 15618 15619 15620 15621 15622 15623 15624 15625 15626 15627 15628 15629 15630 15631 15632 15633 15634 15635 15636 15637 15638 15639 15640 15641 15642 15643 15644 15645 15646 15647 15648 15649 15650 15651 15652 15653 15654 15655 15656 15657 15658 15659 15660 15661 15662 15663 15664 15665 15666 15667 15668 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 15687 15688 15689 15690 15691 15692 15693 15694 15695 15696 15697 15698 15699 15700 15701 15702 15703 15704 15705 15706 15707 15708 15709 15710 15711 15712 15713 15714 15715 15716 15717 15718 15719 15720 15721 15722 15723 15724 15725 15726 15727 15728 15729 15730 15731 15732 15733 15734 15735 15736 15737 15738 15739 15740 15741 15742 15743 15744 15745 15746 15747 15748 15749 15750 15751 15752 15753 15754 15755 15756 15757 15758 15759 15760 15761 15762 15763 15764 15765 15766 15767 15768 15769 15770 15771 15772 15773 15774 15775 15776 15777 15778 15779 15780 15781 15782 15783 15784 15785 15786 15787 15788 15789 15790 15791 15792 15793 15794 15795 15796 15797 15798 15799 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 15821 15822 15823 15824 15825 15826 15827 15828 15829 15830 15831 15832 15833 15834 15835 15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 15847 15848 15849 15850 15851 15852 15853 15854 15855 15856 15857 15858 15859 15860 15861 15862 15863 15864 15865 15866 15867 15868 15869 15870 15871 15872 15873 15874 15875 15876 15877 15878 15879 15880 15881 15882 15883 15884 15885 15886 15887 15888 15889 15890 15891 15892 15893 15894 15895 15896 15897 15898 15899 15900 15901 15902 15903 15904 15905 15906 15907 15908 15909 15910 15911 15912 15913 15914 15915 15916 15917 15918 15919 15920 15921 15922 15923 15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 15935 15936 15937 15938 15939 15940 15941 15942 15943 15944 15945 15946 15947 15948 15949 15950 15951 15952 15953 15954 15955 15956 15957 15958 15959 15960 15961 15962 15963 15964 15965 15966 15967 15968 15969 15970 15971 15972 15973 15974 15975 15976 15977 15978 15979 15980 15981 15982 15983 15984 15985 15986 15987 15988 15989 15990 15991 15992 15993 15994 15995 15996 15997 15998 15999 16000 16001 16002 16003 16004 16005 16006 16007 16008 16009 16010 16011 16012 16013 16014 16015 16016 16017 16018 16019 16020 16021 16022 16023 16024 16025 16026 16027 16028 16029 16030 16031 16032 16033 16034 16035 16036 16037 16038 16039 16040 16041 16042 16043 16044 16045 16046 16047 16048 16049 16050 16051 16052 16053 16054 16055 16056 16057 16058 16059 16060 16061 16062 16063 16064 16065 16066 16067 16068 16069 16070 16071 16072 16073 16074 16075 16076 16077 16078 16079 16080 16081 16082 16083 16084 16085 16086 16087 16088 16089 16090 16091 16092 16093 16094 16095 16096 16097 16098 16099 16100 16101 16102 16103 16104 16105 16106 16107 16108 16109 16110 16111 16112 16113 16114 16115 16116 16117 16118 16119 16120 16121 16122 16123 16124 16125 16126 16127 16128 16129 16130 16131 16132 16133 16134 16135 16136 16137 16138 16139 16140 16141 16142 16143 16144 16145 16146 16147 16148 16149 16150 16151 16152 16153 16154 16155 16156 16157 16158 16159 16160 16161 16162 16163 16164 16165 16166 16167 16168 16169 16170 16171 16172 16173 16174 16175 16176 16177 16178 16179 16180 16181 16182 16183 16184 16185 16186 16187 16188 16189 16190 16191 16192 16193 16194 16195 16196 16197 16198 16199 16200 16201 16202 16203 16204 16205 16206 16207 16208 16209 16210 16211 16212 16213 16214 16215 16216 16217 16218 16219 16220 16221 16222 16223 16224 16225 16226 16227 16228 16229 16230 16231 16232 16233 16234 16235 16236 16237 16238 16239 16240 16241 16242 16243 16244 16245 16246 16247 16248 16249 16250 16251 16252 16253 16254 16255 16256 16257 16258 16259 16260 16261 16262 16263 16264 16265 16266 16267 16268 16269 16270 16271 16272 16273 16274 16275 16276 16277 16278 16279 16280 16281 16282 16283 16284 16285 16286 16287 16288 16289 16290 16291 16292 16293 16294 16295 16296 16297 16298 16299 16300 16301 16302 16303 16304 16305 16306 16307 16308 16309 16310 16311 16312 16313 16314 16315 16316 16317 16318 16319 16320 16321 16322 16323 16324 16325 16326 16327 16328 16329 16330 16331 16332 16333 16334 16335 16336 16337 16338 16339 16340 16341 16342 16343 16344 16345 16346 16347 16348 16349 16350 16351 16352 16353 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409 16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437 16438 16439 16440 16441 16442 16443 16444 16445 16446 16447 16448 16449 16450 16451 16452 16453 16454 16455 16456 16457 16458 16459 16460 16461 16462 16463 16464 16465 16466 16467 16468 16469 16470 16471 16472 16473 16474 16475 16476 16477 16478 16479 16480 16481 16482 16483 16484 16485 16486 16487 16488 16489 16490 16491 16492 16493 16494 16495 16496 16497 16498 16499 16500 16501 16502 16503 16504 16505 16506 16507 16508 16509 16510 16511 16512 16513 16514 16515 16516 16517 16518 16519 16520 16521 16522 16523 16524 16525 16526 16527 16528 16529 16530 16531 16532 16533 16534 16535 16536 16537 16538 16539 16540 16541 16542 16543 16544 16545 16546 16547 16548 16549 16550 16551 16552 16553 16554 16555 16556 16557 16558 16559 16560 16561 16562 16563 16564 16565 16566 16567 16568 16569 16570 16571 16572 16573 16574 16575 16576 16577 16578 16579 16580 16581 16582 16583 16584 16585 16586 16587 16588 16589 16590 16591 16592 16593 16594 16595 16596 16597 16598 16599 16600 16601 16602 16603 16604 16605 16606 16607 16608 16609 16610 16611 16612 16613 16614 16615 16616 16617 16618 16619 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 16632 16633 16634 16635 16636 16637 16638 16639 16640 16641 16642 16643 16644 16645 16646 16647 16648 16649 16650 16651 16652 16653 16654 16655 16656 16657 16658 16659 16660 16661 16662 16663 16664 16665 16666 16667 16668 16669 16670 16671 16672 16673 16674 16675 16676 16677 16678 16679 16680 16681 16682 16683 16684 16685 16686 16687 16688 16689 16690 16691 16692 16693 16694 16695 16696 16697 16698 16699 16700 16701 16702 16703 16704 16705 16706 16707 16708 16709 16710 16711 16712 16713 16714 16715 16716 16717 16718 16719 16720 16721 16722 16723 16724 16725 16726 16727 16728 16729 16730 16731 16732 16733 16734 16735 16736 16737 16738 16739 16740 16741 16742 16743 16744 16745 16746 16747 16748 16749 16750 16751 16752 16753 16754 16755 16756 16757 16758 16759 16760 16761 16762 16763 16764 16765 16766 16767 16768 16769 16770 16771 16772 16773 16774 16775 16776 16777 16778 16779 16780 16781 16782 16783 16784 16785 16786 16787 16788 16789 16790 16791 16792 16793 16794 16795 16796 16797 16798 16799 16800 16801 16802 16803 16804 16805 16806 16807 16808 16809 16810 16811 16812 16813 16814 16815 16816 16817 16818 16819 16820 16821 16822 16823 16824 16825 16826 16827 16828 16829 16830 16831 16832 16833 16834 16835 16836 16837 16838 16839 16840 16841 16842 16843 16844 16845 16846 16847 16848 16849 16850 16851 16852 16853 16854 16855 16856 16857 16858 16859 16860 16861 16862 16863 16864 16865 16866 16867 16868 16869 16870 16871 16872 16873 16874 16875 16876 16877 16878 16879 16880 16881 16882 16883 16884 16885 16886 16887 16888 16889 16890 16891 16892 16893 16894 16895 16896 16897 16898 16899 16900 16901 16902 16903 16904 16905 16906 16907 16908 16909 16910 16911 16912 16913 16914 16915 16916 16917 16918 16919 16920 16921 16922 16923 16924 16925 16926 16927 16928 16929 16930 16931 16932 16933 16934 16935 16936 16937 16938 16939 16940 16941 16942 16943 16944 16945 16946 16947 16948 16949 16950 16951 16952 16953 16954 16955 16956 16957 16958 16959 16960 16961 16962 16963 16964 16965 16966 16967 16968 16969 16970 16971 16972 16973 16974 16975 16976 16977 16978 16979 16980 16981 16982 16983 16984 16985 16986 16987 16988 16989 16990 16991 16992 16993 16994 16995 16996 16997 16998 16999 17000 17001 17002 17003 17004 17005 17006 17007 17008 17009 17010 17011 17012 17013 17014 17015 17016 17017 17018 17019 17020 17021 17022 17023 17024 17025 17026 17027 17028 17029 17030 17031 17032 17033 17034 17035 17036 17037 17038 17039 17040 17041 17042 17043 17044 17045 17046 17047 17048 17049 17050 17051 17052 17053 17054 17055 17056 17057 17058 17059 17060 17061 17062 17063 17064 17065 17066 17067 17068 17069 17070 17071 17072 17073 17074 17075 17076 17077 17078 17079 17080 17081 17082 17083 17084 17085 17086 17087 17088 17089 17090 17091 17092 17093 17094 17095 17096 17097 17098 17099 17100 17101 17102 17103 17104 17105 17106 17107 17108 17109 17110 17111 17112 17113 17114 17115 17116 17117 17118 17119 17120 17121 17122 17123 17124 17125 17126 17127 17128 17129 17130 17131 17132 17133 17134 17135 17136 17137 17138 17139 17140 17141 17142 17143 17144 17145 17146 17147 17148 17149 17150 17151 17152 17153 17154 17155 17156 17157 17158 17159 17160 17161 17162 17163 17164 17165 17166 17167 17168 17169 17170 17171 17172 17173 17174 17175 17176 17177 17178 17179 17180 17181 17182 17183 17184 17185 17186 17187 17188 17189 17190 17191 17192 17193 17194 17195 17196 17197 17198 17199 17200 17201 17202 17203 17204 17205 17206 17207 17208 17209 17210 17211 17212 17213 17214 17215 17216 17217 17218 17219 17220 17221 17222 17223 17224 17225 17226 17227 17228 17229 17230 17231 17232 17233 17234 17235 17236 17237 17238 17239 17240 17241 17242 17243 17244 17245 17246 17247 17248 17249 17250 17251 17252 17253 17254 17255 17256 17257 17258 17259 17260 17261 17262 17263 17264 17265 17266 17267 17268 17269 17270 17271 17272 17273 17274 17275 17276 17277 17278 17279 17280 17281 17282 17283 17284 17285 17286 17287 17288 17289 17290 17291 17292 17293 17294 17295 17296 17297 17298 17299 17300 17301 17302 17303 17304 17305 17306 17307 17308 17309 17310 17311 17312 17313 17314 17315 17316 17317 17318 17319 17320 17321 17322 17323 17324 17325 17326 17327 17328 17329 17330 17331 17332 17333 17334 17335 17336 17337 17338 17339 17340 17341 17342 17343 17344 17345 17346 17347 17348 17349 17350 17351 17352 17353 17354 17355 17356 17357 17358 17359 17360 17361 17362 17363 17364 17365 17366 17367 17368 17369 17370 17371 17372 17373 17374 17375 17376 17377 17378 17379 17380 17381 17382 17383 17384 17385 17386 17387 17388 17389 17390 17391 17392 17393 17394 17395 17396 17397 17398 17399 17400 17401 17402 17403 17404 17405 17406 17407 17408 17409 17410 17411 17412 17413 17414 17415 17416 17417 17418 17419 17420 17421 17422 17423 17424 17425 17426 17427 17428 17429 17430 17431 17432 17433 17434 17435 17436 17437 17438 17439 17440 17441 17442 17443 17444 17445 17446 17447 17448 17449 17450 17451 17452 17453 17454 17455 17456 17457 17458 17459 17460 17461 17462 17463 17464 17465 17466 17467 17468 17469 17470 17471 17472 17473 17474 17475 17476 17477 17478 17479 17480 17481 17482 17483 17484 17485 17486 17487 17488 17489 17490 17491 17492 17493 17494 17495 17496 17497 17498 17499 17500 17501 17502 17503 17504 17505 17506 17507 17508 17509 17510 17511 17512 17513 17514 17515 17516 17517 17518 17519 17520 17521 17522 17523 17524 17525 17526 17527 17528 17529 17530 17531 17532 17533 17534 17535 17536 17537 17538 17539 17540 17541 17542 17543 17544 17545 17546 17547 17548 17549 17550 17551 17552 17553 17554 17555 17556 17557 17558 17559 17560 17561 17562 17563 17564 17565 17566 17567 17568 17569 17570 17571 17572 17573 17574 17575 17576 17577 17578 17579 17580 17581 17582 17583 17584 17585 17586 17587 17588 17589 17590 17591 17592 17593 17594 17595 17596 17597 17598 17599 17600 17601 17602 17603 17604 17605 17606 17607 17608 17609 17610 17611 17612 17613 17614 17615 17616 17617 17618 17619 17620 17621 17622 17623 17624 17625 17626 17627 17628 17629 17630 17631 17632 17633 17634 17635 17636 17637 17638 17639 17640 17641 17642 17643 17644 17645 17646 17647 17648 17649 17650 17651 17652 17653 17654 17655 17656 17657 17658 17659 17660 17661 17662 17663 17664 17665 17666 17667 17668 17669 17670 17671 17672 17673 17674 17675 17676 17677 17678 17679 17680 17681 17682 17683 17684 17685 17686 17687 17688 17689 17690 17691 17692 17693 17694 17695 17696 17697 17698 17699 17700 17701 17702 17703 17704 17705 17706 17707 17708 17709 17710 17711 17712 17713 17714 17715 17716 17717 17718 17719 17720 17721 17722 17723 17724 17725 17726 17727 17728 17729 17730 17731 17732 17733 17734 17735 17736 17737 17738 17739 17740 17741 17742 17743 17744 17745 17746 17747 17748 17749 17750 17751 17752 17753 17754 17755 17756 17757 17758 17759 17760 17761 17762 17763 17764 17765 17766 17767 17768 17769 17770 17771 17772 17773 17774 17775 17776 17777 17778 17779 17780 17781 17782 17783 17784 17785 17786 17787 17788 17789 17790 17791 17792 17793 17794 17795 17796 17797 17798 17799 17800 17801 17802 17803 17804 17805 17806 17807 17808 17809 17810 17811 17812 17813 17814 17815 17816 17817 17818 17819 17820 17821 17822 17823 17824 17825 17826 17827 17828 17829 17830 17831 17832 17833 17834 17835 17836 17837 17838 17839 17840 17841 17842 17843 17844 17845 17846 17847 17848 17849 17850 17851 17852 17853 17854 17855 17856 17857 17858 17859 17860 17861 17862 17863 17864 17865 17866 17867 17868 17869 17870 17871 17872 17873 17874 17875 17876 17877 17878 17879 17880 17881 17882 17883 17884 17885 17886 17887 17888 17889 17890 17891 17892 17893 17894 17895 17896 17897 17898 17899 17900 17901 17902 17903 17904 17905 17906 17907 17908 17909 17910 17911 17912 17913 17914 17915 17916 17917 17918 17919 17920 17921 17922 17923 17924 17925 17926 17927 17928 17929 17930 17931 17932 17933 17934 17935 17936 17937 17938 17939 17940 17941 17942 17943 17944 17945 17946 17947 17948 17949 17950 17951 17952 17953 17954 17955 17956 17957 17958 17959 17960 17961 17962 17963 17964 17965 17966 17967 17968 17969 17970 17971 17972 17973 17974 17975 17976 17977 17978 17979 17980 17981 17982 17983 17984 17985 17986 17987 17988 17989 17990 17991 17992 17993 17994 17995 17996 17997 17998 17999 18000 18001 18002 18003 18004 18005 18006 18007 18008 18009 18010 18011 18012 18013 18014 18015 18016 18017 18018 18019 18020 18021 18022 18023 18024 18025 18026 18027 18028 18029 18030 18031 18032 18033 18034 18035 18036 18037 18038 18039 18040 18041 18042 18043 18044 18045 18046 18047 18048 18049 18050 18051 18052 18053 18054 18055 18056 18057 18058 18059 18060 18061 18062 18063 18064 18065 18066 18067 18068 18069 18070 18071 18072 18073 18074 18075 18076 18077 18078 18079 18080 18081 18082 18083 18084 18085 18086 18087 18088 18089 18090 18091 18092 18093 18094 18095 18096 18097 18098 18099 18100 18101 18102 18103 18104 18105 18106 18107 18108 18109 18110 18111 18112 18113 18114 18115 18116 18117 18118 18119 18120 18121 18122 18123 18124 18125 18126 18127 18128 18129 18130 18131 18132 18133 18134 18135 18136 18137 18138 18139 18140 18141 18142 18143 18144 18145 18146 18147 18148 18149 18150 18151 18152 18153 18154 18155 18156 18157 18158 18159 18160 18161 18162 18163 18164 18165 18166 18167 18168 18169 18170 18171 18172 18173 18174 18175 18176 18177 18178 18179 18180 18181 18182 18183 18184 18185 18186 18187 18188 18189 18190 18191 18192 18193 18194 18195 18196 18197 18198 18199 18200 18201 18202 18203 18204 18205 18206 18207 18208 18209 18210 18211 18212 18213 18214 18215 18216 18217 18218 18219 18220 18221 18222 18223 18224 18225 18226 18227 18228 18229 18230 18231 18232 18233 18234 18235 18236 18237 18238 18239 18240 18241 18242 18243 18244 18245 18246 18247 18248 18249 18250 18251 18252 18253 18254 18255 18256 18257 18258 18259 18260 18261 18262 18263 18264 18265 18266 18267 18268 18269 18270 18271 18272 18273 18274 18275 18276 18277 18278 18279 18280 18281 18282 18283 18284 18285 18286 18287 18288 18289 18290 18291 18292 18293 18294 18295 18296 18297 18298 18299 18300 18301 18302 18303 18304 18305 18306 18307 18308 18309 18310 18311 18312 18313 18314 18315 18316 18317 18318 18319 18320 18321 18322 18323 18324 18325 18326 18327 18328 18329 18330 18331 18332 18333 18334 18335 18336 18337 18338 18339 18340 18341 18342 18343 18344 18345 18346 18347 18348 18349 18350 18351 18352 18353 18354 18355 18356 18357 18358 18359 18360 18361 18362 18363 18364 18365 18366 18367 18368 18369 18370 18371 18372 18373 18374 18375 18376 18377 18378 18379 18380 18381 18382 18383 18384 18385 18386 18387 18388 18389 18390 18391 18392 18393 18394 18395 18396 18397 18398 18399 18400 18401 18402 18403 18404 18405 18406 18407 18408 18409 18410 18411 18412 18413 18414 18415 18416 18417 18418 18419 18420 18421 18422 18423 18424 18425 18426 18427 18428 18429 18430 18431 18432 18433 18434 18435 18436 18437 18438 18439 18440 18441 18442 18443 18444 18445 18446 18447 18448 18449 18450 18451 18452 18453 18454 18455 18456 18457 18458 18459 18460 18461 18462 18463 18464 18465 18466 18467 18468 18469 18470 18471 18472 18473 18474 18475 18476 18477 18478 18479 18480 18481 18482 18483 18484 18485 18486 18487 18488 18489 18490 18491 18492 18493 18494 18495 18496 18497 18498 18499 18500 18501 18502 18503 18504 18505 18506 18507 18508 18509 18510 18511 18512 18513 18514 18515 18516 18517 18518 18519 18520 18521 18522 18523 18524 18525 18526 18527 18528 18529 18530 18531 18532 18533 18534 18535 18536 18537 18538 18539 18540 18541 18542 18543 18544 18545 18546 18547 18548 18549 18550 18551 18552 18553 18554 18555 18556 18557 18558 18559 18560 18561 18562 18563 18564 18565 18566 18567 18568 18569 18570 18571 18572 18573 18574 18575 18576 18577 18578 18579 18580 18581 18582 18583 18584 18585 18586 18587 18588 18589 18590 18591 18592 18593 18594 18595 18596 18597 18598 18599 18600 18601 18602 18603 18604 18605 18606 18607 18608 18609 18610 18611 18612 18613 18614 18615 18616 18617 18618 18619 18620 18621 18622 18623 18624 18625 18626 18627 18628 18629 18630 18631 18632 18633 18634 18635 18636 18637 18638 18639 18640 18641 18642 18643 18644 18645 18646 18647 18648 18649 18650 18651 18652 18653 18654 18655 18656 18657 18658 18659 18660 18661 18662 18663 18664 18665 18666 18667 18668 18669 18670 18671 18672 18673 18674 18675 18676 18677 18678 18679 18680 18681 18682 18683 18684 18685 18686 18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 18706 18707 18708 18709 18710 18711 18712 18713 18714 18715 18716 18717 18718 18719 18720 18721 18722 18723 18724 18725 18726 18727 18728 18729 18730 18731 18732 18733 18734 18735 18736 18737 18738 18739 18740 18741 18742 18743 18744 18745 18746 18747 18748 18749 18750 18751 18752 18753 18754 18755 18756 18757 18758 18759 18760 18761 18762 18763 18764 18765 18766 18767 18768 18769 18770 18771 18772 18773 18774 18775 18776 18777 18778 18779 18780 18781 18782 18783 18784 18785 18786 18787 18788 18789 18790 18791 18792 18793 18794 18795 18796 18797 18798 18799 18800 18801 18802 18803 18804 18805 18806 18807 18808 18809 18810 18811 18812 18813 18814 18815 18816 18817 18818 18819 18820 18821 18822 18823 18824 18825 18826 18827 18828 18829 18830 18831 18832 18833 18834 18835 18836 18837 18838 18839 18840 18841 18842 18843 18844 18845 18846 18847 18848 18849 18850 18851 18852 18853 18854 18855 18856 18857 18858 18859 18860 18861 18862 18863 18864 18865 18866 18867 18868 18869 18870 18871 18872 18873 18874 18875 18876 18877 18878 18879 18880 18881 18882 18883 18884 18885 18886 18887 18888 18889 18890 18891 18892 18893 18894 18895 18896 18897 18898 18899 18900 18901 18902 18903 18904 18905 18906 18907 18908 18909 18910 18911 18912 18913 18914 18915 18916 18917 18918 18919 18920 18921 18922 18923 18924 18925 18926 18927 18928 18929 18930 18931 18932 18933 18934 18935 18936 18937 18938 18939 18940 18941 18942 18943 18944 18945 18946 18947 18948 18949 18950 18951 18952 18953 18954 18955 18956 18957 18958 18959 18960 18961 18962 18963 18964 18965 18966 18967 18968 18969 18970 18971 18972 18973 18974 18975 18976 18977 18978 18979 18980 18981 18982 18983 18984 18985 18986 18987 18988 18989 18990 18991 18992 18993 18994 18995 18996 18997 18998 18999 19000 19001 19002 19003 19004 19005 19006 19007 19008 19009 19010 19011 19012 19013 19014 19015 19016 19017 19018 19019 19020 19021 19022 19023 19024 19025 19026 19027 19028 19029 19030 19031 19032 19033 19034 19035 19036 19037 19038 19039 19040 19041 19042 19043 19044 19045 19046 19047 19048 19049 19050 19051 19052 19053 19054 19055 19056 19057 19058 19059 19060 19061 19062 19063 19064 19065 19066 19067 19068 19069 19070 19071 19072 19073 19074 19075 19076 19077 19078 19079 19080 19081 19082 19083 19084 19085 19086 19087 19088 19089 19090 19091 19092 19093 19094 19095 19096 19097 19098 19099 19100 19101 19102 19103 19104 19105 19106 19107 19108 19109 19110 19111 19112 19113 19114 19115 19116 19117 19118 19119 19120 19121 19122 19123 19124 19125 19126 19127 19128 19129 19130 19131 19132 19133 19134 19135 19136 19137 19138 19139 19140 19141 19142 19143 19144 19145 19146 19147 19148 19149 19150 19151 19152 19153 19154 19155 19156 19157 19158 19159 19160 19161 19162 19163 19164 19165 19166 19167 19168 19169 19170 19171 19172 19173 19174 19175 19176 19177 19178 19179 19180 19181 19182 19183 19184 19185 19186 19187 19188 19189 19190 19191 19192 19193 19194 19195 19196 19197 19198 19199 19200 19201 19202 19203 19204 19205 19206 19207 19208 19209 19210 19211 19212 19213 19214 19215 19216 19217 19218 19219 19220 19221 19222 19223 19224 19225 19226 19227 19228 19229 19230 19231 19232 19233 19234 19235 19236 19237 19238 19239 19240 19241 19242 19243 19244 19245 19246 19247 19248 19249 19250 19251 19252 19253 19254 19255 19256 19257 19258 19259 19260 19261 19262 19263 19264 19265 19266 19267 19268 19269 19270 19271 19272 19273 19274 19275 19276 19277 19278 19279 19280 19281 19282 19283 19284 19285 19286 19287 19288 19289 19290 19291 19292 19293 19294 19295 19296 19297 19298 19299 19300 19301 19302 19303 19304 19305 19306 19307 19308 19309 19310 19311 19312 19313 19314 19315 19316 19317 19318 19319 19320 19321 19322 19323 19324 19325 19326 19327 19328 19329 19330 19331 19332 19333 19334 19335 19336 19337 19338 19339 19340 19341 19342 19343 19344 19345 19346 19347 19348 19349 19350 19351 19352 19353 19354 19355 19356 19357 19358 19359 19360 19361 19362 19363 19364 19365 19366 19367 19368 19369 19370 19371 19372 19373 19374 19375 19376 19377 19378 19379 19380 19381 19382 19383 19384 19385 19386 19387 19388 19389 19390 19391 19392 19393 19394 19395 19396 19397 19398 19399 19400 19401 19402 19403 19404 19405 19406 19407 19408 19409 19410 19411 19412 19413 19414 19415 19416 19417 19418 19419 19420 19421 19422 19423 19424 19425 19426 19427 19428 19429 19430 19431 19432 19433 19434 19435 19436 19437 19438 19439 19440 19441 19442 19443 19444 19445 19446 19447 19448 19449 19450 19451 19452 19453 19454 19455 19456 19457 19458 19459 19460 19461 19462 19463 19464 19465 19466 19467 19468 19469 19470 19471 19472 19473 19474 19475 19476 19477 19478 19479 19480 19481 19482 19483 19484 19485 19486 19487 19488 19489 19490 19491 19492 19493 19494 19495 19496 19497 19498 19499 19500 19501 19502 19503 19504 19505 19506 19507 19508 19509 19510 19511 19512 19513 19514 19515 19516 19517 19518 19519 19520 19521 19522 19523 19524 19525 19526 19527 19528 19529 19530 19531 19532 19533 19534 19535 19536 19537 19538 19539 19540 19541 19542 19543 19544 19545 19546 19547 19548 19549 19550 19551 19552 19553 19554 19555 19556 19557 19558 19559 19560 19561 19562 19563 19564 19565 19566 19567 19568 19569 19570 19571 19572 19573 19574 19575 19576 19577 19578 19579 19580 19581 19582 19583 19584 19585 19586 19587 19588 19589 19590 19591 19592 19593 19594 19595 19596 19597 19598 19599 19600 19601 19602 19603 19604 19605 19606 19607 19608 19609 19610 19611 19612 19613 19614 19615 19616 19617 19618 19619 19620 19621 19622 19623 19624 19625 19626 19627 19628 19629 19630 19631 19632 19633 19634 19635 19636 19637 19638 19639 19640 19641 19642 19643 19644 19645 19646 19647 19648 19649 19650 19651 19652 19653 19654 19655 19656 19657 19658 19659 19660 19661 19662 19663 19664 19665 19666 19667 19668 19669 19670 19671 19672 19673 19674 19675 19676 19677 19678 19679 19680 19681 19682 19683 19684 19685 19686 19687 19688 19689 19690 19691 19692 19693 19694 19695 19696 19697 19698 19699 19700 19701 19702 19703 19704 19705 19706 19707 19708 19709 19710 19711 19712 19713 19714 19715 19716 19717 19718 19719 19720 19721 19722 19723 19724 19725 19726 19727 19728 19729 19730 19731 19732 19733 19734 19735 19736 19737 19738 19739 19740 19741 19742 19743 19744 19745 19746 19747 19748 19749 19750 19751 19752 19753 19754 19755 19756 19757 19758 19759 19760 19761 19762 19763 19764 19765 19766 19767 19768 19769 19770 19771 19772 19773 19774 19775 19776 19777 19778 19779 19780 19781 19782 19783 19784 19785 19786 19787 19788 19789 19790 19791 19792 19793 19794 19795 19796 19797 19798 19799 19800 19801 19802 19803 19804 19805 19806 19807 19808 19809 19810 19811 19812 19813 19814 19815 19816 19817 19818 19819 19820 19821 19822 19823 19824 19825 19826 19827 19828 19829 19830 19831 19832 19833 19834 19835 19836 19837 19838 19839 19840 19841 19842 19843 19844 19845 19846 19847 19848 19849 19850 19851 19852 19853 19854 19855 19856 19857 19858 19859 19860 19861 19862 19863 19864 19865 19866 19867 19868 19869 19870 19871 19872 19873 19874 19875 19876 19877 19878 19879 19880 19881 19882 19883 19884 19885 19886 19887 19888 19889 19890 19891 19892 19893 19894 19895 19896 19897 19898 19899 19900 19901 19902 19903 19904 19905 19906 19907 19908 19909 19910 19911 19912 19913 19914 19915 19916 19917 19918 19919 19920 19921 19922 19923 19924 19925 19926 19927 19928 19929 19930 19931 19932 19933 19934 19935 19936 19937 19938 19939 19940 19941 19942 19943 19944 19945 19946 19947 19948 19949 19950 19951 19952 19953 19954 19955 19956 19957 19958 19959 19960 19961 19962 19963 19964 19965 19966 19967 19968 19969 19970 19971 19972 19973 19974 19975 19976 19977 19978 19979 19980 19981 19982 19983 19984 19985 19986 19987 19988 19989 19990 19991 19992 19993 19994 19995 19996 19997 19998 19999 20000 20001 20002 20003 20004 20005 20006 20007 20008 20009 20010 20011 20012 20013 20014 20015 20016 20017 20018 20019 20020 20021 20022 20023 20024 20025 20026 20027 20028 20029 20030 20031 20032 20033 20034 20035 20036 20037 20038 20039 20040 20041 20042 20043 20044 20045 20046 20047 20048 20049 20050 20051 20052 20053 20054 20055 20056 20057 20058 20059 20060 20061 20062 20063 20064 20065 20066 20067 20068 20069 20070 20071 20072 20073 20074 20075 20076 20077 20078 20079 20080 20081 20082 20083 20084 20085 20086 20087 20088 20089 20090 20091 20092 20093 20094 20095 20096 20097 20098 20099 20100 20101 20102 20103 20104 20105 20106 20107 20108 20109 20110 20111 20112 20113 20114 20115 20116 20117 20118 20119 20120 20121 20122 20123 20124 20125 20126 20127 20128 20129 20130 20131 20132 20133 20134 20135 20136 20137 20138 20139 20140 20141 20142 20143 20144 20145 20146 20147 20148 20149 20150 20151 20152 20153 20154 20155 20156 20157 20158 20159 20160 20161 20162 20163 20164 20165 20166 20167 20168 20169 20170 20171 20172 20173 20174 20175 20176 20177 20178 20179 20180 20181 20182 20183 20184 20185 20186 20187 20188 20189 20190 20191 20192 20193 20194 20195 20196 20197 20198 20199 20200 20201 20202 20203 20204 20205 20206 20207 20208 20209 20210 20211 20212 20213 20214 20215 20216 20217 20218 20219 20220 20221 20222 20223 20224 20225 20226 20227 20228 20229 20230 20231 20232 20233 20234 20235 20236 20237 20238 20239 20240 20241 20242 20243 20244 20245 20246 20247 20248 20249 20250 20251 20252 20253 20254 20255 20256 20257 20258 20259 20260 20261 20262 20263 20264 20265 20266 20267 20268 20269 20270 20271 20272 20273 20274 20275 20276 20277 20278 20279 20280 20281 20282 20283 20284 20285 20286 20287 20288 20289 20290 20291 20292 20293 20294 20295 20296 20297 20298 20299 20300 20301 20302 20303 20304 20305 20306 20307 20308 20309 20310 20311 20312 20313 20314 20315 20316 20317 20318 20319 20320 20321 20322 20323 20324 20325 20326 20327 20328 20329 20330 20331 20332 20333 20334 20335 20336 20337 20338 20339 20340 20341 20342 20343 20344 20345 20346 20347 20348 20349 20350 20351 20352 20353 20354 20355 20356 20357 20358 20359 20360 20361 20362 20363 20364 20365 20366 20367 20368 20369 20370 20371 20372 20373 20374 20375 20376 20377 20378 20379 20380 20381 20382 20383 20384 20385 20386 20387 20388 20389 20390 20391 20392 20393 20394 20395 20396 20397 20398 20399 20400 20401 20402 20403 20404 20405 20406 20407 20408 20409 20410 20411 20412 20413 20414 20415 20416 20417 20418 20419 20420 20421 20422 20423 20424 20425 20426 20427 20428 20429 20430 20431 20432 20433 20434 20435 20436 20437 20438 20439 20440 20441 20442 20443 20444 20445 20446 20447 20448 20449 20450 20451 20452 20453 20454 20455 20456 20457 20458 20459 20460 20461 20462 20463 20464 20465 20466 20467 20468 20469 20470 20471 20472 20473 20474 20475 20476 20477 20478 20479 20480 20481 20482 20483 20484 20485 20486 20487 20488 20489 20490 20491 20492 20493 20494 20495 20496 20497 20498 20499 20500 20501 20502 20503 20504 20505 20506 20507 20508 20509 20510 20511 20512 20513 20514 20515 20516 20517 20518 20519 20520 20521 20522 20523 20524 20525 20526 20527 20528 20529 20530 20531 20532 20533 20534 20535 20536 20537 20538 20539 20540 20541 20542 20543 20544 20545 20546 20547 20548 20549 20550 20551 20552 20553 20554 20555 20556 20557 20558 20559 20560 20561 20562 20563 20564 20565 20566 20567 20568 20569 20570 20571 20572 20573 20574 20575 20576 20577 20578 20579 20580 20581 20582 20583 20584 20585 20586 20587 20588 20589 20590 20591 20592 20593 20594 20595 20596 20597 20598 20599 20600 20601 20602 20603 20604 20605 20606 20607 20608 20609 20610 20611 20612 20613 20614 20615 20616 20617 20618 20619 20620 20621 20622 20623 20624 20625 20626 20627 20628 20629 20630 20631 20632 20633 20634 20635 20636 20637 20638 20639 20640 20641 20642 20643 20644 20645 20646 20647 20648 20649 20650 20651 20652 20653 20654 20655 20656 20657 20658 20659 20660 20661 20662 20663 20664 20665 20666 20667 20668 20669 20670 20671 20672 20673 20674 20675 20676 20677 20678 20679 20680 20681 20682 20683 20684 20685 20686 20687 20688 20689 20690 20691 20692 20693 20694 20695 20696 20697 20698 20699 20700 20701 20702 20703 20704 20705 20706 20707 20708 20709 20710 20711 20712 20713 20714 20715 20716 20717 20718 20719 20720 20721 20722 20723 20724 20725 20726 20727 20728 20729 20730 20731 20732 20733 20734 20735 20736 20737 20738 20739 20740 20741 20742 20743 20744 20745 20746 20747 20748 20749 20750 20751 20752 20753 20754 20755 20756 20757 20758 20759 20760 20761 20762 20763 20764 20765 20766 20767 20768 20769 20770 20771 20772 20773 20774 20775 20776 20777 20778 20779 20780 20781 20782 20783 20784 20785 20786 20787 20788 20789 20790 20791 20792 20793 20794 20795 20796 20797 20798 20799 20800 20801 20802 20803 20804 20805 20806 20807 20808 20809 20810 20811 20812 20813 20814 20815 20816 20817 20818 20819 20820 20821 20822 20823 20824 20825 20826 20827 20828 20829 20830 20831 20832 20833 20834 20835 20836 20837 20838 20839 20840 20841 20842 20843 20844 20845 20846 20847 20848 20849 20850 20851 20852 20853 20854 20855 20856 20857 20858 20859 20860 20861 20862 20863 20864 20865 20866 20867 20868 20869 20870 20871 20872 20873 20874 20875 20876 20877 20878 20879 20880 20881 20882 20883 20884 20885 20886 20887 20888 20889 20890 20891 20892 20893 20894 20895 20896 20897 20898 20899 20900 20901 20902 20903 20904 20905 20906 20907 20908 20909 20910 20911 20912 20913 20914 20915 20916 20917 20918 20919 20920 20921 20922 20923 20924 20925 20926 20927 20928 20929 20930 20931 20932 20933 20934 20935 20936 20937 20938 20939 20940 20941 20942 20943 20944 20945 20946 20947 20948 20949 20950 20951 20952 20953 20954 20955 20956 20957 20958 20959 20960 20961 20962 20963 20964 20965 20966 20967 20968 20969 20970 20971 20972 20973 20974 20975 20976 20977 20978 20979 20980 20981 20982 20983 20984 20985 20986 20987 20988 20989 20990 20991 20992 20993 20994 20995 20996 20997 20998 20999 21000 21001 21002 21003 21004 21005 21006 21007 21008 21009 21010 21011 21012 21013 21014 21015 21016 21017 21018 21019 21020 21021 21022 21023 21024 21025 21026 21027 21028 21029 21030 21031 21032 21033 21034 21035 21036 21037 21038 21039 21040 21041 21042 21043 21044 21045 21046 21047 21048 21049 21050 21051 21052 21053 21054 21055 21056 21057 21058 21059 21060 21061 21062 21063 21064 21065 21066 21067 21068 21069 21070 21071 21072 21073 21074 21075 21076 21077 21078 21079 21080 21081 21082 21083 21084 21085 21086 21087 21088 21089 21090 21091 21092 21093 21094 21095 21096 21097 21098 21099 21100 21101 21102 21103 21104 21105 21106 21107 21108 21109 21110 21111 21112 21113 21114 21115 21116 21117 21118 21119 21120 21121 21122 21123 21124 21125 21126 21127 21128 21129 21130 21131 21132 21133 21134 21135 21136 21137 21138 21139 21140 21141 21142 21143 21144 21145 21146 21147 21148 21149 21150 21151 21152 21153 21154 21155 21156 21157 21158 21159 21160 21161 21162 21163 21164 21165 21166 21167 21168 21169 21170 21171 21172 21173 21174 21175 21176 21177 21178 21179 21180 21181 21182 21183 21184 21185 21186 21187 21188 21189 21190 21191 21192 21193 21194 21195 21196 21197 21198 21199 21200 21201 21202 21203 21204 21205 21206 21207 21208 21209 21210 21211 21212 21213 21214 21215 21216 21217 21218 21219 21220 21221 21222 21223 21224 21225 21226 21227 21228 21229 21230 21231 21232 21233 21234 21235 21236 21237 21238 21239 21240 21241 21242 21243 21244 21245 21246 21247 21248 21249 21250 21251 21252 21253 21254 21255 21256 21257 21258 21259 21260 21261 21262 21263 21264 21265 21266 21267 21268 21269 21270 21271 21272 21273 21274 21275 21276 21277 21278 21279 21280 21281 21282 21283 21284 21285 21286 21287 21288 21289 21290 21291 21292 21293 21294 21295 21296 21297 21298 21299 21300 21301 21302 21303 21304 21305 21306 21307 21308 21309 21310 21311 21312 21313 21314 21315 21316 21317 21318 21319 21320 21321 21322 21323 21324 21325 21326 21327 21328 21329 21330 21331 21332 21333 21334 21335 21336 21337 21338 21339 21340 21341 21342 21343 21344 21345 21346 21347 21348 21349 21350 21351 21352 21353 21354 21355 21356 21357 21358 21359 21360 21361 21362 21363 21364 21365 21366 21367 21368 21369 21370 21371 21372 21373 21374 21375 21376 21377 21378 21379 21380 21381 21382 21383 21384 21385 21386 21387 21388 21389 21390 21391 21392 21393 21394 21395 21396 21397 21398 21399 21400 21401 21402 21403 21404 21405 21406 21407 21408 21409 21410 21411 21412 21413 21414 21415 21416 21417 21418 21419 21420 21421 21422 21423 21424 21425 21426 21427 21428 21429 21430 21431 21432 21433 21434 21435 21436 21437 21438 21439 21440 21441 21442 21443 21444 21445 21446 21447 21448 21449 21450 21451 21452 21453 21454 21455 21456 21457 21458 21459 21460 21461 21462 21463 21464 21465 21466 21467 21468 21469 21470 21471 21472 21473 21474 21475 21476 21477 21478 21479 21480 21481 21482 21483 21484 21485 21486 21487 21488 21489 21490 21491 21492 21493 21494 21495 21496 21497 21498 21499 21500 21501 21502 21503 21504 21505 21506 21507 21508 21509 21510 21511 21512 21513 21514 21515 21516 21517 21518 21519 21520 21521 21522 21523 21524 21525 21526 21527 21528 21529 21530 21531 21532 21533 21534 21535 21536 21537 21538 21539 21540 21541 21542 21543 21544 21545 21546 21547 21548 21549 21550 21551 21552 21553 21554 21555 21556 21557 21558 21559 21560 21561 21562 21563 21564 21565 21566 21567 21568 21569 21570 21571 21572 21573 21574 21575 21576 21577 21578 21579 21580 21581 21582 21583 21584 21585 21586 21587 21588 21589 21590 21591 21592 21593 21594 21595 21596 21597 21598 21599 21600 21601 21602 21603 21604 21605 21606 21607 21608 21609 21610 21611 21612 21613 21614 21615 21616 21617 21618 21619 21620 21621 21622 21623 21624 21625 21626 21627 21628 21629 21630 21631 21632 21633 21634 21635 21636 21637 21638 21639 21640 21641 21642 21643 21644 21645 21646 21647 21648 21649 21650 21651 21652 21653 21654 21655 21656 21657 21658 21659 21660 21661 21662 21663 21664 21665 21666 21667 21668 21669 21670 21671 21672 21673 21674 21675 21676 21677 21678 21679 21680 21681 21682 21683 21684 21685 21686 21687 21688 21689 21690 21691 21692 21693 21694 21695 21696 21697 21698 21699 21700 21701 21702 21703 21704 21705 21706 21707 21708 21709 21710 21711 21712 21713 21714 21715 21716 21717 21718 21719 21720 21721 21722 21723 21724 21725 21726 21727 21728 21729 21730 21731 21732 21733 21734 21735 21736 21737 21738 21739 21740 21741 21742 21743 21744 21745 21746 21747 21748 21749 21750 21751 21752 21753 21754 21755 21756 21757 21758 21759 21760 21761 21762 21763 21764 21765 21766 21767 21768 21769 21770 21771 21772 21773 21774 21775 21776 21777 21778 21779 21780 21781 21782 21783 21784 21785 21786 21787 21788 21789 21790 21791 21792 21793 21794 21795 21796 21797 21798 21799 21800 21801 21802 21803 21804 21805 21806 21807 21808 21809 21810 21811 21812 21813 21814 21815 21816 21817 21818 21819 21820 21821 21822 21823 21824 21825 21826 21827 21828 21829 21830 21831 21832 21833 21834 21835 21836 21837 21838 21839 21840 21841 21842 21843 21844 21845 21846 21847 21848 21849 21850 21851 21852 21853 21854 21855 21856 21857 21858 21859 21860 21861 21862 21863 21864 21865 21866 21867 21868 21869 21870 21871 21872 21873 21874 21875 21876 21877 21878 21879 21880 21881 21882 21883 21884 21885 21886 21887 21888 21889 21890 21891 21892 21893 21894 21895 21896 21897 21898 21899 21900 21901 21902 21903 21904 21905 21906 21907 21908 21909 21910 21911 21912 21913 21914 21915 21916 21917 21918 21919 21920 21921 21922 21923 21924 21925 21926 21927 21928 21929 21930 21931 21932 21933 21934 21935 21936 21937 21938 21939 21940 21941 21942 21943 21944 21945 21946 21947 21948 21949 21950 21951 21952 21953 21954 21955 21956 21957 21958 21959 21960 21961 21962 21963 21964 21965 21966 21967 21968 21969 21970 21971 21972 21973 21974 21975 21976 21977 21978 21979 21980 21981 21982 21983 21984 21985 21986 21987 21988 21989 21990 21991 21992 21993 21994 21995 21996 21997 21998 21999 22000 22001 22002 22003 22004 22005 22006 22007 22008 22009 22010 22011 22012 22013 22014 22015 22016 22017 22018 22019 22020 22021 22022 22023 22024 22025 22026 22027 22028 22029 22030 22031 22032 22033 22034 22035 22036 22037 22038 22039 22040 22041 22042 22043 22044 22045 22046 22047 22048 22049 22050 22051 22052 22053 22054 22055 22056 22057 22058 22059 22060 22061 22062 22063 22064 22065 22066 22067 22068 22069 22070 22071 22072 22073 22074 22075 22076 22077 22078 22079 22080 22081 22082 22083 22084 22085 22086 22087 22088 22089 22090 22091 22092 22093 22094 22095 22096 22097 22098 22099 22100 22101 22102 22103 22104 22105 22106 22107 22108 22109 22110 22111 22112 22113 22114 22115 22116 22117 22118 22119 22120 22121 22122 22123 22124 22125 22126 22127 22128 22129 22130 22131 22132 22133 22134 22135 22136 22137 22138 22139 22140 22141 22142 22143 22144 22145 22146 22147 22148 22149 22150 22151 22152 22153 22154 22155 22156 22157 22158 22159 22160 22161 22162 22163 22164 22165 22166 22167 22168 22169 22170 22171 22172 22173 22174 22175 22176 22177 22178 22179 22180 22181 22182 22183 22184 22185 22186 22187 22188 22189 22190 22191 22192 22193 22194 22195 22196 22197 22198 22199 22200 22201 22202 22203 22204 22205 22206 22207 22208 22209 22210 22211 22212 22213 22214 22215 22216 22217 22218 22219 22220 22221 22222 22223 22224 22225 22226 22227 22228 22229 22230 22231 22232 22233 22234 22235 22236 22237 22238 22239 22240 22241 22242 22243 22244 22245 22246 22247 22248 22249 22250 22251 22252 22253 22254 22255 22256 22257 22258 22259 22260 22261 22262 22263 22264 22265 22266 22267 22268 22269 22270 22271 22272 22273 22274 22275 22276 22277 22278 22279 22280 22281 22282 22283 22284 22285 22286 22287 22288 22289 22290 22291 22292 22293 22294 22295 22296 22297 22298 22299 22300 22301 22302 22303 22304 22305 22306 22307 22308 22309 22310 22311 22312 22313 22314 22315 22316 22317 22318 22319 22320 22321 22322 22323 22324 22325 22326 22327 22328 22329 22330 22331 22332 22333 22334 22335 22336 22337 22338 22339 22340 22341 22342 22343 22344 22345 22346 22347 22348 22349 22350 22351 22352 22353 22354 22355 22356 22357 22358 22359 22360 22361 22362 22363 22364 22365 22366 22367 22368 22369 22370 22371 22372 22373 22374 22375 22376 22377 22378 22379 22380 22381 22382 22383 22384 22385 22386 22387 22388 22389 22390 22391 22392 22393 22394 22395 22396 22397 22398 22399 22400 22401 22402 22403 22404 22405 22406 22407 22408 22409 22410 22411 22412 22413 22414 22415 22416 22417 22418 22419 22420 22421 22422 22423 22424 22425 22426 22427 22428 22429 22430 22431 22432 22433 22434 22435 22436 22437 22438 22439 22440 22441 22442 22443 22444 22445 22446 22447 22448 22449 22450 22451 22452 22453 22454 22455 22456 22457 22458 22459 22460 22461 22462 22463 22464 22465 22466 22467 22468 22469 22470 22471 22472 22473 22474 22475 22476 22477 22478 22479 22480 22481 22482 22483 22484 22485 22486 22487 22488 22489 22490 22491 22492 22493 22494 22495 22496 22497 22498 22499 22500 22501 22502 22503 22504 22505 22506 22507 22508 22509 22510 22511 22512 22513 22514 22515 22516 22517 22518 22519 22520 22521 22522 22523 22524 22525 22526 22527 22528 22529 22530 22531 22532 22533 22534 22535 22536 22537 22538 22539 22540 22541 22542 22543 22544 22545 22546 22547 22548 22549 22550 22551 22552 22553 22554 22555 22556 22557 22558 22559 22560 22561 22562 22563 22564 22565 22566 22567 22568 22569 22570 22571 22572 22573 22574 22575 22576 22577 22578 22579 22580 22581 22582 22583 22584 22585 22586 22587 22588 22589 22590 22591 22592 22593 22594 22595 22596 22597 22598 22599 22600 22601 22602 22603 22604 22605 22606 22607 22608 22609 22610 22611 22612 22613 22614 22615 22616 22617 22618 22619 22620 22621 22622 22623 22624 22625 22626 22627 22628 22629 22630 22631 22632 22633 22634 22635 22636 22637 22638 22639 22640 22641 22642 22643 22644 22645 22646 22647 22648 22649 22650 22651 22652 22653 22654 22655 22656 22657 22658 22659 22660 22661 22662 22663 22664 22665 22666 22667 22668 22669 22670 22671 22672 22673 22674 22675 22676 22677 22678 22679 22680 22681 22682 22683 22684 22685 22686 22687 22688 22689 22690 22691 22692 22693 22694 22695 22696 22697 22698 22699 22700 22701 22702 22703 22704 22705 22706 22707 22708 22709 22710 22711 22712 22713 22714 22715 22716 22717 22718 22719 22720 22721 22722 22723 22724 22725 22726 22727 22728 22729 22730 22731 22732 22733 22734 22735 22736 22737 22738 22739 22740 22741 22742 22743 22744 22745 22746 22747 22748 22749 22750 22751 22752 22753 22754 22755 22756 22757 22758 22759 22760 22761 22762 22763 22764 22765 22766 22767 22768 22769 22770 22771 22772 22773 22774 22775 22776 22777 22778 22779 22780 22781 22782 22783 22784 22785 22786 22787 22788 22789 22790 22791 22792 22793 22794 22795 22796 22797 22798 22799 22800 22801 22802 22803 22804 22805 22806 22807 22808 22809 22810 22811 22812 22813 22814 22815 22816 22817 22818 22819 22820 22821 22822 22823 22824 22825 22826 22827 22828 22829 22830 22831 22832 22833 22834 22835 22836 22837 22838 22839 22840 22841 22842 22843 22844 22845 22846 22847 22848 22849 22850 22851 22852 22853 22854 22855 22856 22857 22858 22859 22860 22861 22862 22863 22864 22865 22866 22867 22868 22869 22870 22871 22872 22873 22874 22875 22876 22877 22878 22879 22880 22881 22882 22883 22884 22885 22886 22887 22888 22889 22890 22891 22892 22893 22894 22895 22896 22897 22898 22899 22900 22901 22902 22903 22904 22905 22906 22907 22908 22909 22910 22911 22912 22913 22914 22915 22916 22917 22918 22919 22920 22921 22922 22923 22924 22925 22926 22927 22928 22929 22930 22931 22932 22933 22934 22935 22936 22937 22938 22939 22940 22941 22942 22943 22944 22945 22946 22947 22948 22949 22950 22951 22952 22953 22954 22955 22956 22957 22958 22959 22960 22961 22962 22963 22964 22965 22966 22967 22968 22969 22970 22971 22972 22973 22974 22975 22976 22977 22978 22979 22980 22981 22982 22983 22984 22985 22986 22987 22988 22989 22990 22991 22992 22993 22994 22995 22996 22997 22998 22999 23000 23001 23002 23003 23004 23005 23006 23007 23008 23009 23010 23011 23012 23013 23014 23015 23016 23017 23018 23019 23020 23021 23022 23023 23024 23025 23026 23027 23028 23029 23030 23031 23032 23033 23034 23035 23036 23037 23038 23039 23040 23041 23042 23043 23044 23045 23046 23047 23048 23049 23050 23051 23052 23053 23054 23055 23056 23057 23058 23059 23060 23061 23062 23063 23064 23065 23066 23067 23068 23069 23070 23071 23072 23073 23074 23075 23076 23077 23078 23079 23080 23081 23082 23083 23084 23085 23086 23087 23088 23089 23090 23091 23092 23093 23094 23095 23096 23097 23098 23099 23100 23101 23102 23103 23104 23105 23106 23107 23108 23109 23110 23111 23112 23113 23114 23115 23116 23117 23118 23119 23120 23121 23122 23123 23124 23125 23126 23127 23128 23129 23130 23131 23132 23133 23134 23135 23136 23137 23138 23139 23140 23141 23142 23143 23144 23145 23146 23147 23148 23149 23150 23151 23152 23153 23154 23155 23156 23157 23158 23159 23160 23161 23162 23163 23164 23165 23166 23167 23168 23169 23170 23171 23172 23173 23174 23175 23176 23177 23178 23179 23180 23181 23182 23183 23184 23185 23186 23187 23188 23189 23190 23191 23192 23193 23194 23195 23196 23197 23198 23199 23200 23201 23202 23203 23204 23205 23206 23207 23208 23209 23210 23211 23212 23213 23214 23215 23216 23217 23218 23219 23220 23221 23222 23223 23224 23225 23226 23227 23228 23229 23230 23231 23232 23233 23234 23235 23236 23237 23238 23239 23240 23241 23242 23243 23244 23245 23246 23247 23248 23249 23250 23251 23252 23253 23254 23255 23256 23257 23258 23259 23260 23261 23262 23263 23264 23265 23266 23267 23268 23269 23270 23271 23272 23273 23274 23275 23276 23277 23278 23279 23280 23281 23282 23283 23284 23285 23286 23287 23288 23289 23290 23291 23292 23293 23294 23295 23296 23297 23298 23299 23300 23301 23302 23303 23304 23305 23306 23307 23308 23309 23310 23311 23312 23313 23314 23315 23316 23317 23318 23319 23320 23321 23322 23323 23324 23325 23326 23327 23328 23329 23330 23331 23332 23333 23334 23335 23336 23337 23338 23339 23340 23341 23342 23343 23344 23345 23346 23347 23348 23349 23350 23351 23352 23353 23354 23355 23356 23357 23358 23359 23360 23361 23362 23363 23364 23365 23366 23367 23368 23369 23370 23371 23372 23373 23374 23375 23376 23377 23378 23379 23380 23381 23382 23383 23384 23385 23386 23387 23388 23389 23390 23391 23392 23393 23394 23395 23396 23397 23398 23399 23400 23401 23402 23403 23404 23405 23406 23407 23408 23409 23410 23411 23412 23413 23414 23415 23416 23417 23418 23419 23420 23421 23422 23423 23424 23425 23426 23427 23428 23429 23430 23431 23432 23433 23434 23435 23436 23437 23438 23439 23440 23441 23442 23443 23444 23445 23446 23447 23448 23449 23450 23451 23452 23453 23454 23455 23456 23457 23458 23459 23460 23461 23462 23463 23464 23465 23466 23467 23468 23469 23470 23471 23472 23473 23474 23475 23476 23477 23478 23479 23480 23481 23482 23483 23484 23485 23486 23487 23488 23489 23490 23491 23492 23493 23494 23495 23496 23497 23498 23499 23500 23501 23502 23503 23504 23505 23506 23507 23508 23509 23510 23511 23512 23513 23514 23515 23516 23517 23518 23519 23520 23521 23522 23523 23524 23525 23526 23527 23528 23529 23530 23531 23532 23533 23534 23535 23536 23537 23538 23539 23540 23541 23542 23543 23544 23545 23546 23547 23548 23549 23550 23551 23552 23553 23554 23555 23556 23557 23558 23559 23560 23561 23562 23563 23564 23565 23566 23567 23568 23569 23570 23571 23572 23573 23574 23575 23576 23577 23578 23579 23580 23581 23582 23583 23584 23585 23586 23587 23588 23589 23590 23591 23592 23593 23594 23595 23596 23597 23598 23599 23600 23601 23602 23603 23604 23605 23606 23607 23608 23609 23610 23611 23612 23613 23614 23615 23616 23617 23618 23619 23620 23621 23622 23623 23624 23625 23626 23627 23628 23629 23630 23631 23632 23633 23634 23635 23636 23637 23638 23639 23640 23641 23642 23643 23644 23645 23646 23647 23648 23649 23650 23651 23652 23653 23654 23655 23656 23657 23658 23659 23660 23661 23662 23663 23664 23665 23666 23667 23668 23669 23670 23671 23672 23673 23674 23675 23676 23677 23678 23679 23680 23681 23682 23683 23684 23685 23686 23687 23688 23689 23690 23691 23692 23693 23694 23695 23696 23697 23698 23699 23700 23701 23702 23703 23704 23705 23706 23707 23708 23709 23710 23711 23712 23713 23714 23715 23716 23717 23718 23719 23720 23721 23722 23723 23724 23725 23726 23727 23728 23729 23730 23731 23732 23733 23734 23735 23736 23737 23738 23739 23740 23741 23742 23743 23744 23745 23746 23747 23748 23749 23750 23751 23752 23753 23754 23755 23756 23757 23758 23759 23760 23761 23762 23763 23764 23765 23766 23767 23768 23769 23770 23771 23772 23773 23774 23775 23776 23777 23778 23779 23780 23781 23782 23783 23784 23785 23786 23787 23788 23789 23790 23791 23792 23793 23794 23795 23796 23797 23798 23799 23800 23801 23802 23803 23804 23805 23806 23807 23808 23809 23810 23811 23812 23813 23814 23815 23816 23817 23818 23819 23820 23821 23822 23823 23824 23825 23826 23827 23828 23829 23830 23831 23832 23833 23834 23835 23836 23837 23838 23839 23840 23841 23842 23843 23844 23845 23846 23847 23848 23849 23850 23851 23852 23853 23854 23855 23856 23857 23858 23859 23860 23861 23862 23863 23864 23865 23866 23867 23868 23869 23870 23871 23872 23873 23874 23875 23876 23877 23878 23879 23880 23881 23882 23883 23884 23885 23886 23887 23888 23889 23890 23891 23892 23893 23894 23895 23896 23897 23898 23899 23900 23901 23902 23903 23904 23905 23906 23907 23908 23909 23910 23911 23912 23913 23914 23915 23916 23917 23918 23919 23920 23921 23922 23923 23924 23925 23926 23927 23928 23929 23930 23931 23932 23933 23934 23935 23936 23937 23938 23939 23940 23941 23942 23943 23944 23945 23946 23947 23948 23949 23950 23951 23952 23953 23954 23955 23956 23957 23958 23959 23960 23961 23962 23963 23964 23965 23966 23967 23968 23969 23970 23971 23972 23973 23974 23975 23976 23977 23978 23979 23980 23981 23982 23983 23984 23985 23986 23987 23988 23989 23990 23991 23992 23993 23994 23995 23996 23997 23998 23999 24000 24001 24002 24003 24004 24005 24006 24007 24008 24009 24010 24011 24012 24013 24014 24015 24016 24017 24018 24019 24020 24021 24022 24023 24024 24025 24026 24027 24028 24029 24030 24031 24032 24033 24034 24035 24036 24037 24038 24039 24040 24041 24042 24043 24044 24045 24046 24047 24048 24049 24050 24051 24052 24053 24054 24055 24056 24057 24058 24059 24060 24061 24062 24063 24064 24065 24066 24067 24068 24069 24070 24071 24072 24073 24074 24075 24076 24077 24078 24079 24080 24081 24082 24083 24084 24085 24086 24087 24088 24089 24090 24091 24092 24093 24094 24095 24096 24097 24098 24099 24100 24101 24102 24103 24104 24105 24106 24107 24108 24109 24110 24111 24112 24113 24114 24115 24116 24117 24118 24119 24120 24121 24122 24123 24124 24125 24126 24127 24128 24129 24130 24131 24132 24133 24134 24135 24136 24137 24138 24139 24140 24141 24142 24143 24144 24145 24146 24147 24148 24149 24150 24151 24152 24153 24154 24155 24156 24157 24158 24159 24160 24161 24162 24163 24164 24165 24166 24167 24168 24169 24170 24171 24172 24173 24174 24175 24176 24177 24178 24179 24180 24181 24182 24183 24184 24185 24186 24187 24188 24189 24190 24191 24192 24193 24194 24195 24196 24197 24198 24199 24200 24201 24202 24203 24204 24205 24206 24207 24208 24209 24210 24211 24212 24213 24214 24215 24216 24217 24218 24219 24220 24221 24222 24223 24224 24225 24226 24227 24228 24229 24230 24231 24232 24233 24234 24235 24236 24237 24238 24239 24240 24241 24242 24243 24244 24245 24246 24247 24248 24249 24250 24251 24252 24253 24254 24255 24256 24257 24258 24259 24260 24261 24262 24263 24264 24265 24266 24267 24268 24269 24270 24271 24272 24273 24274 24275 24276 24277 24278 24279 24280 24281 24282 24283 24284 24285 24286 24287 24288 24289 24290 24291 24292 24293 24294 24295 24296 24297 24298 24299 24300 24301 24302 24303 24304 24305 24306 24307 24308 24309 24310 24311 24312 24313 24314 24315 24316 24317 24318 24319 24320 24321 24322 24323 24324 24325 24326 24327 24328 24329 24330 24331 24332 24333 24334 24335 24336 24337 24338 24339 24340 24341 24342 24343 24344 24345 24346 24347 24348 24349 24350 24351 24352 24353 24354 24355 24356 24357 24358 24359 24360 24361 24362 24363 24364 24365 24366 24367 24368 24369 24370 24371 24372 24373 24374 24375 24376 24377 24378 24379 24380 24381 24382 24383 24384 24385 24386 24387 24388 24389 24390 24391 24392 24393 24394 24395 24396 24397 24398 24399 24400 24401 24402 24403 24404 24405 24406 24407 24408 24409 24410 24411 24412 24413 24414 24415 24416 24417 24418 24419 24420 24421 24422 24423 24424 24425 24426 24427 24428 24429 24430 24431 24432 24433 24434 24435 24436 24437 24438 24439 24440 24441 24442 24443 24444 24445 24446 24447 24448 24449 24450 24451 24452 24453 24454 24455 24456 24457 24458 24459 24460 24461 24462 24463 24464 24465 24466 24467 24468 24469 24470 24471 24472 24473 24474 24475 24476 24477 24478 24479 24480 24481 24482 24483 24484 24485 24486 24487 24488 24489 24490 24491 24492 24493 24494 24495 24496 24497 24498 24499 24500 24501 24502 24503 24504 24505 24506 24507 24508 24509 24510 24511 24512 24513 24514 24515 24516 24517 24518 24519 24520 24521 24522 24523 24524 24525 24526 24527 24528 24529 24530 24531 24532 24533 24534 24535 24536 24537 24538 24539 24540 24541 24542 24543 24544 24545 24546 24547 24548 24549 24550 24551 24552 24553 24554 24555 24556 24557 24558 24559 24560 24561 24562 24563 24564 24565 24566 24567 24568 24569 24570 24571 24572 24573 24574 24575 24576 24577 24578 24579 24580 24581 24582 24583 24584 24585 24586 24587 24588 24589 24590 24591 24592 24593 24594 24595 24596 24597 24598 24599 24600 24601 24602 24603 24604 24605 24606 24607 24608 24609 24610 24611 24612 24613 24614 24615 24616 24617 24618 24619 24620 24621 24622 24623 24624 24625 24626 24627 24628
|
2011-02-15 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Bug 54524 - Allow JSObject to fully utilize cell's capacity for inline storage.
Currently JSObject is both directly instantiated for regular JS objects, and
derived to implement subtypes. A consequence of this is that we need to ensure
that sufficient space from the cell is left unused and available for any data
members that will be introduced by subclasses of JSObject. By restructuring
the internal storage array out of JSObject we can increase the size in the
internal storage for regular objects.
Add classes JSFinalObject and JSNonFinalObject. JSNonFinalObject retains as
much additional capacity as is currently available to allow for data members
in subclasses. JSFinalObject utilizes all available space for internal storage,
and only allows construction through JSFinalObject::create().
The additional storage made available in the JSObject means that we need no
longer rely on a union of the internal storage with a pointer to storage that
is only valid for external storage. This means we can go back to always having
a valid pointer to property storage, regardless of whether this is internal or
external. This simplifies some cases of access to the array from C code, and
significantly simplifies JIT access, since repatching no longer needs to be
able to change between a load of the storage pointer / a LEA of the internal
storage.
* API/JSObjectRef.cpp:
(JSObjectMake):
* assembler/ARMAssembler.h:
* assembler/ARMv7Assembler.h:
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::repatchPointer):
* assembler/MIPSAssembler.h:
* assembler/MacroAssemblerARM.h:
* assembler/MacroAssemblerARMv7.h:
* assembler/MacroAssemblerMIPS.h:
* assembler/MacroAssemblerX86.h:
* assembler/MacroAssemblerX86_64.h:
* assembler/RepatchBuffer.h:
* assembler/X86Assembler.h:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
* debugger/DebuggerActivation.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_resolve_global):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_resolve_global):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::emit_op_get_by_pname):
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::compilePutDirectOffset):
(JSC::JIT::patchGetByIdSelf):
(JSC::JIT::patchPutByIdReplace):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::compilePutDirectOffset):
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::patchGetByIdSelf):
(JSC::JIT::patchPutByIdReplace):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
(JSC::JIT::emit_op_get_by_pname):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Arguments.h:
(JSC::Arguments::Arguments):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorInstance.h:
* runtime/ExceptionHelpers.cpp:
(JSC::InterruptedExecutionError::InterruptedExecutionError):
(JSC::TerminatedExecutionError::TerminatedExecutionError):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
* runtime/JSArray.h:
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSByteArray.h:
(JSC::JSByteArray::JSByteArray):
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalObject.h:
(JSC::constructEmptyObject):
* runtime/JSNotAnObject.h:
(JSC::JSNotAnObject::JSNotAnObject):
* runtime/JSObject.cpp:
(JSC::JSObject::createInheritorID):
(JSC::JSObject::allocatePropertyStorage):
* runtime/JSObject.h:
(JSC::JSObject::propertyStorage):
(JSC::JSNonFinalObject::JSNonFinalObject):
(JSC::JSNonFinalObject::createStructure):
(JSC::JSFinalObject::create):
(JSC::JSFinalObject::createStructure):
(JSC::JSFinalObject::JSFinalObject):
(JSC::JSObject::offsetOfInlineStorage):
(JSC::constructEmptyObject):
(JSC::createEmptyObjectStructure):
(JSC::JSObject::JSObject):
(JSC::JSObject::~JSObject):
(JSC::Structure::isUsingInlineStorage):
* runtime/JSObjectWithGlobalObject.cpp:
(JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
* runtime/JSObjectWithGlobalObject.h:
(JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::TypeInfo):
(JSC::TypeInfo::isVanilla):
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::JSVariableObject):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::JSWrapperObject):
* runtime/ObjectConstructor.cpp:
(JSC::constructObject):
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::ObjectPrototype):
* runtime/ObjectPrototype.h:
* runtime/StrictEvalActivation.cpp:
(JSC::StrictEvalActivation::StrictEvalActivation):
* runtime/StrictEvalActivation.h:
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::growPropertyStorageCapacity):
2011-02-16 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Incorrect handling of global writes in dynamic contexts
https://bugs.webkit.org/show_bug.cgi?id=49383
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
Can't use the existing callframe to return an uncaught exception
as by definition that callframe has already been torn down.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::ASTBuilder):
(JSC::ASTBuilder::varDeclarations):
(JSC::ASTBuilder::funcDeclarations):
(JSC::ASTBuilder::features):
(JSC::ASTBuilder::numConstants):
(JSC::ASTBuilder::createFuncDeclStatement):
(JSC::ASTBuilder::addVar):
(JSC::ASTBuilder::incConstants):
(JSC::ASTBuilder::usesThis):
(JSC::ASTBuilder::usesCatch):
(JSC::ASTBuilder::usesClosures):
(JSC::ASTBuilder::usesArguments):
(JSC::ASTBuilder::usesAssignment):
(JSC::ASTBuilder::usesWith):
(JSC::ASTBuilder::usesEval):
Don't need a vector of scopes in the ASTBuilder
* runtime/Operations.h:
(JSC::resolveBase):
In strict mode the optimisation that we use to skip a lookup
on the global object is incorrect and lead to us always
disallowing global writes when we needed to do a dynamic slot
lookup. Now the strict mode path actually checks for the
property.
2011-02-15 Jon Honeycutt <jhoneycutt@apple.com>
Windows build fix for
https://bugs.webkit.org/show_bug.cgi?id=54415
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
Remove deleted files.
2011-02-15 Oliver Hunt <oliver@apple.com>
Fix EFL build for
https://bugs.webkit.org/show_bug.cgi?id=54415
* CMakeLists.txt:
2011-02-14 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough and Geoff Garen.
Refactor handles and weak pointers to become nicer and more automatic
https://bugs.webkit.org/show_bug.cgi?id=54415
Move to a true handle based mechanism for GC value protection. This
also allows us to switch to a more sensible behaviour for weak pointers
in which weak pointers are automatically updated.
This allows us to remove the old (and convoluted) that required all
objects that may be held by a weak reference to be aware of the reference
and manually clear them in their destructors.
This also adds a few new data types to JSC that we use to efficiently
allocate and return the underlying handle storage.
This patch is largely renaming and removing now unnecessary destructors
from objects.
* API/JSClassRef.cpp:
(OpaqueJSClass::create):
(OpaqueJSClassContextData::OpaqueJSClassContextData):
(OpaqueJSClass::contextData):
(OpaqueJSClass::prototype):
* API/JSClassRef.h:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
* JavaScriptCore.xcodeproj/project.pbxproj:
* collector/handles/Global.h: Added.
New Global handle type used to keep gc objects live, even if they're not
marked.
(JSC::Global::Global):
(JSC::Global::~Global):
(JSC::Global::set):
We can only assign directly to a global from another global.
In all other cases we need the JSGlobalData to be provided
explicitly so we use a set function.
(JSC::Global::operator=):
(JSC::Global::clear):
(JSC::Global::isHashTableDeletedValue):
(JSC::Global::internalSet):
* collector/handles/Handle.h: Added.
Root "Handle" type used for immutable handles and to provide the basic
APIs needed for pointer-like behaviour.
(JSC::HandleBase::operator!):
(JSC::HandleBase::operator UnspecifiedBoolType*):
(JSC::HandleBase::isEmpty):
(JSC::HandleBase::HandleBase):
(JSC::HandleBase::slot):
(JSC::HandleBase::invalidate):
(JSC::HandleBase::setSlot):
(JSC::HandleTypes::getFromSlot):
(JSC::HandleTypes::toJSValue):
(JSC::HandleTypes::validateUpcast):
(JSC::HandleConverter::operator->):
(JSC::HandleConverter::operator*):
(JSC::Handle::Handle):
(JSC::Handle::get):
(JSC::Handle::wrapSlot):
(JSC::operator==):
(JSC::operator!=):
* collector/handles/HandleHeap.cpp: Added.
New heap for global handles.
(JSC::HandleHeap::HandleHeap):
(JSC::HandleHeap::grow):
(JSC::HandleHeap::markStrongHandles):
(JSC::HandleHeap::updateAfterMark):
(JSC::HandleHeap::clearWeakPointers):
(JSC::HandleHeap::writeBarrier):
* collector/handles/HandleHeap.h: Added.
(JSC::HandleHeap::heapFor):
(JSC::HandleHeap::toHandle):
(JSC::HandleHeap::toNode):
(JSC::HandleHeap::allocate):
(JSC::HandleHeap::deallocate):
(JSC::HandleHeap::makeWeak):
Convert a hard handle into weak handle that does not
protect the object it points to.
(JSC::HandleHeap::makeSelfDestroying):
Converts a handle to a weak handle that will be returned
to the free list when the referenced object dies.
(JSC::HandleHeap::Node::Node):
(JSC::HandleHeap::Node::slot):
(JSC::HandleHeap::Node::handleHeap):
(JSC::HandleHeap::Node::setFinalizer):
(JSC::HandleHeap::Node::makeWeak):
(JSC::HandleHeap::Node::isWeak):
(JSC::HandleHeap::Node::makeSelfDestroying):
(JSC::HandleHeap::Node::isSelfDestroying):
(JSC::HandleHeap::Node::finalizer):
(JSC::HandleHeap::Node::setPrev):
(JSC::HandleHeap::Node::prev):
(JSC::HandleHeap::Node::setNext):
(JSC::HandleHeap::Node::next):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::Interpreter):
* interpreter/Interpreter.h:
* interpreter/RegisterFile.cpp:
(JSC::RegisterFile::globalObjectCollected):
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
* runtime/GCHandle.cpp: Removed.
* runtime/GCHandle.h: Removed.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::destroy):
(JSC::Heap::markRoots):
* runtime/Heap.h:
(JSC::Heap::allocateGlobalHandle):
(JSC::Heap::reportExtraMemoryCost):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::allocateGlobalHandle):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::create):
(JSC::JSPropertyNameIterator::~JSPropertyNameIterator):
* runtime/JSPropertyNameIterator.h:
(JSC::JSPropertyNameIterator::createStructure):
(JSC::Structure::setEnumerationCache):
(JSC::Structure::clearEnumerationCache):
* runtime/Protect.h:
* runtime/Structure.cpp:
(JSC::Structure::~Structure):
* runtime/Structure.h:
* runtime/WeakGCPtr.h:
(JSC::WeakGCPtrBase::get):
(JSC::WeakGCPtrBase::clear):
(JSC::WeakGCPtrBase::operator!):
(JSC::WeakGCPtrBase::operator UnspecifiedBoolType*):
(JSC::WeakGCPtrBase::~WeakGCPtrBase):
(JSC::WeakGCPtrBase::WeakGCPtrBase):
(JSC::WeakGCPtrBase::internalSet):
(JSC::LazyWeakGCPtr::LazyWeakGCPtr):
(JSC::LazyWeakGCPtr::set):
(JSC::WeakGCPtr::WeakGCPtr):
(JSC::WeakGCPtr::operator=):
* runtime/WriteBarrier.h:
* wtf/BlockStack.h: Added.
(WTF::::BlockStack):
(WTF::::~BlockStack):
(WTF::::blocks):
(WTF::::grow):
(WTF::::shrink):
* wtf/SentinelLinkedList.h: Added.
(WTF::::SentinelLinkedList):
(WTF::::begin):
(WTF::::end):
(WTF::::push):
(WTF::::remove):
* wtf/SinglyLinkedList.h: Added.
(WTF::::SinglyLinkedList):
(WTF::::isEmpty):
(WTF::::push):
(WTF::::pop):
2011-02-15 Pratik Solanki <psolanki@apple.com>
Move WTF_USE_CFNETWORK to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=54168
Reviewed by Darin Adler.
* wtf/Platform.h: Define WTF_USE_CFNETWORK for Windows builds.
2011-02-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
Moved MarkedBlock data members to the head of the block
https://bugs.webkit.org/show_bug.cgi?id=54482
This allows for a variable-sized tail, to accommodate oversized blocks.
SunSpider reports no change.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate):
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::sweep):
* runtime/MarkedBlock.h: Added missing element to the CELLS_PER_BLOCK
calculation. This kind of error is why we want to migrate to the system
described below.
(JSC::roundUpToMultipleOf):
(JSC::MarkedBlock::firstCell):
(JSC::MarkedBlock::cells):
(JSC::MarkedBlock::cellNumber): Use subtraction instead of masking to
calculate cell number. The mask is no longer correct because the first
cell is not at the head of the block.
(JSC::MarkedBlock::forEach): Replaced m_cells data member with a cells()
accessor. We want to use sizeof(MarkedBlock) to calculate the size of the
block header, so we can't have an explicit data member to represent the block tail.
Also replaced iteration from zero with iteration from startCell(), since
the first N cells are now occupied by the header.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::reset): Replaced iteration from zero as above.
2011-02-15 Chris Rogers <crogers@google.com>
Reviewed by Alexey Proskuryakov.
Fix Mutex::tryLock() on Windows to work properly with PlatformCondition::timedWait()
https://bugs.webkit.org/show_bug.cgi?id=54408
* wtf/ThreadingWin.cpp:
(WTF::PlatformCondition::timedWait):
2011-02-15 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
Remove some dead code in ARMv7
https://bugs.webkit.org/show_bug.cgi?id=54461
* assembler/ARMv7Assembler.h: remove dead code.
2011-02-14 Geoffrey Garen <ggaren@apple.com>
Rubber-stamped by Gavin Barraclough.
Some MarkedBlock refactoring.
Made cells private.
Renamed cells => m_cells
marked => m_marks.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate):
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::sweep):
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::isEmpty):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::markCount):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::testAndSetMarked):
(JSC::MarkedBlock::setMarked):
(JSC::MarkedBlock::forEach):
2011-02-14 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add basic parser for Content Security Policy
https://bugs.webkit.org/show_bug.cgi?id=54379
Add a constructor for copying a Vector into a String. I suspect there
are a number of call sites that are doing this manually that would
benefit from being moved to this API.
* wtf/text/WTFString.h:
(WTF::String::String):
2011-02-14 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: use call frame column to determine execution line in source frame.
https://bugs.webkit.org/show_bug.cgi?id=54001
* wtf/text/TextPosition.h:
(WTF::ZeroBasedNumber::convertAsOneBasedInt):
2011-02-13 Jeremy Moskovich <jeremy@chromium.org>
Reviewed by Adam Barth.
Add a compile-time option to completely disable WebArchive support.
https://bugs.webkit.org/show_bug.cgi?id=52712
Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code.
Ports Affected:
WebArchive support is currently enabled for all ports that define PLATFORM(CF) apart from Qt.
This patch preserves this behavior except that it also disables support in the Chromium port.
* wtf/Platform.h: Add ENABLE_WEB_ARCHIVE definition and turn it off explicitly for Qt & Chromium ports.
2011-02-13 Cameron Zwarich <zwarich@apple.com>
Reviewed by Dan Bernstein.
Bug 53760 - JSC fails to build with TOT Clang
https://bugs.webkit.org/show_bug.cgi?id=53760
Fix -Woverloaded-virtual warnings. This is also a 6% speedup on the v8 raytrace
benchmark; it is nothing-to-noise on everything else.
* API/JSCallbackObject.h: Remove pointlessly overloaded method.
* API/JSCallbackObjectFunctions.h: Ditto.
* runtime/Arguments.cpp:
(JSC::Arguments::put): Change signature to match the base class. This implementation
was no longer being called by anyone. This wasn't noticed because it is merely an
optimization of the base class' implementation.
* runtime/Arguments.h: Ditto.
2011-02-12 Adam Barth <abarth@webkit.org>
Reviewed by Mark Rowe.
Use /dev/urandom as the OSRandomSource on OS(DARWIN)
https://bugs.webkit.org/show_bug.cgi?id=54279
I'm not sure it makes much of a difference whether we use arc4random or
/dev/urandom on Mac. However, there's some aesthetic benefit to using
the same underlying API on as many platforms as reasonable.
* config.h:
* wtf/OSRandomSource.cpp:
(WTF::cryptographicallyRandomValuesFromOS):
2011-02-12 Adam Barth <abarth@webkit.org>
Reviewed by Kenneth Russell.
Enable ArrayBuffers by default
https://bugs.webkit.org/show_bug.cgi?id=54310
Export the required functions.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2011-02-11 Daniel Bates <dbates@rim.com>
Reviewed by Geoffrey Garen.
Remove explicit disable ENABLE_ASSEMBLER_WX_EXCLUSIVE on non-iOS ports
https://bugs.webkit.org/show_bug.cgi?id=54107
It is unnecessary to explicitly disable ENABLE_ASSEMBLER_WX_EXCLUSIVE
by the definition of ENABLE().
* wtf/Platform.h:
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Not reviewed.
Randomly touch some build files in the hopes of fixing the Qt build.
* JavaScriptCore.gypi:
* JavaScriptCore.pri:
* JavaScriptCore.pro:
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Garbage collection timer cycles forever, even when nothing is happening
https://bugs.webkit.org/show_bug.cgi?id=54320
(Rolling back in r78386 with the build fixed.)
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make
our timer inert after forcing a GC, to avoid GC'ing repeatedly.
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Not reviewed.
Used svn merge -r78386:78385 to roll out r78386 because it broke the build.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallbackPlatformData::trigger):
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Garbage collection timer cycles forever, even when nothing is happening
https://bugs.webkit.org/show_bug.cgi?id=54320
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make
our timer inert after forcing a GC, to avoid GC'ing repeatedly.
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Try to fix the Windows build: added an exported symbol.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
A little more encapsulation for the heap: Removed CollectorHeapIterator
https://bugs.webkit.org/show_bug.cgi?id=54298
CollectorHeapIterator is a God object that knows the internals of each
of the pieces of the heap. This undermines the encapsulation I'm trying
to achieve by splitting concepts into different classes.
As an alternative, I've given each class a forEach iteration function,
which takes a functor as an argument. Now, each class just needs to
know how to iterate the things it knows about.
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed CollectorHeapIterator.
* debugger/Debugger.cpp:
(JSC::Recompiler::Recompiler):
(JSC::Recompiler::~Recompiler):
(JSC::Recompiler::operator()):
(JSC::Debugger::recompileAllJSFunctions): Updated to use forEach interface
instead of an iterator.
* runtime/CollectorHeapIterator.h: Removed.
* runtime/Heap.cpp:
(JSC::TypeCounter::TypeCounter):
(JSC::TypeCounter::typeName):
(JSC::TypeCounter::operator()):
(JSC::TypeCounter::take):
(JSC::Heap::protectedObjectTypeCounts):
(JSC::Heap::objectTypeCounts): Added forEach and removed iterator.
* runtime/Heap.h:
(JSC::Heap::forEach):
* runtime/JSGlobalData.cpp:
(JSC::Recompiler::operator()):
(JSC::JSGlobalData::recompileAllJSFunctions):
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::forEach): Added forEach. Removed friend declaration
for CollectorHeapIterator. Now, we can make all our data private and
change it without breaking any other classes.
* runtime/MarkedSpace.cpp:
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::forEach): Added forEach and removed iterator.
2011-02-11 Adam Barth <abarth@webkit.org>
Reviewed by Andreas Kling.
CryptographicRandomNumber has its threading ifdefs backwards
https://bugs.webkit.org/show_bug.cgi?id=54280
Turns out we want the mutex when thread is enabled. :)
* wtf/CryptographicallyRandomNumber.cpp:
(WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
(WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
2011-02-10 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
WebKit should have a cryptographic RNG
https://bugs.webkit.org/show_bug.cgi?id=22049
Teach JavaScriptCore how to export this function.
* JavaScriptCore.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
2011-02-10 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
A little more encapsulation for MarkedBlock: Made all constants private
so clients don't know whether allocations are fixed-sized or not
https://bugs.webkit.org/show_bug.cgi?id=54270
SunSpider reports no change.
* runtime/CollectorHeapIterator.h:
(JSC::CollectorHeapIterator::advance): Updated for removal of HeapConstants.
* runtime/Error.cpp: Switched to using ASSERT_CLASS_FITS_IN_CELL, like
all other classes.
* runtime/Heap.cpp:
(JSC::Heap::allocate): Updated for removal of HeapConstants.
(JSC::Heap::reset): Updated to use size(), instead of calculating size
on our own.
* runtime/Heap.h: Moved the ASSERT here to MarkedBlock, since it enforces
on special knowledge of fixed-sizery, which only MarkedBlock is supposed
to know about.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate): Updated for removal of HeapConstants.
Also changed to reset nextCell to 0 at the end of a block, since that
seems more consistent.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::storeVPtrs): Changed to use a fixed array of char.
This hard-coded size is a little wonky, but the compiler will tell us
if it's ever wrong, so I think it's OK.
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::sweep): Updated for removal of HeapConstants.
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::isEmpty):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::size):
(JSC::MarkedBlock::capacity): Made constants private to this class.
Removed HeapConstants. Added size() and capacity() functions.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::objectCount):
(JSC::MarkedSpace::size):
(JSC::MarkedSpace::capacity):
* runtime/MarkedSpace.h: Use MarkedBlock helper functions instead of
direct knowledge of MarkedBlock internals.
2011-02-10 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
A little more encapsulation for MarkedBlock: Made mark bits private
https://bugs.webkit.org/show_bug.cgi?id=54264
SunSpider reports no change.
* runtime/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::reset): Renamed clearMarkBits => clearMarks, since clients
don't need to know that marks are represented as bits. Renamed
markedCells => markCount, since clients don't need to know that blocks
are split into cells.
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::isEmpty):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::markCount): New helper functions for encapsulating
the information clients actually need.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::destroy):
(JSC::MarkedSpace::shrink):
(JSC::MarkedSpace::clearMarks):
(JSC::MarkedSpace::markCount):
(JSC::MarkedSpace::objectCount):
* runtime/MarkedSpace.h: Use new helper functions instead of accessing
MarkedBlock data directly.
2011-02-10 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Cached JavaScript Parser Data Being Left in Memory Cache
https://bugs.webkit.org/show_bug.cgi?id=54245
Added clear method which removes SourceProviderCache items.
Cleaned up extraneous whitespace.
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* parser/SourceProviderCache.cpp:
(JSC::SourceProviderCache::~SourceProviderCache):
(JSC::SourceProviderCache::clear):
(JSC::SourceProviderCache::byteSize):
(JSC::SourceProviderCache::add):
* parser/SourceProviderCache.h:
2011-02-10 Joseph Pecoraro <joepeck@webkit.org>
Follow-up fix to r78291. I should pass (int) 0, not '0' to memset.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallback::commonConstructor): fix mistaken post-review change.
2011-02-10 Joseph Pecoraro <joepeck@webkit.org>
Reviewed by Geoffrey Garen.
Make DefaultGCActivityCallback for PLATFORM(CF) Easier to Subclass
https://bugs.webkit.org/show_bug.cgi?id=54257
A subclass may want to specify the CFRunLoop that the Garbage Collection
will happen on. It was difficult to manipulate this in a subclass because
the current DefaultGCActivityCallback class does this in its constructor.
This patch generalizes things a bit more so that a specific run loop can
be passed in to the constructor. This makes it so all run loop management
can stay in DefaultGCActivityCallback and a subclass can specify any runloop.
* runtime/GCActivityCallback.h: expose a PLATFORM(CF) constructor that can
specify the runloop GC can be scheduled on.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): two constructors,
one that specifies the run loop and passes that on to commonConstructor and
the old constructor defaults to the current run loop.
(JSC::DefaultGCActivityCallback::commonConstructor): do normal construction,
adding the timer to the given runloop.
2011-02-10 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
A little more encapsulation for MarkedBlock: Moved allocate() and sweep() into MarkedBlock
https://bugs.webkit.org/show_bug.cgi?id=54253
SunSpider reports no change.
* runtime/CollectorHeapIterator.h: Removed DeadObjectIterator, since it
is now unused.
* runtime/Heap.cpp:
(JSC::Heap::reset): Moved the call to shrink() here, since it seems a
little more clear for MarkedSpace's client to tell it explicitly when to
shrink.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate): Split out from MarkedSpace::allocate.
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::sweep): Split out from MarkedSpace::sweep, and
converted to more directly iterate a MarkedBlock based on knowing its
internal structure.
* runtime/MarkedBlock.h:
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::sweep):
* runtime/MarkedSpace.h: Split out the code mentioned above.
2011-02-10 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
Fix compilation error on OpenBSD
https://bugs.webkit.org/show_bug.cgi?id=53766
Add a HAVE_STRNSTR in Platform.h and define it only on Darwin and FreeBSD.
* wtf/Platform.h:
* wtf/StringExtras.h: Use HAVE(STRNSTR) now.
2011-02-10 Adam Roben <aroben@apple.com>
Print locations of assertions and logs in a way that Visual Studio understands
With this change, double-clicking one of these locations in Visual Studio's Output Window
will focus that line of code in the editor.
Fixes <http://webkit.org/b/54208> Double-clicking locations of assertions/logs in Visual
Studio's Output Window does nothing
Reviewed by Alexey Proskuryakov.
* wtf/Assertions.cpp:
(printCallSite): Use OS(WINDOWS) instead of the meaningless OS(WIN). When we aren't using
the debug CRT (and thus can't call _CrtDbgReport), print the file and line number using the
same format that cl.exe uses when it prints compiler errors.
2011-02-10 Dan Bernstein <mitz@apple.com>
LLVM Compiler build fix.
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::create):
2011-02-10 Peter Varga <pvarga@webkit.org>
Reviewed by Csaba Osztrogonác.
Remove PCRE source from trunk
https://bugs.webkit.org/show_bug.cgi?id=54188
* Android.mk:
* Android.v8.wtf.mk:
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pro:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.order:
* JavaScriptCore.pri:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
* JavaScriptCore.xcodeproj/project.pbxproj:
* pcre/AUTHORS: Removed.
* pcre/COPYING: Removed.
* pcre/dftables: Removed.
* pcre/pcre.h: Removed.
* pcre/pcre.pri: Removed.
* pcre/pcre_compile.cpp: Removed.
* pcre/pcre_exec.cpp: Removed.
* pcre/pcre_internal.h: Removed.
* pcre/pcre_tables.cpp: Removed.
* pcre/pcre_ucp_searchfuncs.cpp: Removed.
* pcre/pcre_xclass.cpp: Removed.
* pcre/ucpinternal.h: Removed.
* pcre/ucptable.cpp: Removed.
* wscript:
2011-02-10 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Add randomValuesFromOS for OS(WINDOWS)
https://bugs.webkit.org/show_bug.cgi?id=54155
Use CryptGenRandom for generating cryptographically secure random numbers.
This will work on WinCE and MinGW too.
* config.h:
* wtf/OSRandomSource.cpp:
(WTF::randomValuesFromOS):
2011-02-10 Jarred Nicholls <jarred@sencha.com>
Reviewed by Adam Barth.
REGRESSION(r78149): Return value of read() shouldn't be ignored.
https://bugs.webkit.org/show_bug.cgi?id=54167
stdio read should have its return value handled. Build error in gcc 4.4.5.
* wtf/OSRandomSource.cpp:
(WTF::randomValuesFromOS):
2011-02-10 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Rename randomValuesFromOS to cryptographicallyRandomValuesFromOS
https://bugs.webkit.org/show_bug.cgi?id=54156
randomValuesFromOS generates random numbers of cryptographic quality.
Make this clear by adding "cryptographically" to the function name.
* wtf/CryptographicallyRandomNumber.cpp:
(WTF::ARC4Stream::ARC4RandomNumberGenerator::stir):
* wtf/OSRandomSource.cpp:
(WTF::cryptographicallyRandomValuesFromOS):
* wtf/OSRandomSource.h:
2011-02-09 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8805364> Malloc zone enumeration code should be safe in the face of errors from the memory reader.
* wtf/FastMalloc.cpp:
(WTF::PageHeapAllocator::recordAdministrativeRegions): Use the new helper function to walk the linked list safely.
(WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Ditto.
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Ditto.
(WTF::TCMallocStats::PageMapFreeObjectFinder::visit): Bail out if the span could not be read.
(WTF::TCMallocStats::PageMapMemoryUsageRecorder::visit): Ditto.
* wtf/MallocZoneSupport.h:
(WTF::RemoteMemoryReader::operator()): Remove an assert that is not valid.
(WTF::RemoteMemoryReader::nextEntryInLinkedList): Add a helper function for retrieving the next entry in
a linked list. It maps a failed read of the remote memory in to a null pointer, which all callers can
handle gracefully.
2011-02-09 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 54164 - Optimize global_var accesses on JSVALUE64
Directly embed the pointer to d->registers, optimize out the load
from the variable object, as we do already in JSVALUE32_64.
This is a ~1.5% win on sunspidey.
* jit/JIT.cpp:
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_global_var):
(JSC::JIT::emit_op_put_global_var):
(JSC::JIT::emit_op_get_scoped_var):
(JSC::JIT::emit_op_put_scoped_var):
2011-02-09 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
A little more encapsulation for MarkedBlock: Made MarkedBlock responsible
for its own initialization and destruction
https://bugs.webkit.org/show_bug.cgi?id=54137
* runtime/CollectorHeapIterator.h: Removed ObjectIterator since it is
now unused.
* runtime/JSCell.h: Maded MarkedBlock a friend so it can construct and
destruct JSCells.
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::create):
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock): Migrated initialization and destruction
code from MarkedSpace, updating it not to use ObjectIterator. We don't
want to use an abstract iterator since iteration will be unique to each
block in the future.
* runtime/MarkedBlock.h: Made the consructor private and moved it into
the .cpp file because it's big now.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocateBlock):
(JSC::MarkedSpace::freeBlock): Migrated code.
* runtime/MarkedSpace.h:
(JSC::CollectorHeap::collectorBlock): Keep a vector of MarkedBlock
pointers instead of aligned allocations -- how MarkedBlocks are allocated
is now an implementation detail of MarkedBlock.
2011-02-09 Adam Barth <abarth@webkit.org>
Another attempt to fix the Qt Windows build.
* config.h:
* wtf/OSRandomSource.cpp:
(WTF::randomValuesFromOS):
2011-02-09 Adam Barth <abarth@webkit.org>
Attempt to fix the Qt Windows build.
* wtf/OSRandomSource.cpp:
(WTF::randomValuesFromOS):
2011-02-09 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add WTF::cryptographicallyRandomNumber
https://bugs.webkit.org/show_bug.cgi?id=54083
Introduce a cryptographically strong random number generator to WTF.
The random number generator is based on arc4random as found in:
http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/crypt/arc4random.c?rev=1.22
I've changed to source to WebKit style and abstracted the operating
system interaction to OSRandomSource. We'll use this functionality to
expose a cryptographically strong random number generator to
JavaScript.
* Android.mk:
* Android.v8.wtf.mk:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* config.h:
* wtf/CMakeLists.txt:
* wtf/CryptographicallyRandomNumber.cpp: Added.
(WTF::initMutexIfNeeded):
(WTF::init):
(WTF::addRandomData):
(WTF::stir):
(WTF::stirIfNeeded):
(WTF::getByte):
(WTF::getWord):
(WTF::cryptographicallyRandomNumber):
(WTF::cryptographicallyRandomValues):
* wtf/CryptographicallyRandomNumber.h: Added.
* wtf/OSRandomSource.cpp: Added.
(WTF::randomValuesFromOS):
* wtf/OSRandomSource.h: Added.
* wtf/wtf.pri:
2011-02-09 Geoffrey Garen <ggaren@apple.com>
Try to fix the build.
* wtf/Bitmap.h: Include string.h for memset. Not sure why this started
failing now.
2011-02-09 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
A tiny bit of encapsulation for MarkedBlock: made its heap data member private
https://bugs.webkit.org/show_bug.cgi?id=54129
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::isCellAligned):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::heap): Made the heap data member private, and provided
a constructor and an accessor.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocateBlock):
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::heap): Use the constructor and accessor.
2011-02-09 Peter Varga <pvarga@webkit.org>
Reviewed by Gavin Barraclough.
Replace PCRE with Yarr in WebCore
https://bugs.webkit.org/show_bug.cgi?id=53496
* JavaScriptCore.exp:
* JavaScriptCore.gyp/JavaScriptCore.gyp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* create_regex_tables:
* runtime/RegExp.cpp:
* wtf/Platform.h:
* yarr/Yarr.h:
* yarr/YarrJIT.cpp:
* yarr/YarrJIT.h:
* yarr/YarrParser.h:
* yarr/YarrPattern.h:
* yarr/YarrSyntaxChecker.h:
* yarr/yarr.pri: Added.
2011-02-08 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Removed some dead code from Heap
https://bugs.webkit.org/show_bug.cgi?id=54064
* runtime/MarkedSpace.cpp: Removed some now-unused constants and
declarations.
(JSC::MarkedSpace::allocate): Removed some ASSERTs that are also ASSERTed
by our caller. Removed redundant typedefs.
2011-02-08 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Use a vector to track blocks in the Heap, instead of hand-rolled vector-like code
https://bugs.webkit.org/show_bug.cgi?id=54062
SunSpider reports no change.
* runtime/CollectorHeapIterator.h:
(JSC::CollectorHeapIterator::isValid):
(JSC::CollectorHeapIterator::isLive): Updated for new mark invariant: To
know if an object is live, you just need to test its mark bit.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::MarkedSpace): Moved waterMark and highWaterMark from
CollectorHeap into MarkedSpace, since they're global state. Removed call
to memset since CollectorHeap is a true class with its own constructor now.
(JSC::MarkedSpace::destroy): Change uses of m_heap.usedBlocks to
m_heap.blocks.size(), and m_heap.numBlocks to m_heap.blocks.capacity().
(JSC::MarkedSpace::allocateBlock):
(JSC::MarkedSpace::freeBlock): No need to manage our vector manually anymore.
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::shrink):
(JSC::MarkedSpace::clearMarkBits):
(JSC::MarkedSpace::markedCells):
(JSC::MarkedSpace::sweep):
(JSC::MarkedSpace::objectCount):
(JSC::MarkedSpace::capacity):
(JSC::MarkedSpace::reset):
(JSC::MarkedSpace::primaryHeapEnd):
* runtime/MarkedSpace.h:
(JSC::CollectorHeap::CollectorHeap):
(JSC::MarkedSpace::highWaterMark):
(JSC::MarkedSpace::setHighWaterMark):
(JSC::MarkedSpace::contains): Same as above.
2011-02-08 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
Give each MarkedBlock enough mark bits to cover the whole block
https://bugs.webkit.org/show_bug.cgi?id=54029
SunSpider reports no change.
This simplifies access to mark bits, since any cell-aligned pointer
into a block now has a valid mark bit to test.
* runtime/MarkedBlock.h: Changed CELLS_PER_BLOCK to account for the extra
mark bits. This happens not to change its actual value.
(JSC::MarkedBlock::cellNumber):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::testAndSetMarked):
(JSC::MarkedBlock::setMarked): Changed const JSCell* to const void* to
remove a cast from our caller, and to more accurately reflect the fact
that MarkedBlock is agnostic about the types pointed to by the pointers
you pass to it.
(JSC::MarkedBlock::isPossibleCell): Removed a null check. We now consider
the null pointer to be a possible cell with a 0 (impossible) block. This
removes a null check from marking.
* runtime/MarkedSpace.cpp:
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::contains): Simplified the contains check, and inlined
the whole thing, now that it's so simple.
2011-02-08 Daniel Bates <dbates@rim.com>
Rubber-stamped by Martin Robinson.
Rename enum ProtectionSeting [sic] to ProtectionSetting.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::reprotectRegion):
* jit/ExecutableAllocator.h:
2011-02-08 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Andreas Kling.
[Qt] Should not always define USE_SYSTEM_MALLOC
https://bugs.webkit.org/show_bug.cgi?id=54007
* wtf/Platform.h:
2011-02-08 Dan Bernstein <mitz@apple.com>
Reviewed by Maciej Stachowiak.
LLVM Compiler build fix.
* runtime/WriteBarrier.h:
(JSC::WriteBarrier::WriteBarrier):
2011-02-07 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
JSVariableObject::setRegisters should take PassOwnArrayPtr for registersArray.
https://bugs.webkit.org/show_bug.cgi?id=53902
* runtime/Arguments.h:
(JSC::JSActivation::copyRegisters): Uses OwnArrayPtr<Register> instead of Register*.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::copyGlobalsFrom): Ditto.
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register*
for registerArray.
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::copyRegisterArray): Returns PassOwnArrayPtr<Register> instead of Register*.
(JSC::JSVariableObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register*
for registerArray.
2011-02-07 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Removed some dead code from Heap
https://bugs.webkit.org/show_bug.cgi?id=53969
SunSpider reports no change.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::shrink):
(JSC::MarkedSpace::sweep):
* runtime/MarkedSpace.h: Removed resizeBlocks and growBlocks, and
renamed shrinkBlocks to shrink, making it unconditionally shrink as
much as possible.
2011-02-07 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Simplified the marked space's mark invariant
https://bugs.webkit.org/show_bug.cgi?id=53968
SunSpider reports no change.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate): Mark objects when allocating them. This
means that, at all times other than the mark phase, an object is live
if and only if it is marked.
(JSC::MarkedSpace::containsSlowCase): Use the new mark invariant to
simplify testing whether an object is live.
2011-02-07 Beth Dakin <bdakin@apple.com>
Reviewed by Eric Seidel.
Fix for https://bugs.webkit.org/show_bug.cgi?id=53950
USE_WK_SCROLLBAR_PAINTER in ScrollbarThemeMac should be in
Platform.h instead
* wtf/Platform.h:
2011-02-07 Darin Adler <darin@apple.com>
Reviewed by Antti Koivisto.
Add built-in decoder for UTF-8 for improved performance
https://bugs.webkit.org/show_bug.cgi?id=53898
* wtf/unicode/UnicodeMacrosFromICU.h: Added U8_MAX_LENGTH and
U8_APPEND_UNSAFE. Also fixed header.
2011-02-07 Adam Roben <aroben@apple.com>
Delete precompiled headers whenever any .vsprops file changes
Precompiled headers need to be rebuilt if, e.g., an ENABLE_* macro is changed in one of our
.vsprops files. Unfortunately, Visual Studio isn't smart enough to figure this out, so we
give it some assistance by deleting the precompiled headers whenever any .vsprops file
changes.
I also made some drive-by fixes while I was in the area.
Fixes <http://webkit.org/b/53826> react-to-vsprops-changes.py doesn't force precompiled
headers to be rebuilt, but should
Reviewed by David Kilzer.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stop ignoring the
return code from react-to-vsprops-changes.py so we will notice when errors are introduced.
But skip the script entirely in production builds, where it is both unnecessary and can't
function correctly (due to not having the entire source tree available to it).
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
(main): Removed an extra '*' in the glob for finding manifest files. The extra '*' was
leftover from before we rearranged WebKitBuild in r75138. Moved code to delete an old file
to the new delete_if_older_than function. Added code to delete any precompiled headers older
than the newest .vsprops file.
(delete_if_older_than): Added. Code came from main.
2011-02-07 Antti Koivisto <antti@apple.com>
Not reviewed.
ASSERTS_DISABLED -> ASSERT_DISABLED
* wtf/BloomFilter.h:
2011-02-06 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed; speculative Qt build fix.
* JavaScriptCore.pro:
2011-02-06 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
https://bugs.webkit.org/show_bug.cgi?id=52867
Removed LOOSE_OWN_ARRAY_PTR and OwnArrayPtr<T>::set. Replaced all calls to OwnArrayPtr::set
and loose instantiation of OwnArrayPtr by calls to operator= and adoptArrayPtr. Also removed
OwnArrayPtrCommon.h since PassOwnArrayPtr.h needs to include OwnArrayPtr.h and there is
no point in putting deleteOwnedArrayPtr into a separate header.
Note: if this patch breaks build, the code is either instiantiating OwnArrayPtr
without calling adoptArrayPtr or calling set on ArrayOwnPtr instead of operator=.
No tests are added since this is a refactoring.
* API/JSStringRefCF.cpp:
(JSStringCreateWithCFString): Calls adoptArrayPtr.
* GNUmakefile.am: Removed OwnArrayPtrCommon.h
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
* runtime/Arguments.cpp:
(JSC::Arguments::deleteProperty): Calls adoptArrayPtr.
* runtime/Arguments.h:
(JSC::Arguments::copyRegisters): Ditto.
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::JSPropertyNameIterator): Ditto.
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::setRegisters): Calls operator= instead of set.
* runtime/StructureChain.cpp:
(JSC::StructureChain::StructureChain): Ditto.
* wtf/CMakeLists.txt:
* wtf/DateMath.h:
(JSC::GregorianDateTime::GregorianDateTime): No longer instnatiates OwnArrayPtr
with a null pointer.
* wtf/OwnArrayPtr.h:
* wtf/OwnArrayPtrCommon.h: Removed.
* wtf/PassOwnArrayPtr.h: No longer includes OwnArrayCommon.h
(WTF::deleteOwnedArrayPtr): Moved from OwnArrayPtrCommon.h
2011-02-06 Antti Koivisto <antti@apple.com>
Reviewed by Maciej Stachowiak.
Use bloom filter for descendant selector filtering
https://bugs.webkit.org/show_bug.cgi?id=53880
Implement a bloom filter with k=2 and 8 bit counting.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/BloomFilter.h: Added.
(WTF::BloomFilter::maximumCount):
(WTF::BloomFilter::BloomFilter):
(WTF::BloomFilter::mayContain):
(WTF::BloomFilter::add):
(WTF::BloomFilter::remove):
(WTF::BloomFilter::firstSlot):
(WTF::BloomFilter::secondSlot):
(WTF::::add):
(WTF::::remove):
(WTF::::clear):
(WTF::::likelyEmpty):
(WTF::::isClear):
2011-02-04 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Rolled back in r77612 with ASSERT/crash fixed.
https://bugs.webkit.org/show_bug.cgi?id=53759
Don't shrink the heap to 0 unconditionally. Instead, shrink to 1 if
necessary. For now, the heap assumes that it always has at least one
block live.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reset):
* runtime/Heap.h:
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::shrinkBlocks):
(JSC::MarkedSpace::sweep):
(JSC::MarkedSpace::reset):
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::highWaterMark):
(JSC::MarkedSpace::setHighWaterMark):
2011-02-04 David Kilzer <ddkilzer@apple.com>
BUILD FIX: REALLY remove the last vestiges of JSVALUE32!
<rdar://problem/8957409> Remove last vestiges of JSVALUE32
<http://webkit.org/b/53779>
* DerivedSources.make: Removed dependency on
JavaScriptCore.JSVALUE32.exp.
2011-02-04 David Kilzer <ddkilzer@apple.com>
<rdar://problem/8957409> Remove last vestiges of JSVALUE32
<http://webkit.org/b/53779>
Reviewed by Darin Adler.
Support for JSVALUE32 was originaly removed in r70111.
* Configurations/JavaScriptCore.xcconfig: Changed armv6 to use
JavaScriptCore.JSVALUE32_64.exp and ppc64 to use
JavaScriptCore.JSVALUE64.exp to match Platform.h.
* DerivedSources.make: Removed rule for
JavaScriptCore.JSVALUE32.exp.
* JavaScriptCore.JSVALUE32only.exp: Removed.
* JavaScriptCore.xcodeproj/project.pbxproj: Removed references
to JavaScriptCore.JSVALUE32only.exp.
2011-02-04 David Kilzer <ddkilzer@apple.com>
Use static_cast and other style cleanup in YarrInterpreter.cpp
<http://webkit.org/b/53772>
Reviewed by John Sullivan.
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::InputStream::readChecked): Use
static_cast.
(JSC::Yarr::Interpreter::InputStream::checkInput): Remove
unnecessary else block.
(JSC::Yarr::Interpreter::matchAssertionEOL): Ditto.
(JSC::Yarr::Interpreter::backtrackBackReference): Ditto.
(JSC::Yarr::ByteCompiler::emitDisjunction): Use static_cast.
2011-02-04 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r77625 and r77626.
http://trac.webkit.org/changeset/77625
http://trac.webkit.org/changeset/77626
https://bugs.webkit.org/show_bug.cgi?id=53765
It broke Windows builds (Requested by Ossy_ on #webkit).
* JavaScriptCore.exp:
* JavaScriptCore.gyp/JavaScriptCore.gyp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* create_regex_tables:
* runtime/RegExp.cpp:
* wtf/Platform.h:
* yarr/Yarr.h:
* yarr/YarrJIT.cpp:
* yarr/YarrJIT.h:
* yarr/YarrParser.h:
* yarr/YarrPattern.h:
* yarr/YarrSyntaxChecker.h:
* yarr/yarr.pri: Removed.
2011-02-04 Jessie Berlin <jberlin@apple.com>
Windows build fix. Unreviewed.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2011-02-04 Peter Varga <pvarga@webkit.org>
Reviewed by Gavin Barraclough.
Replace PCRE with Yarr in WebCore
https://bugs.webkit.org/show_bug.cgi?id=53496
* JavaScriptCore.exp:
* JavaScriptCore.gyp/JavaScriptCore.gyp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* create_regex_tables:
* runtime/RegExp.cpp:
* wtf/Platform.h:
* yarr/Yarr.h:
* yarr/YarrJIT.cpp:
* yarr/YarrJIT.h:
* yarr/YarrParser.h:
* yarr/YarrPattern.h:
* yarr/YarrSyntaxChecker.h:
* yarr/yarr.pri: Added.
2011-02-04 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed rollout two patches r77614 and r77612.
REGRESSION: Snow Leopard Intel Release anumber of failing tests.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reset):
* runtime/Heap.h:
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::sweep):
(JSC::MarkedSpace::reset):
* runtime/MarkedSpace.h:
2011-02-04 Geoffrey Garen <ggaren@apple.com>
Try to fix 32bit build.
* runtime/Heap.cpp:
(JSC::Heap::reset): Use an explicit cast to avoid shortening warnings,
since 1.5 is double (64bit), and the result is size_t (32bit).
2011-02-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Cameron Zwarich.
Changed MarkedSpace to delegate grow/shrink decisions to Heap
https://bugs.webkit.org/show_bug.cgi?id=53759
SunSpider reports no change.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reset):
* runtime/Heap.h: Reorganized a few data members for better cache locality.
Added a grow policy.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::sweep):
(JSC::MarkedSpace::reset): Don't shrink automatically. Instead, wait for
the heap to make an explicit sweep call.
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::highWaterMark):
(JSC::MarkedSpace::setHighWaterMark): Use a watermark to determine how
many bytes to allocate before failing and giving the heap an opportunity
to collect garbage. This also means that we allocate blocks on demand,
instead of ahead of time.
2011-02-03 James Kozianski <koz@chromium.org>
Reviewed by Dimitri Glazkov.
Add navigator.registerProtocolHandler behind a flag.
https://bugs.webkit.org/show_bug.cgi?id=52609
* Configurations/FeatureDefines.xcconfig:
2011-02-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Not all blocks are freed when the heap is freed (counting is hard!)
https://bugs.webkit.org/show_bug.cgi?id=53732
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::destroy): Freeing a block compacts the list, so just
keep freeing block 0 until there are no blocks left.
2011-02-03 Geoffrey Garen <ggaren@apple.com>
Try to fix the Mac build.
* JavaScriptCore.xcodeproj/project.pbxproj: The new MarkedBlock.h header
needs to be private, not project, so other projects can include headers
that depend on it.
2011-02-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Start using MarkedBlock instead of CollectorBlock
https://bugs.webkit.org/show_bug.cgi?id=53693
SunSpider reports no change.
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::blockFor):
(JSC::MarkedBlock::setMarked):
(JSC::MarkedBlock::isCellAligned):
(JSC::MarkedBlock::isPossibleCell): Updated for const-ness.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocateBlock):
(JSC::MarkedSpace::containsSlowCase):
(JSC::MarkedSpace::clearMarkBits): Updated for const-ness.
* runtime/MarkedSpace.h:
(JSC::CollectorHeap::collectorBlock):
(JSC::MarkedSpace::heap):
(JSC::MarkedSpace::isMarked):
(JSC::MarkedSpace::testAndSetMarked):
(JSC::MarkedSpace::setMarked):
(JSC::MarkedSpace::contains): Switched from CollectorBlock to MarkedBlock,
and deleted dead CollectorBlock-related code.
2011-02-03 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Avoid strlen() in AtomicString::fromUTF8
https://bugs.webkit.org/show_bug.cgi?id=50516
Add an overload to calculateStringHashFromUTF8 to get
strlen() of the input data with only one call.
This change shows about 3% performance win on the xml-parser benchmark.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::fromUTF8):
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
(WTF::Unicode::calculateStringHashFromUTF8):
(WTF::Unicode::calculateStringHashAndLengthFromUTF8):
* wtf/unicode/UTF8.h:
2011-02-02 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2011-02-02 Gavin Barraclough <barraclough@apple.com>
oops, build fix!
* wtf/Assertions.cpp:
2011-02-02 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 53650 - Add a BACKTRACE macro to Assertions.h
Add a BACKTRACE macro to Assertions.h, which will print a backtrace on
debug Mac builds, make CRASH (and thus ASSERT) automatically call this.
* JavaScriptCore.exp:
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2011-02-02 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Improper backtrack of nested non-capturing greedy paren to prior paren
https://bugs.webkit.org/show_bug.cgi?id=53261
A paren that follows a non-capturing greedy paren nested within a
non-capturing fixed paren was back tracking to the last paren
processed instead of the immediately prior paren.
Refactored default backtracking of parens to prior paren to work for
both nested (within) and immediately prior (after) parens.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
(JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
(JSC::Yarr::YarrGenerator::TermGenerationState::setJumpListToPriorParen):
(JSC::Yarr::YarrGenerator::TermGenerationState::getJumpListToPriorParen):
(JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
(JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
(JSC::Yarr::YarrGenerator::generateParenthesesSingle):
(JSC::Yarr::YarrGenerator::generateDisjunction):
2011-02-02 Jeff Miller <jeffm@apple.com>
Reviewed by Darin Adler and Steve Falkenburg.
Add DerivedSources.make to some Visual Studio projects
https://bugs.webkit.org/show_bug.cgi?id=53607
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Add DerivedSources.make.
2011-02-02 Steve Lacey <sjl@chromium.org>
Reviewed by Eric Carlson.
Implement basic media statistics on media elements.
https://bugs.webkit.org/show_bug.cgi?id=53322
* Configurations/FeatureDefines.xcconfig:
2011-02-02 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fixes for wxWebKit.
* wtf/wx/StringWx.cpp:
(WTF::String::String):
2011-02-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
A little more Heap refactoring
https://bugs.webkit.org/show_bug.cgi?id=53577
SunSpider reports no change.
Split out MarkedBlock into its own file / class.
Did the following renames:
isCellMarked => isMarked
checkMarkCell => testAndSetMarked
markCell => setMarked
cellOffset => cellNumber
collectorBlock => blockFor
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/Heap.cpp:
(JSC::WeakGCHandlePool::update):
* runtime/Heap.h:
(JSC::Heap::isMarked):
(JSC::Heap::testAndSetMarked):
(JSC::Heap::setMarked):
* runtime/JSArray.h:
(JSC::MarkStack::markChildren):
(JSC::MarkStack::drain):
* runtime/JSCell.h:
(JSC::JSCell::MarkStack::internalAppend):
* runtime/MarkedBlock.cpp: Added.
* runtime/MarkedBlock.h: Added.
(JSC::MarkedBlock::blockFor):
(JSC::MarkedBlock::cellNumber):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::testAndSetMarked):
(JSC::MarkedBlock::setMarked):
(JSC::MarkedBlock::isCellAligned):
(JSC::MarkedBlock::isPossibleCell):
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::isMarked):
(JSC::MarkedSpace::testAndSetMarked):
(JSC::MarkedSpace::setMarked):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::isValid):
(JSC::::get):
(JSC::::take):
(JSC::::set):
2011-02-02 Sam Weinig <sam@webkit.org>
Fix windows clean build.
* DerivedSources.make:
2011-02-02 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[GTK] Fix dist compilation
https://bugs.webkit.org/show_bug.cgi?id=53579
* GNUmakefile.am: Added WriteBarrier.h to the sources, it was
added in r77151
2011-02-01 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r77297.
http://trac.webkit.org/changeset/77297
https://bugs.webkit.org/show_bug.cgi?id=53538
caused leopard crashes (Requested by paroga on #webkit).
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::fromUTF8):
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::calculateStringHashFromUTF8):
* wtf/unicode/UTF8.h:
2011-02-01 Sam Weinig <sam@webkit.org>
Fix Mac production builds.
* JavaScriptCore.xcodeproj/project.pbxproj:
2011-02-01 Sam Weinig <sam@webkit.org>
Try to fix the windows build.
* DerivedSources.make:
2011-02-01 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Avoid strlen() in AtomicString::fromUTF8
https://bugs.webkit.org/show_bug.cgi?id=50516
Add an overload to calculateStringHashFromUTF8 to get
strlen() of the input data with only one call.
This change shows about 3% performance win on the xml-parser benchmark.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::fromUTF8):
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
(WTF::Unicode::calculateStringHashFromUTF8):
(WTF::Unicode::calculateStringHashAndLengthFromUTF8):
* wtf/unicode/UTF8.h:
2011-02-01 Sam Weinig <sam@webkit.org>
Reviewed by Beth Dakin.
Part 2 for <rdar://problem/8492788>
Adopt WKScrollbarPainterController
Use header detection to define scrollbar painting controller #define.
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
2011-02-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Refactor JSGlobalObject-related tear-down
https://bugs.webkit.org/show_bug.cgi?id=53478
While investigating crashes caused by r77082, I noticed some strange
destructor-time behaviors. This patch makes them less strange.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
(JSC::GlobalCodeBlock::GlobalCodeBlock):
(JSC::GlobalCodeBlock::~GlobalCodeBlock): Store the set of global code
blocks on the Heap, instead of on independent global objects. The heap
is guaranteed to outlast any GC-owned data structure. The heap is also
a natural place to store objects that needs out-of-band marking, since
the heap is responsible for marking all roots.
* runtime/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::globalObjectCount):
(JSC::Heap::protectedGlobalObjectCount):
* runtime/Heap.h:
(JSC::Heap::codeBlocks):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
* runtime/MarkedSpace.cpp: Store the set of global objects in a weak map
owned by JSGlobalData, instead of an instrusive circular linked list.
This is simpler, and it avoids destructor-time access between garbage
collected objects, which is hard to get right.
(JSC::MarkedSpace::destroy): Make sure to clear mark bits before tearing
everything down. Otherwise, weak data structures will incorrectly report
that objects pending destruction are still alive.
2011-02-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
REGRESSION(77082): GC-related crashes seen: on WebKit2 bot; on GTK 32bit
bot; loading trac pages; typing in search field
https://bugs.webkit.org/show_bug.cgi?id=53519
The crashes were all caused by failure to run an object's destructor.
* runtime/CollectorHeapIterator.h:
(JSC::ObjectIterator::ObjectIterator): Don't skip forward upon
construction. The iterator class used to do that when it was designed
for prior-to-beginning initialization. I forgot to remove this line
of code when I changed the iterator to normal initialization.
Skipping forward upon construction was causing the heap to skip running
the destructor for the very first object in a block when destroying the
block. This usually did not crash, since block destruction is rare and
most objects have pretty trivial destructors. However, in the rare case
when the heap would destroy a block whose first object was a global
object or a DOM node, BOOM.
2011-01-31 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Update JSObject storage for new marking API
https://bugs.webkit.org/show_bug.cgi?id=53467
JSObject no longer uses EncodedJSValue for its property storage.
This produces a stream of mechanical changes to PropertySlot and
anonymous storage APIs.
* JavaScriptCore.exp:
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::ArrayPrototype):
* runtime/BooleanConstructor.cpp:
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanObject.cpp:
(JSC::BooleanObject::BooleanObject):
* runtime/BooleanObject.h:
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::DatePrototype):
* runtime/JSActivation.cpp:
(JSC::JSActivation::getOwnPropertySlot):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObject):
* runtime/JSObject.cpp:
(JSC::JSObject::fillGetterPropertySlot):
* runtime/JSObject.h:
(JSC::JSObject::getDirectLocation):
(JSC::JSObject::offsetForLocation):
(JSC::JSObject::putAnonymousValue):
(JSC::JSObject::clearAnonymousValue):
(JSC::JSObject::getAnonymousValue):
(JSC::JSObject::putThisToAnonymousValue):
(JSC::JSObject::locationForOffset):
(JSC::JSObject::inlineGetOwnPropertySlot):
* runtime/JSObjectWithGlobalObject.cpp:
(JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::JSWrapperObject):
(JSC::JSWrapperObject::setInternalValue):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/NumberConstructor.cpp:
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::NumberObject::NumberObject):
(JSC::constructNumber):
* runtime/NumberObject.h:
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/PropertySlot.h:
(JSC::PropertySlot::getValue):
(JSC::PropertySlot::setValue):
(JSC::PropertySlot::setRegisterSlot):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase::setWithoutWriteBarrier):
2011-02-01 Daniel Bates <dbates@rim.com>
Reviewed by Antonio Gomes.
Modify RandomNumberSeed.h to use USE(MERSENNE_TWISTER_19937)
https://bugs.webkit.org/show_bug.cgi?id=53506
Currently, use of the Mersenne Twister pseudorandom number generator
is hardcoded to the Windows CE port. With the passing of bug #53253,
we can generalize support for this PRNG to all ports that use srand(3)
and rand(3), including Windows CE.
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator):
2011-02-01 Dave Tapuska <dtapuska@rim.com>
Reviewed by Gavin Barraclough.
MacroAssemblerARM would generate code that did 32bit loads
on addresses that were not aligned. More specifically it would
generate a ldr r8,[r1, #7] which isn't valid on ARMv5 and lower.
The intended instruction really is ldrb r8,[r1, #7]; ensure we
call load8 instead of load32.
https://bugs.webkit.org/show_bug.cgi?id=46095
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::set32Test32):
(JSC::MacroAssemblerARM::set32Test8):
2011-02-01 Darin Fisher <darin@chromium.org>
Reviewed by Eric Seidel.
Fix some Visual Studio compiler warnings.
https://bugs.webkit.org/show_bug.cgi?id=53476
* wtf/MathExtras.h:
(clampToInteger):
(clampToPositiveInteger):
* wtf/ThreadingWin.cpp:
(WTF::absoluteTimeToWaitTimeoutInterval):
2011-01-31 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Bogus callframe during stack unwinding
https://bugs.webkit.org/show_bug.cgi?id=53454
Trying to access a callframe's globalData after destroying its
ScopeChain is not a good thing. While we could access the
globalData directly through the (known valid) scopechain we're
holding on to, it feels fragile. Instead we push the valid
ScopeChain onto the callframe again to ensure that the callframe
itself remains valid.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
2011-01-31 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
https://bugs.webkit.org/show_bug.cgi?id=53271
Reapplying this change again.
Changed isValid() to use .get() as a result of change r77151.
Added new isValid() methods to check if a contained object in
a WeakGCMap is valid when using an unchecked iterator.
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::isValid):
2011-01-31 Oliver Hunt <oliver@apple.com>
Convert markstack to a slot visitor API
https://bugs.webkit.org/show_bug.cgi?id=53219
rolling r77098, r77099, r77100, r77109, and
r77111 back in, along with a few more Qt fix attempts.
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
(JSC::JSCallbackObject::setPrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::put):
(JSC::::staticFunctionGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeConstructor):
(JSObjectSetPrivateProperty):
* API/JSWeakObjectMapRefInternal.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::findScopedProperty):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::markChildren):
* debugger/DebuggerActivation.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::execute):
(JSC::Interpreter::tryCacheGetByID):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/Arguments.cpp:
(JSC::Arguments::markChildren):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
* runtime/Arguments.h:
(JSC::Arguments::setActivation):
(JSC::Arguments::Arguments):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/ConservativeSet.cpp:
(JSC::ConservativeSet::grow):
* runtime/ConservativeSet.h:
(JSC::ConservativeSet::~ConservativeSet):
(JSC::ConservativeSet::mark):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::markChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::getter):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setter):
(JSC::GetterSetter::setSetter):
* runtime/GlobalEvalFunction.cpp:
(JSC::GlobalEvalFunction::GlobalEvalFunction):
(JSC::GlobalEvalFunction::markChildren):
* runtime/GlobalEvalFunction.h:
(JSC::GlobalEvalFunction::cachedGlobalObject):
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::value):
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
(JSC::JSActivation::put):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
* runtime/JSArray.h:
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::MarkStack::append):
(JSC::JSCell::MarkStack::internalAppend):
(JSC::JSCell::MarkStack::deprecatedAppend):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::regExpConstructor):
(JSC::JSGlobalObject::errorConstructor):
(JSC::JSGlobalObject::evalErrorConstructor):
(JSC::JSGlobalObject::rangeErrorConstructor):
(JSC::JSGlobalObject::referenceErrorConstructor):
(JSC::JSGlobalObject::syntaxErrorConstructor):
(JSC::JSGlobalObject::typeErrorConstructor):
(JSC::JSGlobalObject::URIErrorConstructor):
(JSC::JSGlobalObject::evalFunction):
(JSC::JSGlobalObject::objectPrototype):
(JSC::JSGlobalObject::functionPrototype):
(JSC::JSGlobalObject::arrayPrototype):
(JSC::JSGlobalObject::booleanPrototype):
(JSC::JSGlobalObject::stringPrototype):
(JSC::JSGlobalObject::numberPrototype):
(JSC::JSGlobalObject::datePrototype):
(JSC::JSGlobalObject::regExpPrototype):
(JSC::JSGlobalObject::methodCallDummy):
(JSC::Structure::prototypeForLookup):
(JSC::constructArray):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
(JSC::Stringifier::Holder::objectSlot):
(JSC::Stringifier::markAggregate):
(JSC::Stringifier::stringify):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::removeDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::getDirectOffset):
(JSC::JSObject::putDirectOffset):
(JSC::JSObject::putUndefinedAtDirectOffset):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::JSValue::putDirect):
(JSC::JSObject::allocatePropertyStorageInline):
(JSC::JSObject::markChildrenDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::JSPropertyNameIterator):
(JSC::JSPropertyNameIterator::get):
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/JSValue.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::markChildren):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::lookupPut):
* runtime/MarkStack.h:
(JSC::MarkStack::MarkStack):
(JSC::MarkStack::deprecatedAppendValues):
(JSC::MarkStack::appendValues):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::constructNumber):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
(JSC::resolveBase):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setExistingProperty):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::base):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainIterator::operator*):
(JSC::ScopeChainIterator::operator->):
(JSC::ScopeChain::top):
* runtime/ScopeChainMark.h:
(JSC::ScopeChain::markAggregate):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
(JSC::SmallStrings::markChildren):
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
(JSC::Structure::storedPrototypeSlot):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::uncheckedGet):
(JSC::WeakGCMap::uncheckedGetSlot):
(JSC::::get):
(JSC::::take):
(JSC::::set):
(JSC::::uncheckedRemove):
* runtime/WriteBarrier.h: Added.
(JSC::DeprecatedPtr::DeprecatedPtr):
(JSC::DeprecatedPtr::get):
(JSC::DeprecatedPtr::operator*):
(JSC::DeprecatedPtr::operator->):
(JSC::DeprecatedPtr::slot):
(JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
(JSC::DeprecatedPtr::operator!):
(JSC::WriteBarrierBase::set):
(JSC::WriteBarrierBase::get):
(JSC::WriteBarrierBase::operator*):
(JSC::WriteBarrierBase::operator->):
(JSC::WriteBarrierBase::clear):
(JSC::WriteBarrierBase::slot):
(JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
(JSC::WriteBarrierBase::operator!):
(JSC::WriteBarrier::WriteBarrier):
(JSC::operator==):
2011-01-31 Dan Winship <danw@gnome.org>
Reviewed by Gustavo Noronha Silva.
wss (websockets ssl) support for gtk via new gio TLS support
https://bugs.webkit.org/show_bug.cgi?id=50344
Add a GPollableOutputStream typedef for TLS WebSockets support
* wtf/gobject/GTypedefs.h:
2011-01-31 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
https://bugs.webkit.org/show_bug.cgi?id=53352
Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
The FixedVMPoolAllocator currently uses a best fix policy -
switch to first fit, this is less prone to external fragmentation.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::AllocationTableSizeClass::AllocationTableSizeClass):
(JSC::AllocationTableSizeClass::blockSize):
(JSC::AllocationTableSizeClass::blockCount):
(JSC::AllocationTableSizeClass::blockAlignment):
(JSC::AllocationTableSizeClass::size):
(JSC::AllocationTableLeaf::AllocationTableLeaf):
(JSC::AllocationTableLeaf::~AllocationTableLeaf):
(JSC::AllocationTableLeaf::allocate):
(JSC::AllocationTableLeaf::free):
(JSC::AllocationTableLeaf::isEmpty):
(JSC::AllocationTableLeaf::isFull):
(JSC::AllocationTableLeaf::size):
(JSC::AllocationTableLeaf::classForSize):
(JSC::AllocationTableLeaf::dump):
(JSC::LazyAllocationTable::LazyAllocationTable):
(JSC::LazyAllocationTable::~LazyAllocationTable):
(JSC::LazyAllocationTable::allocate):
(JSC::LazyAllocationTable::free):
(JSC::LazyAllocationTable::isEmpty):
(JSC::LazyAllocationTable::isFull):
(JSC::LazyAllocationTable::size):
(JSC::LazyAllocationTable::dump):
(JSC::LazyAllocationTable::classForSize):
(JSC::AllocationTableDirectory::AllocationTableDirectory):
(JSC::AllocationTableDirectory::~AllocationTableDirectory):
(JSC::AllocationTableDirectory::allocate):
(JSC::AllocationTableDirectory::free):
(JSC::AllocationTableDirectory::isEmpty):
(JSC::AllocationTableDirectory::isFull):
(JSC::AllocationTableDirectory::size):
(JSC::AllocationTableDirectory::classForSize):
(JSC::AllocationTableDirectory::dump):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::allocated):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::classForSize):
(JSC::FixedVMPoolAllocator::offsetToPointer):
(JSC::FixedVMPoolAllocator::pointerToOffset):
(JSC::ExecutableAllocator::committedByteCount):
(JSC::ExecutableAllocator::isValid):
(JSC::ExecutableAllocator::underMemoryPressure):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* wtf/PageReservation.h:
(WTF::PageReservation::PageReservation):
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::committed):
2011-01-31 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r76969.
http://trac.webkit.org/changeset/76969
https://bugs.webkit.org/show_bug.cgi?id=53418
"It is causing crashes in GTK+ and Leopard bots" (Requested by
alexg__ on #webkit).
* runtime/WeakGCMap.h:
2011-01-30 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed, rolling out r77098, r77099, r77100, r77109, and
r77111.
http://trac.webkit.org/changeset/77098
http://trac.webkit.org/changeset/77099
http://trac.webkit.org/changeset/77100
http://trac.webkit.org/changeset/77109
http://trac.webkit.org/changeset/77111
https://bugs.webkit.org/show_bug.cgi?id=53219
Qt build is broken
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
(JSC::JSCallbackObject::setPrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::put):
(JSC::::staticFunctionGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeConstructor):
(JSObjectSetPrivateProperty):
* API/JSWeakObjectMapRefInternal.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::findScopedProperty):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::markChildren):
* debugger/DebuggerActivation.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::execute):
(JSC::Interpreter::tryCacheGetByID):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/Arguments.cpp:
(JSC::Arguments::markChildren):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
* runtime/Arguments.h:
(JSC::Arguments::setActivation):
(JSC::Arguments::Arguments):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/ConservativeSet.cpp:
(JSC::ConservativeSet::grow):
* runtime/ConservativeSet.h:
(JSC::ConservativeSet::~ConservativeSet):
(JSC::ConservativeSet::mark):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::markChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::getter):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setter):
(JSC::GetterSetter::setSetter):
* runtime/GlobalEvalFunction.cpp:
(JSC::GlobalEvalFunction::GlobalEvalFunction):
(JSC::GlobalEvalFunction::markChildren):
* runtime/GlobalEvalFunction.h:
(JSC::GlobalEvalFunction::cachedGlobalObject):
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::value):
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
(JSC::JSActivation::put):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
* runtime/JSArray.h:
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::JSValue::toThisObject):
(JSC::JSCell::MarkStack::append):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::regExpConstructor):
(JSC::JSGlobalObject::errorConstructor):
(JSC::JSGlobalObject::evalErrorConstructor):
(JSC::JSGlobalObject::rangeErrorConstructor):
(JSC::JSGlobalObject::referenceErrorConstructor):
(JSC::JSGlobalObject::syntaxErrorConstructor):
(JSC::JSGlobalObject::typeErrorConstructor):
(JSC::JSGlobalObject::URIErrorConstructor):
(JSC::JSGlobalObject::evalFunction):
(JSC::JSGlobalObject::objectPrototype):
(JSC::JSGlobalObject::functionPrototype):
(JSC::JSGlobalObject::arrayPrototype):
(JSC::JSGlobalObject::booleanPrototype):
(JSC::JSGlobalObject::stringPrototype):
(JSC::JSGlobalObject::numberPrototype):
(JSC::JSGlobalObject::datePrototype):
(JSC::JSGlobalObject::regExpPrototype):
(JSC::JSGlobalObject::methodCallDummy):
(JSC::Structure::prototypeForLookup):
(JSC::constructArray):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
(JSC::Stringifier::markAggregate):
(JSC::Stringifier::stringify):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::removeDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::getDirectOffset):
(JSC::JSObject::putDirectOffset):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::JSValue::putDirect):
(JSC::JSObject::allocatePropertyStorageInline):
(JSC::JSObject::markChildrenDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::JSPropertyNameIterator):
(JSC::JSPropertyNameIterator::get):
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/JSValue.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::markChildren):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::lookupPut):
* runtime/MarkStack.h:
(JSC::MarkStack::appendValues):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::constructNumber):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
(JSC::resolveBase):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setExistingProperty):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::base):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainIterator::operator*):
(JSC::ScopeChainIterator::operator->):
(JSC::ScopeChain::top):
* runtime/ScopeChainMark.h:
(JSC::ScopeChain::markAggregate):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
(JSC::SmallStrings::markChildren):
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::uncheckedGet):
(JSC::WeakGCMap::isValid):
(JSC::::get):
(JSC::::take):
(JSC::::set):
(JSC::::uncheckedRemove):
* runtime/WriteBarrier.h: Removed.
2011-01-30 Simon Fraser <simon.fraser@apple.com>
Build fix the build fix. I assume Oliver meant m_cell, not m_value.
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase::clear):
2011-01-30 Oliver Hunt <oliver@apple.com>
More Qt build fixes
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase::clear):
2011-01-30 Oliver Hunt <oliver@apple.com>
Convert markstack to a slot visitor API
https://bugs.webkit.org/show_bug.cgi?id=53219
rolling r77006 and r77020 back in.
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
(JSC::JSCallbackObject::setPrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::put):
(JSC::::staticFunctionGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeConstructor):
(JSObjectSetPrivateProperty):
* API/JSWeakObjectMapRefInternal.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::findScopedProperty):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::markChildren):
* debugger/DebuggerActivation.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::execute):
(JSC::Interpreter::tryCacheGetByID):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/Arguments.cpp:
(JSC::Arguments::markChildren):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
* runtime/Arguments.h:
(JSC::Arguments::setActivation):
(JSC::Arguments::Arguments):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/ConservativeSet.cpp:
(JSC::ConservativeSet::grow):
* runtime/ConservativeSet.h:
(JSC::ConservativeSet::~ConservativeSet):
(JSC::ConservativeSet::mark):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::markChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::getter):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setter):
(JSC::GetterSetter::setSetter):
* runtime/GlobalEvalFunction.cpp:
(JSC::GlobalEvalFunction::GlobalEvalFunction):
(JSC::GlobalEvalFunction::markChildren):
* runtime/GlobalEvalFunction.h:
(JSC::GlobalEvalFunction::cachedGlobalObject):
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::value):
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
(JSC::JSActivation::put):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
* runtime/JSArray.h:
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::MarkStack::append):
(JSC::JSCell::MarkStack::internalAppend):
(JSC::JSCell::MarkStack::deprecatedAppend):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::regExpConstructor):
(JSC::JSGlobalObject::errorConstructor):
(JSC::JSGlobalObject::evalErrorConstructor):
(JSC::JSGlobalObject::rangeErrorConstructor):
(JSC::JSGlobalObject::referenceErrorConstructor):
(JSC::JSGlobalObject::syntaxErrorConstructor):
(JSC::JSGlobalObject::typeErrorConstructor):
(JSC::JSGlobalObject::URIErrorConstructor):
(JSC::JSGlobalObject::evalFunction):
(JSC::JSGlobalObject::objectPrototype):
(JSC::JSGlobalObject::functionPrototype):
(JSC::JSGlobalObject::arrayPrototype):
(JSC::JSGlobalObject::booleanPrototype):
(JSC::JSGlobalObject::stringPrototype):
(JSC::JSGlobalObject::numberPrototype):
(JSC::JSGlobalObject::datePrototype):
(JSC::JSGlobalObject::regExpPrototype):
(JSC::JSGlobalObject::methodCallDummy):
(JSC::Structure::prototypeForLookup):
(JSC::constructArray):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
(JSC::Stringifier::Holder::objectSlot):
(JSC::Stringifier::markAggregate):
(JSC::Stringifier::stringify):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::removeDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::getDirectOffset):
(JSC::JSObject::putDirectOffset):
(JSC::JSObject::putUndefinedAtDirectOffset):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::JSValue::putDirect):
(JSC::JSObject::allocatePropertyStorageInline):
(JSC::JSObject::markChildrenDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::JSPropertyNameIterator):
(JSC::JSPropertyNameIterator::get):
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/JSValue.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::markChildren):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::lookupPut):
* runtime/MarkStack.h:
(JSC::MarkStack::MarkStack):
(JSC::MarkStack::deprecatedAppendValues):
(JSC::MarkStack::appendValues):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::constructNumber):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
(JSC::resolveBase):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setExistingProperty):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::base):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainIterator::operator*):
(JSC::ScopeChainIterator::operator->):
(JSC::ScopeChain::top):
* runtime/ScopeChainMark.h:
(JSC::ScopeChain::markAggregate):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
(JSC::SmallStrings::markChildren):
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
(JSC::Structure::storedPrototypeSlot):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::uncheckedGet):
(JSC::WeakGCMap::uncheckedGetSlot):
(JSC::WeakGCMap::isValid):
(JSC::::get):
(JSC::::take):
(JSC::::set):
(JSC::::uncheckedRemove):
* runtime/WriteBarrier.h: Added.
(JSC::DeprecatedPtr::DeprecatedPtr):
(JSC::DeprecatedPtr::get):
(JSC::DeprecatedPtr::operator*):
(JSC::DeprecatedPtr::operator->):
(JSC::DeprecatedPtr::slot):
(JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
(JSC::DeprecatedPtr::operator!):
(JSC::WriteBarrierBase::set):
(JSC::WriteBarrierBase::get):
(JSC::WriteBarrierBase::operator*):
(JSC::WriteBarrierBase::operator->):
(JSC::WriteBarrierBase::slot):
(JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
(JSC::WriteBarrierBase::operator!):
(JSC::WriteBarrier::WriteBarrier):
(JSC::operator==):
2011-01-30 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Filter all Heap collection through a common reset function, in
preparation for adding features triggered by collection.
https://bugs.webkit.org/show_bug.cgi?id=53396
SunSpider reports no change.
* runtime/Heap.cpp:
(JSC::Heap::reportExtraMemoryCostSlowCase): When we're over the extraCost
limit, just call collectAllGarbage() instead of rolling our own special
way of resetting the heap. In theory, this may be slower in some cases,
but it also fixes cases of pathological heap growth that we've seen,
where the only objects being allocated are temporary and huge
(<rdar://problem/8885843>).
(JSC::Heap::allocate):
(JSC::Heap::collectAllGarbage): Use the shared reset function.
(JSC::Heap::reset):
* runtime/Heap.h: Carved a new shared reset function out of the old
collectAllGarbage.
2011-01-30 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r77025.
http://trac.webkit.org/changeset/77025
https://bugs.webkit.org/show_bug.cgi?id=53401
It made js1_5/Regress/regress-159334.js fail on 64 bit Linux
(Requested by Ossy on #webkit).
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FreeListEntry::FreeListEntry):
(JSC::AVLTreeAbstractorForFreeList::get_less):
(JSC::AVLTreeAbstractorForFreeList::set_less):
(JSC::AVLTreeAbstractorForFreeList::get_greater):
(JSC::AVLTreeAbstractorForFreeList::set_greater):
(JSC::AVLTreeAbstractorForFreeList::get_balance_factor):
(JSC::AVLTreeAbstractorForFreeList::set_balance_factor):
(JSC::AVLTreeAbstractorForFreeList::null):
(JSC::AVLTreeAbstractorForFreeList::compare_key_key):
(JSC::AVLTreeAbstractorForFreeList::compare_key_node):
(JSC::AVLTreeAbstractorForFreeList::compare_node_node):
(JSC::reverseSortFreeListEntriesByPointer):
(JSC::reverseSortCommonSizedAllocations):
(JSC::FixedVMPoolAllocator::release):
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::addToFreeList):
(JSC::FixedVMPoolAllocator::coalesceFreeSpace):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::allocInternal):
(JSC::FixedVMPoolAllocator::isWithinVMPool):
(JSC::FixedVMPoolAllocator::addToCommittedByteCount):
(JSC::ExecutableAllocator::committedByteCount):
(JSC::maybeModifyVMPoolSize):
(JSC::ExecutableAllocator::isValid):
(JSC::ExecutableAllocator::underMemoryPressure):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* wtf/PageReservation.h:
(WTF::PageReservation::PageReservation):
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
2011-01-30 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Daniel Bates.
Code style issue in JavaScriptCore/wtf/CurrentTime.h
https://bugs.webkit.org/show_bug.cgi?id=53394
According to rule #3 at http://webkit.org/coding/coding-style.html,
This patch fix style issue in CurrentTime.h.
No functionality change, no new tests.
* wtf/CurrentTime.h:
(WTF::currentTimeMS):
(WTF::getLocalTime):
2011-01-30 Benjamin Poulain <ikipou@gmail.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] JavaScriptCore does not link on Mac if building WebKit 2
https://bugs.webkit.org/show_bug.cgi?id=53377
The option "-whole-archive" is not availabe with the libtool of Mac OS X,
instead, we can use "-all_load" on Mac.
* JavaScriptCore.pri:
2011-01-29 Geoffrey Garen <ggaren@apple.com>
Sorry Leopard bot -- I committed a change by accident.
* JavaScriptCore.exp: You may have your symbols back now.
2011-01-29 Geoffrey Garen <ggaren@apple.com>
Reviewed by Cameron Zwarich.
Simplified Heap iteration
https://bugs.webkit.org/show_bug.cgi?id=53393
* runtime/CollectorHeapIterator.h:
(JSC::CollectorHeapIterator::isValid):
(JSC::CollectorHeapIterator::isLive):
(JSC::CollectorHeapIterator::advance): Removed "max" argument to
advance because it's a constant.
(JSC::LiveObjectIterator::LiveObjectIterator):
(JSC::LiveObjectIterator::operator++):
(JSC::DeadObjectIterator::DeadObjectIterator):
(JSC::DeadObjectIterator::operator++):
(JSC::ObjectIterator::ObjectIterator):
(JSC::ObjectIterator::operator++): Factored out common checks into
two helper functions -- isValid() for "Am I past the end?" and isLive()
for "Is the cell I'm pointing to live?".
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::freeBlock):
(JSC::MarkedSpace::sweep): Always sweep from the beginning of the heap
to the end, to avoid making sweep subtly reliant on internal Heap state.
(JSC::MarkedSpace::primaryHeapBegin):
(JSC::MarkedSpace::primaryHeapEnd): Always be explicit about where
iteration begins.
2011-01-29 Geoffrey Garen <ggaren@apple.com>
Reviewed by Cameron Zwarich.
Simplified heap destruction
https://bugs.webkit.org/show_bug.cgi?id=53392
* JavaScriptCore.exp:
* runtime/Heap.cpp:
(JSC::Heap::destroy):
* runtime/Heap.h:
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::destroy):
* runtime/MarkedSpace.h: Don't go out of our way to destroy GC-protected
cells last -- the difficult contortions required to do so just don't seem
justified. We make no guarantees about GC protection after the client
throws away JSGlobalData, and it doesn't seem like any meaningful
guarantee is even possible.
2011-01-29 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
Switched heap to use the Bitmap class and removed CollectorBitmap
https://bugs.webkit.org/show_bug.cgi?id=53391
SunSpider says 1.005x as fast. Seems like a fluke.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate): Updated for rename and returning a value
rather than taking a value by reference.
* runtime/MarkedSpace.h: Code reuse is good.
* wtf/Bitmap.h:
(WTF::::testAndSet): Added, since this is the one thing Bitmap was missing
which CollectorBitmap had. (Renamed from the less conventional "getset".)
(WTF::::nextPossiblyUnset): Renamed and changed to return a value for
clarity. It's all the same with inlining.
2011-01-28 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
Some more Heap cleanup.
https://bugs.webkit.org/show_bug.cgi?id=53357
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated exported symbols.
* runtime/Heap.cpp:
(JSC::Heap::reportExtraMemoryCostSlowCase): Renamed recordExtraCost to
reportExtraMemoryCostSlowCase to match our naming conventions.
(JSC::Heap::capacity): Renamed size to capacity because this function
returns the capacity of the heap, including unused portions.
* runtime/Heap.h:
(JSC::Heap::globalData):
(JSC::Heap::markedSpace):
(JSC::Heap::machineStackMarker):
(JSC::Heap::reportExtraMemoryCost): Moved statics to the top of the file.
Moved ctor and dtor to the beginning of the class definition. Grouped
functions by purpose.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::capacity): Renamed size to capacity because this
function returns the capacity of the heap, including unused portions.
* runtime/MarkedSpace.h: Removed statistics and the Statistics class because
the same information can be gotten just by calling size() and capacity().
* runtime/MemoryStatistics.cpp:
* runtime/MemoryStatistics.h: Ditto.
2011-01-29 Daniel Bates <dbates@rim.com>
Reviewed by Eric Seidel.
Move wince/mt19937ar.c to ThirdParty and make it a policy choice
https://bugs.webkit.org/show_bug.cgi?id=53253
Make inclusion of MT19937 a policy decision.
Currently, we hardcoded to use MT19937 when building for
Windows CE. Instead, we should make this a policy decision
with the Windows CE port using this by default.
* JavaScriptCore.pri: Append Source/ThirdParty to the end
of the list include directories.
* wtf/CMakeLists.txt: Ditto.
* wtf/Platform.h: Defined WTF_USE_MERSENNE_TWISTER_19937 when
building for Windows CE.
* wtf/RandomNumber.cpp:
(WTF::randomNumber): Substituted USE(MERSENNE_TWISTER_19937) for OS(WINCE).
2011-01-29 Cameron Zwarich <zwarich@apple.com>
Reviewed by David Kilzer.
Bug 53374 - Remove uses of unsafe string functions in debugging code
https://bugs.webkit.org/show_bug.cgi?id=53374
* runtime/RegExp.cpp:
(JSC::RegExp::printTraceData):
2011-01-29 Cameron Zwarich <zwarich@apple.com>
Reviewed by Oliver Hunt.
JavaScriptCoreUseJIT environment variable broken
https://bugs.webkit.org/show_bug.cgi?id=53372
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData): Check the actual value in the string returned
by getenv() rather than just doing a NULL check on the return value.
2011-01-29 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Move CharacterNames.h into WTF directory
https://bugs.webkit.org/show_bug.cgi?id=49618
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/unicode/CharacterNames.h: Renamed from WebCore/platform/text/CharacterNames.h.
* wtf/unicode/UTF8.cpp:
2011-01-28 Simon Fraser <simon.fraser@apple.com>
Reviewed by Gavin Barraclough.
Add various clampToInt() methods to MathExtras.h
https://bugs.webkit.org/show_bug.cgi?id=52910
Add functions for clamping doubles and floats to valid int
ranges, for signed and positive integers.
* wtf/MathExtras.h:
(clampToInteger):
(clampToPositiveInteger):
2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r77006 and r77020.
http://trac.webkit.org/changeset/77006
http://trac.webkit.org/changeset/77020
https://bugs.webkit.org/show_bug.cgi?id=53360
"Broke Windows tests" (Requested by rniwa on #webkit).
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
(JSC::JSCallbackObject::setPrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::put):
(JSC::::staticFunctionGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeConstructor):
(JSObjectSetPrivateProperty):
* API/JSWeakObjectMapRefInternal.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::findScopedProperty):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::markChildren):
* debugger/DebuggerActivation.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::execute):
(JSC::Interpreter::tryCacheGetByID):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/Arguments.cpp:
(JSC::Arguments::markChildren):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
* runtime/Arguments.h:
(JSC::Arguments::setActivation):
(JSC::Arguments::Arguments):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/ConservativeSet.cpp:
(JSC::ConservativeSet::grow):
* runtime/ConservativeSet.h:
(JSC::ConservativeSet::~ConservativeSet):
(JSC::ConservativeSet::mark):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::markChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::getter):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setter):
(JSC::GetterSetter::setSetter):
* runtime/GlobalEvalFunction.cpp:
(JSC::GlobalEvalFunction::GlobalEvalFunction):
(JSC::GlobalEvalFunction::markChildren):
* runtime/GlobalEvalFunction.h:
(JSC::GlobalEvalFunction::cachedGlobalObject):
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::value):
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
(JSC::JSActivation::put):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
* runtime/JSArray.h:
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::JSValue::toThisObject):
(JSC::JSCell::MarkStack::append):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::regExpConstructor):
(JSC::JSGlobalObject::errorConstructor):
(JSC::JSGlobalObject::evalErrorConstructor):
(JSC::JSGlobalObject::rangeErrorConstructor):
(JSC::JSGlobalObject::referenceErrorConstructor):
(JSC::JSGlobalObject::syntaxErrorConstructor):
(JSC::JSGlobalObject::typeErrorConstructor):
(JSC::JSGlobalObject::URIErrorConstructor):
(JSC::JSGlobalObject::evalFunction):
(JSC::JSGlobalObject::objectPrototype):
(JSC::JSGlobalObject::functionPrototype):
(JSC::JSGlobalObject::arrayPrototype):
(JSC::JSGlobalObject::booleanPrototype):
(JSC::JSGlobalObject::stringPrototype):
(JSC::JSGlobalObject::numberPrototype):
(JSC::JSGlobalObject::datePrototype):
(JSC::JSGlobalObject::regExpPrototype):
(JSC::JSGlobalObject::methodCallDummy):
(JSC::Structure::prototypeForLookup):
(JSC::constructArray):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
(JSC::Stringifier::markAggregate):
(JSC::Stringifier::stringify):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::removeDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::getDirectOffset):
(JSC::JSObject::putDirectOffset):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::JSValue::putDirect):
(JSC::JSObject::allocatePropertyStorageInline):
(JSC::JSObject::markChildrenDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::JSPropertyNameIterator):
(JSC::JSPropertyNameIterator::get):
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/JSValue.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::markChildren):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::lookupPut):
* runtime/MarkStack.h:
(JSC::MarkStack::appendValues):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::constructNumber):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
(JSC::resolveBase):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setExistingProperty):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::base):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainIterator::operator*):
(JSC::ScopeChainIterator::operator->):
(JSC::ScopeChain::top):
* runtime/ScopeChainMark.h:
(JSC::ScopeChain::markAggregate):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
(JSC::SmallStrings::markChildren):
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::uncheckedGet):
(JSC::WeakGCMap::isValid):
(JSC::::get):
(JSC::::take):
(JSC::::set):
(JSC::::uncheckedRemove):
* runtime/WriteBarrier.h: Removed.
2011-01-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
https://bugs.webkit.org/show_bug.cgi?id=53352
Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
The FixedVMPoolAllocator currently uses a best fix policy -
switch to first fit, this is less prone to external fragmentation.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::AllocationTableSizeClass::AllocationTableSizeClass):
(JSC::AllocationTableSizeClass::blockSize):
(JSC::AllocationTableSizeClass::blockCount):
(JSC::AllocationTableSizeClass::blockAlignment):
(JSC::AllocationTableSizeClass::size):
(JSC::AllocationTableLeaf::AllocationTableLeaf):
(JSC::AllocationTableLeaf::~AllocationTableLeaf):
(JSC::AllocationTableLeaf::allocate):
(JSC::AllocationTableLeaf::free):
(JSC::AllocationTableLeaf::isEmpty):
(JSC::AllocationTableLeaf::isFull):
(JSC::AllocationTableLeaf::size):
(JSC::AllocationTableLeaf::classForSize):
(JSC::AllocationTableLeaf::dump):
(JSC::LazyAllocationTable::LazyAllocationTable):
(JSC::LazyAllocationTable::~LazyAllocationTable):
(JSC::LazyAllocationTable::allocate):
(JSC::LazyAllocationTable::free):
(JSC::LazyAllocationTable::isEmpty):
(JSC::LazyAllocationTable::isFull):
(JSC::LazyAllocationTable::size):
(JSC::LazyAllocationTable::dump):
(JSC::LazyAllocationTable::classForSize):
(JSC::AllocationTableDirectory::AllocationTableDirectory):
(JSC::AllocationTableDirectory::~AllocationTableDirectory):
(JSC::AllocationTableDirectory::allocate):
(JSC::AllocationTableDirectory::free):
(JSC::AllocationTableDirectory::isEmpty):
(JSC::AllocationTableDirectory::isFull):
(JSC::AllocationTableDirectory::size):
(JSC::AllocationTableDirectory::classForSize):
(JSC::AllocationTableDirectory::dump):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::allocated):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::classForSize):
(JSC::FixedVMPoolAllocator::offsetToPointer):
(JSC::FixedVMPoolAllocator::pointerToOffset):
(JSC::ExecutableAllocator::committedByteCount):
(JSC::ExecutableAllocator::isValid):
(JSC::ExecutableAllocator::underMemoryPressure):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* wtf/PageReservation.h:
(WTF::PageReservation::PageReservation):
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::committed):
2011-01-27 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Convert markstack to a slot visitor API
https://bugs.webkit.org/show_bug.cgi?id=53219
Move the MarkStack over to a slot based marking API.
In order to avoiding aliasing concerns there are two new types
that need to be used when holding on to JSValues and JSCell that
need to be marked: WriteBarrier and DeprecatedPtr. WriteBarrier
is expected to be used for any JSValue or Cell that's lifetime and
marking is controlled by another GC object. DeprecatedPtr is used
for any value that we need to rework ownership for.
The change over to this model has produced a large amount of
code changes, but they are mostly mechanical (forwarding JSGlobalData,
etc).
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
(JSC::JSCallbackObject::setPrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::put):
(JSC::::staticFunctionGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeConstructor):
(JSObjectSetPrivateProperty):
* API/JSWeakObjectMapRefInternal.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::findScopedProperty):
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::markChildren):
* debugger/DebuggerActivation.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::execute):
(JSC::Interpreter::privateExecute):
* interpreter/Register.h:
(JSC::Register::jsValueSlot):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
* runtime/Arguments.cpp:
(JSC::Arguments::markChildren):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
* runtime/Arguments.h:
(JSC::Arguments::setActivation):
(JSC::Arguments::Arguments):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/ConservativeSet.h:
(JSC::ConservativeSet::mark):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::markChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::getter):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setter):
(JSC::GetterSetter::setSetter):
* runtime/GlobalEvalFunction.cpp:
(JSC::GlobalEvalFunction::GlobalEvalFunction):
(JSC::GlobalEvalFunction::markChildren):
* runtime/GlobalEvalFunction.h:
(JSC::GlobalEvalFunction::cachedGlobalObject):
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::value):
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
* runtime/JSActivation.cpp:
(JSC::JSActivation::put):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
* runtime/JSArray.h:
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::MarkStack::append):
(JSC::JSCell::MarkStack::appendCell):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::regExpConstructor):
(JSC::JSGlobalObject::errorConstructor):
(JSC::JSGlobalObject::evalErrorConstructor):
(JSC::JSGlobalObject::rangeErrorConstructor):
(JSC::JSGlobalObject::referenceErrorConstructor):
(JSC::JSGlobalObject::syntaxErrorConstructor):
(JSC::JSGlobalObject::typeErrorConstructor):
(JSC::JSGlobalObject::URIErrorConstructor):
(JSC::JSGlobalObject::evalFunction):
(JSC::JSGlobalObject::objectPrototype):
(JSC::JSGlobalObject::functionPrototype):
(JSC::JSGlobalObject::arrayPrototype):
(JSC::JSGlobalObject::booleanPrototype):
(JSC::JSGlobalObject::stringPrototype):
(JSC::JSGlobalObject::numberPrototype):
(JSC::JSGlobalObject::datePrototype):
(JSC::JSGlobalObject::regExpPrototype):
(JSC::JSGlobalObject::methodCallDummy):
(JSC::constructArray):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
(JSC::Stringifier::Holder::objectSlot):
(JSC::Stringifier::markAggregate):
(JSC::Stringifier::stringify):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::removeDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::putDirectOffset):
(JSC::JSObject::putUndefinedAtDirectOffset):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::JSValue::putDirect):
(JSC::JSObject::allocatePropertyStorageInline):
(JSC::JSObject::markChildrenDirect):
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/JSValue.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::markChildren):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::lookupPut):
* runtime/MarkStack.h:
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::constructNumber):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
(JSC::resolveBase):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setExistingProperty):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::base):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainIterator::operator*):
(JSC::ScopeChainIterator::operator->):
(JSC::ScopeChain::top):
* runtime/ScopeChainMark.h:
(JSC::ScopeChain::markAggregate):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
(JSC::SmallStrings::markChildren):
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/Structure.cpp:
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::storedPrototypeSlot):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::uncheckedGet):
(JSC::WeakGCMap::uncheckedGetSlot):
(JSC::::get):
(JSC::::take):
(JSC::::set):
(JSC::::uncheckedRemove):
* runtime/WriteBarrier.h: Added.
(JSC::DeprecatedPtr::DeprecatedPtr):
(JSC::DeprecatedPtr::get):
(JSC::DeprecatedPtr::operator*):
(JSC::DeprecatedPtr::operator->):
(JSC::DeprecatedPtr::slot):
(JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
(JSC::DeprecatedPtr::operator!):
(JSC::WriteBarrierBase::set):
(JSC::WriteBarrierBase::get):
(JSC::WriteBarrierBase::operator*):
(JSC::WriteBarrierBase::operator->):
(JSC::WriteBarrierBase::slot):
(JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
(JSC::WriteBarrierBase::operator!):
(JSC::WriteBarrier::WriteBarrier):
(JSC::operator==):
2011-01-28 Adam Roben <aroben@apple.com>
Chromium build fix after r76967
* wtf/ThreadingPrimitives.h: Use OS(WINDOWS) instead of PLATFORM(WIN), to match other
similar macros in this file.
2011-01-28 Michael Saboff <msaboff@apple.com>
Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
https://bugs.webkit.org/show_bug.cgi?id=53271
Reapplying this this change. No change from prior patch in
JavaScriptCore.
Added new isValid() methods to check if a contained object in
a WeakGCMap is valid when using an unchecked iterator.
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::isValid):
2011-01-27 Adam Roben <aroben@apple.com>
Extract code to convert a WTF absolute time to a Win32 wait interval into a separate
function
Fixes <http://webkit.org/b/53208> <rdar://problem/8922490> BinarySemaphore should wrap a
Win32 event
Reviewed by Dave Hyatt.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new function.
* wtf/ThreadingPrimitives.h: Declare the new function.
* wtf/ThreadingWin.cpp:
(WTF::ThreadCondition::timedWait): Moved code to convert the absolute time to a wait
interval from here...
(WTF::absoluteTimeToWaitTimeoutInterval): ...to here.
2011-01-28 Sam Weinig <sam@webkit.org>
Reviewed by Maciej Stachowiak.
Add basic rubber banding support
<rdar://problem/8219429>
https://bugs.webkit.org/show_bug.cgi?id=53277
* wtf/Platform.h: Add ENABLE for rubber banding.
2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r76893.
http://trac.webkit.org/changeset/76893
https://bugs.webkit.org/show_bug.cgi?id=53287
It made some tests crash on GTK and Qt debug bots (Requested
by Ossy on #webkit).
* runtime/WeakGCMap.h:
2011-01-27 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add WTFString method to compare equality with Vector<UChar>
https://bugs.webkit.org/show_bug.cgi?id=53266
I'm planning to use this method in the new XSS filter implementation,
but it seems generally useful.
* wtf/text/StringImpl.h:
(WTF::equalIgnoringNullity):
* wtf/text/WTFString.h:
(WTF::equalIgnoringNullity):
2011-01-27 Michael Saboff <msaboff@apple.com>
Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
https://bugs.webkit.org/show_bug.cgi?id=53271
Added new isValid() methods to check if a contained object in
a WeakGCMap is valid when using an unchecked iterator.
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::isValid):
2011-01-26 Sam Weinig <sam@webkit.org>
Reviewed by Maciej Stachowiak.
Add events to represent the start/end of a gesture scroll
https://bugs.webkit.org/show_bug.cgi?id=53215
* wtf/Platform.h: Add ENABLE for gesture events.
2011-01-26 Yael Aharon <yael.aharon@nokia.com>
Reviewed by Laszlo Gombos.
[Qt][Symbian] Fix --minimal build
https://bugs.webkit.org/show_bug.cgi?id=52839
Move definition of USE_SYSTEM_MALLOC out of pri file.
Put it in platform.h instead.
* wtf/Platform.h:
* wtf/TCSystemAlloc.cpp:
* wtf/wtf.pri:
2011-01-26 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[WINCE] Add JIT support to build system
https://bugs.webkit.org/show_bug.cgi?id=53079
* CMakeListsWinCE.txt:
2011-01-25 Adam Roben <aroben@apple.com>
Windows Production build fix
Reviewed by Steve Falkenburg.
* JavaScriptCore.vcproj/JavaScriptCore.make: Set BUILDSTYLE to Release_PGO at the very start
of the file so that ConfigurationBuildDir takes that into account. Also set it the right way
(by redefining the macro) rather than the wrong way (by modifying the environment variable).
2011-01-25 Steve Falkenburg <sfalken@apple.com>
Rubber-stamped by Adam Roben.
Windows production build fix.
Use correct environment variable escaping
* JavaScriptCore.vcproj/JavaScriptCore.make:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2011-01-25 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
JSON.stringify processing time exponentially grows with size of object
https://bugs.webkit.org/show_bug.cgi?id=51922
Remove last use of reserveCapacity from JSON stringification, as it results
in appalling append behaviour when there are a large number of property names
and nothing else.
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendQuotedString):
2011-01-25 Antti Koivisto <antti@apple.com>
Not reviewed.
Try to fix windows build.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2011-01-25 Antti Koivisto <antti@apple.com>
Reviewed by Oliver Hunt.
REGRESSION: Leak in JSParser::Scope::copyCapturedVariablesToVector()
https://bugs.webkit.org/show_bug.cgi?id=53061
Cache did not know about the subclass so failed to fully delete the items.
Got rid of the subclass and moved the classes to separate files.
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* parser/JSParser.cpp:
(JSC::JSParser::Scope::saveFunctionInfo):
(JSC::JSParser::Scope::restoreFunctionInfo):
(JSC::JSParser::findCachedFunctionInfo):
(JSC::JSParser::parseFunctionInfo):
* parser/SourceProvider.h:
* parser/SourceProviderCache.cpp: Added.
(JSC::SourceProviderCache::~SourceProviderCache):
(JSC::SourceProviderCache::byteSize):
* parser/SourceProviderCache.h: Added.
(JSC::SourceProviderCache::SourceProviderCache):
(JSC::SourceProviderCache::add):
(JSC::SourceProviderCache::get):
* parser/SourceProviderCacheItem.h: Added.
(JSC::SourceProviderCacheItem::SourceProviderCacheItem):
(JSC::SourceProviderCacheItem::approximateByteSize):
(JSC::SourceProviderCacheItem::closeBraceToken):
2011-01-25 Marcilio Mendonca <mamendonca@rim.com>
Reviewed by Darin Adler.
Bug 53087: Refactoring: replaced a hanging "else" with a "return"
statement
https://bugs.webkit.org/show_bug.cgi?id=53087.
Refactoring work: Replaced a hanging "else" within an #if PLATFORM(M
with a "return" so that the code is more readable and less error pro
(e.g., "else" doesn't use braces so adding extra lines to the else
block won't have any effect; even worse, code still compiles
successfully.
* wtf/Assertions.cpp:
2011-01-24 Chris Marrin <cmarrin@apple.com>
Reviewed by Eric Seidel.
Change ENABLE_3D_CANVAS to ENABLE_WEBGL
https://bugs.webkit.org/show_bug.cgi?id=53041
* Configurations/FeatureDefines.xcconfig:
2011-01-25 Adam Roben <aroben@apple.com>
Windows Production build fix
* JavaScriptCore.vcproj/JavaScriptCore.make: Added a missing "set".
2011-01-25 Patrick Gansterer <paroga@webkit.org>
Reviewed by Eric Seidel.
Add missing defines for COMPILER(RVCT) && CPU(ARM_THUMB2)
https://bugs.webkit.org/show_bug.cgi?id=52949
* jit/JITStubs.cpp:
2011-01-24 Adam Roben <aroben@apple.com>
Windows Production build fix
* JavaScriptCore.vcproj/JavaScriptCore.make: Update for move of JavaScriptCore into Source.
2011-01-24 Peter Varga <pvarga@webkit.org>
Reviewed by Oliver Hunt.
Optimize regex patterns which contain empty alternatives
https://bugs.webkit.org/show_bug.cgi?id=51395
Eliminate the empty alternatives from the regex pattern and convert it to do
the matching in an easier way.
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
2011-01-24 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt] Move project files into Source
https://bugs.webkit.org/show_bug.cgi?id=52891
* JavaScriptCore.pri:
* JavaScriptCore.pro:
* jsc.pro:
2011-01-23 Mark Rowe <mrowe@apple.com>
Follow-up to r76477.
Fix the scripts that detect problematic code such as static initializers
and destructors, weak vtables, inappropriate files in the framework wrappers,
and public headers including private headers. These had all been broken
since the projects were moved in to the Source directory as the paths to the
scripts were not updated at that time.
* JavaScriptCore.xcodeproj/project.pbxproj:
2011-01-23 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Use WTF::StringHasher in WebCore
https://bugs.webkit.org/show_bug.cgi?id=52934
Add an additional function to calculate the hash
of data with a runtimedependent size.
* wtf/StringHasher.h:
(WTF::StringHasher::createBlobHash):
2011-01-23 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Fix comment in String::ascii()
https://bugs.webkit.org/show_bug.cgi?id=52980
* wtf/text/WTFString.cpp:
(WTF::String::ascii):
2011-01-23 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Add String::containsOnlyLatin1()
https://bugs.webkit.org/show_bug.cgi?id=52979
* wtf/text/WTFString.h:
(WTF::String::containsOnlyLatin1):
(WTF::charactersAreAllLatin1):
2011-01-23 Patrick Gansterer <paroga@webkit.org>
Reviewed by Oliver Hunt.
Remove obsolete JSVALUE32 code
https://bugs.webkit.org/show_bug.cgi?id=52948
r70111 removed support for JSVALUE32.
ARM, MIPS and X86 support JSVALUE32_64 only.
* jit/JITStubs.cpp:
2011-01-22 Geoffrey Garen <ggaren@apple.com>
Reviewed by Dan Bernstein.
ASSERT running run-webkit-tests --threaded.
https://bugs.webkit.org/show_bug.cgi?id=52971
SunSpider and v8 report no change.
* runtime/ConservativeSet.cpp:
(JSC::ConservativeSet::grow):
(JSC::ConservativeSet::add):
* runtime/ConservativeSet.h: Tweaked the inline capacity to 128, and
the growth policy to 2X, to make SunSpider and v8 happy.
(JSC::ConservativeSet::ConservativeSet):
(JSC::ConservativeSet::~ConservativeSet):
(JSC::ConservativeSet::mark): Use OSAllocator directly, instead of malloc.
Malloc is forbidden during a multi-threaded mark phase because it can
cause deadlock.
2011-01-22 Geoffrey Garen <ggaren@apple.com>
Reviewed by Geoffrey Garen.
Rubber-stamped by Maciej Stachowiak.
A few of Maciej's review suggestions for my last patch.
https://bugs.webkit.org/show_bug.cgi?id=52946
SunSpider reports no change.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems.
* runtime/ConservativeSet.cpp: Added.
(JSC::isPointerAligned):
(JSC::ConservativeSet::add):
* runtime/ConservativeSet.h: Added.
(JSC::ConservativeSet::ConservativeSet):
(JSC::ConservativeSet::mark): Split ConservativeSet out into its own
file, and moved the conservative check into ConservativeSet::add, making
ConservativeSet's responsibility clearer.
* runtime/Heap.cpp:
(JSC::Heap::markRoots):
* runtime/MachineStackMarker.cpp:
(JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
(JSC::MachineStackMarker::markOtherThreadConservatively):
* runtime/MachineStackMarker.h:
* runtime/MarkStack.h: Updated for changes above.
2011-01-22 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix for r76430.
* runtime/MachineStackMarker.cpp:
(JSC::swapIfBackwards):
2011-01-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Beth Dakin.
Reorganized MarkedSpace, making many of its functions private.
* runtime/JSCell.h:
(JSC::JSCell::Heap::heap):
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::globalData):
(JSC::MarkedSpace::heap):
2011-01-21 Geoffrey Garen <ggaren@apple.com>
Try to fix build: moved helper function out of #ifdef.
* runtime/MachineStackMarker.cpp:
(JSC::swapIfBackwards):
2011-01-21 Geoffrey Garen <ggaren@apple.com>
Rubber-stamped by Maciej Stachowiak.
A few of Maciej's review suggestions for my last patch.
https://bugs.webkit.org/show_bug.cgi?id=52946
SunSpider reports no change.
* runtime/MachineStackMarker.cpp:
(JSC::swapIfBackwards): Added a helper function for handling platforms
where the stack can grow in any direction.
(JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
(JSC::MachineStackMarker::markOtherThreadConservatively): Use the helper
function.
(JSC::isPointerAligned): Use "!" instead of "==0" because a robot told me to.
(JSC::MachineStackMarker::markConservatively): Changed to use a more
standard looping idiom, and to use the helper function above.
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::isCellAligned): Use "!" instead of "==0" because a robot told me to.
2011-01-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
Cleaned up some conservative marking code.
https://bugs.webkit.org/show_bug.cgi?id=52946
SunSpider reports no change.
* interpreter/RegisterFile.h: No need for a special marking function,
since we already expose a start() and end().
* runtime/Heap.cpp:
(JSC::Heap::registerFile):
(JSC::Heap::markRoots):
* runtime/Heap.h:
(JSC::Heap::contains): Migrated markConservatively() to the machine stack
marker class. Now, Heap just provides a contains() function, which the
machine stack marker uses for checking whether a pointer points into the heap.
* runtime/MachineStackMarker.cpp:
(JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
(JSC::MachineStackMarker::markOtherThreadConservatively):
(JSC::isPointerAligned):
(JSC::MachineStackMarker::markConservatively):
* runtime/MachineStackMarker.h: Move the conservative marking code here.
* runtime/MarkStack.h:
(JSC::ConservativeSet::add):
(JSC::ConservativeSet::mark): Changed to using a vector instead of hash
set. Vector seems to be a bit faster, and it generates smaller code.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::containsSlowCase):
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::isCellAligned):
(JSC::MarkedSpace::isPossibleCell):
(JSC::MarkedSpace::contains): Kept the code for determining whether a
pointer pointed into marked space, and moved the code for marking
a set of conservative pointers into the machine stack marker.
* wtf/HashSet.h:
(WTF::::add): Added two missing inlines that I noticed while testing
vector vs hash set.
2011-01-21 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
Work around a Clang bug <rdar://problem/8876150> that leads to it incorrectly emitting an access
control warning when a client tries to use operator bool exposed above via "using PageBlock::operator bool".
* wtf/PageAllocation.h:
(WTF::PageAllocation::operator bool):
* wtf/PageReservation.h:
(WTF::PageReservation::operator bool):
2011-01-21 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
[RegexFuzz] Hang with forward assertion
https://bugs.webkit.org/show_bug.cgi?id=52825
<rdar://problem/8894332>
The backtrackTo label from the first term in a list of terms is
being overwritten by processing of subsequent terms. Changed
copyBacktrackToLabel() to check for an existing bcaktrackTo label
before copying and renamed it to propagateBacktrackToLabel() since
it no longer copies.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::BacktrackDestination::propagateBacktrackToLabel):
(JSC::Yarr::YarrGenerator::generateParenthesesSingle):
2011-01-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Moved the mark stack from global data to the heap, since it pertains
to the heap, and not the virtual machine as a whole.
https://bugs.webkit.org/show_bug.cgi?id=52930
SunSpider reports no change.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::markRoots):
* runtime/Heap.h:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
2011-01-21 Peter Gal <galpeter@inf.u-szeged.hu>
Reviewed by Darin Adler.
REGRESSION(r76177): All JavaScriptCore tests fail on ARM
https://bugs.webkit.org/show_bug.cgi?id=52814
Get the approximateByteSize value before releasing the OwnPtr.
* parser/JSParser.cpp:
(JSC::JSParser::parseFunctionInfo):
2011-01-21 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
Remove unnecessary <stdio.h> include
https://bugs.webkit.org/show_bug.cgi?id=52884
* jit/JIT.cpp: remove unnecessary include.
2011-01-20 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Maciej Stachowiak.
Added OwnPtrCommon.h because OwnArrayPtr::set calls deleteOwnedPtr.
* wtf/OwnArrayPtr.h:
2011-01-20 Patrick Gansterer <paroga@webkit.org>
Reviewed by Oliver Hunt.
[WINCE] Remove obsolete JSVALUE32 code
https://bugs.webkit.org/show_bug.cgi?id=52450
Remove the "offset hack" in create_jit_stubs, since we
only support JSVALUE32_64 in the meantime.
* create_jit_stubs: Removed offset argument
* jit/JITStubs.cpp:
2011-01-20 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
When marking conservatively, guard against reviving dead objects.
https://bugs.webkit.org/show_bug.cgi?id=52840
SunSpider and v8 say no change.
* interpreter/RegisterFile.h:
(JSC::RegisterFile::markCallFrames): Updated to use the ConservativeSet API.
* runtime/Heap.cpp:
(JSC::Heap::recordExtraCost): No need to guard against conservative
marking reviving dead objects anymore, since the conservative marking
mechanism guards against this now.
(JSC::Heap::markConservatively):
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors): Don't drain the mark stack inside a
marking function. We want to establish a separation of concerns between
visiting roots and draining the mark stack.
(JSC::Heap::markRoots): Gather the set of conservative references before
clearning mark bits, because conservative marking now uses the mark bits
to determine if a reference is valid, and avoid reviving dead objects.
(JSC::Heap::collectAllGarbage): No need to guard against conservative
marking reviving dead objects anymore, since the conservative marking
mechanism guards against this now.
* runtime/Heap.h: Updated to use the ConservativeSet API.
* runtime/MachineStackMarker.cpp:
(JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
(JSC::MachineStackMarker::markCurrentThreadConservatively):
(JSC::MachineStackMarker::markOtherThreadConservatively):
(JSC::MachineStackMarker::markMachineStackConservatively):
* runtime/MachineStackMarker.h: Ditto.
* runtime/MarkStack.h:
(JSC::ConservativeSet::add):
(JSC::ConservativeSet::mark): Added ConservativeSet, for gathering the
set of conservative references. This is different from MarkStack, since
we don't mark the set until it is completely gathered.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::freeBlock):
(JSC::MarkedSpace::resizeBlocks):
(JSC::MarkedSpace::markConservatively):
* runtime/MarkedSpace.h: When marking conservatively, guard against
reviving dead objects.
2011-01-20 Siddharth Mathur <siddharth.mathur@nokia.com>
Reviewed by Geoffrey Garen.
[Symbian] Fix StackBounds::initialize()
https://bugs.webkit.org/show_bug.cgi?id=52842
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize): Use TThreadStackInfo.iLimit for stack limit
2011-01-20 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
<rdar://problem/8890203> [RegexFuzz] Crash in generated code (52773)
https://bugs.webkit.org/show_bug.cgi?id=52773
Fixed case where an existing DataLabelPtr is overwritten. The
replacing DataLabelPtr is now resolved immediately in
linkDataLabelToBacktrackIfExists(). Cleanup - eliminated bool
return value for the routine as it was never used.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
2011-01-20 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt][WK2] WebKit2 enabled build fails to link
Work around undefined reference linking issues until the buildsystem gets redesigned.
These issues first occured in minimal builds (see BUG 50519).
* JavaScriptCore.pri: link as whole-archive for WebKit2 builds
2011-01-20 Zoltan Horvath <zoltan@webkit.org>
Reviewed by Csaba Osztrogonác.
Refactoring of the custom allocation framework
https://bugs.webkit.org/show_bug.cgi?id=49897
Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
equivalent macro implementation at the necessary places.
* wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro.
2011-01-20 Mark Rowe <mrowe@apple.com>
Reviewed by Maciej Stachowiak.
Follow-up to r75766 / <rdar://problem/5469576>.
We were failing to initialize the key, causing all sorts of unexpected behavior.
* wtf/FastMalloc.cpp:
(WTF::setThreadHeap):
(WTF::TCMalloc_ThreadCache::GetThreadHeap):
(WTF::TCMalloc_ThreadCache::InitTSD): Ensure that the key is initialized.
2011-01-18 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
Rolled back in r76078, with crash fixed.
https://bugs.webkit.org/show_bug.cgi?id=52668
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::markChildren): Account for the fact that the global
object moves its variables into and out of the register file. While out
of the register file, the symbol table's size is not an accurate count
for the size of the register array, since the BytecodeGenerator might
be compiling, adding items to the symbol table.
2011-01-18 Darin Adler <darin@apple.com>
Reviewed by Geoffrey Garen.
Stack overflow when converting an Error object to string
https://bugs.webkit.org/show_bug.cgi?id=46410
* Android.mk: Added StringRecursionChecker.cpp and
StringRecursionChecker.h.
* CMakeLists.txt: Ditto.
* GNUmakefile.am: Ditto.
* JavaScriptCore.gypi: Ditto.
* JavaScriptCore.pro: Ditto.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString): Use StringRecursionChecker instead
of the older hand-written code to do the same thing.
(JSC::arrayProtoFuncToLocaleString): Ditto.
(JSC::arrayProtoFuncJoin): Ditto.
* runtime/ErrorPrototype.cpp:
(JSC::errorProtoFuncToString): Use StringRecursionChecker.
* runtime/JSGlobalData.h: Renamed arrayVisitedElements to
stringRecursionCheckVisitedObjects.
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncToString): Use StringRecursionChecker.
* runtime/StringRecursionChecker.cpp: Added.
* runtime/StringRecursionChecker.h: Added.
2011-01-19 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove non-spec support for callable RegExp
https://bugs.webkit.org/show_bug.cgi?id=28285
Remove support for callable regexps. If it breaks sites we can
just roll this out.
* runtime/RegExpObject.cpp:
* runtime/RegExpObject.h:
* tests/mozilla/expected.html: update results.
2011-01-19 Antti Koivisto <antti@apple.com>
Reviewed by Oliver Hunt.
Cache function offsets to speed up javascript parsing
https://bugs.webkit.org/show_bug.cgi?id=52622
Use cache to save function offsets and some other info.
This avoids quite a bit of work when reparsing the source.
* parser/ASTBuilder.h:
* parser/JSParser.cpp:
(JSC::JSParser::CachedFunctionInfo::CachedFunctionInfo):
(JSC::JSParser::CachedFunctionInfo::approximateByteSize):
(JSC::JSParser::CachedFunctionInfo::closeBraceToken):
(JSC::JSParser::Scope::copyCapturedVariablesToVector):
(JSC::JSParser::Scope::saveFunctionInfo):
(JSC::JSParser::Scope::restoreFunctionInfo):
(JSC::JSParser::findCachedFunctionInfo):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseFunctionInfo):
* parser/Lexer.h:
(JSC::Lexer::setOffset):
(JSC::Lexer::setLineNumber):
(JSC::Lexer::sourceProvider):
* parser/SourceProvider.h:
(JSC::SourceProviderCache::SourceProviderCache):
(JSC::SourceProviderCache::~SourceProviderCache):
(JSC::SourceProviderCache::byteSize):
(JSC::SourceProviderCache::add):
(JSC::SourceProviderCache::get):
(JSC::SourceProvider::SourceProvider):
(JSC::SourceProvider::~SourceProvider):
(JSC::SourceProvider::cache):
(JSC::SourceProvider::notifyCacheSizeChanged):
(JSC::SourceProvider::cacheSizeChanged):
* parser/SyntaxChecker.h:
2011-01-19 Mark Rowe <mrowe@apple.com>
Reviewed by Darin Adler.
Follow-up to r75766 / <rdar://problem/5469576>.
* DerivedSources.make: Evaluate the SDKROOT variable correctly.
2011-01-19 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[jsfunfuzz] Defining a function called __proto__ inside an eval triggers an assertion
https://bugs.webkit.org/show_bug.cgi?id=52672
Rather than coming up with a somewhat convoluted mechanism to ensure that
developers can override the global objects prototype with a function named
__proto__ and expect it to work, we just disallow it at the syntax level.
* parser/JSParser.cpp:
(JSC::JSParser::parseFunctionInfo):
2011-01-19 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
<rdar://problem/8882994> Regression: Simple nested backtrack hangs
https://bugs.webkit.org/show_bug.cgi?id=52675
The changeset (r76076) for https://bugs.webkit.org/show_bug.cgi?id=52540
broke simple backtracking in some cases. Reworked that change to
link both jumps and labels.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::BacktrackDestination::hasBacktrackToLabel):
(JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
(JSC::Yarr::YarrGenerator::generateParenthesesSingle):
2011-01-19 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: [JSC] scripts have incorrect starting line (always 1).
https://bugs.webkit.org/show_bug.cgi?id=52721
* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions):
* debugger/Debugger.h:
* parser/Parser.h:
(JSC::Parser::parse):
* parser/SourceCode.h:
(JSC::SourceCode::SourceCode):
* parser/SourceProvider.h:
(JSC::SourceProvider::startPosition):
2011-01-19 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Laszlo Gombos and Tor Arne Vestbø.
[Qt] Remove unnecessary "../Source" from paths
after moving source files into Source is finished.
* JavaScriptCore.pri:
2011-01-19 Benjamin Kalman <kalman@chromium.org>
Reviewed by Darin Adler.
Don't return void from void function String::split
https://bugs.webkit.org/show_bug.cgi?id=52684
* wtf/text/WTFString.cpp:
(WTF::String::split):
2011-01-18 Kenneth Russell <kbr@google.com>
Unreviewed, rolling out r76078.
http://trac.webkit.org/changeset/76078
https://bugs.webkit.org/show_bug.cgi?id=52668
Caused crashes of fast/canvas/webgl/constants.html,
fast/canvas/webgl/gl-enum-tests.html, and possibly other layout
test crashes in Release mode. WebGL crashes were observed with
"run-webkit-tests fast/canvas/webgl". It was necessary to run
multiple tests to provoke the crash.
* interpreter/RegisterFile.h:
(JSC::RegisterFile::markGlobals):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::markChildren):
2011-01-18 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[jsfunfuzz] Assertion asking activation for arguments when arguments is overridden
https://bugs.webkit.org/show_bug.cgi?id=52690
Clean up code to retrieve arguments from activation and function objects.
Remove the incorrect assertion from JSActivation's argumentsGetter.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::retrieveArguments):
* runtime/JSActivation.cpp:
(JSC::JSActivation::argumentsGetter):
2011-01-18 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
Removed RegisterFile::markGlobals because it was obtuse, and it
unnecessarily relied on conservative marking.
https://bugs.webkit.org/show_bug.cgi?id=52668
* interpreter/RegisterFile.h: Removed markGlobals.
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren): Added a comment explaning why some
JSActivations don't always mark their registers arrays.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::markChildren): Instead of calling markGlobals, mark
the registers array directly.
2011-01-18 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
<rdar://problem/8875432> Regression: Some text-only e-mails cause hang beneath RegExp::match (52540)
https://bugs.webkit.org/show_bug.cgi?id=52540
https://bugs.webkit.org/show_bug.cgi?id=52662
Directly use backtrack label with parentheses nested under a
non-capturing parentheses. Also linked current parentheses
tail code object for possible parens nested within a non-capturing
parentheses.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkBacktrackToLabel):
(JSC::Yarr::YarrGenerator::generateParenthesesSingle):
2011-01-18 Daniel Bates <dbates@rim.com>
Reviewed by Gavin Barraclough.
Only use moving memory model assumption in ExecutableAllocator::intializePageSize() for Symbian OS
https://bugs.webkit.org/show_bug.cgi?id=52517
Patch by David Tapuska
Currently, we compile code with respect to the Symbian-specific moving memory model
assumption for all ARMv5 or lower architectures. Instead, we should only compile
such code when building for Symbian OS on those architectures because this model
is Symbian-specific.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::intializePageSize):
2011-01-18 Dimitry Andric <dim@freebsd.org>
Reviewed by Andreas Kling.
Fix linking JavaScriptCore on FreeBSD/amd64
https://bugs.webkit.org/show_bug.cgi?id=52591
Linking of JavaScriptCore on FreeBSD/amd64 fails, for the same reason as
in bug 28422: cti_vm_throw needs a "@plt" suffix, otherwise the linker
complains about the relocation type.
* jit/JITStubs.cpp: use @plt suffix on x86_64 platforms, for both Linux
and FreeBSD.
2011-01-18 Oliver Hunt <oliver@apple.com>
Reviewed by Antti Koivisto.
[jsfunfuzz] Assertion in codegen for array of NaN constants
https://bugs.webkit.org/show_bug.cgi?id=52643
Don't cache NaN literals in the code generator, as NaN doesn't compare
as equal to itself it causes problems when rehashing the number cache.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitLoad):
2011-01-17 Jarred Nicholls <jarred@sencha.com>
Reviewed by Csaba Osztrogonác.
REGRESSION(r75709): Return value of fscanf() shouldn't be ignored.
https://bugs.webkit.org/show_bug.cgi?id=52585
gcc 4.4.4+ has warn_unused_value attribute on fscanf, so we should check
the return value to get around the gcc warning
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::maybeModifyVMPoolSize):
2011-01-17 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
[regexfuzz] Crash running regex with lookahead
https://bugs.webkit.org/show_bug.cgi?id=52548
Eliminated agressive chaining of backtracks. This code was overwriting
already valid backtrack information.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
2011-01-17 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Alexey Proskuryakov.
Fix some headers with missing or misspelled #ifndef guards
https://bugs.webkit.org/show_bug.cgi?id=52545
* wtf/RefPtrHashMap.h:
2011-01-17 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Mark Rowe.
Update xcodeproj svn:ignore to include xcuserdata.
* JavaScriptCore.xcodeproj: Modified property svn:ignore.
2011-01-16 Adam Barth <abarth@webkit.org>
Rubber-stamped by Eric Seidel.
Move WebKit into Source
https://bugs.webkit.org/show_bug.cgi?id=52530
* JavaScriptCore.gyp/JavaScriptCore.gyp:
2011-01-16 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
[jsfunfuzz] Parser doesn't correctly validate for-loop syntax
https://bugs.webkit.org/show_bug.cgi?id=52516
Ensure that we always check for a semicolon after encountering
multiple declarations in the initialiser portion of a for-loop.
* parser/JSParser.cpp:
(JSC::JSParser::parseForStatement):
2011-01-16 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Strict mode restrictions on arguments and eval usage aren't complete
https://bugs.webkit.org/show_bug.cgi?id=52528
Fix a few bugs in strict mode where we incorrect allow mutation of
arguments and eval in the parser.
Alas the "optimisation" used by the syntax checker for validating
binary and unary expressions was too aggressive: we do actually need
a stack for operations and operands although it needn't be as complete
as that used for the full AST builder.
Also disallow assignment to arguments in all cases as allowing arguments
to be assignable is always an error in strict mode, regardless of context.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::BinaryExprContext::BinaryExprContext):
(JSC::ASTBuilder::UnaryExprContext::UnaryExprContext):
* parser/JSParser.cpp:
(JSC::JSParser::parseAssignmentExpression):
(JSC::JSParser::parseBinaryExpression):
(JSC::JSParser::parseUnaryExpression):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::BinaryExprContext::BinaryExprContext):
(JSC::SyntaxChecker::BinaryExprContext::~BinaryExprContext):
(JSC::SyntaxChecker::UnaryExprContext::UnaryExprContext):
(JSC::SyntaxChecker::UnaryExprContext::~UnaryExprContext):
(JSC::SyntaxChecker::appendBinaryExpressionInfo):
(JSC::SyntaxChecker::operatorStackPop):
2011-01-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Rolled back in r75886.
https://bugs.webkit.org/show_bug.cgi?id=52527
r75886 broke the GTK Linux bot because Linux was -- quite surprisingly --
set up to use the constants for embedded devices.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::maybeModifyVMPoolSize): Separated Linux constants from embedded
constants.
2011-01-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r75886.
http://trac.webkit.org/changeset/75886
https://bugs.webkit.org/show_bug.cgi?id=52526
"Broke GTK+ 64bit" (Requested by xan_ on #webkit).
* jit/ExecutableAllocatorFixedVMPool.cpp:
2011-01-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8870429> Shrink the executable pool on embedded devices
* jit/ExecutableAllocatorFixedVMPool.cpp: Dropped the pool size from 32MB
to 16MB.
2011-01-15 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Incorrect behavior changing attributes of an accessor
https://bugs.webkit.org/show_bug.cgi?id=52515
defineProperty doesn't correctly handle changing attributes of an accessor
property. This is because we don't pass the full descriptor to the
putDescriptor helper function, which means we have insufficient information
to do the right thing. Once that's passed the correct behavior is relatively
simple to implement.
* runtime/JSObject.cpp:
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
2011-01-14 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
[jsfunfuzz] Incorrect handling of consecutive duplicate labels
https://bugs.webkit.org/show_bug.cgi?id=52505
Compare StringImpl*'s instead of Identifier*'s when looking for duplicate
labels.
* parser/JSParser.cpp:
(JSC::JSParser::parseExpressionOrLabelStatement):
2011-01-14 Simon Fraser <simon.fraser@apple.com>
No review.
Initialize m_operationInProgress after r75855.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
2011-01-14 Geoffrey Garen <ggaren@apple.com>
Reverted accidentally committed code from my last checkin.
* runtime/Heap.cpp:
(JSC::Heap::markRoots):
2011-01-14 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Try to fix the GTK bot.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::markRoots): Kids, remember to initialize your data members.
Knowing is half the battle.
2011-01-14 Oliver Hunt <oliver@apple.com>
Reviewed by Stephanie Lewis.
[jsfunfuzz] We should be clearing the lexers temporary character buffers when switching to strict mode
https://bugs.webkit.org/show_bug.cgi?id=52501
Clear the temporary character buffers used for reading escaped characters and
numbers.
* parser/Lexer.h:
(JSC::Lexer::setOffset):
2011-01-14 Geoffrey Garen <ggaren@apple.com>
Try to fix non-Dtrace builds: #include Tracing.h instead of TracingDtrace.h.
* runtime/Heap.cpp:
2011-01-13 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Split out a MarkedSpace strategy object from Heap.
https://bugs.webkit.org/show_bug.cgi?id=52421
SunSpider reports no change.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj: Updated our 7 build systems. Which is cool.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::destroy):
(JSC::Heap::recordExtraCost):
(JSC::Heap::allocate):
(JSC::Heap::markConservatively):
(JSC::Heap::markRoots):
(JSC::Heap::objectCount):
(JSC::Heap::statistics):
(JSC::Heap::size):
(JSC::Heap::isBusy):
(JSC::Heap::collectAllGarbage):
(JSC::Heap::primaryHeapBegin):
(JSC::Heap::primaryHeapEnd):
* runtime/Heap.h:
(JSC::Heap::globalData):
(JSC::Heap::markedSpace):
(JSC::Heap::isCellMarked):
(JSC::Heap::checkMarkCell):
(JSC::Heap::markCell): Moved all code pertaining to managing chunks of
collector memory out of this class. Heap now just delegates to MarkedSpace.
* runtime/JSCell.h:
(JSC::JSCell::Heap::heap): Updated for MarkedSpace delegation.
* runtime/JSValue.h: Moved the ValueStringPair typedef to help with #includes.
* runtime/MarkedSpace.cpp: Copied from runtime/Heap.cpp.
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::destroy):
(JSC::MarkedSpace::allocateBlock):
(JSC::MarkedSpace::freeBlock):
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::resizeBlocks):
(JSC::MarkedSpace::growBlocks):
(JSC::MarkedSpace::shrinkBlocks):
(JSC::MarkedSpace::markConservatively):
(JSC::MarkedSpace::clearMarkBits):
(JSC::MarkedSpace::markedCells):
(JSC::MarkedSpace::sweep):
(JSC::MarkedSpace::objectCount):
(JSC::MarkedSpace::addToStatistics):
(JSC::MarkedSpace::statistics):
(JSC::MarkedSpace::size):
(JSC::MarkedSpace::reset):
(JSC::MarkedSpace::primaryHeapBegin):
(JSC::MarkedSpace::primaryHeapEnd):
* runtime/MarkedSpace.h: Copied from runtime/Heap.h.
(JSC::MarkedSpace::globalData):
(JSC::MarkedSpace::didShrink):
(JSC::MarkedSpace::cellBlock):
(JSC::MarkedSpace::cellOffset):
(JSC::MarkedSpace::isCellMarked):
(JSC::MarkedSpace::checkMarkCell):
(JSC::MarkedSpace::markCell): Moved all code pertaining to managing chunks of
collector memory into this class.
* runtime/MemoryStatistics.cpp:
(JSC::heapStatistics):
* runtime/MemoryStatistics.h: Updated for MarkedSpace delegation.
2011-01-14 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[jsfunfuzz] parser doesn't enforce continue restrictions correctly.
https://bugs.webkit.org/show_bug.cgi?id=52493
This patch reworks handling of break, continue and label statements
to correctly handle all the valid and invalid cases. Previously certain
errors would be missed by the parser in strict mode, but the bytecode
generator needed to handle those cases for non-strict code so nothing
failed, it simply became non-standard behaviour.
Now that we treat break and continue errors as early faults in non-strict
mode as well that safety net has been removed so the parser bugs result in
crashes at codegen time.
* parser/JSParser.cpp:
(JSC::JSParser::ScopeLabelInfo::ScopeLabelInfo):
(JSC::JSParser::next):
(JSC::JSParser::nextTokenIsColon):
(JSC::JSParser::continueIsValid):
Continue is only valid in loops so we can't use breakIsValid()
(JSC::JSParser::pushLabel):
We now track whether the label is for a loop (and is therefore a
valid target for continue.
(JSC::JSParser::popLabel):
(JSC::JSParser::getLabel):
Replace hasLabel with getLabel so that we can validate the target
when parsing continue statements.
(JSC::JSParser::Scope::continueIsValid):
(JSC::JSParser::Scope::pushLabel):
(JSC::JSParser::Scope::getLabel):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseBreakStatement):
(JSC::JSParser::parseContinueStatement):
(JSC::LabelInfo::LabelInfo):
(JSC::JSParser::parseExpressionOrLabelStatement):
Consecutive labels now get handled iteratively so that we can determine
whether they're valid targets for continue.
* parser/Lexer.cpp:
(JSC::Lexer::nextTokenIsColon):
* parser/Lexer.h:
(JSC::Lexer::setOffset):
2011-01-14 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Roben.
Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
https://bugs.webkit.org/show_bug.cgi?id=45186
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::scheduleScavenger): Added missing this pointer to CreateTimerQueueTimer().
2011-01-14 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Roben.
Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
https://bugs.webkit.org/show_bug.cgi?id=45186
r75819 accidentally changed the initial state of the scavenge timer.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger): Changed initial state of m_scavengingSuspended to true.
2011-01-14 Patrick Gansterer <paroga@webkit.org>
Unreviewed Windows Release build fix.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::scavengerTimerFired):
2011-01-14 Patrick Gansterer <paroga@webkit.org>
Unreviewed Windows Release build fix.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::scavengerTimerFired):
2011-01-14 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Roben.
Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
https://bugs.webkit.org/show_bug.cgi?id=45186
Use CreateTimerQueueTimer() to start periodicScavenge() and stop it with DeleteTimerQueueTimer().
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger):
(WTF::TCMalloc_PageHeap::isScavengerSuspended):
(WTF::TCMalloc_PageHeap::scheduleScavenger):
(WTF::TCMalloc_PageHeap::rescheduleScavenger):
(WTF::TCMalloc_PageHeap::suspendScavenger):
(WTF::scavengerTimerFired):
(WTF::TCMalloc_PageHeap::periodicScavenge):
(WTF::TCMalloc_PageHeap::signalScavenger):
2011-01-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Align import/export directives
https://bugs.webkit.org/show_bug.cgi?id=52208
* API/JSBase.h: Align import/export directives with
WebKit2/Shared/API/c/WKBase.h
2011-01-14 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
Incorrect backtracking for nested alternatives
https://bugs.webkit.org/show_bug.cgi?id=52387
In the process of propigating a datalabel it wasn't getting connected
to a destination when the destination was an indirect jump. Added
code to recognize a direct backtrack destination that was an indirect
jump and added mechanism to associate DataLabelPtrs with indirect
jump entries.
Removed dead method
BacktrackDestination::linkDataLabelToHereIfExists()
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
(JSC::Yarr::YarrGenerator::IndirectJumpEntry::addDataLabel):
(JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
(JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
Changes to link indirect jumps with DataLabelPtr's.
(JSC::Yarr::YarrGenerator::BacktrackDestination::clearSubDataLabelPtr):
(JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
Updated to handle immediate linking of indirect jumps to
DataLabelPtr.
(JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): Changed to
reflect updated linkDataLabelToBacktrackIfExists().
2011-01-14 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: provide script column offset to frontend.
https://bugs.webkit.org/show_bug.cgi?id=52377
* parser/SourceCode.h:
(JSC::SourceCode::SourceCode):
(JSC::SourceCode::firstColumn):
2011-01-13 Darin Adler <darin@apple.com>
Reviewed by Geoff Garen.
<rdar://problem/5469576> Use __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 if available.
* DerivedSources.make: Create a header file, HeaderDetection.h, that tells
us whether pthread_machdep.h is available.
* wtf/FastMalloc.cpp: If __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 is available, then
don't do the pthread_getspecific_function_pointer trick.
(WTF::setThreadHeap): Ditto, but set thread-specific data.
(WTF::TCMalloc_ThreadCache::GetThreadHeap): Ditto, but get rather than set.
2011-01-13 Xan Lopez <xlopez@igalia.com>
Reviewed by Gavin Barraclough.
JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
https://bugs.webkit.org/show_bug.cgi?id=42756
The FixedVMPool Allocator does not work well on systems where
allocating very large amounts of memory upfront is not reasonable,
like Linux without overcommit enabled. As a workaround, on Linux,
default to the values used in embedded environments (in the MB
range), and only jump to the GB range if we detect at runtime that
overcommit is enabled. Should fix crashes on Linux/x86_64 with
less than 3 or 4GB of RAM.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::free): use new variables for VM pool
size and coalesce limit.
(JSC::ExecutableAllocator::isValid): swap the variables from
embedded to generic values at runtime, on linux, if overcommit is
enabled.
(JSC::ExecutableAllocator::underMemoryPressure): use new variables
for VM pool size and coalesce limit.
2011-01-12 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
Add new Yarr.h header to the list file.
* GNUmakefile.am: ditto.
2011-01-12 Martin Robinson <mrobinson@igalia.com>
Missing Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h in WebKitGtk tarball
https://bugs.webkit.org/show_bug.cgi?id=52299
* GNUmakefile.am: Fix the GTK+ build on ARMv7 by including missing source
files in the source list.
2011-01-12 Peter Varga <pvarga@webkit.org>
Reviewed by Gavin Barraclough.
Add Yarr.h to YARR
https://bugs.webkit.org/show_bug.cgi?id=51021
Move other common constants and functions from YARR's different files
to Yarr.h.
Use Yarr.h header instead of including other YARR headers where it
is possible.
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
* yarr/Yarr.h: Added.
* yarr/YarrInterpreter.cpp:
* yarr/YarrInterpreter.h:
* yarr/YarrJIT.cpp:
(JSC::Yarr::jitCompile):
(JSC::Yarr::execute):
* yarr/YarrJIT.h:
* yarr/YarrParser.h:
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPattern::compile):
(JSC::Yarr::YarrPattern::YarrPattern):
* yarr/YarrPattern.h:
2011-01-12 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r75595.
http://trac.webkit.org/changeset/75595
https://bugs.webkit.org/show_bug.cgi?id=52286
It broke fast/regex/pcre-test-1.html (Requested by Ossy on
#webkit).
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
* yarr/Yarr.h: Removed.
* yarr/YarrInterpreter.cpp:
* yarr/YarrInterpreter.h:
* yarr/YarrJIT.cpp:
(JSC::Yarr::jitCompile):
* yarr/YarrJIT.h:
(JSC::Yarr::execute):
* yarr/YarrParser.h:
* yarr/YarrPattern.cpp:
(JSC::Yarr::compile):
(JSC::Yarr::YarrPattern::YarrPattern):
* yarr/YarrPattern.h:
2011-01-12 Peter Varga <pvarga@webkit.org>
Reviewed by Gavin Barraclough.
Add Yarr.h to YARR
https://bugs.webkit.org/show_bug.cgi?id=51021
Move other common constants and functions from YARR's different files
to Yarr.h.
Use Yarr.h header instead of including other YARR headers where it
is possible.
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
* yarr/Yarr.h: Added.
* yarr/YarrInterpreter.cpp:
* yarr/YarrInterpreter.h:
* yarr/YarrJIT.cpp:
(JSC::Yarr::jitCompile):
(JSC::Yarr::execute):
* yarr/YarrJIT.h:
* yarr/YarrParser.h:
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPattern::compile):
(JSC::Yarr::YarrPattern::YarrPattern):
* yarr/YarrPattern.h:
2011-01-11 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Missing call to popTempSortVector() for exception case in JSArray::sort.
https://bugs.webkit.org/show_bug.cgi?id=50718
Fix to patch of 50718 that added pushTempSortVector() and
popTempSortVector() to JSArray::sort() to mark elements during sort.
Need to add popTempSortVector() for the return case if toString()
had an exception.
* runtime/JSArray.cpp:
(JSC::JSArray::sort): Added popTempSortVector()
2011-01-11 Xan Lopez <xlopez@igalia.com>
Reviewed by Darin Adler.
Microoptimization in ~JSString
https://bugs.webkit.org/show_bug.cgi?id=52222
The case where m_fibers is 0 seems to be the most common one
(almost 1/2 of the time, followed at some distance by m_fibers = 1
in 1/4 of the cases in a typical SunSpider execution). We can save
one comparison in this common case by doing a bit of refactoring
in the JSString destructor; overall a 0.3% progression, but only
the string tests show improvement.
* runtime/JSString.h:
(JSC::RopeBuilder::~JSString):
2011-01-10 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
ASSERTION Failure in JSC::binaryChop
https://bugs.webkit.org/show_bug.cgi?id=25614
Changed JITStubs::cti_register_file_check() to use the current stack's
return PC to find the bytecode for handling the exception in the prior
frame. Also added the appropriate arrity check routine call to the
JIT to bytecode vector (m_callReturnIndexVector) in the CodeBlock.
* jit/JIT.cpp:
(JSC::JIT::privateCompile): Changed the arrity check call location
so that it gets added to the m_calls list so that it's included in
CodeBlock::m_callReturnIndexVector.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): Use the current call frame's return PC.
2011-01-10 Daniel Bates <dbates@rim.com>
Reviewed by Martin Robinson.
Remove extraneous COMPILER(GCC) condition when checking GCC_VERSION_AT_LEAST()
https://bugs.webkit.org/show_bug.cgi?id=52178
It is sufficient to test GCC_VERSION_AT_LEAST() instead of both COMPILER(GCC) and
GCC_VERSION_AT_LEAST(). Notice GCC_VERSION_AT_LEAST() is defined to be 0 when we
are not compiling with GCC.
Fixes style issues at the callsites (i.e. replace comma with comma-space in
macro function argument list). Also, makes a spelling correction in a comment.
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::cacheFlush):
* wtf/Platform.h:
2011-01-10 Geoffrey Garen <ggaren@apple.com>
Build fix: removed some uses of nextNumber that I missed last time.
* runtime/Heap.cpp:
(JSC::Heap::reset):
(JSC::Heap::collectAllGarbage):
2011-01-10 Daniel Bates <dbates@rim.com>
Reviewed by Darin Adler.
Use __builtin_expect when compiling using RVCT in GNU mode
https://bugs.webkit.org/show_bug.cgi?id=51866
We should only use __builtin_expect if we are compiling with GCC or RVCT 3 or higher in GNU mode
as pointed out by Siddharth Mathur per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0202h/Cjabddedbde.html>.
* wtf/AlwaysInline.h:
* wtf/Platform.h: Removed define WTF_COMPILER_RVCT4_OR_GREATER. Instead added macro
function RVCT_VERSION_AT_LEAST so that we can test for an arbitrary minimum RVCT
version.
2011-01-10 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Moved Collector.* => Heap.*, since the file contains a class named "Heap".
* API/JSCallbackObject.cpp:
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* interpreter/Interpreter.cpp:
* interpreter/RegisterFile.h:
* jit/JITStubs.cpp:
* runtime/Collector.cpp: Removed.
* runtime/Collector.h: Removed.
* runtime/CollectorHeapIterator.h:
* runtime/GCActivityCallbackCF.cpp:
* runtime/Heap.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
* runtime/Heap.h: Copied from JavaScriptCore/runtime/Collector.h.
* runtime/InitializeThreading.cpp:
* runtime/JSCell.h:
* runtime/JSGlobalData.cpp:
* runtime/JSGlobalData.h:
* runtime/JSLock.cpp:
* runtime/JSNumberCell.h:
* runtime/MachineStackMarker.cpp:
* runtime/MemoryStatistics.h:
* runtime/Protect.h:
* runtime/UString.cpp:
* runtime/WeakGCMap.h:
* runtime/WeakGCPtr.h:
2011-01-10 Xan Lopez <xlopez@igalia.com>
Reviewed by Gavin Barraclough.
Remove unused isString() case in JSString::toPrimitiveString()
https://bugs.webkit.org/show_bug.cgi?id=52167
We never call toPrimitiveString() with strings, so remove the
check and add an ASSERT ensuring this never happens. 0.7% overall
progression in sunspider, since one of the call sites is very hot.
* runtime/JSString.h:
(JSC::JSValue::toPrimitiveString):
2011-01-10 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Rename the existing YARR files and classes
https://bugs.webkit.org/show_bug.cgi?id=51872
Replace the "Regex" prefix with "Yarr" in the name of YARR files and classes.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
(JSC::RegExp::match):
(JSC::RegExp::printTraceData):
* yarr/YarrInterpreter.cpp: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.cpp.
(JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::popParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext):
(JSC::Yarr::Interpreter::DisjunctionContext::operator new):
(JSC::Yarr::Interpreter::allocDisjunctionContext):
(JSC::Yarr::Interpreter::freeDisjunctionContext):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext):
(JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::InputStream::InputStream):
(JSC::Yarr::Interpreter::InputStream::next):
(JSC::Yarr::Interpreter::InputStream::rewind):
(JSC::Yarr::Interpreter::InputStream::read):
(JSC::Yarr::Interpreter::InputStream::readPair):
(JSC::Yarr::Interpreter::InputStream::readChecked):
(JSC::Yarr::Interpreter::InputStream::reread):
(JSC::Yarr::Interpreter::InputStream::prev):
(JSC::Yarr::Interpreter::InputStream::getPos):
(JSC::Yarr::Interpreter::InputStream::setPos):
(JSC::Yarr::Interpreter::InputStream::atStart):
(JSC::Yarr::Interpreter::InputStream::atEnd):
(JSC::Yarr::Interpreter::InputStream::checkInput):
(JSC::Yarr::Interpreter::InputStream::uncheckInput):
(JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
(JSC::Yarr::Interpreter::testCharacterClass):
(JSC::Yarr::Interpreter::checkCharacter):
(JSC::Yarr::Interpreter::checkCasedCharacter):
(JSC::Yarr::Interpreter::checkCharacterClass):
(JSC::Yarr::Interpreter::tryConsumeBackReference):
(JSC::Yarr::Interpreter::matchAssertionBOL):
(JSC::Yarr::Interpreter::matchAssertionEOL):
(JSC::Yarr::Interpreter::matchAssertionWordBoundary):
(JSC::Yarr::Interpreter::backtrackPatternCharacter):
(JSC::Yarr::Interpreter::backtrackPatternCasedCharacter):
(JSC::Yarr::Interpreter::matchCharacterClass):
(JSC::Yarr::Interpreter::backtrackCharacterClass):
(JSC::Yarr::Interpreter::matchBackReference):
(JSC::Yarr::Interpreter::backtrackBackReference):
(JSC::Yarr::Interpreter::recordParenthesesMatch):
(JSC::Yarr::Interpreter::resetMatches):
(JSC::Yarr::Interpreter::parenthesesDoBacktrack):
(JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
(JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
(JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
(JSC::Yarr::Interpreter::matchParentheticalAssertionBegin):
(JSC::Yarr::Interpreter::matchParentheticalAssertionEnd):
(JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin):
(JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd):
(JSC::Yarr::Interpreter::matchParentheses):
(JSC::Yarr::Interpreter::backtrackParentheses):
(JSC::Yarr::Interpreter::lookupForBeginChars):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::Interpreter::matchNonZeroDisjunction):
(JSC::Yarr::Interpreter::interpret):
(JSC::Yarr::Interpreter::Interpreter):
(JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry):
(JSC::Yarr::ByteCompiler::ByteCompiler):
(JSC::Yarr::ByteCompiler::compile):
(JSC::Yarr::ByteCompiler::checkInput):
(JSC::Yarr::ByteCompiler::assertionBOL):
(JSC::Yarr::ByteCompiler::assertionEOL):
(JSC::Yarr::ByteCompiler::assertionWordBoundary):
(JSC::Yarr::ByteCompiler::atomPatternCharacter):
(JSC::Yarr::ByteCompiler::atomCharacterClass):
(JSC::Yarr::ByteCompiler::atomBackReference):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
(JSC::Yarr::ByteCompiler::popParenthesesStack):
(JSC::Yarr::ByteCompiler::dumpDisjunction):
(JSC::Yarr::ByteCompiler::closeAlternative):
(JSC::Yarr::ByteCompiler::closeBodyAlternative):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
(JSC::Yarr::ByteCompiler::regexBegin):
(JSC::Yarr::ByteCompiler::regexEnd):
(JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
(JSC::Yarr::ByteCompiler::alternativeDisjunction):
(JSC::Yarr::ByteCompiler::emitDisjunction):
(JSC::Yarr::byteCompile):
(JSC::Yarr::interpret):
* yarr/YarrInterpreter.h: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.h.
(JSC::Yarr::ByteTerm::ByteTerm):
(JSC::Yarr::ByteTerm::BOL):
(JSC::Yarr::ByteTerm::CheckInput):
(JSC::Yarr::ByteTerm::EOL):
(JSC::Yarr::ByteTerm::WordBoundary):
(JSC::Yarr::ByteTerm::BackReference):
(JSC::Yarr::ByteTerm::BodyAlternativeBegin):
(JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
(JSC::Yarr::ByteTerm::BodyAlternativeEnd):
(JSC::Yarr::ByteTerm::AlternativeBegin):
(JSC::Yarr::ByteTerm::AlternativeDisjunction):
(JSC::Yarr::ByteTerm::AlternativeEnd):
(JSC::Yarr::ByteTerm::SubpatternBegin):
(JSC::Yarr::ByteTerm::SubpatternEnd):
(JSC::Yarr::ByteTerm::invert):
(JSC::Yarr::ByteTerm::capture):
(JSC::Yarr::ByteDisjunction::ByteDisjunction):
(JSC::Yarr::BytecodePattern::BytecodePattern):
(JSC::Yarr::BytecodePattern::~BytecodePattern):
* yarr/YarrJIT.cpp: Renamed from Source/JavaScriptCore/yarr/RegexJIT.cpp.
(JSC::Yarr::YarrGenerator::optimizeAlternative):
(JSC::Yarr::YarrGenerator::matchCharacterClassRange):
(JSC::Yarr::YarrGenerator::matchCharacterClass):
(JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
(JSC::Yarr::YarrGenerator::jumpIfAvailableInput):
(JSC::Yarr::YarrGenerator::checkInput):
(JSC::Yarr::YarrGenerator::atEndOfInput):
(JSC::Yarr::YarrGenerator::notAtEndOfInput):
(JSC::Yarr::YarrGenerator::jumpIfCharEquals):
(JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
(JSC::Yarr::YarrGenerator::readCharacter):
(JSC::Yarr::YarrGenerator::storeToFrame):
(JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
(JSC::Yarr::YarrGenerator::loadFromFrame):
(JSC::Yarr::YarrGenerator::loadFromFrameAndJump):
(JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
(JSC::Yarr::YarrGenerator::IndirectJumpEntry::addJump):
(JSC::Yarr::YarrGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord):
(JSC::Yarr::YarrGenerator::GenerationState::GenerationState):
(JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
(JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
(JSC::Yarr::YarrGenerator::GenerationState::incrementParenNestingLevel):
(JSC::Yarr::YarrGenerator::GenerationState::decrementParenNestingLevel):
(JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
(JSC::Yarr::YarrGenerator::GenerationState::emitParenthesesTail):
(JSC::Yarr::YarrGenerator::GenerationState::addJumpToNextInteration):
(JSC::Yarr::YarrGenerator::GenerationState::addJumpsToNextInteration):
(JSC::Yarr::YarrGenerator::GenerationState::addDataLabelToNextIteration):
(JSC::Yarr::YarrGenerator::GenerationState::linkToNextIteration):
(JSC::Yarr::YarrGenerator::BacktrackDestination::BacktrackDestination):
(JSC::Yarr::YarrGenerator::BacktrackDestination::clear):
(JSC::Yarr::YarrGenerator::BacktrackDestination::clearDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::hasDestination):
(JSC::Yarr::YarrGenerator::BacktrackDestination::isStackOffset):
(JSC::Yarr::YarrGenerator::BacktrackDestination::isLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::isJumpList):
(JSC::Yarr::YarrGenerator::BacktrackDestination::hasDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::copyTarget):
(JSC::Yarr::YarrGenerator::BacktrackDestination::copyTo):
(JSC::Yarr::YarrGenerator::BacktrackDestination::addBacktrackJump):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setStackOffset):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setNextBacktrackLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::copyBacktrackToLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackToLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackJumpList):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackSourceLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setSubDataLabelPtr):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkToNextBacktrack):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getStackOffset):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getBacktrackJumps):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::jumpToBacktrack):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
(JSC::Yarr::YarrGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracks):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
(JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
(JSC::Yarr::YarrGenerator::TermGenerationState::resetAlternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::alternativeValid):
(JSC::Yarr::YarrGenerator::TermGenerationState::nextAlternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::alternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::isLastAlternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::resetTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::termValid):
(JSC::Yarr::YarrGenerator::TermGenerationState::nextTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::term):
(JSC::Yarr::YarrGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::getSubParenNum):
(JSC::Yarr::YarrGenerator::TermGenerationState::isMainDisjunction):
(JSC::Yarr::YarrGenerator::TermGenerationState::setParenthesesTail):
(JSC::Yarr::YarrGenerator::TermGenerationState::getParenthesesTail):
(JSC::Yarr::YarrGenerator::TermGenerationState::lookaheadTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::inputOffset):
(JSC::Yarr::YarrGenerator::TermGenerationState::clearBacktrack):
(JSC::Yarr::YarrGenerator::TermGenerationState::jumpToBacktrack):
(JSC::Yarr::YarrGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
(JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
(JSC::Yarr::YarrGenerator::TermGenerationState::addBacktrackJump):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackDataLabel):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBackTrackStackOffset):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLabel):
(JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracks):
(JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracksTo):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLink):
(JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktracks):
(JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktrackJumps):
(JSC::Yarr::YarrGenerator::TermGenerationState::getBacktrackDestination):
(JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
(JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
(JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
(JSC::Yarr::YarrGenerator::ParenthesesTail::setNextIteration):
(JSC::Yarr::YarrGenerator::ParenthesesTail::addAfterParenJump):
(JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::YarrGenerator::generateAssertionBOL):
(JSC::Yarr::YarrGenerator::generateAssertionEOL):
(JSC::Yarr::YarrGenerator::matchAssertionWordchar):
(JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
(JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
(JSC::Yarr::YarrGenerator::generatePatternCharacterPair):
(JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
(JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
(JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
(JSC::Yarr::YarrGenerator::generateCharacterClassSingle):
(JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
(JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
(JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
(JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
(JSC::Yarr::YarrGenerator::generateParenthesesSingle):
(JSC::Yarr::YarrGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::YarrGenerator::generateParentheticalAssertion):
(JSC::Yarr::YarrGenerator::generateTerm):
(JSC::Yarr::YarrGenerator::generateDisjunction):
(JSC::Yarr::YarrGenerator::generateEnter):
(JSC::Yarr::YarrGenerator::generateReturn):
(JSC::Yarr::YarrGenerator::YarrGenerator):
(JSC::Yarr::YarrGenerator::generate):
(JSC::Yarr::YarrGenerator::compile):
(JSC::Yarr::jitCompile):
* yarr/YarrJIT.h: Renamed from Source/JavaScriptCore/yarr/RegexJIT.h.
(JSC::Yarr::YarrCodeBlock::YarrCodeBlock):
(JSC::Yarr::YarrCodeBlock::~YarrCodeBlock):
(JSC::Yarr::YarrCodeBlock::setFallBack):
(JSC::Yarr::YarrCodeBlock::isFallBack):
(JSC::Yarr::YarrCodeBlock::set):
(JSC::Yarr::YarrCodeBlock::execute):
(JSC::Yarr::YarrCodeBlock::getAddr):
(JSC::Yarr::execute):
* yarr/YarrParser.h: Renamed from Source/JavaScriptCore/yarr/RegexParser.h.
(JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
(JSC::Yarr::Parser::CharacterClassParserDelegate::begin):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
(JSC::Yarr::Parser::CharacterClassParserDelegate::end):
(JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
(JSC::Yarr::Parser::Parser):
(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::parseAtomEscape):
(JSC::Yarr::Parser::parseCharacterClassEscape):
(JSC::Yarr::Parser::parseCharacterClass):
(JSC::Yarr::Parser::parseParenthesesBegin):
(JSC::Yarr::Parser::parseParenthesesEnd):
(JSC::Yarr::Parser::parseQuantifier):
(JSC::Yarr::Parser::parseTokens):
(JSC::Yarr::Parser::parse):
(JSC::Yarr::Parser::saveState):
(JSC::Yarr::Parser::restoreState):
(JSC::Yarr::Parser::atEndOfPattern):
(JSC::Yarr::Parser::peek):
(JSC::Yarr::Parser::peekIsDigit):
(JSC::Yarr::Parser::peekDigit):
(JSC::Yarr::Parser::consume):
(JSC::Yarr::Parser::consumeDigit):
(JSC::Yarr::Parser::consumeNumber):
(JSC::Yarr::Parser::consumeOctal):
(JSC::Yarr::Parser::tryConsume):
(JSC::Yarr::Parser::tryConsumeHex):
(JSC::Yarr::parse):
* yarr/YarrPattern.cpp: Renamed from Source/JavaScriptCore/yarr/RegexPattern.cpp.
(JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor):
(JSC::Yarr::CharacterClassConstructor::reset):
(JSC::Yarr::CharacterClassConstructor::append):
(JSC::Yarr::CharacterClassConstructor::putChar):
(JSC::Yarr::CharacterClassConstructor::isUnicodeUpper):
(JSC::Yarr::CharacterClassConstructor::isUnicodeLower):
(JSC::Yarr::CharacterClassConstructor::putRange):
(JSC::Yarr::CharacterClassConstructor::charClass):
(JSC::Yarr::CharacterClassConstructor::addSorted):
(JSC::Yarr::CharacterClassConstructor::addSortedRange):
(JSC::Yarr::BeginCharHelper::BeginCharHelper):
(JSC::Yarr::BeginCharHelper::addBeginChar):
(JSC::Yarr::BeginCharHelper::merge):
(JSC::Yarr::BeginCharHelper::addCharacter):
(JSC::Yarr::BeginCharHelper::linkHotTerms):
(JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
(JSC::Yarr::YarrPatternConstructor::~YarrPatternConstructor):
(JSC::Yarr::YarrPatternConstructor::reset):
(JSC::Yarr::YarrPatternConstructor::assertionBOL):
(JSC::Yarr::YarrPatternConstructor::assertionEOL):
(JSC::Yarr::YarrPatternConstructor::assertionWordBoundary):
(JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
(JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassBegin):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassAtom):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassRange):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd):
(JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin):
(JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin):
(JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
(JSC::Yarr::YarrPatternConstructor::atomBackReference):
(JSC::Yarr::YarrPatternConstructor::copyDisjunction):
(JSC::Yarr::YarrPatternConstructor::copyTerm):
(JSC::Yarr::YarrPatternConstructor::quantifyAtom):
(JSC::Yarr::YarrPatternConstructor::disjunction):
(JSC::Yarr::YarrPatternConstructor::regexBegin):
(JSC::Yarr::YarrPatternConstructor::regexEnd):
(JSC::Yarr::YarrPatternConstructor::regexError):
(JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
(JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
(JSC::Yarr::YarrPatternConstructor::setupOffsets):
(JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
(JSC::Yarr::YarrPatternConstructor::optimizeBOL):
(JSC::Yarr::YarrPatternConstructor::addBeginTerm):
(JSC::Yarr::YarrPatternConstructor::setupDisjunctionBeginTerms):
(JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
(JSC::Yarr::YarrPatternConstructor::setupBeginChars):
(JSC::Yarr::compile):
(JSC::Yarr::YarrPattern::YarrPattern):
* yarr/YarrPattern.h: Renamed from Source/JavaScriptCore/yarr/RegexPattern.h.
(JSC::Yarr::CharacterRange::CharacterRange):
(JSC::Yarr::CharacterClassTable::create):
(JSC::Yarr::CharacterClassTable::CharacterClassTable):
(JSC::Yarr::CharacterClass::CharacterClass):
(JSC::Yarr::PatternTerm::PatternTerm):
(JSC::Yarr::PatternTerm::ForwardReference):
(JSC::Yarr::PatternTerm::BOL):
(JSC::Yarr::PatternTerm::EOL):
(JSC::Yarr::PatternTerm::WordBoundary):
(JSC::Yarr::PatternTerm::invert):
(JSC::Yarr::PatternTerm::capture):
(JSC::Yarr::PatternTerm::quantify):
(JSC::Yarr::PatternAlternative::PatternAlternative):
(JSC::Yarr::PatternAlternative::lastTerm):
(JSC::Yarr::PatternAlternative::removeLastTerm):
(JSC::Yarr::PatternAlternative::setOnceThrough):
(JSC::Yarr::PatternAlternative::onceThrough):
(JSC::Yarr::PatternDisjunction::PatternDisjunction):
(JSC::Yarr::PatternDisjunction::~PatternDisjunction):
(JSC::Yarr::PatternDisjunction::addNewAlternative):
(JSC::Yarr::TermChain::TermChain):
(JSC::Yarr::BeginChar::BeginChar):
(JSC::Yarr::YarrPattern::~YarrPattern):
(JSC::Yarr::YarrPattern::reset):
(JSC::Yarr::YarrPattern::containsIllegalBackReference):
(JSC::Yarr::YarrPattern::newlineCharacterClass):
(JSC::Yarr::YarrPattern::digitsCharacterClass):
(JSC::Yarr::YarrPattern::spacesCharacterClass):
(JSC::Yarr::YarrPattern::wordcharCharacterClass):
(JSC::Yarr::YarrPattern::nondigitsCharacterClass):
(JSC::Yarr::YarrPattern::nonspacesCharacterClass):
(JSC::Yarr::YarrPattern::nonwordcharCharacterClass):
2011-01-10 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* parser/SyntaxChecker.h:
2011-01-10 Dave Tapuska <dtapuska@rim.com>
Reviewed by Gavin Barraclough.
Add CTI ASM versions for RVCT ARM THUMB2 mode.
https://bugs.webkit.org/show_bug.cgi?id=52154
* jit/JITStubs.cpp:
(JSC::ctiTrampoline):
(JSC::ctiVMThrowTrampoline):
(JSC::ctiOpThrowNotCaught):
2011-01-10 Gavin Barraclough <barraclough@apple.com>
Qt build fix.
* JavaScriptCore.pro:
2011-01-10 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 52079 - Syntax errors should be early errors.
From chapter 16 the spec:
An implementation must report most errors at the time the relevant ECMAScript language construct is
evaluated. An early error is an error that can be detected and reported prior to the evaluation of
any construct in the Program containing the error. An implementation must report early errors in a
Program prior to the first evaluation of that Program. Early errors in eval code are reported at
the time eval is called but prior to evaluation of any construct within the eval code. All errors
that are not early errors are runtime errors.
An implementation must treat any instance of the following kinds of errors as an early error:
* Any syntax error."
* JavaScriptCore.xcodeproj/project.pbxproj:
Added new files.
* bytecode/CodeBlock.cpp:
Removed op_throw_syntax_error.
* bytecode/Opcode.h:
Removed op_throw_syntax_error.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
If m_expressionTooDeep then throw a runtime error.
(JSC::BytecodeGenerator::BytecodeGenerator):
Initialize m_expressionTooDeep.
(JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
Sets m_expressionTooDeep.
* bytecompiler/BytecodeGenerator.h:
Added m_expressionTooDeep, removed emitThrowSyntaxError.
* bytecompiler/NodesCodegen.cpp:
(JSC::RegExpNode::emitBytecode):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::LabelNode::emitBytecode):
Conditions that threw syntax error are now handled during parsing;
during bytecompilation these are now just ASSERTs.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
* jit/JITOpcodes32_64.cpp:
* jit/JITStubs.cpp:
* jit/JITStubs.h:
Removed op_throw_syntax_error.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createRegExp):
Renamed; added syntax check.
* parser/JSParser.cpp:
(JSC::JSParser::breakIsValid):
(JSC::JSParser::hasLabel):
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::setIsFunction):
(JSC::JSParser::Scope::isFunctionBoundary):
(JSC::JSParser::ScopeRef::hasContainingScope):
(JSC::JSParser::ScopeRef::containingScope):
(JSC::JSParser::AutoPopScopeRef::AutoPopScopeRef):
(JSC::JSParser::AutoPopScopeRef::~AutoPopScopeRef):
(JSC::JSParser::AutoPopScopeRef::setPopped):
(JSC::JSParser::popScopeInternal):
(JSC::JSParser::popScope):
(JSC::jsParse):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseBreakStatement):
(JSC::JSParser::parseContinueStatement):
(JSC::JSParser::parseReturnStatement):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseExpressionOrLabelStatement):
(JSC::JSParser::parsePrimaryExpression):
* parser/JSParser.h:
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createRegExp):
Renamed; added syntax check.
* runtime/ExceptionHelpers.cpp:
(JSC::createOutOfMemoryError):
(JSC::throwOutOfMemoryError):
* runtime/ExceptionHelpers.h:
Broke out createOutOfMemoryError.
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
Add check for exception after bytecode generation.
* runtime/RegExpConstructor.cpp:
(JSC::constructRegExp):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncCompile):
RegExp error prefixes not included in error string.
* yarr/RegexParser.h:
(JSC::Yarr::Parser::parse):
Removed regexBegin/regexEnd/regexError.
* yarr/RegexPattern.cpp:
(JSC::Yarr::RegexPatternConstructor::regexBegin):
Removed regexEnd/regexError.
(JSC::Yarr::compileRegex):
Add call to regexBegin (no longer called from the parser).
* yarr/YarrSyntaxChecker.cpp: Added.
(JSC::Yarr::SyntaxChecker::assertionBOL):
(JSC::Yarr::SyntaxChecker::assertionEOL):
(JSC::Yarr::SyntaxChecker::assertionWordBoundary):
(JSC::Yarr::SyntaxChecker::atomPatternCharacter):
(JSC::Yarr::SyntaxChecker::atomBuiltInCharacterClass):
(JSC::Yarr::SyntaxChecker::atomCharacterClassBegin):
(JSC::Yarr::SyntaxChecker::atomCharacterClassAtom):
(JSC::Yarr::SyntaxChecker::atomCharacterClassRange):
(JSC::Yarr::SyntaxChecker::atomCharacterClassBuiltIn):
(JSC::Yarr::SyntaxChecker::atomCharacterClassEnd):
(JSC::Yarr::SyntaxChecker::atomParenthesesSubpatternBegin):
(JSC::Yarr::SyntaxChecker::atomParentheticalAssertionBegin):
(JSC::Yarr::SyntaxChecker::atomParenthesesEnd):
(JSC::Yarr::SyntaxChecker::atomBackReference):
(JSC::Yarr::SyntaxChecker::quantifyAtom):
(JSC::Yarr::SyntaxChecker::disjunction):
(JSC::Yarr::checkSyntax):
* yarr/YarrSyntaxChecker.h: Added.
Check RegExp syntax.
2011-01-10 Adam Roben <aroben@apple.com>
Roll out r75289
It was causing assertion failures. See <http://webkit.org/b/52156>.
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2011-01-08 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Unify string table adding in AtomicString
https://bugs.webkit.org/show_bug.cgi?id=51927
Move code for adding a string into a separate function.
This removes multiple occurrence of the same logic.
* wtf/text/AtomicString.cpp:
(WTF::addToStringTable): Added.
(WTF::AtomicString::add): Use addToStringTable().
(WTF::AtomicString::fromUTF8): Ditto.
2011-01-07 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough.
Split machine stack marking functions into their own class (MachineStackMarker)
https://bugs.webkit.org/show_bug.cgi?id=52088
* API/APIShims.h:
(JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Moved registerThread()
call behind an #ifdef because we shouldn't be registering threads at all
if we don't support usage on multiple threads.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj: Updated projects.
* runtime/Collector.cpp:
(JSC::Heap::Heap):
(JSC::Heap::destroy):
(JSC::Heap::markRoots):
* runtime/Collector.h:
(JSC::Heap::machineStackMarker): Moved code to machineStackMarker.
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::makeUsableFromMultipleThreads): Removed an unnecessary
level of indirection, to make Heap less of a God class.
* runtime/MachineStackMarker.h: Copied from Source/JavaScriptCore/runtime/Collector.h.
* runtime/MachineStackMarker.cpp: Copied from Source/JavaScriptCore/runtime/Collector.cpp.
(JSC::MachineStackMarker::MachineStackMarker):
(JSC::MachineStackMarker::~MachineStackMarker):
(JSC::MachineStackMarker::makeUsableFromMultipleThreads):
(JSC::MachineStackMarker::registerThread):
(JSC::MachineStackMarker::unregisterThread):
(JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
(JSC::MachineStackMarker::markCurrentThreadConservatively):
(JSC::MachineStackMarker::markOtherThreadConservatively):
(JSC::MachineStackMarker::markMachineStackConservatively): Moved code from Heap.
2011-01-07 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Bug 26276 - Need a mechanism to determine stack extent on WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE platforms
Fix for win32. The base of the stack is stored in the "deallocation stack" field of the
Thread Information Block - see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
for more information!
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2011-01-07 Adam Roben <aroben@apple.com>
Update react-to-vsprops-changes.py after r74855
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
2011-01-07 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Martin Robinson.
[GTK] Port scrollbar painting to GtkStyleContext
https://bugs.webkit.org/show_bug.cgi?id=52051
* wtf/gobject/GTypedefs.h: Add GtkStyleContext forward
declaration.
2011-01-07 Daniel Bates <dbates@rim.com>
Reviewed by Martin Robinson.
Enable PCRE computed gotos when compiling with RCVT 4.0 or greater in GNU mode
https://bugs.webkit.org/show_bug.cgi?id=52034
Derived from a patch by Eli Fidler.
RVCT 4 or greater in GNU mode supports the computed goto GNU language extension
as per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/ch03s07s12.html>.
* pcre/pcre_exec.cpp: Modified to check for feature, HAVE(COMPUTED_GOTO), instead
of hardcoding the GCC compiler.
* wtf/Platform.h: Define WTF_COMPILER_RVCT4_OR_GREATER if __ARMCC_VERSION >= 400000.
2011-01-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
destructor early, in order to release wrappers once we know we no longer intend to use them.
Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
A sequence of events that triggers the bug would look like this:
(1) Create a DOMWrapperWorld.
(2) Register a timer in the world.
(3) Call unregisterWorld() on the world.
(4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
(5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
called forgetWorld() none exists.
(6) Attempt to add a wrapper to a NULL map.
Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::clear):
2011-01-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by Darin Adler.
Bug 52021 - zeroDouble broken on ARMv7
The bug here is that zeroDouble was working incorrectly,
leading to op_loop_if_true failing - specifically in the
case where the value being checked is 0.0 encoded as a
double (rather than an integer immediate).
Additionally this patch removes a redundant duplicate compare
in some (many) case.
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::vcmp_F64):
(JSC::ARMv7Assembler::vcmpz_F64):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::branchDoubleNonZero):
(JSC::MacroAssemblerARM::branchDoubleZeroOrNaN):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::branchDouble):
(JSC::MacroAssemblerARMv7::branchDoubleNonZero):
(JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN):
(JSC::MacroAssemblerARMv7::compare32):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchDoubleNonZero):
(JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::branchDoubleNonZero):
(JSC::MacroAssemblerX86Common::branchDoubleZeroOrNaN):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
2011-01-06 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Added debug code to compare the results of JIT regexp with
interpreted regexp and displays discrepencies. This debug code is
controlled by the ENABLE_YARR_JIT_DEBUG macro in wtf/Platform.h and
is only valid if ENABLE_YARR_JIT is enabled.
Fixed a discovered problem in RegExp::printTraceData, changing
m_pattern to the getter pattern().
Also deleted an extraneous semicolon.
Enhancement: Add Regexp Debug Compare between JIT and Interpreter
https://bugs.webkit.org/show_bug.cgi?id=51834
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
(JSC::RegExp::match):
(JSC::RegExp::printTraceData):
* wtf/Platform.h:
2011-01-06 Patrick Gansterer <paroga@webkit.org>
Reviewed by Eric Seidel.
[WINCE] Remove JSC::g_stackBase
https://bugs.webkit.org/show_bug.cgi?id=51779
* wtf/StackBounds.cpp:
2011-01-06 Joone Hur <joone.hur@collabora.co.uk>
Reviewed by Eric Seidel.
WML Parser should treat line/column number in a consistent way
https://bugs.webkit.org/show_bug.cgi?id=51601
Add the equality operators to TextPosition class.
* wtf/text/TextPosition.h:
(WTF::TextPosition::operator==): Added.
(WTF::TextPosition::operator!=): Added.
(WTF::TextPosition::belowRangePosition): Use belowBase() instead of base().
(WTF::ZeroBasedNumber::operator==): Added.
(WTF::ZeroBasedNumber::operator!=): Added.
(WTF::OneBasedNumber::operator==): Added.
(WTF::OneBasedNumber::operator!=): Added.
2011-01-06 Patrick Gansterer <paroga@webkit.org>
Reviewed by Gavin Barraclough.
[WINCE] Determine stack extent
https://bugs.webkit.org/show_bug.cgi?id=26276
Scan the stack for writeable pages and use the limits.
* wtf/StackBounds.cpp:
(WTF::detectGrowingDownward):
(WTF::isPageWritable):
(WTF::getLowerStackBound):
(WTF::getUpperStackBound):
(WTF::StackBounds::initialize):
2011-01-05 Steve Falkenburg <sfalken@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Revert change to additional library search path needed to find ICU.
2011-01-05 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
Debug and Release builds on Windows clobber each other
https://bugs.webkit.org/show_bug.cgi?id=49185
Changes the structure of WebKitBuild build products directory so we
completely separate each build configuration into independent directories.
Although we previously had per-configuration directories for obj, this change adds
per-configuration directories for bin, lib, obj, and include. Each configuration's
build products are stored within a directory inside of WebKitBuild.
Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
For PGO, $(ConfigurationBuildDir) points to the same directory (Release_PGO) to allow
for proper operation of the instrumentation/optimization scripts.
* JavaScriptCore.vcproj/JavaScriptCore.make:
* JavaScriptCore.vcproj/JavaScriptCore.sln:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Added.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
* JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
* JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
* JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
* JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
* JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
* JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
* JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
2011-01-05 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build fix.
* wtf/Encoder.h: Add <stdint.h> include for systems that
do not natively know about uint8_t, etc.
2011-01-05 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[CMake] Fix the usage of SOURCE_GROUP
https://bugs.webkit.org/show_bug.cgi?id=51739
* CMakeLists.txt:
2011-01-05 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt][V8] Fix the build after recent changes.
* pcre/pcre.pri: Correct the path after Source was introduced.
2011-01-04 Steve Falkenburg <sfalken@apple.com>
Build fix. Update path to FindSafari after source code reorganization.
* JavaScriptCore.vcproj/JavaScriptCore.sln:
2011-01-04 Daniel Bates <dbates@rim.com>
Fix the Android build after changeset 74975 <http://trac.webkit.org/changeset/74975>
(https://bugs.webkit.org/show_bug.cgi?id=51855).
* wtf/ThreadingPthreads.cpp: Add include of PassOwnPtr.h.
(WTF::runThreadWithRegistration): Use -> instead of . to dereference pointer.
2011-01-04 Martin Robinson <mrobinson@igalia.com>
Try to fix the EFL build.
* wtf/CMakeLists.txt: Remove PlatformRefPtr from the CMake source list.
2011-01-04 James Robinson <jamesr@chromium.org>
Reviewed by Darin Adler.
StackBounds initialization in WTFThreadData should be guarded by #if USE(JSC)
https://bugs.webkit.org/show_bug.cgi?id=51881
The StackBounds class is only used by JavaScriptCore.
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::resetCurrentIdentifierTable):
2011-01-03 Martin Robinson <mrobinson@igalia.com>
Reviewed by Darin Adler.
Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=51846
* GNUmakefile.am: Remove PlatformRefPtr.h from the sources list.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
* jit/ExecutableAllocator.h: Change references to PlatformRefPtr to RefPtr.
(JSC::ExecutableAllocator::cacheFlush): Ditto.
* wtf/PlatformRefPtr.h: Removed.
* wtf/RandomNumber.cpp: Change references to PlatformRefPtr to RefPtr.
(WTF::randomNumber): Ditto.
* wtf/brew/RefPtrBrew.h: Ditto.
(WTF::refIfNotNull): Added.
(WTF::derefIfNotNull): Added.
* wtf/brew/ShellBrew.h: Change references to PlatformRefPtr to RefPtr.
(WTF::createRefPtrInstance): Modified to return a RefPtr.
* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr): Moved from PlatformRefPtr here.
(WTF::derefGPtr): Ditto.
* wtf/gobject/GRefPtr.h: Ditto.
(WTF::GRefPtr::GRefPtr): Ditto.
(WTF::GRefPtr::~GRefPtr): Ditto.
(WTF::GRefPtr::clear): Ditto.
(WTF::GRefPtr::isHashTableDeletedValue): Ditto.
(WTF::GRefPtr::get): Ditto.
(WTF::GRefPtr::operator*): Ditto.
(WTF::GRefPtr::operator->): Ditto.
(WTF::GRefPtr::operator!): Ditto.
(WTF::GRefPtr::operator UnspecifiedBoolType): Ditto.
(WTF::GRefPtr::hashTableDeletedValue): Ditto.
(WTF::::operator): Ditto.
(WTF::::swap): Ditto.
(WTF::swap): Ditto.
(WTF::operator==): Ditto.
(WTF::operator!=): Ditto.
(WTF::static_pointer_cast): Ditto.
(WTF::const_pointer_cast): Ditto.
(WTF::getPtr): Ditto.
(WTF::adoptGRef): Ditto.
(WTF::refGPtr): Ditto.
(WTF::derefGPtr): Ditto.
2011-01-04 Daniel Bates <dbates@rim.com>
Reviewed by Adam Roben.
LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails
https://bugs.webkit.org/show_bug.cgi?id=51860
* wtf/ThreadingWin.cpp:
(WTF::createThreadInternal):
2011-01-04 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Ariya Hidayat.
[Qt][Symbian] Make sure that WebKit headers are included before platform headers on Symbian
https://bugs.webkit.org/show_bug.cgi?id=31273
On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
are included before platform headers. On all other platforms continue to use
INCLUDEPATH (as before). This is a continuation of r65877.
No new tests as there is no new functionality.
* JavaScriptCore.pri:
2011-01-04 Darin Adler <darin@apple.com>
Try to fix Windows build.
* wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing
of conditional includes.
(WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer.
(WTF::createThreadInternal): Tweaked #if to not need separate macro.
2011-01-04 Daniel Bates <dbates@rim.com>
Reviewed by Adam Roben.
Extract ThreadFunctionInvocation into separate file and share between Apple Windows and Android
https://bugs.webkit.org/show_bug.cgi?id=51855
Both the Apple Windows and Android ports implement a similar adapter structure,
called ThreadFunctionInvocation and ThreadData respectively, as part of
their thread creation process. Instead, we should share such an adapter
structure and remove duplicate code.
* JavaScriptCore.gypi: Added header wtf/ThreadFunctionInvocation.h.
* wtf/ThreadFunctionInvocation.h: Added.
(WTF::ThreadFunctionInvocation::ThreadFunctionInvocation):
* wtf/ThreadingPthreads.cpp: Removed Android-specific structure ThreadData; Instead, use ThreadFunctionInvocation.
(WTF::runThreadWithRegistration):
(WTF::createThreadInternal):
* wtf/ThreadingWin.cpp: Moved structure ThreadFunctionInvocation to its own file so that
it can be shared with the Android implementation of createThreadInternal().
(WTF::wtfThreadEntryPoint): Use OwnPtr to hold passed instance of ThreadFunctionInvocation.
2011-01-04 Daniel Bates <dbates@rim.com>
Reviewed by Darin Adler.
Use __builtin_expect when compiling using RVCT in GNU mode
https://bugs.webkit.org/show_bug.cgi?id=51866
Derived from a patch by Dave Tapuska.
* wtf/AlwaysInline.h:
2011-01-03 Darin Adler <darin@apple.com>
Reviewed by Brady Eidson.
* wtf/Forward.h: Added Decoder and Encoder.
2011-01-03 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2.
Starting out with a pure virtual interface to be implemented in WK2, but we might change that later.
* GNUmakefile.am:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Decoder.h: Added.
* wtf/Encoder.h: Added.
2011-01-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Unreviewed build fix.
[Qt] Add NullPtr.cpp introduced in r71155 to the Qt build system.
This fix is required for builds where HAVE(NULLPTR) is false
(e.g. some MSVC and Symbian builds).
* wtf/wtf.pri:
2011-01-02 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Simon Fraser.
<rdar://problem/8812159> Update copyright strings
* Info.plist:
2011-01-02 Csaba Osztrogonác <ossy@webkit.org>
Fix GTK+ build after r74855.
Reviewed by Xan Lopez.
* GNUmakefile.am: Fix include pathes.
2011-01-02 Adam Barth <abarth@webkit.org>
One more .. missing in the Qt build.
* jsc.pro:
2011-01-02 Xan Lopez <xlopez@igalia.com>
Fix GTK+ build.
* GNUmakefile.am: add -I$(srcdir)/Source to the JSC cppflags so
that anyone can include its headers without adding the prefix
'Source/'.
2011-01-02 Carl Lobo <carllobo@gmail.com>
Reviewed by Adam Barth.
Fix Windows Build for non-production where VSPropsRedirectionDir is not defined.
https://bugs.webkit.org/show_bug.cgi?id=51797
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
2011-01-01 Adam Barth <abarth@webkit.org>
Fix relative include paths in an attempt to fix the Qt build.
* JavaScriptCore.pri:
* JavaScriptCore.pro:
2011-01-01 Adam Barth <abarth@webkit.org>
Another speculative build fix for GTK.
* GNUmakefile.am:
2011-01-01 Adam Barth <abarth@webkit.org>
Speculative build fix for GTK. Update the paths in GNUmakefile to
include "Source".
* GNUmakefile.am:
2011-01-01 Adam Barth <abarth@webkit.org>
Update relative paths in JavaScriptCore.gyp to account for the extra
level of directories.
* JavaScriptCore.gyp/JavaScriptCore.gyp:
2010-12-31 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Add a fast case for ASCII strings in HashAndUTF8CharactersTranslator::equal
https://bugs.webkit.org/show_bug.cgi?id=50517
This change shows about 2% performance win on the xml-parser benchmark.
* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::equal):
2010-12-30 Patrick Gansterer <paroga@webkit.org>
Reviewed by Ariya Hidayat.
[CMake] Add WTF_HEADERS
https://bugs.webkit.org/show_bug.cgi?id=51741
Add the WTF headers to show them in Visual Studio.
* wtf/CMakeLists.txt:
* wtf/CMakeListsWinCE.txt:
2010-12-30 Konstantin Tokarev <annulen@yandex.ru>
Reviewed by David Kilzer.
[Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is
used
https://bugs.webkit.org/show_bug.cgi?id=51672
* wtf/wtf.pri: Replaced USE_SYSTEM_MALLOC with USE_SYSTEM_MALLOC=1
2010-12-30 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Use OS(WINDOWS) instead of COMPILER(MSVC) in FastMalloc.cpp
https://bugs.webkit.org/show_bug.cgi?id=51743
Most of the ifdefs belong to windows and not to the MSVC compiler.
* wtf/FastMalloc.cpp:
2010-12-29 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 51724 - In strict mode string literals should allow \0, but disallow \8 and \9.
* parser/Lexer.cpp:
(JSC::Lexer::parseString):
2010-12-29 Helder Correia <helder@sencha.com>
Reviewed by Eric Seidel.
<VT> and <FF> are not valid JSON whitespace characters
https://bugs.webkit.org/show_bug.cgi?id=51671
Vertical Tab and Form Feed are not allowed white spaces by the JSON
RFC 4627: http://www.ietf.org/rfc/rfc4627.txt (2. JSON Grammar).
Tests: ietestcenter/Javascript/15.12.1.1-0-2.html
ietestcenter/Javascript/15.12.1.1-0-3.html
* runtime/LiteralParser.cpp:
(JSC::isJSONWhiteSpace):
(JSC::LiteralParser::Lexer::lex):
2010-12-28 Helder Correia <helder@sencha.com>
Reviewed by Eric Seidel.
JSON.stringify must exist as a function taking 3 parameters
https://bugs.webkit.org/show_bug.cgi?id=51667
The reported function length is 1 instead.
Test: ietestcenter/Javascript/15.12.3-0-2.html
* runtime/JSONObject.cpp:
2010-12-28 Helder Correia <helder@sencha.com>
Reviewed by Sam Weinig.
JSON.parse must exist as a function taking 2 parameters
https://bugs.webkit.org/show_bug.cgi?id=51666
Support for revivers was introduced in bug 26591, but the function
length has since remained unchanged.
Test: ietestcenter/Javascript/15.12.2-0-2.html
* runtime/JSONObject.cpp:
2010-12-27 Jake Helfert <jake@jakeonthenet.com>
Reviewed and reworked by Darin Adler.
Building WebKit with Visual Studio 2010 fails due
to ambiguous assignment operator errors.
https://bugs.webkit.org/show_bug.cgi?id=51116
* wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with
Platform.h HAVE macro, and included the Visual Studio 2010 compiler
as one of the ones that has nullptr.
* wtf/NullPtr.cpp: Updated condition to match.
* wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t)
overload if we are compiling in loose mode and the compiler has
nullptr, because assignment of 0 will otherwise encounter
ambiguitity with this overload and the overload for loose mode
that takes a raw pointer. The conditional can be removed when we
get rid of loose mode.
* wtf/PassOwnPtr.h: Ditto.
* wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload
if the compiler has nullptr, because assignment of 0 would be
ambiguous with the overload that takes a raw pointer. The conditional
can be removed if we ever decide we no longer need to support
assigning 0, but might need a way to catch that usage on older compilers.
* wtf/RefPtr.h: Ditto.
* wtf/RetainPtr.h: Ditto
* JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
accidentally omitted when the file was first added.
2010-12-26 Xan Lopez <xlopez@igalia.com>
Reviewed by Eric Seidel.
[GTK] Add standalone target for JSC
https://bugs.webkit.org/show_bug.cgi?id=51607
* GNUmakefile.am: add convenience target to only build jsc and its
dependencies.
2010-12-24 Patrick Gansterer <paroga@webkit.org>
Reviewed by Eric Seidel.
[WINCE] Add CPU(MIPS) detection
https://bugs.webkit.org/show_bug.cgi?id=51342
WinCE usually defines MIPS and _MIPS_.
* wtf/Platform.h:
2010-12-23 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Rename RegexCompiler.cpp to RegexPattern.cpp.
Implicitly call compileRegex from RegexPattern's constructor.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
* yarr/RegexCompiler.cpp: Removed.
* yarr/RegexCompiler.h: Removed.
* yarr/RegexInterpreter.cpp:
* yarr/RegexJIT.cpp:
* yarr/RegexPattern.cpp: Copied from JavaScriptCore/yarr/RegexCompiler.cpp.
(JSC::Yarr::compileRegex):
(JSC::Yarr::RegexPattern::RegexPattern):
* yarr/RegexPattern.h:
2010-12-23 Patrick Gansterer <paroga@webkit.org>
Unreviewed build fix for WinCE after r74360.
Move the OS(WINDOWS) section after the OS(WINCE) section
and add missing argument to the getStackMax call.
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2010-12-22 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Unreviewed build fix.
[Symbian] Make sure OSAllocatorSymbian builds
This patch only addresses the build problem.
https://bugs.webkit.org/show_bug.cgi?id=51128 tracks the full
(re)implementation of the Symbian allocator.
* wtf/OSAllocatorSymbian.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
2010-12-22 Dan Bernstein <mitz@apple.com>
Changed WebKitTools to Tools.
* JavaScriptCore.vcproj/JavaScriptCore.sln:
2010-12-22 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Mark Rowe.
Changed WebKitTools to Tools in script build phases.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-12-22 Andrei Popescu <andreip@google.com>
Unreviewed build fix.
Fix Chromium Linux shared library build.
[Chromium] r74431 broke the Chromium Linux shared library build
https://bugs.webkit.org/show_bug.cgi?id=51462
* JavaScriptCore.gyp/JavaScriptCore.gyp:
* JavaScriptCore.gypi:
2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r74462.
http://trac.webkit.org/changeset/74462
https://bugs.webkit.org/show_bug.cgi?id=51449
broke chromium win (Requested by tonyg-cr on #webkit).
* JavaScriptCore.gypi:
2010-12-21 Tony Gentilcore <tonyg@chromium.org>
Unreviewed build fix.
[chromium] Build fix after r74431
https://bugs.webkit.org/show_bug.cgi?id=51447
* JavaScriptCore.gypi:
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Speculative build fix.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::underMemoryPressure):
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 26276 - Need a mechanism to determine stack extent
This patch adds accurate stack size calculation for:
DARWIN, QNX, UNIX
We still need to fix:
WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
<rdar://problem/8765333> CRASH running out of executable memory, loading io9.com
https://bugs.webkit.org/show_bug.cgi?id=51443
The problem here is that each page uses a reasonable amount of memory, (~4Mb),
and that when miultiple pages are open we keep all JIT code for all functions
in all pages alive.
Add a check to detect high memory pressure situations in the executable allocator
(>50% of available memory allocated), and upon a top level entry into JSC (no code
running on the stack) in this situation throw away all JIT code.
* JavaScriptCore.exp:
* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions): stop passing exec to recompile.
* jit/ExecutableAllocator.h:
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::ExecutablePool::systemAlloc): Count allocations.
(JSC::ExecutablePool::systemRelease): Count deallocations.
(JSC::ExecutablePool::underMemoryPressure): Check memory pressure.
* jit/ExecutableAllocatorPosix.cpp:
(JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
* jit/ExecutableAllocatorWin.cpp:
(JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
* runtime/Executable.cpp:
(JSC::FunctionExecutable::recompile): Remove ExecState argument to recompile.
* runtime/Executable.h:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::recompileAllJSFunctions): throws away all JIT code.
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.h:
(JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): add check / call to throw away.
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
<rdar://problem/8241425> JIT executable memory excessive usage due to regex caching
https://bugs.webkit.org/show_bug.cgi?id=51434
Reduce the amount of memory the RegExpCache can hold on to on iOS.
Currently the RegExpCache can hold 256 RegExp objects. If each falls into a separate
ExecutablePool, with a common size of 16Kb, this means we end up holding onto 4Mb of
memory. Firstly, we can reduce this by simply reducing the size of the cache to 32
entries. Secondly, we can use a separate set of ExecutablePools for JIT code generated
from RegExp objects. This helps in two ways (1) it increases the probability that
RegExps in the cache share the same pool, and (2) it means that a RegExp can't end
up holding on to a large ExecutablePool containing a translation of JS code.
(A RegExp could end up keeping a larger RegExp alive that happened to be sharing the
same pool, but large RegExp patterns are less common).
* runtime/JSGlobalData.h:
* runtime/RegExpCache.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::compile):
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Eeeep! build fix!
* wtf/OSAllocator.h:
(WTF::OSAllocator::decommitAndRelease):
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Ooops, fixed typo in comment.
* wtf/OSAllocator.h:
2010-12-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough & Oliver Hunt.
Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
https://bugs.webkit.org/show_bug.cgi?id=51359
I think this patch fixes <rdar://problem/8107952> [5.0.1] WER crash in
Heap::allocateBlock (1902752929), and some other leaks and crashes as well.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj: Updated build files.
* runtime/AlignedMemoryAllocator.h: Removed. Supplanted by
PageAllocationAligned.
* runtime/Collector.cpp:
(JSC::Heap::destroy):
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlock):
(JSC::Heap::addWeakGCHandle):
* runtime/Collector.h: Switched from AlignedMemoryAllocator to
PageAllocationAligned.
* runtime/GCHandle.cpp:
* runtime/GCHandle.h: Ditto.
* wtf/PageAllocation.h:
(WTF::PageAllocation::PageAllocation): Removed aligned memory allocation
functions. Supplanted by PageAllocationAligned.
* wtf/PageAllocationAligned.cpp: Added.
(WTF::PageAllocationAligned::allocate):
(WTF::PageAllocationAligned::deallocate):
* wtf/PageAllocationAligned.h: Added.
(WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform
class for doing aligned memory allocation. This class properly matches
allocation and deallocation library calls, fixing a long-standing bug
in PageAllocation.
* wtf/Platform.h: Removed some defunction VM platform defines.
* wtf/wtf.pri: Updated build files.
2010-12-21 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
ASSERTION FAILED: base->index() == m_codeBlock->argumentsRegister() while loading taobao.com
https://bugs.webkit.org/show_bug.cgi?id=49006
This problem was caused by having a parameter named 'arguments'.
The fix is to treat parameters named 'arguments' as shadowing
the actual arguments property, and so logically turn the function
into one that doesn't "use" arguments.
This required a bit of fiddling in the parser to ensure we correctly
propagate the 'feature' of shadowing is set correctly.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::createArgumentsIfNecessary):
Change assertion to an early return as we may now reference
a property named 'arguments' without being in a function that
has the ArgumentsFeature
* parser/JSParser.cpp:
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::declareParameter):
(JSC::JSParser::Scope::shadowsArguments):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionInfo):
* parser/Nodes.h:
(JSC::ScopeNode::usesArguments):
2010-12-21 Daniel Bates <dbates@rim.com>
Reviewed by Eric Seidel and Darin Adler.
Deallocate GregorianDateTime.timeZone (if allocated) when copying so that we don't leak memory.
https://bugs.webkit.org/show_bug.cgi?id=51367
Inspired by a patch by George Staikos.
* wtf/DateMath.cpp:
(JSC::msToGregorianDateTime): Modified to set timeZone to nullptr since timeZone is now
of type OwnPtrArray<char>.
* wtf/DateMath.h: Change timeZone to type OwnArrayPtr<char>; Removed destructor since it is no longer needed.
(JSC::GregorianDateTime::GregorianDateTime): Modified to use OwnPtrArray semantics for timeZone.
(JSC::GregorianDateTime::operator tm): Ditto.
(JSC::GregorianDateTime::copyFrom): Ditto.
2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r74402.
http://trac.webkit.org/changeset/74402
https://bugs.webkit.org/show_bug.cgi?id=51402
This patch broke the Windows 7 Release Layout Tests (Requested
by jessieberlin on #webkit).
* wtf/StackBounds.cpp:
(WTF::estimateStackBound):
(WTF::StackBounds::initialize):
2010-12-21 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Csaba Osztrogonác.
Unify the name of parentheses in YARR: rename parenthesis to
parentheses.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
2010-12-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Andreas Kling.
[Qt] Set BUILDING_QT__ consistently
https://bugs.webkit.org/show_bug.cgi?id=51341
* JavaScriptCore.pri: Remove the definition of BUILDING_QT__ as it
is already defined in WebKit.pri.
2010-12-20 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 26276 - Need a mechanism to determine stack extent
This patch adds accurate stack size calculation for:
DARWIN, WINDOWS, QNX, UNIX
We still need to fix:
SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2010-12-20 Gavin Barraclough <barraclough@apple.com>
PPC build fix; stop using std::swap on PageAllocation/PageReservation,
this was failing on some compilers since the lack of default construction
for the m_executable/m_writable fields meant the value being swapped may
not have been fully initialized.
* wtf/PageAllocation.h:
(WTF::PageAllocation::deallocate):
* wtf/PageBlock.h:
* wtf/PageReservation.h:
(WTF::PageReservation::deallocate):
2010-12-20 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
|delete name| in strict mode code should be an early error
https://bugs.webkit.org/show_bug.cgi?id=50431
Disallow the |delete IDENTIFIER| production in strict mode, and removed
a bunch of now unnecessary code.
* parser/JSParser.cpp:
(JSC::JSParser::Scope::collectFreeVariables):
(JSC::jsParse):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseUnaryExpression):
* parser/JSParser.h:
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/Parser.h:
(JSC::Parser::parse):
2010-12-20 Gavin Barraclough <barraclough@apple.com>
Reviewed by Olver Hunt.
Bug 51358 - Should check stack depth rather than using recursion limits in byte compilation
The current implementation of recursion limit checking is not safe on smaller stacks.
Switch to using a common mechanism, shared with the parser, to check recursion limits.
Make bytecompiler use StackBounds. Empirical testing shows emitStrcat to have the largest
footprint on the stack, at just under 1k on x86-64. Given this, the default recursion
check (requiring 4k of available space to recurse) seems reasonable.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitNode):
(JSC::BytecodeGenerator::emitNodeInConditionContext):
* bytecompiler/NodesCodegen.cpp:
(JSC::BinaryOpNode::emitStrcat):
2010-12-20 Tony Gentilcore <tonyg@chromium.org>
Unreviewed build fix.
Include pthread to fix chromium mac build (broken by r74360)
https://bugs.webkit.org/show_bug.cgi?id=51356
* wtf/StackBounds.cpp:
2010-12-20 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
* GNUmakefile.am: add missing files.
2010-12-18 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 26276 - Need a mechanism to determine stack extent
This patch adds a class 'StackBounds', to hold information about the machine stack.
The implementation of this class broadly adheres to the current implmentation of
stack limit checking, and as such does not solve the problem of determining stack
extent, but gives us a common place to do so.
Currently two mechanism are provided to determine the stack origin (the point the
stack is growing away from). currentThreadStackBase() in Collector provides a
more accurate determination of the stack origin, so use this to calculate
StackBounds::m_origin; WTFThreadData::approximatedStackStart is less accurate, and
as such can be removed. Cache the StackBounds on WTFThreadData such that they
need only be determined once per thread, and for non-API contexts cache this
information in JSGlobalData, to save a thread-specific access.
For the time being retain the estimate of stack size used by JSC's parser
(128 * sizeof(void*) * 1024), with a view to replacing this with something more
accurate in the near future.
* parser/JSParser.cpp:
(JSC::JSParser::canRecurse):
(JSC::JSParser::JSParser):
Change to use StackBounds.
* runtime/Collector.cpp:
(JSC::Heap::registerThread):
(JSC::Heap::markCurrentThreadConservativelyInternal):
Change to use StackBounds, cached on JSGlobalData.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::stack):
Add a cached copy of StackBounds.
* wtf/StackBounds.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
(WTF::estimateStackBound):
(WTF::StackBounds::initialize):
(WTF::getStackMax):
Copy code from Collector.cpp to determine stack origin.
* wtf/StackBounds.h: Added.
(WTF::StackBounds::StackBounds):
No argument constructor; returns a null StackBounds.
(WTF::StackBounds::currentThreadStackBounds):
Returns a StackBounds object representing the stack limits
of the current thread.
(WTF::StackBounds::origin):
Returns to stack origin (the point the stack is growing away
from; the highest extent of the stack on machines where the
stack grows downwards.
(WTF::StackBounds::recursionLimit):
Returns a limit value that is 'a comfortable distance from
the end of the stack'. Our concept of this is currently 1 page
away from the end, however the default value may be tuned in
the future, and clients may override passing a larger delta;
should only be called on StackBounds object representing the
stack of the thread this method is called on (checked by
checkConsistency).
(WTF::StackBounds::recursionCheck):
Checks whether we are currently 'a comfortable distance from
the end of the stack'. Our concept of this is currently 1 page
away from the end, however the default value may be tuned in
the future, and clients may override passing a larger delta
to apply when checking, if they wish to do so. This method
should only be called on StackBounds object representing the
stack of the thread this method is called on (checked by
checkConsistency).
(WTF::StackBounds::current):
Approximate current stack position. On machines where the stack
is growing downwards this is the lowest address that might need
conservative collection.
(WTF::StackBounds::isGrowingDownward):
True for all platforms other than WINCE, which has to check.
(WTF::StackBounds::checkConsistency):
This is called in methods that shoulds only be operating on a
valid set of bounds; as such we expect m_origin != m_bounds
(i.e. stack size != zero) - we're really testing that this
object is not null (the constructor initializes both fields
to zero). Also checks that current() is within the stack's
bounds.
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::stack):
Add the StackBounds member variable.
2010-12-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Factored common page set management into a new PageBlock base class
https://bugs.webkit.org/show_bug.cgi?id=51285
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::intializePageSize):
* wtf/PageAllocation.cpp: Removed.
* wtf/PageAllocation.h:
(WTF::PageAllocation::deallocate):
(WTF::PageAllocation::PageAllocation):
* wtf/PageReservation.h:
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::deallocate):
(WTF::PageReservation::PageReservation):
* wtf/wtf.pri:
2010-12-17 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
RegExp Jit'ed expression crashes clicking link on yelp.com
https://bugs.webkit.org/show_bug.cgi?id=51284
When transitioning between an non-repeating beginning of line
anchored expression and the remaining refactored repeating
expression, we should not clear any residual datalabel in
state's m_backtrack. It will be resolved and cleared in subsequent
code when linkAlternativeBacktracks() is called for the repeating
alternative(s).
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
(JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
2010-12-17 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Mark Rowe.
Updated for the renaming of WebKitTools to Tools
* JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
2010-12-17 Ariya Hidayat <ariya@sencha.com>
Reviewed by Oliver Hunt.
[JSC] parseAssignmentExpression should use TreeBuilder::CreatesAST
https://bugs.webkit.org/show_bug.cgi?id=51268
* parser/JSParser.cpp:
(JSC::JSParser::parseAssignmentExpression):
2010-12-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Removed RChunk from PageAllocation/PageReservation, since it's now unused.
https://bugs.webkit.org/show_bug.cgi?id=51276
* wtf/PageAllocation.h:
(WTF::PageAllocation::PageAllocation):
* wtf/PageReservation.h:
(WTF::PageReservation::PageReservation):
2010-12-17 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Incorrect encoding of some constants in ARMv7 JIT
https://bugs.webkit.org/show_bug.cgi?id=51273
<rdar://problem/8650210>
When using immediate encoding 3 we need to write the byte
that holds a duplicated value.
* assembler/ARMv7Assembler.h:
(JSC::ARMThumbImmediate::makeEncodedImm):
2010-12-16 Evan Martin <evan@chromium.org>
Reviewed by Darin Fisher.
[chromium] useless warnings when building on Windows
https://bugs.webkit.org/show_bug.cgi?id=50985
Disable some compiler warnings that aren't indicative of real problems.
* JavaScriptCore.gyp/JavaScriptCore.gyp:
2010-12-16 Pratik Solanki <psolanki@apple.com>
Reviewed by Geoffrey Garen.
https://bugs.webkit.org/show_bug.cgi?id=51166
ExecutableAllocator::cacheFlush should call sys_cache_control
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::cacheFlush): Use the more correct and forward looking API -
sys_cache_control(kCacheFunctionPrepareForExecution,...).
2010-12-16 Ariya Hidayat <ariya@sencha.com>
Reviewed by Andreas Kling.
[JSC] Const correctness in ASTBuilder and SyntaxChecker
https://bugs.webkit.org/show_bug.cgi?id=51141
* parser/ASTBuilder.h:
(JSC::ASTBuilder::getName):
(JSC::ASTBuilder::getType):
(JSC::ASTBuilder::isResolve):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::operatorStackPop):
2010-12-15 Kenneth Russell <kbr@google.com>
Reviewed by James Robinson.
Web Audio API: port FFTFrame to MKL
https://bugs.webkit.org/show_bug.cgi?id=50986
Fixed bug in log2 emulation function provided for Windows port of
Web Audio API.
* wtf/MathExtras.h:
(log2):
2010-12-14 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
<http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video>
* wtf/text/WTFString.h: Prevent String from being implicitly convertable to bool.
It was previously implicitly convertible to bool on Mac via operator NSString*,
but since that always has a non-zero return value it would give unexpected results.
2010-12-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Eric Seidel.
[Qt] [Symbian] Do not use pkg-config on Symbian as it is not supported
https://bugs.webkit.org/show_bug.cgi?id=50231
Guard CONFIG+=link_pkgconfig with !symbian.
* jsc.pro:
2010-12-14 Cameron Zwarich <zwarich@apple.com>
Not reviewed.
Revert accidental change disabling the JIT for most platforms.
* wtf/Platform.h:
2010-12-13 Cameron Zwarich <zwarich@apple.com>
Reviewed by Eric Seidel.
Clang fails to build the JSC interpreter
https://bugs.webkit.org/show_bug.cgi?id=51016
Clang does not allow indirect gotos out of scopes with cleanup. GCC 4.2 allows
them, but it does not correctly generate the cleanup, causing a leak if the
cleanup decrements a reference count.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute): Put an Identifier into its own scope.
2010-12-14 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Martin Robinson.
[GTK] Simplify context-menu handling code
https://bugs.webkit.org/show_bug.cgi?id=49658
* wtf/PlatformRefPtr.h: Add leakRef()
2010-12-13 Cameron Zwarich <zwarich@apple.com>
Reviewed by Gavin Barraclough.
JavaScriptCore should not use "asm volatile" outside of a function
https://bugs.webkit.org/show_bug.cgi?id=50991
* jit/JITStubs.cpp: Remove the volatile keyword from asm statements.
2010-12-13 Steve Falkenburg <sfalken@apple.com>
Windows production build fix.
Try copying ICU 4.6 in addition to 4.4 and 4.2.
* JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
2010-12-13 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
REGRESSION: mobileme mail viewing is broken
https://bugs.webkit.org/show_bug.cgi?id=50884
Fixed problem where simple parenthesis (those without capture and
with a fixed count) where not propagating backtrack to labels for
nested parentheses. Also added the nesting level for the parentheses
state created in that case as well.
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::BacktrackDestination::copyBacktrackToLabel):
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2010-12-13 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR
https://bugs.webkit.org/show_bug.cgi?id=49385
Remove the BackTrackInfoParentheses struct prevBegin and prevEnd members.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchParentheses):
(JSC::Yarr::Interpreter::backtrackParentheses):
* yarr/RegexPattern.h:
2010-12-10 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
REGRESSION Hang inside Yarr::RegexCodeBlock::execute when visiting
bugs.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=50816
First nested parentheses of the second or greater alternative
where backtracking to the prior parentheses. Changed the default
handling of initial parentheses for all alternatives to go back
to the immediate outer paren.
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
(JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::RegexGenerator::TermGenerationState::getTermIndex):
(JSC::Yarr::RegexGenerator::TermGenerationState::setParenthesesTail):
(JSC::Yarr::RegexGenerator::TermGenerationState::getParenthesesTail):
(JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
(JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
(JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2010-12-11 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Add an overload to makeString for Vector<char>
https://bugs.webkit.org/show_bug.cgi?id=50123
Also cleanup StringTypeAdapter.
* wtf/text/StringConcatenate.h:
2010-12-10 Siddharth Mathur <siddharth.mathur@nokia.com>
Reviewed by Eric Seidel.
[Qt] Build fix for Symbian: don't compile POSIX memory management implementation
https://bugs.webkit.org/show_bug.cgi?id=50707
* wtf/wtf.pri:
2010-12-10 Steve Falkenburg <sfalken@apple.com>
Windows production build fix.
Don't stop if react-to-vsprops-changes.py exits with an error,
since this will occur in production builds.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2010-12-10 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
Turn on USE(CROSS_PLATFORM_CONTEXT_MENUS) for Windows.
* wtf/Platform.h:
2010-12-10 Martin Robinson <mrobinson@igalia.com>
Unreviewed, rolling out r73703.
http://trac.webkit.org/changeset/73703
https://bugs.webkit.org/show_bug.cgi?id=49658
This patch is causing crashes on the GTK+ bots.
* wtf/PlatformRefPtr.h:
2010-12-10 Patrick Gansterer <paroga@webkit.org>
Reviewed by Eric Seidel.
Cleanup StringWx.cpp
https://bugs.webkit.org/show_bug.cgi?id=50525
Use StringImpl::createUninitialized to avoid memcpy and fix style issues.
* wtf/wx/StringWx.cpp:
(WTF::String::String):
2010-12-10 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Martin Robinson.
[GTK] Simplify context-menu handling code
https://bugs.webkit.org/show_bug.cgi?id=49658
* wtf/PlatformRefPtr.h:
2010-12-09 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
REGRESSION (r73065?): A regex no longer works
https://bugs.webkit.org/show_bug.cgi?id=50570
Changed the handling of adjacent parentheses backtracks in two ways.
First, only outer most paren backtracks default to back tracking
to the "next character" looping code. Second, added a jump around
backtracks that fall through to the next backtrack where the
second backtrack has some greedy processing before the backtracking
from outside the parentheses code.
Also cleaned up extraneous white spce, removing white space at the
end of or that makes up a whole line.
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
(JSC::Yarr::RegexGenerator::GenerationState::incrementParenNestingLevel):
(JSC::Yarr::RegexGenerator::GenerationState::decrementParenNestingLevel):
(JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
(JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
(JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
(JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
(JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2010-12-09 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Addressed the "FIXME" issues in array sort for toString() methods that
mutate the array in either size or contents. The change is to mark
the temporary array contents so that they are not garbage collected
and to make sure the array is large enough to hold the contents
of the sorted temporary vector.
https://bugs.webkit.org/show_bug.cgi?id=50718
* runtime/Collector.cpp:
(JSC::Heap::addTempSortVector):
(JSC::Heap::removeTempSortVector):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/Collector.h:
* runtime/JSArray.cpp:
(JSC::JSArray::sort):
* runtime/JSValue.h:
2010-12-09 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
Changed setting of backtrack labels to not overwrite a prior
label. Where losing prior labe which then reverted back to
next character label.
https://bugs.webkit.org/show_bug.cgi?id=50579
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
2010-12-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Permit Character Class Escape in CharacterRange in Character Class.
https://bugs.webkit.org/show_bug.cgi?id=50483
https://bugs.webkit.org/show_bug.cgi?id=50538
https://bugs.webkit.org/show_bug.cgi?id=50654
https://bugs.webkit.org/show_bug.cgi?id=50646
We recently tightened up our spec conformance in generating syntax
error in these cases, however testing in the wild has shown this
to be problematic. This reverts the previous change in allowing
class escapes (e.g. \d) in ranges in character classes ([]), but
does retain some closer conformance to the spec in only allowing
ranges that would be permitted per the grammar rules in the spec
(e.g. in /[\d-a-z]/ "a-z" cannot be considered as a range).
* yarr/RegexParser.h:
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
(JSC::Yarr::Parser::parse):
2010-12-08 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Try to fix crash-on-launch seen on Windows builder.
* wtf/OSAllocatorWin.cpp:
(WTF::OSAllocator::release): Disabled an ASSERT, because it checks for
a bug that hasn't been fixed yet.
2010-12-08 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
2010-12-08 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def
file to remove a symbol -- the next build failure will say which symbol
to add back.
2010-12-08 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
2010-12-08 Geoffrey Garen <ggaren@apple.com>
Try to fix GTK Linux build.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutablePool::systemAlloc):
* runtime/AlignedMemoryAllocator.h:
(JSC::::AlignedMemoryAllocator): Updated for Usage enum moving to OSAllocator.
2010-12-07 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Migrated OS-specific allocation code from PageReservation and PageAllocation to OSAllocator
https://bugs.webkit.org/show_bug.cgi?id=50653
* JavaScriptCore.exp: Updated for new function signature.
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
(JSC::RegisterFile::grow):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): Removed checkAllocatedOkay.
OSAllocator is now the central location for verifying that allocation succeeds.
This allowed me to remove some complicating cross-platform cruft.
* runtime/AlignedMemoryAllocator.h:
(JSC::::allocate): Updated for code motion.
* wtf/OSAllocator.h: Added Usage, writable, and executable parameters, to
support VM features required by clients of PageAllocation and PageReservation.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit): Moved PageAllocation support for randomizing
executable memory here.
* wtf/OSAllocatorSymbian.cpp:
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit): Updated for new function signatures.
* wtf/OSAllocatorWin.cpp:
(WTF::protection):
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::release): Updated for new function signatures. Moved
some protection-related and WINCE-related code from PageAllocation here.
* wtf/PageAllocation.cpp: Nixed cross-platform lastError abstraction, since
it was only used by checkAllocatedOkay, which is now gone.
* wtf/PageAllocation.h:
(WTF::PageAllocation::allocate):
(WTF::PageAllocation::allocateAligned):
(WTF::PageAllocation::deallocate):
(WTF::PageAllocation::isPowerOfTwo):
(WTF::PageAllocation::systemAllocateAligned): Removed system* functions,
and replaced calls to them with calls to OSAllocator.
* wtf/PageReservation.h:
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::reserve):
(WTF::PageReservation::deallocate):
(WTF::PageReservation::PageReservation): Ditto. Added m_writable and
m_executable because these flags are now required when committing memory.
2010-12-08 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Add web audio files to mac port Xcode projects
https://bugs.webkit.org/show_bug.cgi?id=50721
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-12-08 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Marking the active global object re-enters through markConservatively
https://bugs.webkit.org/show_bug.cgi?id=50711
draining of the MarkStack is not allowed to be re-entrant, we got away
with this simply due to the logic in MarkStack::drain implicitly handling
changes that could be triggered by the re-entry.
Just to be safe this patch removes the re-entry through markConservatively
so we don't accidentally introduce such an issue in future. I've also
added an assertion to catch such errors.
* runtime/Collector.cpp:
(JSC::Heap::markConservatively):
(JSC::Heap::markCurrentThreadConservativelyInternal):
(JSC::Heap::markOtherThreadConservatively):
* runtime/JSArray.h:
(JSC::MarkStack::drain):
* runtime/MarkStack.h:
(JSC::MarkStack::MarkStack):
2010-12-08 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
https://bugs.webkit.org/show_bug.cgi?id=49388
Added a WTF_PLATFORM_CA flag. Set when platform is MAC or IOS or (WINDOWS AND CG)
which was decided was the best way to identify a build with CoreAnimation
* wtf/Platform.h:
2010-12-07 Anders Carlsson <andersca@apple.com>
Build fix follow up build fix.
* pcre/pcre_ucp_searchfuncs.cpp:
(jsc_pcre_ucp_othercase):
2010-12-07 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Fix clang++ build
https://bugs.webkit.org/show_bug.cgi?id=50645
Explicitly cast offset to int.
* pcre/pcre_ucp_searchfuncs.cpp:
(jsc_pcre_ucp_othercase):
2010-12-07 Kenneth Russell <kbr@google.com>
Reviewed by David Levin.
Fix compilation of core web audio files on Windows
https://bugs.webkit.org/show_bug.cgi?id=50603
Added log2 definition to MathExtras.h on Windows platform.
* wtf/MathExtras.h:
(log2):
2010-12-07 Antti Koivisto <antti@apple.com>
Reviewed by Gavin Barraclough.
https://bugs.webkit.org/show_bug.cgi?id=50412
http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading
Creating a substring caused the original string be flattened if it was in the rope form. This could use
significant amount of memory by reducing buffer sharing between strings.
Add a rope specific substring function that constructs the substring by reusing the rope fibers
instead of flattening the rope.
No change observed in SunSpider.
* runtime/JSString.cpp:
(JSC::JSString::substringFromRope):
* runtime/JSString.h:
(JSC::jsSubstring):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
2010-12-06 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough.
Simplified some ASLR-related code in PageAllocation/Reservation
https://bugs.webkit.org/show_bug.cgi?id=50599
Removed reserveAt, allocateAt, and friends, since they all existed to
serve one feature: ASLR for executable memory on x86_64 on Mac. Moved
ASLR code down into systemAllocate -- now, any time you allocate
executable memory on a supporting platform, the memory's location is
randomized.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller
to randomize anything.
* wtf/PageAllocation.h:
(WTF::PageAllocation::systemAllocate): Removed some *At() functions, and
beefed up executable allocation with randomization.
* wtf/PageReservation.h:
(WTF::PageReservation::systemReserve): Removed some *At() functions.
2010-12-06 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems
https://bugs.webkit.org/show_bug.cgi?id=50588
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit): Tightened up some comments. Changed
reserveAndCommit to actually commit on MADVISE_FREE_REUSE systems.
2010-12-06 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[WINCE] Add build system
https://bugs.webkit.org/show_bug.cgi?id=50522
* CMakeListsWinCE.txt: Added.
* shell/CMakeListsWinCE.txt: Added.
* wtf/CMakeListsWinCE.txt: Added.
2010-12-06 John Tantalo <john.tantalo@gmail.com>
Reviewed by Geoffrey Garen.
jsc does not ignore shebang
https://bugs.webkit.org/show_bug.cgi?id=49576
* jsc.cpp:
(fillBufferWithContentsOfFile):
- translate shebang into a valid JavaScript comment so the lexer ignores it
2010-12-05 Adam Roben <aroben@apple.com>
Windows production build fix
Put spaces after trailing backslashes when setting
%WebKitVSPropsRedirectionDir%. According to MSDN
<http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
A backslash ( \ ) followed by a newline character is interpreted as
a space in the command; use a backslash at the end of a line to
continue a command onto the next line. NMAKE interprets the
backslash literally if any other character, including a space or
tab, follows the backslash.
* JavaScriptCore.vcproj/JavaScriptCore.make:
2010-12-04 Patrick Gansterer <paroga@webkit.org>
Unreviewed, build fix after r69132.
* shell/CMakeLists.txt: Fix directory name (jsc -> shell).
2010-12-04 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
[GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
https://bugs.webkit.org/show_bug.cgi?id=50451
* wtf/gobject/GTypedefs.h: add GdkWindow defines.
2010-12-03 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Oliver Hunt.
Bug 50509 - set* methods on MacroAssembler are awfully named.
Methods set32 and setTest32 compare 32-bit operands, and set a 32-bit results based on the comparison.
set8 compares 32-bit operands, and sets an 8-bit result based on the comparison.
setTest8 compares 8-bit operands, and sets a 32-bit result based on the comparison.
Rename to clarify.
set32 -> set32Compare32
setTest32 -> set32Test32
set8 -> set8Compare32
setTest8 -> set32Test8
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::setPtr):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::set32Compare32):
(JSC::MacroAssemblerARM::set8Compare32):
(JSC::MacroAssemblerARM::set32Test32):
(JSC::MacroAssemblerARM::set32Test8):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::set32Compare32):
(JSC::MacroAssemblerARMv7::set8Compare32):
(JSC::MacroAssemblerARMv7::set32Test32):
(JSC::MacroAssemblerARMv7::set32Test8):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::set8Compare32):
(JSC::MacroAssemblerMIPS::set32Compare32):
(JSC::MacroAssemblerMIPS::set32Test8):
(JSC::MacroAssemblerMIPS::set32Test32):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::set8Compare32):
(JSC::MacroAssemblerX86Common::set32Compare32):
(JSC::MacroAssemblerX86Common::set32Test8):
(JSC::MacroAssemblerX86Common::set32Test32):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_neq):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_neq):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
2010-12-03 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Incorrect logic for returning memory at the end of linking.
Reviewed by Geoff Garen.
At the end of linking we return any space at the end of the
allocated executable region that was saved due to branch
compaction. This is currently by done by subtracting the
different from the m_freePtr in the allocation pool. This
can be incorrect if your allocation was made from a new
page that was not selected for subsequent allocations.
This patch corrects this behaviour by verifying that the
memory being returned actually comes from the current
allocation pool.
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::linkCode):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::tryShrink):
2010-12-03 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough
Changes to significantly reduce branches to branches in JIT'ed
parentheses backtrack processing. The changes include the following:
- Taking the backtracking processing out of line and adding it as
code at the end of the JIT'ed routine.
- Allow backtracks to be direct via an indirect branch for an address
pushed onto the stack. If the use of an indirect branch is from a
conditional jump, then we emit a trampoline at the end of the
routine.
- Propogate backtracks instead of adding trampolines. Backtracks are
propogated to where they are used. This change also eliminated
trampoline branch code that aren't used.
- Added global expression state to keep track of parentheses tail
code and indirect branches.
Other changes made to support these changes.
- Split invertOrCapture flag on Patterns to two separate flags. Added
getters for these flags. Rippled these changes to both the JIT
and interpreter code.
- Split BacktrackDestination out off TermGenerationState struct.
This is done to hold references to a backtrack for later code
generation.
https://bugs.webkit.org/show_bug.cgi?id=50295
* assembler/ARMAssembler.h:
(JSC::ARMAssembler::JmpDst::isSet):
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::JmpDst::isSet):
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::Label::isSet):
(JSC::AbstractMacroAssembler::DataLabelPtr::isUsed):
(JSC::AbstractMacroAssembler::DataLabelPtr::used):
(JSC::AbstractMacroAssembler::JumpList::clear):
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::JmpDst::isSet):
* assembler/X86Assembler.h:
(JSC::X86Assembler::JmpDst::isSet):
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin):
(JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin):
(JSC::Yarr::RegexPatternConstructor::atomBackReference):
(JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
(JSC::Yarr::ByteCompiler::emitDisjunction):
* yarr/RegexInterpreter.h:
(JSC::Yarr::ByteTerm::ByteTerm):
(JSC::Yarr::ByteTerm::BackReference):
(JSC::Yarr::ByteTerm::invert):
(JSC::Yarr::ByteTerm::capture):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::IndirectJumpEntry::IndirectJumpEntry):
(JSC::Yarr::RegexGenerator::IndirectJumpEntry::addJump):
(JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
(JSC::Yarr::RegexGenerator::GenerationState::addIndirectJumpEntry):
(JSC::Yarr::RegexGenerator::GenerationState::emitIndirectJumpTable):
(JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
(JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
(JSC::Yarr::RegexGenerator::GenerationState::addJumpToNextInteration):
(JSC::Yarr::RegexGenerator::GenerationState::addJumpsToNextInteration):
(JSC::Yarr::RegexGenerator::GenerationState::addDataLabelToNextIteration):
(JSC::Yarr::RegexGenerator::GenerationState::linkToNextIteration):
(JSC::Yarr::RegexGenerator::BacktrackDestination::BacktrackDestination):
(JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
(JSC::Yarr::RegexGenerator::BacktrackDestination::clearDataLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::haveDestination):
(JSC::Yarr::RegexGenerator::BacktrackDestination::isStackOffset):
(JSC::Yarr::RegexGenerator::BacktrackDestination::isLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::isJumpList):
(JSC::Yarr::RegexGenerator::BacktrackDestination::haveDataLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::copyTarget):
(JSC::Yarr::RegexGenerator::BacktrackDestination::copyTo):
(JSC::Yarr::RegexGenerator::BacktrackDestination::addBacktrackJump):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setStackOffset):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setNextBacktrackLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackJumpList):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackSourceLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setDataLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setSubDataLabelPtr):
(JSC::Yarr::RegexGenerator::BacktrackDestination::linkToNextBacktrack):
(JSC::Yarr::RegexGenerator::BacktrackDestination::getStackOffset):
(JSC::Yarr::RegexGenerator::BacktrackDestination::getLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::getBacktrackJumps):
(JSC::Yarr::RegexGenerator::BacktrackDestination::getDataLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::jumpToBacktrack):
(JSC::Yarr::RegexGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
(JSC::Yarr::RegexGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
(JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracks):
(JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
(JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
(JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative):
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastAlternative):
(JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
(JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack):
(JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
(JSC::Yarr::RegexGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
(JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump):
(JSC::Yarr::RegexGenerator::TermGenerationState::setDataLabelPtr):
(JSC::Yarr::RegexGenerator::TermGenerationState::setBackTrackStackOffset):
(JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLabel):
(JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks):
(JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo):
(JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLink):
(JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktracks):
(JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktrackJumps):
(JSC::Yarr::RegexGenerator::TermGenerationState::getBacktrackDestination):
(JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom):
(JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
(JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
(JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
(JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::RegexGenerator::generateAssertionBOL):
(JSC::Yarr::RegexGenerator::generateAssertionEOL):
(JSC::Yarr::RegexGenerator::generateAssertionWordBoundary):
(JSC::Yarr::RegexGenerator::generatePatternCharacterSingle):
(JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
(JSC::Yarr::RegexGenerator::generatePatternCharacterFixed):
(JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
(JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
(JSC::Yarr::RegexGenerator::generateCharacterClassSingle):
(JSC::Yarr::RegexGenerator::generateCharacterClassFixed):
(JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
(JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy):
(JSC::Yarr::RegexGenerator::generateParenthesesDisjunction):
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::RegexGenerator::generateParentheticalAssertion):
(JSC::Yarr::RegexGenerator::generateDisjunction):
(JSC::Yarr::RegexGenerator::compile):
* yarr/RegexPattern.h:
(JSC::Yarr::PatternTerm::PatternTerm):
(JSC::Yarr::PatternTerm::invert):
(JSC::Yarr::PatternTerm::capture):
2010-12-03 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
First steps to adding web audio files to build systems
https://bugs.webkit.org/show_bug.cgi?id=49952
* wtf/Complex.h:
2010-12-03 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
Move StringWx.cpp into wtf directory
https://bugs.webkit.org/show_bug.cgi?id=50060
* wtf/wx/StringWx.cpp: Renamed from WebCore/platform/text/wx/StringWx.cpp.
(WTF::String::String):
2010-12-03 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
Move StringBrew.cpp into wtf directory
https://bugs.webkit.org/show_bug.cgi?id=50058
* wtf/brew/StringBrew.cpp: Renamed from WebCore/platform/text/brew/StringBrew.cpp.
(WTF::String::String):
2010-12-03 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
Move StringHaiku.cpp into wtf directory
https://bugs.webkit.org/show_bug.cgi?id=50057
* wtf/haiku/StringHaiku.cpp: Renamed from WebCore/platform/text/haiku/StringHaiku.cpp.
(WTF::String::String):
(WTF::String::operator BString):
2010-12-02 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build.
* runtime/GCActivityCallback.cpp:
(JSC::DefaultGCActivityCallback::synchronize): Added a non-CF implementation.
2010-12-02 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough.
Fixed <rdar://problem/8310571> CrashTracer: 60 crashes in Photo Booth at
com.apple.JavaScriptCore: JSC::Heap::markRoots + 746
* API/APIShims.h:
(JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Call our new
synchronize() function.
* runtime/Collector.cpp:
(JSC::Heap::activityCallback):
* runtime/Collector.h: Added an activityCallback() accessor, for the
call above.
* runtime/GCActivityCallback.h:
(JSC::GCActivityCallback::synchronize):
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::operator()):
(JSC::DefaultGCActivityCallback::synchronize): Track the run loop we're
scheduled in. If we begin/resume execution within a new run loop, reschedule
on it. This prevents a crash when using a lockless context group on
multiple threads -- the crash would happen if the GC timer scheduled on
thread A, then you continued execution on thread B, then the thread A
timer fired.
2010-12-02 Darin Adler <darin@apple.com>
* wtf/ASCIICType.h: Fix wrong type from last check-in.
2010-12-02 Darin Adler <darin@apple.com>
Try to fix certain builds (Qt Windows).
* wtf/ASCIICType.h: Added an overload for unsigned because in obsolete
versions of ICU, UChar32 can be a typedef for unsigned. Adding this
overload should make us compatible with these old ICUs.
2010-12-02 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Add AtomicString::fromUTF8
https://bugs.webkit.org/show_bug.cgi?id=45594
Unicode::calculateStringHashFromUTF8 creates a StringHash out of UTF8 input data and
calculates the required length for the UTF16 conversation in one step.
This is then used in a specialized translator for the string table of AtomicString.
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/text/AtomicString.cpp:
(WTF::CStringTranslator::equal):
(WTF::HashAndUTF8CharactersTranslator::hash):
(WTF::HashAndUTF8CharactersTranslator::equal):
(WTF::HashAndUTF8CharactersTranslator::translate):
(WTF::AtomicString::add):
(WTF::AtomicString::addSlowCase):
(WTF::AtomicString::find):
(WTF::AtomicString::fromUTF8):
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::readUTF8Sequence):
(WTF::Unicode::convertUTF8ToUTF16):
(WTF::Unicode::calculateStringHashFromUTF8):
(WTF::Unicode::equalUTF16WithUTF8):
* wtf/unicode/UTF8.h:
2010-12-02 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Added a little hardening to OSAllocator.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::release):
* wtf/OSAllocatorWin.cpp:
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
(WTF::OSAllocator::release): CRASH() if the OS's virtual memory system
reports an error.
2010-12-02 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Geoffrey Garen.
[Qt] Make platform managing of OSAllocator better than r73106
https://bugs.webkit.org/show_bug.cgi?id=50385
* wtf/OSAllocatorPosix.cpp: Remove platform specific guard.
* wtf/OSAllocatorSymbian.cpp: Remove platform specific guard.
* wtf/OSAllocatorWin.cpp: Remove platform specific guard.
* wtf/wtf.pri: Add the correct platform specific source file instead of all of them.
2010-12-02 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[WINCE] Use GetTickCount() for srand()
https://bugs.webkit.org/show_bug.cgi?id=50338
time() is not a native function on WinCE, so use GetTickCount() instead.
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator):
2010-12-02 Norbert Leser <norbert.leser@nokia.com>
Reviewed by Laszlo Gombos.
[Qt] [Symbian] Reintroduce compiler optimizations for JSC
https://bugs.webkit.org/show_bug.cgi?id=50270
Add compiler optimization (symbian ARM target) which was lost after split from WebCore.
Tested via Sunspider and V8 - both of which show significant performance improvement.
* JavaScriptCore.pro:
2010-12-02 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Move regex parsing and fallback handling to runtime/RegExp.cpp
https://bugs.webkit.org/show_bug.cgi?id=50015
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::create):
(JSC::RegExp::compile):
(JSC::RegExp::match):
(JSC::RegExp::printTraceData):
* runtime/RegExp.h:
(JSC::RegExp::pattern):
* yarr/RegexInterpreter.cpp:
* yarr/RegexInterpreter.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::compile):
(JSC::Yarr::jitCompileRegex):
* yarr/RegexJIT.h:
(JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::setFallBack):
(JSC::Yarr::RegexCodeBlock::isFallBack):
(JSC::Yarr::executeRegex):
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the GTK build.
* GNUmakefile.am: Use a full path to OSAllocator*.cpp.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the EFL Linux build.
* CMakeListsEfl.txt: Added OSAllocator to the project.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the Qt build: Include all OS files for Qt's sake, and then
use #ifdefs in the files to exclude things based on OS.
This is a pretty bad way to manage platforms -- hopefully we can
fix the Qt build system and move away from this in the future.
* wtf/OSAllocatorPosix.cpp:
* wtf/OSAllocatorSymbian.cpp:
* wtf/OSAllocatorWin.cpp:
* wtf/wtf.pri:
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the Chromium build.
* JavaScriptCore.gypi: This is a Windows build file, so use OSAllocatorWin.cpp.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the GTK build.
* GNUmakefile.am: Added OSAllocator to another project.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the GTK Linux build.
* JavaScriptCore.gypi: Added OSAllocator to the project.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the Qt Linux build.
* wtf/OSAllocatorPosix.cpp: Use the right errno.h.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build: export some more symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the Qt Linux build.
* wtf/wtf.pri: Use the POSIX OSAllocator for Qt Linux.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Windows build fix: commit doesn't have a return value.
* wtf/OSAllocatorWin.cpp:
(WTF::OSAllocator::commit):
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Build fix: Export some symbols.
* JavaScriptCore.exp:
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Build fix.
* JavaScriptCore.xcodeproj/project.pbxproj: Export OSAllocator.h as private
so other projects can see it.
* wtf/OSAllocatorPosix.cpp: #include UnusedParam.h for UNUSED_PARAM.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Baby step toward a cross-platform virtual memory abstraction: created
an all-static OSAllocator class and changed MarkStack to use it.
* JavaScriptCore.exp: These functions are inlined now.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OSAllocatorWin.cpp.
* JavaScriptCore.xcodeproj/project.pbxproj: Added OSAllocatorPosix.cpp.
* runtime/MarkStack.h:
(JSC::MarkStack::allocateStack):
(JSC::MarkStack::releaseStack): Use OSAllocator instead of rolling our
own platform-specific code.
* runtime/MarkStackNone.cpp: Removed. Nothing used this.
* runtime/MarkStackPosix.cpp:
* runtime/MarkStackSymbian.cpp:
* runtime/MarkStackWin.cpp: Removed custom platform-specific code, since
we use the OSAllocator abstraction now.
* wtf/OSAllocator.h: Added.
* wtf/OSAllocatorPosix.cpp: Added.
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
(WTF::OSAllocator::release):
* wtf/OSAllocatorSymbian.cpp: Added.
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
(WTF::OSAllocator::release):
* wtf/OSAllocatorWin.cpp: Added.
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
(WTF::OSAllocator::release): The new OSAllocator abstraction.
* wtf/wtf.pri: Added OSAllocatorSymbian.cpp.
2010-12-01 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
WinCairo build should not use link-time code generation (LTCG)
https://bugs.webkit.org/show_bug.cgi?id=50353
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
010-12-01 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
vcproj changes can't be applied cleanly by the Windows EWS bot
https://bugs.webkit.org/show_bug.cgi?id=50328
* JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modified property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Modified property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Modified property svn:eol-style.
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/jsc/jsc.vcproj: Modified property svn:eol-style.
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/testapi/testapi.vcproj: Modified property svn:eol-style.
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added property svn:eol-style.
2010-12-01 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 50298 - /()()()()()()()()()(?:(\10a|b)(X|Y))+/.exec("bXXaYYaY") ASSERTs
For unmatched subpattens we previously used to set the subpattern end to -1,
but now we only set the start value. E.g. consider the following:
/a(b)?c/.exec("ac");
Previously we would generate an internal results array of:
[ 0, 2, -1, -1 ]
Since fairly recently we have generated results of:
[ 0, 2, -1, ??? ]
(With the end index of the subpattern uninitialized).
Update these ASSERTs to account for this.
Also, when stripping out self-referencing backreferences, (e.g. /(\1)/) we
were checking the wrong property on the pattern term. We should have been
looking at term.parentheses.subpatternId, but instead were checking
term.subpatternId. The latter is actually only the subpatternId for
back reference terms. Rename this to backReferenceSubpatternId.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchBackReference):
(JSC::Yarr::Interpreter::backtrackBackReference):
2010-11-30 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig.
Bug 50297 - \s in YARR should match BOMs.
From section 15.10.2.12 CharacterClassEscape contains:
The production CharacterClassEscape :: s evaluates by returning the set of characters containing the
characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions.
Table 2 in section 7.2 contains:
\uFEFF Byte Order Mark <BOM>
* create_regex_tables:
Add BOM to spaces table.
2010-11-30 Gavin Barraclough <barraclough@apple.com>
Reviewed by Darin Adler.
Fixed review comments following bug #48101.
Mostly typos, plus gave quantifyInfinite a symbolic name.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
(JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
(JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
(JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
(JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
* yarr/RegexParser.h:
(JSC::Yarr::Parser::parseTokens):
(JSC::Yarr::parse):
2010-11-30 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
WTF project missing build-stopping code from its pre-build event
https://bugs.webkit.org/show_bug.cgi?id=50281
* JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
2010-11-30 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Cleanup UTF8.cpp
https://bugs.webkit.org/show_bug.cgi?id=49581
Use macros and functions instead of range values directly.
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::inlineUTF8SequenceLength):
(WTF::Unicode::UTF8SequenceLength):
(WTF::Unicode::convertUTF16ToUTF8):
(WTF::Unicode::readUTF8Sequence):
(WTF::Unicode::convertUTF8ToUTF16):
* wtf/unicode/UnicodeMacrosFromICU.h: Added U_IS_SUPPLEMENTARY macro.
2010-11-30 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough.
Fixed a crash seen when using a PageAllocation to store itself.
* wtf/PageAllocation.h:
(WTF::PageAllocation::systemDeallocate): Zero out m_base before unmapping
it, in case unmapping m_base unmaps the PageAllocation.
* wtf/BumpPointerAllocator.h:
(WTF::BumpPointerPool::destroy): Now this work-around isn't needed!
2010-11-30 Xan Lopez <xlopez@igalia.com>
Reviewed by Darin Adler.
m_hasNonEnumerableProperties is never initialized in Structure
https://bugs.webkit.org/show_bug.cgi?id=50266
* runtime/Structure.cpp:
(JSC::Structure::Structure): initialize member variable.
2010-11-29 Steve Falkenburg <sfalken@apple.com>
Windows build fix (part 1). Use correct environment variable syntax in cmd files.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd:
* JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
* JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
* JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
* JavaScriptCore.vcproj/jsc/jscPreLink.cmd:
* JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
* JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
* JavaScriptCore.vcproj/testapi/testapiPreLink.cmd:
2010-11-29 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
WTF support for <rdar://problem/8650085> adding word-prefix search options to the text search API.
https://bugs.webkit.org/show_bug.cgi?id=50038
* wtf/unicode/UnicodeMacrosFromICU.h: Copied additional macros from icu/unicode/utf16.h.
2010-11-29 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
JavaScriptCore projects on Windows should use cmd files for build events
https://bugs.webkit.org/show_bug.cgi?id=50193
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Added.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Added.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Added.
* JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added property svn:eol-style.
* JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added property svn:eol-style.
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
* JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Added.
* JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Added.
* JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Added.
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
* JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Added.
* JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Added.
* JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Added.
2010-11-29 Dai Mikurube <dmikurube@google.com>
Reviewed by Kent Tamura.
when empty, clicking "down" on outer-spin-button returns "max value"
https://bugs.webkit.org/show_bug.cgi?id=45491
It is required to calculate UTC/DST offsets to retrieve the current local milliseconds for
date/time type inputs. WTF::currentTimeMS() returns a UTC time, and WTF::getLocalTime()
returns a struct tm, not milliseconds.
Calculating milliseconds from a struct tm is not simple since timegm() cannot be used in all
environments. This calculation is already done in calculateUTCOffset(), and complicated.
Duplicating this complicated calculation is unreasonable because of maintainability.
To achieve this without duplication, we must call calculate{UTC|DST}Offset in some way.
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/DateMath.cpp: Changed calculateUTCOffset() and calculateDSTOffset() to external functions.
(WTF::calculateUTCOffset):
(WTF::calculateDSTOffset):
* wtf/DateMath.h:
2010-11-29 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Switch web audio code to use FloatPoint3D instead of Vector3
https://bugs.webkit.org/show_bug.cgi?id=50186
* wtf/Vector3.h: Removed.
2010-11-29 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Add a mechanism for Windows pre-build/pre-link/post-build events to be separated into individual cmd files
https://bugs.webkit.org/show_bug.cgi?id=49858
We're migrating our prebuild/prelink/postbuild steps out of vcproj and vsprops files:
- To simplify editing (editing vsprops build steps is confusing).
- For more readable diffs.
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added.
* JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added.
2010-11-29 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough.
Improved accuracy of command-line SunSpider.
* jsc.cpp:
(functionRun): Changed the "run" function to run a given test in
its own global object. Previously, all tests ran in the same global
object, which created name conflicts, and made globals from previous
tests artificially survive into later tests.
Also changed "run" to return the elapsed milliseconds when running a
given test, for slightly more accurate numbers.
(functionCheckSyntax): Ditto on returning elapsed milliseconds.
2010-11-29 Darin Adler <darin@apple.com>
Reviewed by Andreas Kling.
Remove a couple unneeded overflow checks
https://bugs.webkit.org/show_bug.cgi?id=49816
* wtf/text/CString.cpp:
(WTF::CString::init): Use an ASSERT instead of
an overflow check with CRASH.
2010-11-29 Adam Roben <aroben@apple.com>
Robustify react-to-vsprops-changes.py against changes to its location
or the location of the .vsprops files
Suggested by John Sullivan.
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
Removed file_modification_times.
(main): Use glob.glob to find the .vsprops files and assert that we found some.
2010-11-29 Adam Roben <aroben@apple.com>
Touch wtf/Platform.h whenever any .vsprops file changes
This will cause all files to be recompiled, which will make changes to
preprocessor macros (e.g., ENABLE_*) actually take effect.
Fixes <http://webkit.org/b/50167> Windows build fails when ENABLE_*
macros are changed (because not enough files are rebuilt)
Reviewed by John Sullivan.
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
(main): Touch wtf/Platform.h if it's older than any .vsprops file. Also
added some comments and logging to make it clearer what the script is
doing and why.
2010-11-29 Adam Roben <aroben@apple.com>
Update react-to-vsprops-changes.py after r72555
.vsprops files are no longer accessed relative to $WebKitLibrariesDir.
Fixes <http://webkit.org/b/50166> REGRESSION (r72555):
react-to-vsprops-changes.py no longer works for people with a
non-default $WebKitLibrariesDir
Reviewed by John Sullivan.
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
(main): Always look in WebKitLibraries/win for .vsprops files, not in
$WebKitLibrariesDir.
2010-11-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 48100 - YARR allows what seems like a bogus character-class range
Per ECMA-262 character classes containing character ranges containing
character classes are invalid, eg:
/[\d-x]/
/[x-\d]/
/[\d-\d]/
These should throw a syntax error.
* yarr/RegexParser.h:
2010-11-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 48101 - Yarr gives different results for /(?:a*?){2,}/
The test cases in the linked mozilla bug demonstrate a couple of
problems in subpattern matching. These bugs lie in the optimized
cases - for matching parentheses with a quantity count of 1, and
for matching greedy quantified parentheses at the end of a regex
(which do not backtrack).
In both of these cases we are failing to correctly handle empty
matches. In the case of parentheses-single matches (quantity count
one) we are failing to test for empty matches at all. In the case
of terminal subpattern matches we do currently check, however there
is a subtler bug here too. In the case of an empty match we will
presently immediately fall through to the next alternative (or
complete the regex match), whereas upon a failed match we should
be backtracking into the failing alternative, to give it a chance
to match further (e.g. consider /a??b?|a/.exec("ab") - upon first
attempting to match the first alternative this will match the empty
string - since a?? is non-greedy, however rather than moving on to
the second alternative we should be re-matching the first one, at
which point the non-greedy a?? will match, and as such the result
should be "ab", not "a").
Terminal subpattern matching contains a second bug, too. The frame
location values in the subpattern should be being allocated with
the outer disjunction's frame (as we do for the parentheses-single
optimization). Consider the following three regexes:
/a*(?:b*)*c*/
/a*(?:b*)c*/
/a*(?:b*)*/
Considering only the frame location required by the atoms a,b, and
c, (ignoring space associated with the nested subpattern) the first
regex (a normal subpattern match) requires a frame size of 2 for
the outer disjunction, (to backtrack terms a & c), with each
iteration of the subpattern requiring a frame of size 1 (in order
to backtrack b). In the case of the second regex (where the
parentheses-single optimization will kick in) the outer frame must
be set up with a frame size of 3, since the outer frame will also
be used when running the nested subpattern. We will currently only
allocate a farme of size 1 for the outer disjuntion (to contain a),
howver the frame size should be 2 (since the subpattern will be
evaluated in the outer frame). In addition to failing to allocate
frame space the frame offsets are also presently invalid - in the
case of the last regex b's frame location will be set assuming it
to be the first term in the frame, whereas in this case b lies
after the term a, and should be taking a separate frame location.
In order to correctly allocate the frame for terminal subpattern
matches we must move this optimization back up from the JIT into
the compiler (and thus interpreter too), since this is where the
frame allocation takes place.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets):
(JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
(JSC::Yarr::compileRegex):
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
(JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
(JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
(JSC::Yarr::ByteCompiler::emitDisjunction):
* yarr/RegexInterpreter.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::RegexGenerator::generateTerm):
* yarr/RegexPattern.h:
(JSC::Yarr::PatternTerm::PatternTerm):
2010-11-24 Patrick Gansterer <paroga@webkit.org>
Reviewed by Csaba Osztrogonác.
Remove Bakefile build system files
https://bugs.webkit.org/show_bug.cgi?id=49983
r53757 only removed the content, but not the files.
This patch removes that empty files.
* JavaScriptCoreSources.bkl: Removed.
* jscore.bkl: Removed.
2010-11-24 Gabor Loki <loki@webkit.org>
Reviewed by Csaba Osztrogonác.
Merge the usage of jumps and calls at ARM-JIT
https://bugs.webkit.org/show_bug.cgi?id=50008
Those JmpSrc objects which represent jumps (not calls) should point to
after the jump instruction.
* assembler/ARMAssembler.h:
(JSC::ARMAssembler::blx):
(JSC::ARMAssembler::loadBranchTarget):
(JSC::ARMAssembler::getAbsoluteJumpAddress):
(JSC::ARMAssembler::linkJump):
(JSC::ARMAssembler::relinkJump):
(JSC::ARMAssembler::linkCall):
(JSC::ARMAssembler::relinkCall):
(JSC::ARMAssembler::getRelocatedAddress):
(JSC::ARMAssembler::getDifferenceBetweenLabels):
(JSC::ARMAssembler::getCallReturnOffset):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::call):
2010-11-24 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Xan Lopez.
[GTK] Optimize foldCase, toLower and toUpper methods in glib unicode backend
https://bugs.webkit.org/show_bug.cgi?id=48625
GLib methods use UTF-8 strings, so we have to convert from UTF-16 to
UTF-8 to perform the case operations and then convert back the result to
UTF-16. GLib conversion methods return a new allocated string, so we
have to memcpy the result into the destination buffer too. Using our
own methods to convert between UTF-8 and UTF-16 from wtf/unicode/UTF8.h
we don't need such memcpy, since they take an already allocated buffer
rather than returning a new one. There's another optimization for the
case when the destination buffer is not large enough. In that case,
methods should return the expected destination buffer size and are
called again with a new buffer. We can avoid the conversion to UTF-16 by
pre-calculating the required size for the destination buffer.
* wtf/unicode/glib/UnicodeGLib.cpp:
(WTF::Unicode::getUTF16LengthFromUTF8):
(WTF::Unicode::convertCase):
(WTF::Unicode::foldCase):
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
2010-11-23 Patrick Gansterer <paroga@webkit.org>
Reviewed by Sam Weinig.
Use WTF::StringHasher directly in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=49893
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::Hash::hash):
* runtime/Identifier.cpp:
(JSC::IdentifierCStringTranslator::hash):
(JSC::IdentifierUCharBufferTranslator::hash):
2010-11-22 Patrick Gansterer <paroga@webkit.org>
Reviewed by Sam Weinig.
Add WTF::FixedArray::size()
https://bugs.webkit.org/show_bug.cgi?id=49891
Add a method to get the size of a FixedArray.
* wtf/FixedArray.h:
(WTF::FixedArray::size):
2010-11-22 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Roben.
[WINCE] Set correct preprocessor definitions
https://bugs.webkit.org/show_bug.cgi?id=49887
* wtf/Platform.h:
2010-11-22 Adam Roben <aroben@apple.com>
Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files
Apple's Windows build allows placing header files and import libraries for WebKit's
dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the
$WebKitLibrariesDir environment variable. This is both required for production builds and
convenient for Apple-internal developer builds. Apple's production builds also require that
WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production
builds, the files are copied into that directory tree by the
WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the
copying is done by
JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make.
This .vsprops copying is problematic in one very important case: when a developer updates
their source tree and then tries to build. Visual Studio only reads .vsprops files when a
project is first loaded. So, when Visual Studio is first opened after the .vsprops files are
updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a
build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into
$WebKitLibrariesDir, but Visual Studio will not pick up the changes. The rest of the build
will proceed with out-of-date .vsprops files, which will likely result in a build failure.
To fix this, we now use normal relative paths to access the .vsprops files in the source
tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment
variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is
unset, so the normal relative paths are used to read the .vsprops files out of the source
tree directly. In production builds, this environment variable is set to a fake directory
that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path
is resolved.
For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops:
$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the
files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds,
JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to
"$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for
FeatureDefines.vsprops becomes:
$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
which resolves to:
$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
(We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3"
actually exist since they are matched by an equal number of ".." path components.)
Note that Visual Studio still won't pick up changes made to .vsprops files while Visual
Studio is open, but that problem hasn't seemed to cause developers many headaches so far.
Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are
updated
Reviewed by Dave Hyatt.
* JavaScriptCore.vcproj/JavaScriptCore.make: Set $WebKitVSPropsRedirectionDir so that
production builds can find the .vsprops files.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stopy copying the
.vsprops files. It isn't needed anymore.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops
files.
2010-11-19 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
YARR JIT should fallback to YARR Interpreter instead of PCRE.
https://bugs.webkit.org/show_bug.cgi?id=46719
Remove the ENABLE_YARR macro and the option of matching regular
expressions with PCRE from JavaScriptCore.
* runtime/JSGlobalData.h:
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
(JSC::RegExp::match):
* tests/mozilla/expected.html:
* wtf/Platform.h:
* yarr/RegexCompiler.cpp:
* yarr/RegexCompiler.h:
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::byteCompileRegex):
* yarr/RegexInterpreter.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::jitCompileRegex):
* yarr/RegexJIT.h:
(JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::getFallback):
(JSC::Yarr::RegexCodeBlock::isFallback):
(JSC::Yarr::RegexCodeBlock::setFallback):
(JSC::Yarr::executeRegex):
* yarr/RegexParser.h:
* yarr/RegexPattern.h:
2010-11-20 Kwang Yul Seo <skyul@company100.net>
Reviewed by David Kilzer.
[BREWMP] Replace DBGPRINTF and DBGPRINTF_FATAL with dbg_Message
https://bugs.webkit.org/show_bug.cgi?id=49520
DBGPRINTF and DBGPRINTF_FATAL macros are prohibited in Mod1. Use dbg_Message instead.
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2010-11-20 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Support JIT_OPTIMIZE_MOD on Thumb-2
https://bugs.webkit.org/show_bug.cgi?id=49432
Rewrite the soft modulo operation into macroassembler form, and move it
to JSValue32_64 section.
Add support for soft modulo on Thumb-2 JIT also.
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::clz):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::countLeadingZeros32):
(JSC::MacroAssemblerARM::relativeTableJump):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::countLeadingZeros32):
(JSC::MacroAssemblerARMv7::relativeTableJump):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::softModulo):
* jit/JITStubs.cpp:
(JSC::JITThunks::JITThunks):
* wtf/Platform.h:
2010-11-20 David Kilzer <ddkilzer@apple.com>
<http://webkit.org/b/49848> Make it possible to display the last character of a secure text field unobscured
Reviewed by Darin Adler.
* JavaScriptCore.exp:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::secure): Added argument that controls whether
the last character is obscured or not. Implemented behavior.
* wtf/text/StringImpl.h:
(WTF::StringImpl::LastCharacterBehavior): Added enum.
(WTF::StringImpl::secure): Updated method signature.
2010-11-19 William Chan <willchan@chromium.org>
Reviewed by David Levin.
Add USE(CHROMIUM_NET)
Indicates the use of Chromium's network stack. Chromium's network
stack performs better when it has full view of all resource requests,
so USE(CHROMIUM_NET) can be used to bypass throttles.
https://bugs.webkit.org/show_bug.cgi?id=49778
* wtf/Platform.h:
2010-11-19 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files
https://bugs.webkit.org/show_bug.cgi?id=49819
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
2010-11-19 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Don't check for constant registers when we can guarantee that the register won't be in the constant pool
https://bugs.webkit.org/show_bug.cgi?id=49814
Add uncheckedR(int) to CallFrame, and replace all the uses of r() with uncheckedR()
when we can guarantee that the register is not referring to a constant.
This makes the interpreter about 0.5% faster, and makes the CallFrame initialisation
logic correct when we're using a faked callframe (as in the case of the globalExec).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::createActivation):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::thisObject):
* interpreter/CallFrame.h:
(JSC::ExecState::uncheckedR):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBase):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::callEval):
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::createExceptionScope):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/JSActivation.cpp:
(JSC::JSActivation::argumentsGetter):
2010-11-19 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
Normalize Cairo/CFLite project/solution configuration names
https://bugs.webkit.org/show_bug.cgi?id=49818
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
2010-11-18 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Windows vcproj configuration names should be normalized across projects
https://bugs.webkit.org/show_bug.cgi?id=49776
* JavaScriptCore.vcproj/JavaScriptCore.sln:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added.
* JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
2010-11-19 Patrick Gansterer <paroga@webkit.org>
Unreviewed, build fix after r72360.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
2010-11-18 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Geoff Garen.
Bug 49577 - Function.prototype should be non-configurable
Ooops, Function.prototype should not be enumerable!
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
2010-11-18 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 49708 - Stop recompiling functions to regenerate exception info.
Instead only hold info as necessary – keep divot info is the inspector
is enabled, line number info is debugging or profiling, and handler
info for functions with try/catch.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpStatistics):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
(JSC::CodeBlock::addExpressionInfo):
(JSC::CodeBlock::addLineInfo):
(JSC::CodeBlock::hasExpressionInfo):
(JSC::CodeBlock::hasLineInfo):
(JSC::CodeBlock::needsCallReturnIndices):
(JSC::CodeBlock::callReturnIndexVector):
* bytecode/SamplingTool.cpp:
(JSC::SamplingTool::dump):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitNode):
(JSC::BytecodeGenerator::emitNodeInConditionContext):
(JSC::BytecodeGenerator::emitExpressionInfo):
(JSC::BytecodeGenerator::addLineInfo):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::throwException):
(JSC::Interpreter::privateExecute):
(JSC::Interpreter::retrieveLastCaller):
* interpreter/Interpreter.h:
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JITStubs.cpp:
(JSC::jitThrow):
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Collector.cpp:
(JSC::Heap::markRoots):
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
* runtime/Executable.h:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::usingAPI):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::supportsRichSourceInfo):
(JSC::JSGlobalObject::globalData):
2010-11-18 Adam Roben <aroben@apple.com>
Add a script to delete manifest-related files when they are older than
any .vsprops file
Changes to .vsprops files can cause the manifest files to become
invalid, and Visual Studio doesn't always figure out that it needs to
rebuild them.
Reviewed by Sam Weinig.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
Call the new script.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
Added the new script.
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Added.
(file_modification_times): Generator to return the modification time of
each file in a directory hierarchy.
(main): Get the modification time of the newest vsprops file, then find
all manifest-related files in the obj directory. Delete all
manifest-related files that are older than the newest vsprops file.
2010-11-18 Mark Rowe <mrowe@apple.com>
Rubber-stamped by Adam Roben.
<rdar://problem/8602509&8602717&8602724> Enable compaction support.
* Configurations/JavaScriptCore.xcconfig:
2010-11-18 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 49635 - Profiler implementation is fragile
The profile presently requires the exception handling mechanism to explicitly
remove all stack frames that are exited during the exception unwind mechanism.
This is fragile in a number of ways:
* We have to change bytecode register allocation when compiling code to run
when profiling, to preserve the callee function (this is also required to
call did_call after the call has returned).
* In the JIT we have to maintain additional data structures
(CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
containing the callee.
* In the interpreter we use 'magic values' to offset into the instruction
stream to rediscover the register containing the function.
Instead, move profiling into the head and tail of functions.
* This correctly accounts the cost of the call itself to the caller.
* This allows us to access the callee function object from the callframe.
* This means that at the point a call is made we can track the stack depth
on the ProfileNode.
* When unwinding we can simply report the depth at which the exception is
being handled - all call frames above this level are freed.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
(JSC::CodeBlock::methodCallLinkInfo):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallVarargs):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* profiler/Profile.cpp:
(JSC::Profile::Profile):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::addParentForConsoleStart):
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
(JSC::ProfileGenerator::exceptionUnwind):
(JSC::ProfileGenerator::stopProfiling):
* profiler/ProfileGenerator.h:
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::ProfileNode):
(JSC::ProfileNode::willExecute):
* profiler/ProfileNode.h:
(JSC::ProfileNode::create):
(JSC::ProfileNode::callerCallFrame):
* profiler/Profiler.cpp:
(JSC::dispatchFunctionToProfiles):
(JSC::Profiler::_willExecute):
(JSC::Profiler::_didExecute):
(JSC::Profiler::exceptionUnwind):
* profiler/Profiler.h:
2010-11-18 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Remove leftover Windows Debug_Internal configurations
https://bugs.webkit.org/show_bug.cgi?id=49758
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
2010-11-18 Chao-ying Fu <fu@mips.com>
Reviewed by Csaba Osztrogonác.
Avoid increasing required alignment of target type warning
https://bugs.webkit.org/show_bug.cgi?id=43963
* runtime/UString.h:
(JSC::UStringHash::equal):
* wtf/StdLibExtras.h:
2010-11-17 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Add stubbed out ScrollAnimator for the Mac
https://bugs.webkit.org/show_bug.cgi?id=49678
* wtf/Platform.h: Enable SMOOTH_SCROLLING on the Mac, this has no
change in behavior at the moment.
2010-11-17 David Kilzer <ddkilzer@apple.com>
<http://webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit
Reviewed by Darin Adler.
Add an explicit overflow check prior to allocating our buffer,
rather than implicitly relying on the guard in convertUTF16ToUTF8.
* wtf/text/WTFString.cpp:
(WTF::String::utf8):
2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r72197.
http://trac.webkit.org/changeset/72197
https://bugs.webkit.org/show_bug.cgi?id=49661
broke fast/regex/test1.html (Requested by stampho on #webkit).
* runtime/JSGlobalData.h:
* runtime/RegExp.cpp:
(JSC::RegExpRepresentation::~RegExpRepresentation):
(JSC::RegExp::compile):
(JSC::RegExp::match):
* tests/mozilla/expected.html:
* wtf/Platform.h:
* yarr/RegexCompiler.cpp:
* yarr/RegexCompiler.h:
* yarr/RegexInterpreter.cpp:
* yarr/RegexInterpreter.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::jitCompileRegex):
* yarr/RegexJIT.h:
(JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::getFallback):
(JSC::Yarr::RegexCodeBlock::setFallback):
(JSC::Yarr::executeRegex):
* yarr/RegexParser.h:
* yarr/RegexPattern.h:
2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
YARR JIT should fallback to YARR Interpreter instead of PCRE.
https://bugs.webkit.org/show_bug.cgi?id=46719
Remove the ENABLE_YARR macro and the option of matching regular
expressions with PCRE from JavaScriptCore.
* runtime/JSGlobalData.h:
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
(JSC::RegExp::match):
* tests/mozilla/expected.html:
* wtf/Platform.h:
* yarr/RegexCompiler.cpp:
* yarr/RegexCompiler.h:
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::byteCompileRegex):
* yarr/RegexInterpreter.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::jitCompileRegex):
* yarr/RegexJIT.h:
(JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::getFallback):
(JSC::Yarr::RegexCodeBlock::isFallback):
(JSC::Yarr::RegexCodeBlock::setFallback):
(JSC::Yarr::executeRegex):
* yarr/RegexParser.h:
* yarr/RegexPattern.h:
2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Extend YARR Interpreter with beginning character look-up optimization
https://bugs.webkit.org/show_bug.cgi?id=45751
Add beginning character look-up optimization which sets the start
index to the first possible successful pattern match.
Extend YARR Interpreter with lookupForBeginChars function which
implements the beginning character look-up optimization.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::InputStream::readPair):
(JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
(JSC::Yarr::Interpreter::lookupForBeginChars):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::Interpreter::interpret):
* yarr/RegexInterpreter.h:
(JSC::Yarr::BytecodePattern::BytecodePattern):
2010-11-17 Alexis Menard <alexis.menard@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Kenneth Christiansen, Tor Arne Vestbø.
[Qt] Add support for use GStreamer with the Qt build
Enable the build/inclusion of the wtf/QObject convenience classes.
* JavaScriptCore.pri:
* wtf/wtf.pri:
2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Collect the beginning characters in a RegExp pattern for look-up
optimization
https://bugs.webkit.org/show_bug.cgi?id=45748
Extend the YARR's parser with an algorithm which collects the potential
beginning characters from a RegExp pattern for later look-up optimization.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::BeginCharHelper::BeginCharHelper):
(JSC::Yarr::BeginCharHelper::addBeginChar):
(JSC::Yarr::BeginCharHelper::merge):
(JSC::Yarr::BeginCharHelper::addCharacter):
(JSC::Yarr::BeginCharHelper::linkHotTerms):
(JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor):
(JSC::Yarr::RegexPatternConstructor::addBeginTerm):
(JSC::Yarr::RegexPatternConstructor::setupDisjunctionBeginTerms):
(JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
(JSC::Yarr::RegexPatternConstructor::setupBeginChars):
(JSC::Yarr::compileRegex):
* yarr/RegexPattern.h:
(JSC::Yarr::TermChain::TermChain):
(JSC::Yarr::BeginChar::BeginChar):
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r72160.
http://trac.webkit.org/changeset/72160
https://bugs.webkit.org/show_bug.cgi?id=49646
Broke lots of fast/profiler tests, among others (Requested by
aroben on #webkit).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::functionRegisterForBytecodeOffset):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::addFunctionRegisterInfo):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallVarargs):
(JSC::BytecodeGenerator::emitReturn):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
(JSC::CallArguments::profileHookRegister):
* bytecompiler/NodesCodegen.cpp:
(JSC::CallArguments::CallArguments):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* profiler/Profile.cpp:
(JSC::Profile::Profile):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::addParentForConsoleStart):
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
(JSC::ProfileGenerator::stopProfiling):
* profiler/ProfileGenerator.h:
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::ProfileNode):
(JSC::ProfileNode::willExecute):
* profiler/ProfileNode.h:
(JSC::ProfileNode::create):
(JSC::ProfileNode::operator==):
* profiler/Profiler.cpp:
(JSC::dispatchFunctionToProfiles):
(JSC::Profiler::willExecute):
(JSC::Profiler::didExecute):
* profiler/Profiler.h:
2010-11-16 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 49635 - Profiler implementation is fragile
The profile presently requires the exception handling mechanism to explicitly
remove all stack frames that are exited during the exception unwind mechanism.
This is fragile in a number of ways:
* We have to change bytecode register allocation when compiling code to run
when profiling, to preserve the callee function (this is also required to
call did_call after the call has returned).
* In the JIT we have to maintain additional data structures
(CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
containing the callee.
* In the interpreter we use 'magic values' to offset into the instruction
stream to rediscover the register containing the function.
Instead, move profiling into the head and tail of functions.
* This correctly accounts the cost of the call itself to the caller.
* This allows us to access the callee function object from the callframe.
* This means that at the point a call is made we can track the stack depth
on the ProfileNode.
* When unwinding we can simply report the depth at which the exception is
being handled - all call frames above this level are freed.
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
(JSC::CodeBlock::methodCallLinkInfo):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallVarargs):
(JSC::BytecodeGenerator::emitReturn):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
(JSC::CallArguments::count):
* bytecompiler/NodesCodegen.cpp:
(JSC::CallArguments::CallArguments):
* interpreter/Interpreter.cpp:
(JSC::ProfileHostCall::ProfileHostCall):
(JSC::ProfileHostCall::~ProfileHostCall):
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_profile_has_called):
(JSC::JIT::emit_op_profile_will_return):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_profile_has_called):
(JSC::JIT::emit_op_profile_will_return):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* profiler/Profile.cpp:
(JSC::Profile::Profile):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::addParentForConsoleStart):
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
(JSC::ProfileGenerator::exceptionUnwind):
(JSC::ProfileGenerator::stopProfiling):
* profiler/ProfileGenerator.h:
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::ProfileNode):
(JSC::ProfileNode::willExecute):
* profiler/ProfileNode.h:
(JSC::ProfileNode::create):
(JSC::ProfileNode::operator==):
(JSC::ProfileNode::exec):
* profiler/Profiler.cpp:
(JSC::dispatchFunctionToProfiles):
(JSC::Profiler::hasCalled):
(JSC::Profiler::willEvaluate):
(JSC::Profiler::willReturn):
(JSC::Profiler::didEvaluate):
(JSC::Profiler::exceptionUnwind):
* profiler/Profiler.h:
2010-11-16 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben and Steve Falkenburg.
Touch Platform.h to force a rebuild for Windows.
* wtf/Platform.h:
2010-11-16 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Disable LTCG for Windows Release builds. Add new Release_LTCG configuration.
https://bugs.webkit.org/show_bug.cgi?id=49632
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
2010-11-16 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
The number of recursive match calls isn't limited in YARR Interpreter
https://bugs.webkit.org/show_bug.cgi?id=47906
Check the number of the matchDisjunction recursive calls to avoid unbounded
recursion.
Now the matchDisjunction function returns JSRegExpResult instead of bool.
The JSRegExpResult enum contains the result of matching or the error code
of the failure (like HitLimit) which terminates the matching.
The error codes are based on pcre's jsRegExpExecute error codes.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::parenthesesDoBacktrack):
(JSC::Yarr::Interpreter::matchParentheses):
(JSC::Yarr::Interpreter::backtrackParentheses):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::Interpreter::matchNonZeroDisjunction):
(JSC::Yarr::Interpreter::interpret):
(JSC::Yarr::Interpreter::Interpreter):
* yarr/RegexInterpreter.h:
2010-11-16 Brian Weinstein <bweinstein@apple.com>
Rest of the Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-11-16 Gavin Barraclough <barraclough@apple.com>
Windows build fix pt 1.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-11-16 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=49606
The bug here is that we read the prototype from the RHS argument using a regular
op_get_by_id before op_instanceof has checked that this is an object implementing
HasInstance. This incorrect behaviour gives rise to further unnecessary complexity
in the code base, since we have additional logic (implemented using the
GetByIdExceptionInfo data structures on CodeBlock) to convert not an object errors
from the get_by_id into invalid parameter errors. Having fixed this bug this code
is all redundant, since in these cases the get_by_id will never have been reached.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::addExpressionInfo):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitCheckHasInstance):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::InstanceOfNode::emitBytecode):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_check_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_check_has_instance):
(JSC::JIT::emitSlow_op_instanceof):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_check_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_check_has_instance):
(JSC::JIT::emitSlow_op_instanceof):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* runtime/ExceptionHelpers.cpp:
(JSC::createInterruptedExecutionException):
(JSC::createTerminatedExecutionException):
(JSC::createUndefinedVariableError):
(JSC::createNotAFunctionError):
(JSC::createNotAnObjectError):
* runtime/ExceptionHelpers.h:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
* runtime/JSNotAnObject.cpp:
(JSC::JSNotAnObject::toPrimitive):
(JSC::JSNotAnObject::getPrimitiveNumber):
(JSC::JSNotAnObject::toBoolean):
(JSC::JSNotAnObject::toNumber):
(JSC::JSNotAnObject::toString):
(JSC::JSNotAnObject::toObject):
(JSC::JSNotAnObject::getOwnPropertySlot):
(JSC::JSNotAnObject::getOwnPropertyDescriptor):
(JSC::JSNotAnObject::put):
(JSC::JSNotAnObject::deleteProperty):
(JSC::JSNotAnObject::getOwnPropertyNames):
* runtime/JSNotAnObject.h:
(JSC::JSNotAnObject::JSNotAnObject):
* runtime/JSObject.h:
(JSC::JSObject::isActivationObject):
* runtime/JSValue.cpp:
(JSC::JSValue::toObjectSlowCase):
(JSC::JSValue::synthesizeObject):
(JSC::JSValue::synthesizePrototype):
2010-11-15 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Harden additional string functions against large lengths
https://bugs.webkit.org/show_bug.cgi?id=49574
* wtf/text/CString.cpp:
(WTF::CString::init): Check for length that is too large for CString.
(WTF::CString::newUninitialized): Ditto.
(WTF::CString::copyBufferIfNeeded): Fix types so the length stays
in a size_t.
* wtf/text/WTFString.cpp:
(WTF::String::append): Check for length that is too large.
2010-11-15 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 49577 - Function.prototype should be non-configurable
JSC lazily allocates the prototype property of Function objects.
We check the prototype exists on 'get', but not on 'put'.
If you 'put' without having first done a 'get' you can end up with a configurable
prototype (prototype should only ever be non-configurable).
This is visible in a couple of ways:
* 'delete' on the property may succeed. (the next access will result in a new,
reset prototype object).
* the prototype may be set to a getter.
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertyNames):
Reify the prototype property before allowing an enumerate including don't enum properties.
(JSC::JSFunction::put):
Reify the prototype property before any put to it.
2010-11-15 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Bug 49488 - Only add source specific information to exceptions in Interpreter::throwException
Three types of source location information are added to errors.
(1) Divot information.
This was added with the intention of using it to provide better source highlighting in the inspector.
We may still want to do so, but we probably should not be exposing these values in a manner visible to
user scripts – only through an internal C++ interface. The code adding divot properties to objects has
been removed.
(2) Line number information.
Line number information is presently sometimes added at the point the exception is created, and sometimes
added at the point the exception passes through throwException. Change this so that throwException has
the sole responsibility for adding line number and source file information.
(3) Source snippets in the message of certain type errors (e.g. 'doc' in `Result of expression 'doc' [undefined] is not an object.`).
These messages are currently created at the point the exceptions is raised. Instead reformat the message
such that the source snippet is located at the end (`Result of expression 'b1' [undefined] is not an object.`
becomes `'undefined' is not an object (evaluating 'b1.property')`), and append these to the message at
the in throw Exception. This presents a number of advantages:
* we no longer need to have source location information to create these TypeErrors.
* we can chose to append source location information in other error messages, including those where
passing source location to the point of construction would be inconvenient.
* we can chose in future to omit to append source location information when running in a non-debug mode.
This also cleans up some error output, e.g. removing double brackets ('[[]]') around objects in output,
removing double periods (..) at end of lines, and adding slightly more context to some errors.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
- Separated called to access line and range information.
* bytecode/CodeBlock.h:
- Separated called to access line and range information.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::isInvalidParamForIn):
(JSC::isInvalidParamForInstanceOf):
- Update parameters passed to error constructors.
(JSC::appendSourceToError):
- Update message property to add location information (previously added in createErrorMessage, in ExceptionHelpers)
(JSC::Interpreter::throwException):
- Updated to call appendSourceToError.
(JSC::Interpreter::privateExecute):
- Update parameters passed to error constructors.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
- Update parameters passed to error constructors.
* runtime/Error.cpp:
(JSC::addErrorInfo):
(JSC::hasErrorInfo):
- Removed divot properties.
* runtime/Error.h:
- Removed divot properties.
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
- Initialize new property.
* runtime/ErrorInstance.h:
(JSC::ErrorInstance::appendSourceToMessage):
(JSC::ErrorInstance::setAppendSourceToMessage):
(JSC::ErrorInstance::clearAppendSourceToMessage):
- Added flag to check for errors needing location information appending.
(JSC::ErrorInstance::isErrorInstance):
- Added virtual method to check for ErrorInstances.
* runtime/ExceptionHelpers.cpp:
(JSC::createUndefinedVariableError):
(JSC::createInvalidParamError):
(JSC::createNotAConstructorError):
(JSC::createNotAFunctionError):
(JSC::createNotAnObjectError):
- Update parameters passed to error constructors, stopped adding line number information early, changed TypeError messages.
* runtime/ExceptionHelpers.h:
- Updated function signatures.
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
- Update parameters passed to error constructors.
* runtime/JSObject.h:
(JSC::JSObject::isErrorInstance):
- Added virtual method to check for ErrorInstances.
2010-11-12 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
CString(const char*) crashes when passed a null pointer
https://bugs.webkit.org/show_bug.cgi?id=49450
* wtf/text/CString.cpp:
(WTF::CString::CString):
Return early if str is null.
2010-11-11 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 49420 - Clean up syntax/reference error throw.
Some errors detected at compile time are thrown at runtime. We currently do so using a op_new_error/op_throw bytecode pair.
This is not ideal. op_throw is used for explicit user throw statements, and has different requirements in terms or meta data
attached to the exception (controlled by the explicitThrow parameter passed to Interpreter::throwException). To work around
this, op_new_error has to add the meta data at an early stage, which is unlike other VM exceptions being raised.
We can simplify this and bring into line with other exception behaviour by changing new_error from just allocating an
Exception instance to also throwing it – but as a regular VM throw, correctly passing explicitThrow as false.
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitThrowReferenceError):
(JSC::BytecodeGenerator::emitThrowSyntaxError):
(JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitNodeInConditionContext):
* bytecompiler/NodesCodegen.cpp:
(JSC::ThrowableExpressionData::emitThrowReferenceError):
(JSC::ThrowableExpressionData::emitThrowSyntaxError):
(JSC::RegExpNode::emitBytecode):
(JSC::PostfixErrorNode::emitBytecode):
(JSC::PrefixErrorNode::emitBytecode):
(JSC::AssignErrorNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::LabelNode::emitBytecode):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_throw_reference_error):
(JSC::JIT::emit_op_throw_syntax_error):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_throw_reference_error):
(JSC::JIT::emit_op_throw_syntax_error):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* parser/Nodes.h:
2010-11-11 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Harden some string functions against large lengths
https://bugs.webkit.org/show_bug.cgi?id=49293
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::create): Fix incorrect use of PassRefPtr. Check for
strlen results that are too large for StringImpl.
(WTF::StringImpl::lower): Check for lengths that are too large for
int32_t.
(WTF::StringImpl::upper): Fix incorrect use of PassRefPtr. Check for
lengths that are too large for int32_t.
(WTF::StringImpl::secure): Fix incorect use of PassRefPtr. Use unsigned
rather than int and int32_t so we can handle any length.
(WTF::StringImpl::foldCase): Fix incorrect use of PassRefPtr. Check for
lengths that are too large for int32_t.
(WTF::StringImpl::find): Check for strlen results that are too large for
StringImpl.
(WTF::StringImpl::findIgnoringCase): Ditto.
(WTF::StringImpl::replace): Fix incorrect use of PassRefPtr.
(WTF::StringImpl::createWithTerminatingNullCharacter): Check before
incrementing length.
2010-11-11 Dan Horák <dan@danny.cz>
Reviewed by Andreas Kling.
Add support for the s390/s390x architectures, it's big-endian
with s390 being 32-bit and s390x being 64-bit.
https://bugs.webkit.org/show_bug.cgi?id=34786
* wtf/Platform.h:
2010-11-10 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by David Hyatt.
HTML5 Ruby support should be mandatory feature
https://bugs.webkit.org/show_bug.cgi?id=49272
Remove Ruby as optional feature.
* Configurations/FeatureDefines.xcconfig:
* JavaScriptCorePrefix.h:: Touch it to avoid incremental build failure on Windows.
2010-11-10 Peter Rybin <peter.rybin@gmail.com>
Reviewed by Adam Barth.
HTML parser should provide script column position within HTML document to JavaScript engine
https://bugs.webkit.org/show_bug.cgi?id=45271
Adds TextPosition* classes -- a structure that stores line/column/generation
level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
wrappers that emphasize whether int number is used as zero-based or
one-based.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/TextPosition.h: Added.
(WTF::TextPosition::TextPosition):
(WTF::TextPosition::minimumPosition):
(WTF::TextPosition::belowRangePosition):
(WTF::ZeroBasedNumber::fromZeroBasedInt):
(WTF::ZeroBasedNumber::ZeroBasedNumber):
(WTF::ZeroBasedNumber::zeroBasedInt):
(WTF::ZeroBasedNumber::base):
(WTF::ZeroBasedNumber::belowBase):
(WTF::OneBasedNumber::fromOneBasedInt):
(WTF::OneBasedNumber::OneBasedNumber):
(WTF::OneBasedNumber::oneBasedInt):
(WTF::OneBasedNumber::convertAsZeroBasedInt):
(WTF::OneBasedNumber::convertToZeroBased):
(WTF::OneBasedNumber::base):
(WTF::OneBasedNumber::belowBase):
(WTF::toZeroBasedTextPosition):
(WTF::toOneBasedTextPosition):
(WTF::ZeroBasedNumber::convertToOneBased):
2010-11-09 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
ARM JIT asserts when loading http://reader.google.com in debug mode
https://bugs.webkit.org/show_bug.cgi?id=48912
There are several cases when the uninterrupted sequence is larger than
maximum required offset for pathing the same sequence. Eg.: if in a
uninterrupted sequence the last macroassembler's instruction is a stub
call, it emits store instruction(s) which should not be included in the
calculation of length of uninterrupted sequence. So, the insnSpace and
constSpace should be upper limit instead of hard limit.
* jit/JIT.h:
* jit/JITInlineMethods.h:
(JSC::JIT::endUninterruptedSequence):
2010-11-09 David Kilzer <ddkilzer@apple.com>
<http://webkit.org/b/49279> Fix include statements for local headers
Reviewed by Gavin Barraclough.
Use "Foo.h" instead of <Foo.h> for local headers.
* assembler/AbstractMacroAssembler.h: Also fixed sort order.
* assembler/CodeLocation.h:
* yarr/RegexJIT.h:
* yarr/RegexParser.h:
2010-11-08 Adam Roben <aroben@apple.com>
Roll out r71532
It broke the build for Cygwin 1.7 installs. Cygwin 1.7's default
.bashrc unsets %TEMP%, which broke copy-tools.cmd.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Removed.
* JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Removed.
2010-11-08 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
>=webkitgtk-1.2.5: parallel build fails with libtool: link: cannot find the library `libwebkit-1.0.la' or unhandled argument `libwebkit-1.0.la'
https://bugs.webkit.org/show_bug.cgi?id=49128
r59042 introduced a C++-style comment in Platform.h, which is often
included in C source files. Change it to a C-style comment.
* wtf/Platform.h: Fix the C++-style comment.
2010-11-08 Adam Roben <aroben@apple.com>
Show a message and cause the build to immediately fail when any
.vsprops files are copied
When $WebKitLibrariesDir is set to a non-standard location, the
.vsprops files have to be copied from WebKitLibraries/win to
$WebKitLibrariesDir. When this happens, Visual Studio doesn't pick up
changes to the .vsprops files until the next time it opens the solution
file. Before this patch, the build would soldier on with the old
.vsprops files, leading to strange build failures. Now we detect that
the .vsprops files have been updated, display a message to the user
telling them what to do, and make the build fail immediately.
Fixes <http://webkit.org/b/49181> Windows build fail mysteriously when
.vsprops files are updated
Reviewed by Steve Falkenburg.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
Moved code to copy the tools directory to the new copy-tools.cmd
script. Moved that after the command that writes the buildfailed file
so the build will be considered a failure if copy-tools.cmd fails.
Changed to write the project name into buildfailed like all our other
projects do, so those other projects will know that the failure was due
to this project.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
Added new scripts.
* JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Added. Copies
the tools directory to $WebKitLibrariesDir. If any files were copied,
we display a message to the user and exit with error code 1 to cause
the build to fail. In non-interactive builds, we just print the message
to the build log. In interactive builds, we show the message in an
alert.
* JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Added. Uses
Windows Scripting Host to display a message in an alert.
2010-11-07 Sam Magnuson <smagnuson@netflix.com>
Reviewed by Andreas Kling.
[Qt] make install does not cause JavaScriptCore to be built
https://bugs.webkit.org/show_bug.cgi?id=49114
* JavaScriptCore.pro:
2010-11-05 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Website consistently crashing TOT in JIT::execute() on news.com.au
https://bugs.webkit.org/show_bug.cgi?id=48954
The problem here was the strict pass of this conversion was loading the
this structure into one register but doing the flags check off a different
register. This is clearly wrong. I have been unable to trigger the crash
with a reduction, but I've added an assertion to the this conversion to
attempt to make it more readily catchable in future.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_convert_this_strict):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_convert_this_strict):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
2010-11-04 Xan Lopez <xlopez@igalia.com>
Reviewed by Adam Barth.
Use leakRef instead of releaseRef
https://bugs.webkit.org/show_bug.cgi?id=48974
Use leakRef instead of the deprecated releaseRef. This was renamed
some time ago because 'releaseRef' is too close to 'release',
which does something completely different.
2010-11-04 Eric Seidel <eric@webkit.org>
Reviewed by Gavin Barraclough.
REGRESSION(49798): Crash in HTMLObjectElement::parseMappedAttribute
https://bugs.webkit.org/show_bug.cgi?id=48789
The contract for all String/AtomicString methods seems to be that it's
safe to call them, even when the String is null (impl() returns 0).
This contract was broken by r49798 (unintentionally) when optimizing
for dromeo.
This patch adds a null check to AtomicString::lower() fixing this
crash and preventing future confusion.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::lower):
2010-11-04 Adam Barth <abarth@webkit.org>
Enabled ICCJPEG on Chromium Mac
https://bugs.webkit.org/show_bug.cgi?id=48977
* wtf/Platform.h:
2010-11-03 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Crash in Function.prototype.call.apply
https://bugs.webkit.org/show_bug.cgi?id=48485
The problem here was op_load_varargs failing to ensure that
there was sufficient space for the entire callframe prior to
op_call_varargs. This meant that when we then re-entered the
VM it was possible to stomp over an earlier portion of the
stack, so causing sub-optimal behaviour.
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitLoadVarargs):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ApplyFunctionCallDotNode::emitBytecode):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_load_varargs):
2010-11-03 Kenneth Russell <kbr@google.com>
Reviewed by Chris Marrin.
Redesign extension mechanism in GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=46894
* JavaScriptCore.exp:
- Exposed String::split(const String&, Vector<String>).
2010-11-03 Adam Roben <aroben@apple.com>
Bring WTF.vcproj up to date
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Added filters for the text and
unicode directories, added new files, removed old files.
2010-11-03 Gabor Loki <loki@webkit.org>
Reviewed by Andreas Kling.
Remove unused initializeWeakRandomNumberGenerator
https://bugs.webkit.org/show_bug.cgi?id=48899
WeakRandom class is used instead of weakRandomNumber and its initializer.
* wtf/RandomNumberSeed.h:
2010-11-03 Gabor Loki <loki@webkit.org>
Reviewed by Geoffrey Garen.
Unused class: JSFastMath with JSValue64
https://bugs.webkit.org/show_bug.cgi?id=48835
Remove unused JSFastMath class.
* runtime/JSImmediate.h:
2010-11-02 Adam Roben <aroben@apple.com>
Windows build fix after r71127
MSVC isn't smart enough to figure out that the definition of the global
nullptr variable isn't needed, so we provide one for it.
Fixes <http://webkit.org/b/48862> Windows build is broken due to
undefined symbol nullptr
Reviewed by Anders Carlsson.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export nullptr.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Added NullPtr.cpp and let VS
resort the files.
* wtf/NullPtr.cpp: Added.
2010-11-02 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
Remove special handling of HashTableDeletedValue in PlatformRefPtr and manually manage memory that cannot be controlled by HashTraits
https://bugs.webkit.org/show_bug.cgi?id=48841
Remove special handling of HashTableDeletedValue in PlatformRefPtr.
This is better handled on a case-by-case basis, when HashTraits
cannot account for it.
* wtf/PlatformRefPtr.h:
(WTF::PlatformRefPtr::~PlatformRefPtr):
(WTF::PlatformRefPtr::clear):
(WTF::::operator):
2010-10-29 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
REGRESSION: r69429-r69611: Crash in JSC::Interpreter::privateExecute
https://bugs.webkit.org/show_bug.cgi?id=47573
I think the interpreter portion of this was introduced by
an incorrect but silent merge when I updated prior to committing.
The JIT change is basically just a correctness fix, but it is
needed to prevent the testcase from asserting in debug builds.
The basic problem is incorrectly setting the activation object
on an arguments object. The crash was due to us setting a null
activation in the interpreter, in the jit we were setting the
activation of a strict mode arguments object.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* wtf/Platform.h:
2010-10-29 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Adam Roben and David Kilzer.
Fix and cleanup of build systems
https://bugs.webkit.org/show_bug.cgi?id=48342
* Configurations/FeatureDefines.xcconfig: Add missing ENABLE_FULLSCREEN_API
2010-10-28 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
Include stddef.h unconditionally in Assertions.h
https://bugs.webkit.org/show_bug.cgi?id=48573
There is no reason to have stddef.h include be MSVC-only.
* wtf/Assertions.h:
2010-10-28 Herczeg Zoltan <zherczeg@webkit.org>
Rubber stamped by Csaba Osztrogonác.
Try to fix interpreter build.
Needed parentheses around assignment to avoid GCC warning after
http://trac.webkit.org/changeset/70703
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-10-28 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Csaba Osztrogonác.
resetAssertionMatches() is an unused function in YARR Interpreter
https://bugs.webkit.org/show_bug.cgi?id=48503
The resetAssertionMatches() function is removed from YARR Interpreter
because it's never called.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::resetMatches):
2010-10-28 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Andreas Kling.
Wrong instruction form for BKPT
https://bugs.webkit.org/show_bug.cgi?id=48427
One '0' is missing from BKPT instruction.
Thanks for Jacob Bramley for reporting this error.
* assembler/ARMAssembler.h:
2010-10-28 Xan Lopez <xlopez@igalia.com>
Try to fix Snow Leopard build.
* jit/JITPropertyAccess.cpp:
(JSC::JIT::testPrototype):
2010-10-28 Xan Lopez <xlopez@igalia.com>
Reviewed by Oliver Hunt.
Do not have two different asCell APIs in JSValue
https://bugs.webkit.org/show_bug.cgi?id=47979
Remove JSCell* asCell(JSValue) in favor of only using
JSValue::asCell().
* API/APICast.h:
(toRef):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::testPrototype):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCachePutByID):
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* runtime/GetterSetter.h:
(JSC::asGetterSetter):
* runtime/JSByteArray.h:
(JSC::asByteArray):
* runtime/JSCell.h:
(JSC::JSCell::getCallData):
(JSC::JSCell::getConstructData):
* runtime/JSString.h:
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::asString):
* runtime/JSValue.h:
* runtime/Operations.cpp:
(JSC::jsIsObjectType):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
* runtime/Protect.h:
(JSC::gcProtect):
(JSC::gcUnprotect):
2010-10-27 Chao-ying Fu <fu@mips.com>
Reviewed by Oliver Hunt.
Support emit_op_mod() for MIPS on JSVALUE32_64
https://bugs.webkit.org/show_bug.cgi?id=46511
This patch uses MIPS div instructions for op_mod to improve performance.
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_mod):
2010-10-27 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build correction.
* wtf/Platform.h: Make sure ACCELERATED_COMPOSITING is
turned off in the WinCairo port. This isn't supported (yet.)
2010-10-27 Chris Rogers <crogers@google.com>
Reviewed by Chris Marrin.
Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit
https://bugs.webkit.org/show_bug.cgi?id=48279
* Configurations/FeatureDefines.xcconfig:
2010-10-27 Brian Weinstein <bweinstein@apple.com>
Windows build fix.
* jit/JITStubs.cpp:
(JSC::jitThrow):
2010-10-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 48365 - Remove output parameters from JITStackFrame
The JIT stub functions presently use the stackframe to provide a couple of additional return values.
* In the case of uncaught exceptions the exception value is returned on the stackframe.exception property.
* In the case of caught exceptions the updated value for the callFrame register is returned on the stackframe.callFrame property.
Change exception returns such that exceptions are always returned on JSGlobalData::exception.
Change op_catch such that the new CallFrame value is returned from op_throw / vm_throw in regT0.
* JavaScriptCore.xcodeproj/project.pbxproj:
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CachedCall.h:
(JSC::CachedCall::CachedCall):
(JSC::CachedCall::call):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::callEval):
(JSC::Interpreter::Interpreter):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::privateExecute):
* interpreter/Interpreter.h:
* jit/JITCode.h:
(JSC::JITCode::execute):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_catch):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_catch):
* jit/JITStubs.cpp:
(JSC::ctiTrampoline):
(JSC::jitThrow):
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
* runtime/CallData.cpp:
(JSC::call):
* runtime/Completion.cpp:
(JSC::evaluate):
* runtime/ConstructData.cpp:
(JSC::construct):
* runtime/ExceptionHelpers.cpp:
(JSC::createErrorForInvalidGlobalAssignment):
(JSC::throwOutOfMemoryError):
(JSC::throwStackOverflowError):
* runtime/ExceptionHelpers.h:
* runtime/JSArray.cpp:
(JSC::JSArray::sort):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
2010-10-27 Gabor Loki <loki@webkit.org>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=48060
Speed up op_jeq_null and op_jneq_null.
For both opcodes the NullTag and UndefinedTag are checked to control the
jump. These values can be simply checked by AboveOrEqual or Below
condition if they are the two highest unsigned integers from JSValue's
Tag field.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
* runtime/JSValue.h:
2010-10-25 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=41948
REGRESSION(r60392): Registerfile can be unwound too far following an exception
SunSpider reports no change.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException): Walk the stack to calculate the high
water mark currently in use. It's not safe to assume that the current
CallFrame's high water mark is the highest high water mark because
calls do not always set up at the end of a CallFrame. A large caller
CallFrame can encompass a small callee CallFrame.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock
in the CallFrame of a host call, like the Interpreter does, instead of
leaving the CodeBlock field uninitialized. The backtracing code requires
a valid CodeBlock field in each CallFrame.
2010-10-27 Gabor Loki <loki@webkit.org>
Reviewed by Csaba Osztrogonác.
Add cmn to branch32(reg, imm) on ARM
https://bugs.webkit.org/show_bug.cgi?id=48062
The conditional comparison can be done with cmn if the imm value is
negative and can fit into the cmn instruction.
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::branch32):
2010-10-26 Oliver Hunt <oliver@apple.com>
Interpreter build fix.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-10-25 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove exec and globalData arguments from jsNumber
https://bugs.webkit.org/show_bug.cgi?id=48270
Remove the now unused exec and globalData arguments from jsNumber
and mechanically update all users of jsNumber.
* API/JSValueRef.cpp:
(JSValueMakeNumber):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitLoad):
* bytecompiler/NodesCodegen.cpp:
(JSC::ArrayNode::emitBytecode):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(functionRun):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
* runtime/CachedTranscendentalFunction.h:
(JSC::CachedTranscendentalFunction::operator()):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
(JSC::dateParse):
(JSC::dateNow):
(JSC::dateUTC):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
* runtime/Error.cpp:
(JSC::addErrorSourceInfo):
(JSC::addErrorDivotInfo):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSByteArray.h:
(JSC::JSByteArray::getIndex):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::lengthGetter):
(JSC::JSFunction::getOwnPropertyDescriptor):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncParseInt):
(JSC::globalFuncParseFloat):
* runtime/JSNumberCell.h:
(JSC::JSValue::JSValue):
(JSC::jsNaN):
(JSC::JSValue::toJSNumber):
* runtime/JSONObject.cpp:
(JSC::unwrapBoxedPrimitive):
(JSC::PropertyNameForFunctionCall::value):
(JSC::JSONStringify):
* runtime/JSString.cpp:
(JSC::JSString::getStringPropertyDescriptor):
* runtime/JSString.h:
(JSC::JSString::getStringPropertySlot):
* runtime/JSValue.h:
(JSC::jsDoubleNumber):
(JSC::jsNumber):
(JSC::jsNaN):
(JSC::JSValue::JSValue):
(JSC::JSValue::toJSNumber):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
(JSC::mathProtoFuncAbs):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncCeil):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncFloor):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
(JSC::mathProtoFuncRandom):
(JSC::mathProtoFuncRound):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncSqrt):
(JSC::mathProtoFuncTan):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::numberConstructorNaNValue):
(JSC::numberConstructorNegInfinity):
(JSC::numberConstructorPosInfinity):
(JSC::numberConstructorMaxValue):
(JSC::numberConstructorMinValue):
(JSC::constructWithNumberConstructor):
(JSC::callNumberConstructor):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
* runtime/Operations.cpp:
(JSC::jsAddSlowCase):
* runtime/Operations.h:
(JSC::jsAdd):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
(JSC::RegExpMatchesArray::fillArrayInstance):
* runtime/RegExpObject.cpp:
(JSC::regExpObjectLastIndex):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncSearch):
(JSC::stringProtoFuncLocaleCompare):
2010-10-25 David Tapuska <dtapuska@rim.com>
Reviewed by David Kilzer.
Enable VFP if our compiler settings indicated we had a hardware
VFP.
https://bugs.webkit.org/show_bug.cgi?id=46096
* assembler/MacroAssemblerARM.cpp:
(JSC::isVFPPresent):
2010-10-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r70451.
http://trac.webkit.org/changeset/70451
https://bugs.webkit.org/show_bug.cgi?id=48249
Broke set-unloaded-frame-location.html under Qt (Requested by
caseq on #webkit).
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/TextPosition.h: Removed.
2010-10-25 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Replace _countof with WTF_ARRAY_LENGTH
https://bugs.webkit.org/show_bug.cgi?id=48229
* wtf/Platform.h:
2010-10-25 Peter Rybin <peter.rybin@gmail.com>
Reviewed by Adam Barth.
HTML parser should provide script column position within HTML document to JavaScript engine
https://bugs.webkit.org/show_bug.cgi?id=45271
Adds TextPosition* classes -- a structure that stores line/column/generation
level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
wrappers that emphasize whether int number is used as zero-based or
one-based.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/TextPosition.h: Added.
(WTF::TextPosition::TextPosition):
(WTF::TextPosition::minimumPosition):
(WTF::TextPosition::belowRangePosition):
(WTF::ZeroBasedNumber::fromZeroBasedInt):
(WTF::ZeroBasedNumber::ZeroBasedNumber):
(WTF::ZeroBasedNumber::zeroBasedInt):
(WTF::ZeroBasedNumber::base):
(WTF::ZeroBasedNumber::belowBase):
(WTF::OneBasedNumber::fromOneBasedInt):
(WTF::OneBasedNumber::OneBasedNumber):
(WTF::OneBasedNumber::oneBasedInt):
(WTF::OneBasedNumber::convertAsZeroBasedInt):
(WTF::OneBasedNumber::convertToZeroBased):
(WTF::OneBasedNumber::base):
(WTF::OneBasedNumber::belowBase):
(WTF::toZeroBasedTextPosition):
(WTF::toOneBasedTextPosition):
(WTF::ZeroBasedNumber::convertToOneBased):
2010-10-24 Kwang Yul Seo <skyul@company100.net>
Reviewed by David Kilzer.
Check endianness with __BIG_ENDIAN in RVCT.
https://bugs.webkit.org/show_bug.cgi?id=46122
RVCT defines __BIG_ENDIAN if compiling for a big-endian target.
* wtf/Platform.h:
2010-10-24 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Dave Kilzer.
Removed empty directories.
* JavaScriptCore: Removed.
* JavaScriptCore/runtime: Removed.
2010-10-24 Patrick Gansterer <paroga@webkit.org>
Unreviewed, fix typo of last build fix.
* wtf/DateMath.cpp:
2010-10-24 Patrick Gansterer <paroga@webkit.org>
Unreviewed build fix for chromium.
* wtf/DateMath.cpp: Added missing include.
2010-10-24 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Add WTF_ARRAY_LENGTH macro to WTF
https://bugs.webkit.org/show_bug.cgi?id=32828
Unify the different implementations and usages.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendQuotedString):
(JSC::Stringifier::toJSON):
(JSC::Stringifier::appendStringifiedValue):
* runtime/UString.cpp:
(JSC::UString::number):
* wtf/DateMath.cpp:
(WTF::parseDateFromNullTerminatedCharacters):
* wtf/StdLibExtras.h:
2010-10-24 Dirk Schulze <krit@webkit.org>
Reviewed by Nikolas Zimmermann.
Filter example Chiseled from SVG Wow! is slow
https://bugs.webkit.org/show_bug.cgi?id=48174
Added 'using WTF::ByteArray;' at the end of ByteArray.h
* wtf/ByteArray.h:
2010-10-24 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Inline WTF::bitwise_cast and fix style
https://bugs.webkit.org/show_bug.cgi?id=48208
* wtf/StdLibExtras.h:
(WTF::bitwise_cast):
(WTF::bitCount):
2010-10-23 Xan Lopez <xlopez@igalia.com>
Reviewed by Sam Weinig.
Unify globalData APIs
https://bugs.webkit.org/show_bug.cgi?id=47969
Make JSGlobalObject::globalData return a reference and adapt
callers. This unifies the API with the existing
CallFrame::globalData, which also returns a reference.
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::dumpRegisters):
* jsc.cpp:
(runWithScripts):
* parser/JSParser.cpp:
(JSC::jsParse):
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/Parser.h:
(JSC::Parser::parse):
* runtime/Error.cpp:
(JSC::createError):
(JSC::createEvalError):
(JSC::createRangeError):
(JSC::createReferenceError):
(JSC::createSyntaxError):
(JSC::createTypeError):
(JSC::createURIError):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::globalData):
2010-10-23 Dimitri Glazkov <dglazkov@chromium.org>
Unreviewed, rolling out r70369.
http://trac.webkit.org/changeset/70369
https://bugs.webkit.org/show_bug.cgi?id=47974
Caused weird artifacts in expected results.
* wtf/Platform.h:
2010-10-23 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
Crashes randomly in cairo_scaled_font_destroy
https://bugs.webkit.org/show_bug.cgi?id=46794
Make PlatformRefPtr aware of hashTableDeletedValue. When PlatformRefPtr
goes away this should probably be handled in the future via some special
hooks in RefCounted (or its contained type).
* wtf/PlatformRefPtr.h:
(WTF::PlatformRefPtr::~PlatformRefPtr):
(WTF::PlatformRefPtr::clear):
(WTF::::operator):
2010-10-22 Adam Roben <aroben@apple.com>
Remove the QuartzCorePresent.h mechanism
This header was used to detect whether QuartzCore headers were present
on the system. Everyone should have these headers now so we no longer
need to detect.
Reviewed by Sam Weinig.
* JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Remove
code to generate QuartzCorePresent.h.
* wtf/Platform.h: Stop including QuartzCorePresent.h on Windows and
collapse all USE_ACCELERATED_COMPOSITING settings into one #ifdef.
2010-10-22 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r70290.
http://trac.webkit.org/changeset/70290
https://bugs.webkit.org/show_bug.cgi?id=48111
Undelete Android build files.
* Android.mk: Added.
2010-10-22 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Csaba Osztrogonác.
JSC interpreter regressions after r69940
https://bugs.webkit.org/show_bug.cgi?id=47839
Wrong "if": It should test whether the result exists,
and not the opposite. It is an interpreter bug, hence
the bots does not capture it.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolveBase):
2010-10-21 Adam Barth <abarth@webkit.org>
Reviewed by David Levin.
Remove Android build system
https://bugs.webkit.org/show_bug.cgi?id=48111
* Android.mk: Removed.
2010-10-21 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Add a String constructor which takes AECHAR*
https://bugs.webkit.org/show_bug.cgi?id=45043
Add String(const AECHAR*) constructor for convenience.
* wtf/text/WTFString.h:
2010-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Martin Robinson.
[GTK] Use GCharsetConverter instead of g_iconv in TextCodecGtk
https://bugs.webkit.org/show_bug.cgi?id=47896
* wtf/gobject/GTypedefs.h:
2010-10-21 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r70174.
http://trac.webkit.org/changeset/70174
https://bugs.webkit.org/show_bug.cgi?id=41948
This patch reverts a change that causes
http/tests/xmlhttprequest/origin-whitelisting-removal.html to crash.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException):
2010-10-20 Simon Fraser <simon.fraser@apple.com>
Fix the EFL build.
* wtf/CMakeLists.txt:
2010-10-20 Simon Fraser <simon.fraser@apple.com>
Fix Windows build: export needed symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-10-19 Simon Fraser <simon.fraser@apple.com>
Reviewed by Gavin Barraclough.
https://bugs.webkit.org/show_bug.cgi?id=47851
Add methods to DecimalNumber to return the buffer length
required for decimal and exponential output.
Make some of the DecimalNumber code non-inline (no
effect on Sunspider), adding DecimalNumber.cpp to various
build systems.
Make some DecimalNumber methods 'const'.
* Android.mk:
* Android.v8.wtf.mk:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):
* wtf/DecimalNumber.cpp: Added.
(WTF::DecimalNumber::bufferLengthForStringDecimal):
(WTF::DecimalNumber::bufferLengthForStringExponential):
(WTF::DecimalNumber::toStringDecimal):
(WTF::DecimalNumber::toStringExponential):
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::sign):
(WTF::DecimalNumber::exponent):
(WTF::DecimalNumber::significand):
(WTF::DecimalNumber::precision):
* wtf/dtoa.cpp:
(WTF::dtoa):
* wtf/dtoa.h:
* wtf/wtf.pri:
2010-10-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r70165.
http://trac.webkit.org/changeset/70165
https://bugs.webkit.org/show_bug.cgi?id=48007
It broke tests on Qt bot (Requested by Ossy on #webkit).
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/TextPosition.h: Removed.
2010-10-20 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build
step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2010-10-20 Dumitru Daniliuc <dumi@chromium.org>
Unreviewed, fixing the Win build.
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
2010-10-20 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=41948
REGRESSION(r60392): Registerfile can be unwound too far following an exception
* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException): Walk the stack to calculate the high
water mark currently in use. It's not safe to assume that the current
CallFrame's high water mark is the highest high water mark because
calls do not always set up at the end of a CallFrame. A large caller
CallFrame can encompass a small callee CallFrame.
2010-10-20 Peter Rybin <peter.rybin@gmail.com>
Reviewed by Adam Barth.
HTML parser should provide script column position within HTML document to JavaScript engine
https://bugs.webkit.org/show_bug.cgi?id=45271
Adds TextPosition* classes -- a structure that stores line/column/generation
level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
wrappers that emphasize whether int number is used as zero-based or
one-based.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/TextPosition.h: Added.
(WTF::TextPosition::TextPosition):
(WTF::TextPosition::minimumPosition):
(WTF::TextPosition::belowRangePosition):
(WTF::ZeroBasedNumber::fromZeroBasedInt):
(WTF::ZeroBasedNumber::ZeroBasedNumber):
(WTF::ZeroBasedNumber::zeroBasedInt):
(WTF::ZeroBasedNumber::base):
(WTF::ZeroBasedNumber::belowBase):
(WTF::OneBasedNumber::fromOneBasedInt):
(WTF::OneBasedNumber::OneBasedNumber):
(WTF::OneBasedNumber::oneBasedInt):
(WTF::OneBasedNumber::convertAsZeroBasedInt):
(WTF::OneBasedNumber::convertToZeroBased):
(WTF::OneBasedNumber::base):
(WTF::OneBasedNumber::belowBase):
(WTF::toZeroBasedTextPosition):
(WTF::toOneBasedTextPosition):
(WTF::ZeroBasedNumber::convertToOneBased):
2010-10-19 Kwang Yul Seo <skyul@company100.net>
Reviewed by David Kilzer.
[BREWMP] Turn off JIT for simulator build
https://bugs.webkit.org/show_bug.cgi?id=47937
We don't need to test x86 JIT.
* wtf/Platform.h:
2010-10-19 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Remove support for JSVALUE32 from JSC
https://bugs.webkit.org/show_bug.cgi?id=47948
Remove all the code for supporting JSVALUE32 from JSC.
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_lshift):
(JSC::JIT::emitSlow_op_lshift):
(JSC::JIT::emit_op_rshift):
(JSC::JIT::emitSlow_op_rshift):
(JSC::JIT::emit_op_urshift):
(JSC::JIT::emitSlow_op_urshift):
(JSC::JIT::emit_op_jnless):
(JSC::JIT::emitSlow_op_jnless):
(JSC::JIT::emit_op_jless):
(JSC::JIT::emitSlow_op_jless):
(JSC::JIT::emit_op_jlesseq):
(JSC::JIT::emitSlow_op_jlesseq):
(JSC::JIT::emit_op_bitand):
(JSC::JIT::emit_op_post_inc):
(JSC::JIT::emit_op_post_dec):
(JSC::JIT::emit_op_pre_inc):
(JSC::JIT::emit_op_pre_dec):
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitSlow_op_mod):
* jit/JITCall.cpp:
* jit/JITInlineMethods.h:
(JSC::JIT::emitGetFromCallFrameHeaderPtr):
(JSC::JIT::emitGetFromCallFrameHeader32):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_loop_if_lesseq):
(JSC::JIT::emit_op_bitnot):
(JSC::JIT::emit_op_next_pname):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
* jit/JITStubs.h:
* jit/JSInterfaceJIT.h:
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::returnDouble):
(JSC::SpecializedThunkJIT::tagReturnAsInt32):
* jit/ThunkGenerators.cpp:
(JSC::sqrtThunkGenerator):
(JSC::powThunkGenerator):
* runtime/Collector.cpp:
(JSC::isPossibleCell):
(JSC::typeName):
* runtime/JSCell.h:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.h:
(JSC::Structure::prototypeForLookup):
* runtime/JSImmediate.h:
(JSC::reinterpretIntptrToDouble):
(JSC::JSImmediate::isIntegerNumber):
(JSC::JSImmediate::isDouble):
(JSC::JSImmediate::areBothImmediateIntegerNumbers):
(JSC::JSImmediate::makeDouble):
(JSC::JSImmediate::doubleValue):
(JSC::JSImmediate::toBoolean):
(JSC::JSImmediate::fromNumberOutsideIntegerRange):
(JSC::JSImmediate::from):
(JSC::JSImmediate::toDouble):
(JSC::JSFastMath::rightShiftImmediateNumbers):
* runtime/JSNumberCell.cpp:
* runtime/JSNumberCell.h:
* runtime/JSObject.h:
(JSC::JSObject::JSObject):
* runtime/JSValue.h:
* runtime/NumberObject.h:
* wtf/Platform.h:
2010-10-19 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Geoffrey Garen.
BytecodeGenerator::m_lastOpcodePosition must be initialized in all constructors
https://bugs.webkit.org/show_bug.cgi?id=47920
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator): Add missing member initialization.
2010-10-19 Kwang Yul Seo <skyul@company100.net>
Reviewed by David Kilzer.
RVCT fails to compile DateMath.cpp due to overloaded function pow
https://bugs.webkit.org/show_bug.cgi?id=47844
Choose std::pow(double, double) among multiple overloaded pow functions
to fix build for RVCT.
* wtf/DateMath.cpp:
(WTF::parseES5DateFromNullTerminatedCharacters):
2010-10-19 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Use UChar instead of wchar_t in UnicodeWinCE
https://bugs.webkit.org/show_bug.cgi?id=47904
Make UnicodeWinCE more portable, so we can use it for other ports too.
* wtf/unicode/wince/UnicodeWinCE.cpp:
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::foldCase):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isSpace):
(WTF::Unicode::isLetter):
(WTF::Unicode::isUpper):
(WTF::Unicode::isLower):
(WTF::Unicode::isDigit):
(WTF::Unicode::isPunct):
(WTF::Unicode::isAlphanumeric):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::digitValue):
* wtf/unicode/wince/UnicodeWinCE.h:
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::isHighSurrogate):
(WTF::Unicode::isLowSurrogate):
(WTF::Unicode::umemcasecmp):
(WTF::Unicode::surrogateToUcs4):
2010-10-19 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
Fix style of UnicodeWinCE
https://bugs.webkit.org/show_bug.cgi?id=47818
* wtf/unicode/wince/UnicodeWinCE.cpp:
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
* wtf/unicode/wince/UnicodeWinCE.h:
2010-10-18 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
* GNUmakefile.am: add missing file.
2010-10-18 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Strict mode: Functions created with the function constructor don't implement strict mode semantics
https://bugs.webkit.org/show_bug.cgi?id=47860
When creating the FunctionExecutable for a new function the function constructor
was always passing false for whether or not a function was strict, rather than
using the information from the freshly parsed function itself.
* runtime/Executable.cpp:
(JSC::FunctionExecutable::fromGlobalCode):
2010-10-18 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
Strict mode: |this| should be undefined if it is not explicitly provided
https://bugs.webkit.org/show_bug.cgi?id=47833
To make strict mode behave correctly we want to pass undefined instead of null
as the default this value. This has no impact on behaviour outside of strict
mode as both values are replaced with the global object if necessary.
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
2010-10-18 Darin Adler <darin@apple.com>
Reviewed by Anders Carlsson.
Make a nullptr that works with OwnPtr and RefPtr
https://bugs.webkit.org/show_bug.cgi?id=47756
* JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h.
* wtf/NullPtr.h: Added.
* wtf/OwnArrayPtr.h: Add an overload of = taking nullptr.
* wtf/OwnPtr.h: Ditto.
* wtf/PassOwnArrayPtr.h: Ditto.
* wtf/PassOwnPtr.h: Ditto.
* wtf/PassRefPtr.h: Ditto.
* wtf/RefPtr.h: Ditto.
* wtf/RetainPtr.h: Ditto.
2010-10-18 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Strict mode: JIT doesn't check for |this| being an immediate before dereferencing
https://bugs.webkit.org/show_bug.cgi?id=47826
There's no guarantee that |this| will be a cell in a strict mode function, so
don't claim that it is.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::isKnownNotImmediate):
2010-10-18 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Oliver Hunt.
if (0) throw "x" ; else { } throws parse error after r69906
https://bugs.webkit.org/show_bug.cgi?id=47807
r69906 introduced a bug: the semicolon is not parsed after a throw
expression anymore. Thus, the semicolon terminates the "if" parsing
in the example above, and the else token results a parse error.
* parser/JSParser.cpp:
(JSC::JSParser::parseThrowStatement):
2010-10-18 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Andreas Kling.
Remove some unnecessary lines of code from Parser.cpp
https://bugs.webkit.org/show_bug.cgi?id=47816
* parser/Parser.cpp:
2010-10-18 Xan Lopez <xlopez@igalia.com>
Reviewed by Csaba Osztrogonác.
Build broken with JIT disabled
https://bugs.webkit.org/show_bug.cgi?id=47801
This is a regression caused by r69940.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolveBase):
2010-10-18 Zoltan Horvath <zoltan@webkit.org>
Reviewed by Darin Adler.
Change FastAllocBase implementation into a macro
https://bugs.webkit.org/show_bug.cgi?id=42998
It was investigated in bug #33896 that inheriting classes from FastAllocBase
can result in objects getting larger which leads to memory regressions.
Using a macro instead of inheriting classes from FastAllocBase would solve the issue.
* wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro
2010-10-17 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Strict mode: arguments is not valid as the base expression for pre- or post-fix expressions
https://bugs.webkit.org/show_bug.cgi?id=47791
Simple fix, check for arguments in addition to eval.
* parser/JSParser.cpp:
(JSC::JSParser::parseUnaryExpression):
2010-10-17 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure
https://bugs.webkit.org/show_bug.cgi?id=47788
Fixing this required a couple of changes:
* resolve_base now has a flag to indicate whether it is being used for a put in strict mode.
this allows us to throw an exception when we're doing a completely generic resolve for
assignment, and that assignment would create a new global.
* There is a new opcode 'op_ensure_property_exists' that is used to determine whether
the property being assigned to already exists on the global object. This currently
has no caching, but such caching could be added relatively trivially. It is only used
in the case where we know that a property will be placed on the global object, and
we cannot verify that the property already exists.
In the jit we plant a call to cti_op_resolve_base_strict_put in the effected case rather
than making op_resolve_base have an additional runtime branch.
There's also a new helper function to create the exception for the invalid assignment.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitResolveBase):
(JSC::BytecodeGenerator::emitResolveBaseForPut):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::AssignResolveNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolveBase):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_resolve_base):
(JSC::JIT::emit_op_ensure_property_exists):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_resolve_base):
(JSC::JIT::emit_op_ensure_property_exists):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* parser/JSParser.cpp:
(JSC::JSParser::parseProgram):
* runtime/ExceptionHelpers.cpp:
(JSC::createErrorForInvalidGlobalAssignment):
* runtime/ExceptionHelpers.h:
* runtime/Operations.h:
(JSC::resolveBase):
2010-10-17 Simon Fraser <simon.fraser@apple.com>
First part of fix for Windows build failure. Will wait for the
next set of link errors to determine the mangled forms for dtoaRoundSF
and dtoaRoundDP.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-10-17 Simon Fraser <simon.fraser@apple.com>
Reviewed by Nikolas Zimmermann.
Very large and small numbers fail to round-trip through CSS
https://bugs.webkit.org/show_bug.cgi?id=20674
New exports required to use DecimalNumber in WebCore.
* JavaScriptCore.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-10-16 Kyusun Kim <maniagoon@company100.net>
Reviewed by Alexey Proskuryakov.
Add using declarations for currentTimeMS() and parseDateFromNullTerminatedCharacters()
https://bugs.webkit.org/show_bug.cgi?id=47758
* wtf/CurrentTime.h:
* wtf/DateMath.h:
2010-10-16 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Rename StringHasherFunctions.h to StringHasher.h
https://bugs.webkit.org/show_bug.cgi?id=47200
Now StringHasherFunctions.h only contains the StringHasher class, so rename it to the correct name.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/StringHashFunctions.h: Removed.
* wtf/StringHasher.h: Copied from JavaScriptCore/wtf/StringHashFunctions.h.
* wtf/text/StringHash.h:
* wtf/text/StringImpl.h:
2010-10-15 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Automatic Semicolon Insertion incorrectly inserts semicolon after break, continue, and return followed by a newline
https://bugs.webkit.org/show_bug.cgi?id=47762
The old YACC parser depended on the lexer for some classes of semicolon insertion.
The new parser handles ASI entirely on its own so when the lexer inserts a semicolon
on its own the net result is a spurious semicolon in the input stream. This can result
in incorrect parsing in some cases:
if (0)
break
;else {}
Would result in a parse failure as the output from the lexer is essentially
if (0)
break
;;else
So the second semicolon is interpreted as a empty statement, which terminates the if,
making the else an error.
* parser/JSParser.cpp:
(JSC::JSParser::parseThrowStatement):
Parsing of throw statement was wrong, and only worked due to the weird behaviour
in the lexer
* parser/Lexer.cpp:
(JSC::Lexer::lex):
Remove bogus semicolon insertion from the newline handling
2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Dirk Schulze.
Replace some String::format() usages by StringConcatenate in WebKit
https://bugs.webkit.org/show_bug.cgi?id=47714
* wtf/text/StringConcatenate.h: Add UChar specific StringTypeAdapter, to accept single UChars in makeString().
2010-10-15 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed build fix for Debug Leopard which is failng to compile after r69842.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::ByteCompiler::emitDisjunction):
2010-10-15 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
The parenthetical assertion checking isn't working in some cases with YARR
Interpreter
https://bugs.webkit.org/show_bug.cgi?id=46893
Calculate the countToCheck value of a TypeParentheticalAssertion by
subtracting the number of characters which follows
a TypeParentheticalAssertion term with the number of characters which should
be matched by terms which are contained
in the TypeParentheticalAssertion term (minimumSize).
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::ByteCompiler::emitDisjunction):
2010-10-14 Nathan Vander Wilt <nate@andyet.net>
Reviewed by Darin Adler.
Added parser for ECMAScript 5 standard date format, so Date.parse can handle RFC 3339 timestamps: https://bugs.webkit.org/show_bug.cgi?id=44632
* runtime/DateConversion.cpp:
(JSC::parseDate):
* wtf/DateMath.cpp:
(WTF::ymdhmsToSeconds):
(WTF::parseES5DateFromNullTerminatedCharacters):
* wtf/DateMath.h:
2010-10-14 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Gavin Barraclough.
Replace lots of String::format() usages by StringConcatenate
https://bugs.webkit.org/show_bug.cgi?id=47664
Add StringTypeAdapter<char> to accept single characters for makeString().
* wtf/text/StringConcatenate.h:
(WTF::makeString):
2010-10-14 David Goodwin <david_goodwin@apple.com>
Reviewed by Darin Adler.
need way to measure size of JITed ARM code
https://bugs.webkit.org/show_bug.cgi?id=47121
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::linkCode):
(JSC::LinkBuffer::dumpLinkStats):
(JSC::LinkBuffer::dumpCode):
2010-10-14 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
The backreference checking isn't working in some cases with YARR Interpreter
https://bugs.webkit.org/show_bug.cgi?id=46904
The Interpreter::matchBackReference() function returns true without matching
when a backreference points to the same parentheses where it is.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchBackReference):
2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Andreas Kling.
[Qt] Text breaking is slow: enable ICU as an opt-in
https://bugs.webkit.org/show_bug.cgi?id=40332
Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h
* JavaScriptCore.pri:
* wtf/unicode/qt4/UnicodeQt4.h:
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::foldCase):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::isPunct):
(WTF::Unicode::isLower):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::combiningClass):
(WTF::Unicode::direction):
(WTF::Unicode::category):
2010-10-14 Anton Faern <anton@bladehawke.com>
Reviewed by Csaba Osztrogonác.
https://bugs.webkit.org/show_bug.cgi?id=47658
NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO
change. This means that OS(NETBSD) is also undefined.
* wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD
2010-10-13 David Goodwin <david_goodwin@apple.com>
Reviewed by Oliver Hunt.
ARMv7 JIT should generated conditional branches when possible
https://bugs.webkit.org/show_bug.cgi?id=47384
Use different jump padding sizes for conditional and unconditional
jumps (12 bytes and 10 bytes respectively). This allows the JIT to
include the IT instruction as part of the conditional jump sequence
which in turn allows it to optimize away the IT using an ARMv7
conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for
conditional branches when displacement is in range. Also use IT/B(T4)
for conditional branch when displacement does not fit in B(T3).
For unconditional jump, instruction selection options are:
B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection
options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX.
* assembler/ARMv7Assembler.cpp:
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::JmpSrc::JmpSrc):
(JSC::ARMv7Assembler::ifThenElse):
(JSC::ARMv7Assembler::jumpSizeDelta):
(JSC::ARMv7Assembler::canCompact):
(JSC::ARMv7Assembler::computeJumpType):
(JSC::ARMv7Assembler::link):
(JSC::ARMv7Assembler::canBeJumpT1):
(JSC::ARMv7Assembler::canBeJumpT3):
(JSC::ARMv7Assembler::canBeJumpT4):
(JSC::ARMv7Assembler::linkJumpT1):
(JSC::ARMv7Assembler::linkJumpT3):
(JSC::ARMv7Assembler::linkJumpT4):
(JSC::ARMv7Assembler::linkConditionalJumpT4):
(JSC::ARMv7Assembler::linkBX):
(JSC::ARMv7Assembler::linkConditionalBX):
(JSC::ARMv7Assembler::linkJumpAbsolute):
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::linkCode):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::canCompact):
(JSC::MacroAssemblerARMv7::computeJumpType):
(JSC::MacroAssemblerARMv7::jumpSizeDelta):
(JSC::MacroAssemblerARMv7::jump):
(JSC::MacroAssemblerARMv7::nearCall):
(JSC::MacroAssemblerARMv7::call):
(JSC::MacroAssemblerARMv7::ret):
(JSC::MacroAssemblerARMv7::tailRecursiveCall):
(JSC::MacroAssemblerARMv7::makeJump):
(JSC::MacroAssemblerARMv7::makeBranch):
2010-10-13 Fridrich Strba <fridrich.strba@bluewin.ch>
Reviewed by Darin Adler.
Don't depend on Windows on sched_yield and sched.h
https://bugs.webkit.org/show_bug.cgi?id=45543
sched.h is part of pthreads and sched_yield is implemented
in pthreads-win32 as Sleep(0). This patch avoids a gratuitous
dependency on pthreads-win32 in this file.
* wtf/TCSpinLock.h:
(TCMalloc_SlowLock):
2010-10-13 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Port unicode
https://bugs.webkit.org/show_bug.cgi?id=45716
Brew MP port uses only the subset of ICU library to reduce the binary size.
Follow the WinCE's implementation.
* wtf/Platform.h:
* wtf/unicode/Unicode.h:
* wtf/unicode/brew/UnicodeBrew.cpp: Added.
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::foldCase):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isUpper):
(WTF::Unicode::isLower):
(WTF::Unicode::isDigit):
(WTF::Unicode::isPunct):
(WTF::Unicode::isAlphanumeric):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::direction):
(WTF::Unicode::category):
(WTF::Unicode::decompositionType):
(WTF::Unicode::combiningClass):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::digitValue):
(WTF::Unicode::isSpace):
(WTF::Unicode::isLetter):
* wtf/unicode/brew/UnicodeBrew.h: Added.
(WTF::Unicode::isArabicChar):
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::hasLineBreakingPropertyComplexContext):
(WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
(WTF::Unicode::umemcasecmp):
2010-10-13 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-10-13 Adam Barth <abarth@webkit.org>
Reviewed by Maciej Stachowiak.
[WTFURL] Add URLQueryCanonicalizer
https://bugs.webkit.org/show_bug.cgi?id=45088
This class canonicalizes the query component of URLs. The main tricky
bit there is the convertCharset function, which I've moved to a
templated dependency. There'll likely be more about that in future
patches.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/url/src/URLEscape.cpp: Added.
* wtf/url/src/URLEscape.h: Added.
(WTF::appendEscapedCharacter):
* wtf/url/src/URLQueryCanonicalizer.h: Added.
(WTF::URLQueryCanonicalizer::canonicalize):
(WTF::URLQueryCanonicalizer::isAllASCII):
(WTF::URLQueryCanonicalizer::appendRaw8BitQueryString):
(WTF::URLQueryCanonicalizer::convertToQueryEncoding):
2010-10-13 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 43987 - Downloading using XHR is much slower than before
Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector.
Fundamentally this should be the same (copies current contents to expand capacity,
rather than using a rope), but this approach allows the intermadiate state of the
String to be inspected in the buffer without copying to resolve.
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendQuotedString):
(JSC::Stringifier::Holder::appendNextProperty):
Renamed StringBuilder::size() -> length() (to match other String types).
* runtime/UStringBuilder.h:
(JSC::UStringBuilder::append):
(JSC::UStringBuilder::toUString):
Update for changes in parent class, can just 'using' the append methods.
* wtf/text/StringBuilder.cpp: Added.
(WTF::StringBuilder::reifyString):
(WTF::StringBuilder::resize):
(WTF::StringBuilder::reserveCapacity):
(WTF::StringBuilder::allocateBuffer):
(WTF::StringBuilder::appendUninitialized):
(WTF::StringBuilder::append):
(WTF::StringBuilder::shrinkToFit):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::StringBuilder):
(WTF::StringBuilder::append):
(WTF::StringBuilder::toString):
(WTF::StringBuilder::toStringPreserveCapacity):
(WTF::StringBuilder::length):
(WTF::StringBuilder::isEmpty):
(WTF::StringBuilder::operator[]):
(WTF::StringBuilder::clear):
Class updated to use overcapacity in a StringImpl, rather than a Vector.
* Android.mk:
* Android.v8.wtf.mk:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/wtf.pri:
2010-10-13 Adam Roben <aroben@apple.com>
Export tryFastRealloc for WebKit2's benefit
Rubber-stamped by Anders Carlsson.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
tryFastRealloc. Removed RegExpObject::info, which is now exported via
JS_EXPORTDATA.
2010-10-13 Adam Barth <abarth@webkit.org>
Reviewed by Maciej Stachowiak.
[WTFURL] Add a mechanism for classifying types of characters
https://bugs.webkit.org/show_bug.cgi?id=45085
Various characters have different escaping rules depending on where
they are in URLs. This patch adds a table containing that information.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/url/src/URLCharacterTypes.cpp: Added.
* wtf/url/src/URLCharacterTypes.h: Added.
(WTF::URLCharacterTypes::isQueryChar):
(WTF::URLCharacterTypes::isIPv4Char):
(WTF::URLCharacterTypes::isHexChar):
(WTF::URLCharacterTypes::isCharOfType):
2010-10-13 Xan Lopez <xlopez@igalia.com>
Reviewed by Csaba Osztrogonác.
Missing parameters for bytecode dump of next_pname
https://bugs.webkit.org/show_bug.cgi?id=47590
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump): add missing parameters to the dump.
2010-10-13 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Dirk Schulze.
Add wtf/text/StringConcatenate
https://bugs.webkit.org/show_bug.cgi?id=47584
Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too.
Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString.
Exactly the same design that has been followed while refactoring StringBuilder.
The UString variants can all be removed as soon as WTF::String & JSC::UString converge.
* GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h.
* JavaScriptCore.gypi: Ditto.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
* bytecode/CodeBlock.cpp: s/makeString/makeUString/
(JSC::escapeQuotes):
(JSC::valueToSourceString):
(JSC::constantName):
(JSC::idName):
(JSC::CodeBlock::registerName):
(JSC::regexpToSourceString):
(JSC::regexpName):
* bytecompiler/NodesCodegen.cpp: Ditto.
(JSC::substitute):
* profiler/Profiler.cpp: Ditto.
(JSC::Profiler::createCallIdentifier):
* runtime/ExceptionHelpers.cpp: Ditto.
(JSC::createUndefinedVariableError):
(JSC::createErrorMessage):
(JSC::createInvalidParamError):
* runtime/FunctionConstructor.cpp: Ditto.
(JSC::constructFunction):
* runtime/FunctionPrototype.cpp: Ditto.
(JSC::insertSemicolonIfNeeded):
* runtime/JSONObject.cpp: Ditto.
(JSC::Stringifier::indent):
* runtime/JSStringBuilder.h:
(JSC::jsMakeNontrivialString):
* runtime/RegExpConstructor.cpp: Ditto.
(JSC::constructRegExp):
* runtime/RegExpObject.cpp: Ditto.
(JSC::RegExpObject::match):
* runtime/RegExpPrototype.cpp: Ditto.
(JSC::regExpProtoFuncCompile):
* runtime/StringConcatenate.h: Removed.
* runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter<JSC::UString> code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h
(JSC::makeUString):
* wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h.
(WTF::makeString):
2010-10-12 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::length):
2010-10-12 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Gavin Barraclough.
Unify JSC::StringBuilder & WebCore::StringBuilder
https://bugs.webkit.org/show_bug.cgi?id=47538
Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String().
Move the append(const JSC::UString&) method into runtime/UStringBuilder.h.
UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality.
No new code, just move code around.
* GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h.
* JavaScriptCore.gypi: Ditto.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
* runtime/Executable.cpp:
(JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString().
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction): Ditto.
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncUnescape): Ditto.
* runtime/JSONObject.cpp:
(JSC::Stringifier::stringify): Ditto.
(JSC::Stringifier::appendQuotedString): Ditto.
(JSC::Stringifier::appendStringifiedValue): Ditto.
(JSC::Stringifier::startNewLine): Ditto.
(JSC::Stringifier::Holder::appendNextProperty): Ditto.
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::Lexer::lexString): Ditto.
* runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include.
* runtime/StringBuilder.h: Removed.
* runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods.
(JSC::UStringBuilder::append): append(const JSC::UString&)
(JSC::UStringBuilder::toUString):
* wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h
(WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere.
(WTF::StringBuilder::isEmpty): Ditto (+ constify method).
(WTF::StringBuilder::reserveCapacity): Ditto.
(WTF::StringBuilder::resize): Ditto.
(WTF::StringBuilder::size): Ditto.
(WTF::StringBuilder::operator[]): Ditto.
(WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder.
2010-10-12 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
Cleaned up the processing of replacements after regular expression
processing, especially the case where there wasn't a match.
Changed to use empty strings instead of computing a zero length sub
string.
https://bugs.webkit.org/show_bug.cgi?id=47506
* runtime/StringPrototype.cpp:
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::stringProtoFuncReplace):
2010-10-11 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Clang build fix after r69472.
https://bugs.webkit.org/show_bug.cgi?id=46523
* wtf/text/StringHash.h:
2010-10-11 Oliver Hunt <oliver@apple.com>
Undo last minute change to 32bit build.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_convert_this_strict):
2010-10-11 Brian Weinstein <bweinstein@apple.com>
Build fix for Windows. Add a necessary export from r69516.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-10-11 Oliver Hunt <oliver@apple.com>
Fix interpreter build -- was broken by incorrect merge.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-10-01 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[ES5] Implement strict mode
https://bugs.webkit.org/show_bug.cgi?id=10701
Initial strict mode implementation. This is the simplest
implementation that could possibly work and adds (hopefully)
all of the restrictions required by strict mode. There are
a number of inefficiencies, especially in the handling of
arguments and eval as smart implementations would make this
patch more complicated.
The SyntaxChecker AST builder has become somewhat more complex
as strict mode does require more parse tree information to
validate the syntax.
Summary of major changes to the parser:
* We track when we enter strict mode (this may come as a surprise)
* Strict mode actually requires a degree of AST knowledge to validate
so the SyntaxChecker now produces values that can be used to distinguish
"node" types.
* We now track variables that are written to. We do this to
statically identify writes to global properties that don't exist
and abort at that point. This should actually make it possible
to optimise some other cases in the future but for now it's
purely for validity checking. Currently writes are only tracked
in strict mode code.
* Labels are now tracked as it is now a syntax error to jump to a label
that does not exist (or to use break, continue, or return in a context
where they would be invalid).
Runtime changes:
* In order to get correct hanlding of the Arguments object all
strict mode functions that reference arguments create and tearoff
the arguments object on entry. This is not strictly necessary
but was the least work necessary to get the correct behaviour.
* PutPropertySlot now tracks whether it is being used for a strict
mode write, and if so Object::put will throw when a write can't be
completed.
* StrictEvalActivation was added as an "activation" object for strict
mode eval (so that strict eval does not introduce new variables into
the containing scope).
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::isStrictMode):
* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::get):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::createArgumentsIfNecessary):
(JSC::BytecodeGenerator::emitReturn):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::isStrictMode):
(JSC::BytecodeGenerator::makeFunction):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::callEval):
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::execute):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_pnames):
(JSC::JIT::emit_op_convert_this_strict):
(JSC::JIT::emitSlow_op_convert_this_strict):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_pnames):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createFunctionBody):
(JSC::ASTBuilder::isResolve):
* parser/JSParser.cpp:
(JSC::JSParser::next):
(JSC::JSParser::startLoop):
(JSC::JSParser::endLoop):
(JSC::JSParser::startSwitch):
(JSC::JSParser::endSwitch):
(JSC::JSParser::setStrictMode):
(JSC::JSParser::strictMode):
(JSC::JSParser::isValidStrictMode):
(JSC::JSParser::declareParameter):
(JSC::JSParser::breakIsValid):
(JSC::JSParser::pushLabel):
(JSC::JSParser::popLabel):
(JSC::JSParser::hasLabel):
(JSC::JSParser::DepthManager::DepthManager):
(JSC::JSParser::DepthManager::~DepthManager):
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::startSwitch):
(JSC::JSParser::Scope::endSwitch):
(JSC::JSParser::Scope::startLoop):
(JSC::JSParser::Scope::endLoop):
(JSC::JSParser::Scope::inLoop):
(JSC::JSParser::Scope::breakIsValid):
(JSC::JSParser::Scope::pushLabel):
(JSC::JSParser::Scope::popLabel):
(JSC::JSParser::Scope::hasLabel):
(JSC::JSParser::Scope::isFunction):
(JSC::JSParser::Scope::declareVariable):
(JSC::JSParser::Scope::declareWrite):
(JSC::JSParser::Scope::deleteProperty):
(JSC::JSParser::Scope::declareParameter):
(JSC::JSParser::Scope::setNeedsFullActivation):
(JSC::JSParser::Scope::collectFreeVariables):
(JSC::JSParser::Scope::getUncapturedWrittenVariables):
(JSC::JSParser::Scope::getDeletedVariables):
(JSC::JSParser::Scope::setStrictMode):
(JSC::JSParser::Scope::strictMode):
(JSC::JSParser::Scope::isValidStrictMode):
(JSC::JSParser::pushScope):
(JSC::JSParser::popScope):
(JSC::JSParser::declareVariable):
(JSC::JSParser::declareWrite):
(JSC::JSParser::deleteProperty):
(JSC::jsParse):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseSourceElements):
(JSC::JSParser::parseDoWhileStatement):
(JSC::JSParser::parseWhileStatement):
(JSC::JSParser::parseVarDeclarationList):
(JSC::JSParser::parseConstDeclarationList):
(JSC::JSParser::parseForStatement):
(JSC::JSParser::parseBreakStatement):
(JSC::JSParser::parseContinueStatement):
(JSC::JSParser::parseReturnStatement):
(JSC::JSParser::parseWithStatement):
(JSC::JSParser::parseSwitchStatement):
(JSC::JSParser::parseSwitchClauses):
(JSC::JSParser::parseSwitchDefaultClause):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseBlockStatement):
(JSC::JSParser::parseStatement):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionBody):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseFunctionDeclaration):
(JSC::JSParser::parseExpressionOrLabelStatement):
(JSC::JSParser::parseIfStatement):
(JSC::JSParser::parseExpression):
(JSC::JSParser::parseAssignmentExpression):
(JSC::JSParser::parseConditionalExpression):
(JSC::JSParser::parseBinaryExpression):
(JSC::JSParser::parseStrictObjectLiteral):
(JSC::JSParser::parsePrimaryExpression):
(JSC::JSParser::parseMemberExpression):
(JSC::JSParser::parseUnaryExpression):
* parser/JSParser.h:
* parser/Lexer.cpp:
(JSC::Lexer::parseString):
(JSC::Lexer::lex):
* parser/Lexer.h:
(JSC::Lexer::isReparsing):
* parser/Nodes.cpp:
(JSC::ScopeNode::ScopeNode):
(JSC::FunctionBodyNode::FunctionBodyNode):
(JSC::FunctionBodyNode::create):
* parser/Nodes.h:
(JSC::ScopeNode::isStrictMode):
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/Parser.h:
(JSC::Parser::parse):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::SyntaxChecker):
(JSC::SyntaxChecker::makeFunctionCallNode):
(JSC::SyntaxChecker::appendToComma):
(JSC::SyntaxChecker::createCommaExpr):
(JSC::SyntaxChecker::makeAssignNode):
(JSC::SyntaxChecker::makePrefixNode):
(JSC::SyntaxChecker::makePostfixNode):
(JSC::SyntaxChecker::makeTypeOfNode):
(JSC::SyntaxChecker::makeDeleteNode):
(JSC::SyntaxChecker::makeNegateNode):
(JSC::SyntaxChecker::makeBitwiseNotNode):
(JSC::SyntaxChecker::createLogicalNot):
(JSC::SyntaxChecker::createUnaryPlus):
(JSC::SyntaxChecker::createVoid):
(JSC::SyntaxChecker::thisExpr):
(JSC::SyntaxChecker::createResolve):
(JSC::SyntaxChecker::createObjectLiteral):
(JSC::SyntaxChecker::createArray):
(JSC::SyntaxChecker::createNumberExpr):
(JSC::SyntaxChecker::createString):
(JSC::SyntaxChecker::createBoolean):
(JSC::SyntaxChecker::createNull):
(JSC::SyntaxChecker::createBracketAccess):
(JSC::SyntaxChecker::createDotAccess):
(JSC::SyntaxChecker::createRegex):
(JSC::SyntaxChecker::createNewExpr):
(JSC::SyntaxChecker::createConditionalExpr):
(JSC::SyntaxChecker::createAssignResolve):
(JSC::SyntaxChecker::createFunctionExpr):
(JSC::SyntaxChecker::createFunctionBody):
(JSC::SyntaxChecker::appendBinaryExpressionInfo):
(JSC::SyntaxChecker::operatorStackPop):
* runtime/Arguments.cpp:
(JSC::Arguments::createStrictModeCallerIfNecessary):
(JSC::Arguments::createStrictModeCalleeIfNecessary):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/Arguments.h:
(JSC::Arguments::Arguments):
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::CommonIdentifiers):
* runtime/CommonIdentifiers.h:
* runtime/Error.cpp:
(JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
(JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
(JSC::StrictModeTypeErrorFunction::getConstructData):
(JSC::StrictModeTypeErrorFunction::callThrowTypeError):
(JSC::StrictModeTypeErrorFunction::getCallData):
(JSC::createTypeErrorFunction):
* runtime/Error.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::EvalExecutable):
(JSC::ProgramExecutable::ProgramExecutable):
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::checkSyntax):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
(JSC::FunctionExecutable::fromGlobalCode):
(JSC::ProgramExecutable::reparseExceptionInfo):
* runtime/Executable.h:
(JSC::ScriptExecutable::ScriptExecutable):
(JSC::ScriptExecutable::isStrictMode):
(JSC::EvalExecutable::create):
(JSC::FunctionExecutable::create):
* runtime/JSActivation.cpp:
(JSC::JSActivation::toStrictThisObject):
* runtime/JSActivation.h:
* runtime/JSFunction.cpp:
(JSC::createDescriptorForThrowingProperty):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnPropertyDescriptor):
(JSC::JSFunction::put):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::internalFunctionStructure):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::toStrictThisObject):
(JSC::throwTypeError):
* runtime/JSObject.h:
(JSC::JSObject::isStrictModeFunction):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSValue::putDirect):
(JSC::JSValue::toStrictThisObject):
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::toStrictThisObject):
* runtime/JSStaticScopeObject.h:
* runtime/JSValue.h:
* runtime/JSZombie.h:
(JSC::JSZombie::toStrictThisObject):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::PutPropertySlot):
(JSC::PutPropertySlot::isStrictMode):
* runtime/StrictEvalActivation.cpp: Added.
(JSC::StrictEvalActivation::StrictEvalActivation):
(JSC::StrictEvalActivation::deleteProperty):
(JSC::StrictEvalActivation::toThisObject):
(JSC::StrictEvalActivation::toStrictThisObject):
* runtime/StrictEvalActivation.h: Added.
2010-10-10 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Windows build fix after r69472.
* wtf/text/StringHash.h:
(WTF::CaseFoldingHash::hash):
2010-10-10 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Use WTF::StringHasher in WTF::CaseFoldingHash
https://bugs.webkit.org/show_bug.cgi?id=46523
* wtf/text/StringHash.h:
(WTF::CaseFoldingHash::foldCase):
(WTF::CaseFoldingHash::hash):
2010-10-09 Pratik Solanki <psolanki@apple.com>
Reviewed by Xan Lopez.
https://bugs.webkit.org/show_bug.cgi?id=47445
Remove unused function WTFThreadData::initializeIdentifierTable()
* wtf/WTFThreadData.h:
2010-10-08 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
Added check to start of subexpression being positive before using
subexpression in replacement.
https://bugs.webkit.org/show_bug.cgi?id=47324
* runtime/StringPrototype.cpp:
(JSC::substituteBackreferencesSlow):
2010-10-08 Chris Evans <cevans@google.com>
Reviewed by David Levin.
https://bugs.webkit.org/show_bug.cgi?id=47393
Use unsigned consistently to check for max StringImpl length.
Add a few integer overflow checks.
Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request.
* wtf/text/WTFString.cpp:
* wtf/text/StringImpl.h:
* wtf/text/StringImpl.cpp:
Better use of size_t vs. unsigned; check for integer overflows.
2010-10-07 David Goodwin <david_goodwin@apple.com>
Reviewed by Oliver Hunt.
ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount
https://bugs.webkit.org/show_bug.cgi?id=47356
* assembler/ARMv7Assembler.h:
2010-10-06 Chris Evans <cevans@google.com>
Reviewed by David Levin.
https://bugs.webkit.org/show_bug.cgi?id=47248
Use size_t consistently in CString, to prevent theoretical trouble
with > 4GB strings on 64-bit platforms.
* wtf/text/CString.h:
* wtf/text/CString.cpp:
Use size_t for string lengths.
* wtf/MD5.cpp:
(WTF::expectMD5): use suitable format string + cast for size_t.
* JavaScriptCore.exp:
Update symbol name.
2010-10-06 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Start cleaning up Arguments.h
https://bugs.webkit.org/show_bug.cgi?id=47304
* wtf/TypeTraits.h:
* wtf/TypeTraits.cpp:
Add RemoveReference type trait.
2010-10-06 Rafael Antognolli <antognolli@profusion.mobi>
Unreviewed build fix.
[EFL] Build fix for glib support.
https://bugs.webkit.org/show_bug.cgi?id=47221
If compiling with GLib support enabled, we also need to link wtf against
glib library.
* wtf/CMakeListsEfl.txt:
2010-10-05 Kwang Yul Seo <skyul@company100.net>
Reviewed by Gavin Barraclough.
[BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT
https://bugs.webkit.org/show_bug.cgi?id=47117
Use IMemCache1 to flush data cache and invalidate instruction cache.
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::cacheFlush):
2010-10-05 Leandro Pereira <leandro@profusion.mobi>
Unreviewed. Build fix.
Moved "jsc" directory to "shell", so that the name does not clash with the
JavaScriptCore shell in some build systems.
http://webkit.org/b/47049
* CMakeLists.txt: Changed reference from "jsc" to "shell".
* jsc: Removed.
* jsc/CMakeLists.txt: Removed.
* jsc/CMakeListsEfl.txt: Removed.
* shell: Copied from JavaScriptCore/jsc.
2010-10-05 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Use PlatformRefPtr in randomNumber
https://bugs.webkit.org/show_bug.cgi?id=46989
Use PlatformRefPtr to free memory automatically.
* wtf/RandomNumber.cpp:
(WTF::randomNumber):
2010-10-05 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64)
https://bugs.webkit.org/show_bug.cgi?id=46690
Use the correct register value when initialising the arguments
object in the interpreter. This is covered by existing tests.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-10-04 David Goodwin <david_goodwin@apple.com>
Reviewed by Oliver Hunt.
ARMv7 JIT should take advantage of 2-byte branches to reduce code size
https://bugs.webkit.org/show_bug.cgi?id=47007
* assembler/ARMv7Assembler.cpp:
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::computeJumpType):
(JSC::ARMv7Assembler::link):
(JSC::ARMv7Assembler::canBeJumpT2):
(JSC::ARMv7Assembler::canBeJumpT4):
(JSC::ARMv7Assembler::linkBX):
(JSC::ARMv7Assembler::linkJumpT4):
(JSC::ARMv7Assembler::linkJumpT2):
(JSC::ARMv7Assembler::linkJumpAbsolute):
2010-10-04 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Reviewed by Antonio Gomes.
[EFL] Use fast malloc for WebKit EFL
https://bugs.webkit.org/show_bug.cgi?id=46691
Use fast malloc for WebKit EFL because the fast malloc is to allocate
memory quickly.
* wtf/CMakeListsEfl.txt:
2010-10-04 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Lazily create activation objects
https://bugs.webkit.org/show_bug.cgi?id=47107
Make it possible to lazily create the activation object
for a function that needs one. This allows us to reduce
the overhead of entering a function that may require
an activation in some cases, but not always.
This does make exception handling a little more complex as
it's now necessary to verify that a callframes activation
has been created, and create it if not, in all of the
paths used in exception handling.
We also need to add logic to check for the existence of
the activation in the scoped_var opcodes, as well as
op_ret, op_ret_object_or_this and op_tearoff_activation
so that we can avoid creating an activation unnecesarily
on function exit.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
(JSC::CodeBlock::createActivation):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::setActivationRegister):
(JSC::CodeBlock::activationRegister):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitNewFunctionInternal):
(JSC::BytecodeGenerator::emitNewFunctionExpression):
(JSC::BytecodeGenerator::createActivationIfNecessary):
* bytecompiler/BytecodeGenerator.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBase):
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITCall32_64.cpp:
(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_ret_object_or_this):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_get_scoped_var):
(JSC::JIT::emit_op_put_scoped_var):
(JSC::JIT::emit_op_tear_off_activation):
(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_ret_object_or_this):
(JSC::JIT::emit_op_create_activation):
(JSC::JIT::emit_op_resolve_global_dynamic):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_scoped_var):
(JSC::JIT::emit_op_put_scoped_var):
(JSC::JIT::emit_op_tear_off_activation):
(JSC::JIT::emit_op_create_activation):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
2010-10-04 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
Remove ENABLE_SANDBOX
https://bugs.webkit.org/show_bug.cgi?id=47032
* Configurations/FeatureDefines.xcconfig:
2010-10-01 Pratik Solanki <psolanki@apple.com>
Reviewed by Geoffrey Garen.
Specify ALWAYS_INLINE at function declaration not function definition
https://bugs.webkit.org/show_bug.cgi?id=46960
For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well.
* bytecompiler/BytecodeGenerator.h:
* wtf/FastMalloc.cpp:
2010-10-01 Kwang Yul Seo <skyul@company100.net>
Unreviewed.
[BREWMP] Change Collector BLOCK_SIZE to 64KB
https://bugs.webkit.org/show_bug.cgi?id=46436
Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices.
* runtime/Collector.h:
2010-10-01 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
Reviewed by Andreas Kling.
[Qt] Stack overflow on symbian platform.
https://bugs.webkit.org/show_bug.cgi?id=40598
Move big allocation in arrayProtoFuncToString from stack to heap.
JSC::arrayProtoFuncToString function can be called recursivly and
1K allocation on stack cahse stack overflow.
Can be useful for other platforms with limited stack size.
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
2010-09-30 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr.
https://bugs.webkit.org/show_bug.cgi?id=46373
A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef
to wrap the instance in PlatformRefPtr.
* wtf/brew/ShellBrew.h:
(WTF::createRefPtrInstance):
2010-09-30 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Port PlatformRefPtr
https://bugs.webkit.org/show_bug.cgi?id=46370
Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP.
* wtf/brew/RefPtrBrew.h: Added.
(WTF::refPlatformPtr):
(WTF::derefPlatformPtr):
2010-09-29 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Add additional checks to StringBuffer.
<rdar://problem/7756381>
* wtf/text/StringBuffer.h:
(WTF::StringBuffer::StringBuffer):
(WTF::StringBuffer::resize):
2010-09-30 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
Make 2D accelerated canvas rendering build on Mac
https://bugs.webkit.org/show_bug.cgi?id=46007
Added ACCELERATED_2D_CANVAS to FeatureDefines
* Configurations/FeatureDefines.xcconfig:
2010-09-30 Kevin Ollivier <kevino@theolliviers.com>
[wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from
the copy so as not to alter global settings.
* wscript:
2010-09-30 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
The case-insensitivity backreference checking isn't working with YARR
Interpreter
https://bugs.webkit.org/show_bug.cgi?id=46882
Add ignorecase checking to the Interpreter::tryConsumeBackReference() function.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::tryConsumeBackReference):
2010-09-30 Kwang Yul Seo <skyul@company100.net>
Reviewed by Andreas Kling.
[BREWMP] Leave initializeRandomNumberGenerator empty.
https://bugs.webkit.org/show_bug.cgi?id=46851
On Brew MP, AEECLSID_RANDOM initializes itself.
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator):
2010-09-30 Gabor Loki <loki@webkit.org>
Reviewed by Csaba Osztrogonác.
Remove unnecessary cacheFlush calls from Thumb-2
https://bugs.webkit.org/show_bug.cgi?id=46702
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::relinkCall):
(JSC::ARMv7Assembler::repatchInt32):
(JSC::ARMv7Assembler::repatchPointer):
2010-09-29 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Next try to fix cygwin build.
* wtf/Assertions.cpp:
2010-09-29 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Build fix for cygwin #2. It's OS(WINDOWS), not OS(WIN).
* wtf/Assertions.cpp:
2010-09-29 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Build fix for cygwin.
* wtf/Assertions.cpp:
2010-09-29 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[WINCE] Buildfix for Assertions.cpp after r68511.
https://bugs.webkit.org/show_bug.cgi?id=46807
Some, but not all WinCE environments have support for IsDebuggerPresent().
Add HAVE(ISDEBUGGERPRESENT) to make this a build option.
HAVE(ISDEBUGGERPRESENT) will be 1 for all OS(WIN) by default.
* wtf/Assertions.cpp:
* wtf/Platform.h:
2010-09-29 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Csaba Osztrogonác.
JSC compile fails on 32bit platform when Regexp Tracing is enabled
https://bugs.webkit.org/show_bug.cgi?id=46713
Fix the cast of pointer in regexp tracing to avoid the warning.
* runtime/RegExp.cpp:
(JSC::RegExp::match):
2010-09-28 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Begin hooking up painting in the plug-in process
https://bugs.webkit.org/show_bug.cgi?id=46766
* JavaScriptCore.exp:
Add tryFastRealloc, used by WebKit2.
2010-09-28 Philippe Normand <pnormand@igalia.com>
Reviewed by Martin Robinson.
Guard GRefPtr/GOwnPtr files with ENABLE(GLIB_SUPPORT)
https://bugs.webkit.org/show_bug.cgi?id=46721
Enable GOwnPtr/GRefPtr build only if glib support has been
explicitly enabled using the WTF_ENABLE_GLIB_SUPPORT macro.
* wtf/gobject/GOwnPtr.cpp:
* wtf/gobject/GOwnPtr.h:
* wtf/gobject/GRefPtr.cpp:
* wtf/gobject/GRefPtr.h:
2010-09-28 İsmail Dönmez <ismail@namtrac.org>
Reviewed by Andreas Kling.
Test for WINCE instead of WINCEBASIC, compiler always defines WINCE.
Remove reference to unexisting path JavaScriptCore/os-wince.
* JavaScriptCore.pri:
* wtf/Assertions.cpp:
2010-09-27 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Changed the initialization of JSArray objects to have space for
3 elements for the constructor that takes a ArgList argument.
This improves v8-deltablue performance by about 2.8% by reducing
the number of realloc() calls.
https://bugs.webkit.org/show_bug.cgi?id=46664
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
2010-09-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Darin Adler.
Bug 46680 - Inlining string concatenation can regress interpreter performance
<rdar://problem/8362752> REGRESSION: ~6.4% sunspider regression in interpreter
Do not inline calls to string concatenation in the interpret loop.
* interpreter/Interpreter.cpp:
(JSC::concatenateStrings):
(JSC::Interpreter::privateExecute):
2010-09-27 Anders Carlsson <andersca@apple.com>
Fix thinko.
* runtime/JSCell.h:
2010-09-27 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Try to fix Windows build.
* runtime/JSCell.h:
(JSC::MSVCBugWorkaround::MSVCBugWorkaround):
(JSC::MSVCBugWorkaround::~MSVCBugWorkaround):
2010-09-27 Erik Arvidsson <arv@chromium.org>
Reviewed by Darin Adler.
Add operator == for AtomicString and Vector<Uchar>
https://bugs.webkit.org/show_bug.cgi?id=46509
* JavaScriptCore.exp:
* wtf/text/AtomicString.cpp:
(WTF::operator==):
* wtf/text/AtomicString.h:
(WTF::operator==):
(WTF::operator!=):
2010-09-27 Anders Carlsson <andersca@apple.com>
Try to fix the Windows build.
* wtf/Noncopyable.h:
2010-09-26 Anders Carlsson <andersca@apple.com>
Reviewed by Alexey Proskuryakov and Adam Barth.
Add WTF_MAKE_NONCOPYABLE macro
https://bugs.webkit.org/show_bug.cgi?id=46589
Going forward, we'd like to get rid of the Noncopyable and FastAllocBase classes. The
reason for this is that the Itanium C++ ABI states that no empty classes of the same type
can be laid out at the same offset in the class. This can result in objects getting larger
which leads to memory regressions. (One example of this is the String class which grew by
sizeof(void*) when both its base class and its first member variable inherited indirectly
from FastAllocBase).
* wtf/Noncopyable.h:
Add a WTF_MAKE_NONCOPYABLE macro and get rid of NoncopyableCustomAllocated.
* runtime/JSCell.h:
* wtf/RefCounted.h:
Don't inherit from NoncopyableCustomAllocated. Instead, use WTF_MAKE_NONCOPYABLE.
2010-09-27 Philippe Normand <pnormand@igalia.com>
Reviewed by Martin Robinson.
[GTK] use ENABLE(GLIB_SUPPORT)
https://bugs.webkit.org/show_bug.cgi?id=46630
* wtf/Platform.h: Include GTypedefs.h only if glib support
is explicitly enabled.
2010-09-25 Holger Hans Peter Freyther <holger@moiji-mobile.com>
Reviewed by Adam Barth.
jsc: Document the strcat opcode.
https://bugs.webkit.org/show_bug.cgi?id=46571
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-09-21 Holger Hans Peter Freyther <holger@moiji-mobile.com>
Reviewed by Adam Barth.
make-bytecode-docs.pl: Add a comment to the generated HTML
https://bugs.webkit.org/show_bug.cgi?id=46570
Generate an HTML Comment that this file was generated from
Interpreter.cpp with the make-bytecode-docs.pl script.
* docs/make-bytecode-docs.pl:
2010-09-27 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Remove WTF::stringHash functions
https://bugs.webkit.org/show_bug.cgi?id=46520
Since r68289 the stringHash functions are only wrappers around StringHasher::createHash.
So use StringHasher::createHash directly and remove stringHash.
* wtf/StringHashFunctions.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::computeHash): Use WTF::StringHasher::createHash directly.
2010-09-26 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Add WTF::StringHasher::createBlobHash
https://bugs.webkit.org/show_bug.cgi?id=46514
Add this function for hashing FormElementKey and QualifiedNameComponents.
* wtf/StringHashFunctions.h:
(WTF::StringHasher::createBlobHash):
2010-09-26 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
REGRESSION (r68289): Assertion failure in StringHasher::addCharacter() (ch != invalidCharacterValue)
running websocket/tests/bad-sub-protocol-non-ascii.html
https://bugs.webkit.org/show_bug.cgi?id=46553
Because we use StringHasher for binary data too, so the check for invalid unicode input is wrong.
Add an additional member variable to indicate if we have an pending character
instead of only using an invalid character for this purpose.
* wtf/StringHashFunctions.h:
(WTF::StringHasher::StringHasher):
(WTF::StringHasher::addCharacters):
(WTF::StringHasher::addCharacter):
(WTF::StringHasher::hash):
2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com>
Reviewed by Oliver Hunt.
valueOf called in wrong order in atan2 and date constructors.
https://bugs.webkit.org/show_bug.cgi?id=26978
Fixed the bug where the arguments to atan2 were being evaluated
out of order.
* runtime/MathObject.cpp:
(JSC::mathProtoFuncATan2):
2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com>
Reviewed by Oliver Hunt.
valueOf called in wrong order in atan2 and date constructors.
https://bugs.webkit.org/show_bug.cgi?id=26978
Fixed the issue where the parameters to the Date constructor
were being evaluated to numbers more than once.
* runtime/DateConstructor.cpp:
(JSC::constructDate):
(JSC::dateUTC):
2010-09-25 Oliver Hunt <oliver@apple.com>
Fix various builds
Relearning the lesson that last minute changes are bad.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitGetArgumentsLength):
* jit/JITOpcodes.cpp:
(JSC::JIT::emitSlow_op_get_argument_by_val):
2010-09-25 Oliver Hunt <oliver@apple.com>
Reviewed by Cameron Zwarich.
Avoid constructing arguments object when accessing length and index properties
https://bugs.webkit.org/show_bug.cgi?id=46572
Add opcodes to read argument length and properties, and then implement them.
Much like other lazy opcodes these opcodes take a fast path when the arguments
object has not been instantiated, and fall back on generic access mechanisms
if they are acting on an instantiated object.
3% win on v8-earleyboyer, no change elsewhere.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitGetArgumentsLength):
(JSC::BytecodeGenerator::emitGetArgumentByVal):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::BracketAccessorNode::emitBytecode):
(JSC::DotAccessorNode::emitBytecode):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_arguments_length):
(JSC::JIT::emitSlow_op_get_arguments_length):
(JSC::JIT::emit_op_get_argument_by_val):
(JSC::JIT::emitSlow_op_get_argument_by_val):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_arguments_length):
(JSC::JIT::emitSlow_op_get_arguments_length):
(JSC::JIT::emit_op_get_argument_by_val):
(JSC::JIT::emitSlow_op_get_argument_by_val):
2010-09-25 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Fix typo in StringHasher class
https://bugs.webkit.org/show_bug.cgi?id=45970
* wtf/StringHashFunctions.h:
(WTF::StringHasher::createHash):
2010-09-24 Patrick Gansterer <paroga@paroga.com>
Reviewed by Gavin Barraclough.
Add WTF::StringHasher
https://bugs.webkit.org/show_bug.cgi?id=45970
StringHasher is a class for calculation stringHash out of character string.
This class will unify the different usages of the same algorithm.
* wtf/StringHashFunctions.h:
(WTF::StringHasher::StringHasher):
(WTF::StringHasher::addCharacters):
(WTF::StringHasher::addCharacter):
(WTF::StringHasher::hash):
(WTF::StringHasher::createHash):
(WTF::StringHasher::defaultCoverter):
(WTF::StringHasher::addCharactersToHash):
(WTF::stringHash):
2010-09-24 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Variable declarations inside a catch scope don't get propogated to the parent scope
https://bugs.webkit.org/show_bug.cgi?id=46501
Add logic to make variable declaration look for a scope for the
new variable. This allows us to create a scope (eg. for catch)
and then seal it, so that additional variable declarations
contained are propogated to the correct target. Strangely this
comes out as a performance win, but I think it's mostly cache
effects.
* parser/JSParser.cpp:
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::preventNewDecls):
(JSC::JSParser::Scope::allowsNewDecls):
(JSC::JSParser::declareVariable):
(JSC::JSParser::parseVarDeclarationList):
(JSC::JSParser::parseConstDeclarationList):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionDeclaration):
2010-09-24 İsmail Dönmez <ismail@namtrac.org>
Reviewed by Csaba Osztrogonác.
Add a Windows compatible inttypes.h header to fix WinCE build.
https://bugs.webkit.org/show_bug.cgi?id=46463
* os-win32/inttypes.h: Added.
2010-09-24 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit).
https://bugs.webkit.org/show_bug.cgi?id=46448
Roll this back in, with additional logic to prevent us from delaying construction
of functions named "arguments"
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitInitLazyRegister):
(JSC::BytecodeGenerator::registerFor):
(JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
(JSC::BytecodeGenerator::constRegisterFor):
(JSC::BytecodeGenerator::emitNewFunction):
(JSC::BytecodeGenerator::emitLazyNewFunction):
(JSC::BytecodeGenerator::emitNewFunctionInternal):
* bytecompiler/BytecodeGenerator.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_init_lazy_reg):
(JSC::JIT::emit_op_new_func):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_init_lazy_reg):
* parser/Nodes.h:
(JSC::ScopeNode::needsActivationForMoreThanVariables):
2010-09-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r68223.
http://trac.webkit.org/changeset/68223
https://bugs.webkit.org/show_bug.cgi?id=46448
It broke 2-3 tests on bots (Requested by Ossy on #webkit).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::registerFor):
(JSC::BytecodeGenerator::constRegisterFor):
(JSC::BytecodeGenerator::emitNewFunction):
* bytecompiler/BytecodeGenerator.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_new_func):
(JSC::JIT::emit_op_init_arguments):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_new_func):
(JSC::JIT::emit_op_init_arguments):
* parser/Nodes.h:
2010-09-23 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Delay construction of functions that aren't captured
https://bugs.webkit.org/show_bug.cgi?id=46433
If a function isn't captured by an activation there's no
way it can be accessed indirectly, so we can delay the
construction until it's used (similar to what we do with
arguments). We rename the existing op_init_arguments to
op_init_lazy_reg and removed its implicit handling of
the anonymous argument register, and make op_new_function
take a parameter to indicate whether it should null check
the target slot before creating the function object.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitInitLazyRegister):
(JSC::BytecodeGenerator::registerFor):
(JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
(JSC::BytecodeGenerator::constRegisterFor):
(JSC::BytecodeGenerator::emitNewFunction):
(JSC::BytecodeGenerator::emitLazyNewFunction):
(JSC::BytecodeGenerator::emitNewFunctionInternal):
* bytecompiler/BytecodeGenerator.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_init_lazy_reg):
(JSC::JIT::emit_op_new_func):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_init_lazy_reg):
* parser/Nodes.h:
(JSC::ScopeNode::needsActivationForMoreThanVariables):
2010-09-23 David Kilzer <ddkilzer@apple.com>
<rdar://problem/8460731> ~9.9% speedup when compiling interpreter with llvm-gcc-4.2
https://bugs.webkit.org/show_bug.cgi?id=46423
Reviewed by Oliver Hunt.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute): Disable the gcc computed
goto hacks added in r55564 when compiling with llvm-gcc-4.2.
2010-09-23 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Darin Adler.
Fix usage of enum as if it was a define
https://bugs.webkit.org/show_bug.cgi?id=46355
pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an
enum. Hence, it cannot be used by the preprocessor which always
evaluates that condition as true. This was giving a warning when
compiling with gcc and "-Wundef" flag.
The second path, when PTHREAD_MUTEX_DEFAULT is not the same of
PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path
and get rid of that #if.
* wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to
set mutex type to PTHREAD_MUTEX_NORMAL.
(WTF::Mutex::Mutex):
2010-09-23 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Removed extraneous truncation of ovector on entry and error exit.
Changed the initialization to -1 of vector to only initialize
the start indecies, which is sufficient for the pattern/subpatterns.
Changed the JIT code to not clear the end index for subpatterns
as it isn't needed. These changes are worth ~2.7% on v8-regexp.
https://bugs.webkit.org/show_bug.cgi?id=46404
* runtime/RegExp.cpp:
(JSC::RegExp::match):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2010-09-22 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Only copy captured variables into activation
https://bugs.webkit.org/show_bug.cgi?id=46330
We now track free variable information which means that
we no longer need to copy every variable defined in a
function. With this patch activations only retain those
variables needed for correctness. In order to interact
safely with the inspector this means that JSActivation
now provides its own lookup functions so it can avoid
trying to read or write to variables that have been
optimised out.
* bytecode/CodeBlock.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* parser/Nodes.h:
(JSC::ScopeNode::capturedVariableCount):
(JSC::ScopeNode::captures):
* runtime/Arguments.h:
(JSC::JSActivation::copyRegisters):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
* runtime/Executable.h:
(JSC::FunctionExecutable::capturedVariableCount):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
(JSC::JSActivation::symbolTableGet):
(JSC::JSActivation::symbolTablePut):
(JSC::JSActivation::getOwnPropertyNames):
(JSC::JSActivation::symbolTablePutWithAttributes):
* runtime/JSActivation.h:
2010-09-23 Ismail Donmez <ismail@namtrac.org>
Reviewed by Andreas Kling.
Fix jsc.exe build for Windows CE
* jsc.pro: Add mmtimer.lib for Windows CE.
2010-09-23 Ismail Donmez <ismail@namtrac.org>
Unreviewed.
JIT should be disabled on Windows CE. Broken in r64176.
* wtf/Platform.h:
2010-09-23 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Reduce the number of BOL checks in YARR Interpreter
https://bugs.webkit.org/show_bug.cgi?id=46260
Extend the YARR Interpreter with an optimization which reduces the number of
BOL assertion checks. If a "TypeBodyAlternative" byteTerm is followed by a
"TypeAssertionBOL" byteTerm it will be checked just one time.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::ByteCompiler::compile):
(JSC::Yarr::ByteCompiler::regexBegin):
(JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
(JSC::Yarr::ByteCompiler::emitDisjunction):
* yarr/RegexInterpreter.h:
(JSC::Yarr::ByteTerm::BodyAlternativeBegin):
(JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
(JSC::Yarr::ByteTerm::BodyAlternativeEnd):
(JSC::Yarr::ByteTerm::AlternativeBegin):
(JSC::Yarr::ByteTerm::AlternativeDisjunction):
(JSC::Yarr::ByteTerm::AlternativeEnd):
2010-09-22 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Fixed the cross over from alternatives executed once and
those that loop. This fixed the problem where the index
was getting messed up for looping alternatives causing an
infinite loop.
https://bugs.webkit.org/show_bug.cgi?id=46189
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateDisjunction):
2010-09-22 Steve Falkenburg <sfalken@apple.com>
Rubber stamped by Jon Honeycutt.
Allow jsc.exe to be run against unversioned ICU.
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
2010-09-22 Kwang Yul Seo <skyul@company100.net>
Reviewed by Laszlo Gombos.
Use "typedef wchar_t JSChar" when compiled with RVCT
https://bugs.webkit.org/show_bug.cgi?id=40651
Use wchar_t for JSChar and UChar when compiled with RVCT.
Linux is the exception for this rule.
* API/JSStringRef.h:
* wtf/unicode/qt4/UnicodeQt4.h:
2010-09-22 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[INTERPRETER] Two tests fail with SputnikError: #1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown
https://bugs.webkit.org/show_bug.cgi?id=44245
Remove incorrect code from op_load_varargs in the interpreter.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-09-22 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[JIT] fast/js/sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.5/S15.3.5.3_A2_T6.html fails
https://bugs.webkit.org/show_bug.cgi?id=44246
JIT code generated for instanceof was not checking to ensure that the prototype property was
an object, this patch ensures that it does.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
2010-09-22 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Inline UTF8SequenceLength
https://bugs.webkit.org/show_bug.cgi?id=45589
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::convertUTF8ToUTF16): Use inline version of UTF8SequenceLength to improve performance.
2010-09-21 Oliver Hunt <oliver@apple.com>
RS=Gavin Barraclough.
Fix codeblock dumping
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* runtime/Executable.h:
(JSC::ScriptExecutable::ScriptExecutable):
2010-09-21 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Speed up function.apply(..., arguments)
https://bugs.webkit.org/show_bug.cgi?id=46207
Add code to do argument copying inline in the case
where we're using Function.apply to forward our arguments
directly.
* jit/JIT.cpp:
(JSC::JIT::privateCompileSlowCases):
Splitted op_load_varargs into fast and slow paths, so add the call
to the slow path generator.
* jit/JIT.h:
* jit/JITCall32_64.cpp:
Remove 32bit specific emit_op_load_varargs as the logic is the
same for all value representations
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_load_varargs):
Copy arguments inline
(JSC::JIT::emitSlow_op_load_varargs):
2010-09-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
<rdar://problem/8363003> REGRESSION: ~1.4% sunspider regression in
interpreter due to 54724 and 54596
Fixed a typo (using "UNLIKELY" instead of "LIKELY").
* wtf/PassRefPtr.h:
(WTF::refIfNotNull):
(WTF::derefIfNotNull): It is likely that m_ptr != 0 because most RefPtrs
hold real data. Also, in cases where they do not hold real data, the
compiler usually sees a call to release() right before the call to the
destructor, so it can probably optimize out the test completely.
2010-09-21 Fridrich Strba <fridrich.strba@bluewin.ch>
Reviewed by Martin Robinson.
Build issues with Windows versions of the GTK+ port
https://bugs.webkit.org/show_bug.cgi?id=45844
Link with winmm.dll when necessary and specify the executable extension
explicitely so that the Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@
rule actually works.
Don't try to build the ThreadSpecificWin.cpp since GTK+ port uses
a section in ThreadSpecific.cpp
* GNUmakefile.am:
2010-09-21 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] 'make dist' should be fixed in preparation for the next release
https://bugs.webkit.org/show_bug.cgi?id=46129
* GNUmakefile.am: Update the sources list to include missing headers.
2010-09-21 Dave Tapuska <dtapuska@rim.com>
Reviewed by Csaba Osztrogonác.
https://bugs.webkit.org/show_bug.cgi?id=45673
r65596 caused ENABLE_PROFILER_REFERENCE_OFFSET to not be
8 byte aligned. A non 8 byte divisible value for this will
cause the sp to become non 8 byte aligned.
Verify and correct offset values that r65596 effected that
weren't updated.
* jit/JITStubs.cpp:
* jit/JITStubs.h:
2010-09-21 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
Fix Opcode stats compilation
https://bugs.webkit.org/show_bug.cgi?id=46079
The FixedArray API had changed, and <stdio.h> was not included for
printf.
* bytecode/Opcode.cpp:
(JSC::OpcodeStats::~OpcodeStats):
2010-09-20 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Fixed detection of alternative smaller than the first alternative
to only check looping alternatives.
https://bugs.webkit.org/show_bug.cgi?id=46049
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateDisjunction):
2010-09-20 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
REGRESSION(67790): jsc tests are failed with YARR interpreter
https://bugs.webkit.org/show_bug.cgi?id=46083
Fix the initializing of the lastSubpatternId member of
parentheses.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
2010-09-20 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 46077 - ASSERT failure in YARR JIT
We will currently attempt to loop if there are multiple alternatives, they are all
BOL predicated, and the last alternative is longer then the first - however if all
alternatives are BOL predicated the head of loop label will not have been set, and
we'll try to link a jump to an undefined label. Stop doing so.
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateDisjunction):
2010-09-20 Adam Roben <aroben@apple.com>
Export RegExpObject::info from JavaScriptCore
This allows obj->inherits(&RegExpObject::info) to work correctly from
outside JavaScriptCore.dll on Windows.
Fixes <http://webkit.org/b/46098>
fast/loader/stateobjects/pushstate-object-types.html fails on Windows
Reviewed by John Sullivan.
* runtime/RegExpObject.h: Added JS_EXPORTDATA to the info member, as
we already have for some other classes whose info members have to be
used from outside the DLL.
2010-09-19 Gavin Barraclough <barraclough@apple.com>
Windows build fix pt 2.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-09-19 Gavin Barraclough <barraclough@apple.com>
Windows build fix pt 1.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-09-19 Gavin Barraclough <barraclough@apple.com>
Build fix - implicit double-to-int conversion invalid on 32-bit.
* runtime/DatePrototype.cpp:
(JSC::fillStructuresUsingDateArgs):
(JSC::dateProtoFuncSetYear):
2010-09-19 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod.
These methods implement the same conversion (see discussion in the notes
of sections of 9.5 and 9.6 of the spec), only differing in how the result
is interpretted.
Date prototype is incorrectly using toInt32, and this is causing us to
provide an output value indicating whether the input to ToInt32 was finite
(the corresponding methods on Date are actually spec'ed to use ToInteger,
not ToInt32). This patch partially fixes this in order to remove this
bogus output value, hoewever more work will be require to bring Date
fully up to spec compliance (the constructor is still performing ToInt32
conversions).
* JavaScriptCore.exp:
* runtime/DatePrototype.cpp:
(JSC::fillStructuresUsingTimeArgs):
(JSC::fillStructuresUsingDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/JSValue.cpp:
(JSC::toInt32):
* runtime/JSValue.h:
(JSC::toUInt32):
(JSC::JSValue::toInt32):
(JSC::JSValue::toUInt32):
2010-09-18 Darin Adler <darin@apple.com>
First step in fixing Windows build.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
Removed incorrect symbol. The build will probably still fail,
but the failure will tell us what symbol to add.
2010-09-18 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Added code to unroll regular expressions containing ^.
Alternatives that begin with ^ are tagged during parsing
and rolled up in containing sub expression structs.
After parsing, a regular expression flagged as containing
a ^ (a.k.a. BOL) is processed further in optimizeBOL().
A copy of the disjunction is made excluding alternatives that
are rooted with BOL. The original alternatives are flagged
to only be executed once. The copy of the other alternatives are
added to the original expression.
In the case that all original alternatives are flagged, there
won't be any looping alternatives.
The JIT generator will emit code accordingly, executing the
original alternatives once and then looping over the
alternatives that aren't anchored with a BOL (if any).
https://bugs.webkit.org/show_bug.cgi?id=45787
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::assertionBOL):
(JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
(JSC::Yarr::RegexPatternConstructor::copyDisjunction):
(JSC::Yarr::RegexPatternConstructor::copyTerm):
(JSC::Yarr::RegexPatternConstructor::optimizeBOL):
(JSC::Yarr::compileRegex):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateDisjunction):
* yarr/RegexPattern.h:
(JSC::Yarr::PatternAlternative::PatternAlternative):
(JSC::Yarr::PatternAlternative::setOnceThrough):
(JSC::Yarr::PatternAlternative::onceThrough):
(JSC::Yarr::PatternDisjunction::PatternDisjunction):
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-09-18 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
Rename Wince files to WinCE
https://bugs.webkit.org/show_bug.cgi?id=37287
* wtf/unicode/Unicode.h:
* wtf/unicode/wince/UnicodeWinCE.cpp: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.cpp.
* wtf/unicode/wince/UnicodeWinCE.h: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.h.
* wtf/unicode/wince/UnicodeWince.cpp: Removed.
* wtf/unicode/wince/UnicodeWince.h: Removed.
* wtf/wince/FastMallocWinCE.h: Copied from JavaScriptCore/wtf/wince/FastMallocWince.h.
* wtf/wince/FastMallocWince.h: Removed.
2010-09-18 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
Enable Platform Strategies on Qt
[Qt] Turn on PLATFORM_STRATEGIES
https://bugs.webkit.org/show_bug.cgi?id=45831
* wtf/Platform.h: Enable Platform Strategies when building QtWebkit
2010-09-17 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Imprecise tracking of variable capture leads to overly pessimistic creation of activations
https://bugs.webkit.org/show_bug.cgi?id=46020
The old logic for track free and captured variables would cause us
to decide we needed an activation in every function along the scope
chain between a variable capture and its declaration. We now track
captured variables precisely which requires a bit of additional work
The most substantial change is that the parsing routine needs to
be passed the list of function parameters when reparsing a function
as when reparsing we don't parse the function declaration itself only
its body.
* JavaScriptCore.exp:
* parser/JSParser.cpp:
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::needsFullActivation):
We need to distinguish between use of a feature that requires
an activation and eval so we now get this additional flag.
(JSC::JSParser::Scope::collectFreeVariables):
(JSC::JSParser::Scope::getCapturedVariables):
We can't simply return the list of "capturedVariables" now as
is insufficiently precise, so we compute them instead.
(JSC::JSParser::popScope):
(JSC::jsParse):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseWithStatement):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseFunctionDeclaration):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseMemberExpression):
* parser/JSParser.h:
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/Parser.h:
(JSC::Parser::parse):
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::checkSyntax):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
(JSC::FunctionExecutable::fromGlobalCode):
Pass function parameters (if available) to the parser.
2010-09-17 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add IsFloatingPoint and IsArithmetic type traits
https://bugs.webkit.org/show_bug.cgi?id=46018
* wtf/TypeTraits.h:
* wtf/TypeTraits.cpp:
2010-09-17 Martin Robinson <mrobinson@igalia.com>
Reviewed by Oliver Hunt.
[GTK] FontPlatformDataFreeType should use smart pointers to hold its members
https://bugs.webkit.org/show_bug.cgi?id=45917
Added support to PlatformRefPtr for handling HashTableDeletedValue.
* wtf/PlatformRefPtr.h:
(WTF::PlatformRefPtr::PlatformRefPtr): Added a constructor that takes HashTableDeletedValue.
(WTF::PlatformRefPtr::isHashTableDeletedValue): Added.
2010-09-16 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Crash due to timer triggered GC on one heap while another heap is active
https://bugs.webkit.org/show_bug.cgi?id=45932
<rdar://problem/8318446>
The GC timer may trigger for one heap while another heap is active. This
is safe, but requires us to ensure that we have temporarily associated the
thread's identifierTable with the heap we're collecting on. Otherwise we
may end up with the identifier tables in an inconsistent state leading to
an eventual crash.
* runtime/Collector.cpp:
(JSC::Heap::allocate):
(JSC::Heap::reset):
(JSC::Heap::collectAllGarbage):
Add assertions to ensure we have the correct identifierTable active
while collecting.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallbackPlatformData::trigger):
Temporarily make the expected IdentifierTable active
* wtf/WTFThreadData.h:
(JSC::IdentifierTable::remove):
Make it possible to see when IdentifierTable::remove has succeeded
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
CRASH if an StringImpl is an Identifier but isn't present in the
active IdentifierTable. If we get to this state something has
gone wrong and we should just crash immediately.
2010-09-16 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] Implement dissolveDragImageToFraction
https://bugs.webkit.org/show_bug.cgi?id=45826
* wtf/gobject/GTypedefs.h: Added forward declarations for GtkWindow and GdkEventExpose.
2010-09-16 Eric Uhrhane <ericu@chromium.org>
Reviewed by Jian Li.
Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM.
https://bugs.webkit.org/show_bug.cgi?id=45798
* Configurations/FeatureDefines.xcconfig:
2010-09-15 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Use free variable analysis to improve activation performance
https://bugs.webkit.org/show_bug.cgi?id=45837
Adds free and captured variable tracking to the JS parser. This
allows us to avoid construction of an activation object in some
cases. Future patches will make more use of this information to
improve those cases where activations are still needed.
* parser/ASTBuilder.h:
* parser/JSParser.cpp:
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::declareVariable):
(JSC::JSParser::Scope::useVariable):
(JSC::JSParser::Scope::collectFreeVariables):
(JSC::JSParser::Scope::capturedVariables):
(JSC::JSParser::ScopeRef::ScopeRef):
(JSC::JSParser::ScopeRef::operator->):
(JSC::JSParser::ScopeRef::index):
(JSC::JSParser::currentScope):
(JSC::JSParser::pushScope):
(JSC::JSParser::popScope):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseVarDeclarationList):
(JSC::JSParser::parseConstDeclarationList):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseFunctionDeclaration):
(JSC::JSParser::parsePrimaryExpression):
* parser/Nodes.cpp:
(JSC::ScopeNodeData::ScopeNodeData):
(JSC::ScopeNode::ScopeNode):
(JSC::ProgramNode::ProgramNode):
(JSC::ProgramNode::create):
(JSC::EvalNode::EvalNode):
(JSC::EvalNode::create):
(JSC::FunctionBodyNode::FunctionBodyNode):
(JSC::FunctionBodyNode::create):
* parser/Nodes.h:
(JSC::ScopeNode::needsActivation):
(JSC::ScopeNode::hasCapturedVariables):
* parser/Parser.cpp:
(JSC::Parser::didFinishParsing):
* parser/Parser.h:
(JSC::Parser::parse):
* parser/SyntaxChecker.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
* runtime/Executable.h:
(JSC::ScriptExecutable::needsActivation):
(JSC::ScriptExecutable::recordParse):
2010-09-14 Hyung Song <beergun@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Add IMemGroup and IMemSpace to OwnPtr type.
https://bugs.webkit.org/show_bug.cgi?id=44764
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.cpp:
(WTF::deleteOwnedPtr):
2010-09-14 Darin Adler <darin@apple.com>
Reviewed by Geoffrey Garen.
Sort with non-numeric custom sort function fails on array with length but no values
https://bugs.webkit.org/show_bug.cgi?id=45781
* runtime/JSArray.cpp:
(JSC::JSArray::sort): Replaced early exit for an array of length zero to instead
exit for any array without values, even if it has a non-0 length.
2010-09-14 Steve Falkenburg <sfalken@apple.com>
Windows production build fix.
Roll out r65143.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2010-09-14 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
Share UnicodeMacrosFromICU.h
https://bugs.webkit.org/show_bug.cgi?id=45710
glib, qt4 and wince use the same macros from ICU.
Remove the code duplication and use the same header file.
* wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h.
* wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed.
* wtf/unicode/qt4/UnicodeQt4.h:
* wtf/unicode/wince/UnicodeWince.h:
2010-09-13 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
Preparation for eliminating deprecatedParseURL
https://bugs.webkit.org/show_bug.cgi?id=45695
* wtf/text/WTFString.h: Added isAllSpecialCharacters, moved here from
the HTML tree builder.
2010-09-13 Darin Fisher <darin@chromium.org>
Reviewed by David Levin.
Add option to conditionally compile smooth scrolling support.
https://bugs.webkit.org/show_bug.cgi?id=45689
ENABLE(SMOOTH_SCROLLING) is disabled by default for all platforms.
* wtf/Platform.h:
2010-09-13 Adam Roben <aroben@apple.com>
Copy JavaScriptCore's generated sources to the right directory
* JavaScriptCore.vcproj/JavaScriptCore.make: Fixed typo.
2010-09-13 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Don't call _msize
https://bugs.webkit.org/show_bug.cgi?id=45556
Because Brew MP uses its own memory allocator, it is not correct to use
_msize in fastMallocSize. Add !PLATFORM(BREWMP) guard.
* wtf/FastMalloc.cpp:
(WTF::fastMallocSize):
2010-09-11 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Andreas Kling.
[Qt] V8 port: webcore project files changes
https://bugs.webkit.org/show_bug.cgi?id=45141
* JavaScriptCore.pro: Moved wtf specific files to wtf.pri,
so that they can also be used from WebCore.pro for v8 builds.
* wtf/wtf.pri: Added.
2010-09-10 Fridrich Strba <fridrich.strba@bluewin.ch>
Reviewed by Andreas Kling.
Add a define missing when building with glib unicode backend
https://bugs.webkit.org/show_bug.cgi?id=45544
* wtf/unicode/glib/UnicodeMacrosFromICU.h:
2010-09-10 Stephanie Lewis <slewis@apple.com>
Reviewed by Alexey Proskuryakov.
Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know
about the JIT and other implementation details of JavaScriptCore. Necessary
to fix PPC build.
https://bugs.webkit.org/show_bug.cgi?id=45528
* JavaScriptCore.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/MemoryStatistics.cpp: Added.
(JSC::memoryStatistics):
* runtime/MemoryStatistics.h: Added.
2010-09-09 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Added a regular expression tracing facility. This tracing is connected
to jsc. Every compiled regular expression object is added to a list.
When the process exits, each regular expression dumps its pattern,
JIT address, number of times it was executed and the number of matches.
This tracing is controlled by the macro ENABLE_REGEXP_TRACING in
wtf/Platform.h.
https://bugs.webkit.org/show_bug.cgi?id=45401
* JavaScriptCore.exp:
* jsc.cpp:
(runWithScripts):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData):
(JSC::JSGlobalData::addRegExpToTrace):
(JSC::JSGlobalData::dumpRegExpTrace):
* runtime/JSGlobalData.h:
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::create):
(JSC::RegExp::match):
* runtime/RegExp.h:
* wtf/Platform.h:
* yarr/RegexJIT.h:
(JSC::Yarr::RegexCodeBlock::getAddr):
2010-09-09 John Therrell <jtherrell@apple.com>
32-bit build fix.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::committedByteCount):
2010-09-09 John Therrell <jtherrell@apple.com>
Reviewed by Alexey Proskuryakov.
Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes
https://bugs.webkit.org/show_bug.cgi?id=45134
Added thread-safe committed byte counting and reporting functionality to RegisterFile and
ExecutableAllocator.
* JavaScriptCore.exp:
Exported new symbols to allow for WebKit to get statistics from JavaScriptCore classes.
* interpreter/RegisterFile.cpp:
(JSC::registerFileStatisticsMutex):
Added function which returns a static Mutex used for locking during read/write access to
static committed byte count variable.
(JSC::RegisterFile::~RegisterFile):
Added call to addToStatistics since memory is decommitted here.
(JSC::RegisterFile::releaseExcessCapacity):
Added call to addToStatistics since memory is decommitted here.
(JSC::RegisterFile::initializeThreading):
Added function which calls registerFileStatisticsMutex().
(JSC::RegisterFile::committedByteCount):
Added function which returns the current committed byte count for RegisterFile.
(JSC::RegisterFile::addToCommittedByteCount):
Added function which updates committed byte count.
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
Added call to addToStatistics since memory is committed here.
(JSC::RegisterFile::grow):
Added call to addToStatistics since memory is committed here.
* jit/ExecutableAllocator.h:
Added function prototype for public static function committedByteCount().
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::release):
Added call to addToStatistics since memory is decommitted here.
(JSC::FixedVMPoolAllocator::reuse):
Added call to addToStatistics since memory is committed here.
(JSC::FixedVMPoolAllocator::addToCommittedByteCount):
Added function which updates committed byte count.
(JSC::ExecutableAllocator::committedByteCount):
Added function which returns the current committed byte count for ExecutableAllocator.
* runtime/InitializeThreading.cpp:
(JSC::initializeThreadingOnce):
Added call to RegisterFile::initializeThreading.
2010-09-09 Mark Rowe <mrowe@apple.com>
Reviewed by Oliver Hunt.
<http://webkit.org/b/45502> JSObjectSetPrivateProperty does not handle NULL values as it claims
* API/JSObjectRef.cpp:
(JSObjectSetPrivateProperty): Don't call toJS if we have a NULL value as that will cause an assertion
failure. Instead map NULL directly to the null JSValue.
* API/tests/testapi.c:
(main): Add test coverage for the NULL value case.
2010-09-09 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Gavin Barraclough.
[Qt] JSVALUE32_64 not works on Windows platform with MinGW compiler
https://bugs.webkit.org/show_bug.cgi?id=29268
* wtf/Platform.h: Enable JSVALUE32_64 for Qt/Windows/MinGW, because it works now.
2010-09-08 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Removing doneSemicolon label in the lexer
https://bugs.webkit.org/show_bug.cgi?id=45289
As a side effect of moving the multiline comment parsing
to a separate function, an opportunity raised to simplify
the single line comment parsing, and removing doneSemicolon
label. Slight performance increase on --parse-only
tests (from 32.8ms to 31.5ms)
* parser/Lexer.cpp:
(JSC::Lexer::lex):
2010-09-08 Xan Lopez <xlopez@igalia.com>
Reviewed by Alexey Proskuryakov.
Remove accessor for private member variable in JSParser
https://bugs.webkit.org/show_bug.cgi?id=45378
m_token is private to JSParser, so it does not seem to be useful
to have an accessor for it. On top of that, the file was both
using the accessor and directly accessing the member variable,
only one style should be used.
2010-09-08 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Oliver Hunt.
[Qt] REGRESSION(63348): jsc is broken
https://bugs.webkit.org/show_bug.cgi?id=42818
Need fastcall conventions on Qt/Win/MinGW.
Based on patches of Gavin Barraclough: r63947 and r63948.
* jit/JITStubs.cpp:
* jit/JITStubs.h:
2010-09-08 Robert Hogan <robert@webkit.org>
Reviewed by Antonio Gomes.
Remove some unnecessary duplicate calls to string functions
https://bugs.webkit.org/show_bug.cgi?id=45314
* wtf/text/WTFString.cpp:
(WTF::String::format):
2010-09-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Andreas Kling.
Re-Disable JIT for MSVC 64bit to fix the build on this compiler.
https://bugs.webkit.org/show_bug.cgi?id=45382
It was enabled in the cleanup made in r64176, though it is still
not implemented.
* wtf/Platform.h:
2010-09-08 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] Need a WebSocket implementation
https://bugs.webkit.org/show_bug.cgi?id=45197
Add a GIO-based WebSocket implementation.
* wtf/gobject/GRefPtr.cpp: Added PlatformRefPtr support for GSource.
(WTF::refPlatformPtr):
(WTF::derefPlatformPtr):
* wtf/gobject/GRefPtr.h: Added new template specialization declarations.
* wtf/gobject/GTypedefs.h: Add some more GLib/GIO forward declarations.
2010-08-30 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Adler.
Handle MediaQueryExp memory management exclusively with smart pointers
https://bugs.webkit.org/show_bug.cgi?id=44874
Implemented a non-copying sort function to make it possible to sort a Vector
of OwnPtrs (which cannot be copied). This is required for the above.
* wtf/NonCopyingSort.h: Added.
(WTF::nonCopyingSort): It's secretly heapsort.
(WTF::heapSort): heapsort implementation.
(WTF::siftDown): Helper function for heapsort.
(WTF::heapify): ditto
Adjust build systems.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-09-08 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Refactoring multiline comments in the lexer
https://bugs.webkit.org/show_bug.cgi?id=45289
MultiLine comment parsing is moved to a separate function.
Slight performance increase on --parse-only tests (from 33.6ms to 32.8ms)
SunSpider reports no change (from 523.1ms to 521.2ms).
* parser/Lexer.cpp:
(JSC::Lexer::parseMultilineComment):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-09-07 James Robinson <jamesr@chromium.org>
Compile fix attempt for windows.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-09-07 Mihai Parparita <mihaip@chromium.org>
Reviewed by James Robinson.
Fix Windows build after r66936
https://bugs.webkit.org/show_bug.cgi?id=45348
Add symbol names that were missing from r66936.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-09-07 Mihai Parparita <mihaip@chromium.org>
Reviewed by Oliver Hunt.
pushState and replaceState do not clone RegExp objects correctly
https://bugs.webkit.org/show_bug.cgi?id=44718
Move internal representation of JSC::RegExp (which depends on wether
YARR and YARR_JIT is enabled) into RegExpRepresentation which can live
in the implementation only. This makes it feasible to use RegExp in
WebCore without bringing in all of YARR.
* JavaScriptCore.exp: Export RegExp and RegExpObject functions that are
needed inside WebCore's JSC bindings.
* runtime/RegExp.cpp:
(JSC::RegExpRepresentation::~RegExpRepresentation):
(JSC::RegExp::RegExp):
(JSC::RegExp::~RegExp):
(JSC::RegExp::compile):
(JSC::RegExp::match):
* runtime/RegExp.h:
2010-09-07 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
<rdar://problem/8381749> -Wcast-align warning emitted when building with clang
Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
* Configurations/Base.xcconfig:
2010-09-07 Zoltan Horvath <zoltan@webkit.org>
Reviewed by Darin Adler.
REGRESSION(66741): Undefined pthread macros
https://bugs.webkit.org/show_bug.cgi?id=45246
PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT (introduced in r60487) are not defined on Linux,
but used in a statement. Add an additional check to test this.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger):
2010-09-06 Oliver Hunt <oliver@apple.com>
Windows build fix
2010-09-05 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
SerializedScriptValue needs to use a flat storage mechanism
https://bugs.webkit.org/show_bug.cgi?id=45244
Export JSArray::put
* JavaScriptCore.exp:
2010-09-06 Chao-ying Fu <fu@mips.com>
Reviewed by Oliver Hunt.
Support JSVALUE32_64 on MIPS
https://bugs.webkit.org/show_bug.cgi?id=43999
Add missing functions to support JSVALUE32_64 on MIPS.
Remove JSVALUE32 as the default for MIPS.
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::divd):
(JSC::MIPSAssembler::mthc1):
(JSC::MIPSAssembler::cvtwd):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::neg32):
(JSC::MacroAssemblerMIPS::branchOr32):
(JSC::MacroAssemblerMIPS::set8):
(JSC::MacroAssemblerMIPS::loadDouble):
(JSC::MacroAssemblerMIPS::divDouble):
(JSC::MacroAssemblerMIPS::convertInt32ToDouble):
(JSC::MacroAssemblerMIPS::branchDouble):
(JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32):
(JSC::MacroAssemblerMIPS::zeroDouble):
* jit/JIT.h:
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
* jit/JITStubs.cpp:
(JSC::JITThunks::JITThunks):
* jit/JITStubs.h:
* wtf/Platform.h:
2010-09-06 Robert Hogan <robert@webkit.org>
Unreviewed, compile fix.
Fix compile failure in r66843
Revert to original patch in bugzilla. Leave bug open for
discussion on potential removal of double utf8 conversion.
https://bugs.webkit.org/show_bug.cgi?id=45240
* wtf/text/WTFString.cpp:
(WTF::String::format):
2010-09-06 Robert Hogan <robert@webkit.org>
Reviewed by Andreas Kling.
[Qt] utf8 encoding of console() messages
Unskip:
http/tests/security/xssAuditor/embed-tag-null-char.html
http/tests/security/xssAuditor/object-embed-tag-null-char.html
Both tests failed because Qt's implementation of String::format()
is casting a utf8 result to String, which assumes latin1 in
its constructor. So instead of casting a QString to a String, use
StringImpl::create() instead. Unfortunately, this involves a lot
of extra casts but the end result is correct.
https://bugs.webkit.org/show_bug.cgi?id=45240
* wtf/text/WTFString.cpp:
(WTF::String::format):
2010-09-03 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=45135
<rdar://problem/7823714> TCMalloc_PageHeap doesn't hold a mutex while manipulating shared data
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger): Make sure to create a non-recursive mutex
regardless of platform default, so that we can assert that it's held (this is for platforms
that don't have libdispatch).
(WTF::TCMalloc_PageHeap::signalScavenger): Assert that the mutex is held, so we can look
at m_scavengeThreadActive. For platforms that have libdispatch, assert that pageheap_lock
is held.
(WTF::TCMalloc_PageHeap::periodicScavenge): Make sure that pageheap_lock is held before
manipulating m_scavengeThreadActive. Otherwise, there is an obvious race condition, and we
can make unbalanced calls to dispatch_resume().
2010-09-03 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Martin Robinson.
[EFL] Regression (66531) Build break with Glib Support
https://bugs.webkit.org/show_bug.cgi?id=45011
Move GtkTypedefs.h to GTypedefs.h and let it inside gobject directory
since when glib is enabled, EFL port needs it, too.
* CMakeListsEfl.txt: Include gobject directory to find new header
file.
* GNUmakefile.am: Ditto.
* wtf/CMakeListsEfl.txt: Ditto.
* wtf/Platform.h: Include header if port is EFL and glib support is
enabled.
* wtf/gtk/GtkTypedefs.h: Removed.
* wtf/gobject/GTypedefs.h: Added. Sections specific to GTK are now
guarded by PLATFORM(GTK).
2010-09-03 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Simon Hausmann.
Fix warning in wtf/ByteArray.h
https://bugs.webkit.org/show_bug.cgi?id=44672
* wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers.
2010-09-02 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Actually parse a URL from ParsedURL
https://bugs.webkit.org/show_bug.cgi?id=45080
This patch only handles standard URLs. At some point we'll need to
distinguish between standard URLs and other kinds of URLs.
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::ParsedURL):
2010-09-02 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add ParsedURL and URLString to WTFURL API
https://bugs.webkit.org/show_bug.cgi?id=45078
Currently there's no actual URL parsing going on, but this patch is a
start to sketching out the API.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/url/api/ParsedURL.cpp: Added.
(WTF::ParsedURL::ParsedURL):
(WTF::ParsedURL::scheme):
(WTF::ParsedURL::username):
(WTF::ParsedURL::password):
(WTF::ParsedURL::host):
(WTF::ParsedURL::port):
(WTF::ParsedURL::path):
(WTF::ParsedURL::query):
(WTF::ParsedURL::fragment):
(WTF::ParsedURL::segment):
* wtf/url/api/ParsedURL.h: Added.
(WTF::ParsedURL::spec):
* wtf/url/api/URLString.h: Added.
(WTF::URLString::URLString):
(WTF::URLString::string):
2010-09-02 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add WTFURL to the JavaScriptCore build on Mac
https://bugs.webkit.org/show_bug.cgi?id=45075
Building code is good.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-09-02 Alexey Proskuryakov <ap@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=43230
<rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser
One can't delete a ThreadSpecific object that has data in it. It's not even possible to
enumerate data objects in all threads, much less destroy them from a thread that's destroying
the ThreadSpecific.
* parser/JSParser.cpp:
(JSC::JSParser::JSParser):
* runtime/JSGlobalData.h:
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::approximatedStackStart):
Moved stack guard tracking from JSGlobalData to WTFThreadData.
* wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't
ever face a situation where we'd want to delete a ThreadSpecific object.
2010-09-01 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Oliver Hunt.
Ecma-262 15.11.1.1 states that if the argument is undefined then an
Error object's message property should be set to the empty string.
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
(JSC::ErrorInstance::create):
* runtime/ErrorInstance.h:
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
2010-08-31 Darin Adler <darin@apple.com>
Reviewed by Anders Carlsson.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that
mixed types with code that uses size_t.
* wtf/TCPageMap.h: Removed names of unused arguments to avoid warning.
2010-08-31 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
[GTK] Isolate all GTK+ typedefs into one file
https://bugs.webkit.org/show_bug.cgi?id=44900
* GNUmakefile.am: Add GtkTypedefs.h to the source lists.
* wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build.
* wtf/ThreadingPrimitives.h: Remove GTK+ typedefs.
* wtf/gobject/GOwnPtr.h: Ditto.
* wtf/gobject/GRefPtr.h: Ditto.
* wtf/gtk/GtkTypedefs.h: Added.
2010-08-31 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
[GTK] Fix 'make dist' in preparation of the 1.3.3 release
https://bugs.webkit.org/show_bug.cgi?id=44978
* GNUmakefile.am: Adding missing headers to the sources list.
2010-08-31 Chao-ying Fu <fu@mips.com>
Reviewed by Oliver Hunt.
Support emit_op_mod() for MIPS
https://bugs.webkit.org/show_bug.cgi?id=42855
This patch uses MIPS div instructions for op_mod to improve performance.
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::div):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitSlow_op_mod):
2010-08-31 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Darin Adler.
Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED.
https://bugs.webkit.org/show_bug.cgi?id=44870
* wtf/Assertions.h:
* wtf/UnusedParam.h:
2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
JSC TimeoutChecker::didTimeOut overflows on ARM
https://bugs.webkit.org/show_bug.cgi?id=38538
Make getCPUTime() return values relative to the first call.
The previous implementation relied on simply on currentTime(), which
return a time since epoch and not a time since the thread started. This
made the return value of getCPUTime() overflow on 32 bits.
* runtime/TimeoutChecker.cpp:
(JSC::getCPUTime):
2010-08-30 Mihai Parparita <mihaip@chromium.org>
Reviewed by Adam Barth.
HISTORY_ALWAYS_ASYNC should be removed (history should always be async)
https://bugs.webkit.org/show_bug.cgi?id=44315
Remove ENABLE_HISTORY_ALWAYS_ASYNC #define.
* wtf/Platform.h:
2010-08-30 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Fix namespace for wtf/Complex.h and wtf/Vector3.h
https://bugs.webkit.org/show_bug.cgi?id=44892
* wtf/Complex.h:
* wtf/Vector3.h:
2010-08-30 Andy Estes <aestes@apple.com>
Reviewed by Eric Carlson.
Strings returned by asciiDebug() should be NULL-terminated.
https://bugs.webkit.org/show_bug.cgi?id=44866
* wtf/text/WTFString.cpp:
(asciiDebug):
2010-08-30 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Refactor number parsing in the lexer
https://bugs.webkit.org/show_bug.cgi?id=44104
Number parsing was full of gotos, and needed a complete
redesign to remove them (Only one remained). Furthermore
integer arithmetic is empolyed for fast cases (= small
integer numbers).
* parser/Lexer.cpp:
(JSC::Lexer::parseHex):
(JSC::Lexer::parseOctal):
(JSC::Lexer::parseDecimal):
(JSC::Lexer::parseNumberAfterDecimalPoint):
(JSC::Lexer::parseNumberAfterExponentIndicator):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-08-29 Darin Adler <darin@apple.com>
Fix Qt build.
* wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP.
* wtf/unicode/qt4/UnicodeQt4.h: Ditto.
* wtf/unicode/wince/UnicodeWince.h: Ditto.
2010-08-29 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Port vprintf_stderr_common
https://bugs.webkit.org/show_bug.cgi?id=33568
Use BREW's DBGPRINTF to output debug messages.
* wtf/Assertions.cpp:
2010-08-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values
We are in places casting doubles to unsigneds, and unsigneds to ints, without always check
that the result is within bounds. This is problematic in the case of double-to-unsigned
conversion because we should be saturating to array length.
Also, the error return value from Array.splice should be [], not undefined.
I don't see any security concerns here. These methods are spec'ed in such a way that they
can be applied to non Array objects, so in all cases the (potentially bogus) indices are
being passed to functions that will safely check accesses are within bounds.
* runtime/ArrayPrototype.cpp:
(JSC::argumentClampedIndexFromStartOrEnd):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncConcat):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSort):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/JSValue.h:
(JSC::JSValue::toUInt32):
2010-08-28 Pratik Solanki <psolanki@apple.com>
Reviewed by Dan Bernstein.
Add an ENABLE define for purgeable memory support
https://bugs.webkit.org/show_bug.cgi?id=44777
* wtf/Platform.h:
2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin
https://bugs.webkit.org/show_bug.cgi?id=43179
Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent
NPAPI Plugin Cache. The flag is enabled by default.
* wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE
2010-07-27 Jer Noble <jer.noble@apple.com>
Reviewed by Eric Carlson.
Add JavaScript API to allow a page to go fullscreen.
rdar://problem/6867795
https://bugs.webkit.org/show_bug.cgi?id=43099
* wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS).
2010-08-27 Gavin Barraclough <barraclough@apple.com>
Windows build fix pt 2.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-27 Gavin Barraclough <barraclough@apple.com>
Windows build fix pt 1.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate.
These methods should be using a version of dtoa that can generate results accurate
to the requested precision, whereas our version of dtoa is only currently able to
support producing results sufficiently accurate to distinguish the value from any
other IEEE-754 double precision number.
This change has no impact on benchmarks we track.
On microbenchmarks for these functions, this is a slight regression where a high
precision is requested (dtoa now need to iterate further to generate a a greater
number of digits), but with smaller precision values (hopefully more common) this
improves performance, since it reduced the accurate of result dtoa is required,
to produce, and removes the need to pre-round values before calling dtoa.
* JavaScriptCore.exp:
doubleToStringInJavaScriptFormat renamed to numberToString
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
doubleToStringInJavaScriptFormat renamed to numberToString
* runtime/UString.cpp:
(JSC::UString::number):
doubleToStringInJavaScriptFormat renamed to numberToString
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::DecimalNumber):
(WTF::DecimalNumber::toStringDecimal):
(WTF::DecimalNumber::toStringExponential):
Remove all pre-rounding of values, instead call dtoa correctly.
* wtf/dtoa.cpp:
(WTF::dtoa):
* wtf/dtoa.h:
Reenable support for rounding to specific-figures/decimal-places in dtoa.
Modify to remove unbiased rounding, provide ECMA required away-from-zero.
Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to
numberToString.
2010-08-27 Chao-ying Fu <fu@mips.com>
Reviewed by Oliver Hunt.
Byte alignment issue on MIPS
https://bugs.webkit.org/show_bug.cgi?id=29415
MIPS accesses one byte at a time for now to avoid the help from the
kernel to fix unaligned accesses.
* wtf/text/AtomicString.cpp:
(WebCore::equal):
* wtf/text/StringHash.h:
(WebCore::StringHash::equal):
2010-08-27 Xan Lopez <xlopez@igalia.com>
Reviewed by Tor Arne Vestbø.
Fix a couple of typos in comment.
* bytecode/CodeBlock.h:
2010-08-26 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* wtf/dtoa.cpp:
2010-08-26 Gavin Barraclough <baraclough@apple.com>
Reviewed by Sam Weinig.
Bug 44735 - Clean up dtoa.cpp
Remove unused & unmaintained code paths, reformat code to match
coding standard & use platform #defines from Platform.h directly.
* wtf/dtoa.cpp:
(WTF::storeInc):
(WTF::multadd):
(WTF::s2b):
(WTF::lo0bits):
(WTF::mult):
(WTF::pow5mult):
(WTF::lshift):
(WTF::diff):
(WTF::ulp):
(WTF::b2d):
(WTF::d2b):
(WTF::ratio):
(WTF::):
(WTF::strtod):
(WTF::quorem):
(WTF::dtoa):
2010-08-26 Gavin Barraclough <barraclough@apple.com>
Rubber Stamped by Oliver Hunt.
Partially revert r65959. The toString changes regressed the v8 tests,
but keep the toFixed/toExponential/toPrecision changes.
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/NumberPrototype.cpp:
* runtime/UString.cpp:
(JSC::UString::number):
* wtf/DecimalNumber.h:
* wtf/dtoa.cpp:
(WTF::append):
(WTF::doubleToStringInJavaScriptFormat):
* wtf/dtoa.h:
* wtf/text/WTFString.cpp:
* wtf/text/WTFString.h:
2010-08-26 James Robinson <jamesr@chromium.org>
Reviewed by Darin Fisher.
[chromium] Remove the USE(GLES2_RENDERING) define and associated code
https://bugs.webkit.org/show_bug.cgi?id=43761
Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
* wtf/Platform.h:
2010-08-26 Gavin Barraclough <barraclough@apple.com>
Rolling out r64608, this regressed performance.
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::~LinkBuffer):
(JSC::LinkBuffer::performFinalization):
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::executableCopy):
* assembler/X86Assembler.h:
(JSC::X86Assembler::executableCopy):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::initGetByIdProto):
(JSC::StructureStubInfo::initGetByIdChain):
(JSC::StructureStubInfo::initGetByIdSelfList):
(JSC::StructureStubInfo::initGetByIdProtoList):
(JSC::StructureStubInfo::initPutByIdTransition):
* jit/ExecutableAllocator.cpp:
(JSC::ExecutablePool::systemAlloc):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::create):
(JSC::ExecutableAllocator::ExecutableAllocator):
(JSC::ExecutableAllocator::poolForSize):
(JSC::ExecutablePool::ExecutablePool):
(JSC::ExecutablePool::poolAllocate):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::allocInternal):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JSC::JIT::compileGetByIdProto):
(JSC::JIT::compileGetByIdSelfList):
(JSC::JIT::compileGetByIdProtoList):
(JSC::JIT::compileGetByIdChainList):
(JSC::JIT::compileGetByIdChain):
(JSC::JIT::compilePutByIdTransition):
(JSC::JIT::compilePatchGetArrayLength):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCachePutByID):
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
(JSC::getPolymorphicAccessStructureListSlot):
* jit/JITStubs.h:
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::finalize):
* runtime/ExceptionHelpers.cpp:
* runtime/ExceptionHelpers.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::compile):
2010-08-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Brady Eidson.
Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl.
* wtf/text/WTFString.cpp:
(asciiDebug):
Return a Vector<char> containing the contents of a string as ASCII.
2010-08-26 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Add PassOwnArrayPtr
https://bugs.webkit.org/show_bug.cgi?id=44627
* GNUmakefile.am:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add the new files.
* wtf/Forward.h:
Forward declare PassOwnArrayPtr.
* wtf/OwnArrayPtr.h:
Mimic the OwnPtr interface.
* wtf/OwnArrayPtrCommon.h: Added.
(WTF::deleteOwnedArrayPtr):
Move delete function here so it can be shared by OwnArrayPtr and
PassOwnArrayPtr.
* wtf/PassOwnArrayPtr.h: Added.
Mimic the PassOwnPtr interface.
2010-08-26 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[JSC] JavaScript parsing error when loading Equifax web page
https://bugs.webkit.org/show_bug.cgi?id=42900
'-->' is ostensibly only meant to occur when there is only
whitespace preceeding it on the line. However firefox treats
multiline comments as a space character, so they are allowed.
One side effect of the firefox model is that any line terminators
inside the multiline comment are ignored, so
foo/*
*/-->
is treated as
foo -->
and so '-->' will not be a comment in this case. Happily this simply
means that to fix this issue all we need to do is stop updating
m_atLineStart when handling multiline comments.
* parser/Lexer.cpp:
(JSC::Lexer::lex):
2010-08-25 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Improve overflow handling in StringImpl::Replace
https://bugs.webkit.org/show_bug.cgi?id=42502
<rdar://problem/8203794>
Harden StringImpl::replace against overflow -- I can't see how this
could be abused, but it's better to be safe than sorry.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::replace):
2010-08-26 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
https://bugs.webkit.org/show_bug.cgi?id=44624
Clean up GNUmakefile.am.
* GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move
a couple include lines from the top-level GNUmakefile.am.
2010-08-25 Xan Lopez <xlopez@igalia.com>
Reviewed by Kent Tamura.
Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used
https://bugs.webkit.org/show_bug.cgi?id=29259
Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang.
* wtf/dtoa.cpp:
(WTF::s2b):
2010-08-25 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kevin Ollivier.
[BREWMP] Add build system
https://bugs.webkit.org/show_bug.cgi?id=44645
Make waf script portable so that we can add more ports.
* wscript:
2010-08-25 Michael Saboff <msaboff@apple.com>
Reviewed by Sam Weinig.
Remove the single entry regular expression cache introduced as part of
the fix for https://bugs.webkit.org/show_bug.cgi?id=41238.
The performance problem in Dromaeo that initiated that bug is no
longer present. Dromaeo has been modified so that the regular
expression tests are somewhat random and don't benefit from a
single entry cache.
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::match):
* runtime/RegExp.h:
2010-08-25 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
Cairo and EFL port shouldn't depend on glib.
https://bugs.webkit.org/show_bug.cgi?id=44354
Replace GRefPtr with PlatformRefPtr. Keep GLib specific bits in
GRefPtr.h.
* GNUmakefile.am: Add PlatformRefPtr.h to the source list.
* wtf/PlatformRefPtr.h: Migrated from GRefPtr.h.
(WTF::PlatformRefPtr::PlatformRefPtr): Ditto.
(WTF::PlatformRefPtr::~PlatformRefPtr): Ditto.
(WTF::PlatformRefPtr::clear): Ditto.
(WTF::PlatformRefPtr::get): Ditto.
(WTF::PlatformRefPtr::operator*): Ditto.
(WTF::PlatformRefPtr::operator->): Ditto.
(WTF::PlatformRefPtr::operator!): Ditto.
(WTF::PlatformRefPtr::operator UnspecifiedBoolType): Ditto.
(WTF::PlatformRefPtr::hashTableDeletedValue): Ditto.
(WTF::::operator): Ditto.
(WTF::::swap): Ditto.
(WTF::swap): Ditto.
(WTF::operator==): Ditto.
(WTF::operator!=): Ditto.
(WTF::static_pointer_cast): Ditto.
(WTF::const_pointer_cast): Ditto.
(WTF::getPtr): Ditto.
(WTF::adoptPlatformRef): Ditto.
* wtf/gobject/GRefPtr.cpp: Changes to reflect new names.
(WTF::refPlatformPtr):
(WTF::derefPlatformPtr):
* wtf/gobject/GRefPtr.h: Ditto.
(WTF::refPlatformPtr):
(WTF::derefPlatformPtr):
2010-08-25 Xan Lopez <xlopez@igalia.com>
Reviewed by Alexey Proskuryakov.
Remove dead code in JSGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=44615
The recursion data member in the JSGlobalObject and its getter
plus inc/dec methods seems to be unused, remove them.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
2010-08-25 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Changed the initial and subsequent allocation of vector storage to
Array()s. The changes are to limit sparse arrays to 100000 entries
and fixed the sparse map to vector storage conversion to use the
minimum amount of memory needed to store the current number of entries.
These changes address https://bugs.webkit.org/show_bug.cgi?id=43707
* runtime/JSArray.cpp:
(JSC::JSArray::putSlowCase):
(JSC::JSArray::getNewVectorLength):
2010-08-16 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Avoid increasing required alignment of target type warning
https://bugs.webkit.org/show_bug.cgi?id=43963
Fix platform independent alignment warnings.
* wtf/ListHashSet.h:
(WTF::ListHashSetNodeAllocator::pool):
2010-08-19 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Enable truncated floating point feature on ARM
https://bugs.webkit.org/show_bug.cgi?id=44233
Enable truncated floating point feature with the help of VCVTR.S32.F64
instruction. If VCVTR.S32.F64 can't fit the result into a 32-bit
integer/register, it saturates at INT_MAX or INT_MIN. Testing this
looks quicker than testing FPSCR for exception.
Inspired by Jacob Bramley's patch from JaegerMonkey
* assembler/ARMAssembler.h:
(JSC::ARMAssembler::):
(JSC::ARMAssembler::cmn_r):
(JSC::ARMAssembler::vcvtr_s32_f64_r):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
(JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
2010-08-24 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-24 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::intPow10):
* wtf/dtoa.cpp:
* wtf/dtoa.h:
2010-08-23 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=44487
Number.toExponential/toFixed/toPrecision all contain a spaghetti of duplicated
code & unnecessary complexity. Add a new DecimalNumber class to encapsulate
double to string conversion, share the implementations of rounding &
decimal-fraction/exponential formatting.
* JavaScriptCore.exp:
Update exports.
* runtime/NumberPrototype.cpp:
(JSC::toThisNumber):
(JSC::getIntegerArgumentInRange):
Helper methods used in implementing toExponential/toFixed/toString.
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):
Reimplemented using new DecimalNumber class.
* runtime/UString.cpp:
(JSC::UString::number):
Updated to call numberToString.
* wtf/DecimalNumber.h: Added.
(WTF::):
(WTF::DecimalNumber::DecimalNumber):
(WTF::DecimalNumber::toStringDecimal):
(WTF::DecimalNumber::toStringExponential):
(WTF::DecimalNumber::sign):
(WTF::DecimalNumber::exponent):
(WTF::DecimalNumber::significand):
(WTF::DecimalNumber::precision):
(WTF::DecimalNumber::init):
(WTF::DecimalNumber::isZero):
(WTF::DecimalNumber::roundToPrecision):
New class to perform double to string conversion.
Has three constructors, which allow conversion with no rounding,
rounding to significant-figures, or rounding to decimal-places,
and two methods for formatting strings, either using decimal
fraction or exponential encoding. Internal implementation uses
pre-rounding of the values before calling dtoa rather than
relying on dtoa to correctly round, which does not produce
fully accurate results. Hopefully we can address this in the
near future.
* wtf/dtoa.cpp:
(WTF::intPow10):
* wtf/dtoa.h:
intPow10 is used internally by DecimalNumber.
* wtf/text/WTFString.cpp:
(WTF::copyToString):
(WTF::nanOrInfToString):
Used internally in numberToString for NaN/Infinity handling.
(WTF::numberToString):
Added new method to convert doubles to strings.
* wtf/text/WTFString.h:
Added declaration for numberToString. This is here because
we should switch over to using this for all double to string
conversion in WebCore (see section 2.4.4.3 of the HTML5 spec).
2010-08-24 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Don't seed the JS random number generator from time()
https://bugs.webkit.org/show_bug.cgi?id=41868
<rdar://problem/8171025>
Switch to using the secure random number generator to
seed the fast random generator, and make the generator
be per global object.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::weakRandomNumber):
* runtime/MathObject.cpp:
(JSC::mathProtoFuncRandom):
2010-08-24 Oliver Hunt <oliver@apple.com>
Reviewed by Beth Dakin.
Make overflow guards in UString::utf8 explicit
https://bugs.webkit.org/show_bug.cgi?id=44540
Add an explicit overflow check prior to allocating our buffer,
rather than implicitly relying on the guard in convertUTF16ToUTF8.
* runtime/UString.cpp:
(JSC::UString::utf8):
2010-08-24 Yael Aharon <yael.aharon@nokia.com>
Reviewed by Simon Hausmann.
[Symbian] Fix commit/decommit of system memory using RChunk
Swap accidentially reversed start and m_base values for determining the
offset within the RChunk.
* wtf/PageReservation.h:
(WTF::PageReservation::systemCommit):
(WTF::PageReservation::systemDecommit):
2010-08-23 Patrick Gansterer <paroga@paroga.com>
Rubber-stamped by Gabor Loki.
[WINCE] Buildfix for GeneratedJITStubs after r64818
https://bugs.webkit.org/show_bug.cgi?id=44469
Use " THUNK_RETURN_ADDRESS_OFFSET" instead of "#offset#".
* jit/JITStubs.cpp:
2010-08-23 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
[REGRESSION] Interpreter incorrectly excludes prototype chain when validating put_by_id_transition
https://bugs.webkit.org/show_bug.cgi?id=44240
<rdar://problem/8328995>
Fix an error I introduced when cleaning up the interpreter side of the logic
to prevent setters being called in object initialisers.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-08-23 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
Fixed case where a single character search string in a string.replace()
did not properly handle back reference replacement. The fix is to
check for a '$' as part of the check to see if we can execute the
single character replace optimization.
https://bugs.webkit.org/show_bug.cgi?id=44067
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
2010-08-23 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
JSON.stringify is much slower than Firefox on particular pathological input
https://bugs.webkit.org/show_bug.cgi?id=44456
Make StringBuilder::reserveCapacity reserve additional space so we don't end up
repeatedly copying the entire result string.
* runtime/StringBuilder.h:
(JSC::StringBuilder::append):
(JSC::StringBuilder::reserveCapacity):
2010-08-23 Jian Li <jianli@chromium.org>
Reviewed by Darin Fisher.
Handle blob resource.
https://bugs.webkit.org/show_bug.cgi?id=43941
* JavaScriptCore.exp: Add an export that is neede by BlobResourceHandle.
2010-08-19 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Geoffrey Garen.
JSC: Move the static_cast into to(U)Int32 fast case
https://bugs.webkit.org/show_bug.cgi?id=44037
Do the static_cast<(u)int32_t> inline to avoid the function call overhead
for easily converted values (within (u)int32_t range.)
* runtime/JSValue.cpp:
(JSC::toInt32SlowCase):
(JSC::toUInt32SlowCase):
* runtime/JSValue.h:
(JSC::JSValue::toInt32):
(JSC::JSValue::toUInt32):
2010-08-18 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Geoffrey Garen.
REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript
https://bugs.webkit.org/show_bug.cgi?id=43742
Add codegen for pow() to return Int32 values when possible.
* jit/ThunkGenerators.cpp:
(JSC::powThunkGenerator):
2010-08-18 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
The JITStackFrame is wrong using Thumb-2 JIT with JSVALUE32_64
https://bugs.webkit.org/show_bug.cgi?id=43897
A 64 bits wide member in a structure is aligned to 8 bytes on ARM by
default, but this is not taken into account in the offset defines of
JITStackFrame.
* jit/JITStubs.cpp:
* jit/JITStubs.h:
2010-08-18 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig.
Rename UString::substr to substringSharingImpl, add to WTF::String.
Now WTF::String can do everything that JSC::UString can do!
* JavaScriptCore.exp:
* bytecode/CodeBlock.cpp:
(JSC::escapeQuotes):
* bytecompiler/NodesCodegen.cpp:
(JSC::substitute):
* parser/SourceProvider.h:
(JSC::UStringSourceProvider::getRange):
* runtime/FunctionPrototype.cpp:
(JSC::insertSemicolonIfNeeded):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::parseInt):
* runtime/JSONObject.cpp:
(JSC::gap):
(JSC::Stringifier::indent):
(JSC::Stringifier::unindent):
* runtime/JSString.cpp:
(JSC::JSString::replaceCharacter):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
(JSC::trimString):
* runtime/UString.cpp:
(JSC::UString::substringSharingImpl):
* runtime/UString.h:
* wtf/text/WTFString.cpp:
(WTF::String::substringSharingImpl):
* wtf/text/WTFString.h:
2010-08-18 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-08-18 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-08-17 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 44146 - Remove toDouble/toUInt32 methods from UString.
These methods all implement JavaScript language specific behaviour, and as such
are not suited to being on a generic string object. They are also inefficient
and incorrectly used, refactor & cleanup. Uses of these methods really divide
out into two cases.
ToNumber:
Uses of toDouble from JSString and from parseFloat are implementing ecma's
ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble
should largely just be moved out to a global jsToNumber function. ToNumber is
capable of recognizing either decimal or hexadecimal numbers, but parseFloat
should only recognize decimal values. This is currently handled by testing for
hexadecimal before calling toDouble, which should unnecessary - instead we can
just split out the two parts to the grammar into separate functions. Also,
strtod recognizes a set of literals (nan, inf, and infinity - all with any
capitalization) - which are not defined by any of the specs we are implementing.
To handle this we need to perform additional work in toDouble to convert the
unsupported cases of infinities back to NaNs. Instead we should simply remove
support for this literals from strtod. This should provide a more desirable
behaviour for all clients of strtod.
Indexed properties:
Uses of the toStrictUInt32 methods are were all converting property names to
indices, and all uses of toUInt32 were incorrect; in all cases we should have
been calling toUInt32. This error results in some incorrect behaviour in the
DOM (accessing property "0 " of a NodeList should fail; it currently does not).
Move this method onto Identifier (our canonical property name), and make it
always perform a strict conversion. Add a layout test to check NodeList does
convert indexed property names correctly.
* JavaScriptCore.exp:
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/Identifier.cpp:
(JSC::Identifier::toUInt32):
* runtime/Identifier.h:
(JSC::Identifier::toUInt32):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::deleteProperty):
* runtime/JSArray.h:
(JSC::Identifier::toArrayIndex):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::getOwnPropertySlot):
(JSC::JSByteArray::getOwnPropertyDescriptor):
(JSC::JSByteArray::put):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::isInfinity):
(JSC::jsHexIntegerLiteral):
(JSC::jsStrDecimalLiteral):
(JSC::jsToNumber):
(JSC::parseFloat):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSString.cpp:
(JSC::JSString::getPrimitiveNumber):
(JSC::JSString::toNumber):
(JSC::JSString::getStringPropertyDescriptor):
* runtime/JSString.h:
(JSC::JSString::getStringPropertySlot):
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::put):
* runtime/StringObject.cpp:
(JSC::StringObject::deleteProperty):
* runtime/UString.cpp:
* runtime/UString.h:
* wtf/dtoa.cpp:
(WTF::strtod):
2010-08-17 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 44099 - REGRESSION(r65468): Crashes in StringImpl::find
Bug 44080 introuduced a couple of cases in which array bounds could be overrun.
One of these was fixed in r65493, this patch fixes the other and address the
concerns voiced in comment #6 by restructuring the loops to remove the code
dupliction without introducing an additional if check.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
(WTF::StringImpl::findIgnoringCase):
(WTF::StringImpl::reverseFind):
(WTF::StringImpl::reverseFindIgnoringCase):
2010-08-17 No'am Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Ariya Hidayat.
[Qt] Move the accelerated compositing build flag to the right place
https://bugs.webkit.org/show_bug.cgi?id=43882
* wtf/Platform.h:
2010-08-17 Yuta Kitamura <yutak@chromium.org>
Reviewed by Shinichiro Hamaji.
Avoid uninitialized memory read in StringImpl::find().
REGRESSION(r65468): Crashes in StringImpl::find
https://bugs.webkit.org/show_bug.cgi?id=44099
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
2010-08-16 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig
Add VectorTraits to String & DefaultHash traits to UString to unify behaviour.
* runtime/UString.h:
(JSC::UStringHash::hash):
(JSC::UStringHash::equal):
(WTF::):
* wtf/text/WTFString.h:
(WTF::):
2010-08-16 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig
Remove unnecessary includes from UString.h, add new includes as necessary.
* profiler/CallIdentifier.h:
* profiler/ProfileNode.h:
* runtime/DateConversion.cpp:
* runtime/Identifier.h:
(JSC::IdentifierRepHash::hash):
* runtime/RegExpCache.h:
* runtime/RegExpKey.h:
* runtime/UString.cpp:
(JSC::UString::substr):
* runtime/UString.h:
* wtf/text/WTFString.h:
2010-08-16 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig
Bug 44080 - String find/reverseFind methods need tidying up
These methods have a couple of problems with their interface, and implementation.
These methods take and int index, and return an int - however this is problematic
since on 64-bit string indices may have a full 32-bit range. This spills out into
surrounding code, which unsafely casts string indices from unsigned to int. Code
checking the result of these methods check for a mix of "== -1", "< 0", and
"== notFound". Clean this up by changing these methods to take an unsigned
starting index, and return a size_t. with a failed match indicated by notFound.
reverseFind also has a special meaning for the starting index argument, in that a
negative index is interpreted as an offset back from the end of the string. Remove
this functionality, in the (1!) case where it is used we should just calculate the
offset by subtracting from the string's length.
The implementation has a few problems too. The code is not in webkit style, in
using assorted abbreviations in variable names, and implementations of similar
find methods with differing argument types were unnecessarily inconsistent. When
find is passed const char* data the string would be handled as latin1 (zero
extended to UTF-16) for all characters but the first; this is sign extended.
Case-insensitive find is broken for unicode strings; the hashing optimization is
not unicode safe, and could result in false negatives.
Unify UString find methods to match String.
* JavaScriptCore.exp:
* bytecode/CodeBlock.cpp:
(JSC::escapeQuotes):
* bytecompiler/NodesCodegen.cpp:
(JSC::substitute):
* runtime/JSString.cpp:
(JSC::JSString::replaceCharacter):
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
* runtime/RegExpKey.h:
(JSC::RegExpKey::getFlagsValue):
* runtime/StringPrototype.cpp:
(JSC::substituteBackreferencesSlow):
(JSC::substituteBackreferences):
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncSplit):
* runtime/UString.cpp:
* runtime/UString.h:
(JSC::UString::find):
(JSC::UString::reverseFind):
* wtf/text/AtomicString.h:
(WTF::AtomicString::find):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
(WTF::StringImpl::findCaseInsensitive):
(WTF::StringImpl::reverseFind):
(WTF::StringImpl::reverseFindCaseInsensitive):
(WTF::StringImpl::endsWith):
(WTF::StringImpl::replace):
* wtf/text/StringImpl.h:
(WTF::StringImpl::startsWith):
* wtf/text/WTFString.cpp:
(WTF::String::split):
* wtf/text/WTFString.h:
(WTF::String::find):
(WTF::String::reverseFind):
(WTF::String::findCaseInsensitive):
(WTF::String::reverseFindCaseInsensitive):
(WTF::String::contains):
(WTF::find):
(WTF::reverseFind):
2010-08-16 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix, do not build WebCore as a convenience library as this leads to
errors in the Win build w/export symbols and causes problems with DOM bindings
debugging in gdb.
* wscript:
2010-08-16 Leandro Pereira <leandro@profusion.mobi>
[EFL] Build fix after r65366.
* CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if
they're empty.
* jsc/CMakeLists.txt: Ditto.
* wtf/CMakeLists.txt: Ditto.
2010-08-15 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix, don't build intermediate source in DerivedSources dir.
* wscript:
2010-08-14 Patrick Gansterer <paroga@paroga.com>
Reviewed by Kenneth Rohde Christiansen.
[CMake] Add preprocessor detection for generator scripts
https://bugs.webkit.org/show_bug.cgi?id=43984
* CMakeLists.txt:
2010-08-14 Patrick Gansterer <paroga@paroga.com>
Reviewed by Kenneth Rohde Christiansen.
[CMake] Set target properties only if available
https://bugs.webkit.org/show_bug.cgi?id=43978
* CMakeLists.txt:
* jsc/CMakeLists.txt:
* wtf/CMakeLists.txt:
2010-08-13 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix, add CString to the list of forwards.
* wtf/Forward.h:
2010-08-13 Gavin Barraclough <barraclough@apple.com>
Windows build fix
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-13 Gavin Barraclough <barraclough@apple.com>
Windows build fix
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-13 Gavin Barraclough <barraclough@apple.com>
Windows build fix
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-13 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig.
Switch String::/UString::ascii() to return a CString.
* JavaScriptCore.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/SamplingTool.cpp:
(JSC::SamplingTool::dump):
* interpreter/CallFrame.cpp:
(JSC::CallFrame::dumpCaller):
* jsc.cpp:
(runWithScripts):
(runInteractive):
* runtime/Identifier.h:
(JSC::Identifier::ascii):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/UString.cpp:
(JSC::UString::ascii):
(JSC::UString::latin1):
* runtime/UString.h:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::asciiOLD):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.cpp:
(WTF::String::ascii):
(WTF::String::latin1):
* wtf/text/WTFString.h:
2010-08-13 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Avoid increasing required alignment of target type warning on ARM
https://bugs.webkit.org/show_bug.cgi?id=38045
The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
increases required alignment of target type warnings.
Casting the type of [pointer to Type2] object to void* bypasses the
warning.
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::putShortUnchecked):
(JSC::AssemblerBuffer::putIntUnchecked):
(JSC::AssemblerBuffer::putInt64Unchecked):
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
(JSC::RegisterFile::grow):
* jit/JITStubs.cpp:
* pcre/pcre_compile.cpp:
(jsRegExpCompile):
* runtime/JSArray.cpp:
(JSC::JSArray::putSlowCase):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::increaseVectorPrefixLength):
(JSC::JSArray::shiftCount):
(JSC::JSArray::unshiftCount):
* wtf/FastMalloc.cpp:
(WTF::PageHeapAllocator::New):
(WTF::TCMalloc_Central_FreeList::Populate):
* wtf/MD5.cpp:
(WTF::reverseBytes):
(WTF::MD5::addBytes):
(WTF::MD5::checksum):
* wtf/StdLibExtras.h:
(isPointerTypeAlignmentOkay):
(reinterpret_cast_ptr):
* wtf/Vector.h:
(WTF::VectorBuffer::inlineBuffer):
* wtf/qt/StringQt.cpp:
(WTF::String::String):
2010-08-13 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig
Unify UString::UTF8String() & String::utf8() methods,
remove UString::cost() & make atArrayIndex a free function.
* JavaScriptCore.exp:
* bytecode/CodeBlock.cpp:
(JSC::constantName):
(JSC::idName):
(JSC::CodeBlock::registerName):
(JSC::regexpName):
(JSC::printGlobalResolveInfo):
(JSC::printStructureStubInfo):
(JSC::CodeBlock::printStructure):
(JSC::CodeBlock::printStructures):
* jsc.cpp:
(functionPrint):
(functionDebug):
(runInteractive):
(fillBufferWithContentsOfFile):
* pcre/pcre_exec.cpp:
(Histogram::~Histogram):
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::c_str):
* profiler/Profile.cpp:
(JSC::Profile::debugPrintDataSampleStyle):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::debugPrintData):
(JSC::ProfileNode::debugPrintDataSampleStyle):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/DateConversion.cpp:
(JSC::parseDate):
* runtime/Identifier.h:
(JSC::Identifier::toStrictUInt32):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::deleteProperty):
* runtime/JSArray.h:
(JSC::toArrayIndex):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::parseInt):
(JSC::globalFuncJSCPrint):
* runtime/JSString.h:
(JSC::RopeBuilder::JSString):
* runtime/UString.cpp:
(JSC::UString::toDouble):
(JSC::putUTF8Triple):
(JSC::UString::utf8):
* runtime/UString.h:
(JSC::UString::~UString):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
* wtf/text/WTFString.cpp:
(WTF::String::utf8):
* wtf/text/WTFString.h:
(WTF::String::~String):
(WTF::String::swap):
(WTF::String::isNull):
(WTF::String::isEmpty):
(WTF::String::impl):
(WTF::String::length):
(WTF::String::String):
(WTF::String::isHashTableDeletedValue):
2010-08-12 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Gavin Barraclough.
Refactoring the fpu code generator for the ARM port
https://bugs.webkit.org/show_bug.cgi?id=43842
Support up to 32 double precision registers, and the
recent VFP instruction formats. This patch is mainly
a style change which keeps the current functionality.
* assembler/ARMAssembler.h:
(JSC::ARMRegisters::):
(JSC::ARMAssembler::):
(JSC::ARMAssembler::emitInst):
(JSC::ARMAssembler::emitDoublePrecisionInst):
(JSC::ARMAssembler::emitSinglePrecisionInst):
(JSC::ARMAssembler::vadd_f64_r):
(JSC::ARMAssembler::vdiv_f64_r):
(JSC::ARMAssembler::vsub_f64_r):
(JSC::ARMAssembler::vmul_f64_r):
(JSC::ARMAssembler::vcmp_f64_r):
(JSC::ARMAssembler::vsqrt_f64_r):
(JSC::ARMAssembler::vmov_vfp_r):
(JSC::ARMAssembler::vmov_arm_r):
(JSC::ARMAssembler::vcvt_f64_s32_r):
(JSC::ARMAssembler::vcvt_s32_f64_r):
(JSC::ARMAssembler::vmrs_apsr):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::addDouble):
(JSC::MacroAssemblerARM::divDouble):
(JSC::MacroAssemblerARM::subDouble):
(JSC::MacroAssemblerARM::mulDouble):
(JSC::MacroAssemblerARM::sqrtDouble):
(JSC::MacroAssemblerARM::convertInt32ToDouble):
(JSC::MacroAssemblerARM::branchDouble):
(JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
2010-08-12 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r65295.
http://trac.webkit.org/changeset/65295
https://bugs.webkit.org/show_bug.cgi?id=43950
It broke 4 sputnik tests (Requested by Ossy on #webkit).
* JavaScriptCore.exp:
* bytecode/CodeBlock.cpp:
(JSC::constantName):
(JSC::idName):
(JSC::CodeBlock::registerName):
(JSC::regexpName):
(JSC::printGlobalResolveInfo):
(JSC::printStructureStubInfo):
(JSC::CodeBlock::printStructure):
(JSC::CodeBlock::printStructures):
* jsc.cpp:
(functionPrint):
(functionDebug):
(runInteractive):
(fillBufferWithContentsOfFile):
* pcre/pcre_exec.cpp:
(Histogram::~Histogram):
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::c_str):
* profiler/Profile.cpp:
(JSC::Profile::debugPrintDataSampleStyle):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::debugPrintData):
(JSC::ProfileNode::debugPrintDataSampleStyle):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/DateConversion.cpp:
(JSC::parseDate):
* runtime/Identifier.h:
(JSC::Identifier::Identifier):
(JSC::Identifier::toArrayIndex):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::deleteProperty):
* runtime/JSArray.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::parseInt):
(JSC::globalFuncJSCPrint):
* runtime/JSString.h:
(JSC::RopeBuilder::JSString):
* runtime/UString.cpp:
(JSC::UString::toDouble):
(JSC::UString::UTF8String):
* runtime/UString.h:
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
(JSC::UString::cost):
(JSC::UString::~UString):
(JSC::UString::toArrayIndex):
* wtf/text/WTFString.cpp:
(WTF::String::utf8):
* wtf/text/WTFString.h:
(WTF::String::String):
(WTF::String::isHashTableDeletedValue):
(WTF::String::length):
(WTF::String::operator[]):
(WTF::String::isNull):
(WTF::String::isEmpty):
(WTF::String::impl):
2010-08-12 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-12 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig
Unify UString::UTF8String() & String::utf8() methods,
remove UString::cost() & make atArrayIndex a free function.
* JavaScriptCore.exp:
* bytecode/CodeBlock.cpp:
(JSC::constantName):
(JSC::idName):
(JSC::CodeBlock::registerName):
(JSC::regexpName):
(JSC::printGlobalResolveInfo):
(JSC::printStructureStubInfo):
(JSC::CodeBlock::printStructure):
(JSC::CodeBlock::printStructures):
* jsc.cpp:
(functionPrint):
(functionDebug):
(runInteractive):
(fillBufferWithContentsOfFile):
* pcre/pcre_exec.cpp:
(Histogram::~Histogram):
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::c_str):
* profiler/Profile.cpp:
(JSC::Profile::debugPrintDataSampleStyle):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::debugPrintData):
(JSC::ProfileNode::debugPrintDataSampleStyle):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/DateConversion.cpp:
(JSC::parseDate):
* runtime/Identifier.h:
(JSC::Identifier::toStrictUInt32):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::deleteProperty):
* runtime/JSArray.h:
(JSC::toArrayIndex):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::parseInt):
(JSC::globalFuncJSCPrint):
* runtime/JSString.h:
(JSC::RopeBuilder::JSString):
* runtime/UString.cpp:
(JSC::UString::toDouble):
(JSC::putUTF8Triple):
(JSC::UString::utf8):
* runtime/UString.h:
(JSC::UString::~UString):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
* wtf/text/WTFString.cpp:
(WTF::String::utf8):
* wtf/text/WTFString.h:
(WTF::String::~String):
(WTF::String::swap):
(WTF::String::isNull):
(WTF::String::isEmpty):
(WTF::String::impl):
(WTF::String::length):
(WTF::String::String):
(WTF::String::isHashTableDeletedValue):
2010-08-12 Gavin Barraclough <barraclough@apple.com>
Eeerk! - revert accidentally committed changes in UString!
* JavaScriptCore.exp:
* runtime/UString.cpp:
(JSC::UString::UString):
* runtime/UString.h:
2010-08-12 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig
Change UString constructors to match those in WTF::String.
This changes behaviour of UString((char*)0) to create null
strings, akin to UString() rather than UString::empty().
(This matches String). Remove unused constructors from
UString, and add null-terminated UTF-16 constructor, to
match String. Move String's constructor into the .cpp to
match UString.
* JavaScriptCore.exp:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::calculatedFunctionName):
* runtime/RegExpKey.h:
(JSC::RegExpKey::RegExpKey):
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::createSingleCharacterString):
* runtime/UString.cpp:
(JSC::UString::UString):
* runtime/UString.h:
(JSC::UString::UString):
(JSC::UString::swap):
(JSC::UString::adopt):
(JSC::UString::operator[]):
* wtf/text/WTFString.h:
(WTF::String::String):
(WTF::String::adopt):
(WTF::String::operator[]):
2010-08-12 David Levin <levin@chromium.org>
Reviewed by NOBODY (build fix).
* runtime/UString.h: Removed unneccessary #include.
2010-08-12 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig
Revert changes to ALWAYS_INLINEness of a couple of functions in UString.
This appears to have degraded performance.
* runtime/UString.cpp:
(JSC::UString::ascii):
* runtime/UString.h:
(JSC::UString::length):
(JSC::UString::isEmpty):
(JSC::UString::~UString):
2010-08-12 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Antonio Gomes.
[Qt] Fix warnings: unknown conversion type character 'l' in format
https://bugs.webkit.org/show_bug.cgi?id=43359
Qt port doesn't call any printf in String::format(...), consequently
using __attribute__((format(printf,m,n))) is incorrect and causes
false positive warnings on Windows if you build with MinGW.
Qt port calls QString::vsprintf(...) , which is platform
independent, and handles %lli, %llu and %llx on all platforms.
(http://trac.webkit.org/changeset/35712)
* wtf/text/WTFString.h:
2010-08-12 Gabor Loki <loki@webkit.org>
Reviewed by Geoffrey Garen.
Fix the array subscript is above array bounds warning in ByteArray on ARM.
https://bugs.webkit.org/show_bug.cgi?id=43358
The warning is very similar to this one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861
* wtf/ByteArray.cpp:
(WTF::ByteArray::create):
2010-08-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Reviewed by Martin Robinson.
[GTK] Use GSettings to save/restore Web Inspector settings
https://bugs.webkit.org/show_bug.cgi?id=43512
* wtf/gobject/GRefPtr.cpp: Added support for GVariant, used by our
GSettings support.
(WTF::refGPtr):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
2010-08-12 Gabor Loki <loki@webkit.org>
Reviewed by Simon Hausmann.
The scratch register should be saved in YARR with ARM JIT
https://bugs.webkit.org/show_bug.cgi?id=43910
Reported by Jocelyn Turcotte.
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateEnter):
(JSC::Yarr::RegexGenerator::generateReturn):
2010-08-11 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/Forward.h:
2010-08-11 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Geoffrey Garen.
Date("") should be an invalid date. For IE, Firefox and Chrome, Date("") is invalid date,
which means isNaN(new Date("")) should return true.
https://bugs.webkit.org/show_bug.cgi?id=43793
Tests: fast/js/date-constructor.html
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::resetDateCache):
2010-08-11 Gavin Barraclough <barraclough@apple.com>
Windows & !JIT build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
(JSC::RegExp::match):
2010-08-11 Gavin Barraclough <barraclough@apple.com>
Rubber stamp by sam weinig
Touch a file to stop the bot rolling a bit change out!
* runtime/UString.cpp:
(JSC::UString::ascii):
2010-08-11 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix for wx and WebDOM bindings, add CString classes to the list of forwards.
* wtf/Forward.h:
2010-08-11 Gavin Barraclough <barraclough@apple.com>
Rubber stamps by Darin Adler & Sam Weinig.
Bug 43867 - Some UString cleanup
Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String.
Move string concatenation methods to a new header to simplify down UString.h. Remove is8Bit().
* API/JSClassRef.cpp:
(OpaqueJSClass::~OpaqueJSClass):
(OpaqueJSClass::className):
* API/OpaqueJSString.cpp:
(OpaqueJSString::create):
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::constantName):
(JSC::idName):
(JSC::CodeBlock::registerName):
(JSC::regexpName):
* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::get):
* bytecompiler/NodesCodegen.cpp:
(JSC::ResolveNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::ReadModifyResolveNode::emitBytecode):
(JSC::processClauseList):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createRegex):
* parser/ParserArena.h:
(JSC::IdentifierArena::makeNumericIdentifier):
* parser/SourceProvider.h:
(JSC::UStringSourceProvider::data):
(JSC::UStringSourceProvider::length):
* profiler/Profiler.cpp:
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyNames):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate):
* runtime/ExceptionHelpers.cpp:
* runtime/FunctionConstructor.cpp:
* runtime/FunctionPrototype.cpp:
(JSC::insertSemicolonIfNeeded):
* runtime/Identifier.h:
(JSC::Identifier::characters):
(JSC::Identifier::length):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::decode):
(JSC::parseInt):
(JSC::parseFloat):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
* runtime/JSNumberCell.cpp:
(JSC::JSNumberCell::toString):
* runtime/JSONObject.cpp:
(JSC::gap):
(JSC::Stringifier::appendQuotedString):
(JSC::Stringifier::appendStringifiedValue):
(JSC::Stringifier::indent):
(JSC::Stringifier::unindent):
(JSC::Walker::walk):
* runtime/JSString.cpp:
(JSC::JSString::replaceCharacter):
(JSC::JSString::getIndexSlowCase):
* runtime/JSString.h:
(JSC::RopeBuilder::JSString):
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::RopeBuilder::fiberCount):
(JSC::jsSingleCharacterSubstring):
(JSC::jsNontrivialString):
(JSC::JSString::getIndex):
(JSC::jsString):
(JSC::jsStringWithFinalizer):
(JSC::jsSubstring):
(JSC::jsOwnedString):
* runtime/JSStringBuilder.h:
(JSC::JSStringBuilder::append):
* runtime/LiteralParser.h:
(JSC::LiteralParser::Lexer::Lexer):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
* runtime/NumericStrings.h:
(JSC::NumericStrings::add):
(JSC::NumericStrings::lookupSmallString):
* runtime/Operations.h:
(JSC::jsString):
* runtime/RegExp.cpp:
(JSC::RegExp::match):
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getRightContext):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::match):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncToString):
* runtime/StringBuilder.h:
(JSC::StringBuilder::append):
* runtime/StringConcatenate.h: Copied from JavaScriptCore/runtime/UString.h.
(JSC::):
(JSC::sumWithOverflow):
(JSC::tryMakeString):
(JSC::makeString):
* runtime/StringObject.cpp:
(JSC::StringObject::getOwnPropertyNames):
* runtime/StringPrototype.cpp:
(JSC::substituteBackreferencesSlow):
(JSC::localeCompare):
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplit):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncLink):
(JSC::trimString):
* runtime/UString.cpp:
(JSC::UString::number):
(JSC::UString::ascii):
(JSC::UString::operator[]):
(JSC::UString::toDouble):
(JSC::UString::find):
(JSC::UString::rfind):
(JSC::UString::substr):
(JSC::operator==):
(JSC::operator<):
(JSC::operator>):
(JSC::UString::UTF8String):
* runtime/UString.h:
(JSC::UString::UString):
(JSC::UString::adopt):
(JSC::UString::length):
(JSC::UString::characters):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
(JSC::UString::cost):
(JSC::operator==):
(JSC::operator!=):
(JSC::codePointCompare):
(JSC::UString::toArrayIndex):
(JSC::IdentifierRepHash::hash):
(WTF::):
* yarr/RegexJIT.cpp:
(JSC::Yarr::jitCompileRegex):
* yarr/RegexParser.h:
(JSC::Yarr::Parser::Parser):
2010-08-11 Gabor Loki <loki@webkit.org>
Qt build fix (ARMv7).
Fix invalid conversion from int to Condition.
Add ARMv7Assembler.cpp to JavaScriptCore.pro.
* JavaScriptCore.pro:
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::):
(JSC::ARMv7Assembler::JmpSrc::JmpSrc):
2010-08-11 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
At collection time, we frequently want to mark a cell, while checking
whether it was originally checked. Previously, this was a get
operation follwed by a set operation. Fusing the two saves
computation and gives a 0.5% sunspider speedup.
* runtime/Collector.h:
(JSC::CollectorBitmap::getset):
(JSC::Heap::checkMarkCell):
* runtime/JSArray.h:
(JSC::MarkStack::drain):
* runtime/JSCell.h:
(JSC::MarkStack::append):
2010-08-11 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Improve vsprops copying for Windows build
https://bugs.webkit.org/show_bug.cgi?id=41982
When we detect a new SDK, always copy a new set of vsprops files.
Previously, if someone updated their SDK after updating their sources,
they could end up with out-of-date vsprops files.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2010-08-10 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Add leakRef and clear to all RefPtr variants
https://bugs.webkit.org/show_bug.cgi?id=42389
* API/JSRetainPtr.h: Changed all uses of "template <...>" to instead do
"template<...>". We should probably put this in the style guide and do it
consitently. Fixed other minor style issues. Defined many of the inlined
functions outside the class definition, to avoid style checker warnings
about multiple statements on a single line and for slightly better clarity
of the class definition itself. Renamed releaseRef to leakRef. Added a
releaseRef that calls leakRef so we don't have to rename all callers oat
once. Added a clear function.
* wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef.
n
* wtf/RefPtr.h: Changed all uses of "template <...>" to instead do
"template<...>". Tidied up declarations and comments a bit.
Changed all uses of releaseRef to leakRef.
* wtf/RetainPtr.h: Changed all uses of "template <...>" to instead do
"template<...>". Defined many of the inlined functions outside the class
definition, to avoid style checker warnings about multiple statements on
a single line and for slightly better clarity of the class definition itself.
Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
don't have to rename all callers at once. Added a clear function.
2010-08-10 Dumitru Daniliuc <dumi@chromium.org>
Unreviewed, reverting an unintentional change to a file submitted in r65108.
* bytecode/CodeBlock.h:
(JSC::binaryChop):
2010-08-10 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig
Bug 43817 - Remove UString::Rep
UString::Rep has for a long time been replaced by UStringImpl (Rep
remaining as a typedef). UStringImpl has since been removed too
(unified with StringImpl). Remove Rep, rename rep() to impl() and
m_rep to m_impl. Also add impl() method to Identifier, and rename
its UString member from _ustring to m_string.
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::getOwnPropertySlot):
(JSC::::put):
(JSC::::deleteProperty):
(JSC::::getOwnPropertyNames):
(JSC::::staticValueGetter):
(JSC::::staticFunctionGetter):
* API/JSClassRef.cpp:
(tryCreateStringFromUTF8):
(OpaqueJSClass::OpaqueJSClass):
(OpaqueJSClass::~OpaqueJSClass):
(OpaqueJSClassContextData::OpaqueJSClassContextData):
* API/JSClassRef.h:
* API/OpaqueJSString.cpp:
(OpaqueJSString::ustring):
* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::get):
* bytecode/JumpTable.h:
(JSC::StringJumpTable::offsetForValue):
(JSC::StringJumpTable::ctiForValue):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::addVar):
(JSC::BytecodeGenerator::addGlobalVar):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::addParameter):
(JSC::BytecodeGenerator::registerFor):
(JSC::BytecodeGenerator::willResolveToArguments):
(JSC::BytecodeGenerator::uncheckedRegisterForArguments):
(JSC::BytecodeGenerator::constRegisterFor):
(JSC::BytecodeGenerator::isLocal):
(JSC::BytecodeGenerator::isLocalConstant):
(JSC::BytecodeGenerator::addConstant):
(JSC::BytecodeGenerator::emitLoad):
(JSC::BytecodeGenerator::findScopedProperty):
(JSC::keyForCharacterSwitch):
(JSC::prepareJumpTableForStringSwitch):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::processClauseList):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* parser/JSParser.cpp:
(JSC::JSParser::parseStrictObjectLiteral):
* pcre/pcre_exec.cpp:
(Histogram::add):
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::Hash::hash):
* profiler/Profile.cpp:
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::debugPrintDataSampleStyle):
* profiler/ProfileNode.h:
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
* runtime/Identifier.cpp:
(JSC::Identifier::equal):
(JSC::IdentifierCStringTranslator::hash):
(JSC::IdentifierCStringTranslator::equal):
(JSC::IdentifierCStringTranslator::translate):
(JSC::Identifier::add):
(JSC::IdentifierUCharBufferTranslator::hash):
(JSC::IdentifierUCharBufferTranslator::equal):
(JSC::IdentifierUCharBufferTranslator::translate):
(JSC::Identifier::addSlowCase):
* runtime/Identifier.h:
(JSC::Identifier::Identifier):
(JSC::Identifier::ustring):
(JSC::Identifier::impl):
(JSC::Identifier::data):
(JSC::Identifier::size):
(JSC::Identifier::ascii):
(JSC::Identifier::isNull):
(JSC::Identifier::isEmpty):
(JSC::Identifier::toUInt32):
(JSC::Identifier::toStrictUInt32):
(JSC::Identifier::toArrayIndex):
(JSC::Identifier::toDouble):
(JSC::Identifier::equal):
(JSC::Identifier::add):
* runtime/InitializeThreading.cpp:
(JSC::initializeThreadingOnce):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::displayName):
* runtime/JSFunction.cpp:
(JSC::JSFunction::displayName):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::addStaticGlobals):
* runtime/JSStaticScopeObject.h:
(JSC::JSStaticScopeObject::JSStaticScopeObject):
* runtime/JSString.h:
(JSC::):
(JSC::RopeBuilder::appendStringInConstruct):
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::jsSingleCharacterSubstring):
(JSC::jsSubstring):
* runtime/JSVariableObject.cpp:
(JSC::JSVariableObject::deleteProperty):
(JSC::JSVariableObject::symbolTableGet):
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::symbolTableGet):
(JSC::JSVariableObject::symbolTablePut):
(JSC::JSVariableObject::symbolTablePutWithAttributes):
* runtime/Lookup.cpp:
(JSC::HashTable::createTable):
(JSC::HashTable::deleteTable):
* runtime/Lookup.h:
(JSC::HashEntry::initialize):
(JSC::HashEntry::setKey):
(JSC::HashEntry::key):
(JSC::HashTable::entry):
* runtime/PropertyMapHashTable.h:
(JSC::PropertyMapEntry::PropertyMapEntry):
* runtime/PropertyNameArray.cpp:
(JSC::PropertyNameArray::add):
* runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::addKnownUnique):
* runtime/RegExp.cpp:
(JSC::RegExp::match):
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::create):
* runtime/RegExpKey.h:
(JSC::RegExpKey::RegExpKey):
* runtime/SmallStrings.cpp:
(JSC::SmallStringsStorage::rep):
(JSC::SmallStrings::singleCharacterStringRep):
* runtime/SmallStrings.h:
* runtime/StringPrototype.cpp:
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
* runtime/Structure.cpp:
(JSC::Structure::~Structure):
(JSC::Structure::despecifyDictionaryFunction):
(JSC::Structure::addPropertyTransitionToExistingStructure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::copyPropertyTable):
(JSC::Structure::get):
(JSC::Structure::despecifyFunction):
(JSC::Structure::put):
(JSC::Structure::hasTransition):
(JSC::Structure::remove):
(JSC::Structure::checkConsistency):
* runtime/Structure.h:
(JSC::Structure::get):
(JSC::Structure::hasTransition):
* runtime/StructureTransitionTable.h:
* runtime/SymbolTable.h:
* runtime/UString.cpp:
(JSC::UString::UString):
(JSC::UString::toStrictUInt32):
(JSC::UString::substr):
* runtime/UString.h:
(JSC::UString::UString):
(JSC::UString::adopt):
(JSC::UString::data):
(JSC::UString::size):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
(JSC::UString::cost):
(JSC::operator==):
(JSC::codePointCompare):
(JSC::IdentifierRepHash::hash):
(WTF::):
2010-08-10 Gavin Barraclough <barraclough@apple.com>
Bug 43816 - Remove UStringImpl
The class was actually removed a long time ago, replaced by StringImpl.
UStringImpl is just a typedef onto StringImpl. Remove this.
* API/JSClassRef.cpp:
(OpaqueJSClass::OpaqueJSClass):
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSString.cpp:
(JSC::JSString::resolveRope):
(JSC::JSString::replaceCharacter):
* runtime/JSString.h:
(JSC::RopeBuilder::RopeIterator::operator*):
(JSC::RopeBuilder::JSString):
(JSC::RopeBuilder::appendStringInConstruct):
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::jsSingleCharacterSubstring):
(JSC::jsSubstring):
* runtime/JSStringBuilder.h:
(JSC::jsMakeNontrivialString):
* runtime/RopeImpl.cpp:
(JSC::RopeImpl::derefFibersNonRecursive):
* runtime/RopeImpl.h:
(JSC::RopeImpl::deref):
* runtime/SmallStrings.cpp:
(JSC::SmallStringsStorage::SmallStringsStorage):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCodeSlowCase):
* runtime/StringPrototype.cpp:
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncLink):
* runtime/UString.cpp:
(JSC::initializeUString):
* runtime/UString.h:
(JSC::UString::adopt):
(JSC::tryMakeString):
(JSC::makeString):
* runtime/UStringImpl.h: Removed.
2010-08-10 Patrick Gansterer <paroga@paroga.com>
Reviewed by Eric Seidel.
Make FastMalloc more portable.
https://bugs.webkit.org/show_bug.cgi?id=41790
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2010-08-10 Patrick Gansterer <paroga@paroga.com>
Reviewed by David Levin.
[WINCE] Buildfix for CE 6.0
https://bugs.webkit.org/show_bug.cgi?id=43027
CE 6.0 doesn't define localtime in the system include files.
* wtf/Platform.h: Include ce_time.h on all OS(WINCE).
2010-08-10 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig.
Bug 43786 - Move AtomicStringHash from WebCore to WTF
Also remove deprecated string headers from WebCore/platform/text.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/AtomicString.h:
* wtf/text/AtomicStringHash.h: Copied from WebCore/platform/text/AtomicStringHash.h.
2010-08-09 Oliver Hunt <oliver@apple.com>
Fix Qt/ARM again, this time including the other changed file.
* jit/JIT.h:
2010-08-09 Oliver Hunt <oliver@apple.com>
Fix Qt/ARM
C++ overload resolution I stab at thee
* jit/JITInlineMethods.h:
(JSC::JIT::beginUninterruptedSequence):
(JSC::JIT::endUninterruptedSequence):
2010-08-09 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Allow an assembler/macroassembler to compact branches to more concise forms when linking
https://bugs.webkit.org/show_bug.cgi?id=43745
This patch makes it possible for an assembler to convert jumps into a different
(presumably more efficient) form at link time. Currently implemented in the
ARMv7 JIT as that already had logic to delay linking of jumps until the end of
compilation already. The ARMv7 JIT chooses between either a 4 byte short jump
or a full 32-bit offset (and rewrites ITTT instructions as appropriate), so does
not yet produce the most compact form possible. The general design of the linker
should make it relatively simple to introduce new branch types with little effort,
as the linker has no knowledge of the exact form of any of the branches.
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/ARMv7Assembler.cpp: Added.
(JSC::):
Record jump sizes
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::LinkRecord::LinkRecord):
(JSC::ARMv7Assembler::LinkRecord::from):
(JSC::ARMv7Assembler::LinkRecord::setFrom):
(JSC::ARMv7Assembler::LinkRecord::to):
(JSC::ARMv7Assembler::LinkRecord::type):
(JSC::ARMv7Assembler::LinkRecord::linkType):
(JSC::ARMv7Assembler::LinkRecord::setLinkType):
Encapsulate LinkRecord fields so we can compress the values somewhat
(JSC::ARMv7Assembler::JmpSrc::JmpSrc):
Need to record the jump type now
(JSC::ARMv7Assembler::b):
(JSC::ARMv7Assembler::blx):
(JSC::ARMv7Assembler::bx):
Need to pass the jump types
(JSC::ARMv7Assembler::executableOffsetFor):
(JSC::ARMv7Assembler::jumpSizeDelta):
(JSC::ARMv7Assembler::linkRecordSourceComparator):
(JSC::ARMv7Assembler::computeJumpType):
(JSC::ARMv7Assembler::convertJumpTo):
(JSC::ARMv7Assembler::recordLinkOffsets):
(JSC::ARMv7Assembler::jumpsToLink):
(JSC::ARMv7Assembler::link):
(JSC::ARMv7Assembler::unlinkedCode):
Helper functions for the linker
(JSC::ARMv7Assembler::linkJump):
(JSC::ARMv7Assembler::canBeShortJump):
(JSC::ARMv7Assembler::linkLongJump):
(JSC::ARMv7Assembler::linkShortJump):
(JSC::ARMv7Assembler::linkJumpAbsolute):
Moving code around for the various jump linking functions
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::beginUninterruptedSequence):
(JSC::AbstractMacroAssembler::endUninterruptedSequence):
We have to track uninterrupted sequences in any assembler that compacts
branches as that's not something we're allowed to do in such sequences.
AbstractMacroAssembler has a nop version of these functions as it makes the
code elsewhere nicer.
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::link):
(JSC::LinkBuffer::patch):
(JSC::LinkBuffer::locationOf):
(JSC::LinkBuffer::locationOfNearCall):
(JSC::LinkBuffer::returnAddressOffset):
(JSC::LinkBuffer::trampolineAt):
Updated these functions to adjust for any changed offsets in the linked code
(JSC::LinkBuffer::applyOffset):
A helper function to deal with the now potentially moved labels
(JSC::LinkBuffer::linkCode):
The new and mighty linker function
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::MacroAssemblerARMv7):
(JSC::MacroAssemblerARMv7::beginUninterruptedSequence):
(JSC::MacroAssemblerARMv7::endUninterruptedSequence):
(JSC::MacroAssemblerARMv7::jumpsToLink):
(JSC::MacroAssemblerARMv7::unlinkedCode):
(JSC::MacroAssemblerARMv7::computeJumpType):
(JSC::MacroAssemblerARMv7::convertJumpTo):
(JSC::MacroAssemblerARMv7::recordLinkOffsets):
(JSC::MacroAssemblerARMv7::jumpSizeDelta):
(JSC::MacroAssemblerARMv7::link):
(JSC::MacroAssemblerARMv7::jump):
(JSC::MacroAssemblerARMv7::branchMul32):
(JSC::MacroAssemblerARMv7::breakpoint):
(JSC::MacroAssemblerARMv7::nearCall):
(JSC::MacroAssemblerARMv7::call):
(JSC::MacroAssemblerARMv7::ret):
(JSC::MacroAssemblerARMv7::tailRecursiveCall):
(JSC::MacroAssemblerARMv7::executableOffsetFor):
(JSC::MacroAssemblerARMv7::inUninterruptedSequence):
(JSC::MacroAssemblerARMv7::makeJump):
(JSC::MacroAssemblerARMv7::makeBranch):
All branches need to pass on their type now
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::returnLastBytes):
We can't know ahead of time how much space will be necessary to
hold the linked code if we're compacting branches, this new
function allows us to return the unused bytes at the end of linking
* jit/JIT.cpp:
(JSC::JIT::JIT):
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JSC::JIT::compile):
The JIT class now needs to take a linker offset so that recompilation
can generate the same jumps when using branch compaction.
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emitSlow_op_mod):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
Update for new trampolineAt changes
* wtf/FastMalloc.cpp:
(WTF::TCMallocStats::):
* wtf/Platform.h:
2010-08-09 Gavin Barraclough <barraclough@apple.com>
Qt build fix III.
* wtf/text/WTFString.h:
2010-08-09 Gavin Barraclough <barraclough@apple.com>
Qt build fix.
* wtf/qt/StringQt.cpp:
2010-08-06 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig
Bug 43594 - Add string forwards to Forward.h
This allows us to remove forward declarations for these classes from
WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/Forward.h:
2010-08-07 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r64938.
http://trac.webkit.org/changeset/64938
https://bugs.webkit.org/show_bug.cgi?id=43685
Did not compile on several ports (Requested by abarth on
#webkit).
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbstractMacroAssembler.h:
* assembler/MacroAssembler.h:
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::load32):
(JSC::MacroAssemblerX86::store32):
* assembler/X86Assembler.h:
(JSC::X86Assembler::movl_rm):
(JSC::X86Assembler::movl_mr):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/Instruction.h:
(JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::):
(JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
(JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::deref):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::initGetByIdProto):
(JSC::StructureStubInfo::initGetByIdChain):
(JSC::StructureStubInfo::):
* jit/JIT.h:
* jit/JITMarkObjects.cpp: Removed.
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITStubs.cpp:
(JSC::setupPolymorphicProtoList):
* wtf/Platform.h:
2010-08-07 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
The JIT code contains a number of direct references to GC'd objects.
When we have movable objects, these references will need to be
updated.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::int32AtLocation):
(JSC::AbstractMacroAssembler::pointerAtLocation):
(JSC::AbstractMacroAssembler::jumpTarget):
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::loadPtrWithPatch):
Normally, loadPtr will optimize when the register is eax. Since
the slightly smaller instruction changes the offsets, it messes up
our ability to repatch the code. We added this new instruction
that garuntees a constant size.
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::load32WithPatch):
Changed load32 in the same way described above.
(JSC::MacroAssemblerX86::load32):
Moved the logic to optimize laod32 from movl_mr to load32
(JSC::MacroAssemblerX86::store32):
Moved the logic to optimize store32 from movl_rm to store32
* assembler/X86Assembler.h:
(JSC::X86Assembler::movl_rm):
(JSC::X86Assembler::movl_mr):
(JSC::X86Assembler::int32AtLocation):
(JSC::X86Assembler::pointerAtLocation):
(JSC::X86Assembler::jumpTarget):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/Instruction.h:
As described in StructureStubInfo.h, we needed to add additional
fields to both StructureStubInfo and
PolymorphicAccessStructureList so that we can determine the
structure of the JITed code at patch time.
(JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
(JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::markAggregate):
Added this function to mark the JITed code that correosponds to
this structure stub info.
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::initGetByIdProto):
(JSC::StructureStubInfo::initGetByIdChain):
(JSC::StructureStubInfo::):
* jit/JIT.h:
* jit/JITMarkObjects.cpp: Added.
(JSC::JIT::patchPrototypeStructureAddress):
(JSC::JIT::patchGetDirectOffset):
(JSC::JIT::markGetByIdProto):
(JSC::JIT::markGetByIdChain):
(JSC::JIT::markGetByIdProtoList):
(JSC::JIT::markPutByIdTransition):
(JSC::JIT::markGlobalObjectReference):
* jit/JITPropertyAccess.cpp:
Added asserts for the patch offsets.
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITStubs.cpp:
(JSC::setupPolymorphicProtoList):
* wtf/Platform.h:
Added ENABLE_MOVABLE_GC_OBJECTS flag
2010-08-07 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Revert JSArray to point to the beginning of the contained ArrayStorage
struct. This is described in
https://bugs.webkit.org/show_bug.cgi?id=43526.
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::~JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::getOwnPropertyNames):
(JSC::JSArray::getNewVectorLength):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::increaseVectorPrefixLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::shiftCount):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sortNumeric):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
(JSC::JSArray::subclassData):
(JSC::JSArray::setSubclassData):
(JSC::JSArray::checkConsistency):
* runtime/JSArray.h:
(JSC::JSArray::length):
(JSC::JSArray::canGetIndex):
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
2010-08-07 Kwang Yul Seo <skyul@company100.net>
Reviewed by Eric Seidel.
Add ENABLE(YARR) guard around JSGlobalData::m_regexAllocator
https://bugs.webkit.org/show_bug.cgi?id=43399
m_regexAllocator is used only by RegExp::compile which is guarded with ENABLE(YARR).
* runtime/JSGlobalData.h:
2010-08-07 Patrick Roland Gansterer <paroga@paroga.com>
Reviewed by Eric Seidel.
[Qt] Enable JIT on WinCE
https://bugs.webkit.org/show_bug.cgi?id=43303
Add ExtraCompiler for generating GeneratedJITStubs_MSVC.asm.
* DerivedSources.pro:
2010-08-07 Dan Bernstein <mitz@apple.com>
Reviewed by Anders Carlsson.
Created a separate SimpleFontData constructor exclusively for SVG fonts and moved the CTFontRef
from SimpleFontData to FontPlatformData.
https://bugs.webkit.org/show_bug.cgi?id=43674
* wtf/Platform.h: Moved definitions of WTF_USE_CORE_TEXT and WTF_USE_ATSUI here from WebCore/config.h.
2010-08-07 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Eric Seidel.
Bitmap.h has no default constructor
https://bugs.webkit.org/show_bug.cgi?id=43619
Without a constructor, the initial bits of the Bitmap class
are undefinied. If only a few, or zero bits are 0, the memory
area provided by AlignedMemoryAllocator can be easly exhausted.
Csaba Osztrogonác helped to find this bug.
* wtf/Bitmap.h:
(WTF::::Bitmap):
2010-08-06 Rafael Antognolli <antognolli@profusion.mobi>
[EFL] Build fix.
* CMakeLists.txt: add runtime/CGHandle.cpp.
2010-08-06 Jessie Berlin <jberlin@apple.com>
Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build.
Unreviewed.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/Forward.h:
2010-08-06 Jessie Berlin <jberlin@apple.com>
Windows Build Fix (continued). Unreviewed.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-06 Jessie Berlin <jberlin@apple.com>
Windows Build Fix. Unreviewed.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
Add GCHandle.h and GCHandle.cpp.
2010-08-06 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
https://bugs.webkit.org/show_bug.cgi?id=43207
WeakGCPtr's should instead of directly pointing to the GC'd object
should be directed to an array of pointers that can be updated for
movable objects.
* Android.mk:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/Collector.cpp:
(JSC::Heap::destroy):
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlock):
(JSC::Heap::updateWeakGCHandles):
(JSC::WeakGCHandlePool::update):
(JSC::Heap::addWeakGCHandle):
(JSC::Heap::markRoots):
* runtime/Collector.h:
(JSC::Heap::weakGCHandlePool):
* runtime/GCHandle.cpp: Added.
(JSC::WeakGCHandle::pool):
(JSC::WeakGCHandlePool::WeakGCHandlePool):
(JSC::WeakGCHandlePool::allocate):
(JSC::WeakGCHandlePool::free):
(JSC::WeakGCHandlePool::operator new):
* runtime/GCHandle.h: Added.
(JSC::WeakGCHandle::isValidPtr):
(JSC::WeakGCHandle::isPtr):
(JSC::WeakGCHandle::isNext):
(JSC::WeakGCHandle::invalidate):
(JSC::WeakGCHandle::get):
(JSC::WeakGCHandle::set):
(JSC::WeakGCHandle::getNextInFreeList):
(JSC::WeakGCHandle::setNextInFreeList):
(JSC::WeakGCHandlePool::isFull):
* runtime/WeakGCPtr.h:
(JSC::WeakGCPtr::WeakGCPtr):
(JSC::WeakGCPtr::~WeakGCPtr):
(JSC::WeakGCPtr::get):
(JSC::WeakGCPtr::clear):
(JSC::WeakGCPtr::assign):
(JSC::get):
2010-08-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Antonio Gomes.
[Qt] Fix warnings about difference in symbol visiblity on Mac OS X
* jsc.pro:
2010-08-06 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Refactor identifier parsing in lexer
https://bugs.webkit.org/show_bug.cgi?id=41845
The code is refactored to avoid gotos. The new code
has the same performance as the old one.
SunSpider --parse-only: no change (from 34.0ms to 33.6ms)
SunSpider: no change (from 523.2ms to 523.5ms)
* parser/Lexer.cpp:
(JSC::Lexer::parseIdent):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-08-06 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
The ARM JIT does not support JSValue32_64 with RVCT
https://bugs.webkit.org/show_bug.cgi?id=43411
JSValue32_64 is enabled for RVCT by default.
* create_jit_stubs:
* jit/JITStubs.cpp:
(JSC::ctiTrampoline):
(JSC::ctiVMThrowTrampoline):
(JSC::ctiOpThrowNotCaught):
* wtf/Platform.h:
2010-08-05 Chao-ying Fu <fu@mips.com>
Reviewed by Darin Adler.
Define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER for MIPS
https://bugs.webkit.org/show_bug.cgi?id=43514
MIPS needs to define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER, so that
RenderArena::allocate() can return 8-byte aligned memory to avoid
exceptions on sdc1/ldc1.
* wtf/Platform.h:
2010-08-05 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig
Bug 43594 - Add string forwards to Forward.h
This allows us to remove forward declarations for these classes from
WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/Forward.h:
2010-08-05 Geoffrey Garen <ggaren@apple.com>
Reviewed by Mark Rowe.
Fixed leak seen on buildbot.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr,
since anything less would be uncivilized.
2010-08-05 Andy Estes <aestes@apple.com>
Reviewed by David Kilzer.
Rename iOS-related OS and PLATFORM macros.
https://bugs.webkit.org/show_bug.cgi?id=43493
Rename WTF_OS_IPHONE_OS to WTF_OS_IOS, WTF_PLATFORM_IPHONE to
WTF_PLATFORM_IOS, and WTF_PLATFORM_IPHONE_SIMULATOR to
WTF_PLATFORM_IOS_SIMULATOR.
* jit/ExecutableAllocator.h:
* jit/JITStubs.cpp:
* profiler/ProfilerServer.mm:
(-[ProfilerServer init]):
* wtf/FastMalloc.cpp:
(WTF::TCMallocStats::):
* wtf/Platform.h:
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
2010-08-05 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=43464
Currently, the global object is being embedded in the JavaScriptCore
bytecode, however since the global object is the same for all opcodes
in a code block, we can have the global object just be a member of the
associated code block.
Additionally, I added an assert inside of emitOpcode that verifies
that the last generated opcode was of the correct length.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::derefStructures):
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
(JSC::GlobalCodeBlock::GlobalCodeBlock):
(JSC::ProgramCodeBlock::ProgramCodeBlock):
(JSC::EvalCodeBlock::EvalCodeBlock):
(JSC::FunctionCodeBlock::FunctionCodeBlock):
* bytecode/Opcode.h:
(JSC::opcodeLength):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitOpcode):
Added an assert to check that the last generated opcode is the
correct length.
(JSC::BytecodeGenerator::rewindBinaryOp):
Changed the last opcode to op_end since the length will no longer
be correct.
(JSC::BytecodeGenerator::rewindUnaryOp):
Changed the last opcode to op_end since the length will no longer
be correct.
(JSC::BytecodeGenerator::emitResolve):
(JSC::BytecodeGenerator::emitGetScopedVar):
(JSC::BytecodeGenerator::emitPutScopedVar):
(JSC::BytecodeGenerator::emitResolveWithBase):
* bytecompiler/BytecodeGenerator.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::privateExecute):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_global_var):
(JSC::JIT::emit_op_put_global_var):
(JSC::JIT::emit_op_resolve_global):
(JSC::JIT::emitSlow_op_resolve_global):
(JSC::JIT::emit_op_resolve_global_dynamic):
(JSC::JIT::emitSlow_op_resolve_global_dynamic):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_global_var):
(JSC::JIT::emit_op_put_global_var):
(JSC::JIT::emit_op_resolve_global):
(JSC::JIT::emitSlow_op_resolve_global):
* jit/JITStubs.cpp:
(JSC::cti_op_resolve_global):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
2010-08-05 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 43185 - Switch RegisterFile over to use PageAllocation
Remove platform-specific memory allocation code.
* interpreter/RegisterFile.cpp:
(JSC::RegisterFile::~RegisterFile):
(JSC::RegisterFile::releaseExcessCapacity):
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
(JSC::RegisterFile::grow):
(JSC::RegisterFile::checkAllocatedOkay):
* wtf/PageAllocation.cpp:
(WTF::PageAllocation::lastError):
* wtf/PageAllocation.h:
(WTF::PageAllocation::allocate):
(WTF::PageAllocation::allocateAt):
(WTF::PageAllocation::allocateAligned):
(WTF::PageAllocation::pageSize):
(WTF::PageAllocation::isPageAligned):
(WTF::PageAllocation::isPowerOfTwo):
* wtf/PageReservation.h:
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::reserve):
(WTF::PageReservation::reserveAt):
2010-08-05 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
Fixed https://bugs.webkit.org/show_bug.cgi?id=43401 where array
content aren't properly initialized as part of unshift.
* runtime/JSArray.cpp:
(JSC::JSArray::unshiftCount):
2010-08-05 Jian Li <jianli@chromium.org>
Reviewed by David Levin.
Unify blob related feature defines to ENABLE(BLOB).
https://bugs.webkit.org/show_bug.cgi?id=43081
* Configurations/FeatureDefines.xcconfig:
2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Rubber-stamped by Xan Lopez.
Remove GHashTable left-overs. GHashTable is ref-counted, and is
correctly supported by GRefPtr.
* wtf/gobject/GOwnPtr.h:
2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Unreviewed.
Typo fix that makes distcheck happy.
* GNUmakefile.am:
2010-08-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt and Beth Dakin.
https://bugs.webkit.org/show_bug.cgi?id=43461
Invalid NaN parsing
* wtf/dtoa.cpp: Turn off the dtoa feature that allows you to specify a
non-standard NaN representation, since our NaN encoding assumes that all
true NaNs have the standard bit pattern.
* API/JSValueRef.cpp:
(JSValueMakeNumber): Don't allow an API client to accidentally specify
a non-standard NaN either.
2010-08-04 Gavin Barraclough <barraclough@apple.com>
Windows build fix part II.
* wtf/PageReservation.h:
(WTF::PageReservation::systemReserve):
2010-08-04 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* wtf/PageReservation.h:
(WTF::PageReservation::systemReserve):
2010-08-04 Gavin Barraclough <barraclough@apple.com>
Build fix - add new header to !Mac projects.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
2010-08-04 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation.
The PageAllocation class has a number of issues:
* Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate
blocks of memory for the GC heap, instead of allocating RChunks. Revert this change in
behaviour.
* In order for PageAllocation to work correctly on WinCE we should be decommitting memory
before deallocating. In order to simplify understanding the expected state at deallocate,
split behaviour out into PageAllocation and PageReservation classes. Require that all
memory be decommitted before calling deallocate on a PageReservation, add asserts to
enforce this.
* add many missing asserts.
* inline more functions.
* remove ability to create sub-PageAllocations from an existing PageAllocations object -
this presented an interface that would allow sub regions to be deallocated, which would
not have provided expected behaviour.
* remove writable/executable arguments to commit, this value can be cached at the point
the memory is reserved.
* remove writable/executable arguments to allocateAligned, protection other than RW is not
supported.
* add missing checks for overflow & failed allocation to mmap path through allocateAligned.
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::intializePageSize):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::Allocation::Allocation):
(JSC::ExecutablePool::Allocation::base):
(JSC::ExecutablePool::Allocation::size):
(JSC::ExecutablePool::Allocation::operator!):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::coalesceFreeSpace):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::allocInternal):
* runtime/AlignedMemoryAllocator.h:
(JSC::::allocate):
(JSC::::AlignedMemoryAllocator):
* runtime/Collector.cpp:
(JSC::Heap::allocateBlock):
* runtime/Collector.h:
* wtf/PageAllocation.cpp:
* wtf/PageAllocation.h:
(WTF::PageAllocation::operator!):
(WTF::PageAllocation::allocate):
(WTF::PageAllocation::allocateAt):
(WTF::PageAllocation::allocateAligned):
(WTF::PageAllocation::deallocate):
(WTF::PageAllocation::pageSize):
(WTF::PageAllocation::systemAllocate):
(WTF::PageAllocation::systemAllocateAt):
(WTF::PageAllocation::systemAllocateAligned):
(WTF::PageAllocation::systemDeallocate):
(WTF::PageAllocation::systemPageSize):
* wtf/PageReservation.h: Copied from JavaScriptCore/wtf/PageAllocation.h.
(WTF::PageReservation::PageReservation):
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::reserve):
(WTF::PageReservation::reserveAt):
(WTF::PageReservation::deallocate):
(WTF::PageReservation::systemCommit):
(WTF::PageReservation::systemDecommit):
(WTF::PageReservation::systemReserve):
(WTF::PageReservation::systemReserveAt):
* wtf/Platform.h:
2010-08-04 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r64655.
http://trac.webkit.org/changeset/64655
https://bugs.webkit.org/show_bug.cgi?id=43496
JavaScriptCore references patch seems to have caused
regressions in QT and GTK builds (Requested by nlawrence on
#webkit).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* runtime/Collector.cpp:
(JSC::Heap::markConservatively):
* runtime/JSCell.h:
(JSC::JSValue::asCell):
(JSC::MarkStack::append):
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
* runtime/JSObject.h:
(JSC::JSObject::prototype):
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSValue.h:
(JSC::JSValue::):
(JSC::JSValue::JSValue):
(JSC::JSValue::asCell):
* runtime/MarkStack.h:
* runtime/NativeErrorConstructor.cpp:
* runtime/NativeErrorConstructor.h:
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
2010-08-04 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig.
Enable JSVALUE64 for CPU(PPC64).
Basic browsing seems to work.
* wtf/Platform.h:
2010-08-04 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Darin Adler.
Refactoring MarkStack::append to take a reference. This is in
preparation for movable objects when we will need to update pointers.
http://bugs.webkit.org/show_bug.cgi?id=41177
Unless otherwise noted, all changes are to either return by reference
or pass a reference to MarkStack::append.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* runtime/Collector.cpp:
(JSC::Heap::markConservatively):
Added a temporary variable to prevent marking from changing an
unknown value on the stack
* runtime/JSCell.h:
(JSC::JSValue::asCell):
(JSC::MarkStack::append):
(JSC::MarkStack::appendInternal):
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
* runtime/JSObject.h:
(JSC::JSObject::prototype):
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSValue.h:
(JSC::JSValue::JSValue):
(JSC::JSValue::asCell):
* runtime/MarkStack.h:
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::createStructure):
Changed the structure flags to include a custom markChildren.
(JSC::NativeErrorConstructor::markChildren):
Update the prototype of the stored structure.
* runtime/NativeErrorConstructor.h:
Added structure flags.
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
2010-08-03 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Oliver Hunt.
Tightened up some get_by_id_chain* code generation
https://bugs.webkit.org/show_bug.cgi?id=40935
This is in the style of
https://bugs.webkit.org/show_bug.cgi?id=30539, and changed code to
call accessor functions when it was not necessary to directly access
the private variables.
* jit/JIT.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
2010-08-03 Adam Roben <aroben@apple.com>
Turn on PLATFORM_STRATEGIES on Windows
Fixes <http://webkit.org/b/43431>.
Reviewed by Anders Carlsson.
* wtf/Platform.h:
2010-08-04 Gabor Loki <loki@webkit.org>
Reviewed by Geoffrey Garen.
Enable JSValue32_64 for GCC on ARM by default
https://bugs.webkit.org/show_bug.cgi?id=43410
* wtf/Platform.h:
2010-08-03 Gavin Barraclough <barraclough@apple.com>
Speculative windows build fix.
* wtf/Bitmap.h:
2010-08-03 Gavin Barraclough <barraclough@apple.com>
Build fix following r64624.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/PageAllocation.h:
2010-08-03 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Gavin Barraclough.
https://bugs.webkit.org/show_bug.cgi?id=43269
Added new allocateAligned methods to PageAllocation. In order to
prevent a regress in performance, the function needs to be inlined.
Additionally, I ported the symbian block allocator to use
PageAllocation and added a new WTF::Bitmap class to support this.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/AlignedMemoryAllocator.h: Added.
(JSC::AlignedMemory::deallocate):
(JSC::AlignedMemory::base):
(JSC::AlignedMemory::AlignedMemory):
(JSC::AlignedMemoryAllocator::destroy):
(JSC::AlignedMemoryAllocator::allocate):
(JSC::AlignedMemoryAllocator::AlignedMemoryAllocator):
(JSC::AlignedMemoryAllocator::~AlignedMemoryAllocator):
(JSC::AlignedMemoryAllocator::free):
* runtime/Collector.cpp:
(JSC::Heap::Heap):
(JSC::Heap::destroy):
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlock):
(JSC::Heap::freeBlocks):
(JSC::Heap::allocate):
(JSC::Heap::shrinkBlocks):
(JSC::Heap::markConservatively):
(JSC::Heap::clearMarkBits):
(JSC::Heap::markedCells):
* runtime/Collector.h:
(JSC::CollectorHeap::collectorBlock):
* runtime/CollectorHeapIterator.h:
(JSC::CollectorHeapIterator::operator*):
(JSC::LiveObjectIterator::operator++):
(JSC::DeadObjectIterator::operator++):
* wtf/Bitmap.h: Added.
(WTF::Bitmap::get):
(WTF::Bitmap::set):
(WTF::Bitmap::clear):
(WTF::Bitmap::clearAll):
(WTF::Bitmap::advanceToNextFreeBit):
(WTF::Bitmap::count):
(WTF::Bitmap::isEmpty):
(WTF::Bitmap::isFull):
* wtf/PageAllocation.h:
(WTF::PageAllocation::operator UnspecifiedBoolType):
(WTF::PageAllocation::allocateAligned):
(WTF::PageAllocation::reserveAligned):
* wtf/Platform.h:
* wtf/symbian: Removed.
* wtf/symbian/BlockAllocatorSymbian.cpp: Removed.
* wtf/symbian/BlockAllocatorSymbian.h: Removed.
2010-08-03 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Fix for https://bugs.webkit.org/show_bug.cgi?id=43314. The prior code
was using the wrong "length" value to move array contents when adding
space to the beginning of an array for an unshift() or similar
operation. Instead of using m_vectorLength, the length of the
allocated JSValue array, the code was using m_length, the declared
length of the array. These two values do not need to match.
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSArray.cpp:
(JSC::JSArray::increaseVectorPrefixLength):
2010-08-03 Chao-ying Fu <fu@mips.com>
Reviewed by Gavin Barraclough.
Fix following https://bugs.webkit.org/show_bug.cgi?id=43089
(accidentally inverted a compiler version check).
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::cacheFlush):
2010-08-03 Patrick Gansterer <paroga@paroga.com>
Reviewed by Gavin Barraclough.
Implement DEFINE_STUB_FUNCTION for WinCE.
https://bugs.webkit.org/show_bug.cgi?id=34953
* jit/JITStubs.cpp:
(JSC::):
(JSC::DEFINE_STUB_FUNCTION):
2010-08-02 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 43390 - Do not CRASH if we run out of room for jit code.
Change the ExecutableAllocator implementations not to crash, and to return 0 if memory cannot be allocated.
The assemblers should pass this through without trying to use it in executableCopy.
Change the LinkBuffer to handle this, and to provide an allocationSuccessful() method to test for this.
Change the JIT to throw an exception if allocation fails.
Make JIT optimizations fail gracefully if memory cannot be allocated (use non-optimized path).
Change YARR JIT to fallback to PCRE
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::executableCopy):
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::allocationSuccessful):
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::executableCopy):
* assembler/X86Assembler.h:
(JSC::X86Assembler::executableCopy):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::initGetByIdProto):
(JSC::StructureStubInfo::initGetByIdChain):
(JSC::StructureStubInfo::initGetByIdSelfList):
(JSC::StructureStubInfo::initGetByIdProtoList):
(JSC::StructureStubInfo::initPutByIdTransition):
* jit/ExecutableAllocator.cpp:
(JSC::ExecutablePool::systemAlloc):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::allocInternal):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JSC::JIT::compileGetByIdProto):
(JSC::JIT::compileGetByIdSelfList):
(JSC::JIT::compileGetByIdProtoList):
(JSC::JIT::compileGetByIdChainList):
(JSC::JIT::compileGetByIdChain):
(JSC::JIT::compilePutByIdTransition):
(JSC::JIT::compilePatchGetArrayLength):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCachePutByID):
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
(JSC::setupPolymorphicProtoList):
* jit/JITStubs.h:
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::finalize):
* runtime/ExceptionHelpers.cpp:
(JSC::createOutOfMemoryError):
* runtime/ExceptionHelpers.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::compile):
2010-08-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Fixed a crash seen on the GTK 64bit buildbot.
When JSArray is allocated for the vptr stealing hack, it's not allocated
in the heap, so the JSArray constructor can't safely call Heap::heap().
Since this was subtle enough to confuse smart people, I've changed JSArray
to have an explicit vptr stealing constructor.
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
* runtime/JSArray.h:
(JSC::JSArray::):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::storeVPtrs):
2010-08-03 Alex Milowski <alex@milowski.com>
Reviewed by Beth Dakin.
Changed the ENABLE_MATHML value to enable MathML by default.
* Configurations/FeatureDefines.xcconfig:
2010-08-03 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Change to keep returned pointer from malloc family functions to
quiet memory leak detect. The pointer is saved in the new m_allocBase
member of the ArrayStorage structure. This fixes the issue found in
https://bugs.webkit.org/show_bug.cgi?id=43229.
As part of this change, we use m_allocBase when reallocating and
freeing the memory associated with ArrayStorage.
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::~JSArray):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::increaseVectorPrefixLength):
* runtime/JSArray.h:
2010-08-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Mark Rowe.
https://bugs.webkit.org/show_bug.cgi?id=43444
PLATFORM(CF) is false on Windows in JavaScriptCore
Moved some PLATFORM(WIN) #defines down into JavaScriptCore.
* wtf/Platform.h: Added WTF_PLATFORM_CF 1 and WTF_USE_PTHREADS 0, inherited
from WebCore/config.h. Removed WTF_USE_WININET 1 since WebCore/config.h
just #undefined that later.
2010-08-03 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build: Don't use GCActivityCallbackCF on Windows, since
PLATFORM(CF) is not defined on Windows.
We'll need to enable the GC activity callback some other way, but this
change should get the build back to normal.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* runtime/GCActivityCallbackCF.cpp: Make it easier to detect this error
in the future with an explicit error message.
2010-08-03 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build: update .def file.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-03 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=41318
GC should reclaim garbage even when new objects are not being allocated rapidly
Added a callback in JavaScriptCore that gets triggered after an
allocation causes the heap to reset. This is useful for adding a
timer that will trigger garbage collection after the "last" allocation.
Also needed was to add lock and unlock methods to JSLock that needed
only a JSGlobalData object versus an ExecState object.
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_put_by_val):
* runtime/Collector.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reset):
(JSC::Heap::setActivityCallback):
* runtime/Collector.h:
* runtime/GCActivityCallback.cpp: Added.
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::operator()):
* runtime/GCActivityCallback.h: Added.
(JSC::GCActivityCallback::~GCActivityCallback):
(JSC::GCActivityCallback::operator()):
(JSC::GCActivityCallback::GCActivityCallback):
(JSC::DefaultGCActivityCallback::create):
* runtime/GCActivityCallbackCF.cpp: Added.
(JSC::DefaultGCActivityCallbackPlatformData::trigger):
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::operator()):
* runtime/JSLock.cpp:
(JSC::JSLock::JSLock):
* runtime/JSLock.h:
2010-08-02 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix after removal of need to compile ExecutableAllocatorPosix.cpp
* wscript:
2010-08-02 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
Reviewed by Simon Hausmann.
[QT] build fix for symbian
https://bugs.webkit.org/show_bug.cgi?id=43234
1) wrong order of passing param's
2) static_cast complains on symbian so using reinterpret_cast
No new tests added. Just a build fix for qt symbian
* wtf/PageAllocation.cpp:
(WTF::PageAllocation::commit):
(WTF::PageAllocation::decommit):
(WTF::PageAllocation::reserve):
2010-07-30 Luiz Agostini <luiz.agostini@openbossa.org>
Reviewed by Simon Fraser.
Enabling view modes to all platforms
https://bugs.webkit.org/show_bug.cgi?id=37505
Removing ENABLE_WIDGETS_10_SUPPORT flag.
As view mode media feature is not part of widget 1.0 specification
any more the ENABLE_WIDGETS_10_SUPPORT flag may be removed. The only use
of this flag was related to view mode media feature implementation in Qt.
* wtf/Platform.h:
2010-07-30 Andy Estes <aestes@apple.com>
Reviewed by David Kilzer.
Add Xcode support for compiling WebKit against iOS SDKs.
https://bugs.webkit.org/show_bug.cgi?id=42796
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
2010-07-30 Dumitru Daniliuc <dumi@chromium.org>
Reviewed by Davin Levin.
Added a yield() function.
https://bugs.webkit.org/show_bug.cgi?id=42843
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::yield):
* wtf/ThreadingWin.cpp:
(WTF::yield):
* wtf/gtk/ThreadingGtk.cpp:
(WTF::yield):
* wtf/qt/ThreadingQt.cpp:
(WTF::yield):
2010-07-30 Rafael Antognolli <antognolli@profusion.mobi>
Reviewed by Antonio Gomes.
[EFL] Add library version and soname to EFL generated libraries and binary.
https://bugs.webkit.org/show_bug.cgi?id=43212
Add version and soname to libjavascriptcore.so and libwtf.so in case of
linking as shared libraries, and version to jsc executable.
* CMakeLists.txt:
* jsc/CMakeLists.txt:
* wtf/CMakeLists.txt:
2010-07-30 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
Reviewed by Simon Hausmann.
[QT] build fix for symbian
https://bugs.webkit.org/show_bug.cgi?id=43234
* wtf/PageAllocation.h:
(WTF::PageAllocation::PageAllocation):
2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r64313.
http://trac.webkit.org/changeset/64313
https://bugs.webkit.org/show_bug.cgi?id=43233
Some Chromium bots are not happy with it for some unknown
reason. (Requested by dumi on #webkit).
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
* wtf/ThreadingWin.cpp:
* wtf/gtk/ThreadingGtk.cpp:
* wtf/qt/ThreadingQt.cpp:
2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r64302.
http://trac.webkit.org/changeset/64302
https://bugs.webkit.org/show_bug.cgi?id=43223
Assertion is bogus (Requested by olliej on #webkit).
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::putShortUnchecked):
(JSC::AssemblerBuffer::putIntUnchecked):
(JSC::AssemblerBuffer::putInt64Unchecked):
* jit/JITStubs.cpp:
* pcre/pcre_compile.cpp:
(jsRegExpCompile):
* wtf/FastMalloc.cpp:
(WTF::PageHeapAllocator::New):
(WTF::TCMalloc_Central_FreeList::Populate):
* wtf/MD5.cpp:
(WTF::reverseBytes):
(WTF::MD5::addBytes):
(WTF::MD5::checksum):
* wtf/StdLibExtras.h:
* wtf/Vector.h:
(WTF::VectorBuffer::inlineBuffer):
* wtf/qt/StringQt.cpp:
(WebCore::String::String):
2010-07-29 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Changed the handling for removing and adding elements at the front
of an array. The code now keeps a bias that indicates the amount of
JSValue sized holes are prior to the ArrayStorage block. This means
that shift operations are now memmove's of the header part of
the ArrayStorage and unshift operations are similar, but may require a
realloc first to create the space. Similar operations are performed
for special cases of splice and slice.
Also optimized the new Array(size) case so that we don't allocate and
initialize array elements until the JS code starts using elements.
The array growth code is slightly more aggressive for initial growth
based on size growth of any previous array.
* Configurations/JavaScriptCore.xcconfig:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::~JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::getOwnPropertyNames):
(JSC::JSArray::getNewVectorLength):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::increaseVectorPrefixLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::shiftCount):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sortNumeric):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
(JSC::JSArray::subclassData):
(JSC::JSArray::setSubclassData):
(JSC::JSArray::checkConsistency):
* runtime/JSArray.h:
(JSC::JSArray::length):
(JSC::JSArray::canGetIndex):
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::arrayStorage):
(JSC::JSArray::setArrayStorage):
(JSC::JSArray::markChildrenDirect):
2010-07-29 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
Changed MINIMUM_CELL_SIZE to be fixed at 64 bytes.
* runtime/Collector.h:
2010-07-28 Dumitru Daniliuc <dumi@chromium.org>
Reviewed by David Levin.
Added a yield() function.
https://bugs.webkit.org/show_bug.cgi?id=42843
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::yield):
* wtf/ThreadingWin.cpp:
(WTF::yield):
* wtf/gtk/ThreadingGtk.cpp:
(WTF::yield):
* wtf/qt/ThreadingQt.cpp:
(WTF::yield):
2010-07-29 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
Fixed issue where RegExp greedy jit code loops when no input is
consumed. Changed the code to only loop if some input was consumed,
but fall through if we successfully match an alternative that
doesn't consume any input.
https://bugs.webkit.org/show_bug.cgi?id=42664
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
2010-07-29 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Avoid increasing required alignment of target type warning on ARM
https://bugs.webkit.org/show_bug.cgi?id=38045
The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
increases required alignment of target type warnings.
Casting the type of [pointer to Type2] object to void* bypasses the
warning.
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::putShortUnchecked):
(JSC::AssemblerBuffer::putIntUnchecked):
(JSC::AssemblerBuffer::putInt64Unchecked):
* jit/JITStubs.cpp:
* pcre/pcre_compile.cpp:
(jsRegExpCompile):
* wtf/FastMalloc.cpp:
(WTF::PageHeapAllocator::New):
(WTF::TCMalloc_Central_FreeList::Populate):
* wtf/MD5.cpp:
(WTF::reverseBytes):
(WTF::MD5::addBytes):
(WTF::MD5::checksum):
* wtf/StdLibExtras.h:
(reinterpret_cast_ptr):
* wtf/Vector.h:
(WTF::VectorBuffer::inlineBuffer):
* wtf/qt/StringQt.cpp:
(WebCore::String::String):
2010-07-29 Martin Robinson <mrobinson@igalia.com>
Unreviewed build fix.
Include a missing header in the source list to fix 'make dist.'
* GNUmakefile.am: Include missing header.
2010-07-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Darin Adler.
Bug 43162 - Add support for MADV_FREE to PageAllocation.
* wtf/PageAllocation.cpp:
(WTF::PageAllocation::commit):
(WTF::PageAllocation::decommit):
2010-07-27 Kinuko Yasuda <kinuko@chromium.org>
Reviewed by Ojan Vafai.
Add FILE_SYSTEM build flag for FileSystem API
https://bugs.webkit.org/show_bug.cgi?id=42915
* Configurations/FeatureDefines.xcconfig:
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Temporarily rolling out http://trac.webkit.org/changeset/64177,
this seems to give QT ARM/Win a headache (specifically, looks
like structure layour differs, objects get too large -
"..\..\..\JavaScriptCore\runtime\ArrayPrototype.cpp:41:"
"error: size of array 'dummyclass_fits_in_cell' is negative").
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
* runtime/JSArray.cpp:
(JSC::increasedVectorLength):
(JSC::JSArray::JSArray):
(JSC::JSArray::~JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::getOwnPropertyNames):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::sortNumeric):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
(JSC::JSArray::subclassData):
(JSC::JSArray::setSubclassData):
(JSC::JSArray::checkConsistency):
* runtime/JSArray.h:
(JSC::JSArray::length):
(JSC::JSArray::canGetIndex):
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Speculative build fix for Chromium/Win
* wtf/Platform.h:
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Oh! that makes more sense! Maybe C++-style comments are bringing teh bad mojo.
* wtf/Platform.h:
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Speculative build fix for GTK/64 ... seems to be barfing on a comment o_O
* wtf/Platform.h:
2010-07-27 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Changed the handling for removing and adding elements at the front
of an array. The code now keeps a bias that indicates the amount of
JSValue sized holes are prior to the ArrayStorage block. This means
that shift operations are now memmove's of the header part of
the ArrayStorage and unshift operations are similar, but may require a
realloc first to create the space. Similar operations are performed
for special cases of splice and slice.
Also optimized the new Array(size) case so that we don't allocate and
initialize array elements until the JS code starts using elements.
The array growth code is slightly more aggressive for initial growth
based on size growth of any previous array.
* Configurations/JavaScriptCore.xcconfig:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::~JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::getOwnPropertyNames):
(JSC::JSArray::getNewVectorLength):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::increaseVectorPrefixLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::shiftCount):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sortNumeric):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
(JSC::JSArray::subclassData):
(JSC::JSArray::setSubclassData):
(JSC::JSArray::checkConsistency):
* runtime/JSArray.h:
(JSC::JSArray::length):
(JSC::JSArray::canGetIndex):
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::arrayStorage):
(JSC::JSArray::setArrayStorage):
(JSC::JSArray::markChildrenDirect):
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 43089 - Cleanup JIT related switched in Platform.h
The code the enable to JIT checks every permutation of platform & OS individually, but
now the JIT is enabled on the majority much all x86/x86-64/ARM/MIPS systems. It should
be cleaner to just enable by default on these platforms, and explicitly disable on configs
that don't aren't supported.
Also, rename ENABLE_JIT_OPTIMIZE_MOD to ENABLE_JIT_USE_SOFT_MODULO. I always find this
confusing since enabling this "optimization" would be possible, but would be a regression
on x86/x86-64 systems! I think it's clearer to reserve "JIT_OPTIMIZE" for compiler
technologies applicable to all platforms, and make a more optional behaviour like this a
"USE".
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::cacheFlush):
* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitSlow_op_mod):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitSlow_op_mod):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* wtf/Platform.h:
2010-07-27 James Robinson <jamesr@chromium.org>
Reviewed by Darin Fisher.
[chromium] Make PLATFORM(CHROMIUM) and not OS(MAC) turn USE(GLES2_RENDERING) on
https://bugs.webkit.org/show_bug.cgi?id=43084
This turns USE(GLES2_RENDERING) on for chromium on windows/linux. This causes no
change in behavior, that's all controlled by ENABLE() macros that are currently off.
* wtf/Platform.h:
2010-07-23 Helder Correia <heldercorreia@codeaurora.org>
Reviewed by Darin Adler.
Canvas tests 2d.imageData.object.round and 2d.imageData.object.wrap are
failing. For canvas image data manipulation, the values passed should
be truncated and wrapped. Also fix the canvas-ImageData-behaviour test
to expect wrapping rather than clamping, and add some new checkings.
https://bugs.webkit.org/show_bug.cgi?id=40272
* runtime/JSByteArray.h:
(JSC::JSByteArray::setIndex):
(JSC::JSByteArray::JSByteArray):
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 42621 - Add a bump allocator for the YARR interpreter
The regex engine requires lifo allocation, however currently uses the general purpose
malloc/free memory allocation. A simple bump pointer allocator should provide a lower
overhead allocation solution.
When using YARR interpreter, 15% progression on v8-regex.
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSGlobalData.h:
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
* wtf/BumpPointerAllocator.h: Added.
(WTF::BumpPointerPool::ensureCapacity):
(WTF::BumpPointerPool::alloc):
(WTF::BumpPointerPool::dealloc):
(WTF::BumpPointerPool::operator new):
(WTF::BumpPointerPool::BumpPointerPool):
(WTF::BumpPointerPool::create):
(WTF::BumpPointerPool::shrink):
(WTF::BumpPointerPool::destroy):
(WTF::BumpPointerPool::ensureCapacityCrossPool):
(WTF::BumpPointerPool::deallocCrossPool):
(WTF::BumpPointerAllocator::BumpPointerAllocator):
(WTF::BumpPointerAllocator::~BumpPointerAllocator):
(WTF::BumpPointerAllocator::startAllocator):
(WTF::BumpPointerAllocator::stopAllocator):
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::allocDisjunctionContext):
(JSC::Yarr::Interpreter::freeDisjunctionContext):
(JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::interpret):
(JSC::Yarr::Interpreter::Interpreter):
(JSC::Yarr::ByteCompiler::compile):
(JSC::Yarr::byteCompileRegex):
* yarr/RegexInterpreter.h:
(JSC::Yarr::BytecodePattern::BytecodePattern):
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Windows build fix from Chromium/GTK build fix!
* wtf/PageAllocation.cpp:
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Chromium/GTK build fix
* wtf/PageAllocation.cpp:
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Build fix for !Mac platforms.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 43009 - Abstract out page allocation from executable allocators
It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
I think this will match current behaviour for the next client we will want to port across (RegisterFile &
Collector).
* CMakeListsEfl.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
(JSC::ExecutableAllocator::isValid):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::ExecutablePool):
(JSC::ExecutablePool::poolAllocate):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::release):
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::isWithinVMPool):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* jit/ExecutableAllocatorPosix.cpp: Removed.
* jit/ExecutableAllocatorSymbian.cpp: Removed.
* jit/ExecutableAllocatorWin.cpp: Removed.
* wscript:
* wtf/PageAllocator.cpp: Added.
(WTF::protection):
(WTF::PageAllocation::commit):
(WTF::PageAllocation::decommit):
(WTF::PageAllocator::allocate):
(WTF::PageAllocator::reserve):
(WTF::PageAllocator::deallocate):
(WTF::PageAllocator::pagesize):
* wtf/PageAllocator.h: Added.
(WTF::PageAllocation::PageAllocation):
(WTF::PageAllocation::base):
(WTF::PageAllocation::size):
(WTF::PageAllocation::chunk):
(WTF::PageAllocation::operator!):
(WTF::PageAllocator::):
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Rolling out r64097:64100, oops, more b0rked than I relized by my last changes, sorry!
* CMakeListsEfl.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::reprotectRegion):
(JSC::ExecutableAllocator::cacheFlush):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::ExecutablePool):
(JSC::ExecutablePool::poolAllocate):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::release):
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::isWithinVMPool):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* jit/ExecutableAllocatorPosix.cpp: Added.
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
(JSC::ExecutableAllocator::isValid):
* jit/ExecutableAllocatorSymbian.cpp: Added.
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
(JSC::ExecutableAllocator::isValid):
* jit/ExecutableAllocatorWin.cpp: Added.
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
(JSC::ExecutableAllocator::isValid):
* wscript:
* wtf/PageAllocation.cpp: Removed.
* wtf/PageAllocation.h: Removed.
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Speculative !debug build fix II.
* wtf/PageAllocation.h:
(WTF::PageAllocation::PageAllocation):
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Speculative !debug build fix.
* wtf/PageAllocation.h:
(WTF::PageAllocation::PageAllocation):
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 43009 - Abstract out page allocation from executable allocators
It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
I think this will match current behaviour for the next client we will want to port across (RegisterFile &
Collector).
* CMakeListsEfl.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
(JSC::ExecutableAllocator::isValid):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::ExecutablePool):
(JSC::ExecutablePool::poolAllocate):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::release):
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::isWithinVMPool):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* jit/ExecutableAllocatorPosix.cpp: Removed.
* jit/ExecutableAllocatorSymbian.cpp: Removed.
* jit/ExecutableAllocatorWin.cpp: Removed.
* wscript:
* wtf/PageAllocator.cpp: Added.
(WTF::protection):
(WTF::PageAllocation::commit):
(WTF::PageAllocation::decommit):
(WTF::PageAllocator::allocate):
(WTF::PageAllocator::reserve):
(WTF::PageAllocator::deallocate):
(WTF::PageAllocator::pagesize):
* wtf/PageAllocator.h: Added.
(WTF::PageAllocation::PageAllocation):
(WTF::PageAllocation::base):
(WTF::PageAllocation::size):
(WTF::PageAllocation::chunk):
(WTF::PageAllocation::operator!):
(WTF::PageAllocator::):
2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
This ensures that long-running JavaScript (for example due to a modal alert() dialog),
will not trigger a deferred load after only 500ms (the default tokenizer delay) while
still giving a reasonable timeout (10 seconds) to prevent deadlock.
https://bugs.webkit.org/show_bug.cgi?id=29381
* runtime/TimeoutChecker.h: Add getter for the timeout interval
2010-07-25 Patrick Gansterer <paroga@paroga.com>
Reviewed by Kent Tamura.
[WINCE] Buildfix for JSC in release mode
https://bugs.webkit.org/show_bug.cgi?id=42934
* jsc.cpp: Don't use __try on WinCE.
2010-07-24 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
[MSVC] Ensure 4 byte alignment on ARM
https://bugs.webkit.org/show_bug.cgi?id=42935
* jit/JITStubs.h: Added #pragma pack(4) around JITStackFrame.
2010-07-24 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
[WINCE] Cleanup defines in Platform.h
https://bugs.webkit.org/show_bug.cgi?id=42933
* wtf/Platform.h:
2010-07-23 Rafael Antognolli <antognolli@profusion.mobi>
Reviewed by Antonio Gomes.
[EFL] Cleanup glib support (make it optional)
https://bugs.webkit.org/show_bug.cgi?id=42480
Remove gobject/GRefPtr.cpp if not using soup/glib.
* wtf/CMakeListsEfl.txt:
2010-07-23 Patrick Gansterer <paroga@paroga.com>
Reviewed by Adam Roben.
[WINCE] Implement TCSpinLock.
https://bugs.webkit.org/show_bug.cgi?id=41792
Implement the SpinLock with InterlockedExchange from the Windows API.
* wtf/TCSpinLock.h:
(TCMalloc_SpinLock::Lock):
(TCMalloc_SpinLock::Unlock):
(TCMalloc_SpinLock::IsHeld):
(TCMalloc_SpinLock::Init):
(TCMalloc_SlowLock):
2010-07-22 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed rolling out r63947 and r63948, because they broke Qt Windows build.
* jit/JITStubs.cpp:
* jit/JITStubs.h:
2010-07-22 Gavin Barraclough <barraclough@apple.com>
Eeeep! r63947 hosed all non-x86 builds!
* jit/JITStubs.h:
2010-07-22 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 42818 - [Qt] REGRESSION(63348): jsc is broken
Speculative fix, need fastcall conventions on Qt/Win.
* jit/JITStubs.cpp:
* jit/JITStubs.h:
2010-07-22 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Do more constant folding
https://bugs.webkit.org/show_bug.cgi?id=42867
Constant fold a few more operations. SunSpider says this is
a win but I suspect that's just code motion at play.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeModNode):
(JSC::ASTBuilder::makeURightShiftNode):
(JSC::ASTBuilder::makeBitOrNode):
(JSC::ASTBuilder::makeBitAndNode):
(JSC::ASTBuilder::makeBitXOrNode):
(JSC::ASTBuilder::makeBinaryNode):
2010-07-22 Kent Hansen <kent.hansen@nokia.com>
Reviewed by Kent Tamura.
Error properties of the Global Object are missing the DontEnum attribute
https://bugs.webkit.org/show_bug.cgi?id=28771
Add the attributes to become spec compliant.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
2010-07-20 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
WebKit on Windows should build optionally with an unversioned ICU DLL
https://bugs.webkit.org/show_bug.cgi?id=42722
<rdar://problem/8211743> JavaScriptCore needs to link against unversioned ICU
Dynamically create a new header, ICUVersion.h, as part of build-generated-files.sh.
Header contains a preprocessor define (U_DISABLE_RENAMING) indicating to ICU whether the ICU API
should be namespaced with the current ICU version number. Proper value is determined
by checking for the presence of libicuuc.lib, the unversioned copy of ICU.
To get the proper value for U_DISABLE_RENAMING into all source files, we force
the include of ICUVersion.h (our generated header) via the compiler options.
Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib)
we copy the ICU lib to an intermediate location under obj with a common name. This
allows us to link properly with either without adding a new build configuration.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
Copy ICU libs into a common location with a common name.
Add additional library search path to pick up icu lib.
Change ICU library filename specified to linker.
Add forced include of ICUVersion.h.
* JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Generate ICUVersion.h
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Add forced include of ICUVersion.h.
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
Copy ICU libs into a common location with a common name.
Add additional library search path to pick up icu lib.
Change ICU library filename specified to linker.
Add forced include of ICUVersion.h.
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
Copy ICU libs into a common location with a common name.
Add additional library search path to pick up icu lib.
Change ICU library filename specified to linker.
Add forced include of ICUVersion.h.
2010-07-20 Steve Falkenburg <sfalken@apple.com>
Re-save vsprops files after no-op edits in Visual Studio
to fix manual edit issues.
2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
Reviewed by Steve Block.
Need to be able to configure Geolocation policy regarding user permissions
https://bugs.webkit.org/show_bug.cgi?id=42068
If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
by default
* wtf/Platform.h:
2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r63742.
http://trac.webkit.org/changeset/63742
https://bugs.webkit.org/show_bug.cgi?id=42641
Broke Leopard Intel build. (Requested by bbandix on #webkit).
* wtf/Platform.h:
2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
Reviewed by Steve Block.
Need to be able to configure Geolocation policy regarding user permissions
https://bugs.webkit.org/show_bug.cgi?id=42068
If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
by default
* wtf/Platform.h:
2010-07-19 Dirk Schulze <krit@webkit.org>
Reviewed by Nikolas Zimmermann.
SVG CleanUp of SVGPathData parsing
https://bugs.webkit.org/show_bug.cgi?id=41410
Added piOverTwo to MathExtras.
* wtf/MathExtras.h:
2010-07-19 Mike Moretti <mike.moretti@nokia.com>
Reviewed by Laszlo Gombos.
[Symbian] Build fix after r63404.
Implement isValid() function for the Symbian executable allocator.
* jit/ExecutableAllocatorSymbian.cpp:
(JSC::ExecutableAllocator::isValid):
2010-07-19 Chris Marrin <cmarrin@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=42118
Disable WebGL on Leopard for now.
LayoutTests fail on some graphics hardware on Leopard because one of the features we use,
GL_ARB_framebuffer_object, is not universally available in Leopard like it is in
SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a
software OpenGL driver on machines without this support.
* Configurations/FeatureDefines.xcconfig:
2010-07-16 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Use OwnPtr for CodeBlock objects
https://bugs.webkit.org/show_bug.cgi?id=42490
* runtime/Executable.cpp:
(JSC::EvalExecutable::EvalExecutable): Moved this here and made it non-inline.
Eliminated the code that used to initialize the raw pointer since it's now
an OwnPtr.
(JSC::EvalExecutable::~EvalExecutable): Removed the explicit delete here.
(JSC::ProgramExecutable::ProgramExecutable): Ditto.
(JSC::ProgramExecutable::~ProgramExecutable): Ditto.
(JSC::FunctionExecutable::FunctionExecutable): Ditto.
(JSC::FunctionExecutable::~FunctionExecutable): Ditto.
(JSC::EvalExecutable::compileInternal): Added use of adoptPtr and get.
(JSC::ProgramExecutable::compileInternal): Ditto.
(JSC::FunctionExecutable::compileForCallInternal): Ditto.
(JSC::FunctionExecutable::compileForConstructInternal): Ditto.
(JSC::FunctionExecutable::recompile): Use clear instead of delete followed
by assignment of 0.
* runtime/Executable.h: Moved constructors to the cpp file and changed
raw pointers to OwnPtr.
2010-07-19 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Kenneth Rohde Christiansen.
[EFL] Fix build on 64-bit systems. According to
JavaScriptCore/wtf/Platform.h, x86_64 uses fixed allocator, which
needs jit/ExecutableAllocatorFixedVMPool.cpp to be included in build
system.
https://bugs.webkit.org/show_bug.cgi?id=42559
* CMakeListsEfl.txt: add missing file for x86_64.
2010-07-16 Leandro Pereira <leandro@profusion.mobi>
[EFL] Unreviewed build system cleanup.
Move ExecutableAllocator{FixedVMPool,Posix,Symbian,Win}.cpp from
root CMakeLists.txt to the platform CMakeLists.txt.
* CMakeLists.txt:
* CMakeListsEfl.txt: Add ExecutableAllocatorPosix.cpp.
2010-07-16 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
ES5 allows use of reserved words as IdentifierName
https://bugs.webkit.org/show_bug.cgi?id=42471
Modify the lexer to allow us to avoid identifying reserved
words in those contexts where they are valid identifiers, and
we know it's safe. Additionally tag the reserved word tokens
so we can easily identify them in those cases where we can't
guarantee that we've skipped reserved word identification.
* parser/JSParser.cpp:
(JSC::JSParser::next):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseMemberExpression):
* parser/JSParser.h:
(JSC::):
* parser/Lexer.cpp:
(JSC::Lexer::lex):
* parser/Lexer.h:
(JSC::Lexer::):
2010-07-16 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
clang++ build fixes for JavaScriptCore and WebCore
https://bugs.webkit.org/show_bug.cgi?id=42478
* runtime/RegExpKey.h:
(JSC::operator==):
Move the RegExpKey equals operator into the JSC namespace so it can be found by ADL.
2010-07-16 Anders Carlsson <andersca@apple.com>
Reviewed by David Levin.
Really add WARN_UNUSED_RESULT to leakRef
https://bugs.webkit.org/show_bug.cgi?id=42464
* wtf/PassRefPtr.h:
(WTF::PassRefPtr::):
(WTF::NonNullPassRefPtr::):
Put the WARN_UNUSED_RESULT attribute at the right place.
* wtf/RetainPtr.h:
(WTF::RetainPtr::releaseRef):
Remove WARN_UNUSED_RESULT here for now, it leads to two warnings that need
to be fixed first.
2010-07-15 Victor Wang <victorw@chromium.org>
Reviewed by David Levin.
[Chromium] Disable c4291 for chromium windows multi dll build.
https://bugs.webkit.org/show_bug.cgi?id=42177
* JavaScriptCore.gyp/JavaScriptCore.gyp:
2010-07-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
Crash entering mail.yahoo.com
https://bugs.webkit.org/show_bug.cgi?id=42394
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::argumentNumberFor): Added a NULL check. If the
identifier we're resolving is not a local variable, registerFor returns
NULL.
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionBodyNode::emitBytecode): Unrelated to the crash, but I
noticed this while working on it: No need to NULL-check returnNode,
since an early return has already done so.
2010-07-15 Martin Robinson <mrobinson@igalia.com>
Reviewed by Oliver Hunt.
[GTK] Simplify the distribution step
https://bugs.webkit.org/show_bug.cgi?id=42414
* GNUmakefile.am: Add extra dist files directly to EXTRA_DIST instead
of adding them by proxy via javascriptcore_dist. Sort the EXTRA_DIST list.
Refer to create_hash_table and create_regexp_tables directly, as is the
behavior with other code generation scripts.
2010-07-15 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Fix dumping of op_put_by_id.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printPutByIdOp):
2010-07-15 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Refactoring some parts of the lexer
https://bugs.webkit.org/show_bug.cgi?id=41845
This patch is a precursor of refactoring the identifier
parsing, which currently slows down the lexer, and not
ready for landing. This patch contains those sources,
which does not slow down the lexer (mainly style changes).
SunSpider: no change (529.4ms to 528.7ms)
--parse-only: no change (31.0ms to 31.2ms)
* parser/Lexer.cpp:
(JSC::isIdentStart): using typesOfASCIICharacters to determine
whether the current character is in identifier start
(JSC::isIdentPart): using typesOfASCIICharacters to determine
whether the current character is in identifier part
(JSC::Lexer::parseString): style fix
(JSC::Lexer::lex): removing the else after the main which
which reduces code duplication
2010-07-15 Mark Rowe <mrowe@apple.com>
Update the sorting in the Xcode project files.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-07-14 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Make sure that mixed interpreter/jit builds don't try to use the jit if the allocator fails
https://bugs.webkit.org/show_bug.cgi?id=42310
Add some null checks to deal with the Fixed VM allocator failing
to get the requested executable region, delay the creation of the
JITStubs in JSGlobalData until after we know whether we're using
the JIT.
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::ExecutableAllocator):
(JSC::ExecutableAllocator::poolForSize):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::ExecutableAllocator::isValid):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* jit/ExecutableAllocatorPosix.cpp:
(JSC::ExecutableAllocator::isValid):
* jit/ExecutableAllocatorWin.cpp:
(JSC::ExecutableAllocator::isValid):
* jit/JIT.cpp:
(JSC::JIT::linkCall):
(JSC::JIT::linkConstruct):
* jit/JIT.h:
(JSC::JIT::compileCTIMachineTrampolines):
(JSC::JIT::compileCTINativeCall):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITCall.cpp:
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITStubs.cpp:
(JSC::JITThunks::JITThunks):
(JSC::JITThunks::tryCacheGetByID):
(JSC::JITThunks::hostFunctionStub):
* jit/ThunkGenerators.cpp:
(JSC::charCodeAtThunkGenerator):
(JSC::charAtThunkGenerator):
(JSC::fromCharCodeThunkGenerator):
(JSC::sqrtThunkGenerator):
(JSC::powThunkGenerator):
* runtime/Executable.h:
(JSC::NativeExecutable::create):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::getHostFunction):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::getCTIStub):
* yarr/RegexJIT.cpp:
(JSC::Yarr::jitCompileRegex):
2010-07-14 Gavin Barraclough <barraclough@apple.com>
Speculative Qt/Windows build fix.
* jit/JITStubs.h:
2010-07-14 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=42280
JIT_STUB_ARGUMENT_VA_LIST is only slowing us down! Remove it!
* jit/JIT.h:
* jit/JITInlineMethods.h:
(JSC::JIT::restoreArgumentReferenceForTrampoline):
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* wtf/Platform.h:
2010-07-14 Oliver Hunt <oliver@apple.com>
RS=Geoff Garen.
Guard the CF path of interpreter vs. jit selection with PLATFORM(CF)
This allows the code to work on windows as well. Also unifies the
environment variable with the preference name.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
2010-07-14 Oliver Hunt <oliver@apple.com>
Reviewed by Don Melton.
Crash when trying to enable JIT and Interpreter in a single build.
CFPreferences code added at the last minute failed to account for
the preference not being present and then attempted to CFRelease
a null value.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
2010-07-14 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Change indentations in the lexer
https://bugs.webkit.org/show_bug.cgi?id=41845
This patch fixes an old, indentation error comes from kjs,
as webkit has a different style rule for switches, and change
the indentation of the main switch, which is a temporary
style error. This change makes easier to see the behavioural
changes in the follow-up patch.
No behavioural changes.
* parser/Lexer.cpp:
(JSC::singleEscape):
(JSC::Lexer::lex):
2010-07-13 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r63262.
http://trac.webkit.org/changeset/63262
https://bugs.webkit.org/show_bug.cgi?id=42229
broke Windows compile (Requested by bweinstein on #webkit).
* API/tests/testapi.c:
(assertEqualsAsCharactersPtr):
(main):
* testapi.pro: Removed.
2010-07-13 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
ES5 requires BOMs to be treated as whitespace
https://bugs.webkit.org/show_bug.cgi?id=42218
Add BOM character to the Lexer's definition of whitespace,
and remove the logic that dealt with stripping BOMs and
caching the cleaned string.
* parser/Lexer.h:
(JSC::Lexer::isWhiteSpace):
* parser/SourceProvider.h:
(JSC::UStringSourceProvider::create):
(JSC::UStringSourceProvider::UStringSourceProvider):
* wtf/text/StringImpl.h:
2010-07-13 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Darin Adler.
Avoid slow-path for put() in Array.splice()
https://bugs.webkit.org/show_bug.cgi?id=41920
Defer creation of the returned array until its final size is known
to avoid growing it while adding elements.
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray): Add two modes of creation, CreateInitialized (old)
and CreateCompact (which should only be used when constructing arrays whose
size and contents are known at the time of creation.)
(JSC::JSArray::setLength): Skip first consistency check if in CreateCompact
initialization mode. (Only applies to non-empty arrays.)
(JSC::JSArray::checkConsistency): Build fix (JSValue::type() is gone)
* runtime/JSArray.h:
(JSC::JSArray::uncheckedSetIndex): Added for fast initialization of compact
arrays. Does no bounds or other sanity checking.
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice): Optimized creation of the returned JSArray.
* runtime/ArrayConstructor.cpp:
(JSC::constructArrayWithSizeQuirk): Pass CreateInitialized to ctor.
* runtime/JSGlobalObject.h:
(JSC::constructEmptyArray): Pass CreateInitialized to ctor.
* runtime/RegExpConstructor.cpp:
(JSC::RegExpMatchesArray::RegExpMatchesArray): Pass CreateInitialized to ctor.
2010-07-13 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 42207 - Clean up interface to compile executables, always check for exceptions
Presently interface to compile executable is inconsistent between eval/program and
function code, and is error prone in allowing a caller to byte compile without JIT
compiling an executable (we rely on all executables with codeblocks having JIT code).
Unify on an interface where all compilation is performed by a single compile (with
ForCall|ForConstruct variants) method, and make all clients check for errors.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* parser/Parser.h:
(JSC::Parser::isFunctionBodyNode):
(JSC::Parser::parse):
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/ExceptionHelpers.cpp:
(JSC::createStackOverflowError):
* runtime/ExceptionHelpers.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::checkSyntax):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
(JSC::FunctionExecutable::fromGlobalCode):
* runtime/Executable.h:
(JSC::EvalExecutable::compile):
(JSC::EvalExecutable::generatedBytecode):
(JSC::EvalExecutable::generatedJITCode):
(JSC::ProgramExecutable::compile):
(JSC::ProgramExecutable::generatedBytecode):
(JSC::ProgramExecutable::generatedJITCode):
(JSC::FunctionExecutable::generatedBytecode):
(JSC::FunctionExecutable::compileForCall):
(JSC::FunctionExecutable::compileForConstruct):
(JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
* runtime/JSActivation.cpp:
(JSC::JSActivation::argumentsGetter):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::canUseJIT):
2010-07-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Oliver Hunt.
testapi.c depends on the Core Foundation.
https://bugs.webkit.org/show_bug.cgi?id=40058
Separate CoreFoundation specific tests in JSC's testapi.c. Enabling it
to compile in Qt environments.
All tests should work except for the JSStringCreateWithCharacters() function,
because its tests depend on Core Foundation specific functions.
* API/tests/testapi.c:
(testJSStringRefCF): moved CoreFoundation specific tests to this function.
(main): The moves plus some minor tweaks.
* testapi.pro: Added.
2010-07-13 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 42182 - Change how numeric compare functions are detected
There are three problems with the current mechanism:
* It requires that a function executable be bytecode compiled without
being JIT generated (in order to copy the bytecode from the numeric
compare function). This is a problem since we have an invariant when
running with the JIT that functions are never bytecode compiled without
also being JIT generated (after checking the codeblock we assume the
function has JIT code). To help maintain this invariant
* This implementation will prevent us from experimenting with alternate
compilation paths which do not compile via bytecode.
* It doesn't work. Functions passing more than two arguments will match
if they are comparing their last two arguments, not the first two.
Generally the mapping back from bytecode to semantics may be more
complex then initially expected.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::setIsNumericCompareFunction):
(JSC::BytecodeGenerator::argumentNumberFor):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::BlockNode::singleStatement):
(JSC::FunctionBodyNode::emitBytecode):
* parser/Nodes.h:
(JSC::ExpressionNode::isSubtract):
(JSC::BinaryOpNode::lhs):
(JSC::BinaryOpNode::rhs):
(JSC::SubNode::isSubtract):
(JSC::ReturnNode::value):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
2010-07-12 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
REGRESSION: Crash at JSC::JIT::privateCompile(JSC::MacroAssemblerCodePtr*)
https://bugs.webkit.org/show_bug.cgi?id=41763
There are two parts to this patch, the first is to fix the actual
problem. When calling copyStringWithoutBOMs on a string we know
to contain BOMs we return a value indicating that there are no
BOMs.
The second part of this fix is simply to harden the path that
led to a crash when parsing failed.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
Harden compilation stubs against parser failure.
* parser/Lexer.cpp:
(JSC::Lexer::sourceCode):
Add assertions to ensure that subranges into a source provider
are always actually braces. Hopefully this should catch similar
failures in future. These assertions fire on existing tests
without this fix.
* runtime/Executable.h:
(JSC::FunctionExecutable::tryJitCodeForCall):
(JSC::FunctionExecutable::tryJitCodeForConstruct):
* wtf/text/StringImpl.h:
(WebCore::StringImpl::copyStringWithoutBOMs):
Make copyStringWithBOMs do the right thing.
2010-07-13 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Fix the constant encoding in data transfer instructions on ARM
https://bugs.webkit.org/show_bug.cgi?id=42166
The getImm function is designed to produce modified immediate constant
for data processing instructions. It should not be used to encode
any constant for data transfer. In the current situation there is no
way to use any immediate constant for data transfer. So, the moveImm
function is the desired method to pass the offset value to the data
transfer instructions.
Reported by Jacob Bramley.
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::dataTransfer32):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::call32):
2010-07-09 Darin Adler <darin@apple.com>
Reviewed by Geoffrey Garen.
String to number coercion is not spec compliant
https://bugs.webkit.org/show_bug.cgi?id=31349
ToNumber should ignore NBSP (\u00a0)
https://bugs.webkit.org/show_bug.cgi?id=25490
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::parseIntOverflow): Added a version that works on UChar.
* runtime/JSGlobalObjectFunctions.h: Ditto.
* runtime/UString.cpp:
(JSC::isInfinity): Added helper functions.
(JSC::UString::toDouble): Use isStrWhiteSpace instead of
isSASCIISpace to define what we should skip. Got rid of the
code that used CString and UTF8String, instead processing the
UChar of the string directly, except for when we call strtod.
For strtod, use our own home-grown conversion function that
does not try to do any UTF-16 processing. Tidied up the logic
a bit as well.
2010-07-12 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] make dist is broken because of missing headers and other miscellaneous reasons
https://bugs.webkit.org/show_bug.cgi?id=42107
* GNUmakefile.am: Add missing header to the sources list.
2010-07-12 Adam Roben <aroben@apple.com>
Stop generating stripped symbols for Release builds
It turns out we can strip the symbols after-the-fact using PDBCopy.
Fixes <http://webkit.org/b/42085>.
Reviewed by Steve Falkenburg.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
Removed the pre-link event, which just created the public\sym
directory.
2010-07-12 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Add WARN_UNUSED_RETURN to the smart pointer "leak" member functions
https://bugs.webkit.org/show_bug.cgi?id=42086
* wtf/OwnPtr.h:
* wtf/PassOwnPtr.h:
* wtf/PassRefPtr.h:
(WTF::PassRefPtr::releaseRef):
(WTF::NonNullPassRefPtr::leakRef):
(WTF::NonNullPassRefPtr::releaseRef):
* wtf/RetainPtr.h:
(WTF::RetainPtr::releaseRef):
2010-07-10 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
HAVE_COMPUTED_GOTO is dependent on the interpreter being enabled
https://bugs.webkit.org/show_bug.cgi?id=42039
Separate the existence of computed goto support in the compiler
from whether or not we are using the interpreter. All the current
HAVE(COMPUTED_GOTO) guards are for the interpreter, but I'd like
the option of using it elsewhere. The interpreter now uses
ENABLE(COMPUTED_GOTO_INTERPRETER)
* bytecode/Instruction.h:
(JSC::Instruction::Instruction):
* bytecode/Opcode.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::Interpreter):
(JSC::Interpreter::isOpcode):
(JSC::Interpreter::privateExecute):
* interpreter/Interpreter.h:
(JSC::Interpreter::getOpcode):
(JSC::Interpreter::getOpcodeID):
* wtf/Platform.h:
2010-07-10 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove switches from inner expression loops in the parser
https://bugs.webkit.org/show_bug.cgi?id=42035
Use bitmasks and flags on the token types to identify unary and
binary operators, rather than switching on the token type to
identify them.
* parser/JSParser.cpp:
(JSC::isUnaryOp):
(JSC::JSParser::isBinaryOperator):
* parser/JSParser.h:
(JSC::):
2010-07-09 Leon Clarke <leonclarke@google.com>
Reviewed by Adam Barth.
add support for link prefetching
https://bugs.webkit.org/show_bug.cgi?id=3652
* Configurations/FeatureDefines.xcconfig:
2010-07-09 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
Tidy up lexer token ids
https://bugs.webkit.org/show_bug.cgi?id=42014
Stop using character literals to identify single character tokens
and instead use symbolic names for all tokens.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeBinaryNode):
* parser/JSParser.cpp:
(JSC::JSParser::consume):
(JSC::JSParser::match):
(JSC::JSParser::autoSemiColon):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::allowAutomaticSemicolon):
(JSC::JSParser::parseDoWhileStatement):
(JSC::JSParser::parseWhileStatement):
(JSC::JSParser::parseVarDeclarationList):
(JSC::JSParser::parseConstDeclarationList):
(JSC::JSParser::parseForStatement):
(JSC::JSParser::parseReturnStatement):
(JSC::JSParser::parseWithStatement):
(JSC::JSParser::parseSwitchStatement):
(JSC::JSParser::parseSwitchClauses):
(JSC::JSParser::parseSwitchDefaultClause):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseDebuggerStatement):
(JSC::JSParser::parseStatement):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseExpressionOrLabelStatement):
(JSC::JSParser::parseIfStatement):
(JSC::JSParser::parseExpression):
(JSC::JSParser::parseAssignmentExpression):
(JSC::JSParser::parseConditionalExpression):
(JSC::isUnaryOp):
(JSC::JSParser::isBinaryOperator):
(JSC::JSParser::parseBinaryExpression):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseObjectLiteral):
(JSC::JSParser::parseStrictObjectLiteral):
(JSC::JSParser::parseArrayLiteral):
(JSC::JSParser::parsePrimaryExpression):
(JSC::JSParser::parseArguments):
(JSC::JSParser::parseMemberExpression):
(JSC::JSParser::parseUnaryExpression):
* parser/JSParser.h:
(JSC::):
* parser/Lexer.cpp:
(JSC::):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-07-09 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 42015 - Enable JSValue32_64 on ARMv7
* Configurations/JavaScriptCore.xcconfig:
* jit/JIT.h:
* jit/JITStubs.cpp:
* wtf/Platform.h:
2010-07-09 Kenneth Russell <kbr@google.com>
Reviewed by Dimitri Glazkov.
Assertion failure in String::utf8() for certain invalid UTF16 inputs
https://bugs.webkit.org/show_bug.cgi?id=41983
* wtf/text/WTFString.cpp:
(WebCore::String::utf8):
- Fixed assertion when sourceExhausted is returned from convertUTF16ToUTF8.
2010-07-09 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Remove a couple of excess writes from the lexer
https://bugs.webkit.org/show_bug.cgi?id=41981
Remove a couple of fields from JSTokenInfo, and rename the remaining ones
to something more accurate
* parser/JSParser.cpp:
(JSC::JSParser::next):
(JSC::JSParser::tokenStart):
(JSC::JSParser::tokenLine):
(JSC::JSParser::tokenEnd):
* parser/JSParser.h:
(JSC::JSTokenInfo::JSTokenInfo):
* parser/Lexer.cpp:
(JSC::Lexer::lex):
2010-07-08 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Property declarations in an object literal should not consider the prototype chain when being added to the new object
https://bugs.webkit.org/show_bug.cgi?id=41929
To fix this all we need to do is ensure that all new properties are
added with putDirect rather than a fully generic call to put. This
is safe as an object literal is by definition going to produce a
completely normal object.
Rather than duplicating all the put_by_id logic we add an additional
flag to op_put_by_id to indicate it should be using putDirect. In
the interpreter this adds a runtime branch, but in the jit this is
essentially free as the branch is taken at compile time. This does
actually improve object literal creation time even in the interpreter
as we no longer need to walk the prototype chain to verify that the
cached put is safe.
We still emit normal put_by_id code when emitting __proto__ as we want
to get the correct handling for changing the prototype.
Sunspider claims this is a 0.7% speedup which is conceivably real due
to the performance improvement in object literals, but I suspect its
really just the result of code motion.
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitPutById):
(JSC::BytecodeGenerator::emitDirectPutById):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::PropertyListNode::emitBytecode):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.h:
(JSC::JIT::compilePutByIdTransition):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::patchPutByIdReplace):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::patchPutByIdReplace):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCachePutByID):
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
(JSC::):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSObject.h:
(JSC::JSObject::putDirect):
(JSC::JSValue::putDirect):
* runtime/JSValue.h:
2010-07-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
String.prototype methods should CheckObjectCoercible (test this is not null or undefined).
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncConcat):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplit):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncLocaleCompare):
(JSC::trimString):
2010-07-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Date.prototype.toJSON takes one argument, report this correctly.
* runtime/DatePrototype.cpp:
2010-07-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
RegExp's prototype should be an object of type RegExp.
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::RegExpPrototype):
* runtime/RegExpPrototype.h:
2010-07-08 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
JavaScript parser violates ECMA automatic semicolon insertion rule
https://bugs.webkit.org/show_bug.cgi?id=41844
Remove (very) old and bogus logic that automatically inserted a semicolon
at the end of a script's source.
* parser/Lexer.cpp:
(JSC::Lexer::lex):
2010-07-08 Oliver Hunt <oliver@apple.com>
Reviewed by Anders Carlson.
Tidy up the lexer
Remove some of the old yacc/lex-isms still present in the lexer
* parser/JSParser.h:
(JSC::):
* parser/Lexer.cpp:
(JSC::Lexer::parseString):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-07-08 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Make object-literal parsing conformant with the spec.
https://bugs.webkit.org/show_bug.cgi?id=41892
Bring our parsing of object literals into conformance with the ES5 spec.
Basically disallow conflicting accessor vs. normal property definitions
The bulk of this patch is just fiddling to maintain performance.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createGetterOrSetterProperty):
(JSC::ASTBuilder::createProperty):
(JSC::ASTBuilder::getName):
(JSC::ASTBuilder::getType):
* parser/JSParser.cpp:
(JSC::jsParse):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseObjectLiteral):
(JSC::JSParser::parseStrictObjectLiteral):
* parser/JSParser.h:
* parser/Lexer.cpp:
(JSC::Lexer::clear):
* parser/Lexer.h:
(JSC::Lexer::currentOffset):
(JSC::Lexer::setOffset):
Add logic to allow us to roll the lexer back in the input stream.
* parser/Nodes.h:
(JSC::PropertyNode::):
(JSC::PropertyNode::type):
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/SourceProvider.h:
(JSC::SourceProvider::SourceProvider):
(JSC::SourceProvider::isValid):
(JSC::SourceProvider::setValid):
SourceProvider now records whether the input text
has already been validated.
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::SyntaxChecker):
(JSC::SyntaxChecker::Property::Property):
(JSC::SyntaxChecker::Property::operator!):
(JSC::SyntaxChecker::createProperty):
(JSC::SyntaxChecker::createPropertyList):
(JSC::SyntaxChecker::createGetterOrSetterProperty):
The SyntaxChecker mode now needs to maintain a bit more information
to ensure that we can validate object literals correctly.
2010-07-08 Darin Adler <darin@apple.com>
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::sharedInstance): Fix typo.
2010-07-08 Darin Adler <darin@apple.com>
Reviewed by Oliver Hunt.
Fix assertion seen on the Leopard buildbot.
The single shared instance of JSGlobalData was not being
adopted after creation.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::sharedInstance): Do adoptRef and then leakRef.
2010-07-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
BOMs are whitespace.
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::isStrWhiteSpace):
2010-07-08 Martin Robinson <mrobinson@igalia.com>
Unreviewed.
Try fix the GTK+ build by touching this file.
* jit/ExecutableAllocatorFixedVMPool.cpp:
2010-07-08 Gavin Barraclough <barraclough@apple.com>
GTK build fix take two.
* GNUmakefile.am:
2010-07-08 Gavin Barraclough <barraclough@apple.com>
GTK build fix.
* GNUmakefile.am:
2010-07-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=41641
Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
other than x86-64 (this may be useful on 32-bit platforms, too).
Simplify ifdefs by dividing into thwo broad allocation strategies
(ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
Rename constant used in the code to have names descriptive of their purpose,
rather than their specific value on a given platform.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::reprotectRegion):
(JSC::ExecutableAllocator::cacheFlush):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::free):
(JSC::ExecutablePool::systemAlloc):
* jit/ExecutableAllocatorPosix.cpp:
* jit/ExecutableAllocatorSymbian.cpp:
* jit/ExecutableAllocatorWin.cpp:
* wtf/Platform.h:
2010-07-08 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
Silence a few noisy build rules.
* GNUmakefile.am:
2010-07-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r62765.
http://trac.webkit.org/changeset/62765
https://bugs.webkit.org/show_bug.cgi?id=41840
All jscore and layout tests crash on Qt bot (Requested by Ossy
on #webkit).
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger):
(WTF::TCMalloc_PageHeap::signalScavenger):
(WTF::TCMalloc_PageHeap::scavengerThread):
2010-07-08 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Oliver Hunt.
Interpreter: Crash in op_load_varargs on 64-bit
https://bugs.webkit.org/show_bug.cgi?id=41795
Added missing cast of argCount to int32_t in op_load_varargs.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-07-08 Patrick Gansterer <paroga@paroga.com>
Reviewed by Geoffrey Garen.
Make FastMalloc more portable.
https://bugs.webkit.org/show_bug.cgi?id=41790
Use WTF::Mutex instead of pthread_mutex_t and
replace pthread_cond_t with WTF::ThreadCondition.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger):
(WTF::TCMalloc_PageHeap::signalScavenger):
(WTF::TCMalloc_PageHeap::scavengerThread):
2010-07-08 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
Remove needless #include <fcntl.h> from TCSystemAlloc.cpp.
https://bugs.webkit.org/show_bug.cgi?id=41777
* wtf/TCSystemAlloc.cpp:
2010-07-07 Darin Adler <darin@apple.com>
Fixed build in configurations like PowerPC.
* runtime/RegExpConstructor.cpp: Added include of PassOwnPtr.h.
* runtime/RegExpObject.cpp: Ditto.
* wtf/SizeLimits.cpp: Changed compile time assertion to work
even on platforms where two bool members do not end up taking
the same size as one int member!
2010-07-07 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Lazy mode of parser allows invalid syntax in object literals.
https://bugs.webkit.org/show_bug.cgi?id=41809
Make the parser itself validate getter and setter syntax rather
than offloading it to the AST builder.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createGetterOrSetterProperty):
* parser/JSParser.cpp:
(JSC::JSParser::parseProperty):
2010-07-07 Dumitru Daniliuc <dumi@chromium.org>
Reviewed by Adam Roben.
Revert r62689.
https://bugs.webkit.org/show_bug.cgi?id=41804
* runtime/Collector.cpp:
(JSC::Heap::freeBlocks):
2010-07-07 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
Add reverseFind to Vector and deploy in HTML5 parser
https://bugs.webkit.org/show_bug.cgi?id=41778
This method seems generally useful. I'm slightly surprised we don't
have it already.
* wtf/Vector.h:
(WTF::::reverseFind):
2010-07-07 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
Turn on adoptRef assertion for RefCounted
https://bugs.webkit.org/show_bug.cgi?id=41547
* wtf/CrossThreadRefCounted.h: Fixed include style. Includes of other
WTF headers should use "" includes; consistent in most WTF headers.
Added a call to relaxAdoptionRequirement.
* wtf/RefCounted.h: Fixed include style. Removed LOOSE_REF_COUNTED.
Added relaxAdoptionRequirement.
2010-07-07 Anders Carlsson <andersca@apple.com>
Try to fix the Windows build.
* runtime/Collector.cpp:
(JSC::Heap::freeBlocks):
2010-07-07 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
More OwnPtr work
https://bugs.webkit.org/show_bug.cgi?id=41727
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty): Use adoptPtr.
* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject::JSCallbackObject): Ditto.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock): Ditto.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::createRareDataIfNecessary): Ditto.
* parser/Nodes.cpp:
(JSC::ScopeNode::ScopeNode): Ditto.
* parser/ParserArena.cpp:
(JSC::ParserArena::ParserArena): Ditto.
* runtime/Arguments.h:
(JSC::Arguments::Arguments): Ditto.
* runtime/Executable.cpp:
(JSC::EvalExecutable::compile): Ditto.
(JSC::ProgramExecutable::compile): Ditto.
(JSC::FunctionExecutable::compileForCall): Ditto.
(JSC::FunctionExecutable::compileForConstruct): Ditto.
(JSC::FunctionExecutable::reparseExceptionInfo): Ditto.
(JSC::EvalExecutable::reparseExceptionInfo): Ditto.
* runtime/JSArray.cpp:
(JSC::JSArray::sort): Ditto.
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor): Ditto.
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::RegExpObject): Ditto.
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::createSingleCharacterString): Ditto.
(JSC::SmallStrings::singleCharacterStringRep): Ditto.
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault): Use adoptPtr.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::ByteCompiler::ByteCompiler): Ditto.
(JSC::Yarr::ByteCompiler::compile): Ditto.
(JSC::Yarr::ByteCompiler::regexBegin): Ditto.
(JSC::Yarr::byteCompileRegex): Ditto.
* yarr/RegexInterpreter.h:
(JSC::Yarr::BytecodePattern::BytecodePattern): Ditto.
2010-07-07 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
Make clear set the pointer to 0 before deletion
https://bugs.webkit.org/show_bug.cgi?id=41727
* wtf/OwnArrayPtr.h: Changed code so we always set the pointer to its new
value before deleting the old one, including in the set function and the
clear function. This required changing safeDelete.
* wtf/OwnPtr.h: Ditto. Also removed some extra null checks.
* wtf/PassOwnPtr.h: Ditto.
* wtf/PassRefPtr.h: Changed code so we always set the pointer to its new
value before deref'ing the old one in the clear function. Also added a
leakRef function for NonNullPassRefPtr.
* wtf/RefPtr.h: Ditto.
* wtf/gobject/GOwnPtr.h: More of the same.
* wtf/gobject/GRefPtr.h: Ditto.
2010-07-07 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Oliver Hunt.
Refactored string parsing inside the lexer
https://bugs.webkit.org/show_bug.cgi?id=41606
Does not use goto. Although the last sunspider
parse-only tests yields 1.044x speedup, I think the
patch can have a slight improvement at most.
* parser/Lexer.cpp:
(JSC::singleEscape):
(JSC::Lexer::parseString):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-07-06 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Make it possible to have both the JIT and Interpreter available in a single build
https://bugs.webkit.org/show_bug.cgi?id=41722
Separate the concept of !ENABLE(JIT) and ENABLE(INTERPRETER) and make it possible
to have both JIT and INTERPRETER enabled at the same time. This doesn't add
support for mix mode execution, but it does allow a single build to contain all
the code needed to use either the interpreter or the jit.
If both ENABLE(INTERPRETER) and ENABLE(JIT) are true then setting the environment
variable JSC_FORCE_INTERPRETER will force JSC to use the interpreter.
This patch basically consists of replacing !ENABLE(JIT) with ENABLE(INTERPRETER),
or converting #if ENABLE(JIT) ... #else ... into #if ENABLE(JIT) ... #endif
#if ENABLE(INTERPRETER), etc. There are also a few functions that need to be
renamed to resolve return type ambiguity.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
* interpreter/CallFrame.h:
(JSC::ExecState::returnVPC):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::privateExecute):
(JSC::Interpreter::retrieveLastCaller):
* interpreter/Interpreter.h:
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/Executable.cpp:
(JSC::EvalExecutable::generateJITCode):
(JSC::ProgramExecutable::generateJITCode):
(JSC::FunctionExecutable::generateJITCodeForCall):
(JSC::FunctionExecutable::generateJITCodeForConstruct):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
* runtime/JSFunction.cpp:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::canUseJIT):
* wtf/Platform.h:
2010-07-06 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=41320
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary): Use assignment
instead of set since the result of reparseExceptionInfo is now a
PassOwnPtr.
* bytecode/CodeBlock.h: Change extractExceptionInfo to return a
PassOwnPtr instead of a raw pointer.
* runtime/Executable.cpp:
(JSC::FunctionExecutable::reparseExceptionInfo): Return a PassOwnPtr.
(JSC::EvalExecutable::reparseExceptionInfo): Ditto.
(JSC::ProgramExecutable::reparseExceptionInfo): Added. This was
in the header before, but it's better to not have it there to reduce
header dependencies. Return a PassOwnPtr.
* runtime/Executable.h: Made reparseExceptionInfo return a PassOwnPtr,
and put it in the private sections of classes other than the base class.
* wtf/MessageQueue.h:
(WTF::MessageQueue::append): Use leakPtr instead of release.
(WTF::MessageQueue::appendAndCheckEmpty): Ditto.
(WTF::MessageQueue::prepend): Ditto.
* wtf/OwnPtr.h: Tweaked formatting. Changed the release function to return
a PassOwnPtr rather than a raw pointer. Added a leakPtr function that
returns a raw pointer. Put the constructor that takes a raw pointer and
the set function into a section guarded by LOOSE_OWN_PTR. Adapted to the
new adoptPtr function from PassOwnPtr.h.
* wtf/PassOwnPtr.h: Tweaked formatting. Renamed the release function
to leakPtr. Added an adoptPtr function that creates a new PassOwnPtr.
Put the constructor and assignment operators that take a raw pointer
into a section guarded by LOOSE_PASS_OWN_PTR.
2010-07-06 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler
Update comment in StringExtras.h to be more accurate.
* wtf/StringExtras.h:
2010-07-06 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r62511.
http://trac.webkit.org/changeset/62511
https://bugs.webkit.org/show_bug.cgi?id=41686
Breaks Linux/64bit compilation (Requested by xan_ on #webkit).
* jit/ExecutableAllocator.cpp:
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::free):
(JSC::ExecutablePool::systemAlloc):
* jit/ExecutableAllocatorPosix.cpp:
(JSC::ExecutableAllocator::reprotectRegion):
(JSC::ExecutableAllocator::cacheFlush):
* jit/ExecutableAllocatorSymbian.cpp:
* jit/ExecutableAllocatorWin.cpp:
* wtf/Platform.h:
2010-07-05 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=41641
Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
other than x86-64 (this may be useful on 32-bit platforms, too).
Simplify ifdefs by dividing into thwo broad allocation strategies
(ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
Rename constant used in the code to have names descriptive of their purpose,
rather than their specific value on a given platform.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::reprotectRegion):
(JSC::ExecutableAllocator::cacheFlush):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::free):
(JSC::ExecutablePool::systemAlloc):
* jit/ExecutableAllocatorPosix.cpp:
* jit/ExecutableAllocatorSymbian.cpp:
* jit/ExecutableAllocatorWin.cpp:
* wtf/Platform.h:
2010-07-05 Steve Block <steveblock@google.com>
Reviewed by Darin Adler.
ThreadingPthreads.cpp should use JNIUtility.h on Android, not outdated jni_utility.h
https://bugs.webkit.org/show_bug.cgi?id=41594
* wtf/ThreadingPthreads.cpp:
2010-07-04 Mark Rowe <mrowe@apple.com>
Build fix after r62456.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute): Be slightly more consistent in using uint32_t to prevent
warnings about comparisons between signed and unsigned types, and attempts to call an overload
of std::min that doesn't exist.
2010-07-02 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Patch for https://bugs.webkit.org/show_bug.cgi?id=41553
Make StringExtras.h versions of snprintf and vsnprintf match the unix versions.
- MSVC does not ensure the buffers are null terminated as the unix versions do.
* runtime/JSGlobalObjectFunctions.cpp: Cleanup includes.
* runtime/UString.cpp: Clean up includes.
(JSC::UString::from): Don't pass sizeof(buf) - 1, that is wrong.
* wtf/StringExtras.h:
(snprintf): Ensure null termination of buffer.
(vsnprintf): Ditto.
2010-07-03 Yong Li <yoli@rim.com>
Reviewed by Darin Adler.
Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in
the interpreter as well as the JIT.
https://bugs.webkit.org/show_bug.cgi?id=41351
rdar://problem/8142141
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute): Fix signed integer overflow problem
in op_load_varargs handling. 0xFFFFFFFF was read as -1.
2010-06-26 Jeremy Orlow <jorlow@chromium.org>
Reviewed by Dumitru Daniliuc.
Support for keys and in-memory storage for IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=41252
Set the role to Private.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-07-02 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Move BOM handling out of the lexer and parser
https://bugs.webkit.org/show_bug.cgi?id=41539
Doing the BOM stripping in the lexer meant that we could
end up having to strip the BOMs from a source multiple times.
To deal with this we now require all strings provided by
a SourceProvider to already have had the BOMs stripped.
This also simplifies some of the lexer logic.
* parser/Lexer.cpp:
(JSC::Lexer::setCode):
(JSC::Lexer::sourceCode):
* parser/SourceProvider.h:
(JSC::SourceProvider::SourceProvider):
(JSC::UStringSourceProvider::create):
(JSC::UStringSourceProvider::getRange):
(JSC::UStringSourceProvider::UStringSourceProvider):
* wtf/text/StringImpl.h:
(WebCore::StringImpl::copyStringWithoutBOMs):
2010-07-03 Patrick Gansterer <paroga@paroga.com>
Reviewed by Kent Tamura.
[WINCE] Implement Unicode::isAlphanumeric and Unicode::isArabicChar.
https://bugs.webkit.org/show_bug.cgi?id=41411
* wtf/unicode/wince/UnicodeWince.cpp:
(WTF::Unicode::isAlphanumeric):
* wtf/unicode/wince/UnicodeWince.h:
(WTF::Unicode::isArabicChar):
2010-07-03 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Change the CRASH() macro to print "WebKit CRASH" log.
https://bugs.webkit.org/show_bug.cgi?id=41524
Print "WebKit CRASH" before crashing.
* wtf/Assertions.h:
2010-07-02 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 41565 - Repatching in ARMv7Assembler::repatchLoadPtrToLEA is broken
This method tried to repatch a LDR (T2) into an ADD (T3) - but it only
repatches the first instruction word. The layout of the fields in the
second word is different, and also needs repatching.
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::repatchLoadPtrToLEA):
2010-07-02 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Clamp the number of arguments supported by function.apply
https://bugs.webkit.org/show_bug.cgi?id=41351
<rdar://problem/8142141>
Add clamping logic to function.apply similar to that
enforced by firefox. We have a smaller clamp than
firefox as our calling convention means that stack
usage is proportional to argument count -- the firefox
limit is larger than you could actually call.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Arguments.h:
(JSC::Arguments::):
2010-07-02 Chao-ying Fu <fu@mips.com>
Reviewed by Oliver Hunt.
Re-enable JIT_OPTIMIZE_NATIVE_CALL on MIPS
https://bugs.webkit.org/show_bug.cgi?id=40179
Add the MIPS part to re-enable JIT_OPTIMIZE_NATIVE_CALL.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* wtf/Platform.h:
2010-07-02 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 41552 - Clean up ARMv7 vfp code generation
Emit separate opcode individually, remove magic numbers.
Also remove invalid assert from JSImmediate (number cells are not CELL_MASK aligned).
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::):
(JSC::ARMv7Assembler::vadd_F64):
(JSC::ARMv7Assembler::vcmp_F64):
(JSC::ARMv7Assembler::vcvt_F64_S32):
(JSC::ARMv7Assembler::vcvtr_S32_F64):
(JSC::ARMv7Assembler::vdiv_F64):
(JSC::ARMv7Assembler::vldr):
(JSC::ARMv7Assembler::vmov_F64_0):
(JSC::ARMv7Assembler::vmov):
(JSC::ARMv7Assembler::vmrs):
(JSC::ARMv7Assembler::vmul_F64):
(JSC::ARMv7Assembler::vstr):
(JSC::ARMv7Assembler::vsub_F64):
(JSC::ARMv7Assembler::VFPOperand::VFPOperand):
(JSC::ARMv7Assembler::VFPOperand::bits1):
(JSC::ARMv7Assembler::VFPOperand::bits4):
(JSC::ARMv7Assembler::vcvtOp):
(JSC::ARMv7Assembler::ARMInstructionFormatter::vfpOp):
(JSC::ARMv7Assembler::ARMInstructionFormatter::vfpMemOp):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::branchDouble):
* runtime/JSImmediate.h:
(JSC::JSValue::isCell):
2010-07-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r62410.
http://trac.webkit.org/changeset/62410
https://bugs.webkit.org/show_bug.cgi?id=41549
accursed last minute changes (Requested by olliej on #webkit).
* parser/Lexer.cpp:
(JSC::Lexer::setCode):
(JSC::Lexer::copyCodeWithoutBOMs):
(JSC::Lexer::sourceCode):
* parser/SourceProvider.h:
(JSC::):
(JSC::SourceProvider::SourceProvider):
(JSC::SourceProvider::hasBOMs):
(JSC::UStringSourceProvider::create):
(JSC::UStringSourceProvider::getRange):
(JSC::UStringSourceProvider::UStringSourceProvider):
* wtf/text/StringImpl.h:
2010-07-02 Sam Weinig <sam@webkit.org>
Reviewed by Geoffrey Garen.
Patch for https://bugs.webkit.org/show_bug.cgi?id=41548
Use snprintf instead of sprintf everywhere in JavaScriptCore
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::globalFuncEscape):
* runtime/UString.cpp:
(JSC::UString::from):
2010-07-02 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Move BOM handling out of the lexer and parser
https://bugs.webkit.org/show_bug.cgi?id=41539
Doing the BOM stripping in the lexer meant that we could
end up having to strip the BOMs from a source multiple times.
To deal with this we now require all strings provided by
a SourceProvider to already have had the BOMs stripped.
This also simplifies some of the lexer logic.
* parser/Lexer.cpp:
(JSC::Lexer::setCode):
(JSC::Lexer::sourceCode):
* parser/SourceProvider.h:
(JSC::SourceProvider::SourceProvider):
(JSC::UStringSourceProvider::create):
(JSC::UStringSourceProvider::getRange):
(JSC::UStringSourceProvider::UStringSourceProvider):
* wtf/text/StringImpl.h:
(WebCore::StringImpl::copyStringWithoutBOMs):
2010-07-02 Renata Hodovan <reni@inf.u-szeged.hu>
Reviewed by Oliver Hunt.
[ Updated after rollout. ]
Merged RegExp constructor and RegExp::create methods.
Both functions are called with three parameters and check whether
flags (the third param) is given or not.
Avoid extra hash lookups in RegExpCache::create by passing a pre-computed
iterator parameter.
https://bugs.webkit.org/show_bug.cgi?id=41055
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-07-02 Martin Robinson <mrobinson@igalia.com>
Unreviewed. Build fix for GTK+.
Build Lexer.lut.h with the rest of the .lut.h files. Later these should
all probably be moved to DerivedSources.
* GNUmakefile.am:
2010-06-23 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
[GTK] Separate DerivedSources per-project
https://bugs.webkit.org/show_bug.cgi?id=41109
Generate JavaScriptCore derived sources in <builddir>/DerivedSources/JavaScriptCore.
* GNUmakefile.am:
2010-07-02 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Oliver Hunt.
The alternativeFrameLocation value is wrong in the emitDisjunction function in
case of PatternTerm::TypeParentheticalAssertion. This value needs to be
computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc
memory corruption in some cases.
Layout test added for checking of TypeParentheticalAssertion case.
https://bugs.webkit.org/show_bug.cgi?id=41458
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::ByteCompiler::emitDisjunction):
2010-07-01 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Add a FixedArray template to encapsulate fixed length arrays
https://bugs.webkit.org/show_bug.cgi?id=41506
This new type is used in place of fixed length C arrays so
that debug builds can guard against attempts to go beyond
the end of the array.
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/Opcode.cpp:
(JSC::OpcodeStats::~OpcodeStats):
* pcre/pcre_compile.cpp:
(calculateCompiledPatternLength):
* runtime/Collector.cpp:
(JSC::Heap::allocateBlock):
(JSC::Heap::allocate):
* runtime/Collector.h:
(JSC::CollectorBitmap::clearAll):
* runtime/CollectorHeapIterator.h:
(JSC::CollectorHeapIterator::operator*):
* runtime/DateInstanceCache.h:
* runtime/JSString.cpp:
(JSC::JSString::replaceCharacter):
* runtime/JSString.h:
(JSC::RopeBuilder::JSStringFinalizerStruct::):
* runtime/NumericStrings.h:
* runtime/RegExpCache.h:
* runtime/SmallStrings.h:
(JSC::SmallStrings::singleCharacterStrings):
* wtf/AVLTree.h:
* wtf/FixedArray.h: Added.
(WTF::FixedArray::operator[]):
(WTF::FixedArray::data):
2010-07-01 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Oliver Hunt.
Improve the main lexer switch by mapping input characters to their type
https://bugs.webkit.org/show_bug.cgi?id=41459
Sunsipder: no change (from 532.9ms to 531.5ms)
SunSpider --parse-only: 1.025x as fast (from 33.1ms to 32.3ms)
* parser/Lexer.cpp:
(JSC::):
(JSC::Lexer::lex):
2010-07-01 Sam Weinig <sam@webkit.org>
Rubber-stamped by Ander Carlsson.
Define HAVE_HOSTED_CORE_ANIMATION on Snow Leopard.
* wtf/Platform.h:
2010-07-01 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 41490 - Add missing operations to MacroAssemblerARMv7
Also, make single, double, quad register numbers in ARMv7Assembler distinct & strongly typed.
* assembler/ARMv7Assembler.h:
(JSC::ARMRegisters::):
(JSC::ARMRegisters::asSingle):
(JSC::ARMRegisters::asDouble):
(JSC::VFPImmediate::VFPImmediate):
(JSC::VFPImmediate::isValid):
(JSC::VFPImmediate::value):
(JSC::ARMv7Assembler::singleRegisterMask):
(JSC::ARMv7Assembler::doubleRegisterMask):
(JSC::ARMv7Assembler::):
(JSC::ARMv7Assembler::add_S):
(JSC::ARMv7Assembler::neg):
(JSC::ARMv7Assembler::orr_S):
(JSC::ARMv7Assembler::sub):
(JSC::ARMv7Assembler::sub_S):
(JSC::ARMv7Assembler::vadd_F64):
(JSC::ARMv7Assembler::vcmp_F64):
(JSC::ARMv7Assembler::vcvt_F64_S32):
(JSC::ARMv7Assembler::vcvtr_S32_F64):
(JSC::ARMv7Assembler::vdiv_F64):
(JSC::ARMv7Assembler::vldr):
(JSC::ARMv7Assembler::vmov_F64_0):
(JSC::ARMv7Assembler::vmov):
(JSC::ARMv7Assembler::vmul_F64):
(JSC::ARMv7Assembler::vstr):
(JSC::ARMv7Assembler::vsub_F64):
(JSC::ARMv7Assembler::vcvt):
(JSC::ARMv7Assembler::vmem):
* assembler/AbstractMacroAssembler.h:
* assembler/MacroAssemblerARM.h:
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::fpTempRegisterAsSingle):
(JSC::MacroAssemblerARMv7::neg32):
(JSC::MacroAssemblerARMv7::loadDouble):
(JSC::MacroAssemblerARMv7::divDouble):
(JSC::MacroAssemblerARMv7::convertInt32ToDouble):
(JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32):
(JSC::MacroAssemblerARMv7::zeroDouble):
(JSC::MacroAssemblerARMv7::branchOr32):
(JSC::MacroAssemblerARMv7::set32):
(JSC::MacroAssemblerARMv7::set8):
* assembler/MacroAssemblerMIPS.h:
* assembler/MacroAssemblerX86Common.h:
2010-07-01 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Improve reentrancy logic in polymorphic cache stubs
<https://bugs.webkit.org/show_bug.cgi?id=41482>
<rdar://problem/8094380>
Make the polymorphic cache stubs handle reentrancy
better.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
(JSC::getPolymorphicAccessStructureListSlot):
2010-07-01 Antti Koivisto <koivisto@iki.fi>
Revert accidental commit.
* runtime/Collector.cpp:
(JSC::Heap::allocateBlock):
2010-06-30 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
Add assertion, off by default, for when you forget to do adoptRef
https://bugs.webkit.org/show_bug.cgi?id=41422
* wtf/PassRefPtr.h: Tweaked formatting. Added a new adopted
function, called on the pointer by adoptRef, with an empty inline
default version, meant to be overloaded. Unified the inlining
with a macro named REF_DEREF_INLINE to make it clearer what's
going on in the refIfNotNull/derefIfNotNull functions. Renamed
releaseRef to leakRef, but left the old name in for compatibility
for now.
* wtf/RefCounted.h: Added code to require adoption and assert if
you don't call adoptRef. For now, it is turned off because of the
LOOSE_REF_COUNTED define in this header. Later we can turn it on
once we get everything working without asserting.
2010-06-29 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
Bug 41238 - RegExp performance slow on Dromaeo benchmark
Other javascript engines appear to cache prior results of regular
expression operations.
Suggest adding some sort of caching mechanism to regular expression
processing.
Added a single entry cache of match() results to RegExp class.
Also added performance improvements to UString == operator.
First check the impls for equality. Then get the length of
each of the non-null impls. Next check the sizes for equality.
Then check the data for the case of different impls that point
to the same data (most likely due to substrings from the beginning of
another string). Lastly we check the underlying data for equality.
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::match):
* runtime/RegExp.h:
* runtime/UString.h:
(JSC::operator==):
2010-06-29 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
WTF::HashSet iterators are quasi-mutable. Changing the value through
dereferencing an iterator will not change the behavior of methods like
contains or find, but will change the behavior of iterating.
* wtf/HashSet.h:
(WTF::::begin):
(WTF::::end):
(WTF::::find):
(WTF::::remove):
* wtf/HashTable.h:
2010-06-29 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] Clean up the source lists in the GNUMakefile.am files
https://bugs.webkit.org/show_bug.cgi?id=41229
Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate
the source lists.
* GNUmakefile.am:
2010-06-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Fix QtScript build after QScriptValuePrivate ctor changes
https://bugs.webkit.org/show_bug.cgi?id=41307
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::prototype):
* qt/benchmarks/qscriptengine/qscriptengine.pro:
2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] QScriptEngine API should contain a newArray function
https://bugs.webkit.org/show_bug.cgi?id=39115
* qt/api/qscriptengine.cpp:
(QScriptEngine::newArray):
* qt/api/qscriptengine.h:
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::newArray):
* qt/api/qscriptengine_p.h:
* qt/tests/qscriptengine/tst_qscriptengine.cpp:
(tst_QScriptEngine::newArray):
2010-06-28 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
Install jsc as jsc-X where X is the major API version to allow
parallel installation of both GTK+ 2.x and 3.x versions.
* GNUmakefile.am:
2010-06-28 John Gregg <johnnyg@google.com>
Reviewed by Kent Tamura.
add ENABLE_DIRECTORY_UPLOAD build support
https://bugs.webkit.org/show_bug.cgi?id=41100
* Configurations/FeatureDefines.xcconfig:
2010-06-28 Xan Lopez <xlopez@igalia.com>
Revert to build jsc, since the tests expect this.
* GNUmakefile.am:
2010-06-28 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Oliver Hunt.
Only one character lookahead should be enough for the lexer
https://bugs.webkit.org/show_bug.cgi?id=41213
The lexer had 4 character lookahead before, which required
a complex shifting mechanism. This can be improved by using
only one character lookahead for most decisions, and a
peek() function as a fallback when it is absolutely necessary.
* parser/Lexer.cpp:
(JSC::Lexer::currentCharacter):
(JSC::Lexer::currentOffset):
(JSC::Lexer::setCode):
(JSC::Lexer::shift):
(JSC::Lexer::peek):
(JSC::Lexer::getUnicodeCharacter):
(JSC::Lexer::shiftLineTerminator):
(JSC::Lexer::lastTokenWasRestrKeyword):
(JSC::Lexer::lex):
(JSC::Lexer::scanRegExp):
(JSC::Lexer::skipRegExp):
* parser/Lexer.h:
2010-06-28 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Unreviewed build fix.
[EFL] Build fix for latest version of Ecore library.
Ecore recently changed return type of callbacks from int to Eina_Bool.
* wtf/efl/MainThreadEfl.cpp:
(WTF::timeoutFired): Return Eina_Bool instead of int.
2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] QScriptValue should have API for accessing object properties
https://bugs.webkit.org/show_bug.cgi?id=40903
Make possible to access properties inside QScriptValues. While this
still doesn't support the ResolveLocal parameter, it is already useful
for testing the API.
The tests from upstream QtScript weren't imported since most of them
depend on the setProperty() function as well. A simple test was created.
* qt/api/qscriptvalue.cpp:
(QScriptValue::property):
* qt/api/qscriptvalue.h:
(QScriptValue::):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::property):
* qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
(tst_QScriptValue::propertySimple):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
2010-06-28 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
[GTK] Add support for GTK+3
https://bugs.webkit.org/show_bug.cgi?id=41253
Suffix jsc with the API version of the library, so that
libwebkitgtk 1.x and 3.x can install jsc.
* GNUmakefile.am:
2010-06-27 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Turn ENABLE(SINGLE_THREADED) on.
https://bugs.webkit.org/show_bug.cgi?id=41135
Brew MP does not support preemptive multi-threading.
Disable threading for Brew MP.
* wtf/Platform.h:
2010-06-26 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Dimitri Glazkov.
Add an ENABLE_WEB_TIMING option for enabling Web Timing support.
https://bugs.webkit.org/show_bug.cgi?id=38924
* Configurations/FeatureDefines.xcconfig:
2010-06-25 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
We assume in testapi.c that the value aHeapRef refers to will not be
moved. When we have movable objects, this will not be the case.
* API/tests/testapi.c:
(main):
2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r61924.
http://trac.webkit.org/changeset/61924
https://bugs.webkit.org/show_bug.cgi?id=41240
It was rolled out, but cq+ wasn't removed (Requested by Ossy_
on #webkit).
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::create):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-25 Renata Hodovan <reni@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Merge RegExp constructor and RegExp::create methods into one.
Both of function are called with tree parameters and check whether
flags (the third param) is given or not.
Simplify hash lookups in RegExpCache::create with giving them an extra
iterator parameter.
https://bugs.webkit.org/show_bug.cgi?id=41055
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
Introduce QtScript benchmarks.
The QtScript performance should be tested regularly. The patch introduces
micro benchmarks for existing API.
[Qt] Performance of the QtScript API is not tested.
https://bugs.webkit.org/show_bug.cgi?id=40911
* qt/benchmarks/benchmarks.pri: Copied from JavaScriptCore/qt/tests/tests.pri.
* qt/benchmarks/benchmarks.pro: Added.
* qt/benchmarks/qscriptengine/qscriptengine.pro: Added.
* qt/benchmarks/qscriptengine/tst_qscriptengine.cpp: Added.
(tst_QScriptEngine::checkSyntax_data):
(tst_QScriptEngine::checkSyntax):
(tst_QScriptEngine::constructor):
(tst_QScriptEngine::evaluateString_data):
(tst_QScriptEngine::evaluateString):
(tst_QScriptEngine::evaluateProgram_data):
(tst_QScriptEngine::evaluateProgram):
(tst_QScriptEngine::newObject):
(tst_QScriptEngine::nullValue):
(tst_QScriptEngine::undefinedValue):
(tst_QScriptEngine::globalObject):
(tst_QScriptEngine::toStringHandle):
* qt/benchmarks/qscriptvalue/qscriptvalue.pro: Added.
* qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp: Added.
(tst_QScriptValue::tst_QScriptValue):
(tst_QScriptValue::~tst_QScriptValue):
(tst_QScriptValue::values_data):
(tst_QScriptValue::ctorBool):
(tst_QScriptValue::ctorReal):
(tst_QScriptValue::ctorNumber):
(tst_QScriptValue::ctorQString):
(tst_QScriptValue::ctorCString):
(tst_QScriptValue::ctorSpecial):
(tst_QScriptValue::ctorQScriptValue):
(tst_QScriptValue::isValid_data):
(tst_QScriptValue::isValid):
(tst_QScriptValue::isBool_data):
(tst_QScriptValue::isBool):
(tst_QScriptValue::isNumber_data):
(tst_QScriptValue::isNumber):
(tst_QScriptValue::isFunction_data):
(tst_QScriptValue::isFunction):
(tst_QScriptValue::isNull_data):
(tst_QScriptValue::isNull):
(tst_QScriptValue::isString_data):
(tst_QScriptValue::isString):
(tst_QScriptValue::isUndefined_data):
(tst_QScriptValue::isUndefined):
(tst_QScriptValue::isObject_data):
(tst_QScriptValue::isObject):
(tst_QScriptValue::isError_data):
(tst_QScriptValue::isError):
(tst_QScriptValue::toString_data):
(tst_QScriptValue::toString):
(tst_QScriptValue::toNumber_data):
(tst_QScriptValue::toNumber):
(tst_QScriptValue::toBool_data):
(tst_QScriptValue::toBool):
(tst_QScriptValue::toInteger_data):
(tst_QScriptValue::toInteger):
(tst_QScriptValue::toInt32_data):
(tst_QScriptValue::toInt32):
(tst_QScriptValue::toUInt32_data):
(tst_QScriptValue::toUInt32):
(tst_QScriptValue::toUInt16_data):
(tst_QScriptValue::toUInt16):
(tst_QScriptValue::toObject_data):
(tst_QScriptValue::toObject):
(tst_QScriptValue::equals_data):
(tst_QScriptValue::equals):
(tst_QScriptValue::strictlyEquals_data):
(tst_QScriptValue::strictlyEquals):
(tst_QScriptValue::instanceOf_data):
(tst_QScriptValue::instanceOf):
2010-06-25 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Remove old js parser
https://bugs.webkit.org/show_bug.cgi?id=41222
Remove the old yacc parser, this also solves the tiger problem. Which
was a conflict between yacc generated token values and those in the
custom parser
* Android.mk:
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pro:
* GNUmakefile.am:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* parser/Grammar.y: Removed.
* parser/JSParser.cpp:
* parser/JSParser.h:
* parser/Lexer.cpp:
* parser/NodeConstructors.h:
(JSC::Node::Node):
* parser/Parser.cpp:
(JSC::Parser::parse):
* wtf/Platform.h:
2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
New QtScript API; setPrototype() and prototype().
This patch implements QScriptValue's prototype accessors.
[Qt] QScriptValue should have accessors to a prototype.
https://bugs.webkit.org/show_bug.cgi?id=39356
* qt/api/qscriptvalue.cpp:
(QScriptValue::prototype):
(QScriptValue::setPrototype):
* qt/api/qscriptvalue.h:
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::prototype):
(QScriptValuePrivate::setPrototype):
* qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
(tst_QScriptValue::getSetPrototype):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Kenneth Rohde Christiansen.
[CMake] Add option to enable JIT.
JIT is disabled by default, but now it's possible to enable it through
an option to CMake: -DENABLE_JIT will enable it.
https://bugs.webkit.org/show_bug.cgi?id=40936
* CMakeLists.txt: Add missing files and re-sort.
2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Gustavo Noronha Silva.
[CMake] Remove unused variable in EFL build system. It was previously
being used to set the flags of each port but it was superseded by
other flags.
https://bugs.webkit.org/show_bug.cgi?id=40931
* jsc/CMakeLists.txt:
2010-06-25 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on
sunspider.
* assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::AssemblerBuffer):
2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r61842.
http://trac.webkit.org/changeset/61842
https://bugs.webkit.org/show_bug.cgi?id=41208
It broke Windows build (Requested by Ossy_ on #webkit).
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Removed.
* wtf/win/OwnPtrWin.h: Removed.
2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r61833.
http://trac.webkit.org/changeset/61833
https://bugs.webkit.org/show_bug.cgi?id=41205
It broke Leopard and GTK (Requested by Ossy_ on #webkit).
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::create):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-25 Kwang Yul Seo <skyul@company100.net>
Reviewed by Adam Barth.
Change OwnPtrCommon to include platform-specific headers
https://bugs.webkit.org/show_bug.cgi?id=40279
Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Added.
* wtf/win/OwnPtrWin.h: Added.
2010-06-25 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
Add the possibility for a head and footer section to create_jit_stubs.
https://bugs.webkit.org/show_bug.cgi?id=36050
* create_jit_stubs:
2010-06-24 Renata Hodovan <reni@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Merge RegExp constructor and RegExp::create methods into one.
Both of function are called with tree parameters and check whether
flags (the third param) is given or not.
Simplify hash lookups in RegExpCache::create with giving them an extra
iterator parameter.
https://bugs.webkit.org/show_bug.cgi?id=41055
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-24 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64
https://bugs.webkit.org/show_bug.cgi?id=41193
I noticed a use of '+ 4' in some of the 32_64 code paths and realised there
were a few places where endianness was being hardcoded. This patch fixes
the errors i could find through code inspection.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_resolve_global):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::patchGetByIdSelf):
(JSC::JIT::patchPutByIdReplace):
2010-06-24 Oliver Hunt <oliver@apple.com>
Build fix
Temporarily get the tiger bot working again by disabling the
new JS parser. GCC on tiger is miscompiling the parser and
I don't have access to a tiger machine right now.
* wtf/Platform.h:
2010-06-21 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoff Garen.
https://bugs.webkit.org/show_bug.cgi?id=40128
Fixed broken debug functionality.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::dumpRegisters):
Fixed to work with updated call frame.
* runtime/JSImmediate.h:
(JSC::JSValue::isCell):
Added assert for aligned cell.
* runtime/JSValue.cpp:
(JSC::JSValue::description):
Fixed to work with current JSValue implementation.
* runtime/JSZombie.cpp:
(JSC::JSZombie::leakedZombieStructure):
JSombies compile again.
2010-06-24 Leandro Pereira <leandro@profusion.mobi>
Unreviewed build fix.
* CMakeLists.txt: Add JSParser.cpp.
2010-06-24 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Single character string replacement may replace too many characters
https://bugs.webkit.org/show_bug.cgi?id=41138
<rdar://problem/8097496>
Simple fix to stop the rope path of single character replacement
once the first replacement occurs.
* runtime/JSString.cpp:
(JSC::JSString::replaceCharacter):
2010-06-24 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Fix the length of instruction stream controlled by constant pool
https://bugs.webkit.org/show_bug.cgi?id=40293
The initial/maximum length of instruction stream (m_maxDistance) should
be set when the first constant arrives to the constant pool. Otherwise
the constant pool could be placed into an uninterrupted sequence.
* assembler/AssemblerBufferWithConstantPool.h:
(JSC::):
2010-06-24 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
We assume bytecodeOffset will always return a value > 1,
so we adjust the failure case to return 1 instead of 0.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
2010-06-23 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Custom-written JavaScript parser
https://bugs.webkit.org/show_bug.cgi?id=34019
Implement a recursive descent parser similar to that used by V8 and
SpiderMonkey. Greater than 2x improvement in SunSpider parsing tests.
The parser consists of a JSParser class that uses a TreeBuilder to actually
build the AST. There are currently two builders -- the ASTBuilder and
SyntaxChecker which separate the job of building an AST for code generation
and simply checking syntactic correctness.
There's still some less than ideal code remaining in the parser to allow
us to retain the existing lexing code with minimal changes. We'll tidy
this up at a later date.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* parser/ASTBuilder.h: Added.
(JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo):
(JSC::ASTBuilder::AssignmentInfo::AssignmentInfo):
(JSC::ASTBuilder::ASTBuilder):
(JSC::ASTBuilder::createSourceElements):
(JSC::ASTBuilder::varDeclarations):
(JSC::ASTBuilder::funcDeclarations):
(JSC::ASTBuilder::features):
(JSC::ASTBuilder::numConstants):
(JSC::ASTBuilder::appendToComma):
(JSC::ASTBuilder::createCommaExpr):
(JSC::ASTBuilder::createLogicalNot):
(JSC::ASTBuilder::createUnaryPlus):
(JSC::ASTBuilder::createVoid):
(JSC::ASTBuilder::thisExpr):
(JSC::ASTBuilder::createResolve):
(JSC::ASTBuilder::createObjectLiteral):
(JSC::ASTBuilder::createArray):
(JSC::ASTBuilder::createNumberExpr):
(JSC::ASTBuilder::createString):
(JSC::ASTBuilder::createBoolean):
(JSC::ASTBuilder::createNull):
(JSC::ASTBuilder::createBracketAccess):
(JSC::ASTBuilder::createDotAccess):
(JSC::ASTBuilder::createRegex):
(JSC::ASTBuilder::createNewExpr):
(JSC::ASTBuilder::createConditionalExpr):
(JSC::ASTBuilder::createAssignResolve):
(JSC::ASTBuilder::createFunctionExpr):
(JSC::ASTBuilder::createFunctionBody):
(JSC::ASTBuilder::createGetterOrSetterProperty):
(JSC::ASTBuilder::createArguments):
(JSC::ASTBuilder::createArgumentsList):
(JSC::ASTBuilder::createProperty):
(JSC::ASTBuilder::createPropertyList):
(JSC::ASTBuilder::createElementList):
(JSC::ASTBuilder::createFormalParameterList):
(JSC::ASTBuilder::createClause):
(JSC::ASTBuilder::createClauseList):
(JSC::ASTBuilder::setUsesArguments):
(JSC::ASTBuilder::createFuncDeclStatement):
(JSC::ASTBuilder::createBlockStatement):
(JSC::ASTBuilder::createExprStatement):
(JSC::ASTBuilder::createIfStatement):
(JSC::ASTBuilder::createForLoop):
(JSC::ASTBuilder::createForInLoop):
(JSC::ASTBuilder::createEmptyStatement):
(JSC::ASTBuilder::createVarStatement):
(JSC::ASTBuilder::createReturnStatement):
(JSC::ASTBuilder::createBreakStatement):
(JSC::ASTBuilder::createContinueStatement):
(JSC::ASTBuilder::createTryStatement):
(JSC::ASTBuilder::createSwitchStatement):
(JSC::ASTBuilder::createWhileStatement):
(JSC::ASTBuilder::createDoWhileStatement):
(JSC::ASTBuilder::createLabelStatement):
(JSC::ASTBuilder::createWithStatement):
(JSC::ASTBuilder::createThrowStatement):
(JSC::ASTBuilder::createDebugger):
(JSC::ASTBuilder::createConstStatement):
(JSC::ASTBuilder::appendConstDecl):
(JSC::ASTBuilder::appendStatement):
(JSC::ASTBuilder::addVar):
(JSC::ASTBuilder::combineCommaNodes):
(JSC::ASTBuilder::evalCount):
(JSC::ASTBuilder::appendBinaryExpressionInfo):
(JSC::ASTBuilder::operatorStackPop):
(JSC::ASTBuilder::operatorStackHasHigherPrecedence):
(JSC::ASTBuilder::getFromOperandStack):
(JSC::ASTBuilder::shrinkOperandStackBy):
(JSC::ASTBuilder::appendBinaryOperation):
(JSC::ASTBuilder::operatorStackAppend):
(JSC::ASTBuilder::popOperandStack):
(JSC::ASTBuilder::appendUnaryToken):
(JSC::ASTBuilder::unaryTokenStackLastType):
(JSC::ASTBuilder::unaryTokenStackLastStart):
(JSC::ASTBuilder::unaryTokenStackRemoveLast):
(JSC::ASTBuilder::assignmentStackAppend):
(JSC::ASTBuilder::createAssignment):
(JSC::ASTBuilder::Scope::Scope):
(JSC::ASTBuilder::setExceptionLocation):
(JSC::ASTBuilder::incConstants):
(JSC::ASTBuilder::usesThis):
(JSC::ASTBuilder::usesCatch):
(JSC::ASTBuilder::usesClosures):
(JSC::ASTBuilder::usesArguments):
(JSC::ASTBuilder::usesAssignment):
(JSC::ASTBuilder::usesWith):
(JSC::ASTBuilder::usesEval):
(JSC::ASTBuilder::createNumber):
(JSC::ASTBuilder::makeTypeOfNode):
(JSC::ASTBuilder::makeDeleteNode):
(JSC::ASTBuilder::makeNegateNode):
(JSC::ASTBuilder::makeBitwiseNotNode):
(JSC::ASTBuilder::makeMultNode):
(JSC::ASTBuilder::makeDivNode):
(JSC::ASTBuilder::makeAddNode):
(JSC::ASTBuilder::makeSubNode):
(JSC::ASTBuilder::makeLeftShiftNode):
(JSC::ASTBuilder::makeRightShiftNode):
(JSC::ASTBuilder::makeFunctionCallNode):
(JSC::ASTBuilder::makeBinaryNode):
(JSC::ASTBuilder::makeAssignNode):
(JSC::ASTBuilder::makePrefixNode):
(JSC::ASTBuilder::makePostfixNode):
* parser/JSParser.cpp: Added.
(JSC::JSParser::AllowInOverride::AllowInOverride):
(JSC::JSParser::AllowInOverride::~AllowInOverride):
(JSC::JSParser::token):
(JSC::JSParser::next):
(JSC::JSParser::consume):
(JSC::JSParser::match):
(JSC::JSParser::tokenStart):
(JSC::JSParser::tokenLine):
(JSC::JSParser::tokenEnd):
(JSC::JSParser::):
(JSC::JSParser::autoSemiColon):
(JSC::JSParser::canRecurse):
(JSC::JSParser::lastTokenEnd):
(JSC::jsParse):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::allowAutomaticSemicolon):
(JSC::JSParser::parseSourceElements):
(JSC::JSParser::parseVarDeclaration):
(JSC::JSParser::parseConstDeclaration):
(JSC::JSParser::parseDoWhileStatement):
(JSC::JSParser::parseWhileStatement):
(JSC::JSParser::parseVarDeclarationList):
(JSC::JSParser::parseConstDeclarationList):
(JSC::JSParser::parseForStatement):
(JSC::JSParser::parseBreakStatement):
(JSC::JSParser::parseContinueStatement):
(JSC::JSParser::parseReturnStatement):
(JSC::JSParser::parseThrowStatement):
(JSC::JSParser::parseWithStatement):
(JSC::JSParser::parseSwitchStatement):
(JSC::JSParser::parseSwitchClauses):
(JSC::JSParser::parseSwitchDefaultClause):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseDebuggerStatement):
(JSC::JSParser::parseBlockStatement):
(JSC::JSParser::parseStatement):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionBody):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseFunctionDeclaration):
(JSC::JSParser::parseExpressionOrLabelStatement):
(JSC::JSParser::parseExpressionStatement):
(JSC::JSParser::parseIfStatement):
(JSC::JSParser::parseExpression):
(JSC::JSParser::parseAssignmentExpression):
(JSC::JSParser::parseConditionalExpression):
(JSC::isUnaryOp):
(JSC::JSParser::isBinaryOperator):
(JSC::JSParser::parseBinaryExpression):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseObjectLiteral):
(JSC::JSParser::parseArrayLiteral):
(JSC::JSParser::parsePrimaryExpression):
(JSC::JSParser::parseArguments):
(JSC::JSParser::parseMemberExpression):
(JSC::JSParser::parseUnaryExpression):
* parser/JSParser.h: Added.
(JSC::):
(JSC::JSTokenInfo::JSTokenInfo):
* parser/Lexer.cpp:
(JSC::Lexer::lex):
* parser/Lexer.h:
(JSC::Lexer::setLastLineNumber):
(JSC::Lexer::lastLineNumber):
* parser/NodeConstructors.h:
(JSC::Node::Node):
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/SyntaxChecker.h: Added.
(JSC::SyntaxChecker::SyntaxChecker):
(JSC::SyntaxChecker::createSourceElements):
(JSC::SyntaxChecker::makeFunctionCallNode):
(JSC::SyntaxChecker::appendToComma):
(JSC::SyntaxChecker::createCommaExpr):
(JSC::SyntaxChecker::makeAssignNode):
(JSC::SyntaxChecker::makePrefixNode):
(JSC::SyntaxChecker::makePostfixNode):
(JSC::SyntaxChecker::makeTypeOfNode):
(JSC::SyntaxChecker::makeDeleteNode):
(JSC::SyntaxChecker::makeNegateNode):
(JSC::SyntaxChecker::makeBitwiseNotNode):
(JSC::SyntaxChecker::createLogicalNot):
(JSC::SyntaxChecker::createUnaryPlus):
(JSC::SyntaxChecker::createVoid):
(JSC::SyntaxChecker::thisExpr):
(JSC::SyntaxChecker::createResolve):
(JSC::SyntaxChecker::createObjectLiteral):
(JSC::SyntaxChecker::createArray):
(JSC::SyntaxChecker::createNumberExpr):
(JSC::SyntaxChecker::createString):
(JSC::SyntaxChecker::createBoolean):
(JSC::SyntaxChecker::createNull):
(JSC::SyntaxChecker::createBracketAccess):
(JSC::SyntaxChecker::createDotAccess):
(JSC::SyntaxChecker::createRegex):
(JSC::SyntaxChecker::createNewExpr):
(JSC::SyntaxChecker::createConditionalExpr):
(JSC::SyntaxChecker::createAssignResolve):
(JSC::SyntaxChecker::createFunctionExpr):
(JSC::SyntaxChecker::createFunctionBody):
(JSC::SyntaxChecker::createArguments):
(JSC::SyntaxChecker::createArgumentsList):
(JSC::SyntaxChecker::createProperty):
(JSC::SyntaxChecker::createPropertyList):
(JSC::SyntaxChecker::createElementList):
(JSC::SyntaxChecker::createFormalParameterList):
(JSC::SyntaxChecker::createClause):
(JSC::SyntaxChecker::createClauseList):
(JSC::SyntaxChecker::setUsesArguments):
(JSC::SyntaxChecker::createFuncDeclStatement):
(JSC::SyntaxChecker::createBlockStatement):
(JSC::SyntaxChecker::createExprStatement):
(JSC::SyntaxChecker::createIfStatement):
(JSC::SyntaxChecker::createForLoop):
(JSC::SyntaxChecker::createForInLoop):
(JSC::SyntaxChecker::createEmptyStatement):
(JSC::SyntaxChecker::createVarStatement):
(JSC::SyntaxChecker::createReturnStatement):
(JSC::SyntaxChecker::createBreakStatement):
(JSC::SyntaxChecker::createContinueStatement):
(JSC::SyntaxChecker::createTryStatement):
(JSC::SyntaxChecker::createSwitchStatement):
(JSC::SyntaxChecker::createWhileStatement):
(JSC::SyntaxChecker::createWithStatement):
(JSC::SyntaxChecker::createDoWhileStatement):
(JSC::SyntaxChecker::createLabelStatement):
(JSC::SyntaxChecker::createThrowStatement):
(JSC::SyntaxChecker::createDebugger):
(JSC::SyntaxChecker::createConstStatement):
(JSC::SyntaxChecker::appendConstDecl):
(JSC::SyntaxChecker::createGetterOrSetterProperty):
(JSC::SyntaxChecker::appendStatement):
(JSC::SyntaxChecker::addVar):
(JSC::SyntaxChecker::combineCommaNodes):
(JSC::SyntaxChecker::evalCount):
(JSC::SyntaxChecker::appendBinaryExpressionInfo):
(JSC::SyntaxChecker::operatorStackPop):
* runtime/JSGlobalData.h:
* wtf/Platform.h:
* wtf/ThreadSpecific.h:
(WTF::T):
2010-06-23 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
Optimization of the QScriptValuePrivate.
Patch change only internals of the QScriptValuePrivate.
Most of the QScriptValuePrivate's attributes were moved
into an union.
[Qt] Optimization of the QScriptVAluePrivate.
https://bugs.webkit.org/show_bug.cgi?id=40415
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::globalObject):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::):
(QScriptValuePrivate::~QScriptValuePrivate):
(QScriptValuePrivate::QScriptValuePrivate):
(QScriptValuePrivate::toString):
(QScriptValuePrivate::toNumber):
(QScriptValuePrivate::toBool):
(QScriptValuePrivate::toObject):
(QScriptValuePrivate::equals):
(QScriptValuePrivate::strictlyEquals):
(QScriptValuePrivate::assignEngine):
(QScriptValuePrivate::operator JSValueRef):
(QScriptValuePrivate::operator JSObjectRef):
(QScriptValuePrivate::refinedJSValue):
2010-06-23 Kwang Yul Seo <skyul@company100.net>
Reviewed by Oliver Hunt.
[GTK] Implement ThreadSpecific with glib
https://bugs.webkit.org/show_bug.cgi?id=39829
Implement ThreadSpecific with glib's GStaticPrivate.
This patch makes it possible to build GTK port without pthread.
* wtf/ThreadSpecific.h:
(WTF::::ThreadSpecific):
(WTF::::~ThreadSpecific):
(WTF::::get):
(WTF::::set):
(WTF::::destroy):
2010-06-23 Leandro Pereira <leandro@profusion.mobi>
Unreviewed build fix.
* CMakeLists.txt: Add runtime/RegExpCache.cpp.
2010-06-22 Renata Hodovan <hodovan@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Adding regular expression caching to JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=38142
The cache is based on Round Robin eviction policy, and
can cache at most 256 character long regular expressions,
and at most 256 of them. These values can be changed at compile time.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecompiler/NodesCodegen.cpp:
(JSC::RegExpNode::emitBytecode):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::regExpCache):
* runtime/RegExpCache.cpp: Added.
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
(JSC::RegExpCache::RegExpCache):
* runtime/RegExpCache.h: Added.
* runtime/RegExpConstructor.cpp:
(JSC::constructRegExp):
* runtime/RegExpKey.h: Added.
(JSC::RegExpKey::RegExpKey):
(JSC::RegExpKey::getFlagsValue):
(WTF::operator==):
(WTF::):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncCompile):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
2010-06-22 Gabor Loki <loki@webkit.org>
Reviewed by Geoffrey Garen.
Add native call support for ARM and Thumb-2 JIT.
https://bugs.webkit.org/show_bug.cgi?id=40231
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* wtf/Platform.h:
2010-06-21 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Make JSC more resilient in the face of parse failures
https://bugs.webkit.org/show_bug.cgi?id=40951
A number of recent bugs have occurred due to issues like miscounting
BOMs, etc which lead to interesting crashes later on. Adding this
logic hardens JSC in the face of these errors, and has no impact on
performance (32bit jit actually gets 0.7% faster but I put that down
to cache effects).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
(JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::privateExecute):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::compileForCall):
(JSC::FunctionExecutable::compileForConstruct):
(JSC::FunctionExecutable::generateJITCodeForCall):
(JSC::FunctionExecutable::generateJITCodeForConstruct):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
* runtime/Executable.h:
(JSC::FunctionExecutable::bytecodeForCall):
(JSC::FunctionExecutable::bytecodeForConstruct):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::numericCompareFunction):
2010-06-21 John Sullivan <sullivan@apple.com>
Reviewed by Adam Roben.
RetainPtr can't be used in HashMaps or HashSets
<https://bugs.webkit.org/show_bug.cgi?id=40938>
Added hashing knowledge similar to that in COMPtr.h.
* wtf/RetainPtr.h:
(WTF::RetainPtr::RetainPtr):
New function, copied from COMPtr.h but for the type change.
(WTF::RetainPtr::isHashTableDeletedValue):
Ditto.
(WTF::RetainPtr::hashTableDeletedValue):
Ditto.
Added template code for HashTraits and PtrHash copied from COMPtr.h but for the type change.
The only difference is that constructDeletedValue() matches the RefPtr implementation (in HashTraits.h)
rather than the COMPtr implementation.
2010-06-19 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Need to ensure that we grow the RegisterFile when creating a callframe for host code
https://bugs.webkit.org/show_bug.cgi?id=40858
<rdar://problem/8108986>
In the past the use of the callframe in hostcode was much more
limited. Now that we expect the callframe to always be valid
we need to grow the RegisterFile so that this is actually the
case. In this particular case the problem was failing to grow
the registerfile could lead to a callframe that extended beyond
RegisterFiler::end(), so vm re-entry would clobber the callframe
other scenarios could also lead to badness.
I was unable to construct a simple testcase to trigger badness,
and any such testcase would be so dependent on exact vm stack
layout that it would be unlikely to work as a testcase following
any callframe or register allocation changes anyway.
Thankfully the new assertion I added should help to catch these
failures in future, and triggers on a couple of tests currently.
* interpreter/CallFrame.cpp:
(JSC::CallFrame::registerFile):
* interpreter/CallFrame.h:
(JSC::ExecState::init):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
2010-06-21 Satish Sampath <satish@chromium.org>
Reviewed by Steve Block.
Speech Input Patch 0: Added compilation argument to conditionally compile pending patches.
https://bugs.webkit.org/show_bug.cgi?id=40878
* Configurations/FeatureDefines.xcconfig:
2010-06-21 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1
https://bugs.webkit.org/show_bug.cgi?id=40653
Currently, other ports do not use global new/delete operator overloading
when USE_SYSTEM_MALLOC=1. Brew MP uses system malloc, but it needs to enable
"global fastMalloc new" because the default new/delete causes crash on device.
We need to replace them with Brew MP's MALLOC/FREE.
* wtf/FastMalloc.h:
2010-06-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Work around a build problem with libjscore on Symbian.
https://bugs.webkit.org/show_bug.cgi?id=40840
Sbsv2 sometimes have problems with debug/release configuration
determination causing QtWebKit in release to try linking with the debug
JavaScriptCore static library. This patch limit the jscore/jscored
r58306 fix necessary for mac builds only to the mac platform to prevent the
different name problem.
The real fix would be to fix qmake or the toolchain, this patch might
help meanwhile.
* JavaScriptCore.pri:
2010-06-21 Patrick Gansterer <paroga@paroga.com>
Reviewed by Kent Tamura.
Buildfix after r61338.
https://bugs.webkit.org/show_bug.cgi?id=40888
roundUpAllocationSize is needed in RegisterFile.h.
* jit/ExecutableAllocator.h:
2010-06-19 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
Include <string.h> in StringExtras.h
https://bugs.webkit.org/show_bug.cgi?id=40808
Without string.h, RVCT 2.2 can't compile StringExtras.h.
It can't find strlen and strncmp.
* wtf/StringExtras.h:
2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Don't use __attribute__((may_alias)) with the Intel compiler,
as it doesn't understand it.
* wtf/Vector.h:
2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Fix compilation with the Intel C++ compiler (11.1.072).
Like RVCT, label pointers must be void*, not const void*.
* bytecode/Opcode.h:
2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Add the WTF_COMPILER_INTEL for when the Intel compiler is used
for building. Usually, the Intel compiler masquerades as
another compiler in the system and gets away with it, but some
times specific fixes are required (such as when using language
extensions).
* wtf/Platform.h:
2010-06-18 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Incorrect handling of multiple BOMs scattered through a file.
https://bugs.webkit.org/show_bug.cgi?id=40865
When determining the offset of open and close braces in a source
with BOMs we were finishing our count early as we failed to account
for BOMs prior to the open/close brace positions effecting those
positions.
* parser/Lexer.cpp:
(JSC::Lexer::sourceCode):
2010-06-17 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Don't throw away exception information for functions that use exceptions
https://bugs.webkit.org/show_bug.cgi?id=40786
Simple patch to stop JSC from throwing away the exception information
of a function that uses "exceptiony" features like try and throw. This
is a speed up for catching expressions but it's difficult to quantify as
the old cost of reparsing is amortised over all exceptions caught in the
effected function.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::emitCatch):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitThrow):
2010-06-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add PlatformStrategies and PluginStrategy classes.
https://bugs.webkit.org/show_bug.cgi?id=40850
* wtf/Platform.h:
2010-06-18 Leandro Pereira <leandro@profusion.mobi>
[EFL] Unreviewed build fix.
* wtf/CMakeLists.txt: Add MD5.cpp.
2010-06-17 Shu Chang <chang.shu@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Fix the link error on symbian with ENABLE_JIT=0.
1. Add "#if ENABLE(JIT)" in the header file;
2. Put feature enable/disable logic to a common.pri so
that both JavaScriptCore.pri and WebCore.pri can share.
https://bugs.webkit.org/show_bug.cgi?id=40780
* JavaScriptCore.pri:
* jit/ExecutableAllocator.h:
2010-06-17 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Use adoptRef and create functions in more code paths
https://bugs.webkit.org/show_bug.cgi?id=40760
* API/JSClassRef.h: Removed unneeded include of RefCounted.h.
* API/JSWeakObjectMapRefPrivate.cpp: Ditto.
* bytecode/CodeBlock.h:
(JSC::FunctionCodeBlock::FunctionCodeBlock): Use the
SharedSymbolTable::create function instead of calling new directly.
* runtime/SymbolTable.h: Added a create function to the SharedSymbolTable
class and made the constructor private.
2010-06-17 Mark Brand <mabrand@mabrand.nl>
Reviewed by Simon Hausmann.
[Qt] use "win32-g++*" scope to match all MinGW makespecs
The scope "win32-g++" comes from the name of the makespec. However, it
is frequently used to check for MinGW. This works fine as long as
win32-g++ is the only makespec for MinGW. Now we need the wildcard
to cover "win32-g++-cross" as well.
* JavaScriptCore.pro:
2010-06-16 Darin Adler <darin@apple.com>
Reviewed by David Levin.
Deploy adoptRef in more places, including all HTML and MathML elements
https://bugs.webkit.org/show_bug.cgi?id=39941
* wtf/ThreadSafeShared.h: Made the constructor protected and removed the
unneeded support for initial reference counts other than 1.
2010-06-16 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Store matchBegin directly in the array of output instead of the stack.
https://bugs.webkit.org/show_bug.cgi?id=38988
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateDisjunction):
(JSC::Yarr::RegexGenerator::generate):
2010-06-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Make JavaScriptCore build with clang++.
* jit/JITInlineMethods.h:
(JSC::JIT::emitPutVirtualRegister):
Explicitly cast to an int.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::compileRegex):
Return 0 instead of false.
2010-06-15 Adam Roben <aroben@apple.com>
Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds
Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>.
Reviewed by Sam Weinig.
* JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of
JavaScriptCore's DerivedSources directory to
AppleInternal/Sources/JavaScriptCore.
2010-06-15 Gabor Loki <loki@webkit.org>
Rubber-stamped by Eric Seidel.
Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM
https://bugs.webkit.org/show_bug.cgi?id=40423
Using OBJECT_OFFSETOF macro instead of objectof to bypass access to
non-static data member warning.
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
2010-06-11 Eric Seidel <eric@webkit.org>
Reviewed by Adam Barth.
Rename the rest of the *Tokenizer classes to *DocumentParser
https://bugs.webkit.org/show_bug.cgi?id=40507
* wtf/Platform.h:
- fixed a comment to match new names.
2010-06-11 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Explicit conversions from QtScript types to JSC opaque types were removed.
https://bugs.webkit.org/show_bug.cgi?id=40412
Conversion between a JSC C types and a QtScript private types, takes
main part of the source code. In most cases a mapping between the types
is one to one. New cast operators were added to simplify the code.
The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef.
The QScriptEnginePrivate could be casted to the JSGlobalContext.
The QScriptProgramPrivate could be casted to the JSStringRef.
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::evaluate):
(QScriptEnginePrivate::newObject):
(QScriptEnginePrivate::globalObject):
* qt/api/qscriptengine_p.h:
(QScriptEnginePrivate::operator JSGlobalContextRef):
* qt/api/qscriptprogram_p.h:
(QScriptProgramPrivate::operator JSStringRef):
* qt/api/qscriptsyntaxcheckresult.cpp:
(QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
(QScriptSyntaxCheckResultPrivate::errorMessage):
(QScriptSyntaxCheckResultPrivate::errorLineNumber):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::~QScriptValuePrivate):
(QScriptValuePrivate::QScriptValuePrivate):
(QScriptValuePrivate::isBool):
(QScriptValuePrivate::isNumber):
(QScriptValuePrivate::isNull):
(QScriptValuePrivate::isString):
(QScriptValuePrivate::isUndefined):
(QScriptValuePrivate::isFunction):
(QScriptValuePrivate::toString):
(QScriptValuePrivate::toNumber):
(QScriptValuePrivate::toBool):
(QScriptValuePrivate::toObject):
(QScriptValuePrivate::equals):
(QScriptValuePrivate::strictlyEquals):
(QScriptValuePrivate::instanceOf):
(QScriptValuePrivate::call):
(QScriptValuePrivate::operator JSValueRef):
(QScriptValuePrivate::operator JSObjectRef):
(QScriptValuePrivate::setValue):
(QScriptValuePrivate::inherits):
(QScriptValuePrivate::refinedJSValue):
2010-05-31 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Implement the simple text code path.
https://bugs.webkit.org/show_bug.cgi?id=40077
Remove the FONT_FAST_PATH macro and use the Qt's
fast text implementation instead of the one of WebKit.
The Qt::TextBypassShaping flag is used to tell Qt to
only use the glyph advances.
Qt 4.7 is needed to get this flag thus the complex path is always
used if QtWebKit is compiled against an earlier version.
Contrary to the WebKit's implementation, the complex code path
is taken if the text is RightToLeft, justified or is formatted
with non-zero letter or word spacing.
* wtf/Platform.h:
2010-06-11 Luiz Agostini <luiz.agostini@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
add codePointCompare to JavaScriptCore.exp
https://bugs.webkit.org/show_bug.cgi?id=40426
* JavaScriptCore.exp:
2010-06-10 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode
https://bugs.webkit.org/show_bug.cgi?id=40367
If we're in the slow case of right shift we must write the type tag as
the only reason we hit this code path is because we know we're working
with a double. eg. we are guaranteed that the tag cannot be reused.
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emitRightShiftSlowCase):
2010-06-10 Kwang Yul Seo <skyul@company100.net>
Reviewed by Eric Seidel.
Remove weakRandomNumber
https://bugs.webkit.org/show_bug.cgi?id=40291
weakRandomNumber is used nowhere. Currently, WeakRandom is used instead.
* wtf/RandomNumber.cpp:
* wtf/RandomNumber.h:
2010-06-09 Alexey Proskuryakov <ap@apple.com>
Reviewed by Brady Eidson.
Export StringImpl::ascii(). It might be not very useful, but it's a public function.
* JavaScriptCore.exp:
2010-06-09 Leandro Pereira <leandro@profusion.mobi>
Reviewed by Adam Treat.
[EFL] Allow building core libraries as shared objects to speed up
linking time on machines with small amounts of memory.
http://webkit.org/b/39899
* CMakeLists.txt: If building with shared core, install the lib.
* jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically.
* wtf/CMakeLists.txt: If building with shared core, install the lib.
2010-06-09 Gabor Loki <loki@webkit.org>
Reviewed by David Levin.
Remove some unused variable warnings from JITOpcodes
https://bugs.webkit.org/show_bug.cgi?id=40298
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
2010-05-18 Yuzo Fujishima <yuzo@google.com>
Reviewed by Shinichiro Hamaji.
Fix for Bug 34529 - [CSSOM] issues with cssText and selectorText
Add U16_LENGTH that is needed to implement CSS character serialization.
https://bugs.webkit.org/show_bug.cgi?id=34529
* wtf/unicode/qt4/UnicodeQt4.h:
* wtf/unicode/wince/UnicodeWince.h:
2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r60830.
http://trac.webkit.org/changeset/60830
https://bugs.webkit.org/show_bug.cgi?id=40305
Broke the Windows build (Requested by abarth on #webkit).
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Removed.
* wtf/win/OwnPtrWin.h: Removed.
2010-06-08 MORITA Hajime <morrita@google.com>
Unreviewed. An attempt to fix test break.
* Configurations/FeatureDefines.xcconfig:
2010-06-08 Kwang Yul Seo <skyul@company100.net>
Reviewed by Adam Barth.
Change OwnPtrCommon to include platform-specific headers
https://bugs.webkit.org/show_bug.cgi?id=40279
Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Added.
* wtf/win/OwnPtrWin.h: Added.
2010-06-07 MORITA Hajime <morrita@google.com>
Reviewed by Kent Tamura.
https://bugs.webkit.org/show_bug.cgi?id=40219
[Mac] ENABLE_METER_TAG should be enabled
Added ENABLE_METER_TAG.
* Configurations/FeatureDefines.xcconfig:
2010-06-07 Kwang Yul Seo <skyul@company100.net>
Reviewed by Eric Seidel.
[BREWMP] Add more types to OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=39667
Add ISSL and ISocket to the list of OwnPtr-ed type.
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.cpp:
(WTF::deleteOwnedPtr):
2010-06-07 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Crash when compiling on Snow Leopard and running on Leopard
https://bugs.webkit.org/show_bug.cgi?id=31403
Disable the use of pthread_setname_np and other symbols
when targetting Leopard.
Use the defines TARGETING_XX instead of BUILDING_ON_XX
for features that cannot be used before Snow Leopard.
* wtf/Platform.h:
2010-06-07 Gabor Loki <loki@webkit.org>
Reviewed by NOBODY (JSVALUE32_64 build fix).
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
2010-06-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix pt 2).
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix pt 1).
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 40214 - Clean up error construction / throwing in JSC.
The one egregious insanity here is that creating an error requires
a VM-entry-esqe-host call (the string argument is wrapped as a JS
object & pushed on the RegisterFile, then unwrapped back to a
UString). Changing this also means you only require a global
object, not an ExecState, to create an error.
The methods to create error objects are also parameterized
requiring a switch on the type, which can be made cleaner and
faster by moving to a separate method per error type. Code to add
divot information to error had been duplicated, and is coalesced
back into a single function.
Convenience methods added to create & throw type & syntax error
with a default error message, since this is a common case.
Also, errors are currently thrown either using
"throwError(exec, error)" or "exec->setException(error)" - unify
on the former, since this is more commonly used. Add
"throwVMError(exec, error)" equivalents, as a convenience for
cases where the result was being wrapped in "JSValue::encode(...)".
* API/JSCallbackConstructor.cpp:
(JSC::constructJSCallback):
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::call):
* API/JSCallbackObjectFunctions.h:
(JSC::::getOwnPropertySlot):
(JSC::::put):
(JSC::::deleteProperty):
(JSC::::construct):
(JSC::::hasInstance):
(JSC::::call):
(JSC::::toNumber):
(JSC::::toString):
(JSC::::staticValueGetter):
(JSC::::staticFunctionGetter):
(JSC::::callbackGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeError):
* JavaScriptCore.exp:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitNewError):
(JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ThrowableExpressionData::emitThrowError):
(JSC::RegExpNode::emitBytecode):
(JSC::PostfixErrorNode::emitBytecode):
(JSC::PrefixErrorNode::emitBytecode):
(JSC::AssignErrorNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::LabelNode::emitBytecode):
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(functionRun):
(functionLoad):
(functionCheckSyntax):
* parser/Nodes.h:
* runtime/ArrayConstructor.cpp:
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
* runtime/BooleanPrototype.cpp:
(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncToLocaleString):
(JSC::dateProtoFuncToLocaleDateString):
(JSC::dateProtoFuncToLocaleTimeString):
(JSC::dateProtoFuncGetTime):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncToGMTString):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
(JSC::dateProtoFuncToJSON):
* runtime/Error.cpp:
(JSC::createError):
(JSC::createEvalError):
(JSC::createRangeError):
(JSC::createReferenceError):
(JSC::createSyntaxError):
(JSC::createTypeError):
(JSC::createURIError):
(JSC::addErrorSourceInfo):
(JSC::addErrorDivotInfo):
(JSC::addErrorInfo):
(JSC::hasErrorInfo):
(JSC::throwError):
(JSC::throwTypeError):
(JSC::throwSyntaxError):
* runtime/Error.h:
(JSC::throwVMError):
(JSC::throwVMTypeError):
* runtime/ErrorConstructor.cpp:
(JSC::constructWithErrorConstructor):
(JSC::callErrorConstructor):
* runtime/ErrorConstructor.h:
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
(JSC::ErrorInstance::create):
* runtime/ErrorInstance.h:
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/ExceptionHelpers.cpp:
(JSC::createStackOverflowError):
(JSC::createUndefinedVariableError):
(JSC::createInvalidParamError):
(JSC::createNotAConstructorError):
(JSC::createNotAFunctionError):
(JSC::createNotAnObjectError):
(JSC::throwOutOfMemoryError):
* runtime/ExceptionHelpers.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compile):
(JSC::ProgramExecutable::checkSyntax):
(JSC::ProgramExecutable::compile):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):
(JSC::functionProtoFuncApply):
(JSC::functionProtoFuncCall):
* runtime/Identifier.cpp:
(JSC::Identifier::from):
* runtime/Identifier.h:
* runtime/JSArray.cpp:
(JSC::JSArray::put):
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::decode):
(JSC::globalFuncEval):
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendStringifiedValue):
(JSC::Walker::walk):
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
* runtime/JSObject.cpp:
(JSC::throwSetterError):
(JSC::JSObject::put):
(JSC::JSObject::putWithAttributes):
(JSC::JSObject::defaultValue):
(JSC::JSObject::hasInstance):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
* runtime/JSValue.cpp:
(JSC::JSValue::toObjectSlowCase):
(JSC::JSValue::synthesizeObject):
(JSC::JSValue::synthesizePrototype):
* runtime/NativeErrorConstructor.cpp:
(JSC::constructWithNativeErrorConstructor):
(JSC::callNativeErrorConstructor):
* runtime/NativeErrorConstructor.h:
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorKeys):
(JSC::toPropertyDescriptor):
(JSC::objectConstructorDefineProperty):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
* runtime/RegExpConstructor.cpp:
(JSC::constructRegExp):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::match):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncToString):
2010-06-05 Kwang Yul Seo <skyul@company100.net>
Reviewed by Eric Seidel.
[BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx
https://bugs.webkit.org/show_bug.cgi?id=39710
Build fix for BREW MP.
* wtf/MathExtras.h:
2010-06-04 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
HTML5 parser should be within 1% of old parser performance
https://bugs.webkit.org/show_bug.cgi?id=40172
Fix cast in this operator= to allow for assignment between vectors with
different inline capacities (as clearly intended by its author).
* wtf/Vector.h:
(WTF::::operator):
2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
New QtScript API; QScriptValue::instanceOf.
New function create an easy way to check value's prototype hierarchy.
[Qt] QScriptValue should have an instanceOf method
https://bugs.webkit.org/show_bug.cgi?id=40120
* qt/api/qscriptvalue.cpp:
(QScriptValue::instanceOf):
* qt/api/qscriptvalue.h:
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::instanceOf):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
* qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
(tst_QScriptValue::instanceOf_initData):
(tst_QScriptValue::instanceOf_makeData):
(tst_QScriptValue::instanceOf_test):
2010-06-04 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (interpreter build fix).
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-06-04 Mark Rowe <mrowe@apple.com>
Silence some warnings seen on the build bot.
* JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline.
* JavaScriptCore.JSVALUE32only.exp: Ditto.
* JavaScriptCore.JSVALUE64only.exp: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't
complain about not knowing how to compile them.
2010-06-04 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 40187 - Change function signature of NativeConstructor to match NativeFunction
Mostly for consistency, but constructor & args arguments are redundant,
and this will help if we wish to be able to JIT calls to more constructors.
* API/JSCallbackConstructor.cpp:
(JSC::constructJSCallback):
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::construct):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeConstruct):
* interpreter/Interpreter.h:
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/ArrayConstructor.cpp:
(JSC::constructWithArrayConstructor):
* runtime/BooleanConstructor.cpp:
(JSC::constructWithBooleanConstructor):
* runtime/ConstructData.cpp:
(JSC::construct):
* runtime/ConstructData.h:
* runtime/DateConstructor.cpp:
(JSC::constructWithDateConstructor):
* runtime/Error.cpp:
(JSC::constructNativeError):
(JSC::Error::create):
* runtime/ErrorConstructor.cpp:
(JSC::constructWithErrorConstructor):
* runtime/FunctionConstructor.cpp:
(JSC::constructWithFunctionConstructor):
* runtime/NativeErrorConstructor.cpp:
(JSC::constructWithNativeErrorConstructor):
* runtime/NativeErrorConstructor.h:
(JSC::NativeErrorConstructor::errorStructure):
* runtime/NumberConstructor.cpp:
(JSC::constructWithNumberConstructor):
* runtime/ObjectConstructor.cpp:
(JSC::constructWithObjectConstructor):
* runtime/RegExpConstructor.cpp:
(JSC::constructWithRegExpConstructor):
* runtime/StringConstructor.cpp:
(JSC::constructWithStringConstructor):
2010-06-04 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Adam Barth.
Add a takeFirst() method to Deque and use it where appropriate.
https://bugs.webkit.org/show_bug.cgi?id=40089
* wtf/Deque.h:
(WTF::::takeFirst):
* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):
* wtf/MessageQueue.h:
(WTF::::tryGetMessage):
2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Remove a QEXPECT_FAIL flag from an autotest.
Test tst_QScriptEngine::globalObject pass after 36600 bug
fix have been applied.
[Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed.
https://bugs.webkit.org/show_bug.cgi?id=40114
* qt/tests/qscriptengine/tst_qscriptengine.cpp:
(tst_QScriptEngine::globalObject):
2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Fix QScriptValue::equals.
Handling for a few edge cases were added. Now comparison between
NaN, an invalid objects should works as supposed.
[Qt] QScriptValue::equals problems
https://bugs.webkit.org/show_bug.cgi?id=40110
* qt/api/qscriptvalue.cpp:
(QScriptValue::equals):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::equals):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
* qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
(tst_QScriptValue::equals_initData):
(tst_QScriptValue::equals_makeData):
(tst_QScriptValue::equals_test):
2010-06-03 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
New states in QScriptValuePrivate.
The CSpecial state was divided into CNull and CUndefined. It simplify
the QScriptValue code by avoiding a few "cast" and "if".
Moreover the MSVS compiler didn't like casting between a double and an
enum which is avoided now.
[Qt] The QScriptValuePrivate::CSpecial is too generic.
https://bugs.webkit.org/show_bug.cgi?id=40067
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::):
(QScriptValuePrivate::QScriptValuePrivate):
(QScriptValuePrivate::isNull):
(QScriptValuePrivate::isUndefined):
(QScriptValuePrivate::toString):
(QScriptValuePrivate::toNumber):
(QScriptValuePrivate::toBool):
(QScriptValuePrivate::toObject):
(QScriptValuePrivate::assignEngine):
(QScriptValuePrivate::isNumberBased):
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (Qt build fix).
* wtf/Platform.h:
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by Mark Rowe.
Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms
This was fixed in bug #40094.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/Platform.h:
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (Interpreter build fix).
* JavaScriptCore.JSVALUE32_64only.exp:
* JavaScriptCore.JSVALUE32only.exp:
* JavaScriptCore.JSVALUE64only.exp:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix II).
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix).
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-02 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 40094 - The return type of NativeFunction should be EncodedJSValue
On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::call):
* API/JSCallbackFunction.h:
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::call):
* JavaScriptCore.exp:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeCall):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* jsc.cpp:
(functionPrint):
(functionDebug):
(functionGC):
(functionVersion):
(functionRun):
(functionLoad):
(functionCheckSyntax):
(functionSetSamplingFlags):
(functionClearSamplingFlags):
(functionReadline):
(functionQuit):
* runtime/ArrayConstructor.cpp:
(JSC::callArrayConstructor):
(JSC::arrayConstructorIsArray):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncConcat):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSort):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/BooleanConstructor.cpp:
(JSC::callBooleanConstructor):
* runtime/BooleanPrototype.cpp:
(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):
* runtime/CallData.h:
* runtime/DateConstructor.cpp:
(JSC::callDate):
(JSC::dateParse):
(JSC::dateNow):
(JSC::dateUTC):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncToLocaleString):
(JSC::dateProtoFuncToLocaleDateString):
(JSC::dateProtoFuncToLocaleTimeString):
(JSC::dateProtoFuncGetTime):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncToGMTString):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
(JSC::dateProtoFuncToJSON):
* runtime/ErrorConstructor.cpp:
(JSC::callErrorConstructor):
* runtime/ErrorPrototype.cpp:
(JSC::errorProtoFuncToString):
* runtime/FunctionConstructor.cpp:
(JSC::callFunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::callFunctionPrototype):
(JSC::functionProtoFuncToString):
(JSC::functionProtoFuncApply):
(JSC::functionProtoFuncCall):
* runtime/JSCell.h:
(JSC::getCallData):
(JSC::getConstructData):
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSFunction.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
(JSC::globalFuncParseInt):
(JSC::globalFuncParseFloat):
(JSC::globalFuncIsNaN):
(JSC::globalFuncIsFinite):
(JSC::globalFuncDecodeURI):
(JSC::globalFuncDecodeURIComponent):
(JSC::globalFuncEncodeURI):
(JSC::globalFuncEncodeURIComponent):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
(JSC::globalFuncJSCPrint):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSONObject.cpp:
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
* runtime/JSObject.cpp:
(JSC::callDefaultValueFunction):
* runtime/JSValue.h:
* runtime/MathObject.cpp:
(JSC::mathProtoFuncAbs):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncCeil):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncFloor):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
(JSC::mathProtoFuncRandom):
(JSC::mathProtoFuncRound):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncSqrt):
(JSC::mathProtoFuncTan):
* runtime/NativeErrorConstructor.cpp:
(JSC::callNativeErrorConstructor):
* runtime/NumberConstructor.cpp:
(JSC::callNumberConstructor):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
* runtime/ObjectConstructor.cpp:
(JSC::callObjectConstructor):
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorKeys):
(JSC::toPropertyDescriptor):
(JSC::objectConstructorDefineProperty):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncIsPrototypeOf):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncPropertyIsEnumerable):
(JSC::objectProtoFuncToLocaleString):
(JSC::objectProtoFuncToString):
* runtime/ObjectPrototype.h:
* runtime/RegExpConstructor.cpp:
(JSC::callRegExpConstructor):
* runtime/RegExpObject.cpp:
(JSC::callRegExpObject):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCode):
(JSC::callStringConstructor):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncToString):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncConcat):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplit):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncLocaleCompare):
(JSC::stringProtoFuncBig):
(JSC::stringProtoFuncSmall):
(JSC::stringProtoFuncBlink):
(JSC::stringProtoFuncBold):
(JSC::stringProtoFuncFixed):
(JSC::stringProtoFuncItalics):
(JSC::stringProtoFuncStrike):
(JSC::stringProtoFuncSub):
(JSC::stringProtoFuncSup):
(JSC::stringProtoFuncFontcolor):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncAnchor):
(JSC::stringProtoFuncLink):
(JSC::stringProtoFuncTrim):
(JSC::stringProtoFuncTrimLeft):
(JSC::stringProtoFuncTrimRight):
2010-06-02 Mark Rowe <mrowe@apple.com>
Reviewed by Gavin Barraclough.
Add value-representation specific sections to the mac export file.
* Configurations/JavaScriptCore.xcconfig:
* DerivedSources.make:
* JavaScriptCore.JSVALUE32_64only.exp: Added.
* JavaScriptCore.JSVALUE32only.exp: Added.
* JavaScriptCore.JSVALUE64only.exp: Added.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-06-02 Mark Rowe <mrowe@apple.com>
Reviewed by Gavin Barraclough.
<rdar://problem/8054988> Work around an LLVM GCC code generation bug that results in crashes inside PCRE.
* pcre/pcre_exec.cpp:
(repeatInformationFromInstructionOffset): Change the type of instructionOffset to int. There's no good
reason for it to be a short, and using int prevents this code from triggering the LLVM GCC bug.
2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Fix the QScriptValue::strictlyEquals function.
Handling for a few edge cases was added.
New autotest that covers the QScriptValue::strictlyEquals function.
[Qt] QScriptValue::strictlyEquals is broken
https://bugs.webkit.org/show_bug.cgi?id=36600
* qt/api/qscriptvalue.cpp:
(QScriptValue::strictlyEquals):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::strictlyEquals):
* qt/tests/qscriptvalue/qscriptvalue.pro:
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
* qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: Added.
(tst_QScriptValue::strictlyEquals_initData):
(tst_QScriptValue::strictlyEquals_makeData):
(tst_QScriptValue::strictlyEquals_test):
2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
New function QScriptEngine::newObject.
The function creates a object of class Object and returns it
as a QScriptValue.
[Qt] QScriptEngine API should contain a newObject function
https://bugs.webkit.org/show_bug.cgi?id=39114
* qt/api/qscriptengine.cpp:
(QScriptEngine::newObject):
* qt/api/qscriptengine.h:
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::newObject):
* qt/api/qscriptengine_p.h:
* qt/tests/qscriptengine/tst_qscriptengine.cpp:
(tst_QScriptEngine::newObject):
2010-06-02 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
https://bugs.webkit.org/show_bug.cgi?id=40011
Thumb-2 build fix: The offset parameter of ldrh should be encoded as an
imm12 immediate constant in load16. If it is not fit in the instruction
a temporary register has to be used.
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::load16):
2010-06-02 Sterling Swigart <sswigart@google.com>
Reviewed by David Levin.
Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches.
https://bugs.webkit.org/show_bug.cgi?id=39906
* Configurations/FeatureDefines.xcconfig:
2010-06-01 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 40021 - Refactor bytecode generation for calls so that register for this & args are allocated together
This is a useful stepping stone towards reversing argument order.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::addParameter):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallEval):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
(JSC::CallArguments::thisRegister):
(JSC::CallArguments::argumentRegister):
(JSC::CallArguments::callFrame):
(JSC::CallArguments::count):
(JSC::BytecodeGenerator::shouldEmitProfileHooks):
* bytecompiler/NodesCodegen.cpp:
(JSC::NewExprNode::emitBytecode):
(JSC::CallArguments::CallArguments):
(JSC::EvalFunctionCallNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::FunctionCallBracketNode::emitBytecode):
(JSC::FunctionCallDotNode::emitBytecode):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
2010-06-01 Yong Li <yoli@rim.com>
Reviewed by Darin Adler.
Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex.
https://bugs.webkit.org/show_bug.cgi?id=39893
* wtf/ThreadingPthreads.cpp:
(WTF::Mutex::Mutex):
2010-06-01 Kwang Yul Seo <skyul@company100.net>
Reviewed by Xan Lopez.
[GTK] Use DEFINE_STATIC_LOCAL for threadMapMutex and threadMap
https://bugs.webkit.org/show_bug.cgi?id=39831
Use DEFINE_STATIC_LOCAL for static local variables.
* wtf/gtk/ThreadingGtk.cpp:
(WTF::threadMapMutex):
(WTF::threadMap):
(WTF::identifierByGthreadHandle):
2010-06-01 Kent Tamura <tkent@chromium.org>
Reviewed by Shinichiro Hamaji.
Fix style errors of dtoa
https://bugs.webkit.org/show_bug.cgi?id=39972
Fix all errors reported by check-webkit-style.
* wtf/dtoa.cpp:
* wtf/dtoa.h:
2010-05-30 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
* wtf/OwnArrayPtr.h:
(WTF::OwnArrayPtr::set): Fix the assertion in here to match the one in OwnPtr.
At some point someone fixed the "asserts when assigning to 0 and the pointer is
already 0" issue in OwnPtr but forgot to do it here.
2010-05-29 Geoffrey Garen <ggaren@apple.com>
Windows build fix: Updated exported symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-05-29 Geoffrey Garen <ggaren@apple.com>
Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I
can figure out why it's crashing.
* wtf/Platform.h:
2010-05-29 Geoffrey Garen <ggaren@apple.com>
Fixed Windows crash seen on buildbot.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first
argument in ecx.
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Windows build fix: Updated exported symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL
is disabled.
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
* wtf/Platform.h:
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Windows build fix: Updated exported symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
Simplified the host calling convention.
22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host
function calls.
No change on SunSpider.
All JS calls (but not constructs, yet) now go through the normal JS
calling convention via the RegisterFile. As a result, the host calling
convention, which used to be this
JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&)
is now this
JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*)
Callee, 'this', and argument access all hapen relative to the ExecState*,
which is a pointer into the RegisterFile.
This patch comes in two parts.
PART ONE: Functional code changes.
* wtf/Platform.h: Disabled optimized calls on platforms I didn't test.
We can re-enable once we verify that host calls on these platforms are
correct.
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::functionName):
(JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to
ExecState::callee().
(JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue().
* interpreter/CallFrame.cpp:
* interpreter/CallFrame.h:
(JSC::ExecState::callee):
(JSC::ExecState::scopeChain):
(JSC::ExecState::init): Changed callee() to be JSObject* instead of
JSFunction* -- now, it might be some other callable host object.
(JSC::ExecState::hostThisRegister):
(JSC::ExecState::hostThisValue):
(JSC::ExecState::argumentCount):
(JSC::ExecState::argumentCountIncludingThis):
(JSC::ExecState::argument):
(JSC::ExecState::setArgumentCountIncludingThis):
(JSC::ExecState::setCallee): Added convenient accessors for arguments
from within a host function. Removed thisValue() because it was too
tempting to use incorrectly, and it only had one or two clients, anyway.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue().
(JSC::Interpreter::throwException): Be sure to shrink the register file
before invoking the exception handler, to reduce the chances that the
handler will re-throw in the case of stack overflow. (Re-throwing is now
more likely than it used to be, since standardizing the calling convention
implicitly added stack overflow checks to some places where they used to be missing.)
(JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope.
Updated for CallFrame::init API change.
(JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope.
Updated for CallFrame::init API change. Added support for calling a host
function.
(JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope.
Updated for CallFrame::init API change.
(JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change.
(JSC::Interpreter::privateExecute): Updated for CallFrame::init API change.
Added some explicit JSValue(JSObject*) initialization, since relaxing
the JSFunction* restriction on callee has made register types more ambiguous.
Removed toThisObject() conversion, since all callees do it themselves now.
Updated host function call for new host function signature. Updated for
change to ExecState::argumentCount() API.
* interpreter/Register.h:
(JSC::Register::):
(JSC::Register::operator=):
(JSC::Register::function): Changed callee() to be JSObject* instead of
JSFunction* -- now, it might be some other callable host object.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that
set up the arguments to host functions -- all but one of the arguments
are gone now. This is the actual optimization.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API
changes noted above. Removed toThisObject() conversion, since all callees
do it themselves now.
* runtime/ArgList.h:
(JSC::ArgList::ArgList): ArgList is getting close to unused. Added a
temporary shim for converting from ExecState* to ArgList where it's still
necessary.
* runtime/Arguments.h:
(JSC::Arguments::getArgumentsData):
(JSC::Arguments::Arguments): Updated for ExecState and Register API
changes noted above.
* runtime/CallData.cpp:
(JSC::call): Changed call always to call Interpreter::executeCall, even
for host functions. This ensures that the normal calling convention is
set up in the RegsiterFile when calling from C++ to host function.
* runtime/CallData.h: Changed host function signature as described above.
* runtime/ConstructData.cpp:
(JSC::construct): Moved JSFunction::construct code here so I could nix
JSFunction::call and JSFunction::call. We want a JSFunction-agnostic
way to call and construct, so that everything works naturally for non-
JSFunction objects.
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSFunction.h: Updated for ExecState and Register API changes
noted above. Nixed JSFunction::call and JSFunction::construct, noted above.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Ditto.
PART TWO: Global search and replace.
In the areas below, I used global search-and-replace to change
(ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
args.size() => exec->argumentCount()
args.at(i) => exec->argument(i)
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::call):
* API/JSCallbackFunction.h:
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::call):
* JavaScriptCore.exp:
* jsc.cpp:
(functionPrint):
(functionDebug):
(functionGC):
(functionVersion):
(functionRun):
(functionLoad):
(functionCheckSyntax):
(functionSetSamplingFlags):
(functionClearSamplingFlags):
(functionReadline):
(functionQuit):
* runtime/ArrayConstructor.cpp:
(JSC::callArrayConstructor):
(JSC::arrayConstructorIsArray):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncConcat):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSort):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/BooleanConstructor.cpp:
(JSC::callBooleanConstructor):
* runtime/BooleanPrototype.cpp:
(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):
* runtime/DateConstructor.cpp:
(JSC::callDate):
(JSC::dateParse):
(JSC::dateNow):
(JSC::dateUTC):
* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate):
(JSC::fillStructuresUsingTimeArgs):
(JSC::fillStructuresUsingDateArgs):
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncToLocaleString):
(JSC::dateProtoFuncToLocaleDateString):
(JSC::dateProtoFuncToLocaleTimeString):
(JSC::dateProtoFuncGetTime):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncToGMTString):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
(JSC::dateProtoFuncToJSON):
* runtime/ErrorConstructor.cpp:
(JSC::callErrorConstructor):
* runtime/ErrorPrototype.cpp:
(JSC::errorProtoFuncToString):
* runtime/FunctionConstructor.cpp:
(JSC::callFunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::callFunctionPrototype):
(JSC::functionProtoFuncToString):
(JSC::functionProtoFuncApply):
(JSC::functionProtoFuncCall):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::decode):
(JSC::globalFuncEval):
(JSC::globalFuncParseInt):
(JSC::globalFuncParseFloat):
(JSC::globalFuncIsNaN):
(JSC::globalFuncIsFinite):
(JSC::globalFuncDecodeURI):
(JSC::globalFuncDecodeURIComponent):
(JSC::globalFuncEncodeURI):
(JSC::globalFuncEncodeURIComponent):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
(JSC::globalFuncJSCPrint):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSONObject.cpp:
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
* runtime/JSString.h:
* runtime/MathObject.cpp:
(JSC::mathProtoFuncAbs):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncCeil):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncFloor):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
(JSC::mathProtoFuncRandom):
(JSC::mathProtoFuncRound):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncSqrt):
(JSC::mathProtoFuncTan):
* runtime/NativeErrorConstructor.cpp:
(JSC::callNativeErrorConstructor):
* runtime/NumberConstructor.cpp:
(JSC::callNumberConstructor):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
* runtime/ObjectConstructor.cpp:
(JSC::callObjectConstructor):
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorKeys):
(JSC::objectConstructorDefineProperty):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncIsPrototypeOf):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncPropertyIsEnumerable):
(JSC::objectProtoFuncToLocaleString):
(JSC::objectProtoFuncToString):
* runtime/ObjectPrototype.h:
* runtime/Operations.h:
(JSC::jsString):
* runtime/RegExpConstructor.cpp:
(JSC::callRegExpConstructor):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::test):
(JSC::RegExpObject::exec):
(JSC::callRegExpObject):
(JSC::RegExpObject::match):
* runtime/RegExpObject.h:
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCodeSlowCase):
(JSC::stringFromCharCode):
(JSC::callStringConstructor):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncToString):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncConcat):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplit):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncLocaleCompare):
(JSC::stringProtoFuncBig):
(JSC::stringProtoFuncSmall):
(JSC::stringProtoFuncBlink):
(JSC::stringProtoFuncBold):
(JSC::stringProtoFuncFixed):
(JSC::stringProtoFuncItalics):
(JSC::stringProtoFuncStrike):
(JSC::stringProtoFuncSub):
(JSC::stringProtoFuncSup):
(JSC::stringProtoFuncFontcolor):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncAnchor):
(JSC::stringProtoFuncLink):
(JSC::stringProtoFuncTrim):
(JSC::stringProtoFuncTrimLeft):
(JSC::stringProtoFuncTrimRight):
2010-05-28 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Geoffrey Garen.
Fix the JSObjectSetPrototype function.
A cycle in a prototype chain can cause an application hang or
even crash.
A check for a prototype chain cycles was added to
the JSObjectSetPrototype.
JSObjectSetPrototype doesn't check for cycle in prototype chain.
https://bugs.webkit.org/show_bug.cgi?id=39360
* API/JSObjectRef.cpp:
(JSObjectSetPrototype):
* API/tests/testapi.c:
(assertTrue):
(checkForCycleInPrototypeChain):
(main):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
* runtime/JSObject.h:
(JSC::JSObject::setPrototypeWithCycleCheck):
2010-05-28 Chao-ying Fu <fu@mips.com>
Reviewed by Eric Seidel.
Fix MIPS JIT DoubleGreaterThanOrEqual Operands
https://bugs.webkit.org/show_bug.cgi?id=39504
Swapped two operands of left and right for DoubleGreaterThanOrEqual.
This patch fixed two layout tests as follows.
fast/js/comparison-operators-greater.html
fast/js/comparison-operators-less.html
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchDouble):
2010-05-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Move jit compilation from linking thunks into cti_vm_lazyLink methods.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
2010-05-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 39898 - Move arity check into callee.
We can reduce the size of the virtual call trampolines by moving the arity check
into the callee functions. As a following step we will be able to remove the
check for native function / codeblocks by performing translation in a lazy stub.
* interpreter/CallFrame.h:
(JSC::ExecState::init):
(JSC::ExecState::setReturnPC):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
(JSC::JIT::linkCall):
(JSC::JIT::linkConstruct):
* jit/JIT.h:
(JSC::JIT::compile):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::generateJITCodeForCall):
(JSC::FunctionExecutable::generateJITCodeForConstruct):
(JSC::FunctionExecutable::reparseExceptionInfo):
* runtime/Executable.h:
(JSC::NativeExecutable::NativeExecutable):
(JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck):
(JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
2010-05-27 Luiz Agostini <luiz.agostini@openbossa.org>
Reviewed by Darin Adler.
UTF-16 code points compare() for String objects
https://bugs.webkit.org/show_bug.cgi?id=39701
Moving compare() implementation from UString to StringImpl for it to be shared
with String. Adding overloaded free functions codePointCompare() in StringImpl
and WTFString. Renaming function compare in UString to codePointCompare to be
consistent.
* runtime/JSArray.cpp:
(JSC::compareByStringPairForQSort):
* runtime/UString.cpp:
* runtime/UString.h:
(JSC::codePointCompare):
* wtf/text/StringImpl.cpp:
(WebCore::codePointCompare):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.cpp:
(WebCore::codePointCompare):
* wtf/text/WTFString.h:
2010-05-26 Darin Adler <darin@apple.com>
Reviewed by Kent Tamura.
Null characters handled incorrectly in ToNumber conversion
https://bugs.webkit.org/show_bug.cgi?id=38088
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::parseInt): Changed code to use UTF8String().data() instead of
ascii() to fix the thread safety issue. Code path is covered by existing
tests in run-javascriptcore-tests.
(JSC::parseFloat): Moved comment to UString::toDouble since the issue
affects all clients, not just parseFloat. Specifically, this also affects
standard JavaScript numeric conversion, ToNumber.
* runtime/UString.cpp:
(JSC::UString::toDouble): Added a comment about incorrect space skipping.
Changed trailing junk check to use the length of the CString instead of
checking for a null character. Also got rid of a little unneeded logic
in the case where we tolerate trailing junk.
2010-05-27 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
Search for the new allocation one word at a time. Improves
performance on SunSpider by approximately 1%.
http://bugs.webkit.org/show_bug.cgi?id=39758
* runtime/Collector.cpp:
(JSC::Heap::allocate):
* runtime/Collector.h:
(JSC::CollectorBitmap::advanceToNextPossibleFreeCell):
2010-05-27 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fixes for Windows after recent changes.
* wscript:
2010-05-27 Gustavo Noronha Silva <gns@gnome.org>
More build fixage for make dist.
* GNUmakefile.am:
2010-05-27 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
RVCT does not have strnstr.
https://bugs.webkit.org/show_bug.cgi?id=39719
Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr.
* wtf/StringExtras.h:
2010-05-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
(relanding r60267)
If the last item in a main disjunction is a quantified set of parentheses,
this is easier to code generate for than the general case for quantified
parentheses. This is because we never need to backtrack into the parentheses
- the first match will be the final and accepted match.
This patch also somewhat reverts a recent change to when fallback to PCRE
occurs. At the minute the compiler is tracking on patterns which will
require JIT fallback. This is handy from a performance perspective (it saves
the failed attempt at JIT compilation), but it means introducing knowledge
of the JITs capabilities into the other layers of the regex compilers. For
the specific feature of back-references, add a flag tracking their presence
on the pattern, and make these expressions fallback without attempting to
JIT. For parentheses, return to detecting which cases are have or have not
been handled during JIT compilation.
18% progression on tagcloud, ~1.5% overall on sunspidey.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomBackReference):
(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::RegexGenerator::generateTerm):
(JSC::Yarr::RegexGenerator::RegexGenerator):
(JSC::Yarr::RegexGenerator::shouldFallBack):
(JSC::Yarr::jitCompileRegex):
* yarr/RegexPattern.h:
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-05-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (revert).
Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomBackReference):
(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::TermGenerationState::term):
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
(JSC::Yarr::RegexGenerator::generateTerm):
(JSC::Yarr::RegexGenerator::RegexGenerator):
(JSC::Yarr::jitCompileRegex):
* yarr/RegexPattern.h:
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-05-26 Gustavo Noronha Silva <gns@gnome.org>
Build fixes for make distcheck.
* GNUmakefile.am:
2010-05-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
If the last item in a main disjunction is a quantified set of parentheses,
this is easier to code generate for than the general case for quantified
parentheses. This is because we never need to backtrack into the parentheses
- the first match will be the final and accepted match.
This patch also somewhat reverts a recent change to when fallback to PCRE
occurs. At the minute the compiler is tracking on patterns which will
require JIT fallback. This is handy from a performance perspective (it saves
the failed attempt at JIT compilation), but it means introducing knowledge
of the JITs capabilities into the other layers of the regex compilers. For
the specific feature of back-references, add a flag tracking their presence
on the pattern, and make these expressions fallback without attempting to
JIT. For parentheses, return to detecting which cases are have or have not
been handled during JIT compilation.
18% progression on tagcloud, ~1.5% overall on sunspidey.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomBackReference):
(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::RegexGenerator::generateTerm):
(JSC::Yarr::RegexGenerator::RegexGenerator):
(JSC::Yarr::RegexGenerator::shouldFallBack):
(JSC::Yarr::jitCompileRegex):
* yarr/RegexPattern.h:
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-05-26 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Fixed a crash seen on the Leopard bot, caused by merge.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe,
since it's no longer passed to us as an argument.
2010-05-25 Geoffrey Garen <ggaren@apple.com>
Fixed build failure caused by merge.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this
function no longer returns a pair.
2010-05-25 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
<rdar://problem/8020221>
Fixed a crash seen on Windows when calling a function with too many
arguments.
SunSpider reports no change.
No test because the ASSERT I added fires in existing tests.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too
many arguments have been provided, since the caller only allocated enough
registerFile space for the arguments it provided, not enough for the extra
copy of arguments we're going to need.
2010-05-25 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
Build fix for JSFunction
https://bugs.webkit.org/show_bug.cgi?id=39658
MSVC can't compile one of JSFunction constructors when JIT is disabled.
"PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined.
Add ENABLE(JIT) guard to the constructor.
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
* runtime/JSFunction.h:
2010-05-24 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call.
Presently, as soon as op-call strays off the hot path we set up a set of values on
the stack to be passed as arguments to cti functions, in case any should be called.
Instead, hoist the setup of the callframe to happen slightly sooner, and make the
cti functions to compile & check arity read these values from the callframe. This
allows up to remove the deprecated methods to manually set up cti arguments, rather
than using JITStubCall.h.
* interpreter/CallFrame.h:
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileOpCallInitializeCallFrame):
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCallVarargsSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCallInitializeCallFrame):
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCallVarargsSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITInlineMethods.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
(JSC::):
2010-05-24 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Relanding r60075.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
* bytecode/CodeBlock.h:
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitGetByIdExceptionInfo):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_convert_this):
(JSC::JIT::emit_op_get_callee):
(JSC::JIT::emit_op_create_this):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_get_callee):
(JSC::JIT::emit_op_create_this):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
(JSC::JITThunks::hostFunctionStub):
* jit/JITStubs.h:
(JSC::JITThunks::ctiNativeConstruct):
(JSC::):
* runtime/ExceptionHelpers.cpp:
(JSC::createNotAnObjectError):
* runtime/Executable.h:
(JSC::NativeExecutable::create):
(JSC::NativeExecutable::NativeExecutable):
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSFunction.h:
* wtf/Platform.h:
== Rolled over to ChangeLog-2010-05-24 ==
|