[M3devel] Static chains

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Mon Jan 14 18:19:50 CET 2008


On Mon, Jan 14, 2008 at 10:47:28AM -0500, Tony Hosking wrote:
> Rodney,
> 
> I just realised that the static chains variables are *not* always  
> being set up for nested function internal use.  i.e., callers will  
> pass them, but nested functions that don't explicitly use them will  
> not have a static chain.  Is this something essential for you?  Why  
> would you need a static chain from within a nested function that  
> doesn't use any outer scope variables?  Since it doesn't use any  
> outer scope variables they cannot affect its execution, so debugging  
> the value of those variables seems unnecessary.  This is the default  
> behavior of gcc for static chains.

And having them could break languages where it's possible to export 
procedures to places where their nonlocal procedures are still in 
existence but the intermediate lexical levels which they don't use are 
not.  (Algol 68 is a case in point)

-- hendrik

> 
> -- Tony
> 



More information about the M3devel mailing list