Commit graph

7366 commits

Author SHA1 Message Date
Daniel Kochmanski
e92cfdf437 Unify compilation environment markers
In both bytecmp and c compiler we use si:function-boundary and
si:unwind-protect-boundary where appropriate. Previously bytecmp used an ad-hoc
special variable for function-boundary and didn't mark unwind-protect at all.

Remove recently-introduced ECI package (maybe we will reintroduce it later when
we'll have a common frontend for compilers).
2018-02-15 12:44:49 +01:00
Daniel Kochmanski
c94784ac77 Add semaphore helpdoc's and latest changes to changelog. 2018-02-14 17:10:44 +01:00
Daniel Kochmanski
76b78660b2 Merge branch 'cmp-fix-macrolet' into develop 2018-02-14 16:30:10 +01:00
Daniel Kochmanski
c2209e5a53 minor documentation improvements 2018-02-14 16:29:26 +01:00
Daniel Kochmanski
289ef6e37b Add help entry for si::eval-with-env. 2018-02-13 14:38:14 +01:00
Daniel Kochmanski
50fb814fd1 Accept all valid function names in c::compile
Previously we accepted only symbols, now we use si:valid-funciton-name-p
predicate to allow (setf foo) as well.
2018-02-13 13:22:12 +01:00
Daniel Kochmanski
2862fc611d Add regression tests for non-lambda exprs and (setf fun) names 2018-02-13 12:44:52 +01:00
Daniel Kochmanski
fd183e575f Better error messages, bc-compile improvements
bc-compile is more conforming now (we validate definition and name, also our
closure compilation is a bit better, still broken though).

Also improve some error messages and add periods at the end.
2018-02-13 12:43:32 +01:00
Daniel Kochmanski
2f01e576a2 Add regression tests for recent bugs / problems.
Bug with bclosure is not fixed yet.
2018-02-13 10:07:44 +01:00
Daniel Kochmanski
d9da8648cd Look up a lexical macro before a compiler macro.
Fixes #83. Fixes #237.
2018-02-12 16:02:00 +01:00
Daniel Kochmanski
857ea3d928 interpreter: don't create closures for null lexenv
We have created empty closure for instance when flet was in null lexenv. Check
for Null in close_over and create t_bclosure only for non-null lexical
environments.
2018-02-12 16:01:26 +01:00
Daniel Kochmanski
67e9c5bef0 Cosmetic fixes to bytecodes compiler. 2018-02-12 16:01:02 +01:00
Marius Gerbershagen
21016c9fc9 Merge branch 'cmp-fix-374' into 'develop'
Moderate compiler refactor

Closes #374

See merge request embeddable-common-lisp/ecl!98
2018-02-11 17:42:06 +00:00
Daniel Kochmanski
c9cf8df872 cosmetic: add two entries to gitignore. 2018-02-10 20:25:45 +01:00
Daniel Kochmanski
7ec2f4a939 Major cleanup for environment mark interpretation
Code was previously written with an assumption, that we know whenever function
crosses lexical for closure boundaries before it is compiled (and env-mark for
such boundries was LB and CB appropriately). Later it has changed, but code was
ready to work with LB and CB marks.

Fix these parts of code and replace it with a single mark ECI:FUNCTION. Also
replace CL:UNWIND-PROTECT boundry mark with ECI:UNWIND-PROTECT so we are less
dependent on use-ing CL package. Adjust comments to have this change.
2018-02-10 20:21:11 +01:00
Daniel Kochmanski
82efbab4c0 cmp: update comments in cmptypes
It contained some information which is no longer valid (and makes it hard to
grok a code if the programmer doesn't know what it does already).
2018-02-10 18:14:51 +01:00
Daniel Kochmanski
cae6f0004d cmp: simplify return-from c1form
Now it accepts 3 arguments (not 4) because variable is taken from blk-var.
2018-02-10 18:14:17 +01:00
Daniel Kochmanski
07843b3e86 Don't depend in tag-ref-{ccb,clb} which are broken anyway
We have dummy variable for that, so we refere to

(var-ref-ccb (tag-var blk))
(var-ref-clb (tag-var blk))

Brokeness comes from the fact that closures are computed after function
compilation pass-1 (and tagbody is inside). Analogous change to the previous
commit in cmpblock.

Also improve comments in cmptypes to make it clear that these parts are not
used. Further refactor could make tag inherit from variable - then we wouldn't
have a dummy variable and unnecessary fields whatsoever.
2018-02-10 18:01:55 +01:00
Daniel Kochmanski
78d4e5f923 Don't depend in blk-ref-{ccb,clb} which are broken anyway
We have dummy variable for that, so we refere to

(var-ref-ccb (blk-var blk))
(var-ref-clb (blk-var blk))

Brokeness comes from the fact that closures are computed after function
compilation pass-1 (and block is inside). Fixes #374.

Also improve comments in cmptypes to make it clear that these parts are not
used. Further refactor could make blk inherit from variable - then we wouldn't
have a dummy variable and unnecessary fields whatsoever.
2018-02-10 17:52:30 +01:00
Daniel Kochmanski
f9fbd3ee30 Add test for local variable corruption inside block #374. 2018-02-10 17:52:30 +01:00
Daniel Kochmanski
3f9c69d5b3 Add unwind-protect transformation when cleanup-forms are empty
This optimization doesn't buy us much but it doesn't cost us anything
either. Note that it emits c1form in case of expression what means that
expression won't be promoted to top-level form after the reduction.
2018-02-10 17:52:30 +01:00
Daniel Kochmanski
c138be5818 cmp: some cleanup changes
Add missing declarations here and there, remove setf to unused variable etc.
2018-02-10 17:51:53 +01:00
Daniel Kochmanski
48d5420b16 cmp: all baboon have now error message
This is useful for identification, where the problem occured. Also add some
indent and line wrap fixes which are estetic. Comment out unused variable.
2018-02-05 18:11:35 +01:00
Daniel Kochmanski
9be0e12ccd Revert "Fix package of *clos-booted* which is set in streams"
This reverts commit 04e8b63b18.
2018-02-03 16:27:30 +01:00
Daniel Kochmanski
04e8b63b18 Fix package of *clos-booted* which is set in streams
GRAY package was used and symbols were not EQ, so I assume this was a
typo. Problem noticed by drmeister (thanks!).
2018-02-03 11:16:51 +01:00
Marius Gerbershagen
9227f4e342 fix #409: order of evaluation of values forms
the fix for #330 is unaffected
2017-12-29 16:58:27 +01:00
Marius Gerbershagen
39000946e3 bytecmp: Make sure that load time forms are applied in the correct order. Fixes #312 2017-12-19 21:13:11 +01:00
Daniel Kochmanski
2e9c58b3d4 mulithreading: fix semaphore-signal
It didn't wake up all processes to check the condition what caused n+1 lag in
condition check for signal-process (when called with n>1). Fixes #421. No
regression test, because this is already tested in sem-signal-* tests (they were
failing).
2017-12-08 13:40:34 +01:00
Daniel Kochmanski
a51f28f6a5 tests: improve some fail explanations, add last-fail var 2017-12-08 13:40:34 +01:00
Daniel Kochmanski
5bb14d94c7 cosmetic: add ignore declaration
see #16.
2017-12-08 13:40:34 +01:00
Daniel Kochmański
fead4ce858 Merge branch 'develop' into 'develop'
Fix for #292

See merge request embeddable-common-lisp/ecl!97
2017-12-08 07:23:29 +00:00
Marius Gerbershagen
31ed58b7c3 add regression test for #292 2017-12-02 22:08:39 +01:00
Marius Gerbershagen
a0a1a54747 don't check type declarations for default values of optional and keyword function arguments
almost all other implementations do the same, so we should also
allow this edge case
2017-12-02 21:49:46 +01:00
Daniel Kochmański
21f0b92fdd Merge branch 'develop' into 'develop'
New documentation: small update

See merge request embeddable-common-lisp/ecl!96
2017-11-28 19:41:24 +00:00
Tomek Kurcz
f34938c506 Port the porting ECL section from the old doc 2017-11-25 13:00:47 +01:00
Tomek Kurcz
5116a13ebc Port the interpreter section from the old doc 2017-11-25 12:55:46 +01:00
Tomek Kurcz
de5e28ccac Update status.org for the new documentation
Some things that are actually written already weren't ticked in the
TODO list.
2017-11-25 12:36:51 +01:00
Marius Gerbershagen
80ced3c9b1 add test for #418 2017-11-21 18:00:25 +01:00
Marius Gerbershagen
2f48a7df9d loop.lsp: remove wrong type declaration for on keyword. Fixes #418 2017-11-21 17:59:20 +01:00
Daniel Kochmański
d2fc77d4f9 Merge branch 'develop' into 'develop'
Fix #410 link error as feenableexcept not present on OSX.

Closes #410

See merge request embeddable-common-lisp/ecl!95
2017-11-05 10:10:45 +00:00
Marius Gerbershagen
c279138bb2 bytecmp.lisp: allow T for :output-file in bc-compile-file. Fixes #393 2017-11-03 20:29:09 +01:00
Fabrizio Fabbri
45722f06c9
Fix #410 link error as feenableexcept not present on OSX. 2017-10-23 00:40:37 -04:00
Daniel Kochmanski
e45b808aa8 help: add documentation for posix threads (process module) 2017-10-11 10:55:43 +02:00
Daniel Kochmanski
92206c1704 help: update open doc 2017-10-11 10:27:10 +02:00
Daniel Kochmanski
e42d95d41a cosmetic: some indent fixes 2017-10-11 10:27:01 +02:00
Daniel Kochmanski
a7e376c0b5 process: use newly added interface make-stream-from-fd 2017-10-11 10:26:30 +02:00
Daniel Kochmanski
c771b46c5f feature: export make-stream-from-fd interface 2017-10-11 10:25:59 +02:00
Daniel Kochmanski
05871c943a fix debugging leftover 2017-10-09 22:56:32 +02:00
Daniel Kochmanski
835e85bc99 cleanup: remove dead code block
if x length is < 5, reader will signal an error, so it will never be
equal 2. Probably a leftover from some previous bytecodes
implementation state.
2017-10-09 22:51:52 +02:00
Daniel Kochmanski
9ba7440782 bytecmp: be smart wrt bytecompiled code
bytecompiled functions may not have a name (i.e lambda assigned to
smothing). Recognize that fact, so when we read back such functions
from file we can call bc-compile on them. Fixes #313.
2017-10-09 22:45:50 +02:00