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
Irmen de Jong
d1f8ee1e56
replace most common subexpressions by a single temp variable
2024-01-01 14:57:24 +01:00
Irmen de Jong
d03ff1e4d0
improved var -> const replacement, now done in constfolding already (fixes some obscure problems later on)
...
Also fixed some directive parenting errors
2023-12-29 19:48:40 +01:00
Irmen de Jong
932bbd0381
allow casting of byte<->ubyte and word<->uword
2023-12-29 16:23:24 +01:00
Irmen de Jong
ccc11e49d2
fix asmgen for uword shift right 8 or more bits
2023-12-29 05:06:09 +01:00
Irmen de Jong
d28c994ecd
directive really needs to be listed out in the parser otherwise it confuses it with % modulo :-(
...
Also fix missing const fold pass in optimizer
2023-12-29 03:45:20 +01:00
Irmen de Jong
bcc4bf5c2b
almost forgot
2023-12-28 20:39:27 +01:00
Irmen de Jong
37fcde30d6
constants have p8c_ prefix instead of p8v_ in the asm
2023-12-28 05:28:32 +01:00
Irmen de Jong
09c6cb4d6b
replace unwritten vars by consts. Improved const eval.
...
Fixed some slight bugs in library code
2023-12-28 05:17:15 +01:00
Irmen de Jong
b428343c2a
tweak chained comparisons
2023-12-28 02:31:39 +01:00
Irmen de Jong
dfce292294
allow chained comparisons i<x<j (desugared into: i<x and x<j)
2023-12-28 01:18:59 +01:00
Irmen de Jong
2b8f613a00
added %option ignore_unused to suppress warnings about unused vars and subs in that module/block.
...
Also improved error for invalid directive.
2023-12-26 23:37:59 +01:00
Irmen de Jong
4bb2b8ca9b
make isArray a computed property by simply checking the datatype
2023-12-26 19:58:08 +01:00
Irmen de Jong
5179562fb2
can be val
2023-12-26 19:39:02 +01:00
Irmen de Jong
0a4de45453
get rid of vardecl.declareddatatype
2023-12-26 19:33:58 +01:00
Irmen de Jong
66d939df0d
docs about new asm symbol prefixes
2023-12-20 22:37:46 +01:00
Irmen de Jong
6bc079c7b7
more asm symbol prefixing: variables with p8v_, subroutines with p8s_ etc
...
labels with p8l_ . All this to avoid symbol clashes in the generated assembly code.
Everything got its own distinguishing prefix so we're done with it once and for all and have only 1 breaking change moment.
2023-12-20 22:20:59 +01:00
Irmen de Jong
69f6afe420
block names in asm now prefixed with p8b_ (instead of p8_)
...
as part of fixing var versus block symbol conflict handling
2023-12-19 23:00:20 +01:00
Irmen de Jong
b7279a3d9e
fix 'not in' parsing error
...
fixes #115
2023-12-19 19:49:25 +01:00
Irmen de Jong
a8be94de6b
better error message when attempting to cast a float to integer
2023-12-15 22:28:06 +01:00
Irmen de Jong
e98e951834
fix chained assignment and multi-vardecl RHS evaluation
2023-12-10 16:44:51 +01:00
Irmen de Jong
ef1c665b9a
allow underscores for numerical grouping
2023-12-09 13:13:34 +01:00
Irmen de Jong
d56565be25
fix multi-var decl
2023-12-09 12:32:41 +01:00
Irmen de Jong
e076b3aedc
fix multi-var decl in nested scopes
2023-12-09 12:07:09 +01:00