Stream: t-compiler

Topic: MIR librarification


oli (Dec 20 2019 at 15:10, on Zulip):

(since MIR kind of needs a definition of types)

I have thought a few times about makeing MIR generic over the type type

oli (Dec 20 2019 at 15:10, on Zulip):

yes that is "type type" :D

oli (Dec 20 2019 at 15:10, on Zulip):

then we can pull it out into a separate crate

oli (Dec 20 2019 at 15:10, on Zulip):

and rustc just instantiates it with Ty<'tcx>

oli (Dec 20 2019 at 15:10, on Zulip):

just like we do it with TyLayout right now

nikomatsakis (Dec 20 2019 at 16:07, on Zulip):

@oli chalk-engine does this

nikomatsakis (Dec 20 2019 at 16:08, on Zulip):

it just has a notion of "generic argument" (which chalk currently calls Parameter)

nikomatsakis (Dec 20 2019 at 16:08, on Zulip):

but the chalk-ir crate is sort of in the middle, and probably appropriate for MIR

nikomatsakis (Dec 20 2019 at 16:08, on Zulip):

i.e., it lets you have a real notion of what a type is, while still leaving the details abstracted via the TypeFamily trait

nikomatsakis (Dec 20 2019 at 16:09, on Zulip):

(and maybe eventually it makes sense for chalk-engine to be just using chalk-ir directly; originally I thought that rustc would directly use chalk-engine, but that's not the current goal)

oli (Dec 20 2019 at 16:24, on Zulip):

I'll look at chalk engine and chalk IR! Thanks

Last update: May 26 2020 at 10:40UTC