summaryrefslogtreecommitdiff
path: root/libguile/inline.h
Commit message (Collapse)AuthorAgeFilesLines
* Update license notices in all C filesAndy Wingo2018-06-201-17/+17
| | | | | Update to newest recommended license notices from the FSF. Everything stays LGPLv3+ except guile-readline which is GPLv3+.
* Remove (C) from copyright statementsAndy Wingo2018-06-201-1/+1
| | | | | | As the FSF advises, 'There is no legal significance to using the three-character sequence “(C)”, but it does no harm.' It does take up space though! For that reason, we remove it here from our C files.
* Rename __scm.h to scm.hAndy Wingo2018-06-201-1/+1
| | | | * libguile/scm.h: Rename. Update all includers.
* Move SCM_C_INLINE_KEYWORD definition to inline.hAndy Wingo2018-06-201-0/+11
| | | | | * libguile/__scm.h: * libguile/inline.h (SCM_C_INLINE_KEYWORD): Move this definition here.
* Remove useless "classes: h_files" from Guile headers.Andy Wingo2018-06-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/__scm.h: * libguile/alist.h: * libguile/array-handle.h: * libguile/array-map.h: * libguile/arrays.h: * libguile/async.h: * libguile/backtrace.h: * libguile/bitvectors.h: * libguile/boolean.h: * libguile/chars.h: * libguile/chooks.h: * libguile/continuations.h: * libguile/debug-malloc.h: * libguile/debug.h: * libguile/deprecation.h: * libguile/dynl.h: * libguile/dynstack.h: * libguile/dynwind.h: * libguile/eq.h: * libguile/error.h: * libguile/eval.h: * libguile/evalext.h: * libguile/expand.h: * libguile/extensions.h: * libguile/feature.h: * libguile/filesys.h: * libguile/fluids.h: * libguile/fports.h: * libguile/gc-inline.h: * libguile/gc.h: * libguile/generalized-arrays.h: * libguile/generalized-vectors.h: * libguile/gettext.h: * libguile/goops.h: * libguile/gsubr.h: * libguile/guardians.h: * libguile/hash.h: * libguile/hashtab.h: * libguile/hooks.h: * libguile/i18n.h: * libguile/init.h: * libguile/inline.h: * libguile/ioext.h: * libguile/iselect.h: * libguile/keywords.h: * libguile/list.h: * libguile/load.h: * libguile/macros.h: * libguile/mallocs.c: * libguile/mallocs.h: * libguile/memoize.h: * libguile/modules.h: * libguile/net_db.h: * libguile/null-threads.h: * libguile/numbers.h: * libguile/objprop.h: * libguile/options.h: * libguile/pairs.h: * libguile/poll.h: * libguile/ports.h: * libguile/posix-w32.h: * libguile/posix.h: * libguile/print.h: * libguile/procprop.h: * libguile/procs.h: * libguile/promises.h: * libguile/pthread-threads.h: * libguile/random.h: * libguile/rdelim.h: * libguile/read.h: * libguile/regex-posix.h: * libguile/rw.h: * libguile/scmsigs.h: * libguile/script.h: * libguile/simpos.h: * libguile/smob.h: * libguile/snarf.h: * libguile/socket.h: * libguile/sort.h: * libguile/srcprop.h: * libguile/stackchk.h: * libguile/stacks.h: * libguile/stime.h: * libguile/strings.h: * libguile/strorder.h: * libguile/strports.h: * libguile/struct.h: * libguile/symbols.h: * libguile/syscalls.h: * libguile/tags.h: * libguile/threads.h: * libguile/throw.h: * libguile/trees.h: * libguile/unicode.h: * libguile/uniform.h: * libguile/values.h: * libguile/variable.h: * libguile/vectors.h: * libguile/vports.h: * libguile/weak-list.h: * libguile/weak-set.h: * libguile/weak-table.h: * libguile/weak-vector.h: Remove "classes: h_files". Reformat copyrights if needed.
* Shuffle around inline C function implementationAndy Wingo2018-06-201-13/+50
| | | | | | | | | | | | | | * libguile/__scm.h: * libguile/inline.h (SCM_C_EXTERN_INLINE, SCM_CAN_INLINE, SCM_INLINE) (SCM_INLINE_IMPLEMENTATION): Move definitions here, from __scm.h. * libguile/strings.h (scm_is_string): Move implementation here, from inline.h. * libguile/inline.c: Add strings.h include. * libguile/_scm.h: Remove inline.h include. * libguile/array-handle.h: * libguile/gc.h: * libguile/pairs.h: * libguile/smob.h: Add inline.h includes.
* Remove error.h from inline.hAndy Wingo2018-06-191-2/+0
| | | | * libguile/inline.h: Remove error.h.
* Remove numbers.h from inline.hAndy Wingo2018-06-191-1/+0
| | | | | * libguile/inline.h: Remove libguile/numbers.h. * libguile/inline.c: Alter include order to work around a weird failure.
* Remove ports.h from inline.hAndy Wingo2018-06-191-1/+0
| | | | | | | | | | | | | * libguile/inline.h: Remove ports.h. * libguile/bitvectors.c: * libguile/bytevectors.c: * libguile/foreign.c: * libguile/frames.c: * libguile/goops.h: * libguile/programs.c: * libguile/smob.c: * libguile/srfi-14.c: * libguile/vm.c: Add ports.h.
* Move array-handle.h include out from inline.hAndy Wingo2018-06-191-1/+0
| | | | | | | * libguile/inline.h: Remove array-handle.h include. * libguile/srfi-4.h: * libguile/uniform.h: * libguile/vectors.h: Add array-handle.h includes.
* Remove threads.h from inline.hAndy Wingo2018-06-191-1/+0
|
* Remove gc.h from inline.hAndy Wingo2018-06-191-3/+2
|
* Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo2013-02-181-24/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: libguile/array-handle.c libguile/deprecated.h libguile/inline.c libguile/inline.h module/ice-9/deprecated.scm module/language/tree-il/peval.scm
| * array handle inline functions defined in array-handle.h.Andy Wingo2013-02-181-24/+1
| | | | | | | | | | | | | | | | * libguile/inline.h: * libguile/array-handle.h (scm_array_handle_ref): (scm_array_handle_set): Move definitions here from inline.h. * libguile/inline.c: Include array-handle.h.
| * scm_cell, scm_double_cell, scm_words back to gc.hAndy Wingo2012-03-081-97/+6
| | | | | | | | | | | | | | | | | | * libguile/inline.h: * libguile/gc.h (scm_cell, scm_double_cell, scm_words): Move declarations and definitions back here, from inline.h. It's more natural. * libguile/inline.c: Include gc.h as well.
| * simplify inline function infrastructureAndy Wingo2012-03-081-106/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/__scm.h (SCM_C_EXTERN_INLINE): Move this definition here, from inline.h. We'd like to support inline function definitions in more header files: not just inline.h. (SCM_CAN_INLINE, SCM_INLINE, SCM_INLINE_IMPLEMENTATION): New definitions. * libguile/gc.h (SCM_GC_MALLOC, SCM_GC_MALLOC_POINTERLESS): Define these wrappers, which redirect to the GC_MALLOC macros when building Guile, and the scm_gc_malloc functions otherwise. A step towards getting BDW-GC out of Guile's API. * libguile/inline.h: Simplify, using SCM_INLINE, SCM_INLINE_IMPLEMENTATION, and SCM_IMPLEMENT_INLINES. Also use the new SCM_GC_MALLOC macros.
* | inline scm_cons, scm_car, scm_cdrAndy Wingo2012-05-171-29/+0
| | | | | | | | | | | | | | | | | | | | | | * libguile/pairs.h (scm_cons, scm_car, scm_cdr): Define these as inline functions. (scm_is_pair): Move here from inline.h. * libguile/pairs.c: Remove definitions here, and define gsubrs. * libguile/inline.h: Remove scm_is_pair implementation. * libguile/inline.c: Include pairs.h to residualize inlines from pairs.h.
* | Change `scm_words' to accept a 32-bit word number.Ludovic Courtès2012-03-071-2/+2
| | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/10914>. Reported by Tobias Brandt <tob.brandt@googlemail.com>. * libguile/gc.h (scm_words): Change `n_words' to be `scm_t_uint32'. * libguile/inline.h: Update extraneous declaration.
* | inlined port functions to ports.hAndy Wingo2011-11-071-75/+0
| | | | | | | | | | | | * libguile/inline.h: * libguile/ports.h (scm_get_byte_or_eof, scm_peek_byte_or_eof) (scm_putc, scm_puts): Move definitions here, from inline.h.
* | refactor tc7 and tc16 checksAndy Wingo2011-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/tags.h (SCM_HAS_TYP7, SCM_HAS_TYP7S, SCM_HAS_TYP16): New macros. * libguile/bytevectors.h (SCM_BYTEVECTOR_P): * libguile/control.h (SCM_PROMPT_P): * libguile/filesys.h (SCM_DIRP): * libguile/fluids.h (SCM_WITH_FLUIDS_P, SCM_FLUID_P) (SCM_I_DYNAMIC_STATE_P): * libguile/foreign.h (SCM_POINTER_P): * libguile/fports.h (SCM_FPORTP): * libguile/frames.h (SCM_VM_FRAME_P): * libguile/hashtab.h (SCM_HASHTABLE_P): * libguile/inline.h (scm_get_byte_or_eof): * libguile/numbers.h (SCM_REALP, SCM_BIGP, SCM_COMPLEXP, SCM_FRACTIONP): * libguile/objcodes.h (SCM_OBJCODE_P): * libguile/ports.h (SCM_OUTPUT_PORT_P): * libguile/programs.h (SCM_PROGRAM_P): * libguile/smob.h (SCM_SMOB_PREDICATE): * libguile/srfi-14.h (SCM_CHARSETP): * libguile/strings.c (IS_STRING): * libguile/strports.h (SCM_STRPORTP): * libguile/symbols.h (scm_is_symbol): * libguile/variable.h (SCM_VARIABLEP): * libguile/vectors.h (SCM_I_IS_VECTOR, SCM_I_IS_NONWEAK_VECTOR): * libguile/vm-i-system.c (call, tail-call, mv-call) * libguile/vm.h (SCM_VM_P, SCM_VM_CONT_P): * libguile/weak-set.c (SCM_WEAK_SET_P): * libguile/weak-table.c (SCM_WEAK_TABLE_P): * libguile/weak-vector.h (SCM_I_WVECTP): Use them.
* | scm_cell, scm_double_cell, scm_words back to gc.hAndy Wingo2011-05-261-97/+6
| | | | | | | | | | | | | | | | | | * libguile/inline.h: * libguile/gc.h (scm_cell, scm_double_cell, scm_words): Move declarations and definitions back here, from inline.h. It's more natural. * libguile/inline.c: Include gc.h as well.
* | simplify inline function infrastructureAndy Wingo2011-05-261-106/+29
|/ | | | | | | | | | | | | | | | | * libguile/__scm.h (SCM_C_EXTERN_INLINE): Move this definition here, from inline.h. We'd like to support inline function definitions in more header files: not just inline.h. (SCM_CAN_INLINE, SCM_INLINE, SCM_INLINE_IMPLEMENTATION): New definitions. * libguile/gc.h (SCM_GC_MALLOC, SCM_GC_MALLOC_POINTERLESS): Define these wrappers, which redirect to the GC_MALLOC macros when building Guile, and the scm_gc_malloc functions otherwise. A step towards getting BDW-GC out of Guile's API. * libguile/inline.h: Simplify, using SCM_INLINE, SCM_INLINE_IMPLEMENTATION, and SCM_IMPLEMENT_INLINES. Also use the new SCM_GC_MALLOC macros.
* remove scm_newcell_count, scm_newcell2_countAndy Wingo2011-05-261-4/+0
| | | | | | | | * libguile/inline.h: * libguile/gc.c: Remove declaration and definition of unused "scm_newcell_count" and "scm_newcell2_count". Since SCM_INTERNAL is "extern", these symbols were not externally visible anyway, at least under Linux or Windows.
* deprecate scm_immutable_{double_,}cellAndy Wingo2011-05-261-70/+0
| | | | | | | | | | * libguile/inline.h: * libguile/deprecated.h: * libguile/deprecated.c (scm_immutable_cell, scm_immutable_double_cell): Deprecate these, as the GC_STUBBORN API doesn't do anything any more. * libguile/strings.c (scm_i_c_make_symbol): Change the one use of scm_immutable_double_cell to scm_double_cell.
* PTR2SCM and SCM2PTR in inline.hAndy Wingo2011-05-131-7/+7
| | | | | | * libguile/inline.h (scm_cell, scm_immutable_cell): (scm_double_cell, scm_immutable_double_cell): (scm_words): Be more consistent in use of PTR2SCM and SCM2PTR.
* Add `scm_peek_byte_or_eof'.Ludovic Courtès2011-05-071-2/+32
| | | | | | | * libguile/inline.h (scm_get_byte_or_eof): Add `SCM_UNLIKELY' for EOF. (scm_peek_byte_or_eof): New function. * libguile/r6rs-ports.c (scm_lookahead_u8): Use `scm_peek_byte_or_eof'.
* Remove conflicting `scm_is_string' declaration.Ludovic Courtès2010-12-171-0/+1
| | | | | | * libguile/strings.h: Move `scm_is_string' declaration... * libguile/inline.h: ... here. Reported by Noah Lavine <noah.b.lavine@gmail.com>.
* Inline `scm_is_string'.Ludovic Courtès2010-12-161-0/+8
| | | | | * libguile/strings.c (scm_is_string): Move to... * libguile/inline.h (scm_is_string): ... here. Inline.
* clean up macros.[ch]Andy Wingo2010-01-051-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some incompatible changes here, but only to interfaces that were introduced earlier in 1.9, or interfaces which have been broken since early in 1.9. * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump, as the macro changes affect the interface that is called by psyntax-generated macro definitions. * libguile/inline.h (scm_words): New function, allocates a variable number of contiguous scm_t_bits locations, with a given value in the 0th word, and 0 in the rest of the words. * libguile/macros.h: Rework interface to correspond more closely, and minimally, to the needs of memoize.c and psyntax. (SCM_ASSYNT, SCM_MACRO_TYPE_BITS, SCM_MACRO_TYPE_MASK) (SCM_F_MACRO_EXTENDED, SCM_MACROP, SCM_MACRO_TYPE) (SCM_MACRO_IS_EXTENDED, SCM_BUILTIN_MACRO_P, SCM_SYNCASE_MACRO_P) (SCM_MACRO_CODE, scm_tc16_macro): Remove CPP macros related to the representation of Scheme macros. (scm_i_make_primitive_macro): Renamed from scm_i_makbimacro. (scm_i_macro_primitive): New accessor so that memoize.c can get to the primitive syntax transformer. (scm_make_syncase_macro, scm_make_extended_syncase_macro) (scm_syncase_macro_type, scm_syncase_macro_binding): Removed these functions, replaced by make-syntax-transformer and its accessors. (scm_macro_binding): New accessor, the same as what scm_syncase_macro_binding was. * libguile/macros.c: All representation details of syntax transformers are private to this file now. (macro_print): Print macros as #<syntax-transformer ...>, or #<primitive-syntax-transformer ...> if psyntax has not attached a transformer of its own. (scm_i_make_primitive_macro): Represent macros as 5-word smobs. (scm_make_syntax_transformer): New constructor for syntax transformers (macros), exported to scheme. Takes a name, and looks it up in the current module to determine the previous primitive transformer, if any. (scm_macro_type): Instead of returning 'builtin-macro!, etc, return the type as set by psyntax, or #f if it's a primitive. (scm_macro_name): Return the stored macro name. (scm_macro_transformer): Return the psyntax-set syntax transformer. Hacky, but should help introspection somewhat. * libguile/memoize.c (memoize_env_ref_transformer): Use the new scm_i_macro_primitive, and adapt to other macro API changes. * module/ice-9/psyntax.scm (put-global-definition-hook) (get-global-definition-hook, chi-install-global): Call (and generate calls to) the new macro constructors and accessors. * module/ice-9/psyntax-pp.scm: Doubly regenerated. * module/ice-9/debugging/traps.scm (trap-here): Comment out this definition and export, while it's not working.
* signedness fix fix fixAndy Wingo2009-10-151-1/+1
| | | | * libguile/inline.h: Fix signedness fix fix.
* fix scm_array_handle_ref signedness fixAndy Wingo2009-10-151-1/+1
| | | | * libguile/inline.h: Fix signedness fix.
* Fix signed/unsigned mismatch in `scm_array_handle_{ref,set} ()'.Ludovic Courtès2009-10-141-2/+2
| | | | | * libguile/inline.h (scm_array_handle_ref, scm_array_handle_set): Cast `h->base' so that it matches the signedness of `p'.
* Rename "boehm-gc.h" to "bdw-gc.h"; add to the distribution.Ludovic Courtès2009-09-141-1/+1
| | | | | | | * libguile/Makefile.am (modinclude_HEADERS): Add `bdw-gc.h'. * libguile/bdw-gc.h: Rename from "boehm-gc.h"; users updated. Update to LGPLv3+.
* Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès2009-08-281-27/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: libguile/Makefile.am libguile/bytevectors.c libguile/gc-card.c libguile/gc-mark.c libguile/programs.c libguile/srcprop.c libguile/srfi-14.c libguile/symbols.c libguile/threads.c libguile/unif.c libguile/vm.c
| * Merge commit 'origin/master'Andy Wingo2009-08-251-23/+2
| |\ | | | | | | | | | | | | Conflicts: libguile/unif.c
| | * Add full Unicode capability to ports and the default readerMichael Gran2009-08-251-23/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ports are given two additional properties: a character encoding and a conversion failure strategy. These properties have getters and setters. The new properties are used to convert any locale text to/from the internal representation of strings. If unspecified, ports use a default value. The default value of these properties is held in a fluid. The default character encoding can be modified by calling setlocale. ISO-8859-1 is treated specially. Since it is a native encoding of strings, it can be processed more quickly. Source code is assumed to be ISO-8859-1 unless otherwise specified. The encoding of a source code file can be given as 'coding: XXXXX' in a magic comment at the top of a file. The C functions that deal with encoding often use a null pointer as shorthand for the native Latin-1 encoding, for efficiency's sake. * test-suite/tests/encoding-iso88591.test: new tests * test-suite/tests/encoding-iso88597.test: new tests * test-suite/tests/encoding-utf8.test: new tests * test-suite/tests/encoding-escapes.test: new tests * test-suite/tests/numbers.test: declare 'binary' encoding * test-suite/tests/ports.test: declare 'binary' encoding * test-suite/tests/r6rs-ports.test: declare 'binary' encoding * module/system/base/compile.scm (compile-file): use source-code file's self-declared encoding when compiling files * libguile/strports.c: store string ports in locale encoding (scm_strport_to_locale_u8vector, scm_call_with_output_locale_u8vector) (scm_open_input_locale_u8vector, scm_get_output_locale_u8vector): new functions * libguile/strings.h: new declaration for scm_i_string_contains_char * libguile/strings.c (scm_i_string_contains_char): new function (scm_from_stringn, scm_to_stringn): use NULL for Latin-1 (scm_from_locale_stringn, scm_to_locale_stringn): respect character encoding of input and output ports * libguile/read.h: declaration for scm_scan_for_encoding * libguile/read.c: (read_token): now takes scheme string instead of C string/length (read_complete_token): new function (scm_read_sexp, scm_read_number, scm_read_mixed_case_symbol) (scm_read_number_and_radix, scm_read_quote, scm_read_semicolon_comment) (scm_read_srfi4_vector, scm_read_bytevector, scm_read_guile_bit_vector) (scm_read_scsh_block_comment, scm_read_commented_expression) (scm_read_extended_symbol, scm_read_sharp_extension, scm_read_shart) (scm_read_expression): use scm_t_wchar for char type, use read_complete_token (scm_scan_for_encoding): new function to find a file's character encoding (scm_file_encoding): new function to find a port's character encoding * libguile/rdelim.c: don't unpack strings * libguile/print.h: declaration for modified function scm_i_charprint * libguile/print.c: use locale when printing characters and strings (scm_i_charprint): input parameter is now scm_t_wchar (scm_simple_format): don't unpack strings * libguile/posix.h: new declaration for scm_setbinary. * libguile/posix.c (scm_setlocale): set default and stdio port encodings based on the locale's character encoding (scm_setbinary): new function * libguile/ports.h (scm_t_port): add encoding and failed conversion handler to port type. Declarations for new or modified functions scm_getc, scm_unget_byte, scm_ungetc, scm_i_get_port_encoding, scm_i_set_port_encoding_x, scm_port_encoding, scm_set_port_encoding_x, scm_i_get_conversion_strategy, scm_i_set_conversion_strategy_x, scm_port_conversion_strategy, scm_set_port_conversion_strategy_x. * libguile/ports.c: assign the current ports to zero on startup so we can see if they've been set. (scm_current_input_port, scm_current_output_port, scm_current_error_port): return #f if the port is not yet initialized (scm_new_port_table_entry): set up a new port's encoding and illegal sequence handler based on the thread's current defaults (scm_i_remove_port): free port encoding name when port is removed (scm_i_mode_bits_n): now takes a scheme string instead of a c string and length. All callers changed. (SCM_MBCHAR_BUF_SIZE): new const (scm_getc): new function, since the scm_getc in inline.h is now scm_get_byte_or_eof. This pulls one codepoint from a port. (scm_lfwrite_substr, scm_lfwrite_str): now uses port's encoding (scm_unget_byte): new function, incorportaing the low-level functionality of scm_ungetc (scm_ungetc): uses scm_unget_byte * libguile/numbers.h (scm_t_wchar): compilation order problem with scm_t_wchar being use in functions in multiple headers. Forward declare scm_t_wchar. * libguile/load.c (scm_primitive_load): scan for file encoding at top of file and use it to set the load port's encoding * libguile/inline.h (scm_get_byte_or_eof): new function incorporating most of the functionality of scm_getc. * libguile/fports.c (fport_fill_input): now returns scm_t_wchar * libguile/chars.h (scm_t_wchar): avoid compilation order problem with declaration of scm_t_wchar
| * | add generic array implementation facilityAndy Wingo2009-07-191-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/array-handle.c (scm_i_register_array_implementation): (scm_i_array_implementation_for_obj): Add generic array facility, which will (in a few commits) detangle the array code. (scm_array_get_handle): Use the generic array facility. Note that scm_t_array_handle no longer has ref and set function pointers; instead it has a pointer to the array implementation. It is unlikely that code out there used these functions, however, as the supported way was through scm_array_handle_ref/set_x. (scm_array_handle_pos): Move this function here from arrays.c. (scm_array_handle_element_type): New function, returns a Scheme value representing the type of element stored in this array. * libguile/array-handle.h (scm_t_array_element_type): New enum, for generically determining the type of an array. (scm_array_handle_rank): (scm_array_handle_dims): These are now just #defines. * libguile/arrays.c: * libguile/bitvectors.c: * libguile/bytevectors.c: * libguile/srfi-4.c: * libguile/strings.c: * libguile/vectors.c: Register array implementations for all of these. * libguile/inline.h: Update for array_handle_ref/set change. * libguile/deprecated.h: Need to include arrays.h now.
| * | rename unif.[ch] to arrays.[ch]Andy Wingo2009-07-191-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/Makefile.am: * libguile/unif.c: * libguile/unif.h: * libguile/arrays.c: * libguile/arrays.h: Rename unif.[ch] to arrays.[ch]. * libguile.h: * libguile/array-handle.c: * libguile/array-map.c: * libguile/bitvectors.c: * libguile/bytevectors.c: * libguile/eq.c: * libguile/gc-card.c: * libguile/gc-malloc.c: * libguile/gc-mark.c: * libguile/gc.c: * libguile/init.c: * libguile/inline.h: * libguile/print.c: * libguile/random.c: * libguile/read.c: * libguile/socket.c: * libguile/sort.c: * libguile/srfi-4.c: * libguile/srfi-4.h: * libguile/strports.c: * libguile/vectors.c: * libguile/vectors.h: Update includers.
* | Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès2009-08-181-6/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/Makefile.am libguile/Makefile.am libguile/frames.c libguile/gc-card.c libguile/gc-freelist.c libguile/gc-mark.c libguile/gc-segment.c libguile/gc_os_dep.c libguile/load.c libguile/macros.c libguile/objcodes.c libguile/programs.c libguile/strings.c libguile/vm.c m4/gnulib-cache.m4 m4/gnulib-comp.m4 m4/inline.m4
| * Change Guile license to LGPLv3+Neil Jerram2009-06-171-6/+7
| | | | | | | | | | | | | | | | | | | | (Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* )
* | Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès2009-02-141-1/+1
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: libguile/gc-mark.c libguile/procs.c libguile/procs.h libguile/threads.c libguile/threads.h
| * Fix build when compiled with -Wundef -WerrorNeil Jerram2009-02-081-1/+1
| | | | | | | | | | | | | | (Reported by David Fang) * libguile/inline.h: Check if __APPLE_CC__ is defined before testing its value.
* | Add `scm_immutable_double_cell ()'.Ludovic Courtès2008-09-161-0/+47
| | | | | | | | * libguile/inline.h (scm_immutable_double_cell): New.
* | Add `scm_immutable_cell ()'.Ludovic Courtès2008-09-151-0/+21
| | | | | | | | * libguile/inline.h (scm_immutable_cell): New.
* | Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès2008-09-101-47/+136
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: libguile/Makefile.am libguile/coop-defs.h libguile/gc-card.c libguile/gc-freelist.c libguile/gc-malloc.c libguile/gc-mark.c libguile/gc-segment.c libguile/gc.c libguile/gc.h libguile/gc_os_dep.c libguile/hashtab.c libguile/hashtab.h libguile/inline.h libguile/private-gc.h libguile/struct.c libguile/struct.h libguile/threads.c libguile/threads.h libguile/vectors.h libguile/weaks.h test-suite/tests/gc.test
| * Cleanup mark-during-GC debug checks.Han-Wen Nienhuys2008-09-091-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/__scm.h (SCM_DEBUG): add SCM_DEBUG_MARKING_API * libguile/gc.h (SCM_SET_GC_MARK): depending on SCM_DEBUG_MARKING_API crash if someone is touching markbits outside regular hours. Rename ensure_marking() to scm_i_ensure_marking(). * libguile/inline.h (scm_double_cell, scm_cell): only set mark bits for debugging if SCM_DEBUG_MARKING_API is unset * libguile/gc-mark.c: Issue deprecation warning if we are marking outside of the GC mark phase.
| * Garbage collection cleanup.Han-Wen Nienhuys2008-08-161-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New file gc-segment-table.c: hold code for the segment table. * Remove data that might be out of date; remove scm_i_adjust_min_yield(). We don't store min_yields, since they are only accurate at one point in time (when the sweep finishes). We decide the min yield at that point from min_yield_fraction and freelist->collected / freelist->swept * Introduce scm_i_gc_heap_size_delta() replacing scm_i_gc_grow_heap_p(). * Remove foo_1 fields containing penultimate results. * After GC, count mark bit vector to discover number of live objects. This simplifies hairy updates. * Many formatting and layout cleanups. * Fix in scm_i_sweep_card(): return the length of free_list returned, rather than number of deleted objects. * For mtrigger GCs: do not also run a full sweep after the gc() call, as this is inconsistent with lazy sweeping. * Remove scm_i_make_initial_segment(). * Use calloc in scm_i_make_empty_heap_segment() to save on initialization code. * New function scm_i_sweep_for_freelist() which sweeps, with proper statistic variable updates. * New segments are conceptually blocks with 100% reclaimable cells. * Remove some useless constants/comments: SCM_HEAP_SIZE, SCM_INIT_HEAP_SIZE, SCM_EXPHEAP, SCM_HEAP_SEG_SIZE * Do not increment scm_cells_allocated() from the scm_[double]cell(). This would be a race condition. * Move some deprecation checks in separate functions to not distract from main code flow.
| * Inline `scm_getc', `scm_putc' and `scm_puts'.Ludovic Courtès2008-04-161-5/+81
| |
| * Slightly simplify inline machinery.Ludovic Courtès2008-04-131-6/+6
| |
| * Really fix inline machinery for MacOS X.Ludovic Courtès2008-04-131-4/+5
| |