Irmen de Jong
|
56d21de001
|
Merge branch 'master' into c128target
# Conflicts:
# examples/test.p8
|
2021-12-28 13:57:27 +01:00 |
|
Irmen de Jong
|
7b54aa0c7d
|
more consistent naming of the statement classes
|
2021-12-28 13:56:47 +01:00 |
|
Irmen de Jong
|
6e11b8ada1
|
GoSub no longer inherits from Jump node, fixes subtle ast/codegen bugs related to jsrs
|
2021-12-28 01:55:13 +01:00 |
|
Irmen de Jong
|
79405f47f6
|
fix if-gosub
|
2021-12-28 01:24:31 +01:00 |
|
Irmen de Jong
|
1c7c4fc3b0
|
optimized if-goto codegeneration
|
2021-12-28 00:42:00 +01:00 |
|
Irmen de Jong
|
97e84d0977
|
tweak if statement handling
|
2021-12-27 15:04:25 +01:00 |
|
Irmen de Jong
|
371f084884
|
comment
|
2021-12-27 02:17:04 +01:00 |
|
Irmen de Jong
|
c55fdd9834
|
removed special code generation for while and util expression (replaced by jumps)
also added exhaustive parent node checker in validation step
|
2021-12-27 02:04:28 +01:00 |
|
Irmen de Jong
|
4da4f96669
|
lower code: break -> goto after (simplifies codegen)
|
2021-12-25 22:30:38 +01:00 |
|
Irmen de Jong
|
836d40072f
|
c128 evalstack corrections
|
2021-12-22 00:07:05 +01:00 |
|
Irmen de Jong
|
431401d90e
|
c128 corrections
|
2021-12-21 23:37:15 +01:00 |
|
Irmen de Jong
|
6da83e2bd7
|
first steps to add C128 compiler target
|
2021-12-21 19:08:33 +01:00 |
|
Irmen de Jong
|
1462c57d0c
|
no need for intermediary returnvalue var for prefix expressions
|
2021-12-16 21:00:38 +01:00 |
|
Irmen de Jong
|
3cf9b9d9a5
|
code size optimization: subroutine calls with 2 byte arg will pass it via A/Y registers instead of separate param assignments at every call site
|
2021-12-16 01:48:22 +01:00 |
|
Irmen de Jong
|
629117e594
|
code size optimization: subroutine calls with 1 int arg will pass it via register instead of separate param assignment at every call site
|
2021-12-16 00:56:59 +01:00 |
|
Irmen de Jong
|
08f87c321f
|
fixed capitalization of operator sets to be consistent with other sets names
|
2021-12-15 23:43:14 +01:00 |
|
Irmen de Jong
|
1e9d249f71
|
fixed output of float values in cmp instructions
|
2021-12-13 00:17:59 +01:00 |
|
Irmen de Jong
|
a7b5949e6a
|
fix compiler crash when using a gosub/subroutinecall in a branch statement
|
2021-12-11 15:11:16 +01:00 |
|
Irmen de Jong
|
75ea453bf4
|
fix asm code optimization problem caused in previous release where asm file is not read back in separate lines anymore
|
2021-12-10 15:37:53 +01:00 |
|
Irmen de Jong
|
e342311bef
|
fix wrong code for inplace modification of a pointervariable's memory value
|
2021-12-10 14:48:53 +01:00 |
|
Irmen de Jong
|
d8d56b195f
|
comments
|
2021-12-09 21:13:13 +01:00 |
|
Irmen de Jong
|
84f75f4156
|
tweaked some more .getOrElse
|
2021-12-06 21:22:00 +01:00 |
|
Irmen de Jong
|
ff69da3fa2
|
error when 'else' choice in when statemetn isn't the last one, also generate slightly better code for when statements
|
2021-12-05 21:54:46 +01:00 |
|
Irmen de Jong
|
b6fe40ada4
|
fix: cx16.r0 now properly treated as zeropage var on cx16 so @(cx16.r0) won't copy it to temp var anymore
|
2021-12-05 21:21:41 +01:00 |
|
Irmen de Jong
|
0018dc6ce7
|
refactor machinedefinition
|
2021-12-04 19:07:19 +01:00 |
|
Irmen de Jong
|
c92f914081
|
gradle build settings tweak to avoid jdk version conflict
|
2021-12-04 18:36:47 +01:00 |
|
Irmen de Jong
|
0498444ef2
|
moved all unit tests into single project to avoid dependency issues
|
2021-12-04 18:20:22 +01:00 |
|
Irmen de Jong
|
397f98513b
|
optimize loading A from pointervar
|
2021-12-04 05:36:48 +01:00 |
|
Irmen de Jong
|
e545ea9504
|
fix and optimize storing A into pointervar
|
2021-12-04 04:43:58 +01:00 |
|
Irmen de Jong
|
b867d8f731
|
cleanups
|
2021-12-04 01:03:51 +01:00 |
|
Irmen de Jong
|
c3144a20db
|
spacing
|
2021-12-02 00:10:06 +01:00 |
|
Irmen de Jong
|
df997e5d3b
|
don't write the asm file twice
|
2021-11-30 03:47:57 +01:00 |
|
Irmen de Jong
|
ea0fe8d3d2
|
PrefixExpression doesn't cause clobber risk
|
2021-11-30 02:32:37 +01:00 |
|
Irmen de Jong
|
2560042ac7
|
fix compiler crashes on in-place operations on cx16 registers or invalid signed types
|
2021-11-30 02:27:37 +01:00 |
|
Irmen de Jong
|
7748c261da
|
rsave/rrestore moved from sys to builtin function to solve the stack related problem when calling it as a regular subroutine
|
2021-11-29 23:13:04 +01:00 |
|
Irmen de Jong
|
a2db44f80c
|
also consider Y register for clobber check for functioncall arguments
|
2021-11-29 22:09:05 +01:00 |
|
Irmen de Jong
|
45b8762188
|
use inc/ina instead of adc
|
2021-11-29 00:07:15 +01:00 |
|
Irmen de Jong
|
47c2c0376a
|
added some cpu stack related assembly-level optimizations
|
2021-11-28 17:27:01 +01:00 |
|
Irmen de Jong
|
f0dadc4a43
|
optimize 1-arg functioncalls
|
2021-11-28 16:55:10 +01:00 |
|
Irmen de Jong
|
d6abd72e55
|
fix push() of signed values
|
2021-11-28 13:01:46 +01:00 |
|
Irmen de Jong
|
3d23b39f4c
|
moved A to the end of the param list to avoid having to store its value
|
2021-11-28 04:03:18 +01:00 |
|
Irmen de Jong
|
f3a4048ebf
|
improved setting Carry bit as asmsub parameter
|
2021-11-28 03:31:32 +01:00 |
|
Irmen de Jong
|
7c5ec1853d
|
nice error message if pop() argument is wrong
|
2021-11-28 02:20:35 +01:00 |
|
Irmen de Jong
|
e8f4686430
|
undid failed attempt of using sys.push/sys.pop for stack args - now using new push(), pushw(), pop(), popw() builtin functions
|
2021-11-28 01:22:40 +01:00 |
|
Irmen de Jong
|
02348924d0
|
failed attempt of using sys.push/pop for stack args
|
2021-11-27 23:52:47 +01:00 |
|
Irmen de Jong
|
c838821615
|
refactor fuction arguments codegen a bit
|
2021-11-27 21:14:21 +01:00 |
|
Irmen de Jong
|
e8e25c6fd6
|
added sys.push() and sys.pop() to put values on cpu stack. Added missing builtin functions to syntax-files.
|
2021-11-27 18:09:15 +01:00 |
|
Irmen de Jong
|
62485b6851
|
allow assigns to asmsub parameters (registers), but this is not very useful in practice.
|
2021-11-27 15:41:44 +01:00 |
|
Irmen de Jong
|
54025d2bf5
|
small refactor and spelling fixes
|
2021-11-27 14:49:18 +01:00 |
|
Irmen de Jong
|
f5ebf79e71
|
make sure X register is also saved if needed when GoSub is used
|
2021-11-26 22:11:52 +01:00 |
|