aboutsummaryrefslogtreecommitdiff
path: root/src/interp/i-coerce.boot.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-10-16 16:03:14 +0000
committerdos-reis <gdr@axiomatics.org>2007-10-16 16:03:14 +0000
commit004d25ab39f6f6867eb767bc7ba9b3fcce4e47a8 (patch)
tree8d0dbf9d56040f709a86a5d8de888a90b4081e1b /src/interp/i-coerce.boot.pamphlet
parentcead691f140a05967d095a596c0b1a41674669f8 (diff)
downloadopen-axiom-004d25ab39f6f6867eb767bc7ba9b3fcce4e47a8.tar.gz
* Makefile.pamphlet (INOBJS): Lose xrun.$(FASLEXT).
* clammed.boot.pamphlet (coerceConvertMmSelection): Merge modification in late xrun.boot. * i-coerce.boot.pamphlet (equalOne): Likewise. (equalZero): Likewise. (algEqual): Likewise. (coerceByFunction): Likewise. * i-eval.boot.pamphlet (evalFrom): Likewise. (findFunctionInDomain): Likewise. (findFunctionInDomain1): Likewise. (findFunctionInCategory): Likewise. * nrunfast.boot.pamphlet (replaceGoGetSlot): Likewise. (lazyMatchArg2): Likewise. (newExpandTypeSlot): Likewise. (newExpandLocalTypeForm): Likewise. (newExpandLocalTypeArgs): Likewise. (sigDomainVal): Likewise. * nrungo.boot.pamphlet (lazyCompareSigEqual): Likewise. * nrunopt.boot.pamphlet (NRTmakeCategoryAlist): Likewise. * sys-globals.boot ($noSubsumption): Likewise. * template.boot (evalSlotDomain): Likewise. * xrun.boot: Remove.
Diffstat (limited to 'src/interp/i-coerce.boot.pamphlet')
-rw-r--r--src/interp/i-coerce.boot.pamphlet24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/interp/i-coerce.boot.pamphlet b/src/interp/i-coerce.boot.pamphlet
index e69d13b2..f7c690a4 100644
--- a/src/interp/i-coerce.boot.pamphlet
+++ b/src/interp/i-coerce.boot.pamphlet
@@ -399,27 +399,22 @@ domainOne(domain) == getConstantFromDomain('(One),domain)
domainZero(domain) == getConstantFromDomain('(Zero),domain)
---------------------> NEW DEFINITION (override in xrun.boot.pamphlet)
equalOne(object, domain) ==
-- tries using constant One and "=" from domain
-- object should not be wrapped
- eqfunc := getFunctionFromDomain("=",domain,[domain,domain])
- SPADCALL(object,getConstantFromDomain('(One),domain),eqfunc)
+ algEqual(object, getConstantFromDomain('(One),domain), domain)
---------------------> NEW DEFINITION (override in xrun.boot.pamphlet)
equalZero(object, domain) ==
-- tries using constant Zero and "=" from domain
-- object should not be wrapped
- eqfunc := getFunctionFromDomain("=",domain,[domain,domain])
- SPADCALL(object,getConstantFromDomain('(Zero),domain),eqfunc)
+ algEqual(object, getConstantFromDomain('(Zero),domain), domain)
---------------------> NEW DEFINITION (override in xrun.boot.pamphlet)
algEqual(object1, object2, domain) ==
-- sees if 2 objects of the same domain are equal by using the
-- "=" from the domain
-- objects should not be wrapped
-- eqfunc := getFunctionFromDomain("=",domain,[domain,domain])
- eqfunc := compiledLookupCheck("=",[$Boolean,domain,domain],evalDomain domain)
+ eqfunc := compiledLookupCheck("=",[$Boolean,'$,'$],evalDomain domain)
SPADCALL(object1,object2, eqfunc)
--% main algorithms for canCoerceFrom and coerceInteractive
@@ -1389,7 +1384,6 @@ coercionFailure() ==
-- does the throw on coercion failure
THROW('coerceFailure,$coerceFailure)
---------------------> NEW DEFINITION (override in xrun.boot.pamphlet)
coerceByFunction(T,m2) ==
-- using the new modemap selection without coercions
-- should not be called by canCoerceFrom
@@ -1401,12 +1395,12 @@ coerceByFunction(T,m2) ==
dcVector := evalDomain ud
fun :=
isWrapped x =>
- NRTcompiledLookup("=", [$Boolean, ud, ud], dcVector)
- NRTcompileEvalForm("=", [$Boolean, ud, ud], dcVector)
+ NRTcompiledLookup("=", [$Boolean, '$, '$], dcVector)
+ NRTcompileEvalForm("=", [$Boolean, '$, '$], dcVector)
[fn,:d]:= fun
isWrapped x =>
x:= unwrap x
- objNewWrap(SPADCALL(CAR x,CDR x,fun),m2)
+ mkObjWrap(SPADCALL(CAR x,CDR x,fun),m2)
x isnt ['SPADCALL,a,b,:.] => keyedSystemError("S2IC0015",NIL)
code := ['SPADCALL, a, b, fun]
objNew(code,$Boolean)
@@ -1417,12 +1411,14 @@ coerceByFunction(T,m2) ==
[[dc,tar,:args],slot,.]:= mm
dcVector := evalDomain(dc)
fun:=
+--+
isWrapped x =>
- NRTcompiledLookup(funName,[tar,:args],dcVector)
- NRTcompileEvalForm(funName,[tar,:args],dcVector)
+ NRTcompiledLookup(funName,slot,dcVector)
+ NRTcompileEvalForm(funName,slot,dcVector)
[fn,:d]:= fun
fn = function Undef => NIL
isWrapped x =>
+--+
$: fluid := dcVector
val := CATCH('coerceFailure, SPADCALL(unwrap x,fun))
(val = $coerceFailure) => NIL