1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-08-06 11:25:07 +00:00

Increase global symbol table size and parse '\\' properly

This commit is contained in:
David Schmenk
2018-01-15 15:31:03 -08:00
parent 766c8c320e
commit 5e07a45d6e
3 changed files with 9 additions and 4 deletions

View File

@@ -484,7 +484,7 @@ def init_idglobal#0
if isult(heapavail, $4000) if isult(heapavail, $4000)
tag_num = TAGNUM/2 tag_num = TAGNUM/2
fixup_num = FIXUPNUM/2 fixup_num = FIXUPNUM/2
globalbufsz = IDGLOBALSZ/2 globalbufsz = IDGLOBALSZ/4
localbufsz = IDLOCALSZ/2 localbufsz = IDLOCALSZ/2
fin fin
tag_addr = heapalloc(tag_num*2) tag_addr = heapalloc(tag_num*2)
@@ -546,7 +546,7 @@ def new_moddep(nameptr, len)#0
memcpy(@moddep_tbl[moddep_cnt*16] + 1, nameptr, len) memcpy(@moddep_tbl[moddep_cnt*16] + 1, nameptr, len)
moddep_tbl[moddep_cnt*16] = len moddep_tbl[moddep_cnt*16] = len
moddep_cnt++ moddep_cnt++
if moddep_cnt > 8; parse_warn("Module dependency overflow"); fin if moddep_cnt > MODDEPNUM; parse_warn("Module dependency overflow"); fin
end end
// //
// Generate/add to a sequence of code // Generate/add to a sequence of code

View File

@@ -155,6 +155,8 @@ def scan
is 't' is 't'
is 'T' is 'T'
constval = $09; break constval = $09; break
is '\\'
constval = '\\'; break
otherwise otherwise
constval = scannum constval = scannum
scanptr-- scanptr--
@@ -187,6 +189,8 @@ def scan
is 't' is 't'
is 'T' is 'T'
^strconstptr = $09; break ^strconstptr = $09; break
is '\\'
^strconstptr = '\\'; break
otherwise otherwise
^strconstptr = scannum ^strconstptr = scannum
scanptr-- scanptr--

View File

@@ -238,7 +238,8 @@ end
const OPSEQNUM = 256 const OPSEQNUM = 256
const TAGNUM = 1024 const TAGNUM = 1024
const FIXUPNUM = 2048 const FIXUPNUM = 2048
const IDGLOBALSZ = 2048 const MODDEPNUM = 8
const IDGLOBALSZ = 4096
const IDLOCALSZ = 512 const IDLOCALSZ = 512
word fixup_cnt, tag_cnt = -1 word fixup_cnt, tag_cnt = -1
word fixup_tag, fixup_addr word fixup_tag, fixup_addr
@@ -251,7 +252,7 @@ word datasize, framesize, savesize
byte locals, savelocals byte locals, savelocals
word codebuff, codeptr, entrypoint word codebuff, codeptr, entrypoint
word modsysflags word modsysflags
byte[16] moddep_tbl[8] byte[16] moddep_tbl[MODDEPNUM]
byte moddep_cnt, def_cnt = 1 byte moddep_cnt, def_cnt = 1
predef emit_pending_seq#0 predef emit_pending_seq#0
// //