diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/i-coerce.boot | 7 | ||||
-rw-r--r-- | src/interp/spad.lisp | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot index e0c896e4..2f7c8db3 100644 --- a/src/interp/i-coerce.boot +++ b/src/interp/i-coerce.boot @@ -985,6 +985,11 @@ coerceIntAlgebraicConstant(object,t2) == objNewWrap(getConstantFromDomain('(Zero),t2),t2) NIL +++ returns true if `val' belongs to the Union branch guarded by `pred'. +thisUnionBranch?: (%Code,%Thing) -> %Boolean +thisUnionBranch?(pred,val) == + eval ["LET",[["#1",MKQ val]],pred] + coerceUnion2Branch(object) == [.,:unionDoms] := objMode object doms := orderUnionEntries unionDoms @@ -994,7 +999,7 @@ coerceUnion2Branch(object) == predicate := NIL targetType:= NIL for typ in doms for pred in predList while ^targetType repeat - evalSharpOne(pred,val') => + thisUnionBranch?(pred,val') => predicate := pred targetType := typ null targetType => keyedSystemError("S2IC0013",NIL) diff --git a/src/interp/spad.lisp b/src/interp/spad.lisp index ee3dbd50..0ac5ef98 100644 --- a/src/interp/spad.lisp +++ b/src/interp/spad.lisp @@ -343,8 +343,6 @@ (if |$InteractiveMode| (|spadThrow|)) (S-PROCESS x)))) -(defun |evalSharpOne| (x \#1) (declare (special \#1)) (EVAL x)) - (defun |New,ENTRY,1| () (let (ZZ str N RLGENSYMFG RLGENSYMLST |NewFLAG| XCAPE SINGLELINEMODE OK ISID NBLNK COUNT CHR ULCASEFG ($LINESTACK 'BEGIN_UNIT) |