sbcl.git
12 years agoA git-only SBCL workflow
Nikodemus Siivola [Mon, 6 Jun 2011 06:48:08 +0000 (09:48 +0300)]
A git-only SBCL workflow

 This updates the SBCL build and release process to be more compatible
 with distributed development -- to facilitate moving the upstream
 repository into Git.

 A detailed description of what is going on here is in
 doc/GIT-WORKFLOW.md.

 Some highlights:

  * Drop version.lisp-expr and branch-version.lisp-expr.

  * Auto-generate the version at build time using information
    from Git, incorporating:
    - Last release number.
    - Number of commits on origin/master since last release.
    - Current branch, if there are commits not on origin/master.
    - Number of commits not on origin/master.
    - SHA1 id of the last commit.
    - Optional -dirty marker.

  * Update release.sh to work with Git.

  * Make source-distribution.sh exclude the .git directory from tarballs.

  * Release tags contain NEWS for that release.

13 years ago1.0.49: Will be tagged as sbcl_1_0_49
Juho Snellman [Sun, 5 Jun 2011 23:03:38 +0000 (23:03 +0000)]
1.0.49: Will be tagged as sbcl_1_0_49

13 years ago1.0.48.35: SB-EXT:GC-LOGFILE
Nikodemus Siivola [Mon, 30 May 2011 12:00:19 +0000 (12:00 +0000)]
1.0.48.35: SB-EXT:GC-LOGFILE

  GENCGC only.

  (SETF SB-EXT:GC-LOGFILE) to a pathname starts logging before/after
  generation statistics there. Doing the same with NIL stops logging.

13 years ago1.0.48.34: MAKE-ALIEN-STRING
Nikodemus Siivola [Mon, 30 May 2011 11:59:18 +0000 (11:59 +0000)]
1.0.48.34: MAKE-ALIEN-STRING

 An easy way to copy lisp strings to malloc'ed memory.

 I can't believe we didn't have this before. ...just seems
 insane. I keep expecting to find a nice way to do this
 squirreled away somewhere in SB-ALIEN. Here's hoping I won't
 embarrass myself by finding one.

 Also fix the OAOOM in MAKE-ALIEN and FREE-ALIEN documentation: make
 the docstrings the canonical versions, and include them in the
 manual.

13 years ago1.0.48.33: --script bits and pieces
Nikodemus Siivola [Mon, 30 May 2011 00:21:03 +0000 (00:21 +0000)]
1.0.48.33: --script bits and pieces

 * Leaving out the script name means to read the script from standard
   input. In this case the shebang line is _not_ handle -- simply
   because I ran out steam. (Our shebang line processing assumes a
   seekable stream.)

 * Stream errors on standard streams cause scripts to exit silently.
   lp#770222.

 * Scripts no longer us *TTY* for *TERMINAL-IO*, but make up a two-way
   stream from *STDIN* and *STDOUT*. Similarly for *DEBUG-IO* but
   using *STDERR*. This means that backtraces from errors are now
   neatly captured in the standard error stream.

13 years ago1.0.48.32: NEWS
Nikodemus Siivola [Sun, 29 May 2011 22:01:50 +0000 (22:01 +0000)]
1.0.48.32: NEWS

 Wrap to 78 cols, add the missing entries for .31 and .23.

13 years ago1.0.48.31: WITH-LOCKED-SYSTEM-TABLE
Nikodemus Siivola [Sun, 29 May 2011 21:49:45 +0000 (21:49 +0000)]
1.0.48.31: WITH-LOCKED-SYSTEM-TABLE

  Instead of disabling interrupts in user code that needs
  WITH-LOCKED-HASH-TABLE, have a separate WITH-LOCKED-SYSTEM-TABLE
  that does so.

  Use it instead of WITH-LOCKED-HASH-TABLE for all internals.

13 years ago1.0.48.30: adjust DOCUMENTATION and SB-INTROSPECT
Nikodemus Siivola [Sun, 29 May 2011 21:13:40 +0000 (21:13 +0000)]
1.0.48.30: adjust DOCUMENTATION and SB-INTROSPECT

 Now that non-standard special operators can also have macro
 definitions for consumption by code walkers, make sure we get the
 special operator source location and documentation instead of the
 ones for the dummy macro.

13 years ago1.0.48.29: better end-of-the-world handling
Nikodemus Siivola [Sat, 28 May 2011 15:23:28 +0000 (15:23 +0000)]
1.0.48.29: better end-of-the-world handling

 * Implicit QUIT.

 * Make sure we have %END-OF-THE-WORLD visible while doing cleanups.

 * Handle errors from cleanups.

 * Disable interrupts in places where the environment might now be up to
   handling them yet/anymore.

 * If user calls QUIT, and exit hooks run without serious trouble, report the
   exit status requested even if there is trouble later flushing streams, etc.

 * Also make SAVE-LISP-AND-DIE signal an error if SAVE returns. (When there is
   eg. a file with the desired name but insufficient permissions.)

13 years ago1.0.48.28: make TRULY-THE macroexpandable
Nikodemus Siivola [Sat, 28 May 2011 12:27:36 +0000 (12:27 +0000)]
1.0.48.28: make TRULY-THE macroexpandable

  lp#771673

  * MACRO-FUNCTION no longer checks :FUNCTION :KIND, allowing us to have
    special operators with macro-expansions in the first place.

  * Add %MACROEXPAND and %MACROEXPAND which are careful not to expand special
    forms, and use them in place of SB!XC:MACROEXPAND.

  * Set the :FUNCTION :MACRO-FUNCTION into an expander that just converts
    it to THE. This only happens when someone explicitly calls MACROEXPAND
    or uses MACRO-FUNCTION directly -- never in the compiler.

  * Also add a SETF-expander.

13 years ago1.0.48.27: sb-posix: make syscall errors report the failing function
Nikodemus Siivola [Fri, 27 May 2011 10:55:11 +0000 (10:55 +0000)]
1.0.48.27: sb-posix: make syscall errors report the failing function

  Also add a declaim for the SYSCALL-ERROR ftype so the failing function will
  not be tail-merged is SYSCALL-ERROR appears in tail position.

13 years ago1.0.48.26: sb-posix: export WNOHANG and WUNTRACED
Nikodemus Siivola [Fri, 27 May 2011 10:39:13 +0000 (10:39 +0000)]
1.0.48.26: sb-posix: export WNOHANG and WUNTRACED

  EOM.

13 years ago1.0.48.25: automatic &rest to &more conversion
Nikodemus Siivola [Wed, 25 May 2011 23:02:28 +0000 (23:02 +0000)]
1.0.48.25: automatic &rest to &more conversion

 lp#504575

 Automatically convert

   (values-list rest-arg)
 to
   (%more-arg-values more-context 0 more-count)

 when possible, making functions such as

   (defun foo (f1 f2 &rest args)
     (apply f1 args)
     (apply f2 args))

 non-consing.

 The conversion is done iff:

   * The rest arg is never assigned to.

   * The rest arg only appears in VALUES-LIST (incl. APPLY)
     calls.

   * Those calls are all in either the same lambda that
     allocates the rest-list, or one that has been declared
     dynamic extent. (Conservative guess re. escaping.)

 The way this works is as follows:

   1. When we convert a lambda with a non-ignored &rest argument, as add
      more-context and more-count arguments to the function, and
      stick their lambda-vars into arg-info-default of the &rest arg.

   2. When we source-transform a values-list form, we check if its argument is
      a &rest argument for which context and count are available. If so, we
      source-transform into

        (%values-list-or-context list context count)

   3. When we are optimizing, a deftransform fires for the form above. It
      checks if all the necessary conditions hold and converts into either
      %more-arg-values or values-list.

 The reason for this roundabout way of doing things lies in locall analysis:
 unless the extra context and count argument are used nontrivially when it
 runs, they get deleted -- and we don't know if we want them or not until the
 entire function has been converted. Absent a convenient pass between
 conversion and locall analysis, we must therefore do things in two stages.

13 years ago1.0.48.24: fix performance / type derivation regression from 1.0.48.14
Nikodemus Siivola [Tue, 24 May 2011 11:02:33 +0000 (11:02 +0000)]
1.0.48.24: fix performance / type derivation regression from 1.0.48.14

  Since global/special variables are now always converted using
  SYMBOL-VALUE / SYMBOL-GLOBAL-VALUE, we temporarily lost type
  information for them.

  Remedy this by adding a DERIVE-TYPE optimizer for both.

13 years ago1.0.48.23: faster with-arguments CALL-NEXT-METHOD
Nikodemus Siivola [Tue, 24 May 2011 10:09:18 +0000 (10:09 +0000)]
1.0.48.23: faster with-arguments CALL-NEXT-METHOD

 * Make the correctness-checking code for changed arguments in safe
   code check required arguments pairwise with EQL first -- if they
   match, the applicable methods must be the same and we can elide the
   expensive computation.

   This makes things like (apply #'call-next-method r1 r2 :foo foo rest)
   not suck horribly in safe code.

   Could still be better, but this much was quick and easy.

 * Make the &REST list in CALL-NEXT-METHOD dynamic-extent. This helps
   normal safety code as well.

13 years ago1.0.48.22: optimize GENERIC-FUN-INFO
Nikodemus Siivola [Tue, 24 May 2011 09:47:49 +0000 (09:47 +0000)]
1.0.48.22: optimize GENERIC-FUN-INFO

  This isn't a huge bottleneck, but it does get called
  enough that going over metatypes twice -- esp. once with
  unoptimized COUNT-IF -- is noticeable in a few places.

13 years ago1.0.48.21: explicitly indefinite-extent leaves, safer dynamic-extent &REST
Nikodemus Siivola [Tue, 24 May 2011 08:49:45 +0000 (08:49 +0000)]
1.0.48.21: explicitly indefinite-extent leaves, safer dynamic-extent &REST

  Change LEAF-DYNAMIC-EXTENT to LEAF-EXTENT. Setting it to :INDEFINITE stops
  dynamic-extent propagation through the leaf.

  Use this in CONVERT-MORE-CALL / CONVERT-HAIRY-FUN-ENTRY by proclaiming the
  variables in the open-coded &REST list as having indefinite-extent.

  The upshot is that dynamic-extent &REST will only stack allocate the spine
  of the rest list, making it easier and safer to use.

  Document this in the manual and attach appropriate caveats re. portability.

13 years ago1.0.48.20: fix mv-call regression from 1.0.43.57
Nikodemus Siivola [Sat, 21 May 2011 11:26:36 +0000 (11:26 +0000)]
1.0.48.20: fix mv-call regression from 1.0.43.57

  Don't assert untrusted types when the values flow into an mv-call.

  Reported by Martin Kielhorn on sbcl-bugs 2011-05-21.

13 years ago1.0.48.19: another go at fixing the win32 build
Nikodemus Siivola [Sun, 15 May 2011 08:20:08 +0000 (08:20 +0000)]
1.0.48.19: another go at fixing the win32 build

 Roll back the last attempt, that was not only incomplete, but
 somewhat ill adviced.

 Instead, put in :UNKNOWN as FD-STREAM-FD-TYPE if we need to serve
 events, and :REGULAR otherwise.

13 years ago1.0.48.18: ASDF 2.015.3
Nikodemus Siivola [Sat, 14 May 2011 10:12:13 +0000 (10:12 +0000)]
1.0.48.18: ASDF 2.015.3

 Let's hope this one is good enough for a while. :)

13 years ago1.0.48.17: hopefully fix build on win32
Nikodemus Siivola [Sat, 14 May 2011 09:43:28 +0000 (09:43 +0000)]
1.0.48.17: hopefully fix build on win32

  Regression from 1.0.48.7. Add missing S_IFMT macro wrappers to win32
  build.

  (Untested on win32 as of yet.)

13 years ago1.0.48.16: deadlock detection fixes
Nikodemus Siivola [Sat, 14 May 2011 09:14:54 +0000 (09:14 +0000)]
1.0.48.16: deadlock detection fixes

 * The same deadlock may be reported in multiple threads: adjust tests
   to account for that.

 * CHECK-DEADLOCK/DEADLOCK-CHAIN could signal an error if the deadlock
   had disappeared between its detection and building up the chain due
   to one of the involved threads unwinding.

   To flush out issues like this a bit better, added looping to some
   of the deadlock tests.

13 years ago1.0.48.15: fix null broadcast-streams as RUN-PROGRAM output streams
Nikodemus Siivola [Thu, 12 May 2011 17:07:01 +0000 (17:07 +0000)]
1.0.48.15: fix null broadcast-streams as RUN-PROGRAM output streams

  Regression from 1.0.48.4.

  Since they have element-type T, COPY-DESCRIPTOR-TO-STREAM complains
  about them -- but it's more efficient to special-case them to the
  null device anyways.

  Also add a missing error message about unknown element types for input
  streams.

  ...and fix numbering of RUN-PROGRAM-CAT-* tests.

13 years ago1.0.48.14: more conservative global variable conversion
Nikodemus Siivola [Thu, 12 May 2011 10:42:20 +0000 (10:42 +0000)]
1.0.48.14: more conservative global variable conversion

 Based on patch by Roman Marynchak.

 Fixes lp#722734.

 * Modify IR1-CONVERT-VAR to emit SYMBOL-VALUE wrapper
   for all global variables except those which are
   ALWAYS-BOUND.

 * Modify IR1-STEP-FORM-P to return false for SYMBOL-VALUE
   with constant argument, now that virtually all global
   variables are accessed with a function call (which gets
   converted via a VOP, so the final machine code remains
   the same.)

13 years ago1.0.48.13: SET-SYNTAX-FROM-CHAR and dispatch-macro characterness
Nikodemus Siivola [Thu, 12 May 2011 10:02:27 +0000 (10:02 +0000)]
1.0.48.13: SET-SYNTAX-FROM-CHAR and dispatch-macro characterness

  Previously when the to-char was a dispatch-macro character in to-readtable,
  but from-char wasn't one in from-readtable, SET-SYNTAX-FROM-CHAR didn't do
  anything.

  CLHS says "If the character is a dispatching macro character, its entire
  dispatch table of reader macro functions is copied." which *can* be taken to
  mean that dispatch table should not be removed even if it doesn't exist at
  all in the from-readtable, but that interpretation doesn't really match with
  the rest of the description or the exhortation to copy the syntax type -- I
  read it as an instruction to copy the whole dispatch table, not just the
  fact that the character is a dispatching macro character.

13 years ago1.0.48.12: fix bugs in deadlock detection and tests
Nikodemus Siivola [Wed, 11 May 2011 19:42:35 +0000 (19:42 +0000)]
1.0.48.12: fix bugs in deadlock detection and tests

 * No timeouts on mutexes on lutex builds: so don't mark the wait as
   having one.

 * No timeouts on spinlocks, so don't mark the wait as having one even
   if there is a deadline.

 * More tests.

13 years ago1.0.48.11: update ASDF to 2.015.2
Nikodemus Siivola [Wed, 11 May 2011 18:45:51 +0000 (18:45 +0000)]
1.0.48.11: update ASDF to 2.015.2

  2.015 and .1 had an unfortunate interaction with Quicklisp.

13 years ago1.0.48.10: add deadlock detection to spinlocks and mutexes
Nikodemus Siivola [Wed, 11 May 2011 16:48:37 +0000 (16:48 +0000)]
1.0.48.10: add deadlock detection to spinlocks and mutexes

 Each thread gets a WAITING-FOR slot which holds the lock it is
 currently trying to acquire.

 After initial try at lock acquisition fails, we check for deadlocks:
 we look at the thread that owns the lock we want -> lock it is
 waiting for, etc, recursively, until we either bottom out or find
 someone waiting for us.

 Print thread as having state WAITING if it is waiting for a lock.

 Add a PRINT-OBJECT methods for MUTEXes and SPINLOCKs.

 SB-THREAD:THREAD-DEADLOCK-CYCLE contains a list of the
 threads and locks involved, so that the situation can be
 analyzed even afer a handler has broken the deadlock.

13 years ago1.0.48.9: better source information for compile-time type errors
Nikodemus Siivola [Wed, 11 May 2011 11:15:43 +0000 (11:15 +0000)]
1.0.48.9: better source information for compile-time type errors

  Compile-time warning: in addition to the context, also tell exactly
  which form produces the value that is not of the expected type.

  Run-time error: include both the error context and exact form in the
  error message.

  Delete VALUES-TYPE-ERROR, and use SIMPLE-TYPE-ERROR for both legs in
  %COMPILE-TIME-TYPE-ERROR.

13 years ago1.0.48.8: better binary stream support in RUN-PROGRAM
Nikodemus Siivola [Tue, 10 May 2011 20:41:51 +0000 (20:41 +0000)]
1.0.48.8: better binary stream support in RUN-PROGRAM

  * In COPY-DESCRIPTOR-TO-STREAM, decode octets only if the stream has
    a character element type.

    For :DEFAULT and (UNSIGNED-BYTE 8) just copy the octets over
    directly.

    For others, signal an error. (Would be nice to support, but not a
    high priority.)

  * Similarly for copying to temporary files from non-fd input
    streams.

13 years ago1.0.48.7: add FD-STREAM-FD-TYPE, use it to decide when to poll the fd
Nikodemus Siivola [Tue, 10 May 2011 20:05:25 +0000 (20:05 +0000)]
1.0.48.7: add FD-STREAM-FD-TYPE, use it to decide when to poll the fd

  1.0.42.43 introduced a regression that caused reads from non-regular files
  to potentially block in an uninterruptible state, as WAIT-UNTIL-FD-USABLE
  started being called only when there was a timeout or events to serve.

  This was a win for regular files, because filling the input buffer then
  required one syscall less.

  ...but since uninterruptible blocking reads aren't fun for anyone, let's
  make things a bit smarter:

  * When creating an FD-STREAM, use fstat() to get the type of the fd, and
    store a keyword describing it in the FD-STREAM.

  * REFILL-INPUT-BUFFER now calls SYSREAD-MAY-BLOCK-P always if the file
    anything but :REGULAR -- so pipes and sockets and whatnot get their
    select() calls, and a read from a stream to one can no longer cause
    SBCL to hang.

13 years ago1.0.48.6: %SIMPLE-EVAL and backtraces
Nikodemus Siivola [Tue, 10 May 2011 19:16:53 +0000 (19:16 +0000)]
1.0.48.6: %SIMPLE-EVAL and backtraces

  Functions from %SIMPLE-EVAL have names such as (EVAL (DEFMACRO FOO)),
  which looks pretty confusing in the backtrace.

  Replace that with #:EVAL-THUNK, which is more descriptive and
  less head-scratchy.

  Also, calls to SIMPLE-EVAL-IN-LEXENV and EVAL -- when they show
  up in backtraces -- have lisp forms as arguments. This causes
  pretty-printing to try and split things onto multiple lines,
  but *PRINT-LINES* tends to be 1 during backtracing.

  ...so bind *PRINT-PRETTY* to NIL when printing eval-frame
  arguments iff *PRINT-LINES* is 1 in order to have something
  useful show up the backtrace.

13 years ago1.0.48.5: update ASDF to 2.015.1
Nikodemus Siivola [Mon, 9 May 2011 22:20:49 +0000 (22:20 +0000)]
1.0.48.5: update ASDF to 2.015.1

 2.015 broke LOAD-SOURCE-OP, this should fix it.

13 years ago1.0.48.4: source locations for init files
Nikodemus Siivola [Mon, 9 May 2011 22:12:27 +0000 (22:12 +0000)]
1.0.48.4: source locations for init files

 Refactor PROCESS-INIT-FILE to share code with LOAD-AS-SOURCE.

 Also add in contrib/sb-introspect/load-test.lisp which was
 left out from the last commit.

13 years ago1.0.48.3: source-locations from LOAD of source files, and EVAL-WHEN :COMPILE-TOPLEVEL
Nikodemus Siivola [Mon, 9 May 2011 19:47:03 +0000 (19:47 +0000)]
1.0.48.3: source-locations from LOAD of source files, and EVAL-WHEN :COMPILE-TOPLEVEL

  * Bind *SOURCE-INFO* and bind and populate *SOURCE-PATHS* in
    LOAD-AS-SOURCE.

  * EVAL-TLF provides a way to evaluate things while providing the
    toplevel form number. It also captures the current *SOURCE-INFO*
    and passes it onwards to be reused by ACTUALLY-COMPILE.

  * In ACTUALLY-COMPILE, when asked to reuse a source-info object,
    also retain the old *SOURCE-PATHS*.

13 years ago1.0.48.2: ASDF 2.015
Nikodemus Siivola [Mon, 9 May 2011 12:33:46 +0000 (12:33 +0000)]
1.0.48.2: ASDF 2.015

 ASDF no longer ships with a separate LICENSE file, so remove it.

13 years ago1.0.48.1: WITH-COMPILATION-UNIT :SOURCE-NAMESTRING
Nikodemus Siivola [Mon, 9 May 2011 10:41:25 +0000 (10:41 +0000)]
1.0.48.1: WITH-COMPILATION-UNIT :SOURCE-NAMESTRING

  Allows specifying an alternate namestring to use for debug-source.

  This will help us get redefinition warnings working nicely with C-c C-c in
  Slime.

13 years ago1.0.48.1: WITH-COMPILATION-UNIT :SOURCE-NAMESTRING
Nikodemus Siivola [Mon, 9 May 2011 10:21:34 +0000 (10:21 +0000)]
1.0.48.1: WITH-COMPILATION-UNIT :SOURCE-NAMESTRING

  Allows specifying an alternate namestring to use for debug-source.

  This will help us get redefinition warnings working nicely with C-c C-c in
  Slime.

13 years ago1.0.48: Will be tagged as sbcl_1_0_48
Juho Snellman [Mon, 9 May 2011 00:27:12 +0000 (00:27 +0000)]
1.0.48: Will be tagged as sbcl_1_0_48

13 years ago1.0.47.32: Fix build on MinGW
Juho Snellman [Sun, 8 May 2011 22:28:58 +0000 (22:28 +0000)]
1.0.47.32: Fix build on MinGW

   * Patch by Elliott Slaughter (lp#777339)

13 years ago1.0.47.31: set-macro-character shouldn't accept NIL as a function designator.
Stas Boukarev [Fri, 29 Apr 2011 13:33:40 +0000 (13:33 +0000)]
1.0.47.31: set-macro-character shouldn't accept NIL as a function designator.

Use %coerce-callable-to-fun before passing it to sb-impl::set-cmt-entry, although
set-cmt-entry calls %coerce-callable-to-fun, it does that only on non-nil values.

13 years ago1.0.47.30: sb-cltl2:function-information didn't work on setf-functions.
Stas Boukarev [Sat, 23 Apr 2011 19:02:56 +0000 (19:02 +0000)]
1.0.47.30: sb-cltl2:function-information didn't work on setf-functions.

Change sb-cltl2:function-information ftype declaration from
(symbol ...) to ((or symbol cons) ...).

Fixes lp#769596.

13 years ago1.0.47.29: reinstate Darwin interrupt tests that now succeed
Cyrus Harmon [Sat, 23 Apr 2011 15:43:53 +0000 (15:43 +0000)]
1.0.47.29: reinstate Darwin interrupt tests that now succeed

 * runnability likely due to 1.0.42.50 which works around a Darwin nanosleep bug

13 years ago1.0.47.28: Fix typo in the man page.
Stas Boukarev [Fri, 22 Apr 2011 21:57:17 +0000 (21:57 +0000)]
1.0.47.28: Fix typo in the man page.

In the description of the runtime option --script, equivalent runtime
options should be terminated by --end-runtime-options, not
--end-toplevel-options.

Thanks to Sebastian Tennant.

13 years ago1.0.47.27: limit open coding from MEMBER, ASSOC, &co
Nikodemus Siivola [Thu, 21 Apr 2011 11:08:12 +0000 (11:08 +0000)]
1.0.47.27: limit open coding from MEMBER, ASSOC, &co

  Open coding massive lists doesn't really help, and a sufficiently
  long list can blow the stack during compilation.

13 years ago1.0.47.26: BEST-SUB-SOURCE-PATH should ignore quoted constants
Nikodemus Siivola [Thu, 21 Apr 2011 11:06:14 +0000 (11:06 +0000)]
1.0.47.26: BEST-SUB-SOURCE-PATH should ignore quoted constants

  Not only can they be improper, they can also be cyclic.

  Fixes lp#767959.

13 years ago1.0.47.25: make instances obsolete if slot definition classes change
Nikodemus Siivola [Thu, 21 Apr 2011 09:26:58 +0000 (09:26 +0000)]
1.0.47.25: make instances obsolete if slot definition classes change

  Fixes lp#766271.

  Regression from 1.0.46.11: previously SLOT-VALUE-USING-CLASS inhibited using
  permutation vectors, so not obsoleting the instances didn't cause so easily
  observed symptoms.

  Now, however, since slot-infos from the previous definition can live
  in the method cache, the wrappers must be invalidated so that caches
  are flushed properly.

13 years ago1.0.47.24: more conservative FTYPE proclamations
Nikodemus Siivola [Mon, 11 Apr 2011 11:32:50 +0000 (11:32 +0000)]
1.0.47.24: more conservative FTYPE proclamations

  Full warnings for changing FTYPE proclamations in the
  cross-compiler, and always a CERROR when the function is a known one
  and the new type is not a subtype of the old one.

  This necessitates the following changes:

  * Rewriting DEF-MATH-RTN not to use DEFINE-ALIEN-ROUTINE which
    proclaims its FTYPE.

  * Fix the DEFKNOWN for CLASSOID-NAME to match the DEFSTRUCT.

  * Fix STRING-OUTPUT-STREAM-ELEMENT-TYPE slot type, and DEFKNOWN
    result type.

13 years ago1.0.47.23: remove defknowns for condition slot accessors
Nikodemus Siivola [Mon, 11 Apr 2011 10:52:03 +0000 (10:52 +0000)]
1.0.47.23: remove defknowns for condition slot accessors

  Condition slot types aren't checked, and DEFINE-CONDITION throws the
  fndb type-information out of the window -- but the defknowns cause
  code compiled before that to trust the types.

  Fixes lp#705690.

13 years ago1.0.47.22: better --dynamic-space-size argument validation
Nikodemus Siivola [Sun, 10 Apr 2011 13:08:52 +0000 (13:08 +0000)]
1.0.47.22: better --dynamic-space-size argument validation

  Based on patch by Roman Marynchak, lp#721457.

  1. Check for trailing junk, in case of someone trying to use eg.
     --dynamic-space-size 1Gb.

  2. Check the range before converting to bytes to avoid weirdness.

13 years agoprotect compile-time side-effects of DEFUN with a package-lock
Nikodemus Siivola [Sun, 10 Apr 2011 12:22:35 +0000 (12:22 +0000)]
protect compile-time side-effects of DEFUN with a package-lock

  Ie. proclaiming as a function, possibly nuking existing inline
  definitions.

  Fixes lp#675584.

  Now compiling a file with

    (DEFUN LOCKED:FOO ...)

  signals a compile-time error.

    (WITHOUT-PACKAGE-LOCKS (DEFUN LOCKED:FOO ...))

  still works, as the DEFUN stops being a toplevel form, and hence no
  longer has compile-time side effects except for those inherent to
  compiling a NAMED-LAMBDA.

13 years ago1.0.47.20: don't handle errors during compile-time-too processing
Nikodemus Siivola [Sun, 10 Apr 2011 10:34:38 +0000 (10:34 +0000)]
1.0.47.20: don't handle errors during compile-time-too processing

  Essentially reverts 1.0.33.13.

  Handling compile-time-too errors has a nasty tendency to swallow
  things package conflict errors from DEFPACKAGE forms, and dump them
  into fasls without allowing the user to handle them reasonably.

  While it may be that there are specific cases which should/could be
  handled and converted into compiler-errors, I believe they are the
  the minority. For a moment I considered simply not handling
  conditions which have restarts associated with them, but it seems to
  me that

    (eval-when (:compile-toplevel) (error "oops"))

  is most often a signal that something is seriously wrong, and
  compiling rest of the file is a waste of time and only obfuscates
  the real problem.

13 years ago1.0.47.19: another MAKE-INSTANCE regression from 1.0.45.18
Nikodemus Siivola [Sun, 10 Apr 2011 09:21:46 +0000 (09:21 +0000)]
1.0.47.19: another MAKE-INSTANCE regression from 1.0.45.18

  ...which was masked by another regression till 1.0.46.15.

  Inverted conditional: (SLOT-BOUNDP-USING-CLASS ...) where it should
  have been (NOT (SLOT-BOUNDP-USING-CLASS ...)).

  Reported by Pascal Costanza on sbcl-devel.

13 years ago1.0.47.18: less verbose source forms for functions from EVAL
Nikodemus Siivola [Fri, 8 Apr 2011 15:38:26 +0000 (15:38 +0000)]
1.0.47.18: less verbose source forms for functions from EVAL

  Fixes lp#747485.

  When generating debug information, exclude the outer lambda
  introduced by %SIMPLE-EVAL from the source form.

13 years ago1.0.47.17: %FUNCALL IR1 translator was careless about FUNCTION argcount
Nikodemus Siivola [Fri, 8 Apr 2011 13:11:56 +0000 (13:11 +0000)]
1.0.47.17: %FUNCALL IR1 translator was careless about FUNCTION argcount

  This allowed forms such as (FUNCALL (FUNCTION FOO OOPS) ...) to
  compile without complaint.

  Fix line-wrapping in NEWS for the last couple of commits.

13 years ago1.0.47.16: more ((LAMBDA ..) ..) and (FUNCALL (LAMBDA ..) ..) equivalence
Nikodemus Siivola [Fri, 8 Apr 2011 13:06:38 +0000 (13:06 +0000)]
1.0.47.16: more ((LAMBDA ..) ..) and (FUNCALL (LAMBDA ..) ..) equivalence

  This was mostly the case already, but for consistency's sake convert
  ((LAMBDA ...) ...) via (%FUNCALL ...) instead of using
  IR1-CONVERT-COMBINATION directly.

  Fixes lp#720382.

13 years ago1.0.47.15: %FUNCALL IR1 translator macroexpands the function form
Nikodemus Siivola [Fri, 8 Apr 2011 13:02:26 +0000 (13:02 +0000)]
1.0.47.15: %FUNCALL IR1 translator macroexpands the function form

  Code compiled correctly without this, but added an unnecessary cast
  to FUNCTION for the lambda in

    (FUNCALL (LAMBDA ...) ...)

  forms, which prevented local-call conversion and inlining for the
  lambda. Note:

    (FUNCALL (FUNCTION (LAMBDA ...)) ...)

  forms did not suffer from this.

  Step on the way to fixing lp#720382.

13 years ago1.0.47.14: optimize list DELETE to DELQ in more cases
Nikodemus Siivola [Thu, 7 Apr 2011 13:05:01 +0000 (13:05 +0000)]
1.0.47.14: optimize list DELETE to DELQ in more cases

  Optimize in the presence of explicit EQL test if the item is known
  to be such that EQ and EQL work the same.

  Optimize for implicit EQL for fixnums as well -- not just
  non-numbers as previously.

13 years ago1.0.47.13: extend LVAR-FUN-IS to constant functions and function names
Nikodemus Siivola [Thu, 7 Apr 2011 13:02:02 +0000 (13:02 +0000)]
1.0.47.13: extend LVAR-FUN-IS to constant functions and function names

  Allows optizing eg. (MEMBER X Y :TEST 'EQ) unlike the previous one.

  Additionally make the code work like the comment says, and return
  true only if the function is not NOTINLINE.

13 years ago1.0.47.12: robustify test for bug-654289
Nikodemus Siivola [Thu, 7 Apr 2011 12:53:32 +0000 (12:53 +0000)]
1.0.47.12: robustify test for bug-654289

  Run GC before timing the compilation, so that garbage from earlier
  tests doesn't get accounted here.

  Up the fixed leeway to 1/10th of a second -- if we have a real
  regression the expected blowup is several seconds or tens of
  seconds.

  Also make the error message report the times for easier eyeballing
  of future failures.

13 years ago1.0.47.11: isqrt: Fix reference to `fast-isqrt'.
Stas Boukarev [Tue, 5 Apr 2011 18:36:12 +0000 (18:36 +0000)]
1.0.47.11: isqrt: Fix reference to `fast-isqrt'.
It was originally named `fast-isqrt', but the self-recursive call wasn't renamed.

13 years agoBetter Solaris support in tests:
Jim Wise [Mon, 4 Apr 2011 15:28:19 +0000 (15:28 +0000)]
Better Solaris support in tests:

a.) support for Solaris /bin/sh in sh-based tests (`...` for $(...), and no
    test -e)

b.) Make run-compiler.sh obey $CC, if set, and teach it about Solaris
    arch support.

13 years ago1.0.47.9: Oh very funny
Christophe Rhodes [Sun, 3 Apr 2011 06:17:13 +0000 (06:17 +0000)]
1.0.47.9: Oh very funny

Commit NEWS and version.lisp-expr as well.  I feel like a newb.  (On the
other hand, this is a good way to test whether syncmail is working again)

13 years ago1.0.47.8: No more INSTANCE-LAMBDA
Christophe Rhodes [Sat, 2 Apr 2011 14:19:36 +0000 (14:19 +0000)]
1.0.47.8: No more INSTANCE-LAMBDA

So long!  Farewell!  It's time to say goodbye!

13 years ago1.0.47.7: sb-posix: add rdev member to stat
Nikodemus Siivola [Wed, 30 Mar 2011 18:39:01 +0000 (18:39 +0000)]
1.0.47.7: sb-posix: add rdev member to stat

  Patch by Philipp Marek.

13 years ago1.0.47.6: marginally faster ISQRT
Nikodemus Siivola [Wed, 30 Mar 2011 18:06:04 +0000 (18:06 +0000)]
1.0.47.6: marginally faster ISQRT

  Thanks to Robert Smith, lp#713343.

13 years ago1.0.47.5: sb-posix: add read(2) and write(2)
Nikodemus Siivola [Wed, 30 Mar 2011 16:48:49 +0000 (16:48 +0000)]
1.0.47.5: sb-posix: add read(2) and write(2)

  Patch by Daniel Lowe.

  Also add missing NEWS entries.

13 years ago1.0.47.4: Fix slot-documentation for SB-POSIX:TERMIOS slot CC.
Alastair Bridgewater [Tue, 29 Mar 2011 17:35:44 +0000 (17:35 +0000)]
1.0.47.4: Fix slot-documentation for SB-POSIX:TERMIOS slot CC.

  * Unlike every other documentation string for a DEFINE-PROTOCOL-CLASS
slot, this one documentation string did not end in a period (#\.).
Fixed.

  * While we're at it, alter the DEFINE-PROTOCOL-CLASS macro to not
ignore DEFCLASS slot options after an :ARRAY-LENGTH option (reported
by mon_key in #lisp).

13 years ago1.0.47.3: better DEFSTRUCT constructor type declarations
Nikodemus Siivola [Tue, 29 Mar 2011 11:55:58 +0000 (11:55 +0000)]
1.0.47.3: better DEFSTRUCT constructor type declarations

  Lift the argument types into the FTYPE declarations, instead
  of just having them internal to the constructor functions.

  Prior to this the declared type of MAKE-FOO after

    (DEFSTRUCT FOO (X 0.0 :TYPE SINGLE-FLOAT) (Y))

  was (FUNCTION * (VALUES FOO &OPTIONAL)), after this it
  becomes

   (FUNCTION (&KEY (:X SINGLE-FLOAT) (:Y T)) (VALUES FOO &OPTIONAL))

  as appropriate -- allowing types to propagate better, and providing
  warnings for signature mismatches even if the constructor is not
  inlined.

  Also fix whitespace damage in ntrace.lisp.

13 years ago1.0.47.2: nicer error behaviour for TRACE
Nikodemus Siivola [Tue, 29 Mar 2011 04:54:22 +0000 (04:54 +0000)]
1.0.47.2: nicer error behaviour for TRACE

  Fixed lp#740717.

  Instead of an error, warn about the undefined function and ignore
  it.

  Similar behaviour for attempts to TRACE special operators or invalid
  function names.

  (Trace is virtually always invoked interactively, which means that a
  warning about the issue interrupts the flow less than hitting the
  debugger. Also, CLHS doesn't require any errors.)

13 years ago1.0.47.1: fix longstanding bug in os_get_runtime_executable_path on darwin
Cyrus Harmon [Mon, 28 Mar 2011 02:42:09 +0000 (02:42 +0000)]
1.0.47.1: fix longstanding bug in os_get_runtime_executable_path on darwin

 * in os_get_runtime_executable_path, we were wrongly assuming that
   size would be set to the actual size of the string on a successful
   call to NSGetExecutablePath. This isn't the case and we were
   setting path[1025] = '\0'; causing things to break with XCode 4's
   CLANG compiler.

 * While we're at it, we should check to make that runtime_path is not
   NULL before we free it, as there is a code path where we might end
   up trying to free runtime_path when it was NULL but
   saved_runtime_path was non-NULL.

13 years ago1.0.47: Will be tagged as 1_0.47
Juho Snellman [Sun, 27 Mar 2011 12:46:43 +0000 (12:46 +0000)]
1.0.47: Will be tagged as 1_0.47

13 years ago1.0.46.44: room: Fix map-stack-references for stack-grows-upward systems.
Alastair Bridgewater [Thu, 24 Mar 2011 19:33:04 +0000 (19:33 +0000)]
1.0.46.44: room: Fix map-stack-references for stack-grows-upward systems.

  * SAP+ is (function (system-area-pointer integer) (values
system-area-pointer)).

  * SAP- is (function (system-area-pointer system-area-pointer) (values
integer)).

  * When negating the delta in a SAP+ operation, don't use SAP-.
Instead, negate the offset.  Otherwise, you get a WARNING for passing an
integer where a system-area-pointer is expected.

13 years ago1.0.46.43: fix sb-introspect on non-threaded builds
Cyrus Harmon [Thu, 24 Mar 2011 04:45:55 +0000 (04:45 +0000)]
1.0.46.43: fix sb-introspect on non-threaded builds

 * put #+sb-thread around calls inspecting sb-thread::%thread-local-references

13 years ago1.0.46.42: more on threads in SB-INTROSPECT:MAP-ROOT
Nikodemus Siivola [Tue, 22 Mar 2011 17:00:17 +0000 (17:00 +0000)]
1.0.46.42: more on threads in SB-INTROSPECT:MAP-ROOT

 * Thread local values: filter out invalid values correctly (oops),
   also change SB-THREAD::%THREAD-LOCAL-REFERENCES to work on current
   thread only.

 * References from stack: SB-VM::MAP-STACK-REFERENCES walks the
   current thread stack looking for things that look like references
   to heap objects.

 * MAP-ROOT interrupts the thread it wants to check out, unless it is
   the current one -- a bit tacky, but seems preferable to stopping
   the world.

13 years ago1.0.46.41: double-check simple functions in looks_like_valid_lisp_pointer_p
Nikodemus Siivola [Tue, 22 Mar 2011 16:49:33 +0000 (16:49 +0000)]
1.0.46.41: double-check simple functions in looks_like_valid_lisp_pointer_p

 * A function contained in a code object is always a simple function.
   Make sure that we actually have one, instead of a random location
   in the code object.

13 years ago1.0.46.40: more comprehensive MAP-ROOT
Nikodemus Siivola [Sun, 20 Mar 2011 18:37:55 +0000 (18:37 +0000)]
1.0.46.40: more comprehensive MAP-ROOT

 * EXT defaults to T and provides:
   ** EQL specializers on the object
   ** symbol values in other threads
   ** MACRO-FUNCTION on symbols

 * Threads map to thread-local values as well, courtesy of
   SB-THREAD::%THREAD-LOCAL-VALUES.

 * Don't report multiple references to the same object.

13 years agoget rid of *EQL-SPECIALIZER-TABLE-LOCK*
Nikodemus Siivola [Sun, 20 Mar 2011 18:36:01 +0000 (18:36 +0000)]
get rid of *EQL-SPECIALIZER-TABLE-LOCK*

  Use WITH-LOCKED-HASH-TABLE instead.

13 years ago1.0.46.38: tad more information PACKAGE-LOCK-VIOLATION conditions
Nikodemus Siivola [Sat, 19 Mar 2011 14:33:16 +0000 (14:33 +0000)]
1.0.46.38: tad more information PACKAGE-LOCK-VIOLATION conditions

 * Add the current *PACKAGE* when the error is signaled to the
   condition.

 * Now that SIMPLE-CONDITION :FORMAT-CONTROL defaults to NIL,
   PACKAGE-LOCK-VIOLATION can inherit from SIMPLE-CONDITION instead of
   definining its own FORMAT-CONTROL and FORMAT-ARGUMENTS slots.

13 years ago1.0.46.37: SIMPLE-CONDITION slots are initialized with NIL if not supplied
Nikodemus Siivola [Sat, 19 Mar 2011 14:31:29 +0000 (14:31 +0000)]
1.0.46.37: SIMPLE-CONDITION slots are initialized with NIL if not supplied

  So says CLHS.

  When there is no format control and *PRINT-ESCAPE* is false,
  signal an error.

13 years ago1.0.46.36: par for course, committed the wrong version of MAP-ROOT as 1.0.46.35
Nikodemus Siivola [Tue, 15 Mar 2011 15:11:53 +0000 (15:11 +0000)]
1.0.46.36: par for course, committed the wrong version of MAP-ROOT as 1.0.46.35

 This one actually works instead of having package errors.

13 years ago1.0.46.35: first cut at MAP-ROOT
Nikodemus Siivola [Tue, 15 Mar 2011 14:54:47 +0000 (14:54 +0000)]
1.0.46.35: first cut at MAP-ROOT

 Walking references from an arbitrary lisp object.

13 years ago1.0.46.34: Fix tests for builds without sb-eval.
Stas Boukarev [Sat, 12 Mar 2011 21:29:37 +0000 (21:29 +0000)]
1.0.46.34: Fix tests for builds without sb-eval.

Add #+sb-evel to cases which bind sb-ext:*evaluator-mode* to :interpret.

13 years ago1.0.46.33: constraint: Don't substitute REFs when replacement LEAF is not visible.
Alastair Bridgewater [Fri, 11 Mar 2011 15:35:30 +0000 (15:35 +0000)]
1.0.46.33: constraint: Don't substitute REFs when replacement LEAF is not visible.

  * Bug reported by Frank Duncan, additional diagnosis by Heka Treep,
patch review and revision by Nikodemus Siivola.

  * Introduce LEAF-VISIBLE-FROM-NODE-P, which verifies that the LEAF
about to be substituted is visible from the NODE to be modified.

  * Add LEAF-VISIBLE-FROM-NODE-P as an additional precondition to
calling CHANGE-REF-LEAF, which does the actual substitution.

  * And, for good measure, added a test to the test suite.

13 years ago1.0.46.32: export sb-kernel::redefinition-with-defmacro
cracauer [Tue, 8 Mar 2011 23:21:14 +0000 (23:21 +0000)]
1.0.46.32: export sb-kernel::redefinition-with-defmacro

  Export sb-kernel::redefinition-with-defmacro the same way we already
  export sb-kernel:redefinition-with-defun and it's CLOS friends.

13 years ago1.0.46.31: clean up mach port deallocation on x86
Cyrus Harmon [Tue, 8 Mar 2011 15:33:44 +0000 (15:33 +0000)]
1.0.46.31: clean up mach port deallocation on x86

 * don't deallocate the exception_port port and check the return
   values from deallocating the thread and task ports

13 years ago1.0.46.30: don't deallocate exception_port and check return values from mach_port_dea...
Cyrus Harmon [Tue, 8 Mar 2011 02:56:27 +0000 (02:56 +0000)]
1.0.46.30: don't deallocate exception_port and check return values from mach_port_deallocate calls

 * mach_port_deallocate of the exception_port was returning
   KERN_INVALID_RIGHT; assume this call was bogus and remove it.  So
   now we can be more strict about checking the return values of the
   other deallocate calls.

13 years ago1.0.46.29: fix run-compiler.sh for darwin/x86
Cyrus Harmon [Tue, 8 Mar 2011 01:44:41 +0000 (01:44 +0000)]
1.0.46.29: fix run-compiler.sh for darwin/x86

 * default arch is now x86_64, so check for x86 and use arch i386 if
   appropriate

13 years ago1.0.46.28: fix mach port leakage on x86 too
Cyrus Harmon [Tue, 8 Mar 2011 01:41:25 +0000 (01:41 +0000)]
1.0.46.28: fix mach port leakage on x86 too

 * call mach_port_deallocate on exception_port, thread and task at the
   end of x86 version of catch_exception_raise

13 years ago1.0.46.27: fix mach port leakage
Cyrus Harmon [Tue, 8 Mar 2011 00:55:10 +0000 (00:55 +0000)]
1.0.46.27: fix mach port leakage

 * store mach_thread_self() results in current_mach_thread and
   deallocate the mach_port after thread_set_exception_ports call

 * fix error messages in lose strings in mach_thread_init

 * catch_exception_raise now calls mach_port_deallocate for the
   exception_port, the thread and the task

 * These changes seem to get rid of most of the leaking port
   rights. However, MachPortDump shows when running the
   threads.impure.lisp tests, there are still a number of ports that
   stick around with a single send right.

13 years ago1.0.46.26: mach-exception-handler improvement: current_mach_task
Cyrus Harmon [Mon, 7 Mar 2011 23:41:24 +0000 (23:41 +0000)]
1.0.46.26: mach-exception-handler improvement: current_mach_task

 * define current_mach_task variable, squirrel away the value of
   mach_task_self there and use that instead of calling mach_task_self
   so that we don't leak send rights all over the place

13 years ago1.0.46.25: consolidate common code from x86-64-darwin-os.c and x86-darwin-os.c into...
Cyrus Harmon [Mon, 7 Mar 2011 23:14:01 +0000 (23:14 +0000)]
1.0.46.25: consolidate common code from x86-64-darwin-os.c and x86-darwin-os.c into darwin-os.c

 * lots of code in x86-64-darwin-os.c and x86-darwin-os.c was
   duplicated. consolidated into darwin-os.c and wrapped with
   appropriate #ifdefs.

 * darwin-os.c now #includes "thread.h" but not "bsd-os.h"

13 years ago1.0.46.24: fix MAKE-INSTANCE regression from 1.0.45.19
Nikodemus Siivola [Fri, 4 Mar 2011 08:16:48 +0000 (08:16 +0000)]
1.0.46.24: fix MAKE-INSTANCE regression from 1.0.45.19

 lp#728650

 We cannot use an optimized CTOR if there is an :AROUND method potentially
 supplying initialization arguments via CALL-NEXT-METHOD.

 So:

 * Add SIMPLE-NEXT-METHOD-CALL slot to STANDARD-METHOD: initialize it to T iff
   the method doesn't use CALL-NEXT-METHOD at all, or only as
   (CALL-NEXT-METHOD).

 * Allow an optimized CTOR in the presence of INITIALIZE-INSTANCE :AROUND
   methods iff those methods only contain simple forms of CALL-NEXT-METHOD.

13 years ago1.0.46.23: fix an actual random bug in mkstemp test
jimwise [Thu, 3 Mar 2011 20:01:37 +0000 (20:01 +0000)]
1.0.46.23: fix an actual random bug in mkstemp test

 On some platforms (including Solaris, FWIW), the character "."  is one of
 the characters mkstemp can use when filling in an "XXXXXX" template.  When
 this (randomly) occurs during the running of this test, PATHNAME-NAME, of
 course breaks on the last such random "." character, and the test fails in
 a way which will not repeat until the next time such a character is
 randomly chosen.

 Since readdir actually returns a string, break the string on the first "."
 explicitly, instead of making a path from the string and calling
 pathname-name.

 This will need to be revisited if we add mkstemp support on win32 in the
 future.

13 years ago1.0.46.22: fix sb-posix readdir on SunOS/x86
jimwise [Thu, 3 Mar 2011 19:50:21 +0000 (19:50 +0000)]
1.0.46.22: fix sb-posix readdir on SunOS/x86

 for the time being, disable :largefile on SunOS/x86.  Unfortunately,
 sb-grovel cannot navigate the somewhat sticky way in which struct
 dirent gets setup for a 32-bit host with 64-bit ino_t on SunOS, so
 sb-posix:readdir breaks

 :largefile works fine on SunOS x86_64, and will be re-enabled on x86
 after I get some more time to fight with the alien def for struct dirent

13 years ago1.0.46.21: renaming oops in MAKE-PACKAGE
Nikodemus Siivola [Wed, 2 Mar 2011 10:59:41 +0000 (10:59 +0000)]
1.0.46.21: renaming oops in MAKE-PACKAGE

 When WITH-PACKAGES was renamed WITH-PACKAGE-GRAPH, MAKE-PACKAGE was
 not updated -- but amusingly no error was signalled, because

 * The form was that of a function call, so no program-error.

 * Before the undefined function could be called, a non-local transfer always
   took control elsewhere, so no undefined-function error.

13 years ago1.0.46.20: better error messages for invalid variables
Nikodemus Siivola [Wed, 2 Mar 2011 10:21:03 +0000 (10:21 +0000)]
1.0.46.20: better error messages for invalid variables

 Based on patch by Roman Marynchak, lp#387333.

 * Same code checks for LET and LET* in addition to lambda-lists, so make sure
   the messages make sense for both contexts. Binding forms converted to
   LAMBDA -- like MULTIPLE-VALUE-BIND -- still get odd messages for duplicate
   variable names, though.

 * Make the messages for keywords, defined constants, and global lexicals
   better.

13 years ago1.0.46.19: add :NOT-NULL option to C-STRING type
Nikodemus Siivola [Wed, 2 Mar 2011 09:40:22 +0000 (09:40 +0000)]
1.0.46.19: add :NOT-NULL option to C-STRING type

 By default NIL is a valid C-STRING, translated to and from C's NULL. This is
 very convenient because many C functions that normally return strings return
 NULL to indicate "false" or "don't know" -- and less commonly also special
 case it as an argument.

 There are however many C functions that don't check for NULL, so we want a
 non-horrible way to say that NIL is not a good value to pass on...

 ...it remains to be seen if this is non-horrible enough, but at least it
 fixes a bunch of memory faults from doing things like (posix-getenv nil), and
 replaces them with type-errors.

 Not all C-STRING types have been audited yet, just a bunch of the more
 obvious ones.

13 years ago1.0.46.18: terser C-STRING unparsing
Nikodemus Siivola [Wed, 2 Mar 2011 09:30:09 +0000 (09:30 +0000)]
1.0.46.18: terser C-STRING unparsing

 Omit parts with default values from the unparsing: just

  (C-STRING :EXTERNAL-FORMAT :DEFAULT :ELEMENT-TYPE CHARACTER)

 becomes C-STRING, and

  (C-STRING :EXTERNAL-FORMAT :UTF-8 :ELEMENT-TYPE CHARACTER)

 becomes (C-STRING :EXTERNAL-FORMAT :UTF-8), etc.

13 years ago1.0.46.17: nicer STYLE-WARNINGS from IGNORE and IGNORABLE declarations
Nikodemus Siivola [Mon, 28 Feb 2011 12:12:19 +0000 (12:12 +0000)]
1.0.46.17: nicer STYLE-WARNINGS from IGNORE and IGNORABLE declarations

 Fixes lp#726331, based on patch by Robert P. Goldman.