Working on removing delegation slot
parent
a4a00f6e40
commit
ac97c1e14c
|
@ -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 '
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -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." } ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue