summaryrefslogtreecommitdiff
path: root/src/jit/bitvec.h
blob: e7e2d44a5c2a3c39d238b3bf1fa9717b7d2f0a43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

//
// This include file determines how BitVec is implemented.
//
#ifndef _BITVEC_INCLUDED_
#define _BITVEC_INCLUDED_ 1

// This class simplifies creation and usage of "ShortLong" bitsets.
//
// Create new bitsets like so:
//
//   BitVecTraits traits(size, pCompiler);
//   BitVec bitvec = BitVecOps::MakeEmpty(&traits);
//
// and call functions like so:
//
//   BitVecOps::AddElemD(&traits, bitvec, 10);
//   BitVecOps::IsMember(&traits, bitvec, 10));
//

#include "bitset.h"
#include "compilerbitsettraits.h"
#include "bitsetasshortlong.h"

typedef BitSetOps</*BitSetType*/ BitSetShortLongRep,
                  /*Brand*/ BSShortLong,
                  /*Env*/ BitVecTraits*,
                  /*BitSetTraits*/ BitVecTraits>
    BitVecOps;

typedef BitSetShortLongRep BitVec;

// These types should be used as the types for BitVec arguments and return values, respectively.
typedef BitVecOps::ValArgType BitVec_ValArg_T;
typedef BitVecOps::RetValType BitVec_ValRet_T;

#endif // _BITVEC_INCLUDED_