Commit graph

  • bcdcc9e752 Fix identifier & literal source locations in parser lisyarus 2026-03-15 16:33:29 +03:00
  • b25400ad65 Properly implement inner functions in aarch64 compiler & support module entry point lisyarus 2026-03-15 14:15:36 +03:00
  • 4b555c2ad4 Fix filename tracking in locations & separate prelude location and full block location for AST nodes containing statement lists lisyarus 2026-03-14 00:48:46 +03:00
  • 3981b78b2d Rename parser::finilize -> finalize lisyarus 2026-03-13 17:18:55 +03:00
  • 84f193befd Add mandelbrot example lisyarus 2026-03-13 14:26:28 +03:00
  • 89b6b09be5 Fix scope stack offset cleanup in aarch64 compiler lisyarus 2026-03-13 14:25:05 +03:00
  • 51c78169b3 Validate functions with no return & automatically add return in the end of a function returning unit lisyarus 2026-03-13 13:40:09 +03:00
  • 11656fb296 Support printing multiline error context in interpreter lisyarus 2026-03-13 13:39:28 +03:00
  • 902d272deb Fix empty location in if chains lisyarus 2026-03-13 13:39:01 +03:00
  • ad46b230d8 Fix missing handling of expression statements in aarch64 compiler lisyarus 2026-03-13 12:53:18 +03:00
  • e5ce32d25f Fix handling empty returns in aarch64 compiler lisyarus 2026-03-13 12:53:03 +03:00
  • 788e98409a Implement remainder operator in aarch64 compiler lisyarus 2026-03-13 11:24:43 +03:00
  • 0541068c2b Improve 'not implemented' error messages lisyarus 2026-03-13 11:09:39 +03:00
  • 7f574eabbd Fix extending register after logical not in aarch64 compiler lisyarus 2026-03-13 11:05:20 +03:00
  • c8cd86dd0b Add foreign functions (stub in interpreter, implemented in aarch64 compiler) lisyarus 2026-03-13 11:01:53 +03:00
  • cb433d87bf Fix short-circuit || for small integer types lisyarus 2026-03-12 23:13:42 +03:00
  • 13a9ba24f2 Refactor: split function definition & declaration in ast lisyarus 2026-03-12 21:45:21 +03:00
  • 927368aa80 Add short-circuiting versions of and/or (&& and ||) and implement them for bools and integers in interpreter and aarch64 compiler lisyarus 2026-03-12 21:37:15 +03:00
  • 76f80f8135 Update spec lisyarus 2026-03-12 20:17:17 +03:00
  • c7e0232b15 Aarch64 JIT: check function pointer support lisyarus 2026-01-19 15:14:13 +03:00
  • 30b88d4add Aarch64 JIT compiler: Fix else blocks lisyarus 2026-01-19 15:13:55 +03:00
  • 7a3c7cca5d Support mutually recursive functions in identifier resolution & type checker lisyarus 2026-01-16 15:23:48 +03:00
  • aab10621cc Don't check the host OS when determining host ABI lisyarus 2026-01-11 16:25:48 +03:00
  • 687cf31063 Check for mmap call failure lisyarus 2026-01-11 15:47:57 +03:00
  • 4def0b096d Fix parsing half-floats on non-clang lisyarus 2026-01-07 14:47:49 +03:00
  • 1dc60011d7 Implement function calls lisyarus 2026-01-06 22:10:22 +03:00
  • cb32ec3459 Refactor jit-compiling interface: introduce common global program context with shared code & symbol tables lisyarus 2026-01-06 19:10:52 +03:00
  • 668851f6bf Aarch64 jit compiler wip: fix loading/storing floating-point values lisyarus 2026-01-06 12:45:12 +03:00
  • 00d8f0fe52 Aarch64 jit compiler wip: implement integer & floating-point type conversions lisyarus 2026-01-06 12:11:56 +03:00
  • 12a4f64aed Aarch64 jit compiler wip: suppport floating-point variables lisyarus 2026-01-05 10:46:53 +03:00
  • c9f4a9c19d Aarch64 jit compiler wip: suppport floating-point arguments lisyarus 2026-01-05 10:29:46 +03:00
  • 428283dbf8 Aarch64 jit compiler wip: floating-point comparisons lisyarus 2026-01-05 10:23:33 +03:00
  • 45004ce812 Fix inferring type of a != expression node lisyarus 2026-01-05 10:23:13 +03:00
  • 8f5744c3f4 Aarch64 jit compiler wip: floating-point arithmetic operators lisyarus 2026-01-05 01:03:52 +03:00
  • c253041068 Aarch64 jit compiler wip: support f16 literals lisyarus 2026-01-05 00:49:47 +03:00
  • 7ddc8ba25d Add f16 type & literals support in parser, type checker & interpreter lisyarus 2026-01-05 00:36:11 +03:00
  • 0d87d35c47 Aarch 64 jit compiler wip: floating-point support wip lisyarus 2026-01-05 00:05:20 +03:00
  • 8b560b660b Aarch 64 jit compiler wip: fix loading literals lisyarus 2026-01-05 00:05:04 +03:00
  • 45e19e47b2 Fix parsing floating-point literals on clang lisyarus 2026-01-05 00:04:25 +03:00
  • e5b11fd707 Aarch64 jit compiler wip: support bool function arguments lisyarus 2026-01-04 13:52:53 +03:00
  • f28138e5b9 Aarch64 jit compiler wip: implement branching and loops lisyarus 2026-01-04 13:45:03 +03:00
  • db4a8ac264 Aarch64 compiler wip: replace csel with csetm for comparisons lisyarus 2026-01-04 12:36:24 +03:00
  • 7ed008543c Aarch64 compiler wip: support function arguments (integers only) lisyarus 2026-01-04 12:27:46 +03:00
  • 43f2d4531a Aarch64 compiler wip: properly handle scopes lisyarus 2026-01-04 12:17:12 +03:00
  • 716d51221f Aarch64 compiler wip: simplify stack, always 16-byte-align pushed values lisyarus 2026-01-04 12:15:52 +03:00
  • 4df89de879 Aarch64 compiler wip: variables lisyarus 2026-01-04 12:07:35 +03:00
  • d5065ec38e Aarch64 JIT-compiling wip: no-argument functions, arithmetic & logical operations, comparisons (integers only) lisyarus 2026-01-03 22:38:43 +03:00
  • 474e5da9d1 Fix unary minus precedence lisyarus 2026-01-03 22:36:50 +03:00
  • 98a5720141 Split compiled module code & data segments and use mprotect to make a module host-executable lisyarus 2026-01-02 11:35:19 +03:00
  • da39ae1225 MacOS fixes: lower CMake version, use strtoll instead of from_chars lisyarus 2026-01-02 11:34:52 +03:00
  • 0ba3e4324d Interpreter clean-up (wip - identifier/function resolving is broken) lisyarus 2025-12-29 14:42:25 +03:00
  • 9fb3db2247 Update plans lisyarus 2025-12-23 13:45:39 +03:00
  • dea5c18cfd Explicitly mark constructor AST nodes lisyarus 2025-12-23 13:43:54 +03:00
  • 46a1031a08 Move return_statement to function.hpp lisyarus 2025-12-23 12:18:22 +03:00
  • a36ba2610b Add inferred type to AST nodes & implement type checking & inference lisyarus 2025-12-23 12:17:42 +03:00
  • 97fb066e38 Only construct zero value of built-in type if the argument count is zero lisyarus 2025-12-23 12:17:18 +03:00
  • 7bca803136 Add scope level to return statement lisyarus 2025-12-22 23:51:41 +03:00
  • a35add07db Refactor error types lisyarus 2025-12-22 23:50:52 +03:00
  • c3c208b6a3 Rename numeric_literal -> primitive_literal lisyarus 2025-12-22 23:49:08 +03:00
  • 35435ac626 Rewrite get_location(statement/expression) using visitors lisyarus 2025-12-22 18:52:57 +03:00
  • b5f46e77b6 Make tree visitors more type-safe by preventing implicit casts lisyarus 2025-12-22 18:52:28 +03:00
  • 438620db2f Remove unused expression type lisyarus 2025-12-22 18:34:54 +03:00
  • 58154b9e6e Handle return statement outside function scope in AST finilizator lisyarus 2025-12-22 18:33:37 +03:00
  • 049cf7335a Add single-line comments lisyarus 2025-12-21 15:05:55 +03:00
  • 5419f87a56 Support zero-initialization of built-in types and structs lisyarus 2025-12-20 16:09:25 +03:00
  • d33b00e368 Refactor tree visitors (again) lisyarus 2025-12-20 15:52:59 +03:00
  • 1f8c73614c Refactor type visitor lisyarus 2025-12-20 15:40:02 +03:00
  • d37c5b8754 Support zero (default) initialization for struct types lisyarus 2025-12-20 15:18:48 +03:00
  • 83b4d23ab2 Add interpreter::value_visitor lisyarus 2025-12-20 15:07:45 +03:00
  • 8c07e1950b Simplify tree visitors lisyarus 2025-12-20 13:20:44 +03:00
  • aee506d102 Rewrite identifier resolution using visitors lisyarus 2025-12-20 13:05:51 +03:00
  • 26ab539d3c Preprocess tabs when printing error context lisyarus 2025-12-20 12:52:23 +03:00
  • 99418bdf6a Update plans lisyarus 2025-12-20 12:42:08 +03:00
  • 6276d97c6b Add type identifier source locations lisyarus 2025-12-20 01:10:56 +03:00
  • 709c7a7a0a Introduce dedicated type tree & AST tree visitors and use them in pretty-printing lisyarus 2025-12-20 01:06:54 +03:00
  • 4175a86ae3 Rename libs/type -> libs/types, separate computed type tree from the AST type tree lisyarus 2025-12-20 00:03:23 +03:00
  • 437123f6f4 Add scope levels to identifier AST nodes & implement identifier resolution lisyarus 2025-12-19 17:42:40 +03:00
  • 8661ab6ace Spec tweaks lisyarus 2025-12-18 19:14:20 +03:00
  • cad6c06607 Add JIT library & basic jit interface (not implemented yet) lisyarus 2025-12-18 18:42:12 +03:00
  • d64b6db229 Remove interpreter <- parser dependency lisyarus 2025-12-18 17:13:00 +03:00
  • 9826961c76 Fix unhandled cases of casting to array & function types lisyarus 2025-12-18 17:03:59 +03:00
  • 2f5ad00b6d Add char literals lisyarus 2025-12-18 16:39:01 +03:00
  • f22cd63a2a Print function types simpler when they have only 1 argument lisyarus 2025-12-18 16:31:02 +03:00
  • af815e215a Add support for function values & calling non-identifier functions lisyarus 2025-12-18 16:14:51 +03:00
  • 61f1a9c079 Add support for function types lisyarus 2025-12-18 15:37:38 +03:00
  • 53d4e12a09 Functions can be any expressions and not just identifiers in function calls (AST only, not implemented in interpreter yet) lisyarus 2025-12-18 14:37:06 +03:00
  • 4867c970d8 Simplify bison grammar to use precedence rules lisyarus 2025-12-18 13:54:43 +03:00
  • 1e6f601f00 Remove unused C error reporting code from bison grammar lisyarus 2025-12-18 13:47:54 +03:00
  • 16680ad801 Add source location to all AST nodes lisyarus 2025-12-18 13:07:42 +03:00
  • 6a3835951f Make sure parsed filenames live as long as the AST lisyarus 2025-12-18 12:49:53 +03:00
  • 6aaa58f518 Refactor interpreter: parse all files before executing them & improve error reporting lisyarus 2025-12-18 01:37:17 +03:00
  • 39de1cd73c Switch to a custom source location type lisyarus 2025-12-18 01:11:45 +03:00
  • 56c8214f36 Don't allow recursive structs lisyarus 2025-12-18 00:54:16 +03:00
  • ddf6d55c54 Make sure structs with same name but in different scopes are regarded as different types lisyarus 2025-12-17 23:12:54 +03:00
  • 04ee8e28e6 Add structures lisyarus 2025-12-17 22:57:10 +03:00
  • fb4877c2ed Impement array element assignment lisyarus 2025-12-17 16:07:39 +03:00
  • ff4d0a9c3e Rename 'interpreter.hpp' -> 'exec.hpp' lisyarus 2025-12-17 15:53:24 +03:00
  • d4a4d4dbef Refactor printing AST lisyarus 2025-12-17 15:51:38 +03:00
  • 435aa61fe4 Implement array types & array values lisyarus 2025-12-17 15:46:51 +03:00
  • bc7d24ad62 Support return statement with no expression lisyarus 2025-12-17 14:22:20 +03:00