freenode/#sicl - IRC Chatlog
Search
7:30:18
beach
But I keep thinking how close we are to extract at least part of Cleavir to a separate library.
7:31:36
beach
Once Clostrum is done, We can extract CST-to-AST, which then includes the AST definitions. To accomplish its task it would then use Eclector, CST, Trucler, Clostrum, and the CST-to-AST code.
7:32:09
beach
The only thing that needs to be decided is which part of the existing code counts as generally useful, and which part should be left as client configuration.
7:34:01
beach
In that extracted library, we could also supply default versions of some of the macros like DEFUN, DEFMACRO, and the simple ones like WHEN, UNLESS, etc.
9:38:33
jackdaniel
beach: what should we do with function-unbound? remove it from the specification or leave it be?
9:40:09
jackdaniel
OK, I think that its description should be clarified in that case, because based on the rest of the specification it is not clear, how the "client code can use the return value of this function to determine whether function-name is unbound"
9:41:22
beach
OK. How about, "if the value returned by this function is EQ to the CAR of the CONS cell returned by FUNCTION-CELL, then the function is unbound"?
9:42:30
jackdaniel
OK, I think that you've mentioned some change in the repository (I've suggested that you should pull first) – I don't see that change, so I suspect that you did not push
9:48:03
beach
Oh, and I would like to you keep the protocol system(s) and package(s) separate from those of the implementation. The idea is that a client might use the protocol, but with an implementation that is adapted to specific needs.
9:48:50
jackdaniel
there is a system clostrum, which contains the protocol, and clostrum/virtual for example implementation
9:49:20
jackdaniel
there are two packages in the system clostrum: clostrum and clostrum-implementation, first only exports symbols while the second one defines protocol classes and functions
9:54:19
jackdaniel
I think that a similar clarification should be made to a function variable-unbound
10:33:19
jackdaniel
I have a question after all. it is longer than one line, so I've pasted it: http://turtleware.eu/static/paste/fe810dee-function-inline.txt
10:35:20
jackdaniel
well, more a suspiction that function-inline specification is vague enough to allow undefined behavior
10:45:19
jackdaniel
(underlying assumption is that inline information is not stored with a function and that fdefinition does not modify that information because it is not specified to)
12:02:11
jackdaniel
the specification of (setf special-variable) has a typo, its lambda list is (value symbol environment init-p), it should be (value client environment symbol init-p) -- most notably it lacks client, but also the argument order is not consistent with other operators
12:08:55
jackdaniel
right, but should we preserve the inline information after the function-name becomes unbound?
12:09:04
beach
So when the compiler sees (defun f ...) it must be able to query the environment and get back INLINE so that it can save whatever information is necessary.
12:13:12
beach
But now I am thinking that we might need a way for the compiler to recover not only WHETHER the function is declared inline, but also the inline information associated with it.
12:15:02
jackdaniel
so it seems to indicate, that the proclamation applies to a function name, not a particular function
12:15:17
jackdaniel
in other words, there is nothing what would warrant removing such information when the function is undefined
12:15:50
beach
We define two more generic functions inline-information and (setf inline-information).
12:17:55
beach
And when the function is made undefined, the inline information is erased (NIL), but not the flag.
12:18:40
beach
If it returns INLINE, the compiler will then consult INLINE-INFORMATION, and use that information only if it is not NIL.
12:18:42
jackdaniel
and that new functions would belong to the run time environment? or to the compilation environment?
12:19:10
jackdaniel
the former I guess, because the function may be defined in a different compilation unit
12:22:27
beach
If, when the compiler sees (defun f ...), FUNCTION-INLINE returns INLINE, then the compiler must nevertheless save inline information (like an AST) about the function, so that it can be inlined when the compiler sees a call to f later on.
12:24:39
beach
It is possible that (setf function-inline) was invoked on the run-time environment completely outside of any compilation.
12:25:34
jackdaniel
can't the compiler use the compilation environment's parent to access that information?
12:25:38
beach
The information in the compilation environment must take priority over the one in the run-time environment.