|
2 | 2 |
|
3 | 3 | (in-package #:qvm-app-ng) |
4 | 4 |
|
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 | | - |
75 | 5 | (defun disable-debugger () |
76 | 6 | (sb-ext:disable-debugger)) |
77 | 7 |
|
|
0 commit comments