Commit Graph

294 Commits

Author SHA1 Message Date
Irmen de Jong
0f72bdb4a2 Merge branch 'master' into next_compositetypes
# Conflicts:
#	codeCore/src/prog8/code/core/BuiltinFunctions.kt
#	codeGenCpu6502/src/prog8/codegen/cpu6502/BuiltinFunctionsAsmGen.kt
#	codeGenIntermediate/src/prog8/codegen/intermediate/BuiltinFuncGen.kt
#	codeOptimizers/src/prog8/optimizer/ConstantIdentifierReplacer.kt
#	compiler/src/prog8/compiler/astprocessing/AstChecker.kt
#	compiler/src/prog8/compiler/astprocessing/LiteralsToAutoVars.kt
#	compiler/test/ast/TestAstChecks.kt
2024-10-13 21:48:33 +02:00
Irmen de Jong
e9edffa9f0 remove support for array-to-array assignments (other than initialization of variable declaration)
Just use an explicit sys.memcopy(src, dest, sizeof(dest))  or assign array members individually.
2024-10-13 20:02:43 +02:00
Irmen de Jong
aef211e5f3 stricter array literal element type handling (number,bool,address-of).
More consistent implicit address-of handling if array literals contain by-ref identifiers (such as subroutine names)
2024-10-13 17:46:41 +02:00
Irmen de Jong
fa5479ee5f fix ast printing of arrays with duplicate elements 2024-10-13 04:30:46 +02:00
Irmen de Jong
7afd716fab Merge branch 'master' into next_compositetypes
# Conflicts:
#	codeCore/src/prog8/code/core/BuiltinFunctions.kt
#	compiler/src/prog8/compiler/astprocessing/AstChecker.kt
#	examples/test.p8
2024-10-08 22:58:26 +02:00
Irmen de Jong
eaa22a9d13 added callfar2() builtin function that allows to set A,X,Y and Carry arguments. 2024-10-08 21:36:04 +02:00
Irmen de Jong
5890a1ca1e Merge branch 'master' into next_compositetypes
# Conflicts:
#	examples/test.p8
2024-09-14 23:18:38 +02:00
Irmen de Jong
c7b1e8d772 fixed a variable scopedname issue where it took the fully scoped name instead of just the local name
this made 64tass not strip out that code if it was unused
2024-09-14 23:17:26 +02:00
Irmen de Jong
f45fd517ac fix merge 2024-09-12 23:53:36 +02:00
Irmen de Jong
a737547fe9 Merge branch 'master' into next_compositetypes
# Conflicts:
#	codeCore/src/prog8/code/ast/AstExpressions.kt
#	codeCore/src/prog8/code/optimize/Optimizer.kt
#	codeGenCpu6502/src/prog8/codegen/cpu6502/ForLoopsAsmGen.kt
#	codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
#	codeGenIntermediate/src/prog8/codegen/intermediate/ExpressionGen.kt
#	codeGenIntermediate/src/prog8/codegen/intermediate/IRCodeGen.kt
#	codeOptimizers/src/prog8/optimizer/StatementOptimizer.kt
#	compiler/src/prog8/compiler/astprocessing/LiteralsToAutoVars.kt
#	compiler/src/prog8/compiler/astprocessing/VariousCleanups.kt
#	docs/source/todo.rst
#	examples/test.p8
2024-09-12 23:32:23 +02:00
Irmen de Jong
255c5bfaca improve containment check for few values 2024-09-11 03:24:30 +02:00
Irmen de Jong
01c6754928 get rid of problematic common-subexpression optimization 2024-09-11 01:10:42 +02:00
Irmen de Jong
8f5d42dbc2 more tests and some cleanups/fixes 2024-09-08 23:01:49 +02:00
Irmen de Jong
759babb4c1 rename back to DataType 2024-09-08 22:59:08 +02:00
Irmen de Jong
a1dfcd07a8 fixing things 2024-09-08 22:58:40 +02:00
Irmen de Jong
5cbf1cd2b1 cleanup imports 2024-09-08 22:58:36 +02:00
Irmen de Jong
c41dc98936 making datatype more capable (subtypes) 2024-09-08 22:58:36 +02:00
Irmen de Jong
e80c22275d making datatype more capable (subtypes) 2024-09-08 22:58:35 +02:00
Irmen de Jong
74e305b90c making datatype more capable (subtypes) 2024-09-08 22:57:49 +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
bdeac74cfc removed the -nostrictbool compiler option
boolean types and bytes are no longer implicitly interchangeable using this option
2024-09-01 20:53:39 +02:00
Irmen de Jong
8f6eaeac2c half width katakana conversion 2024-08-21 18:51:34 +02:00
Irmen de Jong
b4facaeb3c add "kata" string encoding (Katakana) 2024-08-20 21:40:43 +02:00
Irmen de Jong
d12b7ccc6b fix syslib importing for raw outputs. fixes #144 2024-08-19 13:33:02 +02:00
Irmen de Jong
c67f877857 Codegen: use BIT instruction for memory location bit 7 and 6 tests (use N and V flags) 2024-07-24 19:26:54 +02:00
Irmen de Jong
3681d6ee1c optimize division by powers of 2 better (into bit shifts) 2024-07-21 21:34:38 +02:00
Irmen de Jong
0af17cdc33 todo's for division optimizations 2024-07-21 20:32:03 +02:00
Irmen de Jong
484677b4b1 Get rid of any() and all() builtin functions.
Replaced by regular subroutines in the anyall module.
2024-07-06 18:49:03 +02:00
Irmen de Jong
25f25a8767 Get rid of sort() and reverse() builtin functions.
Sort() had too many gotchas and reverse() is kinda redundant you can loop in decreasing order through an array too.
2024-07-06 17:07:58 +02:00
Irmen de Jong
4f8aaf9244 some tweaks and todos 2024-06-26 21:22:40 +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
1feead2260 tweaks 2024-05-29 02:30:06 +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
53df0eb707 cleanups 2024-04-10 22:04:03 +02:00
Irmen de Jong
42f4b06ac8 added options -bytes2float and -float2bytes to be able to do float conversions from the command line 2024-04-09 23:59:54 +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
112d2d6058 cx16 sprites module: the palette_offset parameter now takes values 0-15 (instead of 0-255) to be more consistent with docs and vera behavior 2024-04-07 21:49:03 +02:00
Irmen de Jong
ddb8346711 added txt.cls() as a shorter alternative to clear_screen().
cx16: added new character encodings, and routines in textio to enable the character sets for them.
cx16: added txt.chrout_lit() and txt.print_lit() to always print the literal characters and never as control codes
2024-04-07 19:32:44 +02:00
Irmen de Jong
35f3e8708b doc and tweak subexpression extraction a tiny bit 2024-04-06 14:01:06 +02:00
Irmen de Jong
98acff802f better checking for number of return values
assignment optimization if return register already is the same as the assignment target
2024-04-04 23:47:33 +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
56c1035581 Merge branch 'master' into multi-assign
# Conflicts:
#	docs/source/todo.rst
#	examples/test.p8
2024-03-26 22:09:16 +01:00
Irmen de Jong
ba1e907c79 fix divmod; out args are written to and should be potential constants 2024-03-26 22:04:44 +01:00
Irmen de Jong
03e486c082 multi assign 2024-03-22 21:51:25 +01:00
Irmen de Jong
edc83305a4 allow multiple targets in AssignTarget 2024-03-22 21:51:08 +01:00
Irmen de Jong
66e7c51064 IR: fix some things related to asmsubs 2024-03-22 21:49:01 +01:00
Irmen de Jong
ad4880997a no operand swap on logical expressions with shortcircuit evaluation (and,or are no longer associative!) 2024-03-20 22:34:48 +01:00