Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Resolution Dump #88

Open
4 tasks
philberty opened this issue Dec 21, 2020 · 0 comments
Open
4 tasks

Type Resolution Dump #88

philberty opened this issue Dec 21, 2020 · 0 comments
Labels
good-first-pr gsoc google summer of code project

Comments

@philberty
Copy link
Member

philberty commented Dec 21, 2020

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, ]> = ;
    ;
}

@philberty philberty added the gsoc google summer of code project label Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-pr gsoc google summer of code project
Projects
None yet
Development

No branches or pull requests

1 participant