Mucking around with compilation

Mark Evenson evenson at
Thu Oct 27 07:27:33 UTC 2016

On 2016/10/27 05:18, Alan Ruttenberg wrote:
> I got curious about how I might generate better code for JSS.
> The question is: Is there a more elegant way to do this, or a hook already
> built that I could use instead of redefining precompile-function-call
> If not, would it be reasonable to add a hook in the ABCL source so I don't
> need to patch it to do the optimization.

A quick grep of the source does not seem to indicate any hooks into the
controlling the behavior/implementation
PRECOMPILER::PRECOMPILE-FUNCTION-CALL, supporting your finding of no
currently reasonable mechanism for a user to manipulate.

Therefore, I agree that creating a hook mechanism would be the
reasonable way forward.

I worry a little about compiler speed decrease if we do a naive hook
implementation (i.e. something that MAPs APPLY).  Would it be more
reasonable to memoize possible values of PRECOMPILE-FUNCTION-CALL,
providing an API to switch at runtime?

Since PRECOMPILER isn't a documented ABCL package, it would be best to
define the API in PRECOMPILER, but have hooks that inserts the public
API in the SYSTEM package via the appropriate import and export of the

Cool work!  What sort of efficiency gains do you expect for JSS here?

"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."

More information about the armedbear-devel mailing list