aboutsummaryrefslogtreecommitdiff
path: root/src/interp/g-opt.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-06-14 12:26:50 +0000
committerdos-reis <gdr@axiomatics.org>2009-06-14 12:26:50 +0000
commit12b1b74f1e952694c8f182eb2b4ab369f6005ddf (patch)
tree70446f3ea05944feb6beb68dd35f27573d9ee6f6 /src/interp/g-opt.boot
parent700e13eca3eaac940000e3529d761dc7b4b15e5e (diff)
downloadopen-axiom-12b1b74f1e952694c8f182eb2b4ab369f6005ddf.tar.gz
Add support for existential type recovery.
* interp/compiler.boot (compRecoverDomain): New. Split from compRecoverGuard. (compRecoverGuard): Split. Handle existential type recovery. (compScheme): New. Register as compiler. * interp/g-opt.boot (optLET*): New. Turn into LET-form if appropriate. Register as backend transformer. * interp/fnewmeta.lisp (|PARSE-Scheme|): New. (|PARSE-Quantifier|): Likewise. (|PARSE-QuantifiedVariableList|): Likewise. (|PARSE-QuantifiedVariable|): Likewise. * interp/metalex.lisp (KEYWORDS): Add 'forall' and 'exist' as new keywords. * interp/newaux.lisp: Register parser for expression schemes. * algebra/any.spad.pamphlet (=$Any): If the underlying domain has BasicType, use that equality operator. (coerce$Any): If the underlying domain has CoercibleTo OutputForm then use it.
Diffstat (limited to 'src/interp/g-opt.boot')
-rw-r--r--src/interp/g-opt.boot10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index c51987dc..0fb44255 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -492,6 +492,15 @@ optLET u ==
rplac(rest def, second def)
SUBLIS(inits,body)
+optLET_* form ==
+ form isnt ["LET*",:.] => form
+ ok := true
+ while ok for [[var,.],:inits] in tails second form repeat
+ if CONTAINED(var,inits) then ok := false
+ not ok => form
+ rplac(first form,"LET")
+ optLET form
+
lispize x == first optimize [x]
--% optimizer hash table
@@ -499,6 +508,7 @@ lispize x == first optimize [x]
for x in '( (call optCall) _
(SEQ optSEQ)_
(LET optLET)_
+ (LET_* optLET_*)_
(MINUS optMINUS)_
(QSMINUS optQSMINUS)_
(_- opt_-)_