summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Christophe Rhodes [Sun, 2 Mar 2014 20:19:59 +0000 (20:19 +0000)]
simplify parsing a bit
(patch from Jan Moringen but it didn't apply any more)
Christophe Rhodes [Sun, 2 Mar 2014 20:14:58 +0000 (20:14 +0000)]
note that TRACE / PROFILE are now handled by SBCL itself
Jan Moringen [Tue, 18 Feb 2014 03:12:47 +0000 (04:12 +0100)]
unused stuff
Jan Moringen [Sun, 23 Feb 2014 19:28:29 +0000 (20:28 +0100)]
added system definition file
possibly stretching the asdf syntax a bit, but this system definitely
has at least two authors
Jan Moringen [Tue, 18 Feb 2014 03:15:00 +0000 (04:15 +0100)]
minor things in accept-specializer.lisp
Christophe Rhodes [Sun, 2 Mar 2014 17:03:55 +0000 (17:03 +0000)]
prototype of prototype specializers
Need to write some more tests, but I think the main thing that isn't
"right" is dealing with redefinitions
Christophe Rhodes [Sun, 2 Mar 2014 16:58:22 +0000 (16:58 +0000)]
fix treatment of zero q values
a q value of 0 means "not acceptable", not "less acceptable than 0.1
but still acceptable".
Christophe Rhodes [Sun, 2 Mar 2014 16:57:33 +0000 (16:57 +0000)]
prettify walker slightly
Christophe Rhodes [Sat, 22 Feb 2014 20:52:43 +0000 (20:52 +0000)]
distinct walker which actually does something
for benchmarking purposes
Christophe Rhodes [Sat, 22 Feb 2014 20:52:23 +0000 (20:52 +0000)]
separate out (internal) functions
slow-method-lookup now just looks up the emf;
slow-method-lookup-and-call is responsible for invoking it (and maybe
cacheing it too).
In the process, allow generic functions to control the extent of
cacheing; this feature is only useful for research paper authors
Christophe Rhodes [Mon, 17 Feb 2014 20:34:49 +0000 (20:34 +0000)]
first-arg-only dispatch special case
For speed
Christophe Rhodes [Fri, 7 Feb 2014 10:05:21 +0000 (10:05 +0000)]
call NO-APPLICABLE-METHOD in the appropriate place
Otherwise we end up with NO-PRIMARY-METHODs. We should only compute
an EMF if there are in fact some methods, or at least that seems to be
the current behaviour of SB-MOP:COMPUTE-EFFECTIVE-METHOD-FUNCTION
Christophe Rhodes [Thu, 6 Feb 2014 14:15:46 +0000 (14:15 +0000)]
add signum specializer example
Christophe Rhodes [Thu, 16 Jan 2014 12:44:35 +0000 (12:44 +0000)]
note problem with :class slot
Really I want per-class allocation, not "in this class" allocation.
Achievable with a small amount of MOP, but...
Christophe Rhodes [Sun, 5 Jan 2014 21:03:56 +0000 (21:03 +0000)]
gitignore fasls
Christophe Rhodes [Sun, 5 Jan 2014 20:41:01 +0000 (20:41 +0000)]
deal with keyword argument checking
it was actually mostly done internally to PCL, in the effective method
computation. However, for probably tedious historical reasons, the
way that this is actually implemented involves binding a magical
special variable at the point that the effective method form is turned
into code, which we weren't doing. Now we are.
Include a test case.
Christophe Rhodes [Sat, 21 Dec 2013 14:52:50 +0000 (14:52 +0000)]
delete stale add/remove-direct-method comment
Christophe Rhodes [Fri, 20 Dec 2013 18:55:02 +0000 (18:55 +0000)]
get SPECIALIZER-DIRECT-METHODS (and -GENERIC-FUNCTIONS) right
we can do what we need by having SB-MOP:ADD-DIRECT-METHODS and
SB-MOP:REMOVE-DIRECT-METHODS maintain a per-class table, indexed by
the specializers under SB-PCL::SAME-SPECIALIZER-P, of direct methods.
This then is agnostic to whether the specializers are interned or
freshly generated.
Christophe Rhodes [Tue, 17 Dec 2013 12:24:25 +0000 (12:24 +0000)]
adapt content-negotiation method combination
Make CALL-NEXT-METHOD cause an irrevocable control transfer: returning
from any primary method returns from all of them. (Because
media-types are basically disjoint, it doesn't really make sense to
have CALL-NEXT-METHOD return).
Christophe Rhodes [Tue, 17 Dec 2013 12:17:27 +0000 (12:17 +0000)]
allow digits in the media subtype
audio/mp3 might be helpful
Christophe Rhodes [Mon, 16 Dec 2013 16:31:55 +0000 (16:31 +0000)]
finish implementing ACCEPT specializers
A handy example to do dispatch based on the Accept: header in
HTTP requests. Includes a tricky method combination which
in addition can set the Content-Type: header of the response.
Christophe Rhodes [Mon, 16 Dec 2013 16:30:05 +0000 (16:30 +0000)]
new protocol function GENERALIZER-EQUAL-HASH-KEY
We need arbitrary generalizer objects, not least so as to have
composable specializer functions (if we want generic functions
which can have more than one extended specializer class, we need
to be sure that our generalizers won't stomp on each other).
But that means that cacheing effective methods depends totally on
interning generalizers, which is a bit lame, unless we ask the
extended specializer implementor to provide a subkey to be used
in the key to the emf cache. This new protocol function is a hook
for exactly that purpose.
(Minimally update the cons specializer example: it's still bad, in
that it uses symbols as the generalizer for conses, but the protocol
in principle at least doesn't leak now.)
Christophe Rhodes [Mon, 16 Dec 2013 09:05:12 +0000 (09:05 +0000)]
accept-header parsing
INSERT routine to insert (and possibly modify the q of) a node
Parser using cl-ppcre, which will win few prizes for robustness but at
least gets the header as sent by Chromium on my computer right...
Christophe Rhodes [Mon, 16 Dec 2013 09:03:39 +0000 (09:03 +0000)]
improve print-object for accept-tree-node
only display the (unparsed) accept string if we are printing
the root node
Christophe Rhodes [Sat, 14 Dec 2013 08:54:40 +0000 (08:54 +0000)]
beginnings of content-type negotiation specializer
method combination and media-type priority computation. Still needs
work on the accept header parser
Christophe Rhodes [Fri, 13 Dec 2013 00:01:56 +0000 (00:01 +0000)]
get the protocol more right
Include some generic function arguments for specialization in protocol
functions involving generalizers. (Otherwise there are some cases where
it's not possible to define methods not in violation of the rules about
specializers applicable to instances of not-standard classes.)
Adjust the CONS-SPECIALIZER example to suit, and include an extra test
case which shows of method-combination as well as the new ability to
have multiple applicable methods with class specializers.
Christophe Rhodes [Thu, 12 Dec 2013 23:59:40 +0000 (23:59 +0000)]
fix one package export
one update -CLASS -> -GENERALIZER
Christophe Rhodes [Thu, 12 Dec 2013 14:54:28 +0000 (14:54 +0000)]
test case!
Include some assertions on the behaviour of WALK
Christophe Rhodes [Thu, 12 Dec 2013 14:54:06 +0000 (14:54 +0000)]
flush the EMF cache in REINITIALIZE-INSTANCE of SPECIALIZABLE-GENERIC-FUNCTION
Christophe Rhodes [Thu, 12 Dec 2013 14:53:33 +0000 (14:53 +0000)]
note a fixme
Christophe Rhodes [Wed, 11 Dec 2013 20:53:48 +0000 (20:53 +0000)]
handle arbitrary method combination
I think it's practically impossible to do on our own, certainly
efficiently: handling the pseudo-lisp that is an effective method is
likely to go wrong. Piggy-back on SBCL, with
SB-PCL::MAKE-EFFECTIVE-METHOD-FUNCTION and SB-PCL::INVOKE-EMF
Christophe Rhodes [Wed, 11 Dec 2013 20:49:56 +0000 (20:49 +0000)]
package fixup for cons specializers
also note a problem with the current protocol
Christophe Rhodes [Wed, 11 Dec 2013 10:21:56 +0000 (10:21 +0000)]
separate out cons-specializer and walk into their own file
Christophe Rhodes [Tue, 10 Dec 2013 21:38:25 +0000 (21:38 +0000)]
initial commit
Somewhat modified version of specializable.lisp from
http://www.lichteblau.com/git/?p=specializable.git
[ commit
eb30d235951c3c1d128811278760f1db36cd336c ]
Lightly modified on a first read-through, mostly cosmetic though with
the innovation of the GENERALIZER concept, as in
COMPUTE-APPLICABLE-METHODS-USING-GENERALIZER and
SPECIALIZER-ACCEPTS-GENERALIZER-P. Lots of FIXME notes for the things
that weren't trivial.