continuations: more use of check-instance.

master
John Benediktsson 2020-01-15 10:52:34 -08:00
parent 77cd3aaede
commit 19c8d482fb
1 changed files with 5 additions and 6 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2003, 2011 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs combinators combinators.private kernel
kernel.private make namespaces sequences vectors ;
USING: accessors assocs classes combinators combinators.private
kernel kernel.private make namespaces sequences vectors ;
IN: continuations
: with-datastack ( stack quot -- new-stack )
@ -49,11 +49,10 @@ C: <continuation> continuation
<PRIVATE
ERROR: not-a-continuation object ;
: >continuation< ( continuation -- data call retain name catch )
dup continuation? [ not-a-continuation ] unless
{ [ data>> ] [ call>> ] [ retain>> ] [ name>> ] [ catch>> ] } cleave ; inline
continuation check-instance {
[ data>> ] [ call>> ] [ retain>> ] [ name>> ] [ catch>> ]
} cleave ; inline
PRIVATE>