Commit Graph

150 Commits

Author SHA1 Message Date
Sasha Koshka
86df537ece Added test for nested array literals
Who knew it would work first try?
2024-01-28 04:24:15 -05:00
Sasha Koshka
f057f3b4a4 Array literals now support irDestLoc 2024-01-28 04:18:33 -05:00
Sasha Koshka
85703f6059 Add more tests for loops 2024-01-28 03:29:49 -05:00
Sasha Koshka
fe85582088 Fixed extra lines after IR blocks 2024-01-28 03:18:39 -05:00
Sasha Koshka
5940e540b3 Fix some issues with control flow, add tests 2024-01-28 03:16:05 -05:00
Sasha Koshka
3c7565861d Add test case for comparisons on defined types 2024-01-28 02:18:18 -05:00
Sasha Koshka
56ae34c297 Updated all tests except for literal_test.go
You Will See Why
2024-01-27 23:24:19 -05:00
Sasha Koshka
57ef5933ee Well it would help if it generated well formed IR 2024-01-27 23:00:03 -05:00
Sasha Koshka
f35f3e0df0 Assignment coercions are much more IR efficient 2024-01-27 22:45:28 -05:00
Sasha Koshka
773e718592 Complete TestInterfaceInStruct (no longer segfaults somehow) 2024-01-27 19:49:22 -05:00
Sasha Koshka
41c9f57063 More using qualified names in IR 2024-01-27 18:16:30 -05:00
Sasha Koshka
d9c6bd644b Oh my god I swapped the columns 2024-01-27 18:09:51 -05:00
Sasha Koshka
954f6c877e Added cool output to failed tests 2024-01-27 18:07:49 -05:00
Sasha Koshka
05e75cb746 Literal generation now uses qualified type names when possible 2024-01-27 17:16:23 -05:00
Sasha Koshka
3a4a5683b5 Remove redundant val variable/declaration generation 2024-01-27 14:17:52 -05:00
Sasha Koshka
f994c4dc08 Rename some routines in data 2024-01-27 14:03:38 -05:00
Sasha Koshka
805a9a110f Updated more tests (cutting out extra load insts) 2024-01-27 17:35:33 +00:00
Sasha Koshka
91d4b92e6b Fix more names and orgaization of statement generation 2024-01-27 17:33:15 +00:00
Sasha Koshka
021a289623 Added -Any suffix to appropriate generation routines 2024-01-27 17:24:47 +00:00
Sasha Koshka
5085ea8502 Fixed segfault relating to break and return statements 2024-01-27 17:11:44 +00:00
Sasha Koshka
b13130db8e Introducing ResultMode! time to got to bed. 2024-01-27 10:43:27 +00:00
Sasha Koshka
21fd6a4130 Update some tests 2024-01-27 10:06:17 +00:00
Sasha Koshka
706e2e0286 Updated control flow generation 2024-01-27 10:03:15 +00:00
Sasha Koshka
6d28d52cdf Void functions/methods no longer request a value 2024-01-27 09:22:19 +00:00
Sasha Koshka
fc5dda739e Made generic block generation routine 2024-01-27 09:18:41 +00:00
Sasha Koshka
8bf3938842 Made panic messages in expression-multiplex.go more informative 2024-01-27 09:15:39 +00:00
Sasha Koshka
43130fd0da Add Val onto value expressions 2024-01-27 09:09:27 +00:00
Sasha Koshka
cc5ed3c2ee Update block generation routines 2024-01-27 09:06:17 +00:00
Sasha Koshka
b1799c25e1 Add generateStatement routine 2024-01-27 08:53:29 +00:00
Sasha Koshka
1f653be8cc Renamed generateStatement to generateStatementVal 2024-01-27 08:49:25 +00:00
Sasha Koshka
43aae56b37 Add generateExpression function 2024-01-27 08:48:00 +00:00
Sasha Koshka
f9d53d7ab7 Rename expression source files 2024-01-27 08:40:02 +00:00
Sasha Koshka
fbaec1efdb Rename generateExpression to generateExpressionVal 2024-01-27 08:39:05 +00:00
Sasha Koshka
8606c761e8 Same thing for bit casts 2024-01-27 07:05:34 +00:00
Sasha Koshka
b56dceb3e1 Generator now no longer generates ineffectual value casts 2024-01-27 07:03:13 +00:00
Sasha Koshka
b0c62642f5 Add more tests to generator 2024-01-27 01:00:07 +00:00
Sasha Koshka
35dbbebb8b Updated stuff to use the new routines in data.go 2024-01-26 05:35:47 +00:00
Sasha Koshka
098248da19 More routines in data.go 2024-01-26 05:35:22 +00:00
Sasha Koshka
a80cd600b5 Added a test case for a Writer interface
I really need to cut out a lot of the unnecessary IR that the
generator emits
2024-01-26 04:32:55 +00:00
Sasha Koshka
ea32fcc7d5 Added a test case for casting slices to pointers 2024-01-26 04:21:30 +00:00
Sasha Koshka
d28bfbac16 Fix conversion of slices to pointers 2024-01-26 04:07:58 +00:00
Sasha Koshka
8e458111b5 Change the location at which defined IR types are wrapped
Defined IR types are wrapped in a TypeDefined by generateTypeNamed.
This causes them to be sent through GEP, which is necessary for
testing.
2024-01-25 22:57:52 +00:00
Sasha Koshka
f6604dcecd Wrote test for getelementptr'ing into chained typedefs 2024-01-25 18:19:34 +00:00
Sasha Koshka
67a0157cbd Use TypeDefined in generator 2024-01-25 18:19:22 +00:00
Sasha Koshka
f1d48d74a2 Add test for chained typedefs with different names 2024-01-25 17:56:20 +00:00
Sasha Koshka
bb59f8de4a Fix duplicated pointer types 2024-01-25 07:36:51 +00:00
Sasha Koshka
9390eb6b2e Added test to debug absurd behavior relating to type defs 2023-12-24 22:49:10 -05:00
70c45f6fe1 Interface method calls no longer cause a segfault 2023-12-24 22:18:47 -05:00
7757133d43 Something was off with TestCompare 2023-12-24 21:45:47 -05:00
7d926be83a Fix code I probably wrote while high off my ass 2023-12-24 21:39:56 -05:00
Sasha Koshka
d4f81b0667 Empty struct literal values are initialized to zero 2023-12-23 17:25:27 -05:00
Sasha Koshka
3cca2dd130 Added nil (zero initializer) literals 2023-12-21 23:33:38 -05:00
Sasha Koshka
eeae7ac1ed Generator can produce link names 2023-12-20 03:05:27 -05:00
Sasha Koshka
6bc59ca0d1 I forgor 2023-12-15 12:46:33 -05:00
Sasha Koshka
7572e8bf08 Fix comparison predicates 2023-12-15 12:40:43 -05:00
da7807d653 Attempt to further fix interface assignment 2023-12-14 21:21:07 -05:00
b7faa727af Method calling now properly passes pointer instead of value 2023-12-14 01:23:34 -05:00
4a28ee61c0 generateAssignmentSource assigns interface methods to iface dest 2023-12-14 00:47:14 -05:00
Sasha Koshka
ea934445c6 Add test for aforementioned issue 2023-12-07 17:14:37 -05:00
Sasha Koshka
019a8732cb Augh 2023-12-07 04:03:28 -05:00
Sasha Koshka
8d1d87dbb8 If/else branching is no longer... like how it was 2023-12-07 03:58:57 -05:00
Sasha Koshka
1176da7cb9 If/else generation will not attempt to overwrite branches 2023-12-07 03:54:01 -05:00
988649098c Operands to IR binary instructions now have identifiers instead of names 2023-12-07 03:04:29 -05:00
e470fb1f5c Generator alloca's variables when they are defined 2023-12-07 02:48:27 -05:00
Sasha Koshka
e32d349e2e Add some more test cases to the generator 2023-12-05 22:29:29 -05:00
Sasha Koshka
8bc00720ac Fix bug with popping block managers off of the stack 2023-12-05 22:27:55 -05:00
588800e02c Slice operations now load the data pointer 2023-12-05 15:35:17 -05:00
5205f01877 Revert slices back to having just two fields 2023-12-05 03:07:54 -05:00
b0c3839ed9 Fixed several cases where the generator would output invalid IR 2023-12-03 22:23:04 -05:00
a7fe9a592b Generator passes method owner as pointer 2023-12-03 15:38:07 -05:00
ab8d616e2b Fix stale code 2023-12-02 23:42:54 -05:00
b1cd82d4ed Generator generates methods properly 2023-12-02 23:41:35 -05:00
c0997b3e47 Oops 2023-12-02 23:36:12 -05:00
fa69bd2294 Generator now pierces pointers when accessing members as well 2023-12-02 23:35:22 -05:00
3b6aa7fffb String literals can be assigned to strings now 2023-12-02 22:45:22 -05:00
55a86ad64c That should be literally every feature 2023-12-02 21:45:15 -05:00
5539f8722f Created function for making slices 2023-12-02 04:21:10 -05:00
Sasha Koshka
9ccb1490bf Completed operations 2023-12-01 01:18:10 -05:00
Sasha Koshka
ccd3ddd82a Made native target actually work 2023-11-30 17:16:55 -05:00
af4827590e Operation stub part II 2023-11-30 15:44:30 -05:00
1c5a58aa23 Add operation stub 2023-11-30 02:13:47 -05:00
f87a4a4b78 Added casting 2023-11-30 02:06:12 -05:00
78d4276a57 Added bit casts 2023-11-29 20:37:56 -05:00
a58b058025 Generator properly uses subscript offset 2023-11-29 20:31:40 -05:00
593683156a Generator grabs slice type from proper place 2023-11-29 20:31:07 -05:00
c5a61e15f6 Generator now adds null terminator to c-strings 2023-11-29 00:45:38 -05:00
37819645cd Reduce element type when generating string literal data 2023-11-29 00:21:58 -05:00
0afccbe6b1 Facehoof 2023-11-29 00:13:54 -05:00
Sasha Koshka
ced43a161d Added string literals to generator 2023-11-29 00:01:35 -05:00
Sasha Koshka
c08f5d7706 Add string literals to generator WIP 2023-11-28 01:15:12 -05:00
aa107072d8 This should have been way more commits 2023-11-26 04:02:22 -05:00
0a54cbdd63 Typedefs that are never referenced are never generated 2023-11-23 01:44:48 -05:00
94bf21536d Generator returns an LLVM module 2023-11-23 01:26:14 -05:00
15fece8154 Various fixes 2023-11-23 00:02:00 -05:00
a2d4252428 Migrated generator to use new llvm code generation package 2023-11-22 20:37:37 -05:00
0331b486bf Generator WIP 2023-11-21 15:04:22 -05:00
Sasha Koshka
05e298583e Functions/behaviors stub 2023-11-16 22:41:20 -05:00
Sasha Koshka
729af04963 Add type generator 2023-11-16 22:04:56 -05:00
13b18c0ce0 Generator stub II 2023-11-16 15:52:28 -05:00
3f96704723 Generator stub 2023-11-14 02:49:55 -05:00