aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog9
-rw-r--r--src/interp/Makefile.in5
-rw-r--r--src/interp/Makefile.pamphlet5
-rw-r--r--src/interp/compress.boot70
-rw-r--r--src/interp/nruncomp.boot1
-rw-r--r--src/interp/sys-utility.boot25
6 files changed, 38 insertions, 77 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index eee2f44e..78f5a5c5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
+2010-07-10 Gabriel Dos Reis <gdr@cse.tamu.edu>
+
+ * interp/sys-utility.boot (minimalise): Move from compress.boot.
+ Rewrite local worker to use explicit hash table parameter instead
+ of special variable.
+ * interp/compress.boot (minimalise): Move to sys-utility.boot.
+ Delete file.
+ * interp/nruncomp.boot (buildFunctor): Don't bother to minimalise.
+
2010-07-09 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/sys-constants.boot ($noEnv): Remove.
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in
index c839616b..fcc44219 100644
--- a/src/interp/Makefile.in
+++ b/src/interp/Makefile.in
@@ -39,7 +39,7 @@ OBJS= boot-pkg.$(FASLEXT) types.$(FASLEXT) \
clammed.$(FASLEXT) nlib.$(FASLEXT) \
comp.$(FASLEXT) foam_l.$(FASLEXT) \
pathname.$(FASLEXT) \
- compat.$(FASLEXT) compress.$(FASLEXT) \
+ compat.$(FASLEXT) \
serror.$(FASLEXT) ptrees.$(FASLEXT) \
cparse.$(FASLEXT) cstream.$(FASLEXT) \
g-cndata.$(FASLEXT) database.$(FASLEXT) \
@@ -408,7 +408,6 @@ pspad2.$(FASLEXT): pspad1.$(FASLEXT)
pspad1.$(FASLEXT): macros.$(FASLEXT)
g-util.$(FASLEXT): ggreater.$(FASLEXT) macros.$(FASLEXT) sys-utility.$(FASLEXT)
g-cndata.$(FASLEXT): sys-macros.$(FASLEXT)
-compress.$(FASLEXT): sys-macros.$(FASLEXT)
msg.$(FASLEXT): sys-macros.$(FASLEXT) astr.$(FASLEXT)
util.$(FASLEXT): parsing.$(FASLEXT)
fname.$(FASLEXT): macros.$(FASLEXT)
@@ -424,7 +423,7 @@ union.$(FASLEXT): vmlisp.$(FASLEXT)
ggreater.$(FASLEXT): vmlisp.$(FASLEXT)
axext_l.$(FASLEXT): foam_l.$(FASLEXT)
foam_l.$(FASLEXT): vmlisp.$(FASLEXT) sys-constants.$(FASLEXT)
-sys-utility.$(FASLEXT): vmlisp.$(FASLEXT) sys-os.$(FASLEXT)
+sys-utility.$(FASLEXT): vmlisp.$(FASLEXT) sys-os.$(FASLEXT) hash.$(FASLEXT)
vmlisp.$(FASLEXT): types.$(FASLEXT) sys-globals.$(FASLEXT)
types.$(FASLEXT): boot-pkg.$(FASLEXT)
boot-pkg.$(FASLEXT): boot-pkg.lisp
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet
index be5cb024..8f92fc07 100644
--- a/src/interp/Makefile.pamphlet
+++ b/src/interp/Makefile.pamphlet
@@ -118,7 +118,7 @@ OBJS= boot-pkg.$(FASLEXT) types.$(FASLEXT) \
clammed.$(FASLEXT) nlib.$(FASLEXT) \
comp.$(FASLEXT) foam_l.$(FASLEXT) \
pathname.$(FASLEXT) \
- compat.$(FASLEXT) compress.$(FASLEXT) \
+ compat.$(FASLEXT) \
serror.$(FASLEXT) ptrees.$(FASLEXT) \
cparse.$(FASLEXT) cstream.$(FASLEXT) \
g-cndata.$(FASLEXT) database.$(FASLEXT) \
@@ -647,7 +647,6 @@ pspad2.$(FASLEXT): pspad1.$(FASLEXT)
pspad1.$(FASLEXT): macros.$(FASLEXT)
g-util.$(FASLEXT): ggreater.$(FASLEXT) macros.$(FASLEXT) sys-utility.$(FASLEXT)
g-cndata.$(FASLEXT): sys-macros.$(FASLEXT)
-compress.$(FASLEXT): sys-macros.$(FASLEXT)
msg.$(FASLEXT): sys-macros.$(FASLEXT) astr.$(FASLEXT)
util.$(FASLEXT): parsing.$(FASLEXT)
fname.$(FASLEXT): macros.$(FASLEXT)
@@ -663,7 +662,7 @@ union.$(FASLEXT): vmlisp.$(FASLEXT)
ggreater.$(FASLEXT): vmlisp.$(FASLEXT)
axext_l.$(FASLEXT): foam_l.$(FASLEXT)
foam_l.$(FASLEXT): vmlisp.$(FASLEXT) sys-constants.$(FASLEXT)
-sys-utility.$(FASLEXT): vmlisp.$(FASLEXT) sys-os.$(FASLEXT)
+sys-utility.$(FASLEXT): vmlisp.$(FASLEXT) sys-os.$(FASLEXT) hash.$(FASLEXT)
vmlisp.$(FASLEXT): types.$(FASLEXT) sys-globals.$(FASLEXT)
types.$(FASLEXT): boot-pkg.$(FASLEXT)
boot-pkg.$(FASLEXT): boot-pkg.lisp
diff --git a/src/interp/compress.boot b/src/interp/compress.boot
deleted file mode 100644
index 3944fc03..00000000
--- a/src/interp/compress.boot
+++ /dev/null
@@ -1,70 +0,0 @@
--- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--- All rights reserved.
--- Copyright (C) 2007-2010, Gabriel Dos Reis.
--- All rights reserved.
---
--- Redistribution and use in source and binary forms, with or without
--- modification, are permitted provided that the following conditions are
--- met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
--- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-import sys_-macros
-namespace BOOT
-
--- This one is not currently in general use, but can be applied
--- to various situations are required
-
-minimalise x ==
- $hash:local:=hashTable 'EQUAL
- min x where
- min x ==
- y:=HGET($hash,x)
- y => y
- cons? x =>
- x = '(QUOTE T) => '(QUOTE T)
- -- copes with a particular Lucid-ism, God knows why
- -- This circular way of doing things is an attempt to deal with Lucid
- -- Who may place quoted cells in read-only memory
- z:=min first x
- if not EQ(z,first x) then x.first := z
- z:=min rest x
- if not EQ(z,rest x) then x.rest := z
- HashCheck x
- REFVECP x =>
- for i in 0..MAXINDEX x repeat
- x.i:=min (x.i)
- HashCheck x
- string? x => HashCheck x
- x
- HashCheck x ==
- y:=HGET($hash,x)
- y => y
- HPUT($hash,x,x)
- x
- x
-
-
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 1145b6c5..45a07b21 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -523,7 +523,6 @@ buildFunctor($definition is [name,:args],sig,code,$locals,$e) ==
[:codePart1,:codePart2,:codePart3],"$"]
$getDomainCode:= nil
--if we didn't kill this, DEFINE would insert it in the wrong place
- ans:= minimalise ans
SAY ['"time taken in buildFunctor: ",TEMPUS_-FUGIT()-oldtime]
ans
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot
index e3e99724..8c22be2e 100644
--- a/src/interp/sys-utility.boot
+++ b/src/interp/sys-utility.boot
@@ -35,6 +35,7 @@
import sys_-os
import vmlisp
+import hash
namespace BOOT
module sys_-utility where
@@ -285,6 +286,30 @@ hashTable cmp ==
error '"bad arg to hashTable"
MAKE_-HASH_-TABLE(KEYWORD::TEST,testFun)
+--% Trees to Graphs
+
+minimalise x ==
+ min(x,hashTable 'EQUAL) where
+ min(x,ht) ==
+ y := HGET(ht,x)
+ y => y
+ cons? x =>
+ z := min(first x,ht)
+ if not EQ(z,first x) then x.first := z
+ z := min(rest x,ht)
+ if not EQ(z,rest x) then x.rest := z
+ hashCheck(x,ht)
+ REFVECP x =>
+ for i in 0..MAXINDEX x repeat
+ x.i := min(x.i,ht)
+ hashCheck(x,ht)
+ string? x => hashCheck(x,ht)
+ x
+ hashCheck(x,ht) ==
+ y := HGET(ht,x)
+ y => y
+ HPUT(ht,x,x)
+ x
--% File IO
$InputIOMode == KEYWORD::INPUT