Working on removing delegation slot

db4
Slava Pestov 2008-09-02 23:21:08 -05:00
parent a4a00f6e40
commit ac97c1e14c
3 changed files with 5 additions and 12 deletions

View File

@ -358,7 +358,7 @@ M: byte-array '
! Tuples ! Tuples
: (emit-tuple) ( tuple -- pointer ) : (emit-tuple) ( tuple -- pointer )
[ tuple>array rest-slice ] [ tuple-slots ]
[ class transfer-word tuple-layout ] bi prefix [ ' ] map [ class transfer-word tuple-layout ] bi prefix [ ' ] map
tuple type-number dup [ emit-seq ] emit-object ; tuple type-number dup [ emit-seq ] emit-object ;
@ -384,9 +384,9 @@ M: tuple-layout '
] cache-object ; ] cache-object ;
M: tombstone ' M: tombstone '
delegate state>> "((tombstone))" "((empty))" ?
"((tombstone))" "((empty))" ? "hashtables.private" lookup "hashtables.private" lookup def>> first
def>> first [ emit-tuple ] cache-object ; [ emit-tuple ] cache-object ;
! Arrays ! Arrays
M: array ' M: array '

View File

@ -199,10 +199,3 @@ ERROR: assert got expect ;
: do-primitive ( number -- ) "Improper primitive call" throw ; : do-primitive ( number -- ) "Improper primitive call" throw ;
PRIVATE> PRIVATE>
! Deprecated
GENERIC: delegate ( obj -- delegate )
M: tuple delegate 2 slot ;
M: object delegate drop f ;

View File

@ -131,7 +131,7 @@ HELP: define-typecheck
"GENERIC: generic" "GENERIC: generic"
"M: class generic quot ;" "M: class generic quot ;"
} }
"It checks if the top of the stack is an instance of " { $snippet "class" } ", and if so, executes the quotation. Delegation is respected." "It checks if the top of the stack is an instance of " { $snippet "class" } ", and if so, executes the quotation."
} }
{ $notes "This word is used internally to wrap unsafe low-level code in a type-checking stub." } ; { $notes "This word is used internally to wrap unsafe low-level code in a type-checking stub." } ;