Commit Graph

2570 Commits

Author SHA1 Message Date
Irmen de Jong
6cb8b3b5cd removed unneeded scope param from lookup() 2021-10-29 00:01:28 +02:00
Irmen de Jong
2bf4017f2b fix nested label lookups in anon scopes
fixed non-global qualified names lookup
2021-10-28 23:48:01 +02:00
Irmen de Jong
08d2f8568b refactoring symbol lookups 2021-10-27 23:48:12 +02:00
Irmen de Jong
ac5f45d2d4 fix nested label lookups in anon scopes (partly) 2021-10-27 02:41:24 +02:00
Irmen de Jong
3cc7ad7d20 slightly improve error message for unknown module import 2021-10-27 00:38:36 +02:00
Irmen de Jong
d4513364fb fix compiler crash when file on command line doesn't exist 2021-10-27 00:23:54 +02:00
Irmen de Jong
9684f4e42a add unit tests for AnonScope refactoring, cleaned up imports 2021-10-27 00:05:46 +02:00
Irmen de Jong
f4186981fd todo 2021-10-26 23:30:48 +02:00
Irmen de Jong
141689e697 change many uses of .definingScope to just the parent node 2021-10-26 23:25:16 +02:00
Irmen de Jong
743c8b44a2 AnonymousScope refactor: it's no longer a INameScope
because it doesn't contain scoped variables (these are moved to the subroutine's scope)
2021-10-26 23:01:51 +02:00
Irmen de Jong
5e1459564a no longer take AddressOf a str-variable that is a subroutine's parameter with str type (it's just an address/uword already) 2021-10-25 23:49:01 +02:00
Irmen de Jong
69a8813a3d first steps to add support for str parameter type 2021-10-24 20:57:10 +02:00
Irmen de Jong
17175df835 more precise error messages checks 2021-10-24 19:14:46 +02:00
Irmen de Jong
6b32535cb6 don't complain about uninitialized str var if it's not a var 2021-10-24 15:13:38 +02:00
Irmen de Jong
7f8fe75ab2 version 7.1 2021-10-24 14:00:11 +02:00
Irmen de Jong
2815a14bb5 (7.2) can now test for specific error messages, and specify to omit invoking assembler in tests 2021-10-22 01:25:26 +02:00
Irmen de Jong
f4dfa60790 (7.2) tests for pass by ref parameters 2021-10-22 00:41:34 +02:00
Irmen de Jong
35e88dd529 (7.2) correctly parse datatype of array parameters 2021-10-21 22:06:21 +02:00
Irmen de Jong
4d5094a517 (7.2) cleanup Petscii converter errorhandling, add unit tests for error scenarios 2021-10-20 23:48:20 +02:00
Irmen de Jong
dd5abae721 move testcase to proper location 2021-10-20 23:08:40 +02:00
Irmen de Jong
8f2fb20934 Merge branch 'v7.1' into v7.2 2021-10-20 22:51:14 +02:00
Irmen de Jong
44143f481a Merge branch 'v7.1' 2021-10-20 22:50:35 +02:00
Irmen de Jong
440abf4998 fix test to recognise inserted return statements 2021-10-20 22:50:18 +02:00
Irmen de Jong
3c10427e04 Merge branch 'v7.1' 2021-10-20 22:38:23 +02:00
Irmen de Jong
74555a32ed Merge branch 'v7.1' into v7.2 2021-10-20 22:37:43 +02:00
Irmen de Jong
85956b5828 code generator: add a return (RTS) to empty subroutines. Fixes #67 2021-10-20 22:36:13 +02:00
Irmen de Jong
41e40cad03 optimizer bug: don't remove empty subroutine if it's referenced. Fixes #67 2021-10-20 22:25:10 +02:00
Irmen de Jong
df2d5c6585 tests for callgraph and unused subroutine removal in optimizer 2021-10-20 22:24:10 +02:00
Irmen de Jong
1a111b706e Merge branch 'v7.1' into v7.2 2021-10-19 23:59:31 +02:00
Irmen de Jong
f696fce187 Merge branch 'v7.1' 2021-10-19 23:59:07 +02:00
Irmen de Jong
82d3d81bb2 don't want to complicate things by introducing a boolean literal 2021-10-19 23:58:50 +02:00
Irmen de Jong
4668932bac todo 2021-10-19 23:38:07 +02:00
Irmen de Jong
e6c41eac93 Merge branch 'v7.1' into v7.2 2021-10-19 23:22:38 +02:00
Irmen de Jong
f0cff661df Merge branch 'v7.1' 2021-10-19 23:21:44 +02:00
Irmen de Jong
82d20dea39 a few comment and TODO cleanups.
remove remark about chars UBYTE type, kotlin's closest native type that can contain 0-255 is a short.
2021-10-19 23:20:34 +02:00
Irmen de Jong
804bb06859 clarified isInRegularRAM() by making it an extension method on AssignTarget 2021-10-19 22:36:05 +02:00
Irmen de Jong
5afa7e53f8 got rid of program arg for isInRegularRAM 2021-10-19 22:30:30 +02:00
Irmen de Jong
7f15b7b716 remove unneeded check for duplicate module names as this is now caught by the logic in Program.addModule itself 2021-10-19 22:12:54 +02:00
Irmen de Jong
552e0c2248 rename mainModule to toplevelModule.
failed module no longer retains in the Ast.
improved some tests on that.
2021-10-19 21:49:05 +02:00
Irmen de Jong
e5b9e1f5e7 string object identity hashcode can be negative sometimes, so allow a '-' character. 2021-10-19 21:08:15 +02:00
Irmen de Jong
502bf90007 comments 2021-10-19 01:12:28 +02:00
Irmen de Jong
40bf117497 avoid crash when parser doesn't report an offending token for a parse error 2021-10-19 00:44:33 +02:00
Irmen de Jong
4011dce31b added a few more tests for the file element of Position 2021-10-19 00:26:02 +02:00
Irmen de Jong
9e881e32f8 version 7.1-beta2 2021-10-16 18:47:16 +02:00
Irmen de Jong
14aad2358f version 7.2 started 2021-10-16 18:46:08 +02:00
Irmen de Jong
637a8899c5
Merge pull request #65 from irmen/v7.1
more V7.1 updates
2021-10-16 17:51:56 +02:00
Irmen de Jong
cf0e395921 got rid of SourceCode.pathString() and the 'need' to strip < and > 2021-10-16 17:15:22 +02:00
Irmen de Jong
6ef438ce50 todo 2021-10-16 15:08:36 +02:00
Irmen de Jong
46e4b977a4 another attempt to fix Windows path issues 2021-10-16 15:02:15 +02:00
Irmen de Jong
9626c5dead attempt to fix Windows path issue with "library:" prefixes in AsmGen 2021-10-16 14:50:08 +02:00