1. 19 Apr, 2020 1 commit
  2. 08 Apr, 2020 1 commit
    • Daniel Kochmański's avatar
      compiler: rewrite clos::need-to-make-load-form-p · aa34ab71
      Daniel Kochmański authored
      Function is rewritten in C in compiler.d to remove a dependency
      between the bytecodes compiler and the clos module. It may be more
      performant thanks to more precise type handing, however we use a list
      instead of a hashtable, so it may be slower with lookup. To assess
      that we should run some benchmarks against real code -- rewriting C
      code to work with a hash table should be trivial.
      
      clos::need-to-make-load-form-p is now si::need-to-make-load-form-p and
      may be called from C code as si_need_to_make_load_form_p.
      aa34ab71
  3. 12 Jan, 2020 1 commit
  4. 04 Jan, 2020 1 commit
    • Marius Gerbershagen's avatar
      bignums: don't use ecl_alloc_atomic for gmp · c301b108
      Marius Gerbershagen authored
      The gmp manual (https://gmplib.org/manual/Custom-Allocation.html) states
      
      > GMP may use allocated blocks to hold pointers to other allocated
        blocks. This will limit the assumptions a conservative garbage
        collection scheme can make.
      
      Thus we can't use ecl_alloc_atomic. We could just use ecl_alloc
      instead, however our implementation is already structured in such a
      way that it is sufficient to use ecl_alloc_uncollectable. The reason
      for that is that currently all bignums except those in the bignum
      registers in the thread local environment are allocated as compact
      objects so that we only need to call mpz_clear for the few non-compact
      objects in the bignum registers.
      
      See also commits 7b536161 and bd48b859.
      Fixes #485.
      c301b108
  5. 08 Dec, 2019 4 commits
    • Marius Gerbershagen's avatar
      stacks.d: fix several problems with C stack · e37fafb3
      Marius Gerbershagen authored and Daniel Kochmański's avatar Daniel Kochmański committed
      ecl_cs_set_org and cs_set_size had several problems:
      -the size of the stack was estimated to be 1/2 of the actual value,
       which could lead to wrong stack overflow errors. In particular, we
       cannot assume that the stack pointer will always start at the stack
       origin and increase/decrease linearly (counterexamples could
       include callbacks from other threads).
      -despite its name, cs_set_size did not actually set the stack size
       even on systems where this is possible at runtime.
      -there were several magic numbers used.
      e37fafb3
    • Marius Gerbershagen's avatar
      cmp: check that number of arguments matches the declaration in symbols_list.h · fbdb0a32
      Marius Gerbershagen authored and Daniel Kochmański's avatar Daniel Kochmański committed
      We also use the *in-all-symbols-functions* variable only for
      determining which functions are to be exported during the build of ECL
      itself. Otherwise, instead of specifying manually, which Lisp
      functions are exported and in the core, we use the information from
      symbols_list.h (i.e. we let all_symbols.d initialize all core
      functions).
      fbdb0a32
    • Marius Gerbershagen's avatar
      846cf3f3
    • Marius Gerbershagen's avatar
      fix for calling conventions treating fixed and variadic arguments differently · 18cb1b35
      Marius Gerbershagen authored and Daniel Kochmański's avatar Daniel Kochmański committed
      Previously, we assumed that the fixed and variadic arguments of a
      variadic function were passed to the function in the same way. The
      arm64 calling convention used by iOS breaks this assumption by passing
      fixed arguments in registers or on the stack, depending on the
      position, while variadic arguments are always passed on the stack.
      
      Solving this problem while still allowing function redefinition at
      runtime requires introducing additional dispatch functions. These
      dispatch functions take no fixed arguments and pass all their
      arguments to the actual function. This dispatch is enabled by passing
      -DECL_C_COMPATIBLE_VARIADIC_DISPATCH to the C compiler.
      
      This problem was originally identified and a solution provided by
      thewhimer@gmail.com. This commit based on his work with minor
      improvements.
      18cb1b35
  6. 04 Dec, 2019 1 commit
  7. 18 Aug, 2019 1 commit
  8. 14 Aug, 2019 1 commit
  9. 23 Jul, 2019 1 commit
  10. 15 Jul, 2019 1 commit
  11. 24 May, 2019 1 commit
    • Daniel Kochmański's avatar
      long-float: remove conditionalization · ea87100a
      Daniel Kochmański authored
      Many parts of the source code were bent backward to support builds
      without long floats which are always present given we depend expect
      c99 compiler.
      
      The corresponding C macros (ECL_LONG_FLOAT) and the *feature*
      entry (:long-float) are marked as deprecated in the documentation.
      ea87100a
  12. 13 May, 2019 1 commit
    • Daniel Kochmański's avatar
      complex float: add a new types and builtin classes · a0a92dc2
      Daniel Kochmański authored
      What has changed:
      
      - new types si:complex-float, si:complex-single-float,
        si:complex-double-float and si:complex-long-float
      - new builtin classes long-float (for completness) and
        si:complex-float
      - new internal function si:complex-float and si:complex-float-p for
        constructing complex floats (both arguments must be of the same
        float type) and a type predicate
      - printer for new types (right now it conses, see below)
      - a new feature :complex-float
      - a new type is recognized as a type disjoint of complex and real
      
      - cleanup: +built-in-type-list+: remove some redundancy
        For instance instread of saying
          (real (or integer single-float double-float ratio))
        We say
          (real (or integer float ratio))
        etc.
      
      Flaws which will be fixed in upcoming commits:
      
      - complex-float hierarchy is independent of the complex hierarchy
      - ecl_make_complex_float could be replaced by _ecl_make_complex_*float
      - write_complex_float allocates new objects for printing
      - write_complex_float does print unreadable object
      - math dispatchers doesn't recognize the object
      
      Testing things out:
      
      > (si:complex-float 0.0d0 0.0d0)
      ; #<CF(0.0d0 0.0d0)>
      > (si:complex-float 0.0d0 0.0s0)       ; signals type error
      > (+ (si:complex-float 0.0d0 0.0d0) 1) ; signals type error
      
      lisp runtime: make si_complex-float a subtype of a number.
      a0a92dc2
  13. 07 Feb, 2019 1 commit
  14. 07 Jan, 2019 1 commit
  15. 10 Dec, 2018 1 commit
  16. 02 Nov, 2018 5 commits
  17. 15 Oct, 2018 2 commits
  18. 27 May, 2018 2 commits
  19. 08 May, 2018 1 commit
    • Marius Gerbershagen's avatar
      debugger: add option to print C backtrace · 22793613
      Marius Gerbershagen authored and Daniel Kochmański's avatar Daniel Kochmański committed
          Split si_dump_c_backtrace up into two functions:
          - _ecl_dump_c_backtrace() (already declared in internal.h, but not
            implemented) using only C functions printing to stderr to be used
            in case of internal errors
          - si_dump_c_backtrace() using lisp functions to be used in the
            debugger
          Remove broken emulation of backtrace and backtrace_symbols
          functions using __builtin_return_address.
      22793613
  20. 01 May, 2018 1 commit
    • Daniel Kochmański's avatar
      Moderate interface cleanup · 0494fb15
      Daniel Kochmański authored
      - unicode name tables are always compiled in when we have unicode support
      - thread local variables support is removed
      - profile and rt contribs are deprecated
      0494fb15
  21. 23 Feb, 2018 1 commit
  22. 20 Feb, 2018 1 commit
    • Marius Gerbershagen's avatar
      threading: fix race condition in stacks_scanner · a8d7305f
      Marius Gerbershagen authored
          The garbage collector can call stacks_scanner in a thread before
          pthread_setspecific, leading to a wrong error message. The
          solution is simply not to mark the environment, if
          pthread_setspecific has not yet been called.
      a8d7305f
  23. 11 Feb, 2018 1 commit
  24. 22 Jan, 2018 1 commit
  25. 06 Jan, 2018 1 commit
  26. 11 Oct, 2017 1 commit
  27. 09 Oct, 2017 1 commit
  28. 12 Aug, 2017 1 commit
  29. 07 Aug, 2017 1 commit
  30. 29 Jun, 2017 1 commit
    • Kris Katterjohn's avatar
      Remove FEprogram_error_noreturn and replace uses with FEprogram_error · 028ab410
      Kris Katterjohn authored
      These two function are the same.
      
      Here is my understanding: FEprogram_error_noreturn was introduced with
      the noreturn function attribute in commit 7d9fb8bb because
      FEprogram_error did not have this attribute.  However, FEprogram_error
      got the noreturn function attribute in commit 790d466c.  Now there is
      no reason to have both of these.
      
      This removes FEprogram_error_noreturn and changes all calls to it
      with calls to FEprogram_error instead.
      028ab410
  31. 28 Jun, 2017 1 commit