Commit Graph

8 Commits

Author SHA1 Message Date
Nilstrieb
11c0280798 bless mir opt tests 2022-07-28 14:24:44 +02:00
Matthew Jasper
ad7f109bfa Change scope of temporaries in match guards
Each pattern in a match arm has its own copy of the match guard in MIR,
with its own temporary, so it has to be dropped before the the guards
are joined to the single copy of the arm.
2021-09-05 18:50:55 +01:00
Matthew Jasper
ff8c0ef0e4 Fix drop handling for if let expressions
MIR lowering for `if let` expressions is now more complicated now that
`if let` exists in HIR. This PR adds a scope for the variables bound in
an `if let` expression and then uses an approach similar to how we
handle loops to ensure that we reliably drop the correct variables.
2021-09-01 23:47:41 +01:00
Wesley Wiser
0a42dfc2fa Fix debugger stepping behavior around match expressions
Previously, we would set up the source lines for `match` expressions so
that the code generated to perform the test of the scrutinee was matched
to the line of the arm that required the test and then jump from the arm
block to the "next" block was matched to all of the lines in the `match`
expression.

While that makes sense, it has the side effect of causing strange
stepping behavior in debuggers.

I've changed the source information so that all of the generated tests
are sourced to `match {scrutinee}` and the jumps are sourced to the last
line of the block they are inside. This resolves the weird stepping
behavior in all debuggers and resolves some instances of "ambiguous
symbol" errors in WinDbg preventing the user from setting breakpoints at
`match` expressions.
2021-08-25 15:17:22 -04:00
Roxane
2fb1fb7634 Fix diagnostic issue when using FakeReads in closures 2021-04-02 19:11:50 -04:00
Lzu Tao
86cf46172f Suppress MIR comments of Unit type 2020-08-20 09:32:35 +00:00
Austin Lasher
28ac141b72 Update MIR tests with comment verbosity fix 2020-08-17 17:29:48 -04:00
Xavier Denis
f07607f47a Move mir-opt tests to toplevel 2020-07-29 17:36:03 +02:00