Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: lfn-upstream
Commits on Oct 22, 2011
  1. Temporal fix for long directory name support

    * src/code/win32-pathname.lisp (unparse-native-win32-namestring):
    add "fudge factor" of 12 characters for long directory names.
Commits on Aug 18, 2011
  1. * src/runtime/win32-os.c (scratch): added new function references for

    calls that the LFN-handling code _definitely_ needs. Probably forgot some others...
Commits on Aug 17, 2011
  1. * src/code/unix.lisp: don't define unix-open here on win32, see win32…

    * src/code/win32.lisp (#!+sb-unicode): define binding for _wopen/_open,
    use it in sb-unix:unix-open implementation.
  2. * src/code/filesys.lisp (query-file-system): fixed

    typo (:file-write-date => :write-date)
  3. * src/code/win32-pathname.lisp (unparse-native-win32-namestring): reo…

    …rdered merge-pathname args, clarified the intent.
  4. * src/code/win32-pathname.lisp (unparse-native-win32-namestring): rem…

    …oved #P"", as it can't be dumped by the cross-compiler.
  5. * src/code/win32-pathname.lisp (unparse-native-win32-namestring):

    fixed typo (sb-win32 => sb!win32, as usually)
  6. * src/code/win32.lisp: moved some constant definitions, so they come …

    …before use
  7. * src/code/filesys.lisp (query-file-system): on win32, require non-ni…

    …l KIND form native-probe-file-name
  8. * src/code/win32.lisp (native-delete-file): don't signal win32-error,

    just return false on failure
    (native-delete-directory): ditto
    * src/code/filesys.lisp (query-file-system): split out win32
    implementation (based on native-probe-file-name); remove code that become dead
    (delete-file): merge *default-pathname-defaults* before translation,
    like other filesystem functions do (FIXME should I?);
    Use native-delete-file on win32.
    Use native-delete-directory on win32.
    merge *default-pathname-defaults* before translation,
    like other filesystem functions do (FIXME should I?)
    (map-directory): account for multiple-valued directory iterator: don't
    query file kind if it's returned already.
  9. * src/code/win32-pathname.lisp (unparse-native-win32-namestring): fix…

    … -- missing write-string stream argument.
  10. Win32: support lfn-prefix (including unc variant) in native namestring

    parse/unparse methods.
    * src/code/win32-pathname.lisp:
    (+long-file-name-prefix+): would be string constants if not eql-annoyance,
    (+unc-file-name-prefix+): symbol-macros by now (to allow constant folding).
    (parse-native-win32-namestring): accept UNC or LFN prefix, if it is there
    (unparse-native-win32-namestring): generate UNC/LFN prefix for
    absolute pathnames; strip them (adding #\\ for UNC) if resulting
    namestring is short enough.
    Interpret :up as :back in absolute pathnames.
  11. Added native windows directory iterator using FindFirstFile* (not cal…

    …led yet).
    * src/code/win32.lisp (with-handle): new macro for dynamic-extent
    handle, taking care of interrupts as well as unwind-protect.
    ("FindClose"): new alien routine.
    (native-file-write-date): test syscall result.
    (native-probe-file-name): ditto
    (native-call-with-directory-iterator): reimplementation of
    call-with-native-directory-iterator, with (kind as secondary value)
  12. * src/code/win32.lisp: added definitions for native FS access.

    (+common-lisp-epoch-filetime-seconds+): new constants
    (file-attributes):  new alien types
    (native-delete-directory): low-level functions to be used in code/filesys
  13. * src/code/filesys.lisp (map-directory): a step toward the (future) F…

    …indFirstFileExW-based iterator, that will be able to return file kind for each directory entry
  14. * src/code/filesys.lisp (map-directory): query-file-system :existence…

    … works for networks shares now (and will cease to be an awful kludge after LFN-patch); use it instead of realpath.
  15. * src/code/win32.lisp (FILETIME-MEMBER): defined a version of FILETIM…

    …E that is less convenient, but is aligned correctly when used in structures.
  16. * src/code/filesys.lisp (query-file-system): use top-level VALUES to …

    …get rid of extra return values, instead of repeated nth-value 0
  17. * src/code/filesys.lisp (query-file-system): use top-level VALUES to …

    …get rid of extra return values, instead of repeated nth-value 0
  18. * src/code/pathname.lisp: added :UNC pathname token

    * src/compiler/generic/vm-type.lisp (pathname-device): added :UNC as a
    possible value
    * src/code/win32-pathname.lisp (extract-device): for UNC names,
    extract :UNC and eat one slash.
    (unparse-win32-device): for :UNC device, return a [back-?]slash
Commits on Aug 15, 2011
  1. @sb-studio

    fix bogus deadlocks from interrupts and GCs

    sb-studio authored
     Going in despite the freeze since this is a regression that can
     semi-randomly break correct code. *ouch*
     Thanks to Bart Bortta and #sbcl for the analysis.
     Problem 1:
       T1 holds L1
       T2 is waiting for L1
       T2 is interrupted, interrupt handler grabs L2
       T1 starts waiting on L2
       Prior to this patch, when GET-MUTEX in T2's interrupt handler grabbed
       L2 is marked T2 as still waiting for L1 -- which is not true until
       the interrupt handler returns.
     Problem 2:
       T1 holds L1
       T2 is waiting for L1
       GC is triggered in T2 inside GET-MUTEX
       T2 grabs *ALREADY-IN-GC* lock
       GC is triggered in T1, T1 tries to get *ALREADY-IN-GC* lock.
       Prior to this patch, when T1 detects a bogus deadlock as T2 has
       been marked as waiting for L1 -- which is not true until the GC is
       finished and normal execution resumes.
     Problem 3:
       T1 holds L1
       T2 is waiting for L1
       GC is triggered in T2 inside GET-MUTEX
       T2 grabs lock L2 due to a finalizer or an after-gc-hook
       GC is triggered in T1
       T1 tries to grab L2 due to a finalizer, etc.
       Same as problem 2, but with a user-lock and POST-GC instead of
       *ALREADY-IN-GC* and SUB-GC.
     This patch fixes the issue by saving, clearing, and restoring
     the waiting-for mark in
      1) interrupt handlers
      2) SUB-GC
      3) POST-GC
Commits on Aug 14, 2011
  1. @pkhuong

    Fix automatic &rest to &more conversion in unsafe code

    pkhuong authored
     Applying &rest lists to known/typed functions can lead to a
     :fixed values call to %more-arg-values.  In that case, unroll
     it into several %more-arg of constant indices.
     Reported, with test case, by Lutz Euler (lp#826459).
  2. @pkhuong

    New function: SB-EXT:SPIN-LOOP-HINT

    pkhuong authored
     Some architectures have developed ways to help the processor execute
     spin loops efficiently; expose them, where applicable, via
     Assembles to PAUSE on x86oids, and to nothing on other platforms.
  3. @pkhuong

    Missing NEWS entry for 4e431db

    pkhuong authored
     Also, missing credit for Lutz Euler's bug report on a7b24b5.
  4. @pkhuong

    Handle SIMPLE-TYPE-ERROR when propagating bounds

    pkhuong authored
     Type conversions (e.g. bignum to float) may signal a
     SIMPLE-TYPE-ERROR rather than returning an infinity.
     Treat that case like an unknown value.
     Add two tests.
     Fixes lp#819269.
  5. @pkhuong

    New function: SB!KERNEL:%MULTIPLY-HIGH

    pkhuong authored
     * Does the same thing as only returning the first value of %MULTIPLY,
       only better on some platforms.
     * Implemented vas VOPs on x86, x86-64 and PPC.  The PPC code sequence
       is fully untested, and merely looks correct.
     * VOPs for fixnum first argument are included, but will only be used
       when the result is forcibly marked as fixnum, e.g., with TRULY-THE.
       Questionnable, but I'd rather err on the side of straightforwardness
       rather than put even more pressure on representation selection.
     * Use it in the division-by-multiplication transform for unsigned
       TRUNCATE by constant.
  6. @pkhuong

    More efficient integer division by multiplication

    pkhuong authored
     * Exploit restricted range for inputs (e.g. fixnums).
     * When the divisor is even, simplify with a mask instead of a shift.
     * Clean up the code a bit: we don't want modular arithmetic, it's
       actually all guaranteed not to wrap around.
     * Change the test so that larger divisors are a bit more likely to
       get tested too.
     * Lots more things can be done, including generalizing the transform
       to pretty much arbitrary rational divisor, or avoiding the costly
       general code sequence in nearly all cases.  Unfortunately, it's a
       lot of (somewhat original, at that) code, and can be fairly slow;
       if it matters to someone, I can try and find a compromise (contrib?).
  7. @pkhuong

    Various (mostly) SSE x86-64 instruction definition fixes and additions

    pkhuong authored
     * Fix typos in mnemonics and non-temporal store definitions;
     * Add some instructions;
     * CLFLUSH was totally broken.
    Taken from Alexander Gavrilov's SSE intrinsics branch.
Commits on Aug 13, 2011
  1. @nikodemus
Commits on Aug 12, 2011
  1. @csrhodes

    allow user-defined STRING synonyms in MAKE-SEQUENCE

    csrhodes authored
    ...and MAP, MERGE, COERCE and CONCATENATE too.  This also meant
    working a bit on TYPEXPAND, to make (STRING <N>) be unexpanded in the
    same way as STRING, and consequently on VALUES-SPECIFIER-TYPE to
    ensure that the system would still recognize those types.
    Include test cases for the sequence functions but not for TYPEXPAND.
Commits on Aug 11, 2011
  1. @stassats

    Declaim sb-di::valid-lisp-pointer-p inline.

    stassats authored
    Making it inline prevents from creating a SAP, and thus reduces
    consing and improves performance. It's called a lot by
    map-allocated-objects when GCing is disabled, so consing less is a
    desirable property.
    Reported by `lisper' on #lisp
  2. @lichtblau

    Fix QUERY-FILE-SYSTEM for Windows UNC and device file names

    lichtblau authored
    Thanks to Anton Kovalenko.
Commits on Aug 10, 2011
  1. @lichtblau

    sb-bsd-sockets: Fix error code handling on Windows

    authored lichtblau committed
      Factored out into a new function for the win32-specific
      WSAGetLastError call.
      Run-time results now match the existing constant definitions.
    Thanks to Anton Kovalenko.
  2. @lichtblau

    sb-simple-streams: In test lp491087, merge the pathname

    lichtblau authored
      Needed for Windows.
    Thanks to Anton Kovalenko.
  3. @lichtblau

    sb-simple-streams: Close files before deleting them on revert

    lichtblau authored
    Thanks to Anton Kovalenko.
Something went wrong with that request. Please try again.