-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
compiletest: Support revisions in debuginfo (read: debugger) tests #150201
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
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
e25c6c9 to
a63fee8
Compare
tests/debuginfo/function-arg-initialization.rs: Stop disabling SingleUseConsts MIR pass This test passes locally for me. Let's see if it passes CI too. Discovered while I worked on rust-lang#150201. CC rust-lang#128945
tests/debuginfo/function-arg-initialization.rs: Stop disabling SingleUseConsts MIR pass This test passes locally for me. Let's see if it passes CI too. Discovered while I worked on rust-lang#150201. CC rust-lang#128945
tests/debuginfo/function-arg-initialization.rs: Stop disabling SingleUseConsts MIR pass This test passes locally for me. Let's see if it passes CI too. Discovered while I worked on rust-lang#150201. CC rust-lang#128945
compiletest: Add `LineNumber` newtype to avoid `+1` magic here and there Start small. If it works well we can increase usage bit by bit as time passes. My main motivation for doing this is to get rid of the `+ 1` I otherwise have to add in rust-lang#150201 on this line: ```rs crate::directives::line::line_directive(file, zero_based_line_no + 1, &line) ``` But I think this is a nice general improvement by itself. Note that we keep using "0" to represent "no specific line" because changing to `Option<LineNumber>` everywhere is a very noisy and significant change. That _can_ be changed later if wanted, but let's not do it now.
compiletest: Add `LineNumber` newtype to avoid `+1` magic here and there Start small. If it works well we can increase usage bit by bit as time passes. My main motivation for doing this is to get rid of the `+ 1` I otherwise have to add in rust-lang#150201 on this line: ```rs crate::directives::line::line_directive(file, zero_based_line_no + 1, &line) ``` But I think this is a nice general improvement by itself. Note that we keep using "0" to represent "no specific line" because changing to `Option<LineNumber>` everywhere is a very noisy and significant change. That _can_ be changed later if wanted, but let's not do it now.
Rollup merge of #150205 - Enselic:line-no, r=Zalathar,jieyouxu compiletest: Add `LineNumber` newtype to avoid `+1` magic here and there Start small. If it works well we can increase usage bit by bit as time passes. My main motivation for doing this is to get rid of the `+ 1` I otherwise have to add in #150201 on this line: ```rs crate::directives::line::line_directive(file, zero_based_line_no + 1, &line) ``` But I think this is a nice general improvement by itself. Note that we keep using "0" to represent "no specific line" because changing to `Option<LineNumber>` everywhere is a very noisy and significant change. That _can_ be changed later if wanted, but let's not do it now.
…tests This not only reduces code duplication already, it also gives us revision parsing for free which we need in an upcoming commit.
…, `no-SingleUseConsts-mir-pass` To prevent the test from regressing both with and without `SingleUseConsts` MIR pass.
a63fee8 to
423a8dc
Compare
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
|
I'm a bit mixed on making debuginfo directives use On one hand, it's clearly a a much-needed improvement to the debuginfo directive handling. On the other hand, the reason I disconnected debuginfo from the main directive parser in the first place is that I didn't want to have to worry about the particular quirks of debuginfo directives when making overall improvements to directive parsing in general, and I fear that this might come up again in the future. I think I'm tentatively OK with making debuginfo directives use |
And start using revisions in
tests/debuginfo/macro-stepping.rsto prevent regressing both with and withoutSingleUseConstsMIR pass.I recommend commit-by-commit review.
TODOLineNumbernewtype to avoid+1magic here and there #150205 once merged so we don't have to add another "+ 1".CC
CC @Zalathar since you might have opinions about that I expose a helper function to reduce duplication
CC @saethlin since this is what we will use for
tests/debuginfo/basic-stepping.rsin #147426 (in the same way I use it intests/debuginfo/macro-stepping.rshere)