Re: [Oberon] Dynamic local array implementation
Since we have a garbage collector, unlike the Astrobe system designed for microcontrollers, probably it is cleaner to implement dynamic arrays like in Oberon-2. I would rather pay the price of longer collection cycles (that only happens if dynamic arrays are used) than a longer prolog/epilog for each function that you pay at every invocation even if the feature is not used. Don't get me wrong, I like Chris's implementation very much. On Oct 12, 2017 21:07, "Andreas Pirklbauer" <andreas_pirklbauer@yahoo.com> wrote:
I am afraid the frame pointer is really needed.
I am now convinced that at least one additional element on the stack is needed. Reading Astrobe’s solution, the FP indeed appears to be the easiest/best approach. (I tried to implement the “counter" idea and very quickly realized that it *is* in fact encoding essentially the same information as the FP; so case closed). I think using the stack for local dynamic arrays is worth adopting.. -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (1)
-
Luca Boasso