Irmen de Jong
154f9b300f
fix crash: byte c = if a < b -1 else 1 "both values should be the same type"
2024-11-19 23:46:25 +01:00
Irmen de Jong
ed09dd4e9e
improve automatic type conversions for return values, fixes #155
2024-10-09 20:04:05 +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
edc5a5a94f
improve data driven unit tests to use kotest withData()
2024-09-08 16:55:08 +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
5d7ddebcad
fix bool to uword cast in 6502 codegen
2024-04-11 00:34:53 +02: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
2a8b65e29c
test str to uword change in function params
2024-03-10 23:48:58 +01:00
Irmen de Jong
dba0846866
optimize word >, word <=
2024-03-02 23:19:39 +01:00
Irmen de Jong
f40b7b62bb
updated unit tests and some basic changes for them
2024-03-02 23:19:20 +01:00
Irmen de Jong
1816bda7ea
extra check
2024-01-26 00:12:31 +01:00
Irmen de Jong
d4a2031c07
fix certain assignment data type mismatch crash
2024-01-25 21:14:20 +01:00
Irmen de Jong
d85c347a6c
optimize /256 more, and fixed a unsigned byte word cast error
2024-01-07 02:34:05 +01:00
Irmen de Jong
56ba24962c
fixed 'not not x' optimization to just 'x'
2024-01-04 15:02:21 +01:00
Irmen de Jong
8f18b5b8a7
keep distinction between logical and bitwise boolean operators
2023-12-30 01:08:42 +01:00
Irmen de Jong
e35cfd4971
get rid of the redundant 'f' suffix of several funtions in floats module (breaking change!)
...
Unfortunately a few routines (minf, maxf, clampf) remain unchanged, because removing the 'f' would make them clash with a builtin function.
floats.rndf -> floats.rnd
floats.parse_f -> floats.parse
floats.rndseedf -> floats.rndseed
floats.print_f -> floats.print
floats.str_f -> floats.tostr
2023-12-29 03:12:44 +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
ffdc658dc8
type error tweaks
2023-12-26 18:49:01 +01:00
Irmen de Jong
0d44492086
push,pushw,pop and popw are no longer built-in functions but regular routines in sys
2023-12-26 14:47:31 +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
b09e0a05bf
some tweaks to errors about long integer literals
2023-12-03 02:45:26 +01:00
Irmen de Jong
c609e982fe
allow const expression intermediate values to be 32 bits integers to avoid needless overflow errors.
2023-12-03 01:48:12 +01:00
Irmen de Jong
893b383bdf
fix signed byte to word sign extension in assignment
2023-10-17 03:08:37 +02:00
Irmen de Jong
70a78e74f6
get rid of binexpr splitter
2023-07-20 01:36:43 +02:00
Irmen de Jong
5da3abe6b4
fix silent typecast on return statements that could lose data (word->byte)
2023-06-17 14:44:36 +02:00
Irmen de Jong
38efe25c68
abs() now works on multiple data types including float.
...
no need to use floats.fabs() anymore
2023-05-02 01:19:53 +02:00
Irmen de Jong
e779a07bce
allow when with byte 1,2,3 for word variables without having to cast the values to word explicitly
2023-03-09 22:15:56 +01:00
Irmen de Jong
6aabbffc62
some cleanups
2023-02-09 02:34:18 +01:00
Irmen de Jong
201b77d5b6
boolean vs byte cast fixing, and pointervar error
2023-02-02 00:57:20 +01:00
Irmen de Jong
002006517a
rewrite bool=bool^1 into bool=not bool
2022-12-29 19:42:38 +01:00
Irmen de Jong
a82b2da16e
Fix some FP related assignment issues in 6502 codegen.
2022-12-04 13:03:38 +01:00
Irmen de Jong
0d7b14e2d8
fix crash when assigning certain memory read to word variable. Fixes #82
2022-10-23 11:57:23 +02:00
Irmen de Jong
1d65d63bd9
ir: making sure all names are scoped properly. textelite now runs in vm
2022-09-25 18:02:35 +02:00
Irmen de Jong
4b7b1379d9
also binexpr split on and,or,xor if appropriate
2022-08-08 00:09:18 +02:00
Irmen de Jong
93ce74eeb1
removed problematic expression "simplifications" (that introduced arbitrary r9 temp register usage)
2022-08-07 12:26:11 +02:00
Irmen de Jong
4bc65e9ef7
fix stack crash in cx16.push_vera_context()
2022-07-14 16:33:09 +02:00
Irmen de Jong
2d600da8b6
fix codegen crash on certain nested typecast
2022-07-13 22:24:31 +02:00
Irmen de Jong
edf12bec71
improve bool params typecasting, fix compiler crash on abs(floatvar)
2022-07-12 17:52:37 +02:00
Irmen de Jong
88cbb6913d
tweak bool type handling
2022-07-11 14:55:50 +02:00
Irmen de Jong
92eb3b0bf6
bool logical testcase
2022-07-09 22:29:38 +02:00
Irmen de Jong
1dfa8ee7d8
add ARRAY_BOOL array type
2022-07-07 23:07:30 +02:00
Irmen de Jong
1163543a98
fix bool param lookup problem
2022-07-07 22:23:56 +02:00
Irmen de Jong
65daf29acd
fix compiler crash related to word types in certain comparison expressions
2022-07-07 22:23:56 +02:00
Irmen de Jong
298b25cf7d
fix compiler crash on certain typecasting assignment
2022-07-07 22:23:56 +02:00
Irmen de Jong
4b336b1853
if passing a subroutine or label name as an uword argument, without &, add the addressof automatically
2022-07-02 23:55:32 +02:00
Irmen de Jong
2eb41a8caf
temporary workaround for code problem around 'not'
2022-07-01 00:38:19 +02:00
Irmen de Jong
97cb0cbd08
tweak "not" removal/rewriting
2022-06-30 02:16:30 +02:00
Irmen de Jong
435d6f6f3f
vm: and/or/xor/not are all bitwise operations again
2022-06-28 03:17:51 +02:00
Irmen de Jong
3961f26635
consolidating modules
2022-03-11 20:45:39 +01:00
Irmen de Jong
db7ae028b2
simplified CompilationResult a bit
2022-03-07 21:41:12 +01:00