From 258d6427280f1ee0cce0dcdf12c38ad65b5e36cc Mon Sep 17 00:00:00 2001 From: dos-reis Date: Tue, 6 Jan 2009 06:53:21 +0000 Subject: * interp/sys-utility.boot (getVMType): IndexList are lists. * interp/g-util.boot (isSubDomain): Tidy. * interp/g-opt.boot (isVMConstantForm): New. (findVMFreeVars): Likewise. * interp/define.boot (insertViewMorphisms): Remove. (emitSubdomainInfo): New. (checkVariableName): Likewise. (checkParameterNames): Likewise. (checkRepresentation): Set $subdomain where appropriate. (compDefines): Check parameter names. (compDefineFunctor1): Propagate subdomain info. (doIt): Don't call insertViewMorphisms. * interp/compiler.boot (setqSingle): Check variable name. (compIterator): Likewise. (commonSuperType): New. (satisfies): Likewise. (coerceSubset): Use them to implemen cross-subdomain coercion. (coerceSuperset): New. (comCoerce1): Use it. (compPer): New. (compRep): Likewise. * interp/c-util.boot (getRepresentation): New. (proclaimCapsuleFunction): Improve for specialized subdomains. * algebra/stream.spad.pamphlet: Don't use `per' as variable name. * algebra/si.spad.pamphlet (size$SingleInteger): Tidy. (coerce$SingleInteger): Likewise. * algebra/reclos.spad.pamphlet (nonNull$RealClosure): Don't use `rep' as parameter name. * algebra/data.spad.pamphlet (Byte): Now a subdomain of NonNegativeInteger. Tidy. --- src/algebra/strap/NNI.lsp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/algebra/strap/NNI.lsp') diff --git a/src/algebra/strap/NNI.lsp b/src/algebra/strap/NNI.lsp index 9d034bca..34ec379e 100644 --- a/src/algebra/strap/NNI.lsp +++ b/src/algebra/strap/NNI.lsp @@ -36,7 +36,12 @@ (SEQ (LETT |c| (- |x| |y|) |NNI;subtractIfCan;2$U;3|) (EXIT (COND ((< |c| 0) (CONS 1 "failed")) - ('T (CONS 0 |c|)))))))) + ('T + (CONS 0 + (PROG1 |c| + (|check-subtype| + (COND ((< |c| 0) 'NIL) ('T 'T)) + '(|NonNegativeInteger|) |c|)))))))))) (DEFUN |NonNegativeInteger| () (PROG () -- cgit v1.2.3