Commit graph

44 commits

Author SHA1 Message Date
Stas Boukarev 5e6717f7e4 run-test: add -b as a shorthand for --break-on-failure 2026-02-25 01:31:51 +03:00
Christophe Rhodes 430495fb5f Allow compiling the system with coverage instrumentation
To build, pass `--with-sb-cover-for-internals` to make.sh

Test running scripts have been adapted; pass `--coverage` to
run-tests.sh and/or ansi-tests.sh to generate .coverage files, then
use a script like `cover-script.lisp` to generate a report.

Things that we need to fix:
- it's pretty slow (build time roughly doubles)
- the report is fairly ugly (and doesn't sort the sources in the way
  I would expect)
- it exposes some issue in combination with --with-sb-show
  Can't compute fixup relative to movable object
    #<code id=5419 [7] (FLET "PPRINT-BLOCK" :IN "SYS:SRC;CODE;WARM-ERROR.LISP") {1203AEC9BF..1203AED4A0}>
2025-11-21 18:25:03 +00:00
Stas Boukarev cacaf7e83e Add --slow for run-tests.sh to push :slow onto *features* 2023-01-28 18:31:28 +03:00
Jan Moringen 91e3e8ea76 tests: Fix typo in usage string of run-tests.sh 2016-08-04 21:25:52 +02:00
Jan Moringen 073eae269f tests: run-tests.sh accepts --evaluator-mode commandline option
Tests are run under the specified SB-EXT:*EVALUATOR-MODE*.
2015-10-31 17:44:51 +01:00
Stas Boukarev c6bbd001a8 Fix run-tests.sh on Solaris. 2013-11-03 14:57:06 +04:00
Stas Boukarev 8e6a4a018f Add --help to run-tests.sh. 2013-11-01 16:47:38 +04:00
Christophe Rhodes 9572928844 remove stray debugging code from condition-related patches 2013-04-14 06:49:57 +01:00
Alastair Bridgewater 7c773fca12 tests: Add --report-skipped-tests option to the test runner.
* It is occasionally useful to see precisely which tests are
skipped on a given target, and there was no obvious way to so do.
2011-12-05 09:33:43 -05:00
Richard M Kreuter a42922aef9 1.0.13.1: Various cleanups and touchups in tests/
* Tests written in shell modified to use shell functions, rather than
  variables, so that tests written in shell can run when the build
  directory's absolute pathname contains whitespace (as home
  directories might tend to on Windows).

* tests/subr.sh: new file, with some shell functions, variables, and
  settings to support the above.  Files in the test suite written in
  shell should source this file.

* Factored code for creating and cleaning up temporary directories for
  tests written in shell that touch the file system.  Test scripts
  written in shell should now call "use_test_subdirectory" to create
  and chdir to a test directory, and the shell should clean out the
  test directory at exit time.

* Most tests written in shell now quote filenames that derive from the
  truename of the current working directory or from an environment
  variable, as such names may contain whitespace.  (Variables set to
  non-offending constant strings in the script itself need not be
  quoted this way.)

* tests/filesys.test.sh was not prepared to deal with a TRUENAME that
  resolves all symbolic links in a pathname, as a soon-to-be-committed
  TRUENAME will; "/tmp" on MacOSX is a symbolic link to
  "/private/tmp".  POSIX pwd(1) takes a -P option to resolve symbolic
  links in the working directory's path, so we'll try that.

* Tests now supply --no-userinit, --no-sysinit arguments, so that we
  don't need to conditionalize these for win32.

* Some tests written in shell changed from using --eval <string> to
  heredocs, which allows the Lisp code the be formatted nicer and
  avoids some shell quotation headaches (not all, of course).

* Minor shell errors corrected in some tests.  Notable example:

    program; if [ $? != $value ]; then echo failed $?; fi

  Because "[" is a child process, after the test $? is set to the exit
  status of the "["; the exit status of "program" is lost.
2007-12-28 19:46:57 +00:00
Nikodemus Siivola 1acfa21e07 0.9.13.16: preliminary Windows installer builder
* Added "free software & no warranty" summary to top of COPYING.

 * tools-for-build/rtf.lisp turns COPYING into License.rtf needed
   for the installer.

 * tools-for-build/wxs.lisp generates the XML from which
   the installer is built.

 * refactor good-for-lisp pathname logic from make-target-contrib.sh
   to sbcl-pwd.sh.

 * make-windows-installer.sh builds sbcl.msi into output/,
   assuming WiX (2.0) is installed in $PROGRAMFILES/WiX or
   $WIX_PATH.

   The installer installs sbcl.exe, sbcl.core, and contribs
   into $PROGRAMFILES/Steel Bank Common Lisp/<sbcl-version>/
   by default, though the location is configurable.

   .lisp and .fasl files are associated with the installed
   SBCL, action being to start SBCL and load the file.

   The installation directory is added to PATH.

   SBCL_HOME is set to the installation directory.

   A shortcut is added to the start-menu. The shortcut refers
   to the core explicitly, and will continue to work even if
   a newer SBCL is installed.
2006-06-01 09:14:25 +00:00
Nathan Froyd 46a71b1cfa 0.9.9.17:
Unbreak the test suite by exporting SBCL_HOME from run-tests.sh.
	  SB-POSIX is now found as one might expect.
2006-02-07 02:21:43 +00:00
Christophe Rhodes 04d819bb1a 0.9.8.27:
Merge patch from James Bielman fixing self-build under Win32.
	... a little bit of an accident ensued; I ran
		canonicalize-whitespace on .sh files, which seemed to
		work (except on wc.sh) until it scribbled all over
		make.sh, confusing the shell interpreter utterly.
	... the resulting files have built the system, nevertheless.
2006-01-09 13:00:17 +00:00
Christophe Rhodes 9ce24dc604 0.9.4.75:
Remove one more AMOP incompatibility
	... COMPUTE-SLOTS on FUNCALLABLE-STANDARD-CLASS doesn't need to
		be different from the method on STANDARD-CLASS.
2005-09-18 10:55:11 +00:00
Juho Snellman 175c318c89 0.9.4.6:
Rewrite the test infrastructure to make it a bit more useful, without
        having to make major changes to the test files.

        Move most of run-tests.sh Lisp-side. New features:
        * Don't bail out at first failure (unless running with
          --break-on-failure)
        * Report failed tests at the end of the run
        * Tests can be marked as expected to fail on certain platforms
        * Tests can be named
        * A subset of test files to run can be specified on the command line

        Todo:
        * "Quis custodiet ipsos custodes?". Tests for the test framework.

        Changes to the tests:
        * Remove the explicit quits on success from the impure tests
          (handled by the test framework)
        * Mark some obvious cases as "expected to fail on FOO"

        Other:
        * Remove an (unrelated) fixed BUGS entry
2005-08-26 21:09:03 +00:00
Nathan Froyd 3fe0010d27 0.9.2.31:
Oops.  Revert broken 0.9.2.6 change.  Record a BUG for posterity.
	...fix the run-tests.sh script while we're at it, too.
2005-07-05 20:44:37 +00:00
Alexey Dejneka 00ac8aa578 0.9.1.40:
* COERCE for objects other than numbers and characters is not
          foldable (fix a bug reported by Nikodemus Siivola).
        * Set LC_ALL to "C" when building SBCL.
        * Set locale to "C" in run-tests.sh.
2005-06-13 11:05:44 +00:00
Nikodemus Siivola f4e8bca5ea 0.8.16.43: Fixes for various CLOS/MOP bugs
* Correct canonization of DEFCLASS slot options (also move
               checking to macroexpansion time of DEFCLASS, and do
               some trivial reorganization of the defclass.lisp to
               make the diff bigger then it really is.) (reported
               by Bruno Haible)
            * (SETF FIND-CLASS) with new-value that is a
               FORWARD-REFERENCED-CLASS. (reported by Bruno Haible)
            * CLASS-PROTOTYPE signals an error if the class is not yet
               finalized; also clean up some of the class-prototype
               machinery a bit. (reported by Bruno Haible)
            * ALLOCATE-INSTANCE for BUILT-IN-CLASS now a) exists b)
               signals an error.
            * Add tests & record an as-of-yet-unfixed bug.
2004-11-19 15:13:51 +00:00
Daniel Barlow b7a8f5313a 0.8.1.50
Alpha fixes before 0.8.2
	... correct type declaration for FOREIGN-SYMBOL-ADDRESS-AS-INTEGER
   	    (add N-MACHINE-WORD-BITS to all backends for this purpose)

        ... correct argument order in the depths of DATA-VECTOR-SET-C/
	    (DEF-SMALL-DATA-VECTOR-FROBS), so Alpha now passes bit
	    array tests

	run-tests.sh now prints the filename of the failing test just
	before stopping, which should save on the effort required to
	misinterpret the backtrace

	delete final full stop from  "  cd tests && sh ./run-tests.sh."
        in make.sh so I can triple-click the line to do exactly that

	commit patch for BASE-CHAR-COMPARE/C that Christophe sent me
	(alpha/char.lisp).  I hope this is what he wanted ...
2003-07-21 00:57:05 +00:00
Christophe Rhodes c68bb6b62d 0.8.0.15:
A couple more minor fixes:
	... LOOP FOR ... FROM ... can apparently accept complex numbers
		in some cases.  Ew.  Make it so, but attempt to limit
		the damage by still providing compile-time diagnostics
		where possible.
	... disassemble FUCOM on x86 correctly.  (thanks to Raymond Toy)
	... unBAshify test script.  (thanks to Henrik Motakef)
2003-05-29 12:28:01 +00:00
Christophe Rhodes 0957d59ccf 0.7.10.17:
Adjust test file running environment so that *.pure.lisp tests
		are run with assertoid loaded.
	... give assertoid its own package
	... use it in run-tests.sh for *.pure.lisp
	... also use it where applicable in *.impure.lisp
2002-12-12 11:47:36 +00:00
William Harold Newman 1026ecf53d 0.7.7.38:
tweaked core.test.sh to stop using .sbclrc (and so not to blow
		up when .sbclrc loads old .fasl files with a fasl file
		version different from the version expected by the new
		build of SBCL)
2002-09-22 13:01:24 +00:00
William Harold Newman ce7ae6fa75 0.7.7.32:
added test case for can't-run-saved-.core bug
2002-09-19 17:26:53 +00:00
William Harold Newman f0d5111300 0.7.4.15:
changed --noprogrammer behavior to support people building
		interactive cores noninteractively...
	...renamed --noprogrammer to --disable-debugger
	...defined SB-EXT:DISABLE-DEBUGGER and SB-EXT:ENABLE-DEBUGGER
2002-06-06 14:08:09 +00:00
Christophe Rhodes 0d669e68a1 0.7.1.1:
Merged	support for SPARC/SunOS (aka Solaris)
	... added relevant runtime and	-os.lisp files;
	... cleaned up sparc backend runtime,	actually _using_ the
		abstractions	that were written for the SPARC/Linux
		port;
	... added some	#includes for compilation (nothing breaks on
		Linux, but BSD has not yet been tested;
	... removed some bash-/ksh-isms from build and test scripts;
	... abstraced wait3() constants into grovel_headers and
		unix.lisp.
2002-03-25 18:25:03 +00:00
William Harold Newman a92c91a4fd 0.pre7.128:
MNA "patch for bug 105 and some other cleanups" (sbcl-devel
		2002-01-13)...
	...fixed bug 105: made (DESCRIBE 'STREAM-READ-CHAR) work right
		even when there're no methods on the GF yet
	...tweaked format of DESCRIBE of methods, simplifying
		GENERIC-FUNCTION-PRETTY-ARGLIST stuff
	...tidied up tests/ stuff, deleting temporary files after use
	...deleted BUGS entries (105 entry, and stale 99 entry too)
	tweaked MNA patch...
	...explicitly saying "It has no methods." for bare GF
2002-01-13 23:33:01 +00:00
William Harold Newman d1c237164f 0.pre7.62:
added first draft of tests/*clocc-ansi* stuff
	applied Alexey Dejneka's fixes from sbcl-devel 2001-10-13..
	..exported RETURN-PC-SAVE-OFFSET from SB!VM as per
		"broken debugger" message
	..fixed PARSE-COMPILED-DEBUG-BLOCKS along the lines of
		"debugger errors" message (DEBUG-FUNCTION vs.
		DEBUG-FUN, argh!)
	s/about-to-modify/about-to-modify-symbol-value/
	INDEX is in SB-INT now, so it doesn't need package prefixes
		anywhere any more.
	exported SC-OFFSET from SB-C
2001-10-14 00:08:38 +00:00
William Harold Newman 5108495b13 0.6.12.7.flaky1.2:
(This version seems not to be flaky any more, and so should
		be the end of the flaky1 branch: I'm just checking
		it in in preparation for "cvs update -j flaky1" or some
		such thing to merge the changes back into the main
		branch.)
	tweaked run-tests.sh machinery to use an absolute path for
		SBCL, on general principles and specifically so that
		Dan Barlow's new ENSURE-DIRECTORIES-EXIST tests can run
	made (UNIX-NAMESTRING "") equivalent to (UNIX-NAMESTRING "."),
		as the simplest way to make ENSURE-DIRECTORIES-EXIST
		work for relative pathnames. (As per Dan's 2001-05-18
		sbcl-devel mail, it can't be ANSI conforming until
		*DEFAULT-PATHNAME-DEFAULTS* is made ANSI, and that's
		too messy for now, so just do the simple thing.)
	dropped search list support from UNIX-NAMESTRING while I was
		at it, since search lists ain't supported no more
	removed undocumented hardly-used EXECUTABLE-ONLY arg from
		UNIX-NAMESTRING, moving the "is it executable?" test
		into run-program.lisp
	removed REMOVEME stuff
2001-05-19 00:13:14 +00:00
William Harold Newman c8322df812 0.6.12.7.flaky1.1:
(As per Daniel Barlow sbcl-devel 2001-05-17, the removal of
		the mysterious "" special case in UNIX-STAT will
		probably keep this version from building itself,
		so I didn't even try. It does, however, at least
		do "sh run-tests.sh" successfully.)
	fixed declaration in %EXTRACT-STAT-RESULTS so that the
		system won't have to interpret the alien reference
		at runtime on every call to the function
	I found how to fix the boot/gencgc/purify problem which was
		leaving initial-function unmapped -- I could copy
		current_region_free_pointer into
		boxed_region.free_pointer just before
		gc_alloc_update_page_pages() in save.c. However,
		that left me with other flaky GC problems. So I gave
		up my GC hacking in this version as a bad job, and
		copied original 0.6.12.7 GC-related files over
		the modified versions: gencgc.c, save.c, purify.c,
		gc.lisp, save.lisp
	made %EXTRACT-STAT-RESULTS inline to suppress an apparent
		memory corruption bug
2001-05-18 13:22:50 +00:00
William Harold Newman f2aa2d01b8 0.6.12.7:
Make sure that we "mkdir output/" before we use it in the build
		process. (MNA pointed out that we used it before we
		made it.)
	Use "uname -m" to figure out sbcl_arch default.
	merged MNA PCL fixes from sbcl-devel 2001-05-09 (including
		port of Pierre Mai's method combination fixes from
		cmucl-imp 2001-04-26)
	added regression test for method combination fix
	Bug 14 was mostly fixed already: the problem with
		INVALID-METHOD-ERROR complaining about being outside
		a method combination function went away some time ago.
		The MNA/Mai patch above improves method combination
		error reporting further, so it's definitely time
		to retire 14 from BUGS.
2001-05-10 15:18:02 +00:00
William Harold Newman f0338f6fa7 0.6.11.36:
added support for --noprogrammer command line option
	tweaked tests/*.test.sh stuff to use the most recently built
		SBCL in the current tree (as other tests/* stuff does)
	renamed some FD-STREAM stuff to be more explicit
	PICK-BACKUP-NAME and ENSURE-ONE-OF needn't be so general.
	reduced generality of BEEP too
	ENSURE-ONE-OF should signal a TYPE-ERROR.
	converted some other CERRORs to ERRORs; redid OPEN errors
	rearranged error output to use pretty printer more
2001-04-15 00:24:44 +00:00
William Harold Newman 6c765578c8 0.6.11.34:
eliminated distinction between ordinary optimization policy
		and *INTERFACE-POLICY*
	eliminated *INTERFACE-POLICY* stuff, including INTERFACE flags
		to IR1-CONVERT-AUX-BINDINGS, IR1-CONVERT-LAMBDA-BODY,
		IR1-CONVERT-SPECIAL-BINDINGS
	converted &OPTIONAL args in IR1-CONVERT-LAMBDA-BODY to &KEY
	*POLICY-BASIC-QUALITIES* becomes *POLICY-QUALITIES*
	merged redundant OPTIMIZATION-QUALITY-P and
		POLICY-QUALITY-NAME-P
	(Bug 87 was fixed by getting rid of interface policy stuff.)
	merged nearly-irrelevant SB-INSPECT package into SB-IMPL
	rearranged new function definition vs. declaration type
		checking, so that the compiler won't die when
		(DECLAIM (FTYPE FUNCTION F)) (DEFUN F ..)
	removed src/compiler/c.log (>10-year-old log file)
	added *.impure-cload.lisp category of tests, and moved
		compiler-1.impure.lisp to that category so that
		it's compiled as it should be
2001-04-07 17:23:13 +00:00
William Harold Newman ce02ab2ecd 0.6.11.13:
converted SIMPLE-/COMPLEX- -INTERSECTION to -INTERSECTION2
	reviewed old SIMPLE-/COMPLEX- -INTERSECTION methods to make
		them OK in the new world
	made TYPE-INTERSECTION2 and TYPE-APPROX-INTERSECTION2 for
		some things which used to call TYPE-INTERSECTION
	made new with-&REST-list TYPE-INTERSECTION to replace
		MAKE-INTERSECTION-TYPE-OR-SOMETHING
	HIERARCHICAL-INTERSECTION is more descriptive than
		VANILLA-INTERSECTION.
	deleted unused SIMPLIFY2 stuff
	deleted unused TYPE-INTERSECT and VALUES-TYPE-ALLOWP
	Pure BOOLEAN TYPE-ENUMERABLE is too much trouble; relax to
		generalized boolean instead.
	tweaked DEFUN-CACHED so that it will work early in cold init
		(if some clueless bozo happens to mess up types so
		badly that it gets called early in cold init:-)
	Now the AND type translator can just use TYPE-INTERSECTION.
	added *SOFT-HEAP-LIMIT*
	removed some unused symbols in SB!UNIX
	tweaked /SHOW0 to automatically stringify and concatenate its
		arguments, to abbreviate an idiom that I use a lot
	wrote /HEXSTR0 to abbreviate another idiom
	defined /PRIMITIVE-PRINT to abbreviate another idiom
	DO-LOAD-TIME-CODE-FIXUP and DO-LOAD-TIME-VALUE-FIXUP are
		only needed at cold init.
	added tests/type.after-xc.lisp and tests/type.before-xc.lisp
	upgraded SB-XC:TYPEP to handle (TYPEP #(1 2 3) 'VECTOR) etc.
	Intersection with *EMPTY-TYPE* and *UNIVERSAL-TYPE* should
		behave (and be commutative).
	Guard against some type method operations on *. (easier than
		worrying about them, or trying to make them right..)
	moved STYLE-WARN and friends to SB-INT to eliminate thought
		about whether they're visible e.g. in ir1tran.lisp
	tripped over bug 84
	made SB!C-CALL use SB!INT and SB!EXT so I can use /SHOW0 et al.
	DEF-PRIMITIVE-TYPE stuff can become !DEF-PRIMITIVE-TYPE.
	DEF-BOUNDED-TYPE and DEFINE-FLOAT-FORMAT can become
		!DEF-BOUNDED-TYPE and !DEFINE-FLOAT-FORMAT.
	moved DEFTYPE FLOAT-FORMAT earlier so that it's visible in
		early-type.lisp (for NUMERIC-TYPE FORMAT slot :TYPE)
	moved LIST, CONS, and NULL classes earlier in *BUILT-IN-CLASSES*
		to try to help with RATIO cold init problem
	removed pre-ANSI keyword-only stuff in ARG-INFO-KEYWORD and
		in various &KEY-related error messages and symbol names
	bug 12 fixed: (SUBTYPEP 'KEYWORD 'SYMBOL)=>T,T
	added INTERSECTION-TYPE support to CTYPEP
2001-03-12 13:47:43 +00:00
William Harold Newman 53e7a02c81 0.6.11.12:
moved !PACKAGE-COLD-INIT earlier in cold init so that KEYWORDP
		will work earlier
	tidied up UNIX-SIGNAL machinery: no more DEFCONSTANTs,
		no more re-interning, no more descriptions
	tweaked RUN-PROGRAM to use UNIX-SIGNAL-NUMBER function instead
		of old bare SIGFOO constants
	It's easier and nicer just to coerce all RUN-PROGRAM args
		than to require that they be SIMPLE-STRINGs.
	made test/*.test.sh use local sbcl, not installed sbcl, just
		as other tests do
2001-03-05 01:30:08 +00:00
William Harold Newman 4a4f1e5ca7 0.6.11.7:
hacking on 0.6.11.5 patches, continued..
	..MAKE-HASH-TABLE :TEST #'EQUAL uses 'EQUAL instead.
	..tested that PRINT-PRETTY-ON-STREAM? stuff doesn't get
		confused on Gray streams
	..added test case for new byte compiler bug
	..removed extra DUP in patched GENERATE-BYTE-CODE-FOR-SET
	new DEFCONSTANT cleanups, as per AL, sbcl-devel, 2001-02-27
	Wrapping DEFCONSTANT +EMPTY-HT-SLOT+ in EVAL-WHEN seems to
		cause problems, so instead I moved the +EMPTY-HT-SLOT+
		definition 'way early in stems-and-flags.lisp-expr.
2001-03-01 16:00:12 +00:00
William Harold Newman 92f6ecdad2 0.6.10.11:
fixed problem pointed out by Raymond Wiker: DEFCONSTANT-EQX
		now EVALs EXPR only once per situation
	tweaked some compiler output for better line breaking
2001-02-07 20:04:34 +00:00
William Harold Newman bbfeb9a341 0.6.10.7:
merged MNA "minor patches" collection (sbcl-devel 2000-01-25):
		logical pathname support for LOAD-1-FOREIGN, and
		changes in regression tests (reflect 0.6.10.5 change,
		new tests for Gray streams, and fix reader test)
	fixed run-tests.sh to check all *.pure.lisp (not just one!)
2001-01-25 18:31:50 +00:00
William Harold Newman 675c5a9f9e 0.6.8.25:
redid DEFMETHOD macroexpansion, fixing bug 9 (problems with
		IGNORE/IGNORABLE declarations) and generally
		tidying up
	added copyright boilerplate to tests/*.lisp
2000-11-24 18:33:50 +00:00
William Harold Newman d7b0817586 0.6.7.20: removed DEFTRANSFORMs for some consing string operations 2000-10-20 19:23:10 +00:00
William Harold Newman 06cb0db045 0.6.7.19: added stop-compiler-crash patch from Martin Atzmueller 2000-10-20 18:05:09 +00:00
William Harold Newman cc1f30efe1 cleanup related to RAW's port of RUN-PROGRAM:
comment fixes

resurrected SB-UNIX:UNIX-DUP, SB-UNIX:UNIX-IOCTL, and
SB-UNIX:UNIX-PIPE from old cmucl-2.4.8 sources (They'd been
deleted before 'cause nothing used them, but now RUN-PROGRAM
uses them.)

wrote simple regression test for RUN-PROGRAM

fixed dumb bug in QUIT :UNIX-STATUS (which had been exercised by
RUN-PROGRAM regression test)

made the "--noprint" option bind *LOAD-VERBOSE* to NIL (to help write
friendly-to-Unix-pipeline test programs, to help write regression
tests)
2000-09-27 13:25:20 +00:00
William Harold Newman e4eb979046 primarily intending to integrate Colin Walter's O(N) map code and
fixing BUTLAST (but doing some other stuff too, since achieving the
primary objective involved a lot of inspecting other code):

another revision of MAP stuff, part I:
  * I switched over to code inspired by Colin Walters' O(N) MAP
    code (from the cmucl-imp mailing list 2000 Sep 02) for the
    general non-DEFTRANSFORM case.
  * HIGH-SECURITY-SUPPORT error checking logic goes away, pending
    part II
  * I made some  miscellaneous cleanups of old arity-1 code too.
  * The old MAP-FOR-EFFECT, MAP-TO-LIST, and MAP-TO-SIMPLE macros,
    and the old functions MAP-WITHOUT-ERRORCHECKING, and
    GET-MINIMUM-LENGTH-SEQUENCES go away.
  * The old #+!HIGH-SECURITY length-checking logic goes
    away, to be replaced by stuff in part II.
  * New O(N) functions %MAP-FOR-EFFECT, %MAP-TO-LIST, and
    %MAP-TO-VECTOR are added, and MAP is redefined in terms of them.
  * Add a note pointing out that since MAP-INTO has not been
    rewritten to take advantage of all the new mapping technology,
    it's still slow.
  * Delete no-longer-used ELT-SLICE macro.

another revision of MAP stuff, part II: Peter Van Eynde might go into
a killing frenzy, or at least his ansi-test suite will gnaw SBCL to
death, unless we raise type errors on length mismatches like
  (MAP '(SIMPLE-VECTOR 128) #'+ #(1 2) #(1 1)).
How to do this without clobbering efficiency? More DEFTRANSFORMs, I
think..
  * MAP becomes a wrapper around %MAP. %MAP doesn't do this
    kind of length checking, MAP does. The old DEFUN MAP,
    DEFKNOWN MAP, and DEFTRANSFORM MAP stuff all turns into
    corresponding definitions for %MAP. The wrapper is
    implemented both as a DEFUN MAP and a DEFTRANSFORM MAP.
  * Now make DEFTRANSFORM MAP smarter:
    ** If necessary, check at runtime that ARRAY-DIMENSION
       matches what we pull out of SPECIFIER-TYPE.
    ** No test is done when SPEED > SAFETY.
    ** No test is needed when we can tell at compile time that
       the result type doesn't specify the length of the result.
  * Also add the same kind of ARRAY-DIMENSION/SPECIFIER-TYPE runtime
    check to DEFUN MAP.
  * While I'm at it, since DEFTRANSFORM MAP needs to think hard about
    the type of the result anyway, it might as well declare what
    it's figured out (TRULY-THE) to benefit any code downstream.

Start playing with MAP regression tests. Add tests/assertoid.lisp to
support future regression tests.

Once I started using the QUIT :UNIX-CODE keyword argument in my test
cases, I could see that it isn't very mnemonic. So I changed it to the
more-descriptive name :UNIX-STATUS, leaving the old name supported but
deprecated.

Oops! The old DEFTRANSFORM MAP (now DEFTRANSFORM %MAP) should really
only be done when (>= SPEED SPACE), but it wasn't declared that way.

While looking for an example of a DEFTRANSFORM with &REST arguments
to use as a model for the code in the new DEFTRANSFORM from MAP to
%MAP, I noticed that the problem of taking a list of names and
generating a corresponding list of gensyms is solved in many different
places in the code, in several ways. Also, the related problem of just
creating a list of N gensyms is solved in several places in in the
code. This seems unnecessarily error-prone and wasteful, so I went
looking for such cases and turned them into calls to MAKE-GENSYM-LIST.

another revision of MAP stuff, part III:
  * Search for 'map' in the output from clocc ansi-tests/tests.lisp,
    to check that the new MAP code isn't too obviously broken.
  * Add some regression tests in test/map.impure.lisp.

Oops! The various %MAP-..-ARITY-1 helper functions expect a function
argument, but DEFTRANSFORM MAP can call them passing them a function
name instead.
  * Change the helper functions so that they can handle
    function names as arguments.
  * Define %COERCE-CALLABLE-TO-FUNCTION to help with this. Note that
    this seems to be what %COERCE-NAME-TO-FUNCTION meant long ago,
    judging from DEFTRANSFORM %COERCE-NAME-TO-FUNCTION; so
    appropriate that DEFTRANSFORM for %COERCE-CALLABLE-TO-FUNCTION.
  * Use %COERCE-CALLABLE-TO-FUNCTION elsewhere that expressions
    involving %COERCE-NAME-TO-FUNCTION were used previously.

deleted the old commented-out version of DEFMACRO HANDLER-CASE
(since it was marked "Delete this when the system is stable.":-)

deleted the old commented-out version of GEN-FORMAT-DEF-FORM,
since it was supposed to be safe to do so after sbcl-0.6.4

I removed the apology for not using PRINT-OBJECT everywhere in the
printer from the bugs list in the man page, since it seems to be
rather tricky to construct a test case which exposes the system's
non-PRINT-OBJECT-ness without the test case itself violating the ANSI
spec.

I updated, cleaned up, or removed outright some other outdated or
confusing entries in the BUGS file and from the bugs list on the man
page.

Now that BUTLAST no longer blows up on the new problem cases a la
(BUTLAST NIL -1), I wonder whether I could stop it from blowing
up on the old problem cases a la (BUTLAST NIL)? It looks like
a compiler problem, since the interpreted definition of BUTLAST works,
even though the compiled one doesn't. In fact, it's a declaration
problem, since LENGTH is set to -1 when LIST=NIL, but is declared
as an INDEX. (Of course it's likely also a compiler problem, since
the compiler is supposed to signal type errors for this kind of
declaration error.) I fixed the misdeclaration, and noted the
possible compiler bug in BUGS.

After writing the new revised weird type declarations for the
not-necessarily positive LENGTH, and writing explanatory comments,
  ;; (Despite the name, LENGTH can be -1 when when LIST is an ATOM.)
for each of the cut-and-pasted (LET ((LENGTH ..)) ..) forms in BUTLAST
and NBUTLAST, I said "screw it" -- no, that's not it, I quoted Martin
Fowler and Kent Beck: "If you see the same code structure in more than
one place, you can be sure that your program will be better if you
find a way to unify them," and "It's surprising how often you look at
thickly commented code and notice that the comments are there because
the code is bad." So I just rewrote BUTLAST and NBUTLAST. Hopefully
the new versions will be better-behaved than the old ones.

Now that the INDEX type is used in DEFUN MAKE-GENSYM-LIST, which
belongs in early-extensions.lisp, INDEX should be defined before
early-extensions.lisp, i.e. earlier than its current definition in
early-c.lisp. Move it to early-extensions.lisp. Then to make that
work, since DEF!TYPE is used to define INDEX, defbangtype.lisp needs
to precede early-extensions.lisp in stems-and-flags.lisp-expr; so move
it. Also, INDEX is defined in terms of SB!XC:ARRAY-DIMENSION-LIMIT, so
early-array.lisp needs to move before the new location of
defbangtype.lisp. And then early-vm.lisp needs to move before that, so
I might as well move the rest of the early-vm-ish stuff back too. And
then DEFTYPE is used before deftype.lisp, so I need to change DEFMACRO
DEF!TYPE to DEF!MACRO DEF!TYPE, so I need to move defbangmacro.lisp
before deftype.lisp. (This is like a trip down memory lane to the
endless tweaks and recompiles it took me to find and unravel the
twisted order dependencies which make CMU CL unbootstrappable. Ah,
those were the days..:-)

The DEFTYPEs for INDEX and POSN in early-assem.lisp duplicate
the functionality of the SB-KERNEL:INDEX type.
  * Change uses of the SB-ASSEM::POSN type to uses of the INDEX type.
  * Delete the SB-ASSEM::POSN type and the SB-ASSEM::MAX-POSN constant.
  * Move SB-KERNEL:INDEX into SB-INT, since it's not really
    just a kernel-level thing, but makes sense for implementing
    user-level stuff in SB-INT and SB-EXT and SB-C (and SB-ASSEM).
  * Grep for all '[a-z]:+index[^-a-z]' and rename them (or just
    remove prefixes) to match new SB-INT-ness of INDEX.
  * Make the SB-ASSEM package use the SB-INT package; delete
    the SB-ASSEM::INDEX type and SB-ASSEM::MAX-INDEX constant.
    And since as a rule anything which can see SB-INT deserves
    to see SB-EXT too, make SB-ASSEM use SB-EXT as well.
2000-09-22 15:21:23 +00:00
William Harold Newman 6d9ecc45cb added various /SHOW0-ish statements to help when debugging internal
error handling

The MAKE-SPECIALIZABLE-ARRAY call in DEFUN INTERNAL-ERROR-ARGUMENTS
can become MAKE-ARRAY, since M-S-A is something to make it easier to
build parts of the cross-compiler under the cross-compilation host,
and DEFUN INTERNAL-ERROR-ARGUMENTS is in x86-vm.lisp, which is not
part of the cross-compiler, and so is never compiled by the
cross-compilation host.

changed MAKE-VALID-LISP-OBJ from a MACROLET macro to a global
function, for clarity and easier debugging

deleted unused SET-VALUE macro from MACROLET in DEFERR

deleted code marked REMOVEME, accidentally left over from previous
debugging exercises

changed CONTEXT-PC-ADDR, CONTEXT-PC, CONTEXT-REGISTER-ADDR, and
CONTEXT-REGISTER functions to use unsigned representations instead of
signed representations, to conform to implicit assumptions in the
debug-int code inherited from CMU CL. (Without this, new type errors
are generated in infinite regress when we try to handle errors
involving negative fixnums, e.g. (BUTLAST NIL -1).)

tweaked stuff in test/ directory a little bit in anticipation of
setting up real regression tests
2000-09-20 18:50:02 +00:00
William Harold Newman a530bbe337 Initial revision 2000-09-18 01:26:16 +00:00