aboutsummaryrefslogtreecommitdiff
path: root/src/interp/database.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/database.boot')
-rw-r--r--src/interp/database.boot22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/interp/database.boot b/src/interp/database.boot
index 036f536c..3f4ced20 100644
--- a/src/interp/database.boot
+++ b/src/interp/database.boot
@@ -677,6 +677,28 @@ markUnique x ==
x.rest := [u,:rest x]
rest x
+addConsDB x ==
+ min x where
+ min x ==
+ y:=HGET($consDB,x)
+ y => y
+ cons? x =>
+ for z in tails x repeat
+ u:=min first z
+ if not EQ(u,first z) then z.first := u
+ 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($consDB,x)
+ y => y
+ HPUT($consDB,x,x)
+ x
+ x
++ Tail of most function descriptors.
$FunctionDescriptorTail == '(NIL T ELT)