freenode/#sicl - IRC Chatlog
Search
9:14:03
heisig
beach: What do you mean by 'information to actually inline the function'? Some representation of the code to be inlined?
9:14:33
beach
Alternatively, we can have the INLINE slot have the 3 possible values: NIL meaning no information has been given, :notinline with the obvious meaning or any True value meaning :inline has been given and this is the information to be used by the client.
9:15:13
beach
But the last solution prevents client code from inlining when no declaration has been established.
9:17:07
heisig
The question is, should this information actually be a part of the inline-mixin? After all, the inline-mixin describes the use of a function, not its definition.
9:18:00
heisig
I'd prefer to have a separate function for retrieving the inline information of a function from a given environment.
9:18:55
beach
Well, here is the issue. Common Lisp says functions are not defined at compile time. So if a client needs some information about how a function is to be inlined at compile time, it can't be part of the function itself.
9:20:05
beach
But I suppose another option would be to keep it in a separate table during compilation.
10:34:58
heisig
beach: I gave it some more thought. And I think you are right about storing the inline information in the inline-mixin.
15:56:36
Bike
i'm thinking a bit about compiler errors. for a start, i'm putting a RECOVER restart around compiler macroexpansion that uses the unexpanded form if the compiler macro function signals an error.
15:56:49
Bike
for one, it's wrong right now, it returns a cst instead of converting it, but whatever
15:57:54
Bike
but the particular error- that's part of the implementation runtime. it hardly has anything to do with cleavir
15:58:13
beach
Wow, too much information for me to digest at 18:00 after 13 hour work day. I'll try to understand it tomorrow.
15:59:26
Bike
i like what sbcl does, where it basically compiles in (error 'some-internal-sbcl-condition ...) and the ... encodes the error the compiler caught
16:01:38
Bike
hm, and that recover might not make sense sometimes. for example, if we're converting (eval-when (:compile-toplevel) (error ...))
16:02:57
Bike
if there's no more specific way to restart from whatever error happens in a compile-time evaluation, the compiler should probably just give up?
16:10:48
Bike
also internationalizing restarts might be weird. the protocol isn't really amenable to things in the way it works with acclimation conditions
19:07:17
Bike
i think rather than RECOVER i'd rather have a SUBSTITUTE-CST restart. CONVERT would always establish it so you always know it's there. unlike RECOVER it would have one argument - a CST built by the implementation from information in whatever error was signaled
19:10:45
Bike
but it might be nice to have RECOVER as a first line attempt - like with compiler macro functions it could be used properly for any kind of error, or for CONSIDER-SPECIAL - and then more specific restarts if there's no specific RECOVER
19:18:27
Bike
though for compiler macro and regular macro function errors, maybe we should just wrap them - we can add in a source location that way