Skip to content

Commit 810b1ce

Browse files
committed
Add cold annotations
1 parent c043889 commit 810b1ce

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/internal/core.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ impl<DP: DependencyProvider> State<DP> {
7070
}
7171

7272
/// Add an incompatibility to the state.
73+
#[cold]
7374
pub(crate) fn add_incompatibility_from_dependencies(
7475
&mut self,
7576
package_id: PackageId,
@@ -91,6 +92,7 @@ impl<DP: DependencyProvider> State<DP> {
9192

9293
/// Unit propagation is the core mechanism of the solving algorithm.
9394
/// CF <https://github.com/dart-lang/pub/blob/master/doc/solver.md#unit-propagation>
95+
#[cold]
9496
pub(crate) fn unit_propagation(
9597
&mut self,
9698
package_id: PackageId,
@@ -170,6 +172,7 @@ impl<DP: DependencyProvider> State<DP> {
170172

171173
/// Return the root cause or the terminal incompatibility.
172174
/// CF <https://github.com/dart-lang/pub/blob/master/doc/solver.md#unit-propagation>
175+
#[cold]
173176
fn conflict_resolution(
174177
&mut self,
175178
incompatibility: IncompDpId<DP>,

src/internal/partial_solution.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ impl<DP: DependencyProvider> PartialSolution<DP> {
285285
}
286286
}
287287

288+
#[cold]
288289
pub(crate) fn pick_highest_priority_pkg(
289290
&mut self,
290291
mut prioritizer: impl FnMut(PackageId, VersionSet) -> DP::Priority,

src/solver.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ use crate::{
6767

6868
/// Main function of the library.
6969
/// Finds a set of packages satisfying dependency bounds for a given package + version pair.
70+
#[cold]
7071
pub fn resolve<DP: DependencyProvider>(
7172
dependency_provider: &mut DP,
7273
package: DP::P,

0 commit comments

Comments
 (0)