|
1147 | 1147 | if
|
1148 | 1148 | i32.const 0
|
1149 | 1149 | i32.const 672
|
1150 |
| - i32.const 378 |
| 1150 | + i32.const 382 |
1151 | 1151 | i32.const 14
|
1152 | 1152 | call $~lib/builtins/abort
|
1153 | 1153 | unreachable
|
|
1193 | 1193 | if
|
1194 | 1194 | i32.const 0
|
1195 | 1195 | i32.const 672
|
1196 |
| - i32.const 385 |
| 1196 | + i32.const 389 |
1197 | 1197 | i32.const 16
|
1198 | 1198 | call $~lib/builtins/abort
|
1199 | 1199 | unreachable
|
|
1226 | 1226 | if
|
1227 | 1227 | i32.const 0
|
1228 | 1228 | i32.const 672
|
1229 |
| - i32.const 398 |
| 1229 | + i32.const 402 |
1230 | 1230 | i32.const 5
|
1231 | 1231 | call $~lib/builtins/abort
|
1232 | 1232 | unreachable
|
|
1470 | 1470 | if
|
1471 | 1471 | i32.const 0
|
1472 | 1472 | i32.const 672
|
1473 |
| - i32.const 560 |
| 1473 | + i32.const 562 |
1474 | 1474 | i32.const 3
|
1475 | 1475 | call $~lib/builtins/abort
|
1476 | 1476 | unreachable
|
|
1799 | 1799 | if
|
1800 | 1800 | i32.const 336
|
1801 | 1801 | i32.const 672
|
1802 |
| - i32.const 459 |
| 1802 | + i32.const 461 |
1803 | 1803 | i32.const 29
|
1804 | 1804 | call $~lib/builtins/abort
|
1805 | 1805 | unreachable
|
|
1808 | 1808 | call $~lib/rt/tlsf/computeSize
|
1809 | 1809 | return
|
1810 | 1810 | )
|
| 1811 | + (func $~lib/rt/tlsf/roundSize (param $size i32) (result i32) |
| 1812 | + local.get $size |
| 1813 | + i32.const 536870910 |
| 1814 | + i32.lt_u |
| 1815 | + if (result i32) |
| 1816 | + local.get $size |
| 1817 | + i32.const 1 |
| 1818 | + i32.const 27 |
| 1819 | + local.get $size |
| 1820 | + i32.clz |
| 1821 | + i32.sub |
| 1822 | + i32.shl |
| 1823 | + i32.add |
| 1824 | + i32.const 1 |
| 1825 | + i32.sub |
| 1826 | + else |
| 1827 | + local.get $size |
| 1828 | + end |
| 1829 | + return |
| 1830 | + ) |
1811 | 1831 | (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32)
|
1812 | 1832 | (local $fl i32)
|
1813 | 1833 | (local $sl i32)
|
|
1837 | 1857 | local.set $sl
|
1838 | 1858 | else
|
1839 | 1859 | local.get $size
|
1840 |
| - i32.const 536870910 |
1841 |
| - i32.lt_u |
1842 |
| - if (result i32) |
1843 |
| - local.get $size |
1844 |
| - i32.const 1 |
1845 |
| - i32.const 27 |
1846 |
| - local.get $size |
1847 |
| - i32.clz |
1848 |
| - i32.sub |
1849 |
| - i32.shl |
1850 |
| - i32.add |
1851 |
| - i32.const 1 |
1852 |
| - i32.sub |
1853 |
| - else |
1854 |
| - local.get $size |
1855 |
| - end |
| 1860 | + call $~lib/rt/tlsf/roundSize |
1856 | 1861 | local.set $requestSize
|
1857 |
| - i32.const 31 |
| 1862 | + i32.const 4 |
| 1863 | + i32.const 8 |
| 1864 | + i32.mul |
| 1865 | + i32.const 1 |
| 1866 | + i32.sub |
1858 | 1867 | local.get $requestSize
|
1859 | 1868 | i32.clz
|
1860 | 1869 | i32.sub
|
|
1892 | 1901 | if
|
1893 | 1902 | i32.const 0
|
1894 | 1903 | i32.const 672
|
1895 |
| - i32.const 330 |
| 1904 | + i32.const 334 |
1896 | 1905 | i32.const 14
|
1897 | 1906 | call $~lib/builtins/abort
|
1898 | 1907 | unreachable
|
|
1963 | 1972 | if
|
1964 | 1973 | i32.const 0
|
1965 | 1974 | i32.const 672
|
1966 |
| - i32.const 343 |
| 1975 | + i32.const 347 |
1967 | 1976 | i32.const 18
|
1968 | 1977 | call $~lib/builtins/abort
|
1969 | 1978 | unreachable
|
|
2026 | 2035 | (local $pagesAfter i32)
|
2027 | 2036 | i32.const 0
|
2028 | 2037 | drop
|
| 2038 | + local.get $size |
| 2039 | + i32.const 256 |
| 2040 | + i32.ge_u |
| 2041 | + if |
| 2042 | + local.get $size |
| 2043 | + call $~lib/rt/tlsf/roundSize |
| 2044 | + local.set $size |
| 2045 | + end |
2029 | 2046 | memory.size $0
|
2030 | 2047 | local.set $pagesBefore
|
2031 | 2048 | local.get $size
|
|
2047 | 2064 | i32.add
|
2048 | 2065 | local.set $size
|
2049 | 2066 | local.get $size
|
2050 |
| - i32.const 536870910 |
2051 |
| - i32.lt_u |
2052 |
| - if |
2053 |
| - local.get $size |
2054 |
| - i32.const 1 |
2055 |
| - i32.const 27 |
2056 |
| - local.get $size |
2057 |
| - i32.clz |
2058 |
| - i32.sub |
2059 |
| - i32.shl |
2060 |
| - i32.const 1 |
2061 |
| - i32.sub |
2062 |
| - i32.add |
2063 |
| - local.set $size |
2064 |
| - end |
2065 |
| - local.get $size |
2066 | 2067 | i32.const 65535
|
2067 | 2068 | i32.add
|
2068 | 2069 | i32.const 65535
|
|
2128 | 2129 | if
|
2129 | 2130 | i32.const 0
|
2130 | 2131 | i32.const 672
|
2131 |
| - i32.const 357 |
| 2132 | + i32.const 361 |
2132 | 2133 | i32.const 14
|
2133 | 2134 | call $~lib/builtins/abort
|
2134 | 2135 | unreachable
|
|
2243 | 2244 | if
|
2244 | 2245 | i32.const 0
|
2245 | 2246 | i32.const 672
|
2246 |
| - i32.const 497 |
| 2247 | + i32.const 499 |
2247 | 2248 | i32.const 16
|
2248 | 2249 | call $~lib/builtins/abort
|
2249 | 2250 | unreachable
|
|
2263 | 2264 | if
|
2264 | 2265 | i32.const 0
|
2265 | 2266 | i32.const 672
|
2266 |
| - i32.const 499 |
| 2267 | + i32.const 501 |
2267 | 2268 | i32.const 14
|
2268 | 2269 | call $~lib/builtins/abort
|
2269 | 2270 | unreachable
|
|
4943 | 4944 | (local $i|4 i32)
|
4944 | 4945 | (local $5 i32)
|
4945 | 4946 | global.get $~lib/memory/__stack_pointer
|
4946 |
| - i32.const 12 |
| 4947 | + i32.const 16 |
4947 | 4948 | i32.sub
|
4948 | 4949 | global.set $~lib/memory/__stack_pointer
|
4949 | 4950 | call $~stack_check
|
4950 | 4951 | global.get $~lib/memory/__stack_pointer
|
4951 | 4952 | i64.const 0
|
4952 | 4953 | i64.store $0
|
4953 | 4954 | global.get $~lib/memory/__stack_pointer
|
4954 |
| - i32.const 0 |
4955 |
| - i32.store $0 offset=8 |
| 4955 | + i64.const 0 |
| 4956 | + i64.store $0 offset=8 |
4956 | 4957 | global.get $~lib/memory/__stack_pointer
|
4957 | 4958 | i32.const 0
|
4958 | 4959 | local.get $a
|
|
4997 | 4998 | local.set $5
|
4998 | 4999 | global.get $~lib/memory/__stack_pointer
|
4999 | 5000 | local.get $5
|
5000 |
| - i32.store $0 offset=8 |
| 5001 | + i32.store $0 offset=12 |
5001 | 5002 | local.get $5
|
5002 | 5003 | local.get $i
|
5003 | 5004 | call $~lib/array/Array<~lib/string/String>#__get
|
|
5037 | 5038 | local.set $5
|
5038 | 5039 | global.get $~lib/memory/__stack_pointer
|
5039 | 5040 | local.get $5
|
5040 |
| - i32.store $0 offset=8 |
| 5041 | + i32.store $0 offset=12 |
5041 | 5042 | local.get $5
|
5042 | 5043 | call $~lib/array/Array<~lib/string/String>#get:length
|
5043 | 5044 | local.get $i|4
|
|
5046 | 5047 | local.set $5
|
5047 | 5048 | global.get $~lib/memory/__stack_pointer
|
5048 | 5049 | local.get $5
|
5049 |
| - i32.store $0 offset=8 |
| 5050 | + i32.store $0 offset=12 |
5050 | 5051 | local.get $5
|
5051 | 5052 | local.get $i|4
|
5052 | 5053 | call $~lib/array/Array<~lib/string/String>#__get
|
|
5066 | 5067 | local.get $c
|
5067 | 5068 | local.set $5
|
5068 | 5069 | global.get $~lib/memory/__stack_pointer
|
5069 |
| - i32.const 12 |
| 5070 | + i32.const 16 |
5070 | 5071 | i32.add
|
5071 | 5072 | global.set $~lib/memory/__stack_pointer
|
5072 | 5073 | local.get $5
|
|
0 commit comments