Mucking around with compilation

Alessio Stalla alessiostalla at gmail.com
Thu Oct 27 09:03:11 UTC 2016


I was thinking the same thing. IIRC there's even some operator to emit your
own assembly from the compiler macro.

Il 27 ott 2016 11:01, "Erik Huelsmann" <ehuels at gmail.com> ha scritto:

> Hi,
>
> Did you look at define-compiler-macro as a possible hook mechanism?
>
> Regards,
>
> Erik
>
> On Oct 27, 2016 09:28, "Mark Evenson" <evenson at panix.com> wrote:
>
>>
>>
>> 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
>> symbols.
>>
>> 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."
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20161027/559cdeca/attachment.html>


More information about the armedbear-devel mailing list