Stream: t-compiler/const-eval

Topic: #55260


oli (Oct 22 2018 at 11:13, on Zulip):

https://github.com/rust-lang/rust/pull/55260

I don't think this should affect miri, since it's all const eval stuff, but I'll test locally just to be sure

oli (Oct 22 2018 at 11:15, on Zulip):

Most importantly we need a perf run. I'm sure this can improve perf, but I might need to fix those FIXMEs that I added

oli (Oct 22 2018 at 11:15, on Zulip):

oh and I suggest very much to review per commit

RalfJ (Oct 22 2018 at 13:02, on Zulip):

I'm still not fully done, but I don't want to grow this PR any further.

for example?

oli (Oct 22 2018 at 13:06, on Zulip):

I want to

RalfJ (Oct 22 2018 at 13:07, on Zulip):

I agree with 1+2, and do not understand what you mean by 3

oli (Oct 22 2018 at 13:08, on Zulip):

Oh. right now const_field clones the allocation it is given and then points into that, because we need to adjust alignment

RalfJ (Oct 22 2018 at 13:16, on Zulip):

I... dont even. it cares about alignment why? what is that horrible operation used for anyway?^^

oli (Oct 22 2018 at 13:18, on Zulip):

because we might access a u64 field of a packed struct

oli (Oct 22 2018 at 13:18, on Zulip):

oh it's used for matches

oli (Oct 22 2018 at 13:19, on Zulip):

we can do better, but we need my proposed refactorings

oli (Oct 22 2018 at 13:19, on Zulip):

at the end of those, that function doesn't do any interning or other weird stuff anymore

oli (Oct 22 2018 at 13:19, on Zulip):

it'll just call downcast -> field -> done

RalfJ (Oct 22 2018 at 13:30, on Zulip):

yeah that seems nice

RalfJ (Oct 22 2018 at 13:30, on Zulip):

so we'll have a ConstPlace or so

oli (Oct 22 2018 at 13:31, on Zulip):

oh yes

RalfJ (Oct 22 2018 at 13:31, on Zulip):

which is alloc_id + offset, and whatever else you need to put in there

oli (Oct 22 2018 at 13:31, on Zulip):

jup, it's the content of ByRef :D

RalfJ (Oct 23 2018 at 11:16, on Zulip):

oh and I suggest very much to review per commit

There are 24 commits oO

oli (Oct 23 2018 at 11:40, on Zulip):

well... the first 5 or so are not nice if bundled

oli (Oct 23 2018 at 11:40, on Zulip):

is it possible to review a commit range maybe?

RalfJ (Oct 23 2018 at 11:52, on Zulip):

not sure. I now have about 18 tabs left to review...^^

RalfJ (Oct 23 2018 at 12:33, on Zulip):

@Oli

Oh god this uncovered so many bugs and bugs-just-waiting-to-happen.

for example? can we have testcases?

oli (Oct 23 2018 at 15:15, on Zulip):

If all match arms only have constants as patterns and these constants are tuples of some sort, exhaustiveness will bail out and require a _ arm. I'll create a repro when i'm back on a pc

oli (Oct 23 2018 at 15:15, on Zulip):

The rest is probably just weird/wrong diagnostics

RalfJ (Oct 23 2018 at 15:26, on Zulip):

ah that's the equality stuff I was complaining about ;)

oli (Oct 23 2018 at 15:37, on Zulip):

yes, I'm fixing that. your suggestion makes absolute sense

oli (Oct 23 2018 at 15:38, on Zulip):

just specializing ConstValue that is

RalfJ (Oct 23 2018 at 15:54, on Zulip):

okay ;)

oli (Oct 23 2018 at 15:56, on Zulip):

I'm gonna make a separate PR for moving stuff from memory.rs to Allocation that we're going to merge before this PR

oli (Oct 23 2018 at 15:56, on Zulip):

it seems like an independent change

RalfJ (Oct 24 2018 at 09:58, on Zulip):

avg: 33219.2% | min: 22801.4% | max: 62508.3%

Talk about bad perf regressions... must be a new record ;)

Last update: Nov 15 2019 at 20:00UTC