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
Daniel Kochmanski
b851e85701
cosmetic: line unwrap
2017-10-09 22:45:38 +02:00
Daniel Kochmanski
21f670894a
run-program: fix typo
2017-10-09 10:15:21 +02:00
Daniel Kochmanski
a42d199b6a
run-program: move t->stream coercion at the beginning
...
this is important for piping.
2017-10-09 10:01:19 +02:00
Daniel Kochmanski
e329d5bb49
tests: fix test for non-thread builds
2017-10-09 09:47:50 +02:00
Daniel Kochmanski
b00b15b078
external-process: use locks only when threads are enabled
2017-10-09 09:38:26 +02:00
Daniel Kochmanski
3d7f68445b
changelog: add run-program changes
2017-10-09 09:36:05 +02:00
Daniel Kochmanski
3c4e374feb
tests: run-program: enable tests for virtual streams
2017-10-09 09:36:02 +02:00
Daniel Kochmanski
3043dac56b
ext:run-program: implement virtual streams for input/output/error
2017-10-09 09:35:59 +02:00
Daniel Kochmanski
2a98ce10fe
core: si:copy-stream has three arguments
...
argument `wait' denots, whenever we wait for EOF or yield when there
is no input available in the first stream.
2017-10-09 09:35:54 +02:00
Daniel Kochmanski
7cad2c8e7d
types: introduce ext:virtual-stream type
...
This type applies to all streams which doesn't have a
descriptor (gray:fundamental-stream and string-stream for now).
2017-10-08 20:21:49 +02:00