[alexandria-devel] [PATCH] PROG1-LET

Attila Lendvai attila.lendvai at gmail.com
Thu Apr 12 07:53:15 UTC 2012


> Certainly. I've been experimenting with a compiler backed by LLVM, and
> using its IR builder, I often wish to create a function, define its
> body, then return the function. This usually takes the form of:
>
> (prog1-let (func (llvm:add-function ...))
>  (setf (llvm:linkage func) :internal
> [...]

i'd use a custom macro here called (with-new-llvm-node ...) or
somesuch, and that would also make the code a whole lot more easier on
the brain when reading.

and if it's a regular and often repeated construct in the codebase,
then i'd even introduce an implicit -node- variable in that macro
(which is colored specially in my emacs).

IMHO.

-- 
 attila

Notice the erosion of your (digital) freedom, and do something about it!

PGP: 2FA1 A9DC 9C1E BA25 A59C  963F 5D5F 45C7 DFCD 0A39
OTR XMPP: 8647EEAC EA30FEEF E1B55146 573E52EE 21B1FF06




More information about the alexandria-devel mailing list