At this point, only a minimal number of operations are working, and
after running any kind of source code, the 'result' is simply left on
the VM's stack. Still, it's awesome to see it reach this point.
I've expanded support to three major platforms:
- linux
- windows
- macos
The CI now runs the test suites for all of these, both under normal
conditions and under GDB (except for macos, which lacks GDB support).
TOY_BITNESS specifies the bit-width of the current platform, either 32
or 64. A value of -1 means the bit-width could not be determined. Some
tests will be disabled if the appropriate bit-width can't be determined,
and a warning is printed to stderr.
TOY_API has been tweaked, and is now dependant on different
preprocessor flags. It is defined as 'extern' on all supported
platforms except windows, which instead specifies DLL support. It
defaults to 'extern' if the platform can't be determined.
commit d0350998ecc80b8925a1962ceb2ab400da50be9d
Author: Kayne Ruse <kayneruse@gmail.com>
Date: Sun Sep 22 09:55:42 2024 +1000
Expanded GDB tests using matrix strategy
commit dc2addacc52830227ddcd0f35997c0e1668b579c
Author: Kayne Ruse <kayneruse@gmail.com>
Date: Sun Sep 22 09:05:42 2024 +1000
Reserved the yield keyword
commit f485c380f74a49092e0c5a41e599fbb06dbce235
Author: Kayne Ruse <kayneruse@gmail.com>
Date: Sat Sep 21 15:17:11 2024 +1000
Potential segfault fix
commit d8b19d21c92133feb071e631009a3cf99df0f068
Author: Kayne Ruse <kayneruse@gmail.com>
Date: Sat Sep 21 14:25:47 2024 +1000
Added testing on windows under GDB, read more
I'm hunting a segfault that only appears on windows, but I lack a
windows machine, so github's runners are all I have right now.
commit 8606db541fb5cbe91b16a39e9815fe4a27ba0c8a
Author: Kayne Ruse <kayneruse@gmail.com>
Date: Sat Sep 21 13:12:02 2024 +1000
DLL import/export macros tweaked for windows
TOY_EXPORT for making a DLL
TOY_IMPORT for using a DLL
Defaults to 'extern' if neither option is present
commit a6929666401953a5b3a93dfe83c9398e012beefc
Author: Kayne Ruse <kayneruse@gmail.com>
Date: Sat Sep 21 12:52:06 2024 +1000
Investigating bitness issue on windows
commit 8f615f735868a316e8d5a6a77ed899e72fd537f8
Author: Kayne Ruse <kayneruse@gmail.com>
Date: Sat Sep 21 12:32:55 2024 +1000
Adjusting bitness tests in test_ast.c
commit 61694f2183ac84ee7c53c855f2f6aa29f360f16c
Author: Kayne Ruse <kayneruse@gmail.com>
Date: Sat Sep 21 11:46:59 2024 +1000
Added experimental macOS CI job
* expand() will only touch the memory once
* fixed missing if-else cascade at toy_routine.c:90
* unary negate will not optimise numbers unless the '-' character is immediately prior
* fixed broken test for unary negation of groups
The tests are failing in a strange way, with the error message 'corrupted top size'. I don't know what it means, and it seems to be caused by a call to printf() within 'test_bytecode.c'. I need a break, as this is making me dizzy.
The parser now correctly produces a workable AST. I think I'll skip
over the optimizer, and begin on the compiler next session. The
optimizer will act directly on the AST, but it isn't totally necessary.
Other tools can also operate on the AST, such as for debugging - I'll
have to ask what kinds are out there.