[Oberon] Clarifying type compatibility in Oberon-07
Andreas Pirklbauer
andreas_pirklbauer at yahoo.com
Thu Oct 12 17:51:12 CEST 2017
> I forgot to add that this approach of course invalidates
> the stack pointer (SP) itself. So one would need to find
> a different way in fact.
One option would be this:
For leaf procedures (i.e. procedures which do not themselves
call other procedures), the procedure NEW(a, size) can freely
use the unused stack space that comes after current stack frame
- it is not used anyway, so it does no harm to place data there.
For non-leaf procedures (i.e. procedures that *do* call other
procedures), you insert an instruction that adjusts the SP by
the total amount of the allocations so far just before the
other procedure is called, and readjust it when it returns.
But as I said, I haven’t thought more deeply about this..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20171012/363f4758/attachment.html>
More information about the Oberon
mailing list