More efficient hi-tag accessor
parent
993a01791b
commit
c54668596d
|
@ -46,7 +46,7 @@ C: <hi-tag-dispatch-engine> hi-tag-dispatch-engine
|
||||||
"type" word-prop num-tags get - ;
|
"type" word-prop num-tags get - ;
|
||||||
|
|
||||||
: hi-tag-quot ( -- quot )
|
: hi-tag-quot ( -- quot )
|
||||||
[ 0 slot ] num-tags get [ fixnum-fast ] curry compose ;
|
\ hi-tag def>> num-tags get [ fixnum-fast ] curry compose ;
|
||||||
|
|
||||||
M: hi-tag-dispatch-engine engine>quot
|
M: hi-tag-dispatch-engine engine>quot
|
||||||
methods>> engines>quots* [ >r hi-tag-number r> ] assoc-map
|
methods>> engines>quots* [ >r hi-tag-number r> ] assoc-map
|
||||||
|
|
|
@ -192,10 +192,10 @@ ERROR: assert got expect ;
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
: hi-tag ( obj -- n ) 0 slot ; inline
|
|
||||||
|
|
||||||
: declare ( spec -- ) drop ;
|
: declare ( spec -- ) drop ;
|
||||||
|
|
||||||
|
: hi-tag ( obj -- n ) { hi-tag } declare 0 slot ; inline
|
||||||
|
|
||||||
: do-primitive ( number -- ) "Improper primitive call" throw ;
|
: do-primitive ( number -- ) "Improper primitive call" throw ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
Loading…
Reference in New Issue