1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 20:05:32 +02:00

Changes from arch/CVS synchronization

This commit is contained in:
Ludovic Courtès 2007-07-22 16:30:13 +00:00
parent 24d6fae831
commit 7337d56d57
8 changed files with 1065 additions and 693 deletions

View file

@ -1,3 +1,18 @@
2007-07-22 Ludovic Courtès <ludo@gnu.org>
Overhauled the reader, making it faster.
* gdbint.c (tok_buf, tok_buf_mark_p): Removed.
(gdb_read): Don't use a token buffer. Use `scm_read ()' instead
of `scm_lreadr ()'.
* read.c: Overhauled. No longer use a token buffer. Use a
on-stack C buffer in the common case and use Scheme strings when
larger buffers are needed.
* read.h (scm_grow_tok_buf, scm_flush_ws, scm_casei_streq,
scm_lreadr, scm_lreadrecparen): Removed.
(scm_i_input_error): Marked as `SCM_NORETURN'.
2007-07-15 Ludovic Courtès <ludo@gnu.org>
* script.c (scm_compile_shell_switches): Updated copyright year.

View file

@ -103,9 +103,6 @@ int scm_print_carefully_p;
static SCM gdb_input_port;
static int port_mark_p, stream_mark_p, string_mark_p;
static SCM tok_buf;
static int tok_buf_mark_p;
static SCM gdb_output_port;
@ -184,10 +181,9 @@ gdb_read (char *str)
scm_puts (str, gdb_input_port);
scm_truncate_file (gdb_input_port, SCM_UNDEFINED);
scm_seek (gdb_input_port, SCM_INUM0, scm_from_int (SEEK_SET));
/* Read one object */
tok_buf_mark_p = SCM_GC_MARK_P (tok_buf);
SCM_CLEAR_GC_MARK (tok_buf);
ans = scm_lreadr (&tok_buf, gdb_input_port, &ans);
ans = scm_read (gdb_input_port);
if (SCM_GC_P)
{
if (SCM_NIMP (ans))
@ -202,8 +198,6 @@ gdb_read (char *str)
if (SCM_NIMP (ans))
scm_permanent_object (ans);
exit:
if (tok_buf_mark_p)
SCM_SET_GC_MARK (tok_buf);
remark_port (gdb_input_port);
SCM_END_FOREIGN_BLOCK;
return status;
@ -292,8 +286,6 @@ scm_init_gdbint ()
SCM_OPN | SCM_RDNG | SCM_WRTNG,
s);
gdb_input_port = scm_permanent_object (port);
tok_buf = scm_permanent_object (scm_c_make_string (30, SCM_UNDEFINED));
}
/*

File diff suppressed because it is too large Load diff

View file

@ -53,16 +53,12 @@ SCM_API SCM scm_sym_dot;
SCM_API SCM scm_read_options (SCM setting);
SCM_API SCM scm_read (SCM port);
SCM_API char * scm_grow_tok_buf (SCM * tok_buf);
SCM_API int scm_flush_ws (SCM port, const char *eoferr);
SCM_API int scm_casei_streq (char * s1, char * s2);
SCM_API SCM scm_lreadr (SCM * tok_buf, SCM port, SCM *copy);
SCM_API size_t scm_read_token (int ic, SCM * tok_buf, SCM port, int weird);
SCM_API SCM scm_lreadrecparen (SCM * tok_buf, SCM port, char *name, SCM *copy);
SCM_API SCM scm_read_hash_extend (SCM chr, SCM proc);
SCM_API void scm_i_input_error (const char *func, SCM port,
const char *message, SCM arg);
const char *message, SCM arg)
SCM_NORETURN;
SCM_API void scm_init_read (void);