Skip to content

Commit ad3ebe5

Browse files
committed
overhauls memory initialization (turns out readonly isn't that helpful)
1 parent fbc5675 commit ad3ebe5

20 files changed

+777
-82
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
22
target/
33
*.tsbuildinfo
4-
packages/playground/evaluate/results*
4+
packages/playground/evaluate/results*
5+
packages/playground/doom/doom.actual.ts

cspell.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ words:
1919
- instrs
2020
- memcpy
2121
- memset
22+
- omnisciences
2223
- Omniverse
2324
- Patronum
2425
- prolly

packages/conformance-tests/from-c/conway.actual.ts

Lines changed: 87 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Func, bootstrap } from 'wasm-to-typescript-types'
2-
import type { StoreString } from 'ts-type-math'
32

43
type $__wasm_call_ctors = Satisfies<Func, {
54
kind: 'func';
@@ -1862,13 +1861,97 @@ export type entry<
18621861
$__stack_end: '00000000000000000000000000000000';
18631862
$__stack_base: '00000000000000000000000000000000';
18641863
};
1865-
memory:
1866-
& StoreString<'00000000000000000000010000000000', $_rodata>
1864+
memory:
1865+
& $_rodata
18671866
;
18681867
memorySize: '00000000000000000000000100000000';
18691868
indirect: ['$__wasm_call_ctors'];
18701869
},
18711870
debugMode,
18721871
stopAt
18731872
>
1874-
type $_rodata = ``;
1873+
1874+
/**  */
1875+
type $_rodata = {
1876+
'00000000000000000000010000000000': '00000001'; // 
1877+
'00000000000000000000010000000001': '00000001'; // 
1878+
'00000000000000000000010000000010': '00000000'; //
1879+
'00000000000000000000010000000011': '00000000'; //
1880+
'00000000000000000000010000000100': '00000000'; //
1881+
'00000000000000000000010000000101': '00000000'; //
1882+
'00000000000000000000010000000110': '00000000'; //
1883+
'00000000000000000000010000000111': '00000000'; //
1884+
'00000000000000000000010000001000': '00000000'; //
1885+
'00000000000000000000010000001001': '00000000'; //
1886+
'00000000000000000000010000001010': '00000000'; //
1887+
'00000000000000000000010000001011': '00000000'; //
1888+
'00000000000000000000010000001100': '00000000'; //
1889+
'00000000000000000000010000001101': '00000000'; //
1890+
'00000000000000000000010000001110': '00000000'; //
1891+
'00000000000000000000010000001111': '00000000'; //
1892+
'00000000000000000000010000010000': '00000000'; //
1893+
'00000000000000000000010000010001': '00000000'; //
1894+
'00000000000000000000010000010010': '00000000'; //
1895+
'00000000000000000000010000010011': '00000000'; //
1896+
'00000000000000000000010000010100': '00000000'; //
1897+
'00000000000000000000010000010101': '00000000'; //
1898+
'00000000000000000000010000010110': '00000000'; //
1899+
'00000000000000000000010000010111': '00000000'; //
1900+
'00000000000000000000010000011000': '00000000'; //
1901+
'00000000000000000000010000011001': '00000000'; //
1902+
'00000000000000000000010000011010': '00000000'; //
1903+
'00000000000000000000010000011011': '00000000'; //
1904+
'00000000000000000000010000011100': '00000000'; //
1905+
'00000000000000000000010000011101': '00000000'; //
1906+
'00000000000000000000010000011110': '00000000'; //
1907+
'00000000000000000000010000011111': '00000001'; // 
1908+
'00000000000000000000010000100000': '00000000'; //
1909+
'00000000000000000000010000100001': '00000000'; //
1910+
'00000000000000000000010000100010': '00000000'; //
1911+
'00000000000000000000010000100011': '00000000'; //
1912+
'00000000000000000000010000100100': '00000000'; //
1913+
'00000000000000000000010000100101': '00000000'; //
1914+
'00000000000000000000010000100110': '00000000'; //
1915+
'00000000000000000000010000100111': '00000001'; // 
1916+
'00000000000000000000010000101000': '00000001'; // 
1917+
'00000000000000000000010000101001': '00000001'; // 
1918+
'00000000000000000000010000101010': '00000000'; //
1919+
'00000000000000000000010000101011': '00000000'; //
1920+
'00000000000000000000010000101100': '00000000'; //
1921+
'00000000000000000000010000101101': '00000000'; //
1922+
'00000000000000000000010000101110': '00000000'; //
1923+
'00000000000000000000010000101111': '00000000'; //
1924+
'00000000000000000000010000110000': '00000000'; //
1925+
'00000000000000000000010000110001': '00000001'; // 
1926+
'00000000000000000000010000110010': '00000000'; //
1927+
'00000000000000000000010000110011': '00000000'; //
1928+
'00000000000000000000010000110100': '00000000'; //
1929+
'00000000000000000000010000110101': '00000000'; //
1930+
'00000000000000000000010000110110': '00000000'; //
1931+
'00000000000000000000010000110111': '00000000'; //
1932+
'00000000000000000000010000111000': '00000000'; //
1933+
'00000000000000000000010000111001': '00000000'; //
1934+
'00000000000000000000010000111010': '00000000'; //
1935+
'00000000000000000000010000111011': '00000000'; //
1936+
'00000000000000000000010000111100': '00000000'; //
1937+
'00000000000000000000010000111101': '00000000'; //
1938+
'00000000000000000000010000111110': '00000000'; //
1939+
'00000000000000000000010000111111': '00000000'; //
1940+
'00000000000000000000010001000000': '00000000'; //
1941+
'00000000000000000000010001000001': '00000000'; //
1942+
'00000000000000000000010001000010': '00000000'; //
1943+
'00000000000000000000010001000011': '00000000'; //
1944+
'00000000000000000000010001000100': '00000000'; //
1945+
'00000000000000000000010001000101': '00000000'; //
1946+
'00000000000000000000010001000110': '00000000'; //
1947+
'00000000000000000000010001000111': '00000000'; //
1948+
'00000000000000000000010001001000': '00000000'; //
1949+
'00000000000000000000010001001001': '00000000'; //
1950+
'00000000000000000000010001001010': '00000000'; //
1951+
'00000000000000000000010001001011': '00000000'; //
1952+
'00000000000000000000010001001100': '00000000'; //
1953+
'00000000000000000000010001001101': '00000000'; //
1954+
'00000000000000000000010001001110': '00000000'; //
1955+
'00000000000000000000010001001111': '00000000'; //
1956+
'00000000000000000000010001010000': '00000000'; //
1957+
}

packages/conformance-tests/from-c/conway.expected.ts

Lines changed: 87 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Func, bootstrap } from 'wasm-to-typescript-types'
2-
import type { StoreString } from 'ts-type-math'
32

43
type $__wasm_call_ctors = Satisfies<Func, {
54
kind: 'func';
@@ -1862,13 +1861,97 @@ export type entry<
18621861
$__stack_end: '00000000000000000000000000000000';
18631862
$__stack_base: '00000000000000000000000000000000';
18641863
};
1865-
memory:
1866-
& StoreString<'00000000000000000000010000000000', $_rodata>
1864+
memory:
1865+
& $_rodata
18671866
;
18681867
memorySize: '00000000000000000000000100000000';
18691868
indirect: ['$__wasm_call_ctors'];
18701869
},
18711870
debugMode,
18721871
stopAt
18731872
>
1874-
type $_rodata = ``;
1873+
1874+
/**  */
1875+
type $_rodata = {
1876+
'00000000000000000000010000000000': '00000001'; // 
1877+
'00000000000000000000010000000001': '00000001'; // 
1878+
'00000000000000000000010000000010': '00000000'; //
1879+
'00000000000000000000010000000011': '00000000'; //
1880+
'00000000000000000000010000000100': '00000000'; //
1881+
'00000000000000000000010000000101': '00000000'; //
1882+
'00000000000000000000010000000110': '00000000'; //
1883+
'00000000000000000000010000000111': '00000000'; //
1884+
'00000000000000000000010000001000': '00000000'; //
1885+
'00000000000000000000010000001001': '00000000'; //
1886+
'00000000000000000000010000001010': '00000000'; //
1887+
'00000000000000000000010000001011': '00000000'; //
1888+
'00000000000000000000010000001100': '00000000'; //
1889+
'00000000000000000000010000001101': '00000000'; //
1890+
'00000000000000000000010000001110': '00000000'; //
1891+
'00000000000000000000010000001111': '00000000'; //
1892+
'00000000000000000000010000010000': '00000000'; //
1893+
'00000000000000000000010000010001': '00000000'; //
1894+
'00000000000000000000010000010010': '00000000'; //
1895+
'00000000000000000000010000010011': '00000000'; //
1896+
'00000000000000000000010000010100': '00000000'; //
1897+
'00000000000000000000010000010101': '00000000'; //
1898+
'00000000000000000000010000010110': '00000000'; //
1899+
'00000000000000000000010000010111': '00000000'; //
1900+
'00000000000000000000010000011000': '00000000'; //
1901+
'00000000000000000000010000011001': '00000000'; //
1902+
'00000000000000000000010000011010': '00000000'; //
1903+
'00000000000000000000010000011011': '00000000'; //
1904+
'00000000000000000000010000011100': '00000000'; //
1905+
'00000000000000000000010000011101': '00000000'; //
1906+
'00000000000000000000010000011110': '00000000'; //
1907+
'00000000000000000000010000011111': '00000001'; // 
1908+
'00000000000000000000010000100000': '00000000'; //
1909+
'00000000000000000000010000100001': '00000000'; //
1910+
'00000000000000000000010000100010': '00000000'; //
1911+
'00000000000000000000010000100011': '00000000'; //
1912+
'00000000000000000000010000100100': '00000000'; //
1913+
'00000000000000000000010000100101': '00000000'; //
1914+
'00000000000000000000010000100110': '00000000'; //
1915+
'00000000000000000000010000100111': '00000001'; // 
1916+
'00000000000000000000010000101000': '00000001'; // 
1917+
'00000000000000000000010000101001': '00000001'; // 
1918+
'00000000000000000000010000101010': '00000000'; //
1919+
'00000000000000000000010000101011': '00000000'; //
1920+
'00000000000000000000010000101100': '00000000'; //
1921+
'00000000000000000000010000101101': '00000000'; //
1922+
'00000000000000000000010000101110': '00000000'; //
1923+
'00000000000000000000010000101111': '00000000'; //
1924+
'00000000000000000000010000110000': '00000000'; //
1925+
'00000000000000000000010000110001': '00000001'; // 
1926+
'00000000000000000000010000110010': '00000000'; //
1927+
'00000000000000000000010000110011': '00000000'; //
1928+
'00000000000000000000010000110100': '00000000'; //
1929+
'00000000000000000000010000110101': '00000000'; //
1930+
'00000000000000000000010000110110': '00000000'; //
1931+
'00000000000000000000010000110111': '00000000'; //
1932+
'00000000000000000000010000111000': '00000000'; //
1933+
'00000000000000000000010000111001': '00000000'; //
1934+
'00000000000000000000010000111010': '00000000'; //
1935+
'00000000000000000000010000111011': '00000000'; //
1936+
'00000000000000000000010000111100': '00000000'; //
1937+
'00000000000000000000010000111101': '00000000'; //
1938+
'00000000000000000000010000111110': '00000000'; //
1939+
'00000000000000000000010000111111': '00000000'; //
1940+
'00000000000000000000010001000000': '00000000'; //
1941+
'00000000000000000000010001000001': '00000000'; //
1942+
'00000000000000000000010001000010': '00000000'; //
1943+
'00000000000000000000010001000011': '00000000'; //
1944+
'00000000000000000000010001000100': '00000000'; //
1945+
'00000000000000000000010001000101': '00000000'; //
1946+
'00000000000000000000010001000110': '00000000'; //
1947+
'00000000000000000000010001000111': '00000000'; //
1948+
'00000000000000000000010001001000': '00000000'; //
1949+
'00000000000000000000010001001001': '00000000'; //
1950+
'00000000000000000000010001001010': '00000000'; //
1951+
'00000000000000000000010001001011': '00000000'; //
1952+
'00000000000000000000010001001100': '00000000'; //
1953+
'00000000000000000000010001001101': '00000000'; //
1954+
'00000000000000000000010001001110': '00000000'; //
1955+
'00000000000000000000010001001111': '00000000'; //
1956+
'00000000000000000000010001010000': '00000000'; //
1957+
}
11 KB
Binary file not shown.
11 KB
Binary file not shown.
11.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)