@@ -652,12 +652,14 @@ enum MemberUse {
652652
653653/// Common [EnumSet] s used for [MemberUse] .
654654class MemberUses {
655- static const EnumSet <MemberUse > NONE = EnumSet (0 );
656- static const EnumSet <MemberUse > NORMAL_ONLY = EnumSet (1 );
657- static const EnumSet <MemberUse > CLOSURIZE_INSTANCE_ONLY = EnumSet (2 );
658- static const EnumSet <MemberUse > CLOSURIZE_STATIC_ONLY = EnumSet (4 );
659- static const EnumSet <MemberUse > ALL_INSTANCE = EnumSet (3 );
660- static const EnumSet <MemberUse > ALL_STATIC = EnumSet (5 );
655+ static const EnumSet <MemberUse > NONE = EnumSet .fromRawBits (0 );
656+ static const EnumSet <MemberUse > NORMAL_ONLY = EnumSet .fromRawBits (1 );
657+ static const EnumSet <MemberUse > CLOSURIZE_INSTANCE_ONLY =
658+ EnumSet .fromRawBits (2 );
659+ static const EnumSet <MemberUse > CLOSURIZE_STATIC_ONLY =
660+ EnumSet .fromRawBits (4 );
661+ static const EnumSet <MemberUse > ALL_INSTANCE = EnumSet .fromRawBits (3 );
662+ static const EnumSet <MemberUse > ALL_STATIC = EnumSet .fromRawBits (5 );
661663}
662664
663665typedef MemberUsedCallback = void Function (
@@ -705,10 +707,10 @@ enum ClassUse { INSTANTIATED, IMPLEMENTED }
705707
706708/// Common [EnumSet] s used for [ClassUse] .
707709class ClassUses {
708- static const EnumSet <ClassUse > NONE = EnumSet (0 );
709- static const EnumSet <ClassUse > INSTANTIATED_ONLY = EnumSet (1 );
710- static const EnumSet <ClassUse > IMPLEMENTED_ONLY = EnumSet (2 );
711- static const EnumSet <ClassUse > ALL = EnumSet (3 );
710+ static const EnumSet <ClassUse > NONE = EnumSet . fromRawBits (0 );
711+ static const EnumSet <ClassUse > INSTANTIATED_ONLY = EnumSet . fromRawBits (1 );
712+ static const EnumSet <ClassUse > IMPLEMENTED_ONLY = EnumSet . fromRawBits (2 );
713+ static const EnumSet <ClassUse > ALL = EnumSet . fromRawBits (3 );
712714}
713715
714716typedef ClassUsedCallback = void Function (
@@ -859,15 +861,15 @@ enum Access {
859861/// Access sets used for registration of member usage.
860862class Accesses {
861863 /// Statically bound access of a member.
862- static const EnumSet <Access > staticAccess = EnumSet (1 );
864+ static const EnumSet <Access > staticAccess = EnumSet . fromRawBits (1 );
863865
864866 /// Dynamically bound access of a member. This implies the statically bound
865867 /// access of the member.
866- static const EnumSet <Access > dynamicAccess = EnumSet (3 );
868+ static const EnumSet <Access > dynamicAccess = EnumSet . fromRawBits (3 );
867869
868870 /// Direct access of a super class member. This implies the statically bound
869871 /// access of the member.
870- static const EnumSet <Access > superAccess = EnumSet (5 );
872+ static const EnumSet <Access > superAccess = EnumSet . fromRawBits (5 );
871873}
872874
873875/// The accesses of a member collected during closed world computation.
@@ -882,18 +884,18 @@ class MemberAccess {
882884
883885 factory MemberAccess .readFromDataSource (DataSourceReader source) {
884886 source.begin (tag);
885- EnumSet <Access > reads = EnumSet (source.readInt ());
886- EnumSet <Access > writes = EnumSet (source.readInt ());
887- EnumSet <Access > invokes = EnumSet (source.readInt ());
887+ EnumSet <Access > reads = EnumSet . fromRawBits (source.readInt ());
888+ EnumSet <Access > writes = EnumSet . fromRawBits (source.readInt ());
889+ EnumSet <Access > invokes = EnumSet . fromRawBits (source.readInt ());
888890 source.end (tag);
889891 return MemberAccess (reads, writes, invokes);
890892 }
891893
892894 void writeToDataSink (DataSinkWriter sink) {
893895 sink.begin (tag);
894- sink.writeInt (reads.mask);
895- sink.writeInt (writes.mask);
896- sink.writeInt (invokes.mask);
896+ sink.writeInt (reads.mask.bits );
897+ sink.writeInt (writes.mask.bits );
898+ sink.writeInt (invokes.mask.bits );
897899 sink.end (tag);
898900 }
899901}
0 commit comments