25c1fbd44b
lang: fix a bunch of memory leaks
2025-04-17 23:15:48 +01:00
11449b9919
lang: codegen: add support for non-fstrings to expr generator
2025-04-17 22:55:40 +01:00
9cce4bf541
mie: implement caching and emitting string data
2025-04-17 22:55:17 +01:00
abb7cfaf0e
mie: move mie_ctx to a separate header
2025-04-17 22:25:36 +01:00
7b8d77a264
lang: codegen: implement message-send code generation and global var references
2025-04-17 21:44:38 +01:00
a4504c0507
lang: ast: fix source formatting
2025-04-17 21:43:51 +01:00
8388dfeb79
mie: implement ir generation for message sending
2025-04-17 21:43:02 +01:00
6d8809d325
mie: implement generating extern global data items
2025-04-17 21:42:41 +01:00
51e07522e8
lang: ast: fix parens not allowing sub-keyword messages
...
previously, an expression like:
x arg1:a arg2:(c subArg:d).
were being parsed incorrectly. This expression was parsed
as single -arg1:arg2:subArg: message being sent to x. the
parentheses around the `c subArg:d` sub-expression were
being ignored.
now, this expression is correcly parsed as the value
of `c subArg:d` being passed as a parameter to the message
-arg1:arg2:
2025-04-17 21:38:31 +01:00
635d23d2e1
frontend: update codegen usage to only use pre-order ast traversal
2025-04-16 21:59:32 +01:00
f0e6237473
lang: codegen: redesign again to use purely pre-order ast traversal
2025-04-16 21:58:52 +01:00
95dbedefde
mie: builder: add function to get current block
2025-04-16 21:58:22 +01:00
a184ffce6f
doc: fix sample file permissions
2025-04-15 11:06:06 +01:00
ccb31ae545
doc: add var syntax samples
2025-04-15 11:05:52 +01:00
ae35c15f78
ivy.vim: add highlighting for var keyword
2025-04-15 11:05:02 +01:00
e430b7b2f1
lang: add var keyword for variable declarations
...
the var keyword allows greater control over what scope a
particular variable exists in. it clarifies whether a new
variable is being defined or an existing variable is being
assigned to. it will also facilitate the implementation of
global variables.
2025-04-15 11:02:47 +01:00
abebdb595a
frontend: add IR generation to compile command
2025-04-15 11:00:48 +01:00
8d462799dd
mie: add selector as a mie_value const type
2025-04-15 11:00:10 +01:00
4587416ac9
frontend: repl: generate ir from input
2025-04-14 20:15:41 +01:00
670b7c5a33
lang: codegen: redesign codegen to use a stack-based state machine
2025-04-14 20:15:05 +01:00
5630132a69
mie: add some convenience functions for func, block, and builder
2025-04-14 20:14:44 +01:00
d4e0df0bda
mie: implement sub/mul/div instruction generation
2025-04-14 20:14:28 +01:00
1c8f1447e7
mie: fix a nullptr deref in mie_ctx cleanup
2025-04-14 20:13:13 +01:00
bcc0daa2d5
frontend: update ast iterator api usage
2025-04-14 12:25:49 +01:00
f123902215
frontend: add parameters to print_ast_node iterator function
...
the caller can now specify whether the nodes should be printed
in pre-order or post-order, and whether the output should be indented.
2025-04-14 12:24:56 +01:00
80e001cdc1
lang: add user args to ast iterator; combine pre/post-order traversal modes
...
the caller can now provide a pointer arg to ivy_ast_node_iterate, which will
be forwarded to the specified callback function each time it is called.
the iterator now behaves similarly to fts, in that it visits each node
in both pre-order and post-order, and indicates to the callback whether
the current iteration is pre- or post-order.
2025-04-14 12:24:42 +01:00
7a9fc1b11c
doc: remove class definition from Expressions sample
2025-04-14 09:53:27 +01:00
2cd78a64b0
lang: start implementing code generation (ast to ir) facility
2025-04-14 09:48:16 +01:00
c682cbb15a
frontend: update ast traversal api usage
2025-04-14 09:46:36 +01:00
fd91bb71c0
ast: implement postorder ast traversal
2025-04-14 09:46:27 +01:00
ae5e438207
common: add some more status codes
2025-04-14 09:43:31 +01:00
e1d7bebe9f
test: mie-ir: cleanup after ir generation
2025-04-13 19:25:41 +01:00
a7233a6cf6
mie: implement value cleanup
2025-04-13 19:25:23 +01:00
44aec9a121
doc: mie ir block labels are no longer prefixed with %
2025-04-13 18:35:06 +01:00
80110ec95e
mie: add ir builder test
2025-04-13 18:34:41 +01:00
edf5b18b32
mie: start implementing ir memory->text conversion
2025-04-13 18:34:28 +01:00
deb1232bf9
mie: implement more ir building functionality
2025-04-13 18:34:02 +01:00
7f0d8b87c5
mie: name_map can now generate unique names when given no hints
2025-04-11 14:12:53 +01:00
e379afb035
doc: add sample Mie IR for Person.im
2025-04-11 13:42:27 +01:00
db5843b66f
mie.vim: replace sym type name with atom
2025-04-11 13:42:10 +01:00
2b603c0d75
meta: add support for simple unit test
2025-04-11 13:41:33 +01:00
377444ef59
mie: implement value type initialiser functions
2025-04-11 13:40:54 +01:00
98d82de47a
mie: add name_map to generate unique value names
2025-04-11 13:40:37 +01:00
8dd67501bd
doc: update property/atom samples
2025-04-10 13:04:43 +01:00
4dec09352d
ivy.vim: update highlighting for properties and atoms
2025-04-10 13:04:29 +01:00
2235f9c0a9
lang: change symbols for properties and atoms to -> and $ respectively
2025-04-10 13:04:12 +01:00
8045872dc3
mie.vim: add highlighting for new instructions and keywords
2025-04-10 12:19:13 +01:00
5cd3eff2ed
mie: add lots more mie_value sub-types
2025-04-10 12:18:07 +01:00
ecc886c95a
doc: add sample of directly calling a block rvalue
2025-04-03 10:53:27 +01:00
e7f6d54fa2
mie: add value type hierarchy definitions
...
every construct within Mie, such as constants, instructions, functions, and translation units, are sub-types of the generic mie_value struct.
mie_value will facilitate iterating through the IR, as well as converting the IR to/from different formats.
2025-04-03 10:50:41 +01:00