From dbeb8d5ae59cfa7da8997a09ad27e4efc04d0eaf Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 20 Jun 2009 16:51:59 +0000 Subject: * interp/category.boot (SigOpsubsume): Remove as unused. (SourceLevelSubsume): Remove. (SourceLevelSubset): Likewise. * interp/sys-globals.boot: Likewise. * interp/define.boot: Tidy. * interp/functor.boot: Likewise. * interp/info.boot: Likewise. * algebra/si.spad.pamphlet: Don't set $noSubsets. * algebra/fortpak.spad.pamphlet: Don't set $noSubsumption. * algebra/fortran.spad.pamphlet: Likewise. * algebra/gdirprod.spad.pamphlet: Likewise. * algebra/mkfunc.spad.pamphlet: Likewise. * algebra/oct.spad.pamphlet: Likewise. * algebra/vector.spad.pamphlet: Likewise. --- src/interp/category.boot | 20 +------------------- src/interp/define.boot | 7 ------- src/interp/functor.boot | 3 +-- src/interp/info.boot | 2 +- src/interp/sys-globals.boot | 3 --- 5 files changed, 3 insertions(+), 32 deletions(-) (limited to 'src/interp') diff --git a/src/interp/category.boot b/src/interp/category.boot index dbdf9919..77b45dfe 100644 --- a/src/interp/category.boot +++ b/src/interp/category.boot @@ -300,28 +300,10 @@ SigListOpSubsume([[name1,sig1,:.],:.],list) == lsig1 := #sig1 ans:=[] for (n:=[[name2,sig2,:.],:.]) in list repeat - name1=name2 and lsig1 = #sig2 and SourceLevelSubsume(sig1,sig2) => + name1=name2 and lsig1 = #sig2 and sig1 = sig2 => ans:=[n,:ans] return ans -SigOpsubsume([[name1,sig1,:flag1],pred1,:.],[[name2,sig2,:flag2],pred2,:.]) == - --flag1 = flag2 and :this really should be checked - name1=name2 and LENGTH sig1=LENGTH sig2 and SourceLevelSubsume(sig1,sig2) - -SourceLevelSubsume([out1,:in1],[out2,:in2]) == - -- Checks for source-level subsumption in the sense of SYSTEM SCRIPT - -- true if the first signature subsumes the second - SourceLevelSubset(out1,out2) and - (and/[SourceLevelSubset(inarg2,inarg1) for inarg1 in in1 for inarg2 in in2]) - -SourceLevelSubset(a,b) == - --true if a is a source-level subset of b - a=b => true - $noSubsumption=true => false - b is ["Union",:blist] and member(a,blist) => true - BOUNDP '$noSubsets and $noSubsets => false - not null isSubDomain(a,b) - MachineLevelSubsume([name1,[out1,:in1],:flag1],[name2,[out2,:in2],:flag2]) == -- Checks for machine-level subsumption in the sense of SYSTEM SCRIPT -- true if the first signature subsumes the second diff --git a/src/interp/define.boot b/src/interp/define.boot index 8a188026..f0d9cb16 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -1127,13 +1127,6 @@ getSignature(op,argModeList,$e) == else for [[dc,:sig],:.] in mmList repeat printSignature(" ",op,sig) printSignature("NEED ",op,["?",:argModeList]) nil - for u in sigl repeat - for v in sigl | not (u=v) repeat - if SourceLevelSubsume(u,v) then sigl:= delete(v,sigl) - --before we complain about duplicate signatures, we should - --check that we do not have for example, a partial - as - --well as a total one. SourceLevelSubsume (from CATEGORY BOOT) - --should do this 1=#sigl => first sigl stackSemanticError(["duplicate signatures for ",op,": ",argModeList],nil) diff --git a/src/interp/functor.boot b/src/interp/functor.boot index b792ff7e..0a1a700c 100644 --- a/src/interp/functor.boot +++ b/src/interp/functor.boot @@ -734,8 +734,7 @@ SigSlotsMatch(sig,pattern,implem) == sig'=pat' => true --If we don't have this next test, then we'll recurse in SetFunctionSlots implem is ['Subsumed,:.] => nil - SourceLevelSubsume(sig',pat') => true - nil + sig' = pat' CheckVector(vec,name,catvecListMaker) == code:= nil diff --git a/src/interp/info.boot b/src/interp/info.boot index 1e9cb6ef..2e168e03 100644 --- a/src/interp/info.boot +++ b/src/interp/info.boot @@ -200,7 +200,7 @@ knownInfo pred == v:= get(op,"modemap",$e) for w in v repeat ww:= CDAR w --the actual signature part - #ww = #sig and SourceLevelSubsume(ww,sig) => + ww = sig => CAADR w = true => return true false --error '"knownInfo" diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot index c90028e7..d73e5234 100644 --- a/src/interp/sys-globals.boot +++ b/src/interp/sys-globals.boot @@ -374,9 +374,6 @@ $constructorLineNumber := 0 ++ $maxSignatureLineNumber := 0 -++ -$noSubsumption :=true - SPADERRORSTREAM := _*ERROR_-OUTPUT_* ++ -- cgit v1.2.3