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

View File

@ -199,10 +199,3 @@ ERROR: assert got expect ;
: do-primitive ( number -- ) "Improper primitive call" throw ;
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"
"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." } ;