Commit Graph

500 Commits

Author SHA1 Message Date
Irmen de Jong
ed09dd4e9e improve automatic type conversions for return values, fixes #155 2024-10-09 20:04:05 +02:00
Irmen de Jong
7c69d38588 scan all asmsubs to see if another subroutine is referenced. Fixes #153 2024-10-07 20:39:49 +02:00
Irmen de Jong
fff0d741c3 improved parsing of "not in" operator, and [] array signature (allow space) 2024-10-02 19:06:20 +02:00
Irmen de Jong
a6107fcfdf taking the address of a romsub is now the constant value of said romsub's declared address 2024-09-29 23:53:39 +02:00
Irmen de Jong
df35aa7942 added (experimental) compression library 2024-09-29 18:59:53 +02:00
Irmen de Jong
4c843571ea fix syntax error check for missing return statement 2024-09-26 01:52:33 +02:00
Irmen de Jong
5cda750e5e improve error message for undefined symbol in when choices 2024-09-18 23:00:03 +02:00
Irmen de Jong
cac4c1eb1e improve callgraph unused subroutine check for routines called from inline asm 2024-09-16 21:49:30 +02:00
Irmen de Jong
0d3ad80659 retain type of consts better to avoid precision loss
this also fixed a difference in const calculation where the result could differ if you were using optimzations or not.
2024-09-14 21:06:21 +02:00
Irmen de Jong
aba1a73e28 actually use any @zp etc tags on subroutine parameters 2024-09-14 17:42:13 +02:00
Irmen de Jong
29dd758302 Fix compiler crash in for loops with just 1 iteration 2024-09-05 21:26:46 +02:00
Irmen de Jong
2c2ae64194 replace java Stack by kotlin ArrayDeque 2024-09-02 00:15:28 +02:00
Irmen de Jong
8f6eaeac2c half width katakana conversion 2024-08-21 18:51:34 +02:00
Irmen de Jong
453e8bd0a0 update kotlin and antlr libs 2024-08-19 12:47:18 +02:00
Irmen de Jong
c9a4235669 update to kotlin 2.0, fix several code style issues 2024-06-04 01:00:46 +02:00
Irmen de Jong
0dc50a93a4 added @nozp variable flag 2024-05-21 21:53:58 +02:00
Irmen de Jong
fda8e61be4 give better error when using @split wrong 2024-05-20 21:51:07 +02:00
Irmen de Jong
c719e274d5 java version tweaks 2024-05-18 20:25:44 +02:00
Irmen de Jong
4a710ecdfc cleanups 2024-05-17 18:48:04 +02:00
Irmen de Jong
7915dda35f update libraries 2024-05-12 03:02:54 +02:00
Irmen de Jong
2675623aea fix optimization ast parent linkage problem 2024-04-16 23:27:22 +02:00
Irmen de Jong
4d37581694 fix the symbol lookup error lsb(a) when a is in a multi vardecl. 2024-04-11 00:51:08 +02:00
Irmen de Jong
53df0eb707 cleanups 2024-04-10 22:04:03 +02:00
Irmen de Jong
8db7aa07bd added (autogenerated) symbol skeleton files to the docs 2024-04-10 19:58:15 +02:00
Irmen de Jong
7a6f2ecc8c add symboldumps to doc makefile 2024-04-09 19:53:36 +02:00
Irmen de Jong
2aae46d632 added -dumpsymbols option to print a dump of all the variables and subroutine signatures 2024-04-09 19:19:13 +02:00
Irmen de Jong
6ed9899dc7 smarter desugaring of ubyte x,y 2024-04-07 23:36:46 +02:00
Irmen de Jong
731132d4b3 check number of result values in return statements 2024-04-05 02:13:31 +02:00
Irmen de Jong
641f6c05d8 allow 'void' as dummy assign target in multi-assignment statements 2024-03-31 23:43:26 +02:00
Irmen de Jong
788f6b44a6 antlr grammar now understands underscores in identifier names 2024-03-31 00:31:10 +01:00
Irmen de Jong
edc83305a4 allow multiple targets in AssignTarget 2024-03-22 21:51:08 +01:00
Irmen de Jong
de3d0b40dc fixed vm problem with branching instructions in global init chunk 2024-03-17 13:22:17 +01:00
Irmen de Jong
c11a9b8709 fix callgraph issue when module gets removed by optimizations 2024-03-11 20:34:22 +01:00
Irmen de Jong
80f39e8097 Merge branch 'booleans'
# Conflicts:
#	compiler/res/prog8lib/cx16/monogfx.p8
#	compiler/res/prog8lib/virtual/monogfx.p8
#	compiler/src/prog8/compiler/astprocessing/BoolRemover.kt
#	compiler/test/TestTypecasts.kt
#	docs/source/todo.rst
#	examples/cx16/highresbitmap.p8
#	examples/test.p8
#	httpCompilerService/src/prog8/http/TestHttp.kt
2024-03-11 01:00:48 +01:00
Irmen de Jong
eef8ae00b8 replace str return type by uword 2024-03-09 15:38:46 +01:00
Irmen de Jong
04f7b772a3 lib updates, removed unused and obsolete http and dbus modules 2024-03-05 23:42:35 +01:00
Irmen de Jong
32afcbfe42 compilerAst BOOL type changes 2024-03-02 23:19:20 +01:00
Irmen de Jong
4dc50cb551 fix unused subroutine removal not removing all unused subs 2024-02-10 21:26:53 +01:00
Irmen de Jong
8485b8429f optimizing +=1/-=1 2024-02-06 23:49:40 +01:00
Irmen de Jong
358215e4dd removed postIncrDecr (still allow ++/-- to be parsed into +=1/-=1) 2024-02-06 18:50:08 +01:00
Irmen de Jong
d4a2031c07 fix certain assignment data type mismatch crash 2024-01-25 21:14:20 +01:00
Irmen de Jong
87c46ba730 check boolean array size mismatch.
check for weird string assignment.
check for X16 problematic cpu instructions rmb, smb, bbr, bbs.
tweak number node equality wrt bool type
2024-01-21 19:15:22 +01:00
Irmen de Jong
fdbbd181ea fixes for address-of uword pointer array expressions 2024-01-17 22:51:15 +01:00
Irmen de Jong
3b199a2a87 added cx16 example: automatons.
added debug mode and RTC to cx16 emulator launchers.
dt error details.
2024-01-12 21:40:30 +01:00
Irmen de Jong
bc3f2db3de Fix call graph to no longer mark subroutines unused, that still get their variables referenced somewhere.
Revert palette.default_colors_16[] back to palette.set_default16.colors.
2024-01-11 22:12:01 +01:00
Irmen de Jong
f27e3478b9 fix const value of AddressOf for certain types 2024-01-09 22:10:25 +01:00
Irmen de Jong
f2daa17b92 tweak some not optimizations
cleanup IR typestring
2024-01-05 17:49:56 +01:00
Irmen de Jong
6d9fccacb1 boolean not expression tweaks and optimizations 2024-01-05 13:32:16 +01:00
Irmen de Jong
bfd3edb617 fix expression evaluation bug where intermediate values were overwritten, yielding the wrong result 2024-01-04 21:04:11 +01:00
Irmen de Jong
0e086d788b removed chained comparisons again, because they caused invalid expression evaluations due to changed semantics. 2024-01-01 16:00:11 +01:00