From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Luca Boasso Sent: Friday, 13 October 2017 1:18 AM To: ETH Oberon and related systems Subject: Re: [Oberon] Clarifying type compatibility in Oberon-07
Re: The implementation of local dynamic arrays:
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?
The Astrobe compiler does use a frame pointer. Given the local variable 'a' declared as: VAR a: ARRAY OF INTEGER; The code generated by NEW(a, 10) is as follows: MOV r10,10 STR r10,[fp,-8] MOV r10,r10 lsl 2 SUB sp,sp,r10 STR sp,[fp,-4] Regards, Chris Burrows CFB Software http://www.astrobe.com