Commit graph

505 commits

Author SHA1 Message Date
Daniel Kochmański
915b40ce03 cleanup: move C/CXX part of CLOS to src/c/clos/ directory
instance.d and gfun.d were in the top C source directory.
2017-05-06 18:27:34 +02:00
Daniel Kochmański
d6e5f95d6e combin.lsp: remove eval from method combinations 2017-01-15 12:03:13 +01:00
Daniel Kochmański
4d215b05fc print-object: print structure slots conformingly
Fixes #178.
2017-01-15 12:02:49 +01:00
Vadim Penzin
fa0b55ba5b Prevent CLOS' stream-read-line from signalling end-of-file while reading unterminated lines. 2017-01-05 13:44:38 +02:00
Daniel Kochmański
30d783904d simplify simplify-lambda and install-method functions
Remove dead code branches.
2016-11-20 20:11:46 +01:00
Daniel Kochmański
8a099051ed refactor: clean up defmethod macro
prerequisite step for bugfix
2016-11-20 19:51:53 +01:00
Daniel Kochmański
17bce26704 Add declarations in call-next-method closure
Lack of them caused omission of `ignorable' declaration what lead to the
bogus style notes. Fixes #80.
2016-11-20 11:23:32 +01:00
Daniel Kochmański
8df64c7dc7 CDR: implement cdr-14
Added CDR-1, CDR-5 and CDR-14 to *features*.

https://common-lisp.net/project/cdr/document/14/index.html
2016-11-05 19:08:15 +01:00
Stas Boukarev
5f0beddf69 Better printing of method objects.
Print method qualifiers.
For specializers, print class names, not class objects, and print eql specializers.

(defmethod m :around (a b (c (eql "10"))))
was

#<standard-method M (#<BUILT-IN-CLASS T> #<BUILT-IN-CLASS T>
                     #<CLOS:EQL-SPECIALIZER>)>
becomes
#<standard-method M :AROUND (T T (EQL "10"))>
2016-08-30 21:37:24 +03:00
Daniel Kochmański
9874b6e53a ieee-floats: fix printing of NaN's
Add readable print if the feature :ieee-floating-point is present.
2016-08-12 08:48:36 +02:00
Daniel Kochmański
bc567e0c3f ieee-floats: fix printing
Do redundant type test in case we're calling it from somewhere else.
2016-08-12 08:28:43 +02:00
Daniel Kochmański
ed5ecd03eb ieee-floats: fix builds with --with-ieee-fp=no
Functions to print (nan,float)-to-string and and predicates are still
available, but ext:*-float-*-infinity aren't available if ECL is built
with option `--with-ieee-fp=no`.
2016-08-11 22:38:30 +02:00
Daniel Kochmański
7569359860 make-load-form: add random-state implementation 2016-08-10 13:55:06 +02:00
Daniel Kochmański
c13cab3dc6 cosmetic: fix error message arguments 2016-08-09 17:36:05 +02:00
Daniel Kochmański
1636b6110f print-object: add default t-specialized printer
Fixes #193.
2016-07-03 17:05:36 +02:00
Daniel Kochmański
8406e1e4fc signal: fix the problem with restart-case and signal
Fixes #247.
2016-05-29 14:17:37 +02:00
Stas Boukarev
e4cdda1182 Remove a spurious character in SIGNAL. 2016-04-20 19:30:54 +03:00
Daniel Kochmański
1b32325af0 mop: r-o-s-a: change find-method invocation
Fix removing optional slot accessors when classes are redefined when
calling on anonymous classes.
2016-03-26 07:01:12 +01:00
Daniel Kochmański
7be1680f96 mop: initialize-instane: add additional check
This ensures, that superclasses get initialized properly.
2016-03-26 07:00:18 +01:00
Daniel Kochmański
1d7e3c1dc4 mop: fix incorret superclass reinitialization
Slots are only modified when they are explicitly passed (see HyperSpec
entry for shared-initialize).
2016-03-26 06:59:04 +01:00
Daniel Kochmański
7898553d6a mop: fix bug in compute-applicable-methods-using-classes
Move computation of args-specializers from #'sort-applicable-methods up
to #'std-compute-applicable-methods. Fix suggested by @costanza.
Fixes #203.
2016-01-04 20:40:37 +01:00
Daniel Kochmański
84f0a89da3 cosmetic: line wrapping 2016-01-04 10:29:27 +01:00
Daniel Kochmański
40c82c18d8 gray-streams: remove CLOSE general specialization
Some libraries somewhat abuse the CLOSE method specializing it on their
own stuff which isn't a stream. Calling the NEXT-METHOD triggers the
condition. For pragmatic reasons we'll honor this and will specialize
only on the streams.
2015-11-27 17:54:02 +01:00
Daniel Kochmański
ed8714ab21 cosmetic: fix indent and wrap lines correctly 2015-11-27 13:35:37 +01:00
Matthew Mondor
4f89d66d41 Fix some fallout from the script to correct/add Emacs and ViM syntax
directives.  Some files had more than one existing Emacs directives,
breaking the script which didn't expect this.
2015-09-03 16:16:12 -04:00
Daniel Kochmański
c80e3cad11 Merge branch 'style' into 'develop'
"style" temporary branch

The ECL code no longer uses tabulator characters, they were replaced
by spaces.

A custom script was used to insert/replace Emacs and ViM per-file editor
settings according to their type and the new ECL coding style.

See merge request !8
2015-09-03 18:07:04 +00:00
Matthew Mondor
8f07cd58d8 The ECL code no longer uses tabulator characters, they were replaced
by spaces.

A custom script was used to insert/replace Emacs and ViM per-file editor
settings according to their type and the new ECL coding style.
2015-09-03 07:35:47 -04:00
Daniel Kochmański
527be2a017 printer: coerce float infinity more roboustly
Basically use C function instead of a generic Lisp one.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-03 08:47:00 +02:00
Daniel Kochmański
d15c42d2a1 printer: float infinity/nan: coerce printed form to base-string
CLOS printer uses normal strings while float_to_string.d calls
push_base_string to cache printable form of infinity (and nan). Coerce
clos strings to base-string. Fixes #153. Related to #114.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-09-03 08:12:08 +02:00
Matthew Mondor
5517fa5631 Change *FEATURES* name :NEW to :WAKLER (clos/walk.lsp) after
discussion
2015-08-27 04:46:28 -04:00
Daniel Kochmański
61a5f49639 clos: add single-float and double-float to built-in class hierarchy
Some libraries want methods to specialize on double-float and ECL
fails on such attempts. Fixes #96.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
2015-07-26 12:41:27 +02:00
Daniel Kochmański
a4283c3f8c clos: fix `print-object' for non- standard-object's
Previous commit overgeneralized. Handle just one particular corner
situation, when print-object leaks from standard-object to builtin
class T.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-07-07 16:11:47 +02:00
Daniel Kochmański
74021ab1a9 clos: fix `print-object' specialized on T (infinite recurrence)
Corner case. When user despite spec defines method `print-object'
specialized on standard-object and calls call-next-method,
`print-object' specialized on T called `write', which triggers
original `print-object' specialized on `standard-object'.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-07-07 12:00:49 +02:00
Daniel Kochmański
180567dfbd stack-overflow: improve condition message
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-24 17:09:41 +02:00
Daniel Kochmański
09ae630cde stack: add special conditional handler for stack-overflow
Add `serror' and `stack-error-handler', which behave like normal
`cerror' -> `universal-error-handler' call order, except fact, that
after handling stack-overflow condition they reset appropriate stack
limit. Fixes #56.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-24 13:45:54 +02:00
Daniel Kochmański
4d19a27424 cosmetic: untabify
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-21 14:38:20 +02:00
Daniel Kochmański
c0f7a92651 cosmetic: indentation fix
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-20 21:58:03 +02:00
Daniel Kochmański
6d3e7ef4e8 clos: implicit generic function definition doesn't have &key arguments
According to second paragraph of
http://www.lispworks.com/documentation/HyperSpec/Body/m_defmet.htm
generic function should mention key (if it is in method), but now key
arguments. Fixes #76.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-20 21:52:27 +02:00
Daniel Kochmański
e32a9b0000 clos: walk-c-inline: Declare ignoring unused variable context. Closes #26. 2015-04-03 10:05:54 +02:00
Daniel Kochmański
1e6c44a824 method.lsp: declare ignoring unused variable. Closes #12 (#11). 2015-03-14 22:02:52 +01:00
Daniel Kochmański
a7d5e1519d std-slot-value.lsp: declare ignoring unused variable. Closes #13. 2015-03-14 21:58:05 +01:00
Daniel Kochmański
36e80a3c66 kernel.lsp: Remove bogus ignore doc declaration. Closes #11. 2015-03-14 19:57:35 +01:00
Matthew Stickney
76a84246b0 Fix si:bind-simple-handlers.
Call the right local function, SIMPLE-RESTART-FUNCTION not
SIMPLE-HANDLER-FUNCTION.
2014-08-20 18:11:28 +04:00
Philipp Marek
e6ad5fa90e Add the code-walker back to ECL.
This makes eg. WALKER:MACROEXPAND-ALL available again.
2014-04-28 07:51:27 +02:00
Philipp Marek
52bbd35150 Redefine CL:FILE-POSITION for GRAY, too. 2014-03-20 20:44:03 +01:00
Stas Boukarev
a2a23bee12 ensure-generic-function-using-class: don't use NAME for reinitialization.
MOP says that when ensure-generic-function-using-class is called with
a generic function, it just calls reinitialize-instance with
the supplied initargs.

http://www.alu.org/mop/dictionary.html#ensure-generic-function-using-class

Fixes #283.
2014-03-08 02:29:46 +04:00
Stas Boukarev
5c9a58723a Fix NO-APPLICABLE-METHOD.
Its lambda-list should be (generic-function &rest function-arguments), not
(generic-function function-arguments).

Its value should be returned at the call site of the generic function.

Fixes #278.
2014-02-23 09:48:55 +01:00
Juanjo Garcia-Ripoll
703257886f Fixed typo 2013-10-15 09:47:30 +02:00
Juan Jose Garcia Ripoll
6f7c8baeb3 Fixed typo in ALLOCATE-INSTANCE (for structure-class) 2013-05-23 12:33:58 +02:00
Juan Jose Garcia Ripoll
388cdfeef3 MAKE-INSTANCE now works with structures, too 2013-05-22 21:54:14 +02:00