Commit graph

52 commits

Author SHA1 Message Date
Juan Jose Garcia Ripoll
e283f53d02 Let DO-M-V-SETQ-ANY use VALUE0 2012-12-16 12:04:34 +01:00
Juan Jose Garcia Ripoll
7b2fbd6fb1 MULTIPLE-VALUE-BIND now compiles using the same tools as MULTIPLE-VALUE-SETQ 2012-12-16 10:26:16 +01:00
Juan Jose Garcia Ripoll
26ef0dd1fe Further C code beautification: spaces around '=', indentation of optional values. 2012-12-02 00:08:23 +01:00
Juan Jose Garcia Ripoll
1c95758108 Use the new brace routines in BLOCK, TAGBODY, CATCH, UNWIND-PROTECT, multiple values 2012-12-01 00:10:07 +01:00
Juan Jose Garcia Ripoll
825fc8cbd3 Cnil and Ct are now part of legacy 2012-06-30 23:01:40 +02:00
Juan Jose Garcia Ripoll
f109f94a91 Change the syntax of CHECKED-VALUE so that it matches the one of THE. 2011-12-31 18:46:01 +01:00
Juan Jose Garcia Ripoll
d5fd199116 Added some IGNORE declarations and fixed some references to undefined variables. 2011-12-28 16:33:27 +01:00
Juan Jose Garcia Ripoll
d9d6d6864d C2 functions now receive the C1FORM as an argument. 2011-12-28 12:00:01 +01:00
Juan Jose Garcia Ripoll
93c6b00878 MULTIPLE-VALUE-SETQ and PSETQ also introduce type checks. 2011-12-28 00:20:30 +01:00
Juan Jose Garcia Ripoll
c2e2171dc0 Avoid recursive invocation of C1EXPR by allowing the C1 processors to act like macros, returning new forms to be processed. Remove also the CATCH for compiler errors, since we now rely on conditions for signal handling. 2011-12-27 12:36:52 +01:00
Juan Jose Garcia Ripoll
910e79852e Instead of using system property lists, create dispatch tables for handling the C1, T1, C2 forms and others. 2010-05-26 12:12:57 +02:00
Juan Jose Garcia Ripoll
49d45942c5 M-V-BIND did not handle properly a proclaimed function with a number of return values that exceed the number of bound variables. 2010-05-18 11:08:04 +02:00
Juan Jose Garcia Ripoll
e15a517fc3 Misuse of C2EXPR* in the expander for VALUES 2010-05-13 18:18:56 +02:00
Juan Jose Garcia Ripoll
feafc6bd77 (VALUES x) can be optimized whenever the destination is not RETURN/VALUES 2010-05-13 17:55:30 +02:00
Juan Jose Garcia Ripoll
aca68e9fc6 Improve the code generated for VALUES eliminating the intermediate variable when there is only one output value 2010-05-13 17:24:27 +02:00
Juan Jose Garcia Ripoll
7c92b0fc8c The function C1FORM-VALUES-NUMBER is now factored and grouped with the other C1FORM functions in cmpform. 2010-05-13 17:03:28 +02:00
Juan Jose Garcia Ripoll
6a91d3b45a Refactored code so that it is shared by cmp and new-cmp:
* Use the new proclamations/sysfun.lsp files from the new compiler.
* We split src/cmp/cmpdefs.lsp into cmpdefs, cmppackage, cmptypes and cmpglobals
* Split cmpform.lsp out of cmpmac.lsp
* Merged in {cmp,new-cmp}/cmpc-wt.lsp some of the cmpmac wt routines
* Use functions instead of macros for the WT-* operations
* Split out from *cmp/cmpenv.lsp a file cmppolicy.lsp
* A single file, cmpenv-api.lsp for the manipulation of environments.
* The type comparison functions go into cmptype-arith.lsp and are cached.
* The code that propagates types in function calls goes into cmptype-prop.lsp.
* The remainings of cmpenv go into cmpenv-{declare,proclaim,declaim}.

Associated fixes:
* Fixed typo and wrong proclamation for SI:GET-SYSPROP.
* Fixed typo in SIMPLIFY-ARITHMETIC.
* Explicitely set the debug level when building ECL
* All declarations are stored in the compiler environment.
* Each function and form stores the compilation environment.
* Declaration POLICY-DEBUG-IHS-FRAME is acts only on the function environment.
* Make the definition if ihs_env only happen when it is used.
* Eliminated *notinline*, *inline-functions*  and *function-declarations*
* Slightly more efficient creation of accessors in kernel.lsp
* Remove the proxy C2DECL-BODY
* Fix the order of declarations in SI:PROCESS-DECLARATIONS
* Reimplemented C1BODY using SI:PROCESS-DECLARATIONS
* DECLAIM's proclamation do not propagate beyond the compiled file.
2010-05-05 17:36:19 +02:00
Juan Jose Garcia Ripoll
0b3075cb96 src/cmp/cmpmulti.lsp: c1multiple-value-bind replaces multiple-value-bind with a let form when there is only one variable to be bound. 2009-11-14 18:00:56 +01:00
Juan Jose Garcia Ripoll
0ea425866c Organize the code in INLINE-ARGS, factoring out parts that can be used in call-global-loc and allowing the use of temporary variables which are not of type :cl-object. 2009-07-04 17:17:50 +02:00
Juan Jose Garcia Ripoll
7c5ab4f1fb Some functions now take a cl_env_ptr argument, becoming better isolated. 2008-10-11 22:32:54 +02:00
jgarcia
52f4df1901 Merged the new function call code 2008-02-16 10:28:32 +00:00
jgarcia
a59f90871a Emacs modelines for better editing 2008-02-02 19:14:05 +00:00
jgarcia
022fda6f95 Integrated variables into the compiler environment. Variable *VARS* disappears. 2006-06-12 08:52:28 +00:00
jgarcia
20ab0394db New special forms for handling the lisp stack. These constructions are used for function calls with too many arguments, multiple-value-prog1, unwind-protect, etc 2006-05-29 08:53:53 +00:00
jgarcia
fd49f0fdbc Some declarations in sysfun.lsp have return type *. Interpret this as (VALUES &REST). 2006-05-06 08:20:42 +00:00
jjgarcia
986198842f Removed useless variable \*special-binding\*. C1ADD-GLOBAS is now properly renamed C1DECLARE-SPECIALS and does the right thing: to push the special variable declarations onto the \*VARS\* stack and not to add them to the global proclamations. 2005-05-13 11:43:22 +00:00
jjgarcia
b1d6df4894 C-INLINE forms can now output multiple values 2005-03-15 14:21:42 +00:00
jjgarcia
06b3047b1d + Fixes in the code for backquoted vectors `#(,a ,b ...)
+ Fixes in the compiler code for CATCH and VALUES
+ Slight improvement in the readability of compiled CATCH
+ Implemented lisp hooks for cleaning on exit.
+ Improvements in the help messages from "configure"
2005-02-14 10:26:29 +00:00
jjgarcia
e4fa9f4e73 Merged in the new compiler structure doubly linked list. 2004-12-16 15:56:54 +00:00
jjgarcia
c756aeb543 Discarded data is compiled with C2EXPR\* 2004-11-23 15:07:17 +00:00
jjgarcia
a85c392142 Several fixes. Functions are now created only with C1COMPILE-FUNCTION. 2004-08-13 13:31:24 +00:00
jjgarcia
c33431f02c The list of variables could be shorter than the list of supplied values 2004-05-17 08:12:52 +00:00
jjgarcia
09922eb8d4 Remove debug statement 2004-05-17 07:44:08 +00:00
jjgarcia
24688d57f8 Teach the compiler how to produce C functions with a fixed number of arguments when the corresponding lisp function does not have any &optional, &rest, &key. Teach it also how to produce slimmer code for MULTIPLE-VALUE-SETQ/BIND. The type of a C1FORM can now be a (VALUES ...) expression, the first value being obtained with C1FORM-PRIMARY-TYPE. 2004-05-17 07:32:52 +00:00
jjgarcia
4e3189eddd Big changes in the way functions are compiled, unifying the code that handles DEFUN, DEFMACRO and LAMBDA, and fixing an important bug in the optimizer for tail-recursive calls. 2004-05-05 08:38:07 +00:00
jjgarcia
403511c488 The portable CLX library has been incorporated. 2004-03-25 09:02:27 +00:00
jjgarcia
b30b43ce17 (VALUES form) now truncates the number of values output by 'form' to one. 2004-01-19 17:54:10 +00:00
jjgarcia
8d6ffa8edf Warn the user about a type mismatch between the variables in M-V-S-Q and the
type that M-V-S-Q assumes (which is always 'T until we find a better method).
2003-12-19 10:08:45 +00:00
jjgarcia
b147bb43e8 Made the compilation of function calls simpler. Now only two routines, C1CALL-LOCAL and C1CALL-GLOBAL do handle the calling of symbols, and C1FUNCALL is left for the rest. 2003-12-09 09:34:21 +00:00
jjgarcia
4eac79774e Preliminary support for POSIX threads. 2003-11-18 11:23:07 +00:00
jjgarcia
d45438dce9 Sending arguments via the lisp stack to a local function with lexical
and closure environments did not work. Example of failed code
(funcall
    (compile nil
            '(lambda (a b c)
               (labels ((%f6 (f6-1 f6-2) c))
                 (multiple-value-call #'%f6 (values a c)))))
    0 10 20)
2003-11-05 17:32:45 +00:00
jjgarcia
fc8deffa71 src/c 2003-10-22 07:27:44 +00:00
jjgarcia
540e4140f4 Forms are now stored as structures. 2003-10-16 07:38:17 +00:00
jjgarcia
df97ca1b92 Fixed bug that prevented compilation under windows. ECL is now built as a single shared library on systems which support it. The compiler is being rewritten using higher level, more expressive functions. 2003-09-08 16:53:29 +00:00
jjgarcia
a381a7ee09 Merge NEW_COMPILER 25.05.03 2003-05-26 09:49:50 +00:00
jjgarcia
6b76d155ee Create new functions SI::{GET,PUT,REM}-SYSPROP to handle vital information
about functions, SETF forms, DEFTYPEs, etc. Property lists are no longer
used for this task.
2003-03-21 14:18:56 +00:00
jjgarcia
41c0868469 Bunch of fixes. See CHANGELOG. 2003-03-17 10:39:08 +00:00
jjgarcia
f589ddf587 When compiling a (VALUES ...) form, put the result in VALUES; do not use
value0, because then the compiler assumes only one value is produced.
2002-12-05 09:48:52 +00:00
jjgarcia
b0ce08d0ea Changes towards 0.7b comprise naming and calling conventions. See CHANGELOG. 2002-11-04 14:08:24 +00:00
jjgarcia
a9e4edf4d0 The calling conventions have been changed. SI::C-ARGUMENTS-LIMIT and
LAMBDA-PARAMETERS-LIMIT are both 64. Up to C-ARGUMENTS-LIMIT may be
passed to a function using C calling conventions. If the function is
to retrieve more arguments, (for instance through a &rest variable),
this can be done, but then the arguments have to be pushed on the lisp
stack. This method allows us to raise the CALL-ARGUMENTS-LIMIT up to
MOST-POSITIVE-FIXNUM. From a users point of view, there is no visible
change, excep the fact that a function may receive more arguments.

The function apply() has been replaced with cl_apply_from_stack().
The former took a pointer to the list of arguments. The latter assumes
that the last "narg" elements on the lisp stack are the arguments of
the function.
2002-10-21 09:27:58 +00:00