Commit Graph

181 Commits

Author SHA1 Message Date
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
Irmen de Jong
7d20458e82 fixed arrayliteral regression 2022-03-10 01:02:40 +01:00
Irmen de Jong
5a54066f81 unravel more dependency of SymbolTable on the ASt nodes (Expression), and fix initializing zp-allocated array 2022-03-09 01:42:05 +01:00
Irmen de Jong
9872f43cbf repeat-forever loop is now replaced by label+jump 2022-03-08 03:25:34 +01:00
Irmen de Jong
2b6f5dbd59 cleanup st use at variable asm generation 2022-03-06 19:50:15 +01:00
Irmen de Jong
a72d58cdf9 updated 3rd party library versions 2022-03-05 15:28:22 +01:00
Irmen de Jong
067283834a got rid of old IVariablesAndConsts object 2022-03-05 14:40:41 +01:00
Irmen de Jong
cf362c4a61 getting rid of old IVariablesAndConsts object 2022-03-05 14:11:58 +01:00
Irmen de Jong
496245c801 working on symboltable 2022-03-05 12:10:20 +01:00
Irmen de Jong
1d740c7c36 removed need to store ast scope on each zp allocated var, now uses scoped name to find them 2022-03-04 22:58:05 +01:00
Irmen de Jong
2812736ae5 preparing version 7.9 2022-03-03 00:42:53 +01:00
Irmen de Jong
6f87f8706c can only call unary functions in pipe at this time 2022-03-02 23:16:40 +01:00
Irmen de Jong
fc1c3c6808 working on altered pipe syntax 2022-03-02 20:58:38 +01:00
Irmen de Jong
96ba895b84 working on altered Pipe syntax 2022-02-27 02:42:28 +01:00
Irmen de Jong
df35dfe3bf added atari XEX output format with default $2000 load address 2022-02-26 15:36:22 +01:00
Irmen de Jong
6cce47b2f1 fix launching emulator for atari target 2022-02-24 23:22:02 +01:00
Irmen de Jong
eeb3c968d6 streamline handling of launcher type and program load address. %address is now required if not using a basic-launcher. 2022-02-22 22:43:14 +01:00
Irmen de Jong
6a0551cea1 added 'atari' compiler target beginnings (Atari 800 XL)
also default char and string encoding now taken from compiler target
2022-02-22 00:52:35 +01:00
Irmen de Jong
064a8e785c cleanups 2022-02-21 03:26:17 +01:00
Irmen de Jong
60b2c44a44 fix returntype handling of builtinfunctions, fix errors in pipe expressions 2022-02-21 01:44:29 +01:00
Irmen de Jong
c4fe3ecc0a refactor 2022-02-20 22:04:18 +01:00
Irmen de Jong
2f18a8f6d0 introduced BuiltinFunctionCall (expression) node for codegen 2022-02-20 02:48:27 +01:00
Irmen de Jong
7a2164b4d0 introduced BuiltinFunctionCallStatement node for codegen 2022-02-18 23:27:11 +01:00
Irmen de Jong
0a43eae184 rework registerArgsViaStackEvaluation to use cpu hardware stack instead 2022-02-18 22:38:00 +01:00
Irmen de Jong
3117e2b2a3 more tweaks 2022-02-18 01:25:08 +01:00
Irmen de Jong
7aa807ec7f proper error if attempting to do a containment check against non const range, and some cleanup in asmgen 2022-02-16 00:39:19 +01:00
Irmen de Jong
2725c4ad4d slight tweaks to zp and allocator 2022-02-12 00:15:52 +01:00
Irmen de Jong
b47fc1c020 renames of some Ast node classes 2022-02-11 00:34:36 +01:00
Irmen de Jong
f95fe8f1da note about removing VarDecls 2022-02-10 23:20:19 +01:00
Irmen de Jong
bd0dee5db5 cleanup 2022-02-10 22:22:50 +01:00
Irmen de Jong
c13b7fd883 report free/occupied Zeropage space at end of compilation 2022-02-10 21:59:44 +01:00
Irmen de Jong
f7e74b3088 naming 2022-02-10 03:18:56 +01:00
Irmen de Jong
41b1c80492 label name from memory() no longer interned as string var 2022-02-10 00:45:20 +01:00
Irmen de Jong
e5d7316e5d streamlining non-zpvars asmgen using new mechanism 2022-02-10 00:09:09 +01:00
Irmen de Jong
b043c3a6da streamlining vars asmgen using new mechanism 2022-02-09 21:58:25 +01:00
Irmen de Jong
98b2855b9c cleanups 2022-02-09 16:35:52 +01:00
Irmen de Jong
f3c52c409f variable zp allocation now only done in the allocator 2022-02-08 23:44:21 +01:00
Irmen de Jong
1307bdc612 more cleanups to the allocator 2022-02-08 22:46:49 +01:00
Irmen de Jong
8c2e6971fc start using vars instead of callgraph (2) 2022-02-08 21:09:00 +01:00
Irmen de Jong
1903990f30 start using vars instead of callgraph 2022-02-08 20:40:10 +01:00
Irmen de Jong
7d67005709 more rewrite variable allocation 2022-02-08 20:40:10 +01:00
Irmen de Jong
9acc2f92d1 start to rewrite variable allocation 2022-02-08 20:40:10 +01:00
Irmen de Jong
1635612430 tiny tweak in asm optimizer 2022-02-08 02:19:50 +01:00
Irmen de Jong
abda837d2f split program structure codegen out of AsmGen into separate class ProgramGen 2022-02-07 00:12:25 +01:00
Irmen de Jong
101fb0b8aa some naming changes and cleanups 2022-02-06 23:14:44 +01:00
Irmen de Jong
d2309b8114 introducing IVariableAllocation (WIP) 2022-02-06 18:57:23 +01:00
Irmen de Jong
6bdd81623f cleaning up AsmGen interface 2022-02-06 17:07:03 +01:00
Irmen de Jong
8ae3bad6f7 fix rts in empty asmsub 2022-02-06 05:05:58 +01:00
Irmen de Jong
77de99b383 rts-check for non-inlined subroutines + var init adjustment when noreinit, moved out of codegen 2022-02-06 04:03:03 +01:00
Irmen de Jong
312949f336 added experimental codegen backend option 2022-02-05 21:42:03 +01:00
Irmen de Jong
30e1c3307c simplify SourceCode: just read the full text immediately. Also optimized imports. 2022-02-05 03:50:54 +01:00
Irmen de Jong
0e824c35cc
Merge pull request #73 from akumanatt/master
Codegen and runtime library optimizations
2022-02-05 02:21:53 +01:00
Irmen de Jong
548374ac2d fix: do proper sign exension when multiplying signed word and byte vars 2022-02-05 01:52:13 +01:00
Natt Akuma
7c70c79a84 Optimize in-place word subtraction and negation 2022-02-04 21:21:06 +07:00
Natt Akuma
73dfb5f443 Optimize sign extension to AY 2022-02-04 00:59:44 +07:00
Irmen de Jong
ddf96943f0 remove Nop ast node. 2022-01-31 22:36:10 +01:00
Irmen de Jong
e773be2f58 remove no longer needed asmSymbol scoping prefixing, now asmSymbolName are identical to asmVarName 2022-01-31 01:47:22 +01:00
Irmen de Jong
1815cb1bc3 fixed bug in assembly optimizer removing too many instructions 2022-01-28 15:19:08 +01:00
Irmen de Jong
06128b5d07 optimize word&=$ff00 and word&=$00ff 2022-01-28 13:40:28 +01:00
Irmen de Jong
990c8e1f18 split out 6502 codegen module from various compilertargets module. 2022-01-28 00:32:09 +01:00