David Schmenk
b986e1da38
PLASM compiler patch #1
2018-02-07 12:01:55 -08:00
David Schmenk
88471f94f0
Fix LEAVE for lambda funcs
2018-01-27 19:23:41 -08:00
David Schmenk
5769cf67be
Fix TCP/IP bitrot and last dataseg zero length symbol overlap with code seg
2018-01-24 18:08:18 -08:00
Dave Schmenk
b176847778
Reduce stack usage for ENTER/LEAVE but incompatible bytecode
2018-01-14 21:41:47 -08:00
David Schmenk
eea119f924
Set identifiers/keyword to upper case
2018-01-14 13:44:08 -08:00
David Schmenk
87f9be31d8
Sometimes a small change has large repercussions
2018-01-13 11:53:21 -08:00
David Schmenk
eb0c669452
Better accessed control
2018-01-03 18:34:20 -08:00
David Schmenk
cf9f20e0c9
Only add accessed externals to the Extern Symbol Directory
2018-01-03 15:59:07 -08:00
David Schmenk
e74257aacb
Getting PLASMA PLASM compiled
2018-01-02 14:36:58 -08:00
David Schmenk
8a58ef8b5f
Free up unneeded opcodes. Makes thing a little more simple
2018-01-01 10:29:28 -08:00
David Schmenk
a9bd3ebbeb
Ternary operators for PLASMA! And Floating point string conversion WIP
2017-11-18 15:27:50 -08:00
Steven Flintham
8c390cbb07
Optimise "CB 1:SHL" to "DUP:ADD"
...
This saves one byte and by my count is about 11 cycles faster.
2017-09-09 00:39:27 +01:00
David Schmenk
b6076bed3f
Fix ENTER frame size parameter
2017-08-04 10:05:58 -07:00
dschmenk
4906a5a4c5
Remove GNU C warning
2017-08-03 06:29:46 -07:00
David Schmenk
64fe1b2e70
Lambda functions working except double parsed in function list ???
2017-08-02 16:05:14 -07:00
Steven Flintham
f801d47b1b
Check type in emit_dab and emit_daw
...
Without this the new optimisations can cause invalid code to be emitted.
2017-07-28 23:20:52 +01:00
Steven Flintham
75d5266fba
Expose longer sequences to the optimiser
...
emit_seq() no longer emits directly but adds the sequence to a pending
sequence, which we emit only when necessary (e.g. when we're about to
emit a branch target, or when the parser is about to emit an opcode
directly).
This exposes more opportunities to the optimiser - in particular, the
earlier commit which taught the optimiser how to change things like
"SLW [n]:LLW [n]" to "DLW [n]" now gets a chance to kick in where one
statement updates a variable and the following statement uses the
updated value.
2017-07-28 23:09:26 +01:00
Steven Flintham
b6efb90995
Allow optimiser to introduce DUP opcodes
2017-07-28 23:06:02 +01:00
Steven Flintham
e9c4e062c3
Add more peephole optimisations
2017-07-28 23:03:44 +01:00
Steven Flintham
8a672501b7
Refactor elimination of *current* op in optimiser
...
The code to handle this was duplicated in two places; this pulls it out
to a common chunk of code triggered by negative values of freeops.
This isn't a big win here, but it sets us up to re-use this code in
later commits.
2017-07-28 22:57:46 +01:00
dschmenk
c4912583de
Add CFFB to portable VM with test case
2017-07-27 19:15:57 -07:00
Steven Flintham
d5f5326962
Use opcode $5E for CFFB
2017-07-26 20:22:27 +01:00
Steven Flintham
8610d2f56e
Add CFFB opcode
2017-07-18 20:37:43 +01:00
David Schmenk
92535477ff
Optimize NOT before branch
2017-06-07 17:41:50 -07:00
David Schmenk
7d35fd7726
Clean up scan_rewind string parsing and add branch optimizations
2017-06-07 14:27:52 -07:00
dschmenk
45500004dd
On the road to 1.0: optimize MUL/DIV by POW2
2017-06-01 12:23:29 -07:00
dschmenk
b19956b3ba
On the road to 1.0
2017-05-31 18:31:04 -07:00
David Schmenk
8ed9c9868d
Tab vs spaces cleanup
2017-02-12 19:35:33 -08:00
David Schmenk
73559b7f0b
Remove useless type casts
2017-02-12 19:03:46 -08:00
Peter Ferrie
21b5c85d7a
include header for uintptr_t
2017-01-22 10:51:59 -08:00
Peter Ferrie
afe3b284ed
suppress GCC warnings
2017-01-06 15:08:28 -08:00
dschmenk
f5e9dba8ac
Increase ID length to 32
2016-01-06 12:22:15 -08:00
dschmenk
6110f6e3a3
Fix constant address function call
2015-12-10 06:37:07 -08:00
dschmenk
3f48559d56
Add in-line strings
2015-02-26 13:02:53 -08:00
dschmenk
5651c0b125
fix dynamic driver laoding and wiznet WIP
2015-02-03 08:56:44 -08:00
David Schmenk
69b5666afc
Fix some compiler bugs for Rogue combat updates
2014-12-25 19:54:48 -08:00
David Schmenk
2384d6f965
Fix pointers to pointers. Add 'continue'. Killer new ROGUE.
2014-12-17 21:55:54 -08:00
David Schmenk
673c74694c
Port original PLASMA editor over
2014-11-18 16:13:35 -08:00
David Schmenk
8125949370
Increase max frame size to 255
2014-11-06 14:39:20 -08:00
David Schmenk
8faa0ff8a3
More efficient call sequence
2014-11-06 14:25:49 -08:00
David Schmenk
a03521eb4c
Restructure project source
2014-06-12 15:23:52 -07:00