From: John Benediktsson Date: Wed, 15 Jan 2020 18:52:34 +0000 (-0800) Subject: continuations: more use of check-instance. X-Git-Tag: 0.99~3568 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=19c8d482fb5ac38541878cb4f5430e299e76620a continuations: more use of check-instance. --- diff --git a/core/continuations/continuations.factor b/core/continuations/continuations.factor index bf32960d0f..577ae71aaf 100644 --- a/core/continuations/continuations.factor +++ b/core/continuations/continuations.factor @@ -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< ( 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>