Rice
parent
885adc8dc9
commit
95eb0f696b
|
@ -43,17 +43,19 @@ C: <hi-tag-dispatch-engine> hi-tag-dispatch-engine
|
|||
: num-hi-tags ( -- n ) num-types get num-tags get - ;
|
||||
|
||||
: hi-tag-number ( class -- n )
|
||||
"type" word-prop num-tags get - ;
|
||||
"type" word-prop ;
|
||||
|
||||
: hi-tag-quot ( -- quot )
|
||||
\ hi-tag def>> num-tags get [ fixnum-fast ] curry compose ;
|
||||
\ hi-tag def>> ;
|
||||
|
||||
M: hi-tag-dispatch-engine engine>quot
|
||||
methods>> engines>quots* [ >r hi-tag-number r> ] assoc-map
|
||||
methods>> engines>quots* [ >r "type" word-prop r> ] assoc-map
|
||||
[
|
||||
picker % hi-tag-quot % [
|
||||
linear-dispatch-quot
|
||||
] [
|
||||
num-tags get , \ fixnum-fast ,
|
||||
[ >r num-tags get - r> ] assoc-map
|
||||
num-hi-tags direct-dispatch-quot
|
||||
] if-small? %
|
||||
] [ ] make ;
|
||||
|
|
Loading…
Reference in New Issue