duskos

dusk os fork
git clone git://git.alexwennerberg.com/duskos
Log | Files | Refs | README | LICENSE

commit db233572a81c44ab8537609ba40971376a8f4b2f
parent 718fe39374067606dbf90ad2fad69c516f605bd7
Author: Virgil Dupras <hsoft@hardcoded.net>
Date:   Thu,  6 Oct 2022 09:40:29 -0400

cc: fix broken Function debug spitting for static functions

Diffstat:
Mfs/app/cos/cvm.c | 9++++-----
Mfs/cc/gen.fs | 6+++---
2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/fs/app/cos/cvm.c b/fs/app/cos/cvm.c @@ -56,7 +56,6 @@ static byte blkop[ #[ BLKOP_CMD_SZ c]# ]; /* Read single byte from I/O handler, if set. addr is a word only because of Forth's cell size, but can't actually address more than a byte-full of ports. */ -// Compiles up to this point! static byte io_read(word addr) { addr &= $ff; @@ -88,11 +87,11 @@ static void io_write(word addr, byte val) static void iowr_blk(byte val) { byte rw = blkop[3]; + word blkid, dest; if (rw) { - word blkid = - (word)blkop[2] << 8 | (word)blkop[1]; - word dest = - (word)blkop[0] << 8 | (word)val; + // Compiles up to this point! + blkid = (word)blkop[2] << 8 | (word)blkop[1]; + dest = (word)blkop[0] << 8 | (word)val; memset(blkop, 0, #[ BLKOP_CMD_SZ c]# ); fseek(blkid*1024, blkfp); if (rw==2) { /* write */ diff --git a/fs/cc/gen.fs b/fs/cc/gen.fs @@ -154,9 +154,9 @@ ASTIDCNT wordtbl gentbl ( node -- ) Function :locsize ( argsz locsz ) vmprelude, dup genchildren nobreaks# \ no dangling "break" markers \ emit implicit vmret, if needed - Function :stmts Node :lastchild - dup if Node id AST_RETURN = then not if vmret, then - _debug if current here current - spit nl> then ; + dup Function :stmts Node :lastchild + dup if Node id AST_RETURN = then not if vmret, then ( fnode ) + _debug if Function address here over - spit nl> else drop then ; :w ( Return ) genchildren vmret, ; :w ( Constant ) Constant value const>op ; :w ( Statements )