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