temp0 0 MOV rc-absolute-cell rt-immediate jit-rel
! key = class
temp2 temp1 MOV
- ! compute cache.length - 1
- temp3 temp0 1 bootstrap-cells array tag-number - [+] MOV
- temp3 1 SHR
- temp3 4 SUB
! key &= cache.length - 1
- temp2 temp3 AND
+ temp2 mega-cache-size get 1- bootstrap-cell * AND
! cache += array-start-offset
temp0 array-start-offset ADD
! cache += key
USING: accessors definitions generic generic.single kernel
namespaces words math math.order combinators sequences
generic.single.private quotations kernel.private
-assocs arrays ;
+assocs arrays layouts ;
IN: generic.standard
TUPLE: standard-combination < single-combination # ;
combination get #>> [ f inline-cache-miss ] 3curry [ ] like ;
: make-empty-cache ( -- array )
- generic-word get "methods" word-prop
- assoc-size 2 * next-power-of-2 f <array> ;
+ mega-cache-size get f <array> ;
M: standard-combination mega-cache-quot
combination get #>> make-empty-cache [ mega-cache-lookup ] 3curry [ ] like ;