Miscellaneous inlining improvements
Add `#[inline]` to a few trivial non-generic methods from a perf report that otherwise wouldn't be candidates for inlining.
This commit is contained in:
@@ -84,6 +84,7 @@ pub struct QueryJob {
|
||||
|
||||
impl QueryJob {
|
||||
/// Creates a new query job.
|
||||
#[inline]
|
||||
pub fn new(id: QueryJobId, span: Span, parent: Option<QueryJobId>) -> Self {
|
||||
QueryJob {
|
||||
id,
|
||||
@@ -106,6 +107,7 @@ impl QueryJob {
|
||||
///
|
||||
/// This does nothing for single threaded rustc,
|
||||
/// as there are no concurrent jobs which could be waiting on us
|
||||
#[inline]
|
||||
pub fn signal_complete(self) {
|
||||
#[cfg(parallel_compiler)]
|
||||
{
|
||||
|
||||
@@ -81,6 +81,7 @@ pub struct QuerySideEffects {
|
||||
}
|
||||
|
||||
impl QuerySideEffects {
|
||||
#[inline]
|
||||
pub fn is_empty(&self) -> bool {
|
||||
let QuerySideEffects { diagnostics } = self;
|
||||
diagnostics.is_empty()
|
||||
|
||||
Reference in New Issue
Block a user