Cthulhu  0.2.10
Cthulhu compiler collection
broker.inc
Go to the documentation of this file.
1 // SPDX-License-Identifier: LGPL-3.0-only
2 
3 #ifndef BROKER_PASS
4 # define BROKER_PASS(ID, STR)
5 #endif
6 
7 BROKER_PASS(ePassForwardDecls, "forward_decls")
8 BROKER_PASS(ePassImportModules, "import_modules")
9 BROKER_PASS(ePassCompileTypes, "compile_types")
10 BROKER_PASS(ePassCompileDecls, "compile_decls")
11 
12 #undef BROKER_PASS
13 
14 #ifndef BROKER_STAGE
15 # define BROKER_STAGE(ID, STR)
16 #endif
17 
18 // before language initialization
19 BROKER_STAGE(eStageInit, "init")
20 
21 // before parsing files
22 BROKER_STAGE(eStageParse, "parse")
23 
24 // before semantic analysis
25 BROKER_STAGE(eStageSema, "sema")
26 
27 // before final resolve
28 BROKER_STAGE(eStageResolve, "resolve")
29 
30 // before tree validation
31 BROKER_STAGE(eStageCheck, "check")
32 
33 // before emitting tree IR (may not happen depending on targets)
34 BROKER_STAGE(eStageEmitTree, "emit_tree")
35 
36 // before lowering to SSA
37 BROKER_STAGE(eStageLower, "lower")
38 
39 // before ssa optimization
40 BROKER_STAGE(eStageOptimize, "optimize")
41 
42 // before emitting ssa IR (may not happen depending on targets)
43 BROKER_STAGE(eStageEmitSsa, "emit_ssa")
44 
45 // before deinitialization
46 BROKER_STAGE(eStageDeinit, "deinit")
47 
48 #undef BROKER_STAGE
49 
50 #ifndef BROKER_EVENT
51 # define BROKER_EVENT(ID, STR)
52 #endif
53 
54 // an attribute has been matched
55 BROKER_EVENT(eEventMatchAttrib, "match_attribute")
56 
57 #undef BROKER_EVENT
58 
59 #ifndef BROKER_ARENA
60 # define BROKER_ARENA(ID, STR)
61 #endif
62 
63 // arena for language specific asts
64 BROKER_ARENA(eArenaAst, "ast")
65 
66 // arena for the tree IR produced by a language
67 BROKER_ARENA(eArenaTree, "tree")
68 
69 // arena for string allocations
70 BROKER_ARENA(eArenaString, "string")
71 
72 // arena for transient allocations that
73 // do not need to be persisted between passes
74 BROKER_ARENA(eArenaTransient, "transient")
75 
76 #undef BROKER_ARENA
77 
78 #ifndef FILE_LAYOUT
79 # define FILE_LAYOUT(id, str)
80 #endif
81 
82 // output files are organized in a tree
83 FILE_LAYOUT(eFileLayoutTree, "tree")
84 
85 // output files are organized in a flat structure
86 FILE_LAYOUT(eFileLayoutFlat, "flat")
87 
88 // all output is in a single file
89 FILE_LAYOUT(eFileLayoutSingle, "single")
90 
91 // output in a source + header pair
92 FILE_LAYOUT(eFileLayoutPair, "pair")
93 
94 #undef FILE_LAYOUT
#define BROKER_ARENA(ID, STR)
Definition: broker.inc:60
#define BROKER_STAGE(ID, STR)
Definition: broker.inc:15
#define BROKER_PASS(ID, STR)
Definition: broker.inc:4
#define BROKER_EVENT(ID, STR)
Definition: broker.inc:51
#define FILE_LAYOUT(id, str)
Definition: broker.inc:79