MimIR
0.4-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
Loading...
Searching...
No Matches
autogen.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
mim/axm.h
>
4
#include <
mim/plugin.h
>
5
6
/// @namespace mim::plug::refly @ref refly
7
namespace
mim
{
8
namespace
plug::refly
{
9
10
static
constexpr
plugin_t
Plugin_Id
= 0x4c61cd6800000000;
11
12
/// @name %%refly.Code
13
///@{
14
enum class
Code
:
flags_t
{
15
};
16
17
///@}
18
19
/// @name %%refly.reify
20
///@{
21
enum class
reify
:
flags_t
{
22
};
23
24
const
Def
*
normalize_reify
(
const
Def
*,
const
Def
*,
const
Def
*);
25
///@}
26
27
/// @name %%refly.reflect
28
///@{
29
enum class
reflect
:
flags_t
{
30
};
31
32
const
Def
*
normalize_reflect
(
const
Def
*,
const
Def
*,
const
Def
*);
33
///@}
34
35
/// @name %%refly.type
36
///@{
37
enum class
type
:
flags_t
{
38
};
39
40
const
Def
*
normalize_type
(
const
Def
*,
const
Def
*,
const
Def
*);
41
///@}
42
43
/// @name %%refly.gid
44
///@{
45
enum class
gid
:
flags_t
{
46
};
47
48
const
Def
*
normalize_gid
(
const
Def
*,
const
Def
*,
const
Def
*);
49
///@}
50
51
/// @name %%refly.error
52
///@{
53
enum class
error
:
flags_t
{
54
};
55
56
///@}
57
58
/// @name %%refly.warn
59
///@{
60
enum class
warn
:
flags_t
{
61
};
62
63
///@}
64
65
/// @name %%refly.info
66
///@{
67
enum class
info
:
flags_t
{
68
};
69
70
///@}
71
72
/// @name %%refly.verbose
73
///@{
74
enum class
verbose
:
flags_t
{
75
};
76
77
///@}
78
79
/// @name %%refly.debug
80
///@{
81
enum class
debug
:
flags_t
{
82
};
83
84
///@}
85
86
/// @name %%refly.dbg
87
///@{
88
enum class
dbg
:
flags_t
{
89
tmp
= 0x4c61cd6800000a00,
90
perm
= 0x4c61cd6800000a01,
91
};
92
93
template
<dbg>
94
const
Def
*
normalize_dbg
(
const
Def
*,
const
Def
*,
const
Def
*);
95
96
///@}
97
98
/// @name %%refly.equiv
99
///@{
100
enum class
equiv
:
flags_t
{
101
ae
= 0x4c61cd6800000b00,
102
struc_ne
= 0x4c61cd6800000b00,
103
aE
= 0x4c61cd6800000b01,
104
struc_eq
= 0x4c61cd6800000b01,
105
Ae
= 0x4c61cd6800000b02,
106
alpha_ne
= 0x4c61cd6800000b02,
107
AE
= 0x4c61cd6800000b03,
108
alpha_eq
= 0x4c61cd6800000b03,
109
};
110
111
template
<equiv>
112
const
Def
*
normalize_equiv
(
const
Def
*,
const
Def
*,
const
Def
*);
113
114
///@}
115
116
/// @name %%refly.check_bot
117
///@{
118
enum class
check_bot
:
flags_t
{
119
};
120
121
const
Def
*
normalize_check_bot
(
const
Def
*,
const
Def
*,
const
Def
*);
122
///@}
123
124
/// @name %%refly.check
125
///@{
126
enum class
check
:
flags_t
{
127
};
128
129
const
Def
*
normalize_check
(
const
Def
*,
const
Def
*,
const
Def
*);
130
///@}
131
132
/// @name %%refly.remove_dbg_repl
133
///@{
134
enum class
remove_dbg_repl
:
flags_t
{
135
};
136
137
///@}
138
139
void
register_normalizers
(
Normalizers
& normalizers);
140
141
#define MIM_refly_NORMALIZER_IMPL \
142
void register_normalizers(Normalizers& normalizers) {\
143
normalizers[flags_t(Annex::Base<reify>)] = &normalize_reify; \
144
normalizers[flags_t(Annex::Base<reflect>)] = &normalize_reflect; \
145
normalizers[flags_t(Annex::Base<type>)] = &normalize_type; \
146
normalizers[flags_t(Annex::Base<gid>)] = &normalize_gid; \
147
normalizers[flags_t(dbg::tmp)] = &normalize_dbg<dbg::tmp>; \
148
normalizers[flags_t(dbg::perm)] = &normalize_dbg<dbg::perm>; \
149
normalizers[flags_t(equiv::ae)] = &normalize_equiv<equiv::ae>; \
150
normalizers[flags_t(equiv::aE)] = &normalize_equiv<equiv::aE>; \
151
normalizers[flags_t(equiv::Ae)] = &normalize_equiv<equiv::Ae>; \
152
normalizers[flags_t(equiv::AE)] = &normalize_equiv<equiv::AE>; \
153
normalizers[flags_t(Annex::Base<check_bot>)] = &normalize_check_bot; \
154
normalizers[flags_t(Annex::Base<check>)] = &normalize_check; \
155
}
156
}
// namespace plug::refly
157
158
#ifndef DOXYGEN
// don't include in Doxygen documentation
159
160
template
<>
constexpr
flags_t
Annex::Base<plug::refly::Code>
= 0x4c61cd6800000000;
161
template
<>
constexpr
size_t
Annex::Num<plug::refly::Code>
= 0;
162
template
<>
constexpr
flags_t
Annex::Base<plug::refly::reify>
= 0x4c61cd6800000100;
163
template
<>
constexpr
size_t
Annex::Num<plug::refly::reify>
= 0;
164
template
<>
constexpr
flags_t
Annex::Base<plug::refly::reflect>
= 0x4c61cd6800000200;
165
template
<>
constexpr
size_t
Annex::Num<plug::refly::reflect>
= 0;
166
template
<>
constexpr
flags_t
Annex::Base<plug::refly::type>
= 0x4c61cd6800000300;
167
template
<>
constexpr
size_t
Annex::Num<plug::refly::type>
= 0;
168
template
<>
constexpr
flags_t
Annex::Base<plug::refly::gid>
= 0x4c61cd6800000400;
169
template
<>
constexpr
size_t
Annex::Num<plug::refly::gid>
= 0;
170
template
<>
constexpr
flags_t
Annex::Base<plug::refly::error>
= 0x4c61cd6800000500;
171
template
<>
constexpr
size_t
Annex::Num<plug::refly::error>
= 0;
172
template
<>
constexpr
flags_t
Annex::Base<plug::refly::warn>
= 0x4c61cd6800000600;
173
template
<>
constexpr
size_t
Annex::Num<plug::refly::warn>
= 0;
174
template
<>
constexpr
flags_t
Annex::Base<plug::refly::info>
= 0x4c61cd6800000700;
175
template
<>
constexpr
size_t
Annex::Num<plug::refly::info>
= 0;
176
template
<>
constexpr
flags_t
Annex::Base<plug::refly::verbose>
= 0x4c61cd6800000800;
177
template
<>
constexpr
size_t
Annex::Num<plug::refly::verbose>
= 0;
178
template
<>
constexpr
flags_t
Annex::Base<plug::refly::debug>
= 0x4c61cd6800000900;
179
template
<>
constexpr
size_t
Annex::Num<plug::refly::debug>
= 0;
180
template
<>
constexpr
flags_t
Annex::Base<plug::refly::dbg>
= 0x4c61cd6800000a00;
181
template
<>
constexpr
size_t
Annex::Num<plug::refly::dbg>
= 2;
182
template
<>
constexpr
flags_t
Annex::Base<plug::refly::equiv>
= 0x4c61cd6800000b00;
183
template
<>
constexpr
size_t
Annex::Num<plug::refly::equiv>
= 4;
184
template
<>
constexpr
flags_t
Annex::Base<plug::refly::check_bot>
= 0x4c61cd6800000c00;
185
template
<>
constexpr
size_t
Annex::Num<plug::refly::check_bot>
= 0;
186
template
<>
constexpr
flags_t
Annex::Base<plug::refly::check>
= 0x4c61cd6800000d00;
187
template
<>
constexpr
size_t
Annex::Num<plug::refly::check>
= 0;
188
template
<>
constexpr
flags_t
Annex::Base<plug::refly::remove_dbg_repl>
= 0x4c61cd6800000e00;
189
template
<>
constexpr
size_t
Annex::Num<plug::refly::remove_dbg_repl>
= 0;
190
191
template
<>
struct
Axm::IsANode
<
plug
::refly::error> {
using
type
=
Axm
; };
192
template
<>
struct
Axm::IsANode
<
plug
::refly::warn> {
using
type
=
Axm
; };
193
template
<>
struct
Axm::IsANode
<
plug
::refly::info> {
using
type
=
Axm
; };
194
template
<>
struct
Axm::IsANode
<
plug
::refly::verbose> {
using
type
=
Axm
; };
195
template
<>
struct
Axm::IsANode
<
plug
::refly::debug> {
using
type
=
Axm
; };
196
template
<>
struct
Axm::IsANode
<
plug
::refly::remove_dbg_repl> {
using
type
=
Axm
; };
197
198
#endif
199
}
// namespace mim
200
201
#ifndef DOXYGEN
// don't include in Doxygen documentation
202
203
template
<>
struct
fe::is_bit_enum<
mim
::plug::refly::dbg> : std::true_type {};
204
template
<>
struct
fe::is_bit_enum<
mim
::plug::refly::equiv> : std::true_type {};
205
206
#endif
axm.h
mim::Axm::IsANode::type
App type
Definition
axm.h:70
mim::Axm::IsANode
Definition
axm.h:69
mim::Def
Base class for all Defs.
Definition
def.h:273
mim::plug::refly
The refly Plugin
Definition
normalizers.cpp:10
mim::plug::refly::normalize_reify
const Def * normalize_reify(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:53
mim::plug::refly::type
type
Definition
autogen.h:37
mim::plug::refly::normalize_dbg
const Def * normalize_dbg(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:47
mim::plug::refly::error
error
Definition
autogen.h:53
mim::plug::refly::warn
warn
Definition
autogen.h:60
mim::plug::refly::reify
reify
Definition
autogen.h:21
mim::plug::refly::normalize_check
const Def * normalize_check(const Def *type, const Def *, const Def *arg)
Definition
normalizers.cpp:80
mim::plug::refly::gid
gid
Definition
autogen.h:45
mim::plug::refly::normalize_check_bot
const Def * normalize_check_bot(const Def *, const Def *c, const Def *arg)
Definition
normalizers.cpp:75
mim::plug::refly::normalize_equiv
const Def * normalize_equiv(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:61
mim::plug::refly::normalize_gid
const Def * normalize_gid(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:58
mim::plug::refly::Plugin_Id
static constexpr plugin_t Plugin_Id
Definition
autogen.h:10
mim::plug::refly::info
info
Definition
autogen.h:67
mim::plug::refly::remove_dbg_repl
remove_dbg_repl
Definition
autogen.h:134
mim::plug::refly::normalize_type
const Def * normalize_type(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:57
mim::plug::refly::dbg
dbg
Definition
autogen.h:88
mim::plug::refly::dbg::perm
@ perm
Definition
autogen.h:90
mim::plug::refly::dbg::tmp
@ tmp
Definition
autogen.h:89
mim::plug::refly::Code
Code
Definition
autogen.h:14
mim::plug::refly::debug
debug
Definition
autogen.h:81
mim::plug::refly::check
check
Definition
autogen.h:126
mim::plug::refly::verbose
verbose
Definition
autogen.h:74
mim::plug::refly::normalize_reflect
const Def * normalize_reflect(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:55
mim::plug::refly::check_bot
check_bot
Definition
autogen.h:118
mim::plug::refly::reflect
reflect
Definition
autogen.h:29
mim::plug::refly::register_normalizers
void register_normalizers(Normalizers &normalizers)
mim::plug::refly::equiv
equiv
Definition
autogen.h:100
mim::plug::refly::equiv::alpha_ne
@ alpha_ne
Definition
autogen.h:106
mim::plug::refly::equiv::struc_ne
@ struc_ne
Definition
autogen.h:102
mim::plug::refly::equiv::Ae
@ Ae
Definition
autogen.h:105
mim::plug::refly::equiv::struc_eq
@ struc_eq
Definition
autogen.h:104
mim::plug::refly::equiv::ae
@ ae
Definition
autogen.h:101
mim::plug::refly::equiv::AE
@ AE
Definition
autogen.h:107
mim::plug::refly::equiv::aE
@ aE
Definition
autogen.h:103
mim::plug::refly::equiv::alpha_eq
@ alpha_eq
Definition
autogen.h:108
mim::plug
Definition
lower_for.h:5
mim
Definition
ast.h:16
mim::flags_t
u64 flags_t
Definition
types.h:39
mim::Normalizers
absl::flat_hash_map< flags_t, NormalizeFn > Normalizers
Definition
plugin.h:27
mim::plugin_t
u64 plugin_t
Definition
types.h:40
mim::Node::Axm
@ Axm
Definition
def.h:122
plugin.h
mim::Annex::Num
static constexpr size_t Num
Number of Axm::subtags.
Definition
plugin.h:247
mim::Annex::Base
static constexpr flags_t Base
Definition
plugin.h:248
build
include
mim
plug
refly
autogen.h
Generated by
1.18.0