Commit graph

15 commits

Author SHA1 Message Date
jjgarcia
38134ccfdc When a variable has a lexical reference from a local function, this varible
must be stored in a vector. The number of these vectors (i.e. the "lexical
level") was not properly computed: sample bogus code
   (funcall
    (compile nil
            '(lambda (b)
               (labels ((%f8 nil -39011))
                 (flet ((%f4 (f4-1 f4-2 &optional (f4-3 (%f8)) (f4-4 b))
                             (%f8)))
                   (%f4 -260093 -75538 -501684 (let ((v9 (%f8))) -3))))))
2003-11-06 08:34:32 +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
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
35040b43ef In closures and local functions, the environment and the lexical variables
should not count as arguments. Not a fix, but makes code more readable.
2003-05-03 17:20:42 +00:00
jjgarcia
c2aa136143 Various minor fixes, and an important set of changes to teach the compiler
and the interpreter to understand (SETF fname) function names, and to handle
them without creating auxiliary symbols.
2003-04-28 15:55:22 +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
b0e60245a4 c::*funs* may contain symbols (like CB marking closure boundary),
function structures (marking function definitions), or lists with the
format (fname MACRO interpreted-function), to denote MACROLET
expansions.
2002-12-17 10:45:36 +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
jjgarcia
a910aa351d Remove debugging statement. 2001-07-29 09:46:15 +00:00
jjgarcia
afc2bd70d3 Make the code more portable with respect to changes on the direction of
growth of the stack and in the way va_arg() arguments can be accessed.
Fix the bytecodes compiler so that it handles toplevel forms properly and
so that it understands LOCALLY.
Split configure.in into configure.in+aclocal.m4 and improve the resulting
tests.
2001-07-27 17:01:28 +00:00
jjgarcia
8563a1fc1c Fix the compiler so that when it finds LOCALLY, MACROLET or SYMBOL-MACROLET
at the top level, it processes their bodies as top level forms as well. For
instance, (LOCALLY (EVAL-WHEN (:COMPILE-TOPLEVEL) (PRINT "HELLO"))), now works.
2001-07-19 15:33:46 +00:00
jjgarcia
2d8d0cd44b Initial revision 2001-06-26 17:14:44 +00:00