/[cmucl]/src/hemlock/debug.lisp
ViewVC logotype

Diff of /src/hemlock/debug.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by ram, Mon Oct 31 04:50:12 1994 UTC revision 1.7.2.3 by pw, Sat Mar 23 18:50:42 2002 UTC
# Line 208  Line 208 
208          ;;          ;;
209          ;; Read our form, get form-number translations, get the source-path,          ;; Read our form, get form-number translations, get the source-path,
210          ;; and make it usable.          ;; and make it usable.
211          (let ((path (nreverse          ;;
212                       (butlast          ;; NOTE: Here READ is used in the editor lisp to look at a form
213                        (cdr          ;; that the compiler has digested in the slave lisp. The editor
214                         (svref (di:form-number-translations          ;; does not have the same environment at the slave so bad things
215                                 (with-input-from-region          ;; can happen if READ hits a #. reader macro (like unknown package
216                                     (s (region point (buffer-end-mark buffer)))          ;; or undefined function errors) which can break the editor. This
217                                   (read s))          ;; code basically inhibits the read-time eval. This doesn't always
218                                 tlf-offset)          ;; work right as the compiler may be seeing a different form structure
219                                form-number))))))          ;; and the compiler's version of PATH may not match the editor's.
220            ;; The main trouble seen in testing is that the 'form-number'
221            ;; supplied by the compiler was one more than what the vector
222            ;; returned by form-number-translations contained. For lack of a
223            ;; better solution, I (pw) just limit the form-number to legal range.
224            ;; This has worked ok on test code but may be off for some
225            ;; forms. At least the editor won't break.
226    
227            (let* ((vector (di:form-number-translations
228                            (with-input-from-region
229                                (s (region point (buffer-end-mark buffer)))
230                              (let ((*read-suppress* t))
231                                (read s)))
232                            tlf-offset))
233                   ;; Don't signal error on index overrun.It may be due
234                   ;; to read-time eval getting form editing blind to
235                   ;; editor
236                   (index (min form-number (1- (length vector))))
237                   (path (nreverse (butlast (cdr (svref vector index))))))
238            ;;            ;;
239            ;; Walk down to the form.  Change to buffer in case we get an error            ;; Walk down to the form.  Change to buffer in case we get an error
240            ;; while finding the form.            ;; while finding the form.

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.7.2.3

  ViewVC Help
Powered by ViewVC 1.1.5