55// Copyright (c) 2022, Olof Kraigher olof.kraigher@gmail.com
66
77use super :: formal_region:: FormalRegion ;
8- use super :: implicits:: ImplicitMap ;
98use super :: implicits:: ImplicitVec ;
109use super :: region:: Region ;
1110use crate :: ast:: * ;
1211use crate :: data:: * ;
1312use arc_swap:: ArcSwapWeak ;
13+ use fnv:: FnvHashSet ;
1414use std:: borrow:: Borrow ;
1515use std:: ops:: Deref ;
1616use std:: sync:: atomic:: { AtomicUsize , Ordering } ;
@@ -25,7 +25,7 @@ pub enum Type {
2525 indexes : Vec < Option < Arc < NamedEntity > > > ,
2626 elem_type : TypeEnt ,
2727 } ,
28- Enum ( ImplicitMap ) ,
28+ Enum ( ImplicitVec , FnvHashSet < Designator > ) ,
2929 Integer ( ImplicitVec ) ,
3030 Physical ( ImplicitVec ) ,
3131 Access ( Subtype , ImplicitVec ) ,
@@ -44,12 +44,12 @@ pub enum Type {
4444impl Type {
4545 pub fn implicit_declarations ( & self ) -> impl Iterator < Item = Arc < NamedEntity > > + ' _ {
4646 match self {
47- Type :: Array { ref implicit, .. } => Some ( either :: Either :: Right ( implicit. iter ( ) ) ) ,
48- Type :: Enum ( ref implicit) => Some ( either :: Either :: Left ( implicit. iter ( ) ) ) ,
49- Type :: Integer ( ref implicit) => Some ( either :: Either :: Right ( implicit. iter ( ) ) ) ,
50- Type :: Physical ( ref implicit) => Some ( either :: Either :: Right ( implicit. iter ( ) ) ) ,
51- Type :: File ( ref implicit) => Some ( either :: Either :: Right ( implicit. iter ( ) ) ) ,
52- Type :: Access ( .., ref implicit) => Some ( either :: Either :: Right ( implicit. iter ( ) ) ) ,
47+ Type :: Array { ref implicit, .. } => Some ( implicit. iter ( ) ) ,
48+ Type :: Enum ( ref implicit, _ ) => Some ( implicit. iter ( ) ) ,
49+ Type :: Integer ( ref implicit) => Some ( implicit. iter ( ) ) ,
50+ Type :: Physical ( ref implicit) => Some ( implicit. iter ( ) ) ,
51+ Type :: File ( ref implicit) => Some ( implicit. iter ( ) ) ,
52+ Type :: Access ( .., ref implicit) => Some ( implicit. iter ( ) ) ,
5353 Type :: Incomplete ( ..)
5454 | Type :: Interface
5555 | Type :: Protected ( ..)
0 commit comments