-
Notifications
You must be signed in to change notification settings - Fork 9
/
HACKING
22 lines (14 loc) · 908 Bytes
/
HACKING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
I have nearly no background in compilers. So GPTrixie code is probably not that great.
I recomand to have a look at the xml file generated by gccxml.
GPTrixie work like that :
The do magic sub in gptrixie script launch gccxml and parse the xml produced
At this point, everything is extracted, structures info, types....
A second pass is done on types/struct/unions to finish solving type.
A 'global' object with everything is created and passed to the generator
The (DG for now) generator take this and generate perl6 string.
A final step is made to try to order correctly the generated output for stuff
like structure (it should be moved to generator?)
CTypes:
CType are defined in the Class.pm6 file. There are Indirect and Direct base type
Indirect are for stuff like pointer type. A type-eq operator was planned
to easily compared them (like $t type-eq <Ptr void>) but it made moar sigseg x)