1use super::unwind_rule::*;
2use crate::cache::*;
3
4pub struct CacheX86_64<P: AllocationPolicy = MayAllocateDuringUnwind>(
6 pub Cache<UnwindRuleX86_64, P>,
7);
8
9impl CacheX86_64<MayAllocateDuringUnwind> {
10 pub fn new() -> Self {
12 Self(Cache::new())
13 }
14}
15
16impl<P: AllocationPolicy> CacheX86_64<P> {
17 pub fn new_in() -> Self {
19 Self(Cache::new())
20 }
21
22 pub fn stats(&self) -> CacheStats {
24 self.0.rule_cache.stats()
25 }
26}
27
28impl<P: AllocationPolicy> Default for CacheX86_64<P> {
29 fn default() -> Self {
30 Self::new_in()
31 }
32}