Question on function-at-a-time and GC
Richard Henderson
rth@redhat.com
Wed Apr 21 21:59:00 GMT 2004
On Fri, Apr 16, 2004 at 09:35:53PM +0200, Laurent GUERBY wrote:
> Also taking adress of such nested program and being able to call
> them is a nice capability to have that could make such
> transformation even harder.
It's done. Generically for all languages. Using it for Ada
is three easy steps:
(1) Gimplify all functions in the nesting.
Whether you do this by converting from Ada ASTs to GENERIC and
then calling gimplify_function_tree or whatever is up to yall.
At this point you don't worry about access to variables from an
outer frame; all you have to do is set DECL_CONTEXT correctly.
(2) Call lower_nested_functions on the outermost function.
(3) Call cgraph_finalize_function on all functions in the nesting.
Actually, this should be fixed, since you'll wind up with
basically identical to c_finalize.
r~
More information about the Gcc
mailing list