Commit graph

67 commits

Author SHA1 Message Date
Janis a3bee90ac3 mir/triples use internpool now for types 2024-12-22 22:25:01 +01:00
Janis 0994f4b187 fix comptime eval 2024-12-22 19:12:15 +01:00
Janis 96863e0397 cargo fmt 2024-12-22 19:01:22 +01:00
Janis 30ce12988d insert symbol on functiondecl
return ident from parse_fn_proto
2024-12-22 19:00:29 +01:00
Janis 7cea2452d1 from none doesn't need data to be passed 2024-12-22 18:58:20 +01:00
Janis 1df5429eab extracting ast2::intern into its own file 2024-12-22 18:57:19 +01:00
Janis 6494e827fb nightly fixes 22.12.24 2024-12-22 18:21:23 +01:00
Janis 006e982cde untracked files and changes 2024-10-17 15:20:16 +02:00
Janis cbbbb7989a array types can now use an expression to define the array size
this was surprisingly non-trivial
2024-09-16 17:18:23 +02:00
Janis 4f70fa2246 comptime folding,
- reduced scope of foldability to just simple expressions and declrefs to globaldecls
2024-09-16 16:55:04 +02:00
Janis 3d014ad985 casting of comptimenumbers into other comptime numbers 2024-09-16 16:53:58 +02:00
Janis 4e27002fb9 void comptimenumber type for easier erroring on non-value ast nodes 2024-09-16 16:53:30 +02:00
Janis 464baa7bd7 creating graph for comptime folding dependencies 2024-09-16 01:04:52 +02:00
Janis 5ad0e9e8e7 calculate which nodes are comptime evaluable 2024-09-16 00:15:39 +02:00
Janis 888517f2ea soooo many thigns in need to commit more often
also, types exist in the ast, but are interned after parsing
refs and typerefs are resolved
true and false in the intern pool, need to add them to primaryexpr
structs in the internpool take a decl to differentiate struct types of the same
name
field access postfix expr? also nesting postfix expr (e.g. var[1][2])
arrays can only be specified with integral constants as length

fixes:
sinttype and uinttype store bits inline in item.index correctly
mut/var decl assignment? have correct doc strings
let/var symbol is inserted after the assignment expr, so that the expr can still
use
now-shadowed variables
structs can have fields of type pointer-to-self (ast)
lots of wrong-cases in node children getting
2024-09-15 00:38:50 +02:00
Janis a565c1e1e9 parsing struct definitions in ast 2024-09-14 13:09:17 +02:00
Janis de22a9e01a helper function for parsing text within () or {} 2024-09-13 22:47:04 +02:00
Janis 4432cf198e better debug impls for types, fix for simpletype key 2024-09-13 19:36:13 +02:00
Janis 5c38969ef8 cooooool stuff for the new ast generator and intern pool and symbol table
basically, btrees are awesome.
2024-09-13 19:07:42 +02:00
Janis 6f3a7dc56c helpers for reading ast Data and getting children of ast nodes 2024-09-09 15:41:56 +02:00
Janis 45653380cf new ast parser 2024-09-09 15:01:53 +02:00
Janis 44fa241a79 new ast module 2024-09-03 22:58:46 +02:00
Janis 07c98d55a0 remove old code 2024-09-02 16:52:48 +02:00
Janis 568c3b2fa4 calling functions 2024-09-02 16:03:12 +02:00
Janis 4424ef875d global symbols 2024-09-02 12:59:17 +02:00
Janis 4b432f404b branching? yay? 2024-09-01 21:31:09 +02:00
Janis b0f52da586 phi node 2024-09-01 14:28:48 +02:00
Janis dd6ce88ad6 if-else branches in IR 2024-09-01 12:28:47 +02:00
Janis 6bab60d168 if-else ast 2024-08-30 23:55:13 +02:00
Janis ad6a9b00ec fix warnings 2024-08-30 23:55:01 +02:00
Janis 9194e35851 remove comments from asm 2024-08-30 21:55:16 +02:00
Janis 48bbcdec5e boolean arithmetic 2024-08-30 19:31:44 +02:00
Janis cbc416dcaa no longer wrong! 2024-08-30 18:13:28 +02:00
Janis e9335d3fc5 something is wrong, but typechecking 2024-08-30 17:34:26 +02:00
Janis 70644ede3e fixes, rewrote liveness gen a bit 2024-08-30 16:22:53 +02:00
Janis 9f0e2c4a31 mir to asm translation WORKS!! 2024-08-29 21:34:05 +02:00
Janis 3aee606ca2 mir.rs changes for last commit's triples.rs changes 2024-08-29 01:50:58 +02:00
Janis 9d85eb1428 inline loading of values into registers into mir.rs 2024-08-29 01:50:08 +02:00
Janis 9b484ce175 bitflag dependency 2024-08-29 01:48:11 +02:00
Janis 2d8c75ba0d comptime folding changes/fixes for declrefs 2024-08-27 21:52:36 +02:00
Janis 62cf214bde comptime folding can now deal with declrefs 2024-08-27 21:08:37 +02:00
Janis d4918a722f warnings chore 2024-08-27 18:49:50 +02:00
Janis 270162850d comptime folding works!!!!! 2024-08-27 18:49:28 +02:00
Janis 18e29f1fa1 folding comptime math 2024-08-27 17:22:47 +02:00
Janis a64658995a comptime math 2024-08-27 16:21:39 +02:00
Janis 42a3be8186 bigint math 2024-08-27 00:54:55 +02:00
Janis 99bf630546 amd64 abstraction which was required like 10 commits ago 2024-08-26 15:59:34 +02:00
Janis eba0edb9e4 refactor/cleanup of mir generation for arithmetic ops and preloading of constant lhs 2024-08-26 15:58:51 +02:00
Janis 06b1ec1763 register allocator refactor 2024-08-26 15:58:01 +02:00
Janis 16399192b3 mir register allcoator 2024-08-26 13:47:44 +02:00