libera/#commonlisp - IRC Chatlog
Search
3:37:14
felipebubu
just wondered if that's a lem problem or a code problem or anything else, but for some reason C-c C-k is not compiling every clos method, but C-c C-c is compiling the clos method alone
6:06:59
semz
Hm, actually this might be an implementation-specific question. For the distinction between safe and unsafe code this is irrelevant since the calling code must also be safe to get safe code, and for the special/type declarations it doesn't make a difference
7:15:23
beach
semz: What does it mean for a declaration to "apply to the bodies of inlined functions"? An inlined function must still follow the semantics consisting of binding the values of forms to its parameters. Inlining it must not change that.
7:16:11
semz
I'm mostly concerned with safety declarations, but these aren't really portable to begin with outside of the safe/unsafe distinction
7:16:13
beach
semz: Put differently, inlining is not done by including source code into the inlining function.
7:17:11
semz
e.g. if foo uses default safety and is inlined into bar, which uses low safety, would the inlined foo be treated as compiled under low safety?
7:17:55
semz
so far it seems like this question is ill-defined as far as standard CL is concerned though
7:23:18
Krystof
I can imagine two implementations of inline: one which substitutes the source code (where you would naturally get low safety in your example) and one which substitutes the compiled code (default safety)
7:24:24
Krystof
if you know you want the first interpretation you can use a compiler macro instead, assuming your implementation does anything with compiler macros
7:25:06
Krystof
if you want the second one, your best chnace is probably something like (declaim (inline foo)) (defun foo (x) (locally (declare default-safety) ...))
7:52:28
ogamita
I had the impression that in general, we want more of a source-code inlining, eg. to allow early type optimizations.