From 6d8d9ff0d92a31b78b03b669b5ad99ef0b2715f4 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 2 Oct 2008 03:34:18 +0000 Subject: * interp/i-spec1.boot (upcase): Tidy. * interp/i-spec2.boot (evalIsntPredicate): Likewise. * interp/sys-utility.boot (existingFile?): Likewise. --- src/interp/i-spec1.boot | 16 ++++++++-------- src/interp/i-spec2.boot | 4 ++-- src/interp/sys-utility.boot | 3 ++- 3 files changed, 12 insertions(+), 11 deletions(-) (limited to 'src/interp') diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot index f8820697..c3690278 100644 --- a/src/interp/i-spec1.boot +++ b/src/interp/i-spec1.boot @@ -345,24 +345,24 @@ upcase t == if d is [":",=rhs,.] then rhstag := i if NULL rhstag then error '"upcase: bad Union form" $genValue => - rhstag = first unwrap objVal triple => code := wrap 'TRUE - code := wrap NIL + rhstag = first unwrap objVal triple => code := wrap true + code := wrap false code := ["COND", [["EQL",rhstag,["CAR",["unwrap",objVal triple]]], - ''TRUE], - [''T,NIL]] + true], + [''T,false]] else $genValue => t' := coerceUnion2Branch triple - rhs = objMode t' => code := wrap 'TRUE - code := wrap NIL + rhs = objMode t' => code := wrap true + code := wrap false triple' := objNewCode(["wrap",objVal triple],objMode triple) code := ["COND", [["EQUAL",MKQ rhs,["objMode",['coerceUnion2Branch,triple']]], - ''TRUE], - [''T,NIL]] + true], + [''T,false]] putValue(op,objNew(code,$Boolean)) putModeSet(op,[$Boolean]) diff --git a/src/interp/i-spec2.boot b/src/interp/i-spec2.boot index fb5079a6..22f97447 100644 --- a/src/interp/i-spec2.boot +++ b/src/interp/i-spec2.boot @@ -408,8 +408,8 @@ evalIsPredicate(value,pattern,mode) == false evalIsntPredicate(value,pattern,mode) == - evalIsPredicate(value,pattern,mode) => NIL - 'TRUE + evalIsPredicate(value,pattern,mode) => false + true removeConstruct pat == -- removes the "construct" from the beginning of patterns diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index 441d356e..20e84c18 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -172,7 +172,8 @@ makeAbsoluteFilename name == ++ returns true if `file' exists as a pathname. existingFile? file == - PROBE_-FILE file + PROBE_-FILE file => true + false ++ original version returned 0 on success, and 1 on failure ++ ??? fix that to return -1 on failure. -- cgit v1.2.3