freenode/#clasp - IRC Chatlog
Search
1:29:04
drmeister
You invalidate the generic-function with dispatch functions any time the call history and the dispatcher might get out of date - like when you redefine a class.
1:30:10
drmeister
I haven't thought it through - but beach was very clear on that point. It's specializers. So I never gamed it out.
1:31:14
drmeister
I imagine update of the call-history would be tricker. If you redefine a class you have to remove call history entries that contain the old stamp and add ones that have the new stamp...
1:32:30
drmeister
I don't think it would change my current problem - which is to identify the subset of generic functions that may have their call-histories edited because of a redefined class and that will have to be invalidated because of a redefined class.
1:32:57
Bike
i mean, you could just leave the old stamp around, and the invalidated dispatcher would probably compute the new call history entry, i figured.
1:34:00
drmeister
No - that's not how I understand things to work. An invalidated dispatcher does nothing but compile the call history into the new dispatcher - while completely avoiding generic function calls.
1:36:08
drmeister
The call history is the history of all previous memoized calls - the specializer for a particular argument for a memoized call is the class - the stamp of the class might be used - but I haven't thought it through.
1:38:01
Bike
i meant that i don't know what computes call history entries, and what does so wasn't really my point
1:38:32
drmeister
Mind you, I'm not arguing - I'm just trying to hold on to what I think I understand to sort out what I think is my problem.
1:39:30
drmeister
You compute call history entries on a dispatch-miss. It constructs a key and evaluates the effective-method-function and adds those to the call-history.
1:43:09
drmeister
I'm pretty sure my problem is I'm not invalidating the dispatch function of the INITIALIZE-INSTANCE generic function when PRETTY-STREAM (which it has a call-history entry for) is redefined and the INITIALIZE-INSTANCE dispatcher tests for the old stamp.
3:00:22
Bike
minion: memo for beach: there are instructions for converstions between float types but no primops/asts; i was going to add them with two types so you'd write like (cleavir-primop:coerce single-float double-float x). also, there's one for "unboxed integers", does this mean fixnums with tag shifted out to take advantage of machine instructions?
5:05:11
beach
minion: memo for Bike: 1. Sure, go ahead and add those primops/ASTs. 2. Yes, an unboxed fixnum is a raw machine integer in the range of a fixnum.
10:30:48
minion
Bike, memo from beach: 1. Sure, go ahead and add those primops/ASTs. 2. Yes, an unboxed fixnum is a raw machine integer in the range of a fixnum.
12:58:32
drmeister
Hi scymtym - I was going to ask how you kept track of which generic functions need to have their dispatchers invalidated when a class is redefined. But then I recalled that you said that you hadn't dealt with class redefinition.
13:02:22
scymtym
yes, i haven't looked at that yet. i'm currently determining how the performance of the approach compares to SBCL's current PCL-based implementation. adding missing functionality or cleaning up the code is probably pointless before gathering that information
13:03:36
Bike
llvm has an fcmp for floating point compares, and there's an 'fcmp false' that just always returns false. i wonder what the point of that is
13:08:10
Bike
as far as actual questions go, there's whether we're going to have NaNs, but i don't think that matters in a world where division by zero is a hard crash :(
13:15:43
Bike
scymtym: i know it's not why you're here, but do you know what i could look at or who i should ask to figure out how sbcl handles signals?
13:23:54
Bike
it doesn't do this thing clasp does where it only checks for them at allocation points, does it?
13:24:43
stassats
normal sbcl, not the safepoint one (which is broken elsewhere) always receives signals
13:25:14
stassats
there is a thing called pseudo-atomic, basically a flag, usually used around allocation routines (can't have a partially allocated object floating around)
13:26:07
stassats
safepoints check a protected page at jump backs, function entries, around foreign calls and other things like that