chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix #1665 by blocking direct calls to externally inlineable


From: megane
Subject: Re: [PATCH] Fix #1665 by blocking direct calls to externally inlineable procedures
Date: Wed, 12 Feb 2020 18:18:51 +0200
User-agent: mu4e 1.0; emacs 25.1.1

Peter Bex <address@hidden> writes:

> Hi all,
>
> Attached is a relatively straightforward patch for #1665.  The unroll
> limit was causing the procedure calls to stay, and the compiler would
> replace those calls with a direct call, thinking the fid would be valid
> locally (but it isn't, because it was loaded from an external file).

Pushed. Thanks, Peter!

--- 

Is there any technical reason we couldn't call external functions
directly?

The implementation effort is obviously something different.

I noticed some time ago that gcc doesn't compile away a function if
either of these 2 is true:

- The function uses alloca

- The function's address is captured

So that covers pretty much every generated chicken function.

You can see the function listed in a object file with 'objdump -t
foo.o'. I'm assuming there wouldn't be an entry if the function was
compiled away.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]