-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
STRUCTURE.txt
40 lines (25 loc) · 1.23 KB
/
STRUCTURE.txt
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
# LibCuik
The library is compiled as a unity build found in `lib/libcuik.c`
Defines:
-DCUIK_USE_TB compiles the IRgen code.
-DCUIK_ALLOW_THREADS compiles threadpool.
Components:
preproc/ C preprocessor
front/ Parser & type checker
back/ TB integration (irgen)
driver/ Compiler caller helpers (compile args, traditional compiler
dispatch)
Flow:
At any point in the standard pipeline you can stop and introspect the data. multiple
options laid out vertically means they're different ways to generate such data
_______________PREPROCESSOR_________________
/ \
source -cuik_driver_preprocess_str-> Cuik_CPP*
cuik_driver_preprocess
cuikpp_make
___________________________________PARSER_______________________________________
/ \
Cuik_CPP* -cuikpp_get_token_stream-> TokenStream -cuikparse_run-> Cuik_ParseResult
________________TYPE CHECK_____________________
/ \
Cuik_ParseResult.tu --cuiksema_run-> *mutates TU*