Resolver cm token - #160345
Conversation
|
Ah, one extra thing. The // self is &mut Resolver
for _ in &self.iterable_field {
self.resolution().borrow(self.cm_token());
}because the iterator is shared on the resolver field, doing |
|
@bors delegate try |
|
✌️ @LorrensP-2158466, you can now perform try builds on this pull request! You can now post |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (358e11b): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.6%, secondary -2.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.1%, secondary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 490.553s -> 490.99s (0.09%) |
|
It's only |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I wouldn't want to introduce a lot of unsafe code an copypaste of I'll review after the second benchmark run finishes and the manual ref counting commit is removed. |
|
Reminder, once the PR becomes ready for a review, use |
Understandable, I was mostly curious :). |
|
If we have methods taking a token, then panicking methods not taking a token are not necessary anymore (*). impl Resolver {
fn token1(&mut self) -> CmToken { debug_assert!(!self.assert_speculative); CmToken { ... } }
fn token2(&self) -> CmToken { assert!(!self.assert_speculative); CmToken { ... } }
}(*) Unless there are borrow checker issues like #160345 (comment), then we can have more unsafe methods taking a boolean or something. |
|
Finished benchmarking commit (5ea1493): comparison URL. Overall result: no relevant changes - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary 0.8%, secondary 0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.3%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 490.553s -> 489.78s (-0.16%) |
View all comments
part of #158845
follow up of #160271 (first commit of this pr)
Introduces a
CmTokenobtainable only through a&mut Resolver. Which allows*_with_tokenmethods to be used inCmCellandCmRefCellmutating functions.Also changes
CmRefCell::borrowto return aCmRefbassed onresolver.assert_speculative, aborrow_with_tokenis also introduced.r? @petrochenkov