[Slackers] New slangb1.20 up
Jaymz Julian
jaymz at artificial-stupidity.net
Sat Jun 3 02:35:44 CDT 2006
On Fri, Jun 02, 2006 at 08:10:59PM -0600, Steve Judd wrote:
[parser trivia cut]
Duely noted :)
> I'm pretty sure that the right way to build an expression evaluator is to
> read in all args and ops and build a tree, then optimize the tree. At
> least, that seems like the right way to me. But the Slang eval routine
> is simpler, and has to fall under the the Slang method of "you can give
> the compiler some hints to optimize better."
Well, you can either do that, or you can do it based on a stack - I believe
the parse tree is the more common approch, though, and certantly it's the
one that I've always used on the PC (I've never written a compiler on the
raw c64, so I still bow to you :))
I think, at some point in the somewhat distant future, slang will have to be
written with the lessons learned here - obviously, now is not the time to do
that, but far off in the future :). Perhaps actually written in slang, but
requiring still a scpu for either memory access or for speed reasons maybe.
(I see no reason why it couldn't be done in theory with the PagedMemory stuff
that I've got on the boiler, except that PagedMemory is fecking slow because
it's close to impossible to use it from asm, due to all array accesses having
to check which 256byte page they're in. I've been concentrated on HunkMemory
instead, which is basically an array reference system, but it requires that
a single allocation must fit into c64 ram - not realistic for files of this
size (or the other project that I have planned with PG, which really wants a
mmap equivalent - something that PagedMemory would work great for, given an
intellgent drive system (I only know how to do seek on 1541 and IDE64, not
the CMD stuff), but the limitation of not being able to lock the bastard
and pass it to an an asm routine (or a routine that expects "real" arrays) is
a real pain. In any case, there is no slang implementation of PagedMemory
yet, so this is all future stuff too).
--jj
--
Jaymz Julian - Coder, Visionary, Fat Ass.
"Hannibal is a serial killer. He only likes to kill and eat people.
Very few people have `I want to be killed and eaten' on their cards,
so Hannibal is out of a job." - http://cards.sf.net
More information about the Slackers
mailing list