Commit graph

7168 commits

Author SHA1 Message Date
Daniel Kochmanski
bdd17142fb cosmetic: line wrap 2017-07-21 19:34:01 +02:00
Daniel Kochmanski
b15afe097c builder: wrapper: don't output unnecessary code when non needed 2017-07-21 19:33:45 +02:00
Daniel Kochmanski
5a50195666 builder: don't create wrapper when same as init-name 2017-07-21 19:33:27 +02:00
Daniel Kochmanski
f2473ade5b asdf: update to 3.1.8.6
this version allows specifying init-name
2017-07-21 19:30:19 +02:00
Daniel Kochmanski
7f13cc7e48 cleanup: cmp: compute-init-name: get rid of wrapping code
code simplification.
2017-07-21 18:15:28 +02:00
Daniel Kochmanski
5836dc8bec cmp: builder: warn ASDF that it does the wrong thing.
It shouldn't call compute-init-name.
2017-07-21 18:11:55 +02:00
Daniel Kochmanski
b4a83d2955 cmp: make init function name always unique
Add wrapper separately.
2017-07-21 18:11:13 +02:00
Daniel Kochmanski
d1be9436aa cosmetic: add informative comments 2017-07-21 18:10:03 +02:00
Daniel Kochmanski
9061653116 cosmetic: remove gross aux 2017-07-21 17:24:21 +02:00
Daniel Kochmanski
17e4c5de65 cosmetic: don't leave empty line 2017-07-21 17:23:30 +02:00
Daniel Kochmanski
cffe43f9ae normalize-build-target-name: normalize :fasb 2017-07-21 17:21:39 +02:00
Daniel Kochmanski
cc61a627c2 cosmetic: improve C source comment 2017-07-21 16:32:39 +02:00
Daniel Kochmanski
c6b2fb658e tests: add regression test for run-program
Dummy one checking if external-process-status simply finishes.
2017-07-21 15:39:43 +02:00
Daniel Kochmanski
2d88ee6ce1 external-process-status: fix sloppily-coded passage 2017-07-21 15:32:21 +02:00
Daniel Kochmanski
898acea837 compiler.lsp.in: be explicit about lsp library init functio name 2017-07-21 13:13:17 +02:00
Daniel Kochmanski
bf92eca693 contribs: defsystem: disable by default 2017-07-21 12:22:55 +02:00
Daniel Kochmanski
78fc83e4c9 cmpmain: remove unused variable 2017-07-21 12:04:30 +02:00
Daniel Kochmanski
f42cb506e0 cleanup: fix invalid invocation 2017-07-21 11:38:45 +02:00
Daniel Kochmanski
4d4b01b585 cmp: safe-run-program: refactor to print output on error 2017-07-21 10:48:44 +02:00
Daniel Kochmanski
a15cf408c3 cmp: collect-lines: move function to cmputil
cmputil is moved higher in the dependency tree
2017-07-21 10:45:13 +02:00
Daniel Kochmanski
1dd6870cd5 cleanup: signal error if pipe couldn't be created 2017-07-21 10:41:26 +02:00
Daniel Kochmanski
b2a9100ee7 cosmetic: indent +cmp-module-files+ definition 2017-07-21 10:33:41 +02:00
Daniel Kochmanski
00bfed0386 cleanup: remove unused variable 2017-07-21 10:14:23 +02:00
Daniel Kochmański
470f6d7dd0 Merge branch 'develop' into 'develop'
cmp: check types on coerce-to-vector

See merge request !80
2017-07-08 20:40:56 +00:00
Fabrizio Fabbri
088972cace
cmp: check types on coerce-to-vector 2017-07-08 09:26:09 +02:00
Daniel Kochmański
3a837ddcce Merge branch 'develop' into 'develop'
Compiled assoc does not check arguments

See merge request !78
2017-07-07 07:45:56 +00:00
Fabrizio Fabbri
604c87126d
cmp: #353 fix vector-push vector-push-extend
When call those function with invalid argument
number the generated code instead of signal
a programming error does SIGSEGV
2017-07-06 10:44:34 +02:00
Fabrizio Fabbri
cc442ac9cd
Compiled assoc does not check arguments 2017-07-04 04:59:37 +02:00
Fabrizio
261f41fb19 Merge branch 'fix-233-mvb-bug' into 'develop'
Fix 233 mvb bug

Closes #233

See merge request !77
2017-07-02 21:55:07 +00:00
Daniel Kochmański
243646104b cosmetic: remove unused macro 2017-07-02 23:12:12 +02:00
Daniel Kochmański
b1462dcb65 cosmetic: remove extra newline 2017-07-02 23:05:21 +02:00
Daniel Kochmański
c999b56ab5 tests: add regression test for #233. 2017-07-02 23:04:25 +02:00
Daniel Kochmański
cc332a6c3f tests: with-compiler: add todo 2017-07-02 23:03:43 +02:00
Daniel Kochmański
aeaa3017bc tests: fix multiple evaluation of forms 2017-07-02 23:03:29 +02:00
Daniel Kochmański
9735057bc3 stacks: don't call si_set_finalizer
si_set_finalizer is CL-world function and returns 0 values. That means
in particular, that env->nvalues is changed.

In this situation, when new binding was introduced, we could lose our
nvalues, what lead to invalid multiple-value-bind (next commit will
contain a regression test).

We use unprotected version. If interrupts cause problems with it, we
may need to wrap it in disable_interrupts. Threading code uses
ecl_set_finalizer_unprotected without such wrapping though, so I
believe that should be safe.

Fixes #233.
2017-07-02 22:35:37 +02:00
Daniel Kochmański
355d15db3a add legacy definition for FEprogram_error_noreturn 2017-07-01 12:57:15 +02:00
Daniel Kochmański
0828b1f48a equalp: don't compare clos instance slots
Problem identified and fixed by Marius Gerbershagen. Closes #391.
2017-06-30 20:19:51 +02:00
Daniel Kochmański
927178d2e4 cosmetic: add doc stub 2017-06-30 20:16:21 +02:00
Daniel Kochmański
69a14cc686 Merge branch 'develop' into 'develop'
Remove FEprogram_error_noreturn (+ a typo fix)

See merge request !76
2017-06-30 11:10:13 +00:00
Kris Katterjohn
91bf0c4998 Fix typo in error message: ist -> is 2017-06-29 17:29:18 -05:00
Kris Katterjohn
028ab410b2 Remove FEprogram_error_noreturn and replace uses with FEprogram_error
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.
2017-06-29 17:24:54 -05:00
Daniel Kochmański
8fd53c6470 Merge branch 'develop' into 'develop'
Inconsistent and missing checks in binding forms

See merge request !74
2017-06-29 10:16:27 +00:00
Daniel Kochmański
307345764d Merge branch 'develop' into 'develop'
Signal error on invalid constant type checking.

See merge request !75
2017-06-29 08:41:50 +00:00
Kris Katterjohn
643651e320 Move FEillegal_variable_name to error.d and use it where appropriate
This was local to compiler.d, but it should also be used in stacks.d.

This is used in place of the error message introduced in commit 9ff142.
2017-06-28 14:21:28 -05:00
Kris Katterjohn
f5b9430c6c Introduce FEbinding_a_constant and use it where appropriate
This is for signalling an error about binding a constant variable.

This makes the error messages originally in commits 745686, c9e732
and 4e3283 more precise.
2017-06-28 14:03:29 -05:00
Fabrizio Fabbri
6dc40c869c
Signal error on invalid constant type checking.
Side effet was SIGSEGV on compiled code.
2017-06-28 15:58:20 +02:00
Kris Katterjohn
9051af7e60 Rename a constant variable to prevent "make check" failures
Commit 745686 prevents LET from binding constant variables, but this
sometimes caused a problem during "make check".  The problem would
only happen sometimes, depending on the order in which the tests were
run.  cmp.0026.defconstant-warn defines a constant variable named
FOO and cmp.0015.setf-expander binds FOO using LET.  Now rename the
constant variable FOO to +FOO+.

"make check" runs fine
2017-06-27 19:31:52 -05:00
Kris Katterjohn
4e3283706f No longer allow PROGV to bind constants
PROGV was allowed to bind constants in the C-compiler and the bytecode
compiler and interpreter, but the behavior would differ between them:

> (defun foo ()
    (flet ((memq (item list) (member item list :test #'eq)))
      (progv (list :test) (list :test-not)
        (memq 'bar '(bar baz quux)))))
FOO

> (foo)
(BAZ QUUX)

> (compile 'foo)
FOO

> (foo)
(BAR BAZ QUUX)

CLHS says the behavior is undefined when attempting to bind or assign
constant variables (CLHS 3.1.2.1.1.3 and the entry for defconstant).

The C-compiler and bytecode compiler and interpreter give errors when
attempting to bind or assign constant variables in lambda expressions,
LET, SETQ and various other binding/assignment forms.  So the behavior
above in PROGV is inconsistent.

Now give an error when attempting to bind a constant variable in PROGV
in the C-compiler and the bytecode compiler and interpreter.
2017-06-27 18:46:55 -05:00
Kris Katterjohn
c9e7326275 No longer allow M-V-B to bind constants in bytecode compiler/interpreter
M-V-B was allowed to lexically and dynamically bind constants in the
bytecode compiler and interpreter:

> (multiple-value-bind (pi rem) (truncate pi) pi)
3

CLHS says the behavior is undefined when attempting to bind or assign
constant variables (CLHS 3.1.2.1.1.3 and the entry for defconstant).

The C-compiler gives errors for these sorts of things, and the bytecode
compiler and interpreter gives errors when attempting to bind or assign
constant variables in lambda expressions, LET, SETQ and various other
binding/assignment forms.  So the behavior above in M-V-B is
inconsistent with the C-compiler and other parts of the bytecode
compiler and interpreter.

Now give an error when attempting to bind a constant variable in M-V-B
in the bytecode compiler and interpreter.
2017-06-27 18:44:14 -05:00
Kris Katterjohn
74568641cd No longer allow LET/LET* to bind constants in bytecode compiler/interpreter
LET/LET* were allowed to lexically and dynamically bind constants in
the bytecode compiler and interpreter:

> (let ((pi 3)) pi)
3

> (progn (defconstant +c+ 'foo) (let ((+c+ 'bar)) +c+))
BAR

> (flet ((hello () (format t "hi")))
    (let ((t nil))
      (declare (special t))
      ; Oops, now this returns a string
      (hello)))
"hi"

Plus plenty of other ways to wreak havoc on unsuspecting code.

CLHS says the behavior is undefined when attempting to bind or assign
constant variables (CLHS 3.1.2.1.1.3 and the entry for defconstant).
(Well, CLHS 3.4.1 explicitly says that constant variables cannot be
used for variables in lambda lists.)

The C-compiler gives errors for these sorts of things, and the bytecode
compiler and interpreter gives errors when attempting to bind or assign
constant variables in lambda expressions, SETQ and various other forms.
So the behavior above in LET is inconsistent with both the C-compiler
and other parts of the bytecode compiler and interpreter.

Now give an error when attempting to bind a constant variable in
LET/LET* in the bytecode compiler and interpreter.

This also changes the behavior of PROG/PROG* and DESTRUCTURING-BIND so
that they give errors when attempting to bind constants as well.
2017-06-27 18:42:20 -05:00