Skip to content

Commit

Permalink
0.8.6.36:
Browse files Browse the repository at this point in the history
	tidying...
	...fiddling with TRACE docs in anticipation of actually
		making it do PROFILEing as intended
	...small doc/ fixes
	...(re-?)deleted FOP-CHARACTER since it's still speculative
		generality (will presumably be added back when Unicode
		comes, but isn't helpful now, and would be only
		infinitesimally helpful then, since it's untested now
		and so easy to add then)
	...MORE LOC: broke some long lines
	...stdlog seemed to be unused.
  • Loading branch information
William Harold Newman committed Dec 12, 2003
1 parent 2ead789 commit 4f07ad7
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 31 deletions.
9 changes: 5 additions & 4 deletions doc/ffi.xml
Expand Up @@ -428,7 +428,7 @@ returns a pointer to the location specified by

<synopsis>(sb-alien:cast foreign-value new-type)</synopsis>

<para>The <function>sb-alien:cast</function>
<para>The <function>sb-alien:cast</function> macro
converts <varname>foreign-value</varname> to a new foreign value with the specified
<varname>new-type</varname>. Both types, old and new, must be foreign pointer,
array or function types. Note that the resulting Lisp
Expand Down Expand Up @@ -622,9 +622,10 @@ the operator <function>sb-alien:get-errno</function> to allow Lisp code to read
<para>
The <function>extern-alien</function> macro
returns an alien with the specified <type>type</type> which
points to an externally defined value. <varname>name</varname> is not evaluated,
and may be either a string or a symbol. <type>type</type> is
an unevaluated alien type specifier.
points to an externally defined value.
<varname>name</varname> is not evaluated,
and may be either a string or a symbol.
<type>type</type> is an unevaluated alien type specifier.
</para>

</sect2>
Expand Down
2 changes: 0 additions & 2 deletions src/code/fop.lisp
Expand Up @@ -123,8 +123,6 @@
#-sb-xc-host
(%primitive sb!c:make-other-immediate-type 0 sb!vm:unbound-marker-widetag))

(define-fop (fop-character 68)
(code-char (read-arg 3)))
;;; CMU CL had FOP-CHARACTER as fop 68, but it's not needed in current
;;; SBCL as we have no extended characters, only 1-byte characters.
;;; (Ditto for CMU CL, actually: FOP-CHARACTER was speculative generality.)
Expand Down
22 changes: 13 additions & 9 deletions src/code/ntrace.lisp
@@ -1,4 +1,4 @@
;;;; a tracing facility based on breakpoints
;;;; a tracing facility

;;;; This software is part of the SBCL system. See the README file for
;;;; more information.
Expand Down Expand Up @@ -497,8 +497,8 @@
"TRACE {Option Global-Value}* {Name {Option Value}*}*
TRACE is a debugging tool that provides information when specified functions
are called. In its simplest form:
(trace Name-1 Name-2 ...)
(The Names are not evaluated.)
(TRACE NAME-1 NAME-2 ...)
(The NAMEs are not evaluated.)
Options allow modification of the default behavior. Each option is a pair
of an option keyword and a value form. Global options are specified before
Expand Down Expand Up @@ -530,6 +530,7 @@
evaluates to true at the time of the call. :CONDITION-AFTER is
similar, but suppresses the initial printout, and is tested when the
function returns. :CONDITION-ALL tries both before and after.
This option is not supported with :REPORT PROFILE.
:BREAK Form
:BREAK-AFTER Form
Expand All @@ -544,13 +545,14 @@
In addition to the usual printout, the result of evaluating Form is
printed at the start of the function, at the end of the function, or
both, according to the respective option. Multiple print options cause
multiple values to be printed.
multiple values to be printed.
:WHEREIN Names
If specified, Names is a function name or list of names. TRACE does
nothing unless a call to one of those functions encloses the call to
this function (i.e. it would appear in a backtrace.) Anonymous
functions have string names like \"DEFUN FOO\".
functions have string names like \"DEFUN FOO\". This option is not
supported with :REPORT PROFILE.
:ENCAPSULATE {:DEFAULT | T | NIL}
If T, the tracing is done via encapsulation (redefining the function
Expand All @@ -563,11 +565,13 @@
:FUNCTION Function-Form
This is a not really an option, but rather another way of specifying
what function to trace. The Function-Form is evaluated immediately,
and the resulting function is traced.
and the resulting function is instrumented, i.e. traced or profiled
as specified in REPORT.
:CONDITION, :BREAK and :PRINT forms are evaluated in the lexical environment
of the called function; SB-DEBUG:VAR and SB-DEBUG:ARG can be used. The
-AFTER and -ALL forms are evaluated in the null environment."
:CONDITION, :BREAK and :PRINT forms are evaluated in a context which
mocks up the lexical environment of the called function, so that
SB-DEBUG:VAR and SB-DEBUG:ARG can be used. The -AFTER and -ALL forms
are evaluated in the null environment."
(if specs
(expand-trace specs)
'(%list-traced-funs)))
Expand Down
45 changes: 32 additions & 13 deletions src/compiler/generic/genesis.lisp
Expand Up @@ -716,20 +716,32 @@
(ecase sb!c:*backend-byte-order*
(:little-endian
(write-wordindexed des sb!vm:complex-double-float-real-slot low-bits)
(write-wordindexed des (1+ sb!vm:complex-double-float-real-slot) high-bits))
(write-wordindexed des
(1+ sb!vm:complex-double-float-real-slot)
high-bits))
(:big-endian
(write-wordindexed des sb!vm:complex-double-float-real-slot high-bits)
(write-wordindexed des (1+ sb!vm:complex-double-float-real-slot) low-bits))))
(write-wordindexed des
(1+ sb!vm:complex-double-float-real-slot)
low-bits))))
(let* ((imag (imagpart num))
(high-bits (make-random-descriptor (double-float-high-bits imag)))
(low-bits (make-random-descriptor (double-float-low-bits imag))))
(ecase sb!c:*backend-byte-order*
(:little-endian
(write-wordindexed des sb!vm:complex-double-float-imag-slot low-bits)
(write-wordindexed des (1+ sb!vm:complex-double-float-imag-slot) high-bits))
(write-wordindexed des
sb!vm:complex-double-float-imag-slot
low-bits)
(write-wordindexed des
(1+ sb!vm:complex-double-float-imag-slot)
high-bits))
(:big-endian
(write-wordindexed des sb!vm:complex-double-float-imag-slot high-bits)
(write-wordindexed des (1+ sb!vm:complex-double-float-imag-slot) low-bits))))
(write-wordindexed des
sb!vm:complex-double-float-imag-slot
high-bits)
(write-wordindexed des
(1+ sb!vm:complex-double-float-imag-slot)
low-bits))))
des))

;;; Copy the given number to the core.
Expand Down Expand Up @@ -1760,12 +1772,14 @@
(ash value -2)))
(:lui
(setf (bvref-32 gspace-bytes gspace-byte-offset)
(logior (mask-field (byte 16 16) (bvref-32 gspace-bytes gspace-byte-offset))
(logior (mask-field (byte 16 16)
(bvref-32 gspace-bytes gspace-byte-offset))
(+ (ash value -16)
(if (logbitp 15 value) 1 0)))))
(:addi
(setf (bvref-32 gspace-bytes gspace-byte-offset)
(logior (mask-field (byte 16 16) (bvref-32 gspace-bytes gspace-byte-offset))
(logior (mask-field (byte 16 16)
(bvref-32 gspace-bytes gspace-byte-offset))
(ldb (byte 16 0) value))))))
(:ppc
(ecase kind
Expand Down Expand Up @@ -1897,7 +1911,9 @@
forms))
(setf (svref *cold-fop-funs* ,code) #',fname))))

(defmacro clone-cold-fop ((name &key (pushp t) (stackp t)) (small-name) &rest forms)
(defmacro clone-cold-fop ((name &key (pushp t) (stackp t))
(small-name)
&rest forms)
(aver (member pushp '(nil t)))
(aver (member stackp '(nil t)))
`(progn
Expand Down Expand Up @@ -1929,8 +1945,6 @@

(define-cold-fop (fop-misc-trap) *unbound-marker*)

(define-cold-fop (fop-character)
(make-character-descriptor (read-arg 3)))
(define-cold-fop (fop-short-character)
(make-character-descriptor (read-arg 1)))

Expand Down Expand Up @@ -2806,13 +2820,18 @@
;; type things. We therefore don't export it, but instead do
#!+sparc
(when (boundp 'sb!vm::pseudo-atomic-trap)
(format t "#define PSEUDO_ATOMIC_TRAP ~D /* 0x~:*~X */~%" sb!vm::pseudo-atomic-trap)
(format t
"#define PSEUDO_ATOMIC_TRAP ~D /* 0x~:*~X */~%"
sb!vm::pseudo-atomic-trap)
(terpri))
;; possibly this is another candidate for a rename (to
;; pseudo-atomic-trap-number or pseudo-atomic-magic-constant
;; [possibly applicable to other platforms])

(dolist (symbol '(sb!vm::float-traps-byte sb!vm::float-exceptions-byte sb!vm::float-sticky-bits sb!vm::float-rounding-mode))
(dolist (symbol '(sb!vm::float-traps-byte
sb!vm::float-exceptions-byte
sb!vm::float-sticky-bits
sb!vm::float-rounding-mode))
(format t "#define ~A_POSITION ~A /* ~:*0x~X */~%"
(substitute #\_ #\- (symbol-name symbol))
(sb!xc:byte-position (symbol-value symbol)))
Expand Down
2 changes: 0 additions & 2 deletions src/runtime/runtime.c
Expand Up @@ -175,8 +175,6 @@ BSD-style licenses. See the CREDITS and COPYING files in the\n\
distribution for more information.\n\
", SBCL_VERSION_STRING);
}

FILE *stdlog;


int
Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Expand Up @@ -17,4 +17,4 @@
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
"0.8.6.35"
"0.8.6.36"

0 comments on commit 4f07ad7

Please sign in to comment.