Stream: t-compiler

Topic: arena-all-the-things


Zoxc (Nov 30 2018 at 20:07, on Zulip):

Anything have some opinions on this? https://github.com/rust-lang/rust/pull/56382

Zoxc (Nov 30 2018 at 20:08, on Zulip):

I'm making a new "box" type Bx<'tcx, T> and replacing instances of Lrc with it. It allocates on an arena and supports deserialization

nikomatsakis (Nov 30 2018 at 20:17, on Zulip):

why a box type?

nikomatsakis (Nov 30 2018 at 20:17, on Zulip):

vs allocating directly on the arenas

nikomatsakis (Nov 30 2018 at 20:17, on Zulip):

I feel like our setup is very baroque

nikomatsakis (Nov 30 2018 at 20:17, on Zulip):

(unnecssarily so)

nikomatsakis (Nov 30 2018 at 20:17, on Zulip):

for adding types to arenas

nikomatsakis (Nov 30 2018 at 20:18, on Zulip):

but maybe it can be improved instead?

nikomatsakis (Nov 30 2018 at 20:18, on Zulip):

it'd be nice to just use &'tcx ...

Zoxc (Nov 30 2018 at 20:23, on Zulip):

Deserializing &'tcx T is a bit tricky though

Zoxc (Nov 30 2018 at 20:26, on Zulip):

Commit which adds it: https://github.com/rust-lang/rust/pull/56382/commits/4e55273bd17e82ba5d0125875fb2f7e6ff933e86

nikomatsakis (Nov 30 2018 at 20:27, on Zulip):

hmm

nikomatsakis (Nov 30 2018 at 20:29, on Zulip):

deserializing anything with lifetimes is a touch tricky really, right now we're leaning on the spec soundness hole as I recall

nikomatsakis (Nov 30 2018 at 20:29, on Zulip):

but I guess you mean beyond that...

nikomatsakis (Nov 30 2018 at 20:29, on Zulip):

presumably because of coherence?

Zoxc (Nov 30 2018 at 20:29, on Zulip):

Does the old or the new borrowck run first now?

Matthew Jasper (Nov 30 2018 at 20:30, on Zulip):

in compare mode, new (well, sort of, old region inference runs first)

Zoxc (Nov 30 2018 at 20:30, on Zulip):

I would indeed expect coherence problems

Last update: Nov 20 2019 at 01:45UTC