Commit graph

46 commits

Author SHA1 Message Date
Marc Nieper-Wißkirchen
db7480e743 Implement SRFI 229: Tagged Procedures 2021-11-30 20:43:37 +01:00
Alex Shinn
4d22949f71 disable fileno unification by default 2021-04-27 18:30:43 +09:00
Alex Shinn
42aab7905c enable SEXP_USE_STRICT_TOPLEVEL_BINDINGS by default (issue #699) 2021-04-19 10:46:26 +09:00
McKay Marston
683554c2ab make 9front "work" again by properly handling 64-bit typedefs 2021-02-20 17:10:43 -07:00
Alex Shinn
4335d238fb image options are harmless in non-image build; images not supported on 32-bit arch 2020-07-31 15:32:59 +09:00
Alex Shinn
306cc73bd6 Revert "image options are harmless in non-image build; images not supported on 32-bit arch"
This reverts commit 9b859eda36.
2020-07-31 15:32:18 +09:00
Alex Shinn
9b859eda36 image options are harmless in non-image build; images not supported on 32-bit arch 2020-07-31 15:31:43 +09:00
Alex Shinn
36f188d274 adding notes about benchmarks for string-ref approaches 2020-07-29 12:28:40 +09:00
Alex Shinn
4ec2167f62 making the abi a little more stable by default 2020-06-08 00:54:36 +09:00
okuoku
1b46d91053 Win32: Guess SEXP_USE_GREEN_THREADS
Guess SEXP_USE_GREEN_THREADS=0 ifdef `_WIN32`.
2020-06-05 05:59:33 +09:00
Alex Shinn
61f2983fad apply an explicit max vector length check (issue #636) 2020-05-22 14:13:48 +09:00
Vitaliy Mysak
5726c2e490 Prevent stack overflow in sexp_mark_one (issue #601)
Replace explicit recursion by heap allocations
in sexp_mark_one code.
This prevents crashes caused by stack overflow.
In particular, fixes issue #601.

As an optimization, allocate a fixed sized stack buffer first,
which should be enough for "normal" uses.
When that stack overflows, switch to heap.

Also, store "ranges" on the stack, instead of the actual sexp's,
using the fact that sexp's of a single parent are continous in memory.

This patch doesn't remove recursion on the context saves
because it didn't seem like they overflow in practice.
But changing that is simple having the stack interface.
2020-05-15 20:11:50 +02:00
Donaim
bd62a076c6 Avoid undefined C macro behavior
MacOS and clang compilers complain about undefined behavior
in C macro.
Rewrite macro to solve that.

Fixes issue #638
2020-05-13 22:23:17 +02:00
Alex Shinn
83e82f55a7 tweaks for fixed-size heaps, fix issue #632 2020-05-11 10:43:36 +09:00
Alex Shinn
e3db106f96 instrumenting alloc times and sizes 2020-05-06 23:39:01 +09:00
Alex Shinn
156ddf793d better benchmark timing 2020-05-03 17:05:53 +09:00
Kris Katterjohn
4c1af8c92a Fix NetBSD, DragonFly BSD and Darwin feature detection
On NetBSD systems the netbsd feature identifier was not actually
provided because the macro SEXP_NETBSD was defined twice and the
second value was 0.

On DragonFly systems the dragonfly feature identifier was not actually
provided because the macro SEXP_DRAGONFLY was defined twice and the
second value was 0.  Also on DragonFly systems the darwin feature
identifier was incorrectly provided because SEXP_DARWIN had a value of
1 instead of 0.
2019-08-15 19:03:57 -05:00
Andrew Gwozdziewycz
e5ae89c9c6 Define / detect explicit features for BSD platforms 2019-08-02 11:33:59 -07:00
okuoku
3d4e8bb3e6 Introduce SEXP_STATIC_LIBRARY
Introduce SEXP_STATIC_LIBRARY to support static-library build on
Win32/Win64. On Win32, symbol visibility is enforced on DLL builds so we
need to dedicated ABI on static-library builds.
2019-06-23 05:46:22 +09:00
Alex Shinn
08140baa3e making builtin write bounded to avoid cycles (fixes issue #532) 2019-04-02 22:31:33 +08:00
Alex Shinn
9569460a58 add compile-time option to store precomputed index->cursor tables for strings 2019-01-26 05:35:27 +08:00
Alex Shinn
2b4394ea74 adding initial support for SRFI 160 uniform vectors 2019-01-15 23:43:50 +08:00
Marc Nieper-Wisskirchen
f9be5c8d46 Make write/display output bytevectors with hex constants (issue #483) 2018-11-06 14:22:38 +01:00
Kris Katterjohn
f32def466b Avoid undefined C macro behavior
A C macro expanding to a `defined' has undefined behavior.  The
clang compiler was issuing warnings.
2018-07-29 19:58:37 -05:00
Bertrand Augereau
952d7c806b More portable bignums that don't have to rely on gcc 128bit arithmetics extension
SEXP_USE_CUSTOM_LONG_LONGS currently needs SEXP_64_BIT
2018-06-19 04:46:05 +02:00
joe9
b85201f81d patch to compile on 9front 2018-01-12 19:26:17 -07:00
okuoku
7693881125 sexp.c: Use strncasecmp instead of strcasestr
strcasestr is not available on MS C runtime. Use strncasecmp instead
which is in POSIX. MS C runtime has _strnicmp().
2017-11-18 15:24:28 +09:00
okuoku
e092923aac Win32: Fix win32 port
Try to fix win32 port. Now it runs both on Win32/Win64.

Win64 port currently depends on 128bits arithmetic thus it does not run on
MSVC.

Makefile now have EXCLUDE_POSIX_LIBS knob to exclude posix related library
from build.

Introduce msys PLATFORM for Makefile.detect to use MSYS's POSIX
emulation layer. It is intended for linking against MSYS tools; it is
not for embedding to Win32 applications.
2017-11-11 04:31:06 +09:00
Alex Shinn
eeb4beb571 adding alignment detection for sparc and mips 2017-08-29 23:07:50 +09:00
Alex Shinn
8a9d8c0979 don't arithmetic shift signed ints (fixed issue #425) 2017-08-29 22:47:44 +09:00
Alex Shinn
700380ebe4 don't expand into defined (issue #423) 2017-07-09 08:07:19 +09:00
VermillionAzure
b955dc2698 Arranged definitions to prevent double definition
- It is possible to define `strcasecmp` and
  `strncasecmp` twice if `__MINGW32__` is defined.
  However, the same definition is used if it's not.
  Therefore, I just moved it inside of the "if-defined"
  case. It removes the errors pertaining to that header.

- Additional compilation errors related to the filesystem
  implementation and POSIX definitions of constants still
  are brought up when compiling on Windows 10, MSYS2-mingw-w64
  with gcc.
2017-03-06 00:11:25 -10:00
Alex Shinn
e1d58eb84a adding SHUT_{RD,WR} from mkeeter 2017-02-20 22:14:15 +09:00
Alex Shinn
0c80f38a19 making string-cursors a disjoint type 2016-03-29 22:25:09 +09:00
Alex Shinn
fb24b831b8 fix reading circular refs inside vectors 2016-03-04 23:41:16 +09:00
Chris Walsh
2005c19ea0 Added full support for packed images, both for static and dynamic libraries. 2016-02-15 21:12:58 -05:00
Alex Shinn
2c2ff588df Smarter polling in blocked output without threads, enable polling in blocked input.
Fixes issue #295.
2015-12-30 14:07:50 +09:00
Frère Jérôme
584f74dbd9 Handle missing strcasestr() in MinGW 2015-11-19 09:37:37 +01:00
Alex Shinn
bc262aa7ad adding support for reader labels in core reader 2015-07-06 23:18:33 +09:00
Alex Shinn
42c14af4b9 removing support for SEXP_USE_STRING_STREAMS 2015-07-04 23:25:40 +09:00
Alex Shinn
950312f13b adding optional tracking of gc time 2015-06-14 23:03:19 +09:00
Alex Shinn
6db194171e Adding option to disable automatic running of finalizers altogether. 2015-06-14 16:19:55 +09:00
Alex Shinn
24a880ad28 Adding fixed-size heaps as an experimental compile-time option. 2015-04-25 22:24:56 +09:00
Alex Shinn
4dda923081 Updating copyright years. 2015-04-09 01:28:02 +09:00
Alex Shinn
447eb20a07 Disabling 2010 epoch by default. 2015-03-03 00:40:02 +09:00
Alex Shinn
2922ed591d Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00