Commit graph

6268 commits

Author SHA1 Message Date
Stas Boukarev
dfe68fe96a Reduce cache size for generic functions.
Instead of occupying two vector elements (one for the actual value and
one for a bit indicating whether it's an eql-specializer) store cons
cells containing eql specializer values from
CLOS::GENERIC-FUNCTION-SPEC-LIST.
2015-11-01 21:52:57 +03:00
Daniel Kochmański
5532d4b996 generic-dispatch: move copy operation
Move copy operation before the function which has side-effects. Reported
and fixed by clasp dev team. Thanks!
2015-10-31 13:29:35 +01:00
Daniel Kochmański
f605c52f6c Merge branch 'develop' of gitlab.com:embeddable-common-lisp/ecl into develop 2015-10-28 16:09:58 +01:00
Daniel Kochmański
7ec873c128 LICENSE: update examples/ license and ml address
Juan Jose Garcia-Ripoll agreed that examples/ may be relicensed.
2015-10-28 16:08:38 +01:00
Daniel Kochmański
f32e52094e Merge branch 'cc_is_cxx' into 'develop'
emit_cxx_source_if_cxx

Emit ".cxx" source files instead of ".c" source if configured "--with-cxx". This noticeably reduces the amount of whining from the Clang compiler, which considers compiling ".c" as C++ a significant
deprecation. (Note: Need to update the install instructions somewhere to show Mac OS X-ers how to compile ecl with clang/clang++).

Also add pragmas to ecl-cmp.h to reduce Clang warnings (better fix: fix the compiler to not produce the kind of code that triggers the warnings, but this works for the time being.)

See merge request !16
2015-10-22 05:43:31 +00:00
B. Scott Michel
596bb9721a update_changelog
Add CHANGELOG notes.
2015-10-21 14:43:52 -07:00
B. Scott Michel
7734f2e134 ecl-cmp_clang_pragmas
Add pragmas to ecl-cmp.h to reduce Clang warnings (better fix: fix the
compiler to not produce the kind of code that triggers the warnings, but
this works for the time being.)
2015-10-21 14:15:03 -07:00
B. Scott Michel
b69d0c6022 emit_cxx_source_if_cxx
Emit ".cxx" source files instead of ".c" source if configured
"--with-cxx". This noticeably reduces the amount of whining from the
Clang compiler, which considered compiling ".c" as C++ a significant
deprecation.
2015-10-21 14:14:19 -07:00
Daniel Kochmański
6e3b64e428 cmpmain: declare init wrapper as extern C
Fixes #182.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-10-17 09:48:22 +02:00
Daniel Kochmański
b57a4fff71 examples: fix bogus :move-here argument
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-10-02 13:02:00 +02:00
Daniel Kochmański
68fa3985c6 builder: provide wrapper for randomized function init name
Randomized init funciton name is used internally and prevents symbol
clashes which lead to bugs when loading systems of the same name
(bundles for instance).

On the other hand wrapper provides a way to initialize library from
the C code. In this case it is programmer responsibility to name his
system uniquely. It will initialize it's submodules fine.

Fixes #74. Fixes #177.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-10-02 13:01:04 +02:00
Daniel Kochmański
4548ed7c4c Merge branch 'random-64' into develop 2015-10-01 14:11:10 +02:00
Daniel Kochmański
251bf80461 Merge branch 'develop' into random-64 2015-10-01 14:10:41 +02:00
Daniel Kochmański
55bbfcfaeb cmpname: don't randomize init function names for libraries
Both shared and static libraries might be linked from C code and names
of the initialization functions has to be known without parsing the
file. Related to #177 and #74. FWIW it doesn't introduce regression on
ADSF bundles (#74) and solves initialization problem (#177).

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-10-01 13:29:53 +02:00
Daniel Kochmański
03045d98ae cmp: remove deprecated verbosity variables
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-10-01 11:03:46 +02:00
Attila Lendvai
15f3d7feab fix bootstrap error printing in universal_error_handler.
Signed-off-by: Attila Lendvai <attila@lendvai.name>
2015-09-29 17:41:28 +02:00
Daniel Kochmański
25caf88a74 changelog: update
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-23 10:08:47 +02:00
Daniel Kochmański
970ccb7c36 compiler: accept foreign object files
Sometimes we want to build with objects from CFFI (like
wrappers). These doesn't have entry point and initialization
function. If we'll encounter such an object just attach it without
adding it to the initialization queue. Fixes #174.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-23 09:03:51 +02:00
Daniel Kochmański
0ddd169795 changelog: update wrt 64bit / C99 switch
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-22 23:26:09 +02:00
Daniel Kochmański
0d639873ff hash.d: compute hash_string properly
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-22 22:55:35 +02:00
Daniel Kochmański
61b30811c1 random: provide 64 bit implementation
This change pulls dependency on C99 types

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-22 22:37:48 +02:00
Daniel Kochmański
f1dda6384c random-state: use portable solution
This results in twice as big array as we could use if uint32_t was
granted with C99 - half of the bytes on 64 bit platforms are filled
with 0. Despite that it's clean and portable solution without
immediate imposing dependency on C99.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-22 20:36:20 +02:00
Daniel Kochmański
91e04ba339 tests: run random-states test on make check
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-22 18:36:00 +02:00
Daniel Kochmański
de322d9b0c cosmetic: use (void) instead of ()
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-22 18:07:21 +02:00
Daniel Kochmański
dd37dd2851 random-state: more informative message
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-22 16:32:50 +02:00
Daniel Kochmański
a8432f4f9c random-state: use 32 bit types for 32 bit implementation
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-22 16:16:40 +02:00
Daniel Kochmański
a85579c198 version: bump version to 16.1.0
We have API changes (#$ and with-rwlock) and various bugfixes. Note
that it's not the release yet, just version bump.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-21 19:42:38 +02:00
Daniel Kochmański
6a5f5d2de6 doc: update random-sates section
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-21 19:38:30 +02:00
Daniel Kochmański
ccafd2c54e random: add regression tests
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-21 19:14:20 +02:00
Daniel Kochmański
68e89cbf97 random: update changelog
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-21 18:15:14 +02:00
Daniel Kochmański
82ef9aa318 random-state: allow initialization from the array
Array used for initialization is an array of the final values of
internal vector used to generate next randoms which should be a
product of initialization from a random seed.

This ability is required by CLHS to be able to read back the printed
random state. To print readable representation of random state
*print-readably* should be bound to T.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-21 18:08:50 +02:00
Daniel Kochmański
03efe83b99 random-state: use byte32 array for internal representation
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-21 17:09:39 +02:00
Daniel Kochmański
3e3423bce4 random: add comment for 64 rng
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-09-21 10:30:07 +02:00
Daniel Kochmański
07ad0fc2f2 init-random: fix #$ for fixnums (allow providing seed)
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-09-21 10:22:51 +02:00
Daniel Kochmański
783f4730a8 init-random: move array allocation to init_genrand
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-09-21 10:21:44 +02:00
Daniel Kochmański
fc7443732b init-random-state: factor out function taking seed argument
We want this to be able to initialize random state from the fixnum and
from the array (following commits). This also simplifies code a
little.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-20 18:37:18 +02:00
Daniel Kochmański
079976263c cosmetic: add copyright and fix whitespaces
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-20 16:30:53 +02:00
Daniel Kochmański
f1d256f2ea random: correct Mersenne-Twister RNG initializer
Previous code had some deviations from the original algorithm and a
bug preventing the use of the value acquired from /dev/urandom. This
is the corrected version.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-20 13:04:42 +02:00
Daniel Kochmański
ba758250da init_random: fix typo affecting random state seed
Implementation of random seed buffer filler for windows were shadowing
using /dev/urandom source. I'm convinced that author's intention was
to put there "else".

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-20 12:00:28 +02:00
Daniel Kochmański
f6524873c7 num_random: remove dead code
Removal of obsolete number generator working on fixnum. It was
conditionally defined with 0 so it's a dead code.
2015-09-20 11:57:01 +02:00
Matthew Mondor
bff9aced44 Merge branch 'broken-symlinks' into 'develop'
directories: don't break on broken symlinks

ECL when asked for a truename of a broken symbolic link signalled an
`file-error'. This isn't non-conformity, because spec doesn't specify
such situation, but lead to annoying errors with DIRECTORIES when even
irrelevant files were broken symlinks.

New behavior is as follows - broken symlinks are treated as regular
files (of :LINK kind) and no error is signalled. They aren't ignored
due to a few corner cases related to PROBE-FILE, OPEN and such.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>

See merge request !13
2015-09-18 19:31:55 +00:00
Matthew Mondor
b56eb93532 Merge branch 'backquote-reader-fix' into 'develop'
reader: fix backquote reader if the input is incomplete

This makes behaviour consistent with single-quote reader. Fixes #159.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>

See merge request !12
2015-09-18 19:22:47 +00:00
Daniel Kochmański
25e3408b3c changelog: update
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-18 18:28:42 +02:00
Daniel Kochmański
ac918e981f doc: typo
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-18 18:26:14 +02:00
Daniel Kochmański
22b647144c directories: don't break on broken symlinks
ECL when asked for a truename of a broken symbolic link signalled an
`file-error'. This isn't non-conformity, because spec doesn't specify
such situation, but lead to annoying errors with DIRECTORIES when even
irrelevant files were broken symlinks.

New behavior is as follows - broken symlinks are treated as regular
files (of :LINK kind) and no error is signalled. They aren't ignored
due to a few corner cases related to PROBE-FILE, OPEN and such.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-18 18:18:06 +02:00
Daniel Kochmański
9513d70fd2 doc: mention directory additional key argument
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-18 18:16:18 +02:00
Daniel Kochmański
36b90075af reader: fix backquote reader if the input is incomplete
This makes behaviour consistent with single-quote reader. Fixes #159.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-18 11:51:21 +02:00
Daniel Kochmański
8b27c69374 run-program: declare additional keys in symbols_list.h
Each key used in core environment has to be declared beforehand in
`symbols_list.h'. Fixes #166. Fixes #149.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-18 11:31:26 +02:00
Daniel Kochmański
fb5ce8b31a Merge branch 'heap-size-agreed' into 'develop'
Heap related fixes

- User-defined heap sizes can now exceed the size of a fixnum on 32-bit
  Fixes issue #140

- The heap size limit was intended to be 1GB on 32-bit or 4GB on 64-bit
  but inconsistency between ECL_FIXNUM_BITS and FIXNUM_BITS in the code
  prevented the heap to grow for 64-bit.  This now occurs, and a few
  other less visible bugs were fixed by restoring consistency to
  ECL_FIXNUM_BITS.

See merge request !11
2015-09-12 08:15:01 +00:00
Matthew Mondor
c5c606cc01 - User-defined heap sizes can now exceed the size of a fixnum on 32-bit
Fixes issue #140

- The heap size limit was intended to be 1GB on 32-bit or 4GB on 64-bit
  but inconsistency between ECL_FIXNUM_BITS and FIXNUM_BITS in the code
  prevented the heap to grow for 64-bit.  This now occurs, and a few
  other less visible bugs were fixed by restoring consistency to
  ECL_FIXNUM_BITS.
2015-09-11 16:54:18 -04:00