From 86f5b5568ab4013e6fd8575e16b01d9d1aa99e91 Mon Sep 17 00:00:00 2001
From: dos-reis <gdr@axiomatics.org>
Date: Mon, 26 Jul 2010 01:47:11 +0000
Subject: 	* interp/g-opt.boot (optimize): Remove as no longer used. 
 * interp/define.boot (DomainSubstitutionFunction): Use 	simplifyVMForm
 in lieu of optimize. 	* interp/nruncomp.boot (NRTsetVector4a): Likewise.

---
 src/ChangeLog            |  7 +++++++
 src/interp/define.boot   |  2 +-
 src/interp/g-opt.boot    | 26 ++------------------------
 src/interp/nruncomp.boot |  2 +-
 4 files changed, 11 insertions(+), 26 deletions(-)

(limited to 'src')

diff --git a/src/ChangeLog b/src/ChangeLog
index a024bbf9..7c717a0e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-25  Gabriel Dos Reis  <gdr@cs.tamu.edu>
+
+	* interp/g-opt.boot (optimize): Remove as no longer used.
+	* interp/define.boot (DomainSubstitutionFunction): Use
+	simplifyVMForm in lieu of optimize.
+	* interp/nruncomp.boot (NRTsetVector4a): Likewise.
+
 2010-07-25  Gabriel Dos Reis  <gdr@cs.tamu.edu>
 
 	* interp/g-opt.boot (oprCond): Replace use of TruthP with direct
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 558b28fb..4403b26a 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1684,7 +1684,7 @@ DomainSubstitutionFunction(parameters,body) ==
         cons? $definition and
             isFunctor body.op and 
               body.op ~= $definition.op
-          =>  ['QUOTE,optimize body]
+          =>  ['QUOTE,simplifyVMForm body]
         [Subst(parameters,u) for u in body]
   not (body is ["Join",:.]) => body
   atom $definition => body
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 7c09d4a0..fceb3a2d 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -145,9 +145,7 @@ resetTo(x,y) ==
   x.rest := y.rest
   x
 
-++ Like `optimize', except that non-atomic form may be reduced to
-++ to atomic forms.  In particular, the address of the input may
-++ not be the same as that of the output.
+++ Simplify the VM form `x'
 simplifyVMForm x ==
   isAtomicForm x => x
   x.op = 'CLOSEDFN => x
@@ -164,26 +162,6 @@ simplifyVMForm x ==
   for xs in tails x repeat
     xs.first := simplifyVMForm first xs
   x
-
-optimize x ==
-  (opt x; x) where
-    opt x ==
-      atom x => nil
-      (y:= first x)='QUOTE => nil
-      y='CLOSEDFN => nil
-      y is [["XLAM",argl,body],:a] =>
-        optimize rest x
-        argl = "ignore" => x.first := body
-        if not (# argl<= # a) then
-          SAY '"length mismatch in XLAM expression"
-          PRETTYPRINT y
-        x.first := optimize optXLAMCond SUBLIS(pairList(argl,a),body)
-      atom y => optimize rest x
-      if first y="IF" then (x.first := optIF2COND y; y:= first x)
-      op:= GETL(subrname first y,"OPTIMIZE") =>
-        (optimize rest x; x.first := FUNCALL(op,optimize first x))
-      x.first := optimize first x
-      optimize rest x
  
 subrname u ==
   IDENTP u => u
@@ -233,7 +211,7 @@ optCatch (x is ["CATCH",g,a]) ==
   if a is ["SEQ",:s,["THROW", =g,u]] then
     changeThrowToExit(s,g)
     a.rest := [:s,["EXIT",u]]
-    ["CATCH",y,a]:= optimize x
+    a := simplifyVMForm a
   if hasNoThrows(a,g) then
     resetTo(x,a)
   else
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index ffe06c58..a96e2345 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -557,7 +557,7 @@ reverseCondlist cl ==
 NRTsetVector4a(sig,form,cond) ==
   sig = '$ =>
      domainList :=
-       [optimize COPY comp(d,$EmptyMode,$e).expr or d
+       [simplifyVMForm COPY comp(d,$EmptyMode,$e).expr or d
          for d in $domainShell.4.0]
      $uncondList := append(domainList,$uncondList)
      if isCategoryForm(form,$e) then $uncondList := [form,:$uncondList]
-- 
cgit v1.2.3