Initial revision
[sbcl.git] / src / compiler / late-vmdef.lisp
1 ;;;; a few things from the classic CMU CL "src/compiler/vmdef.lisp"
2 ;;;; file which couldn't be compiled early
3
4 ;;;; This software is part of the SBCL system. See the README file for
5 ;;;; more information.
6 ;;;;
7 ;;;; This software is derived from the CMU CL system, which was
8 ;;;; written at Carnegie Mellon University and released into the
9 ;;;; public domain. The software is in the public domain and is
10 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
11 ;;;; files for more information.
12
13 (in-package "SB!C")
14
15 (file-comment
16   "$Header$")
17
18 (defun note-this-location (vop kind)
19   #!+sb-doc
20   "NOTE-THIS-LOCATION VOP Kind
21   Note that the current code location is an interesting (to the debugger)
22   location of the specified Kind. VOP is the VOP responsible for this code.
23   This VOP must specify some non-null :SAVE-P value (perhaps :COMPUTE-ONLY) so
24   that the live set is computed."
25   (let ((lab (gen-label)))
26     (emit-label lab)
27     (note-debug-location vop lab kind)))
28
29 (defun note-next-instruction (vop kind)
30   #!+sb-doc
31   "NOTE-NEXT-INSTRUCTION VOP Kind
32    Similar to NOTE-THIS-LOCATION, except the use the location of the next
33    instruction for the code location, wherever the scheduler decided to put
34    it."
35   (let ((loc (note-debug-location vop nil kind)))
36     (sb!assem:emit-postit (lambda (segment posn)
37                             (declare (ignore segment))
38                             (setf (location-info-label loc) posn))))
39   (values))