Skip to content

Commit 3666b53

Browse files
authored
Remove ZAP-INFO (#266)
It was a relic from the non-opensource days.
1 parent dbc76fc commit 3666b53

File tree

5 files changed

+0
-146
lines changed

5 files changed

+0
-146
lines changed

app-ng/src/impl/sbcl.lisp

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -2,76 +2,6 @@
22

33
(in-package #:qvm-app-ng)
44

5-
(defun %zap-info (&key (purge-xref t))
6-
(sb-vm::map-allocated-objects
7-
(lambda (obj tag size)
8-
(declare (ignore size))
9-
(cond
10-
((= tag sb-vm:code-header-widetag)
11-
(setf (sb-kernel:%code-debug-info obj) nil)
12-
(loop for fun = (sb-kernel:%code-entry-points obj)
13-
then (sb-kernel:%simple-fun-next fun)
14-
while fun
15-
do (cond
16-
((or purge-xref
17-
(stringp (sb-kernel:%simple-fun-info fun)))
18-
(setf (sb-kernel:%simple-fun-info fun) nil))
19-
((consp (sb-kernel:%simple-fun-info fun))
20-
(setf (sb-kernel:%simple-fun-info fun)
21-
(cdr (sb-kernel:%simple-fun-info fun)))))))
22-
((= tag sb-vm:instance-widetag)
23-
(cond ((typep obj 'method-combination)
24-
(setf (slot-value obj 'sb-pcl::%documentation) nil))
25-
((typep obj 'standard-method)
26-
(setf (slot-value obj 'sb-pcl::%documentation) nil))
27-
((typep obj 'class)
28-
(setf (slot-value obj 'sb-pcl::%documentation) nil))
29-
((typep obj 'sb-mop:standard-slot-definition)
30-
(setf (slot-value obj 'sb-pcl::%documentation) nil))))
31-
((and (= tag sb-vm:funcallable-instance-widetag)
32-
(typep obj 'generic-function))
33-
(setf (slot-value obj 'sb-pcl::%documentation) nil))))
34-
:dynamic)
35-
(sb-c::call-with-each-globaldb-name
36-
(lambda (name)
37-
(sb-int:clear-info :variable :documentation name)
38-
(sb-int:clear-info :type :documentation name)
39-
(sb-int:clear-info :type :source-location name)
40-
(sb-int:clear-info :typed-structure :documentation name)
41-
(sb-int:clear-info :setf :documentation name)
42-
(sb-int:clear-info :random-documentation :stuff name)
43-
(sb-int:clear-info :source-location :variable name)
44-
(sb-int:clear-info :source-location :constant name)
45-
(sb-int:clear-info :source-location :typed-structure name)
46-
(sb-int:clear-info :source-location :symbol-macro name)
47-
;; Doesn't exist in SBCL 1.4.7
48-
#+#:ignore
49-
(sb-int:clear-info :source-location :vop name)
50-
(sb-int:clear-info :source-location :declaration name)
51-
(sb-int:clear-info :source-location :alien-type name)
52-
;; Doesn't exist in SBCL 1.4.7
53-
#+#:ignore
54-
(unless (or (and (symbolp name)
55-
(find (package-name (symbol-package name))
56-
'("SB-KERNEL"
57-
"SB-PCL"
58-
"SB-IMPL")
59-
:test #'string-equal))
60-
(find name '((COMMON-LISP:SETF SB-PCL::CLOS-SLOTS-REF)
61-
QVM::NAT-TUPLE-CARDINALITY
62-
QVM::INJECT-BIT)
63-
:test #'equalp))
64-
(sb-int:clear-info :function :inline-expansion-designator name))
65-
;; TODO: package documentation
66-
;; package location
67-
)))
68-
69-
(defun zap-info ()
70-
(format t "~&Zapping info...~%")
71-
(%zap-info)
72-
(format t "~&Garbage collecting...~%")
73-
(sb-ext:gc :full t))
74-
755
(defun disable-debugger ()
766
(sb-ext:disable-debugger))
777

app/src/impl/clozure.lisp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
(in-package #:qvm-app)
44

5-
(defun zap-info ()
6-
;; No-op on Clozure
7-
)
8-
95
(defun start-shm-info-server (name length)
106
"Start a thread with a socket listening on the local socket
117
/tmp/<NAME>. For any incoming connection, read a single octet, then

app/src/impl/sbcl.lisp

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -2,76 +2,6 @@
22

33
(in-package #:qvm-app)
44

5-
(defun %zap-info (&key (purge-xref t))
6-
(sb-vm::map-allocated-objects
7-
(lambda (obj tag size)
8-
(declare (ignore size))
9-
(cond
10-
((= tag sb-vm:code-header-widetag)
11-
(setf (sb-kernel:%code-debug-info obj) nil)
12-
(loop for fun = (sb-kernel:%code-entry-points obj)
13-
then (sb-kernel:%simple-fun-next fun)
14-
while fun
15-
do (cond
16-
((or purge-xref
17-
(stringp (sb-kernel:%simple-fun-info fun)))
18-
(setf (sb-kernel:%simple-fun-info fun) nil))
19-
((consp (sb-kernel:%simple-fun-info fun))
20-
(setf (sb-kernel:%simple-fun-info fun)
21-
(cdr (sb-kernel:%simple-fun-info fun)))))))
22-
((= tag sb-vm:instance-widetag)
23-
(cond ((typep obj 'method-combination)
24-
(setf (slot-value obj 'sb-pcl::%documentation) nil))
25-
((typep obj 'standard-method)
26-
(setf (slot-value obj 'sb-pcl::%documentation) nil))
27-
((typep obj 'class)
28-
(setf (slot-value obj 'sb-pcl::%documentation) nil))
29-
((typep obj 'sb-mop:standard-slot-definition)
30-
(setf (slot-value obj 'sb-pcl::%documentation) nil))))
31-
((and (= tag sb-vm:funcallable-instance-widetag)
32-
(typep obj 'generic-function))
33-
(setf (slot-value obj 'sb-pcl::%documentation) nil))))
34-
:dynamic)
35-
(sb-c::call-with-each-globaldb-name
36-
(lambda (name)
37-
(sb-int:clear-info :variable :documentation name)
38-
(sb-int:clear-info :type :documentation name)
39-
(sb-int:clear-info :type :source-location name)
40-
(sb-int:clear-info :typed-structure :documentation name)
41-
(sb-int:clear-info :setf :documentation name)
42-
(sb-int:clear-info :random-documentation :stuff name)
43-
(sb-int:clear-info :source-location :variable name)
44-
(sb-int:clear-info :source-location :constant name)
45-
(sb-int:clear-info :source-location :typed-structure name)
46-
(sb-int:clear-info :source-location :symbol-macro name)
47-
;; Doesn't exist in SBCL 1.4.7
48-
#+#:ignore
49-
(sb-int:clear-info :source-location :vop name)
50-
(sb-int:clear-info :source-location :declaration name)
51-
(sb-int:clear-info :source-location :alien-type name)
52-
;; Doesn't exist in SBCL 1.4.7
53-
#+#:ignore
54-
(unless (or (and (symbolp name)
55-
(find (package-name (symbol-package name))
56-
'("SB-KERNEL"
57-
"SB-PCL"
58-
"SB-IMPL")
59-
:test #'string-equal))
60-
(find name '((COMMON-LISP:SETF SB-PCL::CLOS-SLOTS-REF)
61-
QVM::NAT-TUPLE-CARDINALITY
62-
QVM::INJECT-BIT)
63-
:test #'equalp))
64-
(sb-int:clear-info :function :inline-expansion-designator name))
65-
;; TODO: package documentation
66-
;; package location
67-
)))
68-
69-
(defun zap-info ()
70-
(format t "~&Zapping info...~%")
71-
(%zap-info)
72-
(format t "~&Garbage collecting...~%")
73-
(sb-ext:gc :full t))
74-
755
#+windows
766
(defun start-shm-info-server (name length)
777
;; TODO Better description?

build-app-ng.lisp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
(load-systems-table)
3434
(push #'local-system-search asdf:*system-definition-search-functions*)
3535
(asdf:load-system "qvm-app-ng")
36-
;; (funcall (read-from-string "qvm-app-ng::zap-info"))
3736
(funcall (read-from-string "qvm-app-ng::disable-debugger"))
3837
(when (find "--qvm-sdk" sb-ext:*posix-argv* :test 'string=)
3938
(load "app/src/mangle-shared-objects.lisp"))

build-app.lisp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
(load-systems-table)
3737
(push #'local-system-search asdf:*system-definition-search-functions*)
3838
(asdf:load-system "qvm-app")
39-
;; (funcall (read-from-string "qvm-app::zap-info"))
4039
(funcall (read-from-string "qvm-app::setup-debugger"))
4140
(when (find "--qvm-sdk" sb-ext:*posix-argv* :test 'string=)
4241
(load "app/src/mangle-shared-objects.lisp"))

0 commit comments

Comments
 (0)