($attr:ident) => (false);
}
+macro_rules! is_eval_always_attr {
+ (eval_always) => (true);
+ ($attr:ident) => (false);
+}
+
macro_rules! contains_anon_attr {
($($attr:ident),*) => ({$(is_anon_attr!($attr) | )* false});
}
($($attr:ident),*) => ({$(is_input_attr!($attr) | )* false});
}
+macro_rules! contains_eval_always_attr {
+ ($($attr:ident),*) => ({$(is_eval_always_attr!($attr) | )* false});
+}
+
macro_rules! define_dep_nodes {
(<$tcx:tt>
$(
}
}
+ #[inline]
+ pub fn is_eval_always(&self) -> bool {
+ match *self {
+ $(
+ DepKind :: $variant => { contains_eval_always_attr!($($attr), *) }
+ )*
+ }
+ }
+
#[allow(unreachable_code)]
#[inline]
pub fn has_params(&self) -> bool {
// Represents different phases in the compiler.
[] RegionScopeTree(DefId),
- [] Coherence,
- [] CoherenceInherentImplOverlapCheck,
+ [eval_always] Coherence,
+ [eval_always] CoherenceInherentImplOverlapCheck,
[] CoherenceCheckTrait(DefId),
- [] PrivacyAccessLevels(CrateNum),
+ [eval_always] PrivacyAccessLevels(CrateNum),
// Represents the MIR for a fn; also used as the task node for
// things read/modify that MIR.
[] Reachability,
[] MirKeys,
- [] CrateVariances,
+ [eval_always] CrateVariances,
// Nodes representing bits of computed IR in the tcx. Each shared
// table in the tcx (or elsewhere) maps to one of these
[] DtorckConstraint(DefId),
[] AdtDestructor(DefId),
[] AssociatedItemDefIds(DefId),
- [] InherentImpls(DefId),
+ [eval_always] InherentImpls(DefId),
[] TypeckBodiesKrate,
[] TypeckTables(DefId),
[] UsedTraitImports(DefId),
[] IsCompilerBuiltins(CrateNum),
[] HasGlobalAllocator(CrateNum),
[] ExternCrate(DefId),
- [] LintLevels,
+ [eval_always] LintLevels,
[] Specializes { impl1: DefId, impl2: DefId },
[input] InScopeTraits(DefIndex),
[] ModuleExports(DefId),
[] StabilityIndex,
[] AllCrateNums,
[] ExportedSymbols(CrateNum),
- [] CollectAndPartitionTranslationItems,
+ [eval_always] CollectAndPartitionTranslationItems,
[] ExportName(DefId),
[] ContainsExternIndicator(DefId),
[] IsTranslatedFunction(DefId),