Closed
Description
Type resolution dumps will be critical in debugging the rust front-end. The format we have right now is pretty poor:
$ cat gccrs.type-resolution.dump
impl <Foo{0:Int:i32:(Ref: 60 TyRef: 8[8,26,])} HIRID: 35 RF:35 TF:129 - [28, ]> {
fn baz <fn (ref self & Foo{0:Int:i32:(Ref: 60 TyRef: 8[8,26,])},) -> () HIRID: 66 RF:66 TF:66 - []>
{
;
}
}
fn static_dispatch <fn<T REF: 70> (t & T REF: 70,) -> () HIRID: 81 RF:81 TF:81 - []>
{
;
}
fn dynamic_dispatch <fn (t & dyn [Bar],) -> () HIRID: 94 RF:122 TF:94 - [94, ]>
{
;
}
fn main <fn () -> () HIRID: 127 RF:127 TF:127 - []>
{
let a:<Foo{0:Int:i32:(Ref: 26 TyRef: 8[8,])} HIRID: 95 RF:100 TF:129 - [28, 95, 96, 98, 100, ]>;
a:<Foo{0:Int:i32:(Ref: 26 TyRef: 8[8,])} HIRID: 96 RF:100 TF:129 - [28, 95, 96, 98, 100, ]> = ;
;
let b:<& dyn [Bar] HIRID: 115 RF:116 TF:114 - [114, 116, 118, ]>;
b:<& dyn [Bar] HIRID: 116 RF:116 TF:114 - [114, ]> = ;
;
}
- Converge on an S-expression format, which is more extensible and easier to read
- Add command line switch Enable -frust-dump-all option for debugging #222
- Add dump entry point
gccrs/gcc/rust/rust-session-manager.cc
Line 891 in 28f527c
- Dump to file https://github.com/Rust-GCC/gccrs/blob/master/gcc/rust/typecheck/rust-tycheck-dump.h