[fpc-devel] Local procedures as procedural parameter

Olle Raab olle.r at automagika.se
Thu Mar 17 00:06:00 CET 2005


05-03-16 23.08, skrev Peter Vreman följande:
> 
> But the framepointer parameter must then be the last. That will make
> macpas  local procedures incompatible with the current code where it is
> passed as the first parameter.

Couldn't the framepointer be last parameter in all modes ?

> Things like the objects unit and FreeVision
> will then be unusable, without the compiler being able to warn/error you
> for that.

Why ? Are these special ?

> Also generating code for cdecl on x86 will become more complex:
> 
> push para1
> ..
> push paraX
> if isoprocvar.framepointer<>nil then
> push parentfp
> call proc
> dec stack,parasize_on_the_stack-sizeof(parentfp)
> if isoprocvar.framepointer<>nil then
> dec stack sizeof(parentfp)

But cdecl does not allow local functions at all, no ?

You dont have local functions in C, no ?

Olle





More information about the fpc-devel mailing list