[Oberon] Dynamic local array implementation

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Sun Oct 15 14:36:21 CEST 2017


See inline comments.

> On Sun Oct 15 13:39:18 CEST 2017 Chris wrote:
>
> I believe access to intermediate variables can be done
> without a static link. In the same way a programmer
> would rewrite the source by adding reference parameters
> for the used intermediate variables a compiler can 
> do the same and pass one address for each used
> variable. That does not complicate the regular case
> without intermediate access at all.

Either way, *some* information needs to be passed on the
stack if one wants to access to the surrounding scope.

> Which objects are you thinking about here, which
> are not covered by 1) or 3) ?

In Oberon-07 2) follows from 3) indeed. Historically though,
3) was not always implemented. But you’re right: Now that
we are where we are, it is sufficient to state 1) and 3).

> The only necessary improvement I see compared to Oberon
> is the removal of the hidden copy machine for structured
> value parameters.

Made possible by postulating read-only semantics for
structured value parameters. Regarding the other changes
(leading to even less data passed on the stack) one may
debate whether the gain is material enough. Certainly
from a (stack) space utilization perspective, preventing
copy semantics for structured types was the biggest change.
But there were other considerations, some academic/purist.

In any case, the question appears to be settled now.
Specific implementations can of course “extend” the
language, as currently defined, in various ways.

-AP



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20171015/8a2fa1c7/attachment.html>


More information about the Oberon mailing list