[Oberon] Clarifying type compatibility in Oberon-07
luke.boasso at gmail.com
Thu Oct 12 16:48:23 CEST 2017
Wouldn't you need a frame pointer to implement it? The current compiler
does not need one, since the stack frame size is know at compile time,
adding this feature would break this invariant. Am I missing something?
On Oct 12, 2017 05:45, "Andreas Pirklbauer" <andreas_pirklbauer at yahoo.com>
> > We support an extension in the Astrobe for ARM Cortex-M compilers that
> > allows single-dimensional dynamic local array variables. This was
> > implemented in Wirth's earlier ARM Oberon compiler but not in his RISC5
> > The NEW command in this case allocates space on the stack (not the heap)
> > the local array. This is elegant because it doesn't require any
> > DISPOSE or garbage collection - the space is automatically reclaimed when
> > the procedure is exited. The example above then becomes:
> > > PROCEDURE P(s: ARRAY OF CHAR); > VAR local: ARRAY OF CHAR; > BEGIN >
> NEW(local, LEN(s)); > local := s; > ...
> That’s a great idea!! So NEW(a, size) only touches the stack but not the
> making both allocation and reclamation (which is of course implicit on
> exit by simply adjust the stack pointer) super-fast.
> I will consider adding that to my version of the compiler!
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Oberon