| 1 | // Licensed to the .NET Foundation under one or more agreements. |
| 2 | // The .NET Foundation licenses this file to you under the MIT license. |
| 3 | // See the LICENSE file in the project root for more information. |
| 4 | |
| 5 | // |
| 6 | // This include file determines how BitVec is implemented. |
| 7 | // |
| 8 | #ifndef _BITVEC_INCLUDED_ |
| 9 | #define _BITVEC_INCLUDED_ 1 |
| 10 | |
| 11 | // This class simplifies creation and usage of "ShortLong" bitsets. |
| 12 | // |
| 13 | // Create new bitsets like so: |
| 14 | // |
| 15 | // BitVecTraits traits(size, pCompiler); |
| 16 | // BitVec bitvec = BitVecOps::MakeEmpty(&traits); |
| 17 | // |
| 18 | // and call functions like so: |
| 19 | // |
| 20 | // BitVecOps::AddElemD(&traits, bitvec, 10); |
| 21 | // BitVecOps::IsMember(&traits, bitvec, 10)); |
| 22 | // |
| 23 | |
| 24 | #include "bitset.h" |
| 25 | #include "compilerbitsettraits.h" |
| 26 | #include "bitsetasshortlong.h" |
| 27 | |
| 28 | typedef BitSetOps</*BitSetType*/ BitSetShortLongRep, |
| 29 | /*Brand*/ BSShortLong, |
| 30 | /*Env*/ BitVecTraits*, |
| 31 | /*BitSetTraits*/ BitVecTraits> |
| 32 | BitVecOps; |
| 33 | |
| 34 | typedef BitSetShortLongRep BitVec; |
| 35 | |
| 36 | // These types should be used as the types for BitVec arguments and return values, respectively. |
| 37 | typedef BitVecOps::ValArgType BitVec_ValArg_T; |
| 38 | typedef BitVecOps::RetValType BitVec_ValRet_T; |
| 39 | |
| 40 | #endif // _BITVEC_INCLUDED_ |
| 41 | |