Commit graph

57 commits

Author SHA1 Message Date
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
f20736084b Add more symbols to src/c/symbols_list.h, and resolve associated conflicts. 2003-04-28 09:25:58 +00:00
jjgarcia
1af46c7c39 Use the READER-ERROR condition to signal errors in the reader. 2003-04-10 17:40:34 +00:00
jjgarcia
d8300559a9 Protect both calls to the library initialization function, because for
some cases, also the first call executes code.
2003-03-21 14:12:54 +00:00
jjgarcia
41c0868469 Bunch of fixes. See CHANGELOG. 2003-03-17 10:39:08 +00:00
jjgarcia
5478bbe21b DLLs and files have now termination procedures, which unload the DLL or close
the file, when these objects are garbage collected.
2003-03-12 10:05:42 +00:00
jjgarcia
9771e91572 + New implementation of DESTRUCTURING-BIND
+ The bytecodes compiler now alloes a lambda list with &key and no keywords
+ WITH-HASHTABLE-ITERATOR implemented
+ QUIT is now silent
+ In MAKE-PATHNAME, values supplied with a value of NIL would be overwritten
  by the content of :DEFAULTS.
2003-03-04 16:35:03 +00:00
jjgarcia
495d5d0172 We need string.h for memcpy(). 2002-12-09 12:47:44 +00:00
jjgarcia
62141f9f5d Replace int -> cl_fixnum, cl_index, to avoid problems with 64-bit archit.
Make sure that structure/instance slots may be indexed with a simple integer.
2002-12-09 12:10:33 +00:00
jjgarcia
acb4f2ef3f The name of the character was clobbered and could not be accessed by
the call to FEerror().
2002-12-04 17:46:15 +00:00
jjgarcia
ffbfd24425 When illegally trying to access a closed stream, signal an error of type
STREAM-ERROR. Also, check operations from the C library for possible errors
and use FElibc_error() when these input/output operations fail.
2002-11-27 15:54:25 +00:00
jjgarcia
0cb11a2aad Global variables preserving_whitespace, detect_eos_flag, escape_flag and
delimiter_char removed. Function readc_stream and unreadc_stream renamed
to ecl_getc and ecl_ungetc. They now have a C-like behavior, do not
complain about EOF and return the special value EOF when the end of the
file is reached.
2002-11-24 15:52:15 +00:00
jjgarcia
52ed3c4904 Only one whitespace needs to be "eaten". 2002-11-23 18:06:41 +00:00
jjgarcia
e241cfec55 Fix a typo. In comma_reader, PEEK-CHAR should be called with the stream to
be read.
2002-11-23 17:52:43 +00:00
jjgarcia
a6fea4e63e After reading an object, READ should skip whitespaces until it fints the
beginning of a new line, the EOF, or a new token. This way (READ-LINE)
at the prompt, produces the expected result instead of an empty line.
2002-11-23 15:42:09 +00:00
jjgarcia
cfb16c1920 + The tests for the type and size of cl_fixnum have been grouped.
FIXNUM_BITS and CHAR_BIT do not rely now on "char" being 8-bit
  large.
+ All configuration settings are now grouped in config.h. This file
  has two parts, and the second one, containing flags which are only
  needed during the build process, is deleted when installing ECL.
+ File critical.h merged into lwp.h.
2002-11-20 17:26:21 +00:00
jjgarcia
aefdb1995b Introduce ecl_register_static_root() to register C static variables as containing pointers for garbage collection. Make ecl_register_static_root() do nothing in the Boehm-Weiser GC, because it already scans the whole data segment. 2002-11-18 12:48:58 +00:00
jjgarcia
2f2a05798d Replace static C variable sharp_eq_context with special lisp variable si::*sharp-eq-context* 2002-11-18 11:31:53 +00:00
jjgarcia
6b408bad43 Remove pathname_match_p and symbol_name, which are redundant. Clean external.h, removing names of functions which do ot exist. 2002-11-18 11:30:56 +00:00
jjgarcia
1cae8539ff Make reader functions take a fixed number of arguments. 2002-11-18 11:21:06 +00:00
jjgarcia
a60d37ade4 Replace static C variable backq_level with special variable si::*backq-level* 2002-11-18 11:20:06 +00:00
jjgarcia
914f959599 1) Fix error in UNWIND-PROTECT forms: the destination frame nlj_fr has to
be saved, because it may be overwritten by a BLOCK or TAGBODY inside
the normal exit form.
2) Implement Invocation History Stack as a chain of stack-allocated records.
3) In compiled TAGBODY forms, replace tags with numbers to save space.
2002-11-11 12:57:21 +00:00
jjgarcia
b0ce08d0ea Changes towards 0.7b comprise naming and calling conventions. See CHANGELOG. 2002-11-04 14:08:24 +00:00
jjgarcia
4c6036b3f8 Changed the algorithm of the list reader. A dot which is not escaped is read as
a symbol SI::. which is recognized by LEFT-PARENTHESIS-READER. This avoids
using global variables "in_list_flag" and "dot_flag". No need for function
read_object_recursive(), since read_object() is equivalent to it.
2002-10-08 16:50:28 +00:00
jjgarcia
e2d71f3f18 default_dispatch_macro should be private. 2002-10-04 15:47:34 +00:00
jjgarcia
15b66bff98 Remove global variable read_VV_block. Use special variable instead. 2002-10-04 15:42:57 +00:00
jjgarcia
d81eb52f3f Remove global variable READtable. Use value of symbol instead. 2002-10-04 14:44:04 +00:00
jjgarcia
15b0a010a6 Remove global variable READsuppress. Use value of symbol instead. 2002-10-04 13:03:06 +00:00
jjgarcia
e69c094119 Remove global variable READdefault_float_format. Use value of symbol instead. 2002-10-04 12:51:21 +00:00
jjgarcia
826bdc6cca Remove global variable READbase. Use value of symbol instead. 2002-10-04 12:36:08 +00:00
jjgarcia
39811b295f Remove global variable READtable. Use the value of the symbol instead.
Prefix standard_readtable, current_readtable() with cl_
2002-10-04 09:55:57 +00:00
jjgarcia
7aab30f6c1 Small size optimization. 2002-09-26 13:45:40 +00:00
jjgarcia
3f09999d53 Remove unused code. 2002-09-26 13:37:51 +00:00
jjgarcia
5c2adb9d9f Whenever possible, use readc_stream() to read characters. This avoids useless
conversions between cl_object and character codes.
2002-09-26 13:29:28 +00:00
jjgarcia
6ed993bd85 Replace low level code with cl_string_push_extend(), isalpha(), islower(). 2002-09-26 10:41:24 +00:00
jjgarcia
23ee878e59 All symbols belonging to the LISP package and to the C core, are
kept in a single array, "cl_symbols". The translator "dpp" and the
routine SI::MANGLE-NAME, output the right name for any symbol
which is in this array.
2002-09-15 13:29:05 +00:00
jjgarcia
74c02ee5b3 Global variables bignum_register[], gc_time, backq_level are no longer public. 2002-09-11 13:39:44 +00:00
jjgarcia
265a23d5ce Remove global variable intern_flag. Add, instead, a new parameter to
intern() and find_symbol().
2002-09-03 14:53:34 +00:00
jjgarcia
1179c35043 The interface for CLOS streams is cleared. First, output_ch_fun and read_ch_fun
disappear. All code pertaining CLOS streams is moved to file.d. This code
allows the user to supply an arbitrary object instead of a stream. The object
must have the following methods defined: STREAM-READ-CHAR, STREAM-UNREAD-CHAR,
STREAM-LISTEN, STREAM-CLEAR-INPUT, STREAM-WRITE-CHAR, STREAM-CLEAR-OUTPUT,
STREAM-FORCE-OUTPUT, STREAM-CLOSE. With these methods it can be used for
input and output. This implementation of streams is enabled with the flag
--with-clos-streams during configuration phase.
2002-08-27 13:46:04 +00:00
jjgarcia
1286ec7528 No need to check for overflows while reading numbers -- make_shortfloat
and make_longfloat take care of that.
2002-05-22 16:50:41 +00:00
jjgarcia
d5531d7a3f Add support for Mac OSX, which means
- Enable simple allocator to use mmap()
- Rewrite cmpwt.lsp so that it produces files with short lines and ANSI strings
- Fix mkdir so that it accepts a parameter for the mode
2001-12-25 16:13:18 +00:00
jjgarcia
c9b91f9618 Minimal patches for C++ compatibility 2001-12-20 09:17:51 +00:00
jjgarcia
851cd03941 The project name goes back to ECL. Therefore feature #+ECL returns and the
program and libraries are named ecl*. Finally the routine sys::build-ecls
has been renamed sys::build-program.
2001-11-21 08:07:30 +00:00
jjgarcia
8e29a86094 Symbolics' LOOP macro incorporated. 2001-10-17 18:42:44 +00:00
jjgarcia
7957040185 New interface for building standalone programs and libraries. 2001-10-17 16:40:22 +00:00
jjgarcia
b2dd8e9e3a Documentation strings are stored in hash tables, not in property lists.
These hash tables can be dumped to help files which are understood by ECLS.
Most documentation strings have been moved back to the lisp source files
from which "SYS:help.doc" is built.
2001-10-15 16:44:04 +00:00
jjgarcia
b979ad8b0b Changes in the names of macros related to fixnums, characters and arrays. 2001-10-11 17:44:57 +00:00
jjgarcia
c479d71051 Reader macro #, is now unsupported. Instead we have implemented
LOAD-TIME-VALUE both in the interpreter and in the compiler. Type error
messages from the compiler have been also improved.
2001-10-07 20:01:50 +00:00
jjgarcia
5f0dbbf1d1 - Remove function_entry_table.
- The value of *package* is correctly set and restored while loading
  compiled code. This way, 'ecls -eval "(print *package*)"' produces
  the expected result #<"COMMON-LISP-USER" package>
- COMPILE-FILE now outputs three values.
- The value of si::*keep-definitions* determines whether the
  interpreter keeps the source of defined functions, for later use
  with COMPILE and DISASSEMBLE. For instance,
	> (set si::*keep-definitions* t)
	> (defun foo (x) (1+ x))
	> (compile 'foo)
	> (foo 2)
	3
	> (compile 'foo)
	;;; Error ....
  These definitions are lost once the function is compiled, hence
  the second error message.
2001-10-03 16:30:15 +00:00
jjgarcia
29dcac3ccc New utility function c_string_to_object(). 2001-09-29 11:01:37 +00:00