1. 23 May, 2022 1 commit
  2. 20 May, 2022 2 commits
    • Eric Timmons's avatar
      RUN-PROGRAM: Try to use execvp even if :ENVIRON is specified · e6b17033
      Eric Timmons authored
      Unfortunately, execvpe is not standard. However, we can replicate its behavior
      by pointing **environ to a new array of environment variable assignments before
      On Darwin, shared libraries do not have direct access to **environ. Instead, we
      use the return value of _NSGetEnviron().
      Rename all existing uses of environ (as a variable name) to my_environ as
      environ now names a macro on both Darwin and Mingw.
      If the target does not HAVE_ENVIRON, fall back to execve as before.
    • Eric Timmons's avatar
      Improve PROCESS-ENVIRON tests · bad77f49
      Eric Timmons authored
      (ext:run-program "env" nil :environ '("foo=bar")) actually exits with non-zero
      status because 1) PATH is not specified in the child process and even if it
      were 2) the use of :ENVIRON prevents ECL from searching the PATH for child
      Rewrite the tests to actually highlight the failure.
  3. 06 May, 2022 1 commit
  4. 27 Apr, 2022 3 commits
  5. 29 Mar, 2022 2 commits
  6. 28 Feb, 2022 1 commit
  7. 27 Feb, 2022 2 commits
    • Catherine Tower's avatar
      Add unit test for HASH-TABLE-TEST · 88b09a6b
      Catherine Tower authored
      The test ensures that there's no error when HASH-TABLE-TEST is called on a hash
      table with a custom equality function. The tests pass, with some caveats:
      - I'm only about 70% sure that FINISHES is the right test-predicate to use for
        something like this
      - The test suite would consistently fail with non-deterministic segfaults while
        testing the MULTIPROCESSING subtest. This could easily be due to the fact that
        I'm using a FreeBSD machine, and don't have access to a Linux machine at the
        moment -- though I'd be happy to re-run the tests when I do. The test suite
        completed when I commented out the MULTIPROCESSING subtest from the ASD
        file. I don't believe this would have any bearing on whether or not the hash
        table tests should pass
    • Catherine Tower's avatar
      Add missing break statement to cl_hash_table_test · f0d46570
      Catherine Tower authored
      Without the break statement an error is signalled for any hash table with a
      custom test function
  8. 20 Feb, 2022 2 commits
  9. 19 Feb, 2022 1 commit
    • Marius Gerbershagen's avatar
      hash-tables: performance improvements · 16faca09
      Marius Gerbershagen authored
      Previously, we used the "tombstones" approach for removing entries
      from a hash-table, that is buckets were marked as previously occupied
      but currently empty. If the hash-table did not grow in size these
      tombstones were never cleaned up, only reused for new entries.
      For a general purpose hash-table this is a problematic strategy
      because there are workloads where this significantly slows down any
      attempted lookup or deletion for elements that are not contained in
      the hash-table. This happens when new elements are added and deleted
      regularly for a long time without the size of the hash-table changing.
      Even if the hash-table is never filled above a small fraction of its
      size, tombstones will eventually accumulate which an unsuccessfull
      search for an element will have to skip over.
      In the new implementation, we don't use any tombstones at all but
      instead shift elements into more optimal buckets.
      In the case where the hash-table in the old approach was free of
      tombstones, the new approach is a little slower for the process of
      deleting from highly occupied hash-tables itself but inserting into a
      hash-table is a little bit faster on the other hand.
  10. 05 Feb, 2022 11 commits
    • Daniel Kochmański's avatar
      clos: sort-applicable-methods: be specific regarding arguments · 2307259f
      Daniel Kochmański authored
      The function SORT-APPLICABLE-METHODS accepts as the third argument called
      ARGS-SPECIALIZERS however this function assumed that the argument was a list
      of argument's classes (i.e not EQL specializers) - see COMPARE-SPECIALIZERS.
      This commit doesn't change the function signature but conses a new list that
      is ensured to be a list of classes and passes them to COMPARE-METHODS.
      COMPARE-SPECIALIZERS have the argument name changed to reflect their true
      The function COMPARE-SPECIALIZERS takes the CLASS-PRECEDENCE-LIST of the class
      of the argument to break ties when there is no direct relationship between
      method specializers.
    • Daniel Kochmański's avatar
      clos: compute-applicable-methods: small refactor · f37fe953
      Daniel Kochmański authored
      Pull a function APPLICABLE-METHOD-LIST into its sole consumer
    • Daniel Kochmański's avatar
      clos: add a reference implementation of the legacy discriminator · 86e71d7e
      Daniel Kochmański authored
      This implementation is included for the reference and benchmarks.
    • Daniel Kochmański's avatar
      clos: c-a-m-using-classes: don't give up eagerly on EQL specializer · 74c08fa0
      Daniel Kochmański authored
      Previously a local function APPLICABLE-METHOD-P returned (values nil nil) when
      it found an EQL-specializer where the object was of a matching class. This is
      premature because some later specializer may make the method not applicable
      based on one of the argument classes, so there is no need to resort to
    • Daniel Kochmański's avatar
      clos: rewrite compute-g-f-spec-list · 9ff049c9
      Daniel Kochmański authored
      Previously this function stored a list of elements
        (cons list-or-random-atom argument-position)
      ARGUMENT-POSITION was preasumbly stored because authors anticipated denoting
      unspecialized arguments, however all positions were always filled because
      unspecializer argument had non-nil specializer #<BUILTIN-CLASS T>.
      LIST-OR-RANDOM-ATOM contained either a list of EQL specializers or a random
      specializer from all method specializers. The second value was not clear.
      This change simplifies the code and the interface, we additionally maintain
      additional information. From now on the list stores elements:
        (cons class-specializer-p eql-specializers)
      CLASS-SPECIALIZER-P is either NIL or T denoting whether the generic function
      has a method specialized on this argument on a class other than T.
      EQL-SPECIALIZERS without change, is a list of all EQL specializers.
    • Daniel Kochmański's avatar
      clos: rework slightly the dispatch mechanism · 84200fd3
      Daniel Kochmański authored
      - improve set-generic-function-dispatch comments
      - add a new file that contains "lisp-defined" dispatchers
      - remove unused code
    • Daniel Kochmański's avatar
      clos: finalize-inheritance conformance fix · 5cb67471
      Daniel Kochmański authored
      According to "Reinitialization of Class Metaobjects" reinitialize-instance
      must call finalize-inheritance if the class was already finalized.
    • Daniel Kochmański's avatar
      clos: add a missing method finalize-inheritance for forward classes · 2d5da9e8
      Daniel Kochmański authored
      MOP specifies that FINALIZE-INHERITANCE should have a method specialized on
      the FORWARD-REFERENCED-CLASS that signals an error.
    • Daniel Kochmański's avatar
      clos: add-method: call add-direct-method for specializers · acc51626
      Daniel Kochmański authored
      Previously we didn't call it due to bootstrapping issues, but now we convert
      functions to methods after early methods are fixed up and their classes are
      also updated, so we can. This fix improves conformance.
    • Daniel Kochmański's avatar
      clos: various bootstrap improvements · 653cba53
      Daniel Kochmański authored
      The most notable change applies to the file fixup.lsp. Functions destined to
      be generic are converted to their final version.
      Previously this conversion was done in a few steps in order to avoid issues
      with infinite recursion in dispatch. We achieve this by assigning to these new
      generic function a simplified discriminating function:
          (lamda (&rest args)
            (unless (or (null *clos-booted*)
                        (specializers-match-p args specializers))
              (apply #'no-applicable-method generic-function args))
            (apply old-function args))
      The old function is also seeded as a primary method for the generic
      function. This works correctly because functions have only one method so we
      may directly call it (it is also a fine optimization strategy we do not
      incorporate generally yet), and because the discriminating function will be
      recomputed when other methods are added etc.
      This way we may use these generic functions without issues directly with newly
      redefined versions and the file is now ordered as follows:
      - fixup early methods
      - redefine functions to their final version
      - convert functions to generics
      - define missing methods
      - implement the dependant maintenance protocol
      After this file is loaded it is possible to use generic functions as usual.
    • Daniel Kochmański's avatar
      defstruct: fix incorrect compatibility checks · ea92cba4
      Daniel Kochmański authored
      Previously we've checked whether the new defstruct is compatible with the old
      one like this:
      (let ((old-desc (old-descriptions struct)))
        (when (and old-desc (null (compat old-desc new-desc)))
          (error "incompatible")))
      This was to allow new definitions. This is incorrect, because allows first
      defining a structure without slots and then adding some, like
      (defstruct foo)
      (defstruct foo xxx)
      The new check verifies whether the structure is a structure and then compares
      slot, so the verification is not inhibited when the first definition doesn't
      have slots.
      Moreover we now test for slot names being string= because:
      a) initargs and functions ignore the package (so functions will be redefined)
      b) we want to match gensymed slot names
      This is compatible with what sbcl does.
      On top of that check for duplicated names and signal an error if there are
  11. 04 Feb, 2022 4 commits
  12. 31 Jan, 2022 1 commit
  13. 29 Jan, 2022 1 commit
  14. 23 Jan, 2022 1 commit
  15. 15 Jan, 2022 1 commit
  16. 09 Jan, 2022 1 commit
    • Marius Gerbershagen's avatar
      numbers: be consistent with branch cuts and signed zero · 8da3475b
      Marius Gerbershagen authored
      Let the sign of zero determine from which side branch cuts are
      approached, no matter whether we use C99 complex numbers or not.
      Disable the (acosh -∞) test. This test fails with the new code, but
      was supposed to be commented out anyway. In general, we don't
      guarantee anything about infinity if complex numbers are involved.
      Closes #661.
  17. 06 Jan, 2022 4 commits
  18. 23 Dec, 2021 1 commit