1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00
Commit graph

8347 commits

Author SHA1 Message Date
Jim Blandy
e4c5095fda *** empty log message *** 1996-10-21 23:54:02 +00:00
Jim Blandy
07f779e033 * hashtab.h (scm_hashx_remove_x): Renamed `delete' parameter to
`del', for the sake of C++ compilers.  (Patch applied by JimB.)
1996-10-21 23:53:40 +00:00
Mark Galassi
4b89050f0b Started moving gh.c to acknowledging conservative GC; gh_test core dumps,
but at least it compiles for now.
1996-10-21 17:28:13 +00:00
Mikael Djurfeldt
5dbb2c62b9 *** empty log message *** 1996-10-20 03:31:40 +00:00
Mikael Djurfeldt
a6c64c3c6d * alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)
1996-10-20 03:31:08 +00:00
Mikael Djurfeldt
a23afe534a * pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
for obtaining the address of a car or cdr field.  Motivation:
&SCM_CXR make assumptions about the internal structure of the
SCM_CXR selectors.

* eval.h, eval.c: Added new selector SCM_GLOC_VAL_LOC.
Motivation: see SCM_CXRLOC.

* pairs.h, eval.c, gc.c, init.c, ioext.c, ports.c, ports.h,
srcprop.h, tags.h, throw.c, unif.c: Added new selectors
SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR and SCM_SETOR_CDR.
Motivation: Safer use.  Some other macros are defined in terms of
these operations.  If these are defined using the SCM_SETCXR
(<e1>, SCM_CXR (<e1>) <op> <e2>) pattern a complex <e1> will lead
to inefficiency and an <e1> with side-effects could potentially
break.  Also, these particular operations are heavily utilized in
the garbage collector.  In unoptimized code there will be a
measurable speedup.

* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)
1996-10-20 03:30:16 +00:00
Mikael Djurfeldt
e6d34cb65d * pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
for obtaining the address of a car or cdr field.  Motivation:
&SCM_CXR make assumptions about the internal structure of the
SCM_CXR selectors.

* eval.h, eval.c: Added new selector SCM_GLOC_VAL_LOC.
Motivation: see SCM_CXRLOC.

* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)
1996-10-20 03:29:48 +00:00
Mikael Djurfeldt
25d8012c77 * pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
for obtaining the address of a car or cdr field.  Motivation:
&SCM_CXR make assumptions about the internal structure of the
SCM_CXR selectors.

* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)
1996-10-20 03:29:38 +00:00
Mikael Djurfeldt
24e68a57b9 * pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
for obtaining the address of a car or cdr field.  Motivation:
&SCM_CXR make assumptions about the internal structure of the
SCM_CXR selectors.

* pairs.h, eval.c, gc.c, init.c, ioext.c, ports.c, ports.h,
srcprop.h, tags.h, throw.c, unif.c: Added new selectors
SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR and SCM_SETOR_CDR.
Motivation: Safer use.  Some other macros are defined in terms of
these operations.  If these are defined using the SCM_SETCXR
(<e1>, SCM_CXR (<e1>) <op> <e2>) pattern a complex <e1> will lead
to inefficiency and an <e1> with side-effects could potentially
break.  Also, these particular operations are heavily utilized in
the garbage collector.  In unoptimized code there will be a
measurable speedup.

* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)
1996-10-20 03:29:01 +00:00
Mikael Djurfeldt
898a256f91 * pairs.h, eval.c, gc.c, init.c, ioext.c, ports.c, ports.h,
srcprop.h, tags.h, throw.c, unif.c: Added new selectors
SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR and SCM_SETOR_CDR.
Motivation: Safer use.  Some other macros are defined in terms of
these operations.  If these are defined using the SCM_SETCXR
(<e1>, SCM_CXR (<e1>) <op> <e2>) pattern a complex <e1> will lead
to inefficiency and an <e1> with side-effects could potentially
break.  Also, these particular operations are heavily utilized in
the garbage collector.  In unoptimized code there will be a
measurable speedup.

* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)
1996-10-20 03:28:34 +00:00
Mikael Djurfeldt
1bb961a353 *** empty log message *** 1996-10-17 23:43:30 +00:00
Mikael Djurfeldt
b210cb7399 Oops! 1996-10-17 23:43:00 +00:00
Mikael Djurfeldt
841076acf4 * backtrace.c (scm_display_error): Just a safety measure: Stacks
aren't created with zero length, but should such a strange
creature suddenly turn up...
1996-10-17 23:32:47 +00:00
Mikael Djurfeldt
6c1797119b * debug.c (scm_make_memoized): Made it available at scheme level.
(scm_unmemoize, scm_memoized_environment): Bugfix: Check for
SCM_NIMP before applying heavier predicates in argument checking.
(scm_local_eval): Also take memoized object as argument.
1996-10-17 23:32:40 +00:00
Mikael Djurfeldt
d043d8c221 * ports.c (scm_port_line_x, scm_port_column_x): New mutators. 1996-10-17 23:32:32 +00:00
Mikael Djurfeldt
7115d1e4dd * stacks.c: Improve selection of relevant stack frames when making
a stack object.  Introduce one level of indirection in the stack
object to make it possible to "narrow" to a certain region of the
stack.  This facilitates making use of more clever algorithms (not
implemented) for selecting relevant frames and gives a cleaner
design since selection of frames can be done independently of
extraction of frames from the real stack.
(scm_stack_id): Also take #t as argument which means look at
current stack.
1996-10-17 23:32:25 +00:00
Mikael Djurfeldt
c692c370d8 * stacks.h: In struct scm_stack: Turn field frames into a pointer.
Turn n_tail into an integer directly representing current number
of frames in stack.  Add field tail.
1996-10-17 23:32:15 +00:00
Jim Blandy
aa9576adaf *** empty log message *** 1996-10-16 02:22:21 +00:00
Jim Blandy
0179ae48bf * variable.c (scm_make_variable): Make the name hint optional, as
documented.
(anonymous_variable_sym): Renamed from variable_sym.  All uses
changed.
1996-10-16 02:20:47 +00:00
Jim Blandy
d065b65fdb *** empty log message *** 1996-10-15 22:31:06 +00:00
Jim Blandy
b9d5d65460 * load.c (scm_primitive_load, scm_primitive_load_path): Renamed
from scm_sys_try_load and scm_sys_try_load_path.  The Scheme name
of scm_primitive_load_path was also changed to
"primitive-load-path", from "%try-load-path".  Callers changed.
We'd like to respect the convention that a function named
"try-mumble" should behave just like the function called "mumble",
but return #f instead of signalling some error.
* load.h: Rename prototypes.
1996-10-15 22:30:48 +00:00
Jim Blandy
820bb96d3e *** empty log message *** 1996-10-15 21:57:15 +00:00
Jim Blandy
cf18adf033 * alist.c (scm_sloppy_assq, scm_sloppy_assv, scm_sloppy_assoc):
Don't crash when passed an improper list terminated by a
non-immediate value.
1996-10-15 21:56:27 +00:00
Mikael Djurfeldt
7bf80fd0e4 *** empty log message *** 1996-10-15 03:40:31 +00:00
Mikael Djurfeldt
bf685b6d20 * print.c (make_print_state, grow_print_state), print.h: Modified
the print state representation: Don't use a tail array for
recording of circular references.  Resizing of the print state
structure invalidates the print state pointer.  To avoid passing
around an indirect print state reference to all printing
functions, we instead let the print state reference a resizable
vector.
1996-10-15 03:40:21 +00:00
Jim Blandy
2a786759c1 *** empty log message *** 1996-10-15 00:14:14 +00:00
Jim Blandy
14d1400fa7 Allocate data for structures on an eight-byte boundary, as
required by the tagging system.
* struct.c (alloc_struct): New function.
(scm_make_struct, scm_make_vtable_vtable): Call it.
* struct.h (scm_struct_n_extra_words): Bump to 3.
(scm_struct_i_ptr): New "field".
* gc.c (scm_gc_sweep): When we need to free the data, use the
information stored by alloc_struct to find the beginning of the
block allocated to the structure, so we can free it.
1996-10-15 00:10:59 +00:00
Mikael Djurfeldt
2dfc85c018 *** empty log message *** 1996-10-14 20:29:16 +00:00
Mikael Djurfeldt
c6b8a41a55 * debug.c (scm_procedure_name): Try procedure property `name' for
compiled closures aswell.
1996-10-14 20:28:18 +00:00
Mikael Djurfeldt
473c250d0a * debug.h (SCM_VOIDFRAME, SCM_VOIDFRAMEP): New macros.
(scm_debug_info): New member: id.
1996-10-14 20:28:13 +00:00
Mikael Djurfeldt
38bd0b3b0e * eval.c: scm_i_name moved to gsubr.c
(scm_m_define): Record names of all kinds of procedure
objects.  (Earlier, only closures were recorded.)
1996-10-14 20:28:08 +00:00
Mikael Djurfeldt
8960e0a0c4 * gc.c (scm_init_storage): Initialize scm_stand_in_procs to SCM_EOL. 1996-10-14 20:27:51 +00:00
Mikael Djurfeldt
abae3119ee * eval.c: scm_i_name moved to gsubr.c
(scm_m_define): Record names of all kinds of procedure
objects.  (Earlier, only closures were recorded.)

* gsubr.c: Added global scm_i_name.  Added #include "procprop.h".
(scm_make_gsubr): Record names of compiled closures.
1996-10-14 20:27:45 +00:00
Mikael Djurfeldt
7439c0b988 * init.c (scm_boot_guile_1): Moved scm_init_struct in front of
scm_init_stacks.
1996-10-14 20:27:39 +00:00
Mikael Djurfeldt
e1bd234308 * procprop.h: Added declaration of scm_i_name.
* gsubr.c: Added global scm_i_name.  Added #include "procprop.h".
(scm_make_gsubr): Record names of compiled closures.
1996-10-14 20:27:20 +00:00
Mikael Djurfeldt
66f45472b5 * stacks.c: Stacks are now represented as structs; Stacks have an
id given to them by `start-stack'.
(scm_last_stack_frame): Added predicates `stack?' and `frame?'.
1996-10-14 20:27:14 +00:00
Mikael Djurfeldt
b902ec8513 * stacks.h: Added declarations of scm_stack_p and scm_frame_p;
Changed stack representation.
1996-10-14 20:27:07 +00:00
Mikael Djurfeldt
294d380662 *** empty log message *** 1996-10-14 03:44:37 +00:00
Mikael Djurfeldt
4f0292cfdb *** empty log message *** 1996-10-14 03:28:57 +00:00
Mikael Djurfeldt
49bc24feca * symbols.c (scm_sym2ovcell): Fixed documentation. 1996-10-14 03:27:11 +00:00
Mikael Djurfeldt
02aa5a4c2f * init.c: Added #include "backtrace.h" and #include "stacks.h".
(scm_boot_guile_1): Added calls to scm_init_backtrace and
scm_init_stacks.

* Makefile.in: Added entries for new files: backtrace.c,
backtrace.h, stacks.c and stacks.h.
1996-10-14 03:26:57 +00:00
Mikael Djurfeldt
782d171cf0 * continuations.c, continuations.h, debug.c, gc.c, init.c, root.c,
stacks.c: Renamed regs --> scm_contregs.

* Makefile.in: Added entries for new files: backtrace.c,
backtrace.h, stacks.c and stacks.h.
1996-10-14 03:26:51 +00:00
Mikael Djurfeldt
34019bd652 * srcprop.c, srcprop.h: Made scm_i_filename, scm_i_copy,
scm_i_line, scm_i_column and scm_i_breakpoint global.
1996-10-14 03:26:44 +00:00
Mikael Djurfeldt
a4645b977f * srcprop.c (scm_source_properties, scm_set_source_properties_x,
s_set_source_property_x): Check that first argument is a pair or a
memoized object.

* srcprop.c, srcprop.h: Made scm_i_filename, scm_i_copy,
scm_i_line, scm_i_column and scm_i_breakpoint global.
1996-10-14 03:26:37 +00:00
Mikael Djurfeldt
0db18cf45a * continuations.c, continuations.h, debug.c, gc.c, init.c, root.c,
stacks.c: Renamed regs --> scm_contregs.
1996-10-14 03:26:29 +00:00
Mikael Djurfeldt
6cb66921f6 * print.h: Added selector SCM_PRINT_STATE.
* print.h: Added declarations for scm_make_print_state,
scm_free_print_state.
1996-10-14 03:26:21 +00:00
Mikael Djurfeldt
698c029502 * print.c (scm_free_print_state): Cleanup print state before
returning it to pool.  It is better to do it here than in
scm_prin1 since scm_prin1 is called often.

* print.c (make_print_state): Bugfix: Initialize pstate->ceiling.

* print.c: New functions: scm_make_print_state,
scm_free_print_state.
1996-10-14 03:26:13 +00:00
Mikael Djurfeldt
0e44fcca98 * continuations.c, continuations.h, debug.c, gc.c, init.c, root.c,
stacks.c: Renamed regs --> scm_contregs.

* init.c: Added #include "backtrace.h" and #include "stacks.h".
(scm_boot_guile_1): Added calls to scm_init_backtrace and
scm_init_stacks.

* init.c (scm_boot_guile_1): Moved scm_init_debug below
scm_init_eval.
1996-10-14 03:25:59 +00:00
Mikael Djurfeldt
4e646a03d6 * eval.c: Added new debug options maxdepth' and indent'. 1996-10-14 03:25:40 +00:00
Mikael Djurfeldt
fcbb26b21f * debug.c, debug.h: Removed obsolete code.
* debug.h: Added debug object smob declaration and macro
definitions.

* debug.h: New debug options SCM_BACKTRACE_MAXDEPTH and
SCM_BACKTRACE_INDENT.

* debug.h: Small cleanup.
1996-10-14 03:25:31 +00:00