66 Commits

Author SHA1 Message Date
David Gonzalez Martin
cd2316f7ee Rewrite and thread compiler 2024-05-21 19:20:34 -06:00
David Gonzalez Martin
40c570f3f1 More self hosted work 2024-04-24 07:41:37 -06:00
David Gonzalez Martin
b88f3bbba0 More self-hosted work 2024-04-23 21:55:03 -06:00
David Gonzalez Martin
51899ca4af Fix slice expression with comptime range 2024-04-23 12:03:29 -06:00
David Gonzalez Martin
03e2d6798f Trailing zeroes 2024-04-23 08:08:08 -06:00
David Gonzalez Martin
343b909829 Implement wrapping arithmetic 2024-04-22 22:54:42 -06:00
David Gonzalez Martin
5eb77c3daf Enable CI 2024-04-22 11:47:39 -06:00
David Gonzalez Martin
28776701fc First comptime for implementation 2024-04-20 08:25:31 -06:00
David Gonzalez Martin
99a6b04633 Basic enum metaprogramming 2024-04-18 17:39:11 -06:00
David Gonzalez Martin
b4dbf18d4a Improve handling of block termination in switches 2024-04-18 13:25:03 -06:00
David Gonzalez Martin
213082f532 Implement continue expression 2024-04-18 10:14:03 -06:00
David Gonzalez Martin
2ac5e19b32 One's complement implementation 2024-04-18 07:41:59 -06:00
David Gonzalez Martin
d68c2e8fc4 Actually implement polymorphism in functions 2024-04-17 21:18:21 -06:00
David Gonzalez Martin
98dce155c8 More self-hosted work 2024-04-17 19:17:16 -06:00
David Gonzalez Martin
166e9a5b8e lexer: count lines 2024-04-17 08:29:42 -06:00
David Gonzalez Martin
e44a6ee8b7 Implement file reading in the self-hosted compiler 2024-04-17 08:19:35 -06:00
David Gonzalez Martin
49c8f47459 More self-hosted work 2024-04-16 21:18:07 -06:00
David Gonzalez Martin
801582b56d Integrate optimization pipeline 2024-04-14 09:37:28 -06:00
David Gonzalez Martin
203bee684c Write initial self-hosted code 2024-04-13 23:16:26 -06:00
David Gonzalez Martin
5473d1c5a9 Print some arguments 2024-04-11 07:53:04 -06:00
David Gonzalez Martin
23b6752e0e Test integration draft of the self-hosted compiler 2024-04-10 20:54:31 -06:00
David Gonzalez Martin
60abe3f9d5 Write some LLVM optimization pipeline stub 2024-04-09 20:51:06 -06:00
David Gonzalez Martin
ac3923f4d3 Implement basic C ABI support 2024-03-24 08:58:05 -06:00
David Gonzalez Martin
8e4fc03d1b Modernize std API 2024-03-08 16:35:40 -06:00
David Gonzalez Martin
0c603f1ca3 Compile and link with musl libc 2024-03-02 23:42:56 -06:00
David Gonzalez Martin
0875459581 Move LLVM interface code out of bootstrap 2024-02-18 09:14:46 -06:00
David Gonzalez Martin
163357c149 Implement exec 2023-12-08 01:34:27 +01:00
David Gonzalez Martin
3074411608 Introduce file writer 2023-12-02 08:51:32 -06:00
David Gonzalez Martin
5145110fbf implement page allocator 2023-11-28 18:39:45 -06:00
David Gonzalez Martin
073f636ee9 Move bootstrap away from src 2023-11-20 09:36:04 -06:00
David Gonzalez Martin
883f0b2faa Add C transpiler 2023-11-20 01:09:51 -06:00
David Gonzalez Martin
df53762d92 commit before transpiling 2023-11-19 09:22:39 -06:00
David Gonzalez Martin
4c358c2f89 implement shifts 2023-11-13 20:49:24 -06:00
David Gonzalez Martin
f96cf16a2a implement signed division 2023-11-13 10:26:05 -06:00
David Gonzalez Martin
d390ee08f6 implement signed multiplication 2023-11-12 20:06:12 -06:00
David Gonzalez Martin
eb681dc7a1 implement and, or, xor 2023-11-12 17:21:45 -06:00
David Gonzalez Martin
35657715e9 implement add and sub 2023-11-12 11:11:06 -06:00
David Gonzalez Martin
e75f3f3a68 Fix register allocation for call argument passing 2023-11-11 09:26:09 -06:00
David Gonzalez Martin
31185e6779 hello_world: finish producing a hello world exe
Section manager redesign
Linker relocations
Using global strings
String literal fixup in sema
2023-11-10 17:06:27 -06:00
David Gonzalez Martin
73769beb32 x86_64: some encodings 2023-11-10 12:38:14 -06:00
David Gonzalez Martin
9dc5f795b2 x86_64: implicit definition of RAX after syscall 2023-11-10 11:02:17 -06:00
David Gonzalez Martin
5dceac7720 ir: don't emit constants in function instructions
This aims to improve register allocation
2023-11-10 10:43:23 -06:00
David Gonzalez Martin
da07fd5ca4 implement lea for globals and argument tweaks 2023-11-10 10:42:30 -06:00
David Gonzalez Martin
22243d296c add encoding and elf linking 2023-11-09 23:20:34 -06:00
David Gonzalez Martin
30baa0b53d Fix register allocator for barebones use 2023-11-08 22:26:22 -06:00
David Gonzalez Martin
b24bd8221e Add custom logger 2023-11-08 09:27:45 -06:00
David Gonzalez Martin
aefabd6108 almost working register allocator 2023-11-07 15:00:48 -06:00
David Gonzalez Martin
77e54285f5 instruction selection 2023-11-06 13:30:35 -06:00
David Gonzalez Martin
80ab6949d2 integrate tests into zig build API 2023-10-02 19:10:26 -06:00
David Gonzalez Martin
29dc3ffdf4 Fix release build 2023-10-02 14:20:40 -06:00