Skip to content

Instantly share code, notes, and snippets.

@matu3ba
Created February 8, 2023 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matu3ba/e0e4817c494dfff1b7dd3ef9a1f241e4 to your computer and use it in GitHub Desktop.
Save matu3ba/e0e4817c494dfff1b7dd3ef9a1f241e4 to your computer and use it in GitHub Desktop.
sema_dump
#!/usr/bin/env sh
# Building zig in debug mode
cd zigrepo
mkdir -p build/ && cd build/ && cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="$HOME/dev/git/bootstrap/zig-bootstrap/musl/out/host/" -GNinja && /usr/bin/time -v ninja install && cd ..
# add zig stages 3 to PATH
zig test --debug-log compilation -freference-trace --test-filter fubar arenas.zig
zig test --debug-log sema -freference-trace thread.zig
debug(sema): Module.Decl@fb2ce98 (format) depends on non-existence of 'StackTrace' in Module.Decl@fb2ce00 (Stac
kTrace)
debug(sema): Module.Decl@fb2ce98 (format) depends on non-existence of 'std' in Module.Decl@fb2ce00 (StackTrace)
debug(sema): Module.Decl@7fd2daa8cac0 (format__anon_14865) depends on non-existence of 'StackTrace' in Module.D
ecl@fb2ce00 (StackTrace)
debug(sema): Module.Decl@7fd2daa8cac0 (format__anon_14865) depends on non-existence of 'std' in Module.Decl@fb2
ce00 (StackTrace)
debug(sema): generic function 'format__anon_14865' instantiated with type [TODO fix internal compiler bug regar
ding dump]
debug(sema): Module.Decl@7fd2daa8cac0 (format__anon_14865) depends on non-existence of 'builtin' in Module.Decl
@fb2ce00 (StackTrace)
debug(sema): Module.Decl@7fd2daa8cac0 (format__anon_14865) depends on non-existence of 'std' in Module.Decl@fb2
ce00 (StackTrace)
debug(sema): Module.Decl@7fd2daa8cac0 (format__anon_14865) depends on non-existence of 'std' in Module.Decl@fb2
ce00 (StackTrace)
debug(sema): Module.Decl@7fd2daa8cac0 (format__anon_14865) depends on non-existence of 'std' in Module.Decl@fb2
ce00 (StackTrace)
debug(sema): generic function 'print__anon_14867' instantiated with type [TODO fix internal compiler bug regard
ing dump]
debug(sema): Module.Decl@7fd2daa8cac0 (format__anon_14865) depends on non-existence of 'std' in Module.Decl@fb2
ce00 (StackTrace)
debug(sema): Module.Decl@7fd2daa8cac0 (format__anon_14865) depends on non-existence of 'std' in Module.Decl@fb2
ce00 (StackTrace)
debug(sema): Module.Decl@7fd2daa8cac0 (format__anon_14865) depends on non-existence of 'std' in Module.Decl@fb2
ce00 (StackTrace)
debug(sema): generic function 'print__anon_14869' instantiated with type [TODO fix internal compiler bug regard
ing dump]
debug(sema): Module.Decl@7fd2daa8cbf0 (print__anon_14867) depends on non-existence of 'std' in Module.Decl@fc85
3b0 (Writer(fs.file.File,error{AccessDenied,BrokenPipe,ConnectionResetByPeer,DiskQuota,FileTooBig,InputOutput,L
ockViolation,NoSpaceLeft,NotOpenForWriting,OperationAborted,SystemResources,Unexpected,WouldBlock},(function 'w
rite')))
debug(sema): generic function 'format__anon_14872' instantiated with type [TODO fix internal compiler bug regar
ding dump]
debug(sema): Module.Decl@7fd2daa8cee8 (format__anon_14872) depends on non-existence of 'ArgSetType' in Module.D
ecl@7fd2dab795a0 (ArgState)
debug(sema): Module.Decl@7fd2daa8cd20 (print__anon_14869) depends on non-existence of 'std' in Module.Decl@fc85
3b0 (Writer(fs.file.File,error{AccessDenied,BrokenPipe,ConnectionResetByPeer,DiskQuota,FileTooBig,InputOutput,L
ockViolation,NoSpaceLeft,NotOpenForWriting,OperationAborted,SystemResources,Unexpected,WouldBlock},(function 'w
rite')))
debug(sema): generic function 'format__anon_14887' instantiated with type [TODO fix internal compiler bug regar
ding dump]
debug(sema): Module.Decl@7fd2daa8d7d0 (format__anon_14887) depends on non-existence of 'ArgSetType' in Module.D
ecl@7fd2dab795a0 (ArgState)
Test [24/41] test.compiling method...
t[0]: 0x000000000026a6b0
t[1]: 0x000000000026a710
t[2]: 0x0000000000000002
t[3]: 0xfff2000500000001
t[4]: 0xfffc00000000002a
t[5]: 0xfffffffffffffffb
t[6]: 0xffffffffffffffff
t[7]: 0x0000000000000007
t[8]: 0x0000000000000003
t[9]: 0x0000000000000004
Test [35/41] test.from https://www.geeksforgeeks.org/treap-set-2-implementation-of-sear... - Set includeStdTes
Test [36/41] test.simple u64 treap alloc with nextFree...
All 41 tests passed.
debug(sema): Module.Decl@e668fa0 (format) depends on non-existence of 'StackTrace' in Module.Decl@e668f08 (StackT
race)
debug(sema): Module.Decl@e668fa0 (format) depends on non-existence of 'std' in Module.Decl@e668f08 (StackTrace)
debug(sema): Module.Decl@7f30a90e7ba8 (format__anon_8480) depends on non-existence of 'StackTrace' in Module.Decl
@e668f08 (StackTrace)
debug(sema): Module.Decl@7f30a90e7ba8 (format__anon_8480) depends on non-existence of 'std' in Module.Decl@e668f0
8 (StackTrace)
debug(sema): generic function 'format__anon_8480' instantiated with type [TODO fix internal compiler bug regardin
g dump]
debug(sema): Module.Decl@7f30a90e7ba8 (format__anon_8480) depends on non-existence of 'builtin' in Module.Decl@e6
68f08 (StackTrace)
debug(sema): Module.Decl@7f30a90e7ba8 (format__anon_8480) depends on non-existence of 'std' in Module.Decl@e668f0
8 (StackTrace)
debug(sema): Module.Decl@7f30a90e7ba8 (format__anon_8480) depends on non-existence of 'std' in Module.Decl@e668f0
8 (StackTrace)
debug(sema): Module.Decl@7f30a90e7ba8 (format__anon_8480) depends on non-existence of 'std' in Module.Decl@e668f0
8 (StackTrace)
debug(sema): generic function 'print__anon_8482' instantiated with type [TODO fix internal compiler bug regarding
dump]
debug(sema): Module.Decl@7f30a90e7ba8 (format__anon_8480) depends on non-existence of 'std' in Module.Decl@e668f0
8 (StackTrace)
debug(sema): Module.Decl@7f30a90e7ba8 (format__anon_8480) depends on non-existence of 'std' in Module.Decl@e668f0
8 (StackTrace)
debug(sema): Module.Decl@7f30a90e7ba8 (format__anon_8480) depends on non-existence of 'std' in Module.Decl@e668f0
8 (StackTrace)
debug(sema): generic function 'print__anon_8484' instantiated with type [TODO fix internal compiler bug regarding
dump]
debug(sema): Module.Decl@7f30a90e7cd8 (print__anon_8482) depends on non-existence of 'std' in Module.Decl@7f30a92
9b898 (Writer(fs.file.File,error{AccessDenied,BrokenPipe,ConnectionResetByPeer,DiskQuota,FileTooBig,InputOutput,L
ockViolation,NoSpaceLeft,NotOpenForWriting,OperationAborted,SystemResources,Unexpected,WouldBlock},(function 'wri
te')))
debug(sema): generic function 'format__anon_8487' instantiated with type [TODO fix internal compiler bug regardin
g dump]
debug(sema): Module.Decl@7f30a90e7fd0 (format__anon_8487) depends on non-existence of 'ArgSetType' in Module.Decl
@7f30a92b8ed8 (ArgState)
debug(sema): Module.Decl@7f30a90e7e08 (print__anon_8484) depends on non-existence of 'std' in Module.Decl@7f30a92
9b898 (Writer(fs.file.File,error{AccessDenied,BrokenPipe,ConnectionResetByPeer,DiskQuota,FileTooBig,InputOutput,L
ockViolation,NoSpaceLeft,NotOpenForWriting,OperationAborted,SystemResources,Unexpected,WouldBlock},(function 'wri
te')))
debug(sema): generic function 'format__anon_8502' instantiated with type [TODO fix internal compiler bug regardin
g dump]
debug(sema): Module.Decl@7f30a90e88b8 (format__anon_8502) depends on non-existence of 'ArgSetType' in Module.Decl
@7f30a92b8ed8 (ArgState)
arenas.zig:69:26: error: struct 'arenas.Arena' depends on itself
pub const Arena = extern struct {
~~~~~~~^~~~~~
referenced by:
NurseryArena(509): arenas.zig:121:33
NurseryArena: arenas.zig:116:19
nurseryType: thread.zig:22:31
Thread: thread.zig:18:15
Self: thread.zig:21:18
thread_size: thread.zig:23:48
threadAvail: thread.zig:24:43
nursery_size: thread.zig:25:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment