Commit graph

72 commits

Author SHA1 Message Date
12a4f64aed Aarch64 jit compiler wip: suppport floating-point variables 2026-01-05 10:46:53 +03:00
c9f4a9c19d Aarch64 jit compiler wip: suppport floating-point arguments 2026-01-05 10:29:46 +03:00
428283dbf8 Aarch64 jit compiler wip: floating-point comparisons 2026-01-05 10:23:33 +03:00
45004ce812 Fix inferring type of a != expression node 2026-01-05 10:23:13 +03:00
8f5744c3f4 Aarch64 jit compiler wip: floating-point arithmetic operators 2026-01-05 01:03:52 +03:00
c253041068 Aarch64 jit compiler wip: support f16 literals 2026-01-05 00:49:47 +03:00
7ddc8ba25d Add f16 type & literals support in parser, type checker & interpreter 2026-01-05 00:36:11 +03:00
0d87d35c47 Aarch 64 jit compiler wip: floating-point support wip 2026-01-05 00:05:20 +03:00
8b560b660b Aarch 64 jit compiler wip: fix loading literals 2026-01-05 00:05:04 +03:00
45e19e47b2 Fix parsing floating-point literals on clang 2026-01-05 00:04:25 +03:00
e5b11fd707 Aarch64 jit compiler wip: support bool function arguments 2026-01-04 13:52:53 +03:00
f28138e5b9 Aarch64 jit compiler wip: implement branching and loops 2026-01-04 13:45:03 +03:00
db4a8ac264 Aarch64 compiler wip: replace csel with csetm for comparisons 2026-01-04 12:36:24 +03:00
7ed008543c Aarch64 compiler wip: support function arguments (integers only) 2026-01-04 12:27:46 +03:00
43f2d4531a Aarch64 compiler wip: properly handle scopes 2026-01-04 12:17:12 +03:00
716d51221f Aarch64 compiler wip: simplify stack, always 16-byte-align pushed values 2026-01-04 12:15:52 +03:00
4df89de879 Aarch64 compiler wip: variables 2026-01-04 12:07:35 +03:00
d5065ec38e Aarch64 JIT-compiling wip: no-argument functions, arithmetic & logical operations, comparisons (integers only) 2026-01-03 22:38:43 +03:00
474e5da9d1 Fix unary minus precedence 2026-01-03 22:36:50 +03:00
98a5720141 Split compiled module code & data segments and use mprotect to make a module host-executable 2026-01-02 11:37:03 +03:00
da39ae1225 MacOS fixes: lower CMake version, use strtoll instead of from_chars 2026-01-02 11:34:52 +03:00
0ba3e4324d Interpreter clean-up (wip - identifier/function resolving is broken) 2025-12-29 14:42:25 +03:00
dea5c18cfd Explicitly mark constructor AST nodes 2025-12-23 13:43:54 +03:00
46a1031a08 Move return_statement to function.hpp 2025-12-23 12:18:22 +03:00
a36ba2610b Add inferred type to AST nodes & implement type checking & inference 2025-12-23 12:17:42 +03:00
97fb066e38 Only construct zero value of built-in type if the argument count is zero 2025-12-23 12:17:18 +03:00
7bca803136 Add scope level to return statement 2025-12-23 12:16:49 +03:00
a35add07db Refactor error types 2025-12-22 23:50:52 +03:00
c3c208b6a3 Rename numeric_literal -> primitive_literal 2025-12-22 23:49:08 +03:00
35435ac626 Rewrite get_location(statement/expression) using visitors 2025-12-22 18:52:57 +03:00
b5f46e77b6 Make tree visitors more type-safe by preventing implicit casts 2025-12-22 18:52:28 +03:00
438620db2f Remove unused expression type 2025-12-22 18:34:54 +03:00
58154b9e6e Handle return statement outside function scope in AST finilizator 2025-12-22 18:33:37 +03:00
049cf7335a Add single-line comments 2025-12-22 18:27:13 +03:00
5419f87a56 Support zero-initialization of built-in types and structs 2025-12-20 16:09:25 +03:00
d33b00e368 Refactor tree visitors (again) 2025-12-20 15:52:59 +03:00
1f8c73614c Refactor type visitor 2025-12-20 15:40:02 +03:00
d37c5b8754 Support zero (default) initialization for struct types 2025-12-20 15:18:48 +03:00
83b4d23ab2 Add interpreter::value_visitor 2025-12-20 15:07:45 +03:00
8c07e1950b Simplify tree visitors 2025-12-20 13:20:44 +03:00
aee506d102 Rewrite identifier resolution using visitors 2025-12-20 13:05:51 +03:00
6276d97c6b Add type identifier source locations 2025-12-20 01:10:56 +03:00
709c7a7a0a Introduce dedicated type tree & AST tree visitors and use them in pretty-printing 2025-12-20 01:06:54 +03:00
4175a86ae3 Rename libs/type -> libs/types, separate computed type tree from the AST type tree 2025-12-20 00:03:23 +03:00
437123f6f4 Add scope levels to identifier AST nodes & implement identifier resolution 2025-12-19 17:42:40 +03:00
cad6c06607 Add JIT library & basic jit interface (not implemented yet) 2025-12-18 18:57:55 +03:00
d64b6db229 Remove interpreter <- parser dependency 2025-12-18 17:13:00 +03:00
9826961c76 Fix unhandled cases of casting to array & function types 2025-12-18 17:03:59 +03:00
2f5ad00b6d Add char literals 2025-12-18 16:39:01 +03:00
f22cd63a2a Print function types simpler when they have only 1 argument 2025-12-18 16:31:02 +03:00