Irmen de Jong
c8b090a98b
Merge branch 'master' into next_compositetypes
2024-10-27 13:52:17 +01:00
Irmen de Jong
4b4af9b527
no longer silently add RTS to asmsubs that don't have one
2024-10-27 13:49:00 +01:00
Irmen de Jong
a7a5dda378
merge master
2024-10-26 22:01:56 +02:00
Irmen de Jong
c9535049c8
%align directive and @align64
2024-10-26 20:58:35 +02:00
Irmen de Jong
1cd754f05d
adding @alignword/page on individual variables
2024-10-26 17:00:38 +02:00
Irmen de Jong
47c1bba41d
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AssignmentAsmGen.kt
# compiler/src/prog8/compiler/astprocessing/IntermediateAstPostprocess.kt
# compiler/test/ast/TestVariousCompilerAst.kt
2024-10-23 00:29:38 +02:00
Irmen de Jong
326eab3dd1
unit test for defer, describe defer and if expression in docs
2024-10-22 22:19:49 +02:00
Irmen de Jong
0247fb0d84
some ast2 var tweaks
2024-10-21 00:20:54 +02:00
Irmen de Jong
db0c77c09e
rename
2024-10-19 23:01:41 +02:00
Irmen de Jong
af7cc9c761
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/ast/AstExpressions.kt
# codeCore/src/prog8/code/core/BuiltinFunctions.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/AsmGen.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/BuiltinFunctionsAsmGen.kt
# compiler/test/ast/TestIntermediateAst.kt
2024-10-19 22:45:39 +02:00
Irmen de Jong
a0cf1889a3
omit more redundant 0-initializations ("stz's")
2024-10-17 22:51:39 +02:00
Irmen de Jong
c218234efe
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeCore/src/prog8/code/SymbolTable.kt
# codeGenCpu6502/src/prog8/codegen/cpu6502/ProgramAndVarsGen.kt
# compiler/test/TestSymbolTable.kt
# examples/test.p8
# intermediate/src/prog8/intermediate/IRFileReader.kt
# intermediate/src/prog8/intermediate/IRSymbolTable.kt
# intermediate/src/prog8/intermediate/Utils.kt
# virtualmachine/src/prog8/vm/VmProgramLoader.kt
2024-10-16 22:40:45 +02:00
Irmen de Jong
38ef394e15
IR codegen: global vars with numeric initialization value are now also put into the VARIABLESWITHINIT section rather than requiring explicit code instructions to initialize them in INITGLOBALS.
...
Note that something similar, such as putting those variables inline in the program initialized with their value and all, cannot be done for the 6502 codegen: the program needs a mechanism to reset ALL variables when it runs a second time.
2024-10-16 22:15:51 +02:00
Irmen de Jong
abbf7c7cb0
compiler name change: prog8c (was p8compile)
...
fat jar file also changed: prog8c-X.Y-all.jar (was: prog8compiler-X.Y-all.jar)
2024-10-16 18:36:19 +02:00
Irmen de Jong
ca5f7ae32f
global (block-level) variables that get initialized with an array index expression now get a constant value as well if possible. This reduces the number of instructions in the init globals code block
2024-10-16 02:14:19 +02:00
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
66829203d8
New [x]*42 syntax to create array literals with repeated values (like "abc"*10 already exists for strings)
...
Should be used in place of array initializer expressions that contain only a single numeric value to initialize the whole array with. That isn't supported anymore.
2024-10-13 05:16:08 +02:00
Irmen de Jong
7a0eaf3148
Remove array initialization by single value.
...
New compiler and kotlin version.
2024-10-13 04:31:56 +02:00
Irmen de Jong
03412cacba
added examples/cx16/balloonflight.p8
2024-10-13 00:51:07 +02:00
Irmen de Jong
ba6db8f905
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# compiler/src/prog8/compiler/astprocessing/AstChecker.kt
# compiler/src/prog8/compiler/astprocessing/StatementReorderer.kt
# compiler/src/prog8/compiler/astprocessing/VariousCleanups.kt
# compiler/test/TestSubroutines.kt
2024-10-12 13:40:39 +02:00
Irmen de Jong
8d9bc2f5ff
fixing all sorts of things about assigning arrays to arrays
2024-10-12 12:33:46 +02:00
Irmen de Jong
1a6b95b388
house cleaning
2024-10-10 20:46:18 +02:00
Irmen de Jong
3d76240c84
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# compiler/test/TestNumericLiteral.kt
# compilerAst/src/prog8/ast/expressions/AstExpressions.kt
# docs/source/todo.rst
2024-10-09 23:33:42 +02: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
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
7c69d38588
scan all asmsubs to see if another subroutine is referenced. Fixes #153
2024-10-07 20:39:49 +02:00
Irmen de Jong
d1ddf05e38
check that block address leaves room for program startup logic
2024-10-03 22:30:06 +02:00
Irmen de Jong
51279a98b3
attempt to fix forloop range datatype issues
2024-10-03 21:12:31 +02:00
Irmen de Jong
48268bee3e
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/BuiltinFunctionsAsmGen.kt
# compiler/src/prog8/compiler/astprocessing/TypecastsAdder.kt
# examples/test.p8
2024-10-02 23:49:45 +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
09f3eecf56
changed cx16/rotating-stars example to starszoom instead.
2024-10-02 01:36:54 +02:00
Irmen de Jong
2bd4326ff6
added cx16/rotating-stars example
2024-10-01 23:43:50 +02:00
Irmen de Jong
ea3871d0c4
comment about builtin function call ast node type
2024-10-01 02:14:31 +02:00
Irmen de Jong
7ca301e511
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# codeGenCpu6502/src/prog8/codegen/cpu6502/ProgramAndVarsGen.kt
# compilerAst/src/prog8/ast/SymbolDumper.kt
# compilerAst/src/prog8/ast/expressions/AstExpressions.kt
2024-09-30 01:53:25 +02:00
Irmen de Jong
a064ade1e0
better codegen for call() function
2024-09-29 23:18:51 +02:00
Irmen de Jong
ba74e277b1
Merge branch 'master' into next_compositetypes
...
# Conflicts:
# compiler/test/ast/TestVariousCompilerAst.kt
2024-09-26 02:23:12 +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
b7ebd8c4a6
update cx16/audioroutines example to use the new audio module
2024-09-26 00:08:25 +02:00
Irmen de Jong
983a202c82
Merge branch 'refs/heads/master' into next_compositetypes
...
# Conflicts:
# compiler/src/prog8/compiler/astprocessing/TypecastsAdder.kt
2024-09-24 23:18:32 +02:00
Irmen de Jong
e29ff1c848
fix name redefinition check for multi-declarations
2024-09-20 19:55:32 +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
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
4e98fb75d6
support assigning multiple return flags from asmsub in 6502 codegen
2024-09-09 22:56:40 +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
c41dc98936
making datatype more capable (subtypes)
2024-09-08 22:58:36 +02:00