Irmen de Jong
|
6fc89607d3
|
ir: moving to labeled chunks, no more IRLabel nodes
|
2022-10-07 00:34:56 +02:00 |
|
Irmen de Jong
|
af6be44676
|
ir: adding register usage inspections
fix compiler problems with untrimmed inlined asm, and when only a single return statement is present in a subroutine
|
2022-09-30 20:25:00 +02:00 |
|
Irmen de Jong
|
e7a3a89bfb
|
fix windows issue
|
2022-09-27 22:41:48 +02:00 |
|
Irmen de Jong
|
06cf2e0bd7
|
vm: fix memory slabs (bsieve example)
|
2022-09-27 16:32:44 +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
|
b1e4347e10
|
fix compiler crash sometimes when casting byte to word
|
2022-09-22 13:00:47 +02:00 |
|
Irmen de Jong
|
97aa91c75e
|
removed 16 bits sin/cos routines from math library (sin16, sin16r etc)
|
2022-09-22 12:55:00 +02:00 |
|
Irmen de Jong
|
d07d00fa41
|
Join codeAst and codeCore modules
|
2022-09-19 17:28:18 +02:00 |
|
Irmen de Jong
|
fc0a0105b3
|
move memoryslab administration from allocator to symboltable
|
2022-08-21 19:48:56 +02:00 |
|
Irmen de Jong
|
40aa733ea7
|
clearer name
|
2022-08-15 20:55:35 +02:00 |
|
Irmen de Jong
|
f249ccd414
|
added asm optimization for same pointer index
|
2022-08-14 12:50:46 +02:00 |
|
Irmen de Jong
|
44ee4b989f
|
optimize code for logical expressions more if right operand is simple
|
2022-08-12 00:49:40 +02:00 |
|
Irmen de Jong
|
18790d867c
|
optimize conditional expression WORD & $ff00 to just msb(WORD)&$ff
|
2022-08-12 00:21:44 +02:00 |
|
Irmen de Jong
|
d6b8936376
|
fix mkword(@(ptr), 0) wrong asm
|
2022-08-11 23:01:19 +02:00 |
|
Irmen de Jong
|
2d34fdd28f
|
in a block marked option force_output, make all subroutines in asm use .block rather than .proc
this fixes some obscure assembly issues where subroutines were omitted from the output program by 64tass
|
2022-08-10 21:28:40 +02:00 |
|
Irmen de Jong
|
68abda1219
|
fix a few small compiler errors (removing functioncall, removing block, assigning virtual register return value)
|
2022-08-09 23:38:29 +02:00 |
|
Irmen de Jong
|
f778f08f76
|
tweak
|
2022-08-08 21:09:49 +02:00 |
|
Irmen de Jong
|
4644c9b621
|
got rid of GoSub ast node and codegen complexity related to that.
sometimes programs get smaller, sometimes bigger.
|
2022-08-07 03:24:20 +02:00 |
|
Irmen de Jong
|
00b717cde8
|
tweak
|
2022-08-04 18:35:10 +02:00 |
|
Irmen de Jong
|
310219e5d7
|
make sure memory slabs block is at the bottom of the asm file to not allocate needless space in the resulting prg
|
2022-07-31 15:37:36 +02:00 |
|
Irmen de Jong
|
a0deb463c9
|
optimized codegen for some equality comparison expressions and some logical expressions
|
2022-07-31 15:25:54 +02:00 |
|
Irmen de Jong
|
046dceb5c2
|
added optimized case for signed division by 2
|
2022-07-24 13:59:35 +02:00 |
|
Irmen de Jong
|
dcc1f00048
|
fix rounding errors in signed divide by power-of-two
The optimized bit-shifting division is removed (for now)
|
2022-07-24 12:34:55 +02:00 |
|
Irmen de Jong
|
5189eaca36
|
move the vm unit tests to codeGenVirtual module and remove virtualmachine dependency in the compiler module
|
2022-07-17 12:56:22 +02:00 |
|
Irmen de Jong
|
f690f58bd4
|
callfar() now accepts a variable as address, so it can be used to indirect JSR to a subroutine whose address is not fixed. ('goto' already could indirect JMP to a variable address.)
|
2022-07-14 19:29:59 +02:00 |
|
Irmen de Jong
|
2d600da8b6
|
fix codegen crash on certain nested typecast
|
2022-07-13 22:24:31 +02:00 |
|
Irmen de Jong
|
7a26646e1b
|
tweak bool type handling
|
2022-07-11 02:08:12 +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
|
41f4e22a17
|
introduce BOOL type
|
2022-07-07 22:23:56 +02:00 |
|
Irmen de Jong
|
288c57c144
|
ack to allow user to override the following two with command line redefinition:
|
2022-07-07 22:16:08 +02:00 |
|
Irmen de Jong
|
b41779bd02
|
added -D command line option to define symbols in the assembly file
|
2022-07-06 23:40:36 +02:00 |
|
Irmen de Jong
|
e1c77ce236
|
fix pop() name scoping
|
2022-07-02 23:27:08 +02:00 |
|
Irmen de Jong
|
965340ff90
|
logical and/or/xor/not all replaced by bitwise &,|,^,~ (ast, codegens)
this also fixed some invalid outcomes of logical expressions!
|
2022-07-02 00:38:17 +02:00 |
|
Irmen de Jong
|
fb989ae62f
|
cx16: reset rom/ram/monitor banks at program exit to sane values.
|
2022-07-01 00:14:38 +02:00 |
|
Irmen de Jong
|
4b358abbb7
|
"not" operator removed from ast and codegen (it's been replaced with x==0 as equivalent)
|
2022-06-29 01:13:08 +02:00 |
|
Irmen de Jong
|
ef92451d1a
|
fix logical expressions on arbitrary values, for now with boolean() around the operands
|
2022-06-28 01:18:36 +02:00 |
|
Irmen de Jong
|
bb1cda0916
|
fix: boolean values of terms in logical expressions are now properly evaluated
|
2022-06-26 23:55:34 +02:00 |
|
Irmen de Jong
|
eea09f4de5
|
fix invalid asm label sometimes generated for multiple loops in same subroutine
|
2022-06-24 02:26:45 +02:00 |
|
Irmen de Jong
|
bda016bb3b
|
optimized 6502 codegen for logical expressions
|
2022-06-15 22:17:15 +02:00 |
|
Irmen de Jong
|
cc174b7b85
|
added boolean() builtin function and use it to get rid of !=0 comparisons
|
2022-06-14 23:34:45 +02:00 |
|
Irmen de Jong
|
bf9d120081
|
logical operators now always return a boolean byte result, instead of sometimes word type as well
(preparing for codegen simplifications for these)
|
2022-06-13 01:37:16 +02:00 |
|
Irmen de Jong
|
775c85fc18
|
don't swap operands that would change function evaluation order + vm: fix label casing error
|
2022-06-13 00:25:45 +02:00 |
|
Irmen de Jong
|
5a756aaed9
|
Pipe expression "|>" removed from the language
|
2022-06-12 18:41:42 +02:00 |
|
Irmen de Jong
|
c6e92ecac4
|
some code cleanup
|
2022-06-12 16:15:08 +02:00 |
|
Irmen de Jong
|
710f27afa9
|
bump library versions
|
2022-06-09 22:44:17 +02:00 |
|
Irmen de Jong
|
0a65dfdd10
|
optimized codegen for some more simple expressions with +/-
|
2022-06-07 22:30:08 +02:00 |
|
Irmen de Jong
|
3075578245
|
optimized codegen for assigning value or variable to indexed pointer. (6502)
|
2022-06-06 18:30:19 +02:00 |
|
Irmen de Jong
|
b042b7705e
|
fix invalid removal of repeated assignments.
|
2022-06-06 17:27:06 +02:00 |
|
Irmen de Jong
|
d56eb397f9
|
fix codegen for rol/ror on pointer indexed
|
2022-06-06 16:07:45 +02:00 |
|
Irmen de Jong
|
3054a1d32d
|
api change: removed swap() builtin function (too complex in codegen for little used function)
|
2022-06-06 16:01:11 +02:00 |
|
Irmen de Jong
|
f70b914779
|
fix optimized codegen for 2 arg functions, sometimes was passing wrong arg value due to register overwriting
|
2022-06-06 13:21:45 +02:00 |
|
Irmen de Jong
|
9e3e2ff81a
|
fix assembly generation error when pipe character is part of string literal
|
2022-06-04 22:25:51 +02:00 |
|
Irmen de Jong
|
dbb92881a1
|
fixed X register corruption in some cases of rol() and ror()
|
2022-06-04 21:10:48 +02:00 |
|
Irmen de Jong
|
10bf7f5d07
|
fix: again gives proper name redefinition errors in same scope
|
2022-06-04 20:15:46 +02:00 |
|
Irmen de Jong
|
8618ba1b60
|
fix 6502 expression codegen for pointer indexing
|
2022-06-04 18:46:16 +02:00 |
|
Irmen de Jong
|
3c8c44155d
|
vm: loadix instruction added for indirect addressing via pointer
|
2022-06-04 18:07:57 +02:00 |
|
Irmen de Jong
|
2002412026
|
optimized codegen for pointer indexing (read expressions)
|
2022-06-04 17:20:17 +02:00 |
|
Irmen de Jong
|
73a3a61729
|
swap() checks for unsupported code gen
|
2022-06-03 23:41:24 +02:00 |
|
Irmen de Jong
|
5fe6aa2800
|
fix swap() code for pointervars
|
2022-06-03 23:13:35 +02:00 |
|
Irmen de Jong
|
ba614801ee
|
cleanup
|
2022-05-22 23:11:22 +02:00 |
|
Irmen de Jong
|
0bf00d1ca4
|
c64/c128 targets: perform cleanup at program exit such as re-enabling run-stop key and character set switching.
|
2022-05-15 16:44:26 +02:00 |
|
Irmen de Jong
|
7c121bfc01
|
first steps to support multiple args in pipe expressions
|
2022-05-07 19:00:47 +02:00 |
|
Irmen de Jong
|
da01a5b4dc
|
vm: implement float to integer cast, any, all, reverse
|
2022-05-04 22:08:21 +02:00 |
|
Irmen de Jong
|
0f9e87d7bb
|
fixed compiler crash when casting float to integer, fixed float to int cast value error on cx16
|
2022-05-03 23:43:38 +02:00 |
|
Irmen de Jong
|
b32641db87
|
remove syscall() builtin functions
vm code can do this via inline assembly
|
2022-05-01 00:41:30 +02:00 |
|
Irmen de Jong
|
7844ace934
|
vm: implementing floating-point
|
2022-04-29 22:27:02 +02:00 |
|
Irmen de Jong
|
cf50e4f6ec
|
vm: printing of numbers now via conv module.
assigning strings now converted to strcopy function call in the compiler ast.
|
2022-04-23 02:15:51 +02:00 |
|
Irmen de Jong
|
7eea97d741
|
- floats: remove all floating point builtin functions and move them to the floats module instead
|
2022-04-22 00:45:54 +02:00 |
|
Irmen de Jong
|
88b55ab93e
|
vm: add abs() and fix 6502 abs() code.
|
2022-04-18 21:20:17 +02:00 |
|
Irmen de Jong
|
7dbff5b9e6
|
abs: remove support for floats. Use floats.fabs() instead.
this solves: can't use abs() etc in pipe expression because return type depends on argument type
|
2022-04-14 00:38:31 +02:00 |
|
Irmen de Jong
|
220246278a
|
removed sum(), max(), min(). abs() now always returns uword type.
This greatly simplifies internal handling of builtin functions by always having one fixed return type.
|
2022-04-14 00:21:16 +02:00 |
|
Irmen de Jong
|
bf7f4bba7b
|
doc
|
2022-04-13 20:43:07 +02:00 |
|
Irmen de Jong
|
ab1766a559
|
moved all *integer* builtin trig functions (sin8u, cos8u etc) as regular asmsubs in math module
|
2022-04-13 00:27:35 +02:00 |
|
Irmen de Jong
|
b6eb343234
|
moving string escaping out of antlr project
|
2022-04-10 17:31:30 +02:00 |
|
Irmen de Jong
|
ae45ce517e
|
cleanups
|
2022-04-03 17:33:50 +02:00 |
|
Irmen de Jong
|
c6cf330e70
|
fix bug in codegen for containment check in bytearrays and strings
|
2022-04-01 20:46:28 +02:00 |
|
Irmen de Jong
|
bb1bf6a88c
|
working on vm
|
2022-03-28 00:40:15 +02:00 |
|
Irmen de Jong
|
3b6e7eccdd
|
simplified containment check, only possible on string and arrays (as per the docs)
|
2022-03-27 16:59:55 +02:00 |
|
Irmen de Jong
|
ed30108961
|
removed '**' power-operator. Use floats.pow() instead.
|
2022-03-27 13:16:34 +02:00 |
|
Irmen de Jong
|
27f6d47efa
|
working on vm codegen
|
2022-03-24 23:26:57 +01:00 |
|
Irmen de Jong
|
7b27d270a2
|
gosub only uses an identifier
|
2022-03-22 20:53:06 +01:00 |
|
Irmen de Jong
|
ff57c5e9d3
|
working on vm and new ast
|
2022-03-21 01:36:11 +01:00 |
|
Irmen de Jong
|
7d2bf892b1
|
added start of virtual machine compilation target
|
2022-03-19 00:57:35 +01:00 |
|
Irmen de Jong
|
a99e77093f
|
added syscall() builtin functions (only useful for experimental code gen)
|
2022-03-17 01:19:58 +01:00 |
|
Irmen de Jong
|
92737bb695
|
better handling of loadAddress
|
2022-03-13 16:21:02 +01:00 |
|
Irmen de Jong
|
9b81955544
|
optimizing new Ast
|
2022-03-13 11:49:07 +01:00 |
|
Irmen de Jong
|
40e9fba312
|
working on new Ast and XML export to test it
|
2022-03-12 22:38:16 +01:00 |
|
Irmen de Jong
|
3961f26635
|
consolidating modules
|
2022-03-11 20:45:39 +01:00 |
|
Irmen de Jong
|
e51c274a18
|
reducing dependencies
|
2022-03-11 20:32:35 +01:00 |
|
Irmen de Jong
|
e75d0c58a9
|
reducing dependencies
|
2022-03-10 23:46:43 +01:00 |
|
Irmen de Jong
|
9a798360f4
|
introduced codeAst and codeCore modules to reduce dependencies
|
2022-03-10 22:38:16 +01:00 |
|
Irmen de Jong
|
844ad09464
|
reducing dependencies
|
2022-03-10 21:36:51 +01:00 |
|
Irmen de Jong
|
abcdd331db
|
started with a simulator
|
2022-03-10 21:23:00 +01:00 |
|
Irmen de Jong
|
e7c4bf5ebf
|
reducing dependencies
|
2022-03-10 21:17:31 +01:00 |
|
Irmen de Jong
|
546a416f7e
|
reducing dependencies
|
2022-03-10 20:57:36 +01:00 |
|
Irmen de Jong
|
251b6fcf70
|
reducing dependencies
|
2022-03-10 02:09:34 +01:00 |
|
Irmen de Jong
|
ab1fffb721
|
reducing dependencies
|
2022-03-10 01:41:42 +01:00 |
|
Irmen de Jong
|
da352a322c
|
reducing dependencies
|
2022-03-10 01:27:27 +01:00 |
|