|[3 earlier articles]|
|Re: nested functions email@example.com (2006-08-30)|
|Re: nested functions firstname.lastname@example.org (Tommy Thorn) (2006-08-30)|
|Re: nested functions email@example.com (2006-08-31)|
|Re: nested functions firstname.lastname@example.org (Tommy Thorn) (2006-08-31)|
|Re: nested functions email@example.com (Marco van de Voort) (2006-09-06)|
|Re: nested functions firstname.lastname@example.org (Tommy Thorn) (2006-09-06)|
|Re: nested functions Jatin_Bhateja@mentor.com (Jatin Bhateja) (2006-09-08)|
|Re: nested functions email@example.com (Karsten Nyblad) (2006-09-08)|
|Re: nested functions firstname.lastname@example.org (Tommy Thorn) (2006-09-08)|
|Re: nested functions email@example.com (2006-09-08)|
|Re: nested functions firstname.lastname@example.org (Chris Dollin) (2006-09-08)|
|From:||Jatin Bhateja <Jatin_Bhateja@mentor.com>|
|Date:||8 Sep 2006 00:24:47 -0400|
>My next doubt is regarding the nested function support from GCC using
>trampolines. I could see that in case of function pointers of nested
>functions GCC was generating the code on the stack to move the frame
>pointer of the function in which the nested function is nested to ECX
>and then to do a jump to the nested function.
>Whether GCCs support for nested functions is similar to nested function
>support in functional languages like haskell/scheme and do trampolines
>provide any advantage other than access time.?
According to me GCC nested functions are not same as nested functions
in functional languages as these languages are dynamically scoped
languages and in them the order in which locals are searched is from
inner to outermost function in enclosing order in run time stack. This
could be implimented by using either Displays or by following the
static link in activations records at run time.
On the other had C is statically scoped language (as per C standard) and
thus nested function extension of GCC is different form usual functional
Thanks and Regards
Mentor Graphics, Noida.
Return to the
Search the comp.compilers archives again.