| Commit message (Expand) | Author | Age | Files | Lines |
* | Merge commit '01a301d1b606b84d986b735049e7155d2f4cd6aa'...Conflicts:
libguile/hash.c
| Andy Wingo | 2015-01-22 | 1 | -1/+1 |
|\ |
|
| * | Optimize 'string-hash'....This yields a 50% improvement on the "narrow string" benchmark of
'hash.bm', 41% on "wide string", and 76% on "long string".
* libguile/hash.c (scm_i_string_hash): Rewrite to avoid
'scm_i_string_ref' calls.
| Ludovic Courtès | 2015-01-11 | 1 | -4/+19 |
* | | Merge commit '894d0b894daae001495c748b3352cd79918d3789'...Conflicts:
libguile/hash.c
| Andy Wingo | 2015-01-22 | 1 | -7/+1 |
|\| |
|
| * | Deprecate 'scm_string_hash'....This function has been unused internally for some time and is undocumented.
* libguile/hash.c (scm_string_hash): Wrap if #if SCM_ENABLE_DEPRECATED
== 1.
* libguile/hash.h (scm_string_hash): Likewise, and replace SCM_API with
SCM_DEPRECATED.
| Ludovic Courtès | 2015-01-11 | 1 | -2/+6 |
* | | Merge branch 'stable-2.0'...Conflicts:
libguile/hash.c
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
test-suite/tests/r6rs-ports.test
| Mark H Weaver | 2014-01-14 | 1 | -1/+1 |
|\| |
|
| * | Fix hashing of empty vectors....Fixes a bug introduced in cc1cd04f8111c306cf48b93e131d5c1765c808a3
"Fix hashing of vectors to run in bounded time."
* libguile/hash.c (scm_hasher): Avoid division by zero.
* test-suite/tests/hash.test ("hash"): Add tests.
| Mark H Weaver | 2014-01-12 | 1 | -1/+1 |
| * | Fix hashing of vectors to run in bounded time....* libguile/hash.c (SCM_MIN): New macro.
(scm_hasher): In vector case, do nothing if d is 0. Make sure to
recurse with a reduced d. Move the loop out of the 'if'.
| Mark H Weaver | 2014-01-12 | 1 | -26/+30 |
* | | Merge remote-tracking branch 'origin/stable-2.0'...Moved scm_i_struct_hash from struct.c to hash.c and made it static.
The port's alist is now a field of 'scm_t_port'.
Conflicts:
libguile/arrays.c
libguile/hash.c
libguile/ports.c
libguile/print.h
libguile/read.c
| Mark H Weaver | 2012-10-30 | 1 | -1/+51 |
|\| |
|
| * | Implement `hash' for structs....* libguile/hash.c (scm_hasher): Call `scm_i_struct_hash' upon
`scm_tcs_struct'.
* libguile/struct.c (scm_i_struct_hash): New function.
* libguile/struct.h (scm_i_struct_hash): New declaration.
* test-suite/tests/structs.test ("hash"): New test prefix.
| Ludovic Courtès | 2012-10-12 | 1 | -2/+5 |
* | | fix hash of zero-length vectors...* libguile/hash.c (scm_raw_ihash): Fix for zero-length vectors.
| Andy Wingo | 2011-10-27 | 1 | -2/+3 |
* | | update `hash'...* libguile/hash.c (scm_raw_ihash): Rename from `hasher'. Remove the
modulo argument; we expect the caller to deal with that. Use
scm_i_hashq for immediates and non-immediate integers. Use
scm_raw_ihashq on pointers too. Update the vector and pairs hashing
code. There is still some work to do here.
(scm_ihashv, scm_ihash): Adapt.
| Andy Wingo | 2011-10-26 | 1 | -100/+36 |
* | | don't downcase characters before hashing them...* libguile/hash.c (hasher, scm_ihashv): Don't downcase characters before
hashing them. That is silly.
| Andy Wingo | 2011-10-26 | 1 | -7/+1 |
* | | scm_hasher is static...* libguile/hash.c (hasher): Make static.
* libguile/hash.h: Remove scm_hasher.
| Andy Wingo | 2011-10-26 | 1 | -9/+8 |
* | | add thomas wang's integer hash function; use it for hashq, hashv...* libguile/hash.c (scm_raw_ihashq): Add Thomas Wang's integer hash
function, from http://www.cris.com/~Ttwang/tech/inthash.htm.
(scm_ihashq, scm_ihashv): Use it here.
| Andy Wingo | 2011-10-26 | 1 | -3/+30 |
* | | use bob jenkins' hashword2 hash from lookup3.c for our string hash...* libguile/hash.c (JENKINS_LOOKUP3_HASHWORD2, narrow_string_hash)
(wide_string_hash, scm_string_hash, scm_i_string_hash)
(scm_i_latin1_string_hash): Replace our lame string hash with Bob
Jenkins' hash, treating each codepoint as a word, for the purposes of
the algorithm. There are probably more optimal hashes for our use
cases.
(scm_i_locale_string_hash): Remove optimization, as it wasn't used.
(scm_i_utf8_string_hash): Add a specialized implementation for utf8.
It's tricky but mostly just cut-and-paste.
| Andy Wingo | 2011-10-26 | 1 | -62/+141 |
|/ |
|
* | allow iflags to be constant expressions with typing-strictness==2...* libguile/tags.h (SCM_MAKE_ITAG8_BITS): New helper, produces a
scm_t_bits instead of a SCM, because SCM_UNPACK is not a constant
expression with SCM_DEBUG_TYPING_STRICTNESS==2.
(SCM_MAKIFLAG_BITS): Remove SCM_MAKIFLAG, and replace with this, which
returns bits.
(SCM_BOOL_F_BITS, SCM_ELISP_NIL_BITS, SCM_EOL_BITS, SCM_BOOL_T_BITS):
(SCM_UNSPECIFIED_BITS, SCM_UNDEFINED_BITS, SCM_EOF_VAL_BITS):
(SCM_UNBOUND_BITS): New definitions. Defined SCM_BOOL_F, etc in terms
of them.
(SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_0):
(SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_1):
(SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_2):
(SCM_XXX_ANOTHER_LISP_FALSE_DONT_USE): Be bits instead of SCM values.
(SCM_BITS_DIFFER_IN_EXACTLY_ONE_BIT_POSITION):
(SCM_BITS_DIFFER_IN_EXACTLY_TWO_BIT_POSITIONS): Rename from
SCM_VALUES_DIFFER_..., and take unpacked bits as the args.
* libguile/boolean.c: Update verify block to use
SCM_BITS_DIFFER_IN_EXACTLY_TWO_BIT_POSITIONS et al.
* libguile/debug.c (scm_debug_opts):
* libguile/print.c (scm_print_opts):
* libguile/read.c (scm_read_opts): Use iflags bits for initializers.
* libguile/hash.c (scm_hasher): Use _BITS for iflags as case labels.
* libguile/pairs.c: Nil/null compile-time check uses
SCM_ELISP_NIL_BITS.
| Andy Wingo | 2011-05-13 | 1 | -6/+4 |
* | fix `hash' for inf and nan...* libguile/hash.c (scm_hasher): Fix to work on inf and nan.
* test-suite/tests/hash.test ("hash"): Add tests.
| Andy Wingo | 2011-05-08 | 1 | -1/+2 |
* | add hash functions for locale, latin1, and utf8 strings...* libguile/hash.c (scm_i_locale_string_hash)
(scm_i_latin1_string_hash, scm_i_utf8_string_hash): New functions.
| Andy Wingo | 2011-01-07 | 1 | -0/+79 |
* | hash.c cleanup...* libguile/hash.c (scm_hasher): Remove needless remember_upto_here.
| Andy Wingo | 2011-01-07 | 1 | -2/+1 |
* | Fix `hash' for pointer objects....Previously all pointer objects would hash to the same value.
* libguile/hash.c (scm_hasher): Add case for `scm_tc7_pointer'.
| Ludovic Courtès | 2010-12-16 | 1 | -0/+11 |
* | remove scm_tc7_gsubr...* libguile/tags.h (scm_tc7_gsubr): Return to the pool of unused tc7s, as
there are no more gsubrs. Yay :)
* libguile/programs.h (SCM_F_PROGRAM_IS_PRIMITIVE):
(SCM_PROGRAM_IS_PRIMITIVE): New flag and accessor.
* libguile/gsubr.c (create_gsubr):
* libguile/snarf.h (SCM_STATIC_PROGRAM): Give subrs a PRIMITIVE flag.
* libguile/smob.h:
* libguile/smob.c (scm_i_smob_arity): New internal procedure. Uses the
old GSUBR type macros, local to the file.
* libguile/procprop.c (scm_i_procedure_arity): Call out to
scm_i_smob_arity, and remove a gsubr case.
* libguile/gc.c (scm_i_tag_name):
* libguile/evalext.c (scm_self_evaluating_p):
* libguile/goops.c (scm_class_of):
* libguile/vm.c (apply_foreign):
* libguile/hash.c (scm_hasher):
* libguile/debug.c (scm_procedure_name):
* libguile/print.c (iprin1): Remove gsubr cases.
* libguile/gsubr.h (SCM_PRIMITIVE_P): Fix to work with the new VM
program regimen.
(SCM_GSUBR_TYPE, SCM_GSUBR_MAKTYPE, SCM_GSUBR_MAX, SCM_GSUBR_REQ)
(SCM_GSUBR_OPT, SCM_GSUBR_REST): Remove these macros, that are no
longer useful.
* libguile/gsubr.c (scm_i_gsubr_apply, scm_i_gsubr_apply_list)
(scm_i_gsubr_apply_array): Remove internal gsubr application
functions.
| Andy Wingo | 2010-01-07 | 1 | -3/+2 |
* | eval.c closures are now applicable smobs, not tc3s...* libguile/debug.c (scm_procedure_name): Remove a SCM_CLOSUREP case and
some dead code.
(scm_procedure_module): Remove. This was introduced a few months ago
for the hygienic expander, but now it is no longer needed, as the
expander keeps track of this information itself.
* libguile/debug.h: Remove scm_procedure_module.
* libguile/eval.c: Instead of using tc3 closures, define a "boot
closure" applicable smob type, and represent closures with that. The
advantage is that after eval.scm is compiled, boot closures take up no
address space (besides a smob number) in the runtime, and require no
special cases in procedure dispatch.
* libguile/eval.h: Remove the internal functions scm_i_call_closure_0
and scm_closure_apply, and the public function scm_closure.
* libguile/gc.c (scm_storage_prehistory): No tc3_closure displacement
registration.
(scm_i_tag_name): Remove closure case, and a dead cclo case.
* libguile/vm.c (apply_foreign):
* libguile/print.c (iprin1):
* libguile/procs.c (scm_procedure_p, scm_procedure_documentation);
* libguile/evalext.c (scm_self_evaluating_p):
* libguile/goops.c (scm_class_of): Remove tc3_closure/tcs_closure cases.
* libguile/hash.c (scm_hasher):
* libguile/hooks.c (scm_add_hook_x): Use new scm_i_procedure_arity.
* libguile/macros.c (macro_print): Print all macros using the same code.
(scm_macro_transformer): Return any procedure, not just programs.
* libguile/procprop.h:
* libguile/procprop.c (scm_i_procedure_arity): Instead of returning a
list that the caller has to parse, have the same prototype as
scm_i_program_arity. An incompatible change, but it's an internal
function anyway.
(scm_procedure_properties, scm_set_procedure_properties)
(scm_procedure_property, scm_set_procedure_property): Remove closure
cases, and use scm_i_program_arity for arity.
* libguile/procs.h (SCM_CLOSUREP, SCM_CLOSCAR, SCM_CODE)
(SCM_CLOSURE_NUM_REQUIRED_ARGS, SCM_CLOSURE_HAS_REST_ARGS)
(SCM_CLOSURE_BODY, SCM_PROCPROPS, SCM_SETPROCPROPS, SCM_ENV)
(SCM_TOP_LEVEL): Remove these macros that pertain to boot closures
only. Only eval.c should know abut boot closures.
* libguile/procs.c (scm_closure_p): Remove this function. There is a
simple stub in deprecated.scm now.
(scm_thunk_p): Use scm_i_program_arity.
* libguile/tags.h (scm_tc3_closure): Remove. Yay, another tc3 to play
with!
(scm_tcs_closures): Remove.
* libguile/validate.h (SCM_VALIDATE_CLOSURE): Remove.
* module/ice-9/deprecated.scm (closure?): Add stub.
* module/ice-9/documentation.scm (object-documentation)
* module/ice-9/session.scm (help-doc, arity)
* module/oop/goops.scm (compute-getters-n-setters)
* module/oop/goops/describe.scm (describe)
* module/system/repl/describe.scm (display-object, display-type):
Remove calls to closure?.
| Andy Wingo | 2009-12-04 | 1 | -1/+1 |
* | remove cxrs...* libguile/pairs.h:
* libguile/pairs.c: Previously scm_cdadr et al were implemented as
#defines that called scm_i_chase_pairs, and the Scheme-exposed
functions themselves were cxr subrs, which got special help in the
interpreter. Since now the special help is unnecessary (because the
compiler inlines and expands calls to car, cdadr, etc), the complexity
is a loss. So just implement cdadr etc using normal functions. There's
an advantage too, in that the compiler can unroll the cxring, reducing
branches.
* libguile/tags.h (scm_tc7_cxr): Remove this tag.
(scm_tcs_subrs): Now there's only one kind of subr, yay!
* libguile/debug.c (scm_procedure_name)
* libguile/evalext.c (scm_self_evaluating_p)
* libguile/gc.c (scm_i_tag_name)
* libguile/goops.c (scm_class_of)
* libguile/hash.c (scm_hasher)
* libguile/print.c (iprin1)
* libguile/procprop.c (scm_i_procedure_arity)
* libguile/procs.c (scm_procedure_p, scm_subr_p)
(scm_make_procedure_with_setter)
* libguile/vm.c (apply_foreign): Remove cxr cases. Replace uses of
scm_tcs_subrs with scm_tc7_gsubr.
| Andy Wingo | 2009-12-04 | 1 | -2/+2 |
* | Add initial support for wide symbols...* libguile/hash.c (scm_i_string_hash): new function
(scm_hasher): don't unpack string: use scm_i_string_hash
* libguile/hash.h: new declaration for scm_i_string_hash
* libguile/print.c (quote_keywordish_symbol): use symbol accessors
(scm_i_print_symbol_name): new function
(scm_print_symbol_name): call scm_i_print_symbol_name
(iprin1): use scm_i_print_symbol_name to print symbols
* libguile/print.h: new declaration for scm_i_print_symbol_name
* libguile/symbols.c (lookup_interned_symbol): now takes scheme string
instead of c string; callers changed
(lookup_interned_symbol): add wide symbol support
(scm_i_c_mem2symbol): removed
(scm_i_mem2symbol): removed and replaced with scm_i_str2symbol
(scm_i_str2symbol): new function
(scm_i_mem2uninterned_symbol): removed and replaced with
scm_i_str2uninterned_symbol
(scm_i_str2uninterned_symbol): new function
(scm_make_symbol, scm_string_to_symbol, scm_from_locale_symbol)
(scm_from_locale_symboln): use scm_i_str2symbol
* test-suite/tests/symbols.test: new tests
| Michael Gran | 2009-08-21 | 1 | -2/+15 |
* | Change Guile license to LGPLv3+...(Not quite finished, the following will be done tomorrow.
module/srfi/*.scm
module/rnrs/*.scm
module/scripts/*.scm
testsuite/*.scm
guile-readline/*
)
| Neil Jerram | 2009-06-17 | 1 | -6/+7 |
* | Include <config.h> in all C files; use `#ifdef HAVE_CONFIG_H' rather than `#if'. | Ludovic Courtès | 2008-09-13 | 1 | -1/+4 |
* | merge from 1.8 branch | Kevin Ryde | 2006-04-17 | 1 | -1/+1 |
* | The FSF has a new address. | Marius Vollmer | 2005-05-23 | 1 | -1/+1 |
* | * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee...that it is signed.
* strports.c (st_resize_port): Add unsigned char cast.
(scm_mkstrport): Make read/write_buf cast unsigned.
* srfi-13.c (string_titlecase_x): Add unsigned char cast.
* rdelim.c (scm_read_line): Initialize slen.
* load.c (scm_search_path): Remove weird >=1, and add
parentheses to clarify conditions.
* hash.c (scm_hasher): Add const unsigned char cast.
* gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
| Neil Jerram | 2005-05-12 | 1 | -2/+3 |
* | Use new vector elements API or simple vector API, as appropriate....Removed SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
| Marius Vollmer | 2005-01-02 | 1 | -4/+11 |
* | * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,...scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
uses.
(scm_i_make_string, scm_c_make_string): New, to replace
scm_allocate_string. Updated all uses.
(SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
SCM_STRING_LENGTH): Deprecated.
(scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
Discouraged. Replaced all uses with scm_from_locale_string or
similar, as appropriate.
(scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
scm_substring_shared, scm_substring_copy): New.
* symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
(SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
Deprecated.
(SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
(scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
New, to replace scm_str2symbol and scm_mem2symbol, respectively.
Updated all uses.
(scm_gensym): Generate only the number suffix in the buffer, just
string-append the prefix.
| Marius Vollmer | 2004-08-19 | 1 | -3/+3 |
* | * socket.c, rw.c, deprecated.h, validate.h...(SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
scm_to_locale_string, etc.
(SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
above, plus scm_i_get_substring_spec.
* regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
with more explicit scm_remember_upto_here_1, etc, or introduced
them in the first place.
| Marius Vollmer | 2004-08-12 | 1 | -1/+6 |
* | * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,...SCM_INUM): Deprecated by reenaming them to SCM_I_INUMP, SCM_I_NINUMP
and SCM_I_INUM, respectively and adding deprecated versions to
deprecated.h and deprecated.c. Changed all uses to either use the
SCM_I_ variants or scm_is_*, scm_to_*, or scm_from_*, as appropriate.
| Marius Vollmer | 2004-07-23 | 1 | -8/+8 |
* | * validate.h, deprecated.h (SCM_VALIDATE_INUM, SCM_VALIDATE_INUM_COPY,...SCM_VALIDATE_BIGINT, SCM_VALIDATE_INUM_MIN,
SCM_VALIDATE_INUM_MIN_COPY,
SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
fixnum/bignum distinction visible. Changed all uses to scm_to_size_t
or similar.
| Marius Vollmer | 2004-07-10 | 1 | -6/+6 |
* | (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather...than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
such a size causes divide-by-zeros in scm_hasher.
| Kevin Ryde | 2004-07-09 | 1 | -4/+4 |
* | * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to...SCM_I_MAKINUM and changed all uses.
| Marius Vollmer | 2004-07-08 | 1 | -6/+6 |
* | * srfi-13.c (s_scm_string_map): convert character to unsigned char...before converting to unsigned int. This prevents hi-bit ascii as
being converted large integers.
(string_upcase_x): change caller for scm_{up,down}case to
scm_c_{up,down}case
* chars.h (scm_init_chars): change scm_{upcase,downcase} to
scm_c_{up,down}case.
(SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
| Han-Wen Nienhuys | 2004-04-06 | 1 | -2/+2 |
* | * print.c (scm_iprin1): Handle fractions....* objects.h (scm_class_fraction): New.
* objects.c (scm_class_fraction): New.
(scm_class_of): Handle fractions.
* hash.c (scm_hasher): Handle fractions.
* numbers.c: New code for handling fraction all over the place.
(scm_odd_p, scm_even_p): Handle inexact integers.
(scm_rational_p): New function, same as scm_real_p.
(scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
New exact functions that replace the inexact 'dsubr'
implementations.
(scm_numerator, scm_denominator): New.
* numbers.h (SCM_NUMP): Recognize fractions.
(SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
SCM_FRACTION_REDUCED): New.
(scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
New prototypes.
(scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
scm_rational_p): New prototypes.
(scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
scm_i_print_fraction): New prototypes.
* goops.c (create_standard_classes): Create "<fraction>" class.
* gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
* gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
case in the switch, but do nothing for now.
* eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
to doubles when calling 'dsubr' functions.
* eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
| Marius Vollmer | 2003-11-18 | 1 | -0/+1 |
* | (scm_string_hash): New hashing algorithm that takes the complete...string into account.
| Marius Vollmer | 2003-11-17 | 1 | -17/+8 |
* | This set of patches introduces a new tc7 code scm_tc7_number for... numbers. Bignums, reals and complex numbers are turned from smobs
into subtypes of scm_tc7_number.
* tags.h (scm_tc7_number): New.
* eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
(scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
(scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
(scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
(scm_class_of), print.c (scm_iprin1), smob.c
(scm_smob_prehistory): Don't handle bignums, reals and complex
numbers as subtypes of scm_tc7_smob any more.
* numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
scm_tc16_complex): Moved definitions from tags.h to numbers.h.
| Dirk Herrmann | 2003-09-18 | 1 | -2/+5 |
* | Changed license terms to the plain LGPL thru-out. | Marius Vollmer | 2003-04-05 | 1 | -36/+12 |
* | 2002-07-20 Han-Wen <hanwen@cs.uu.nl>...* *.c: add space after commas everywhere.
* *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
Document cases where SCM_WRITABLE_VELTS() is used.
* vectors.h (SCM_VELTS): prepare for write barrier, and let
SCM_VELTS() return a const pointer
(SCM_VECTOR_SET): add macro.
* autogen.sh (mscripts): find and check version number of
autoconf. Complain if 2.53 is not found.
| Han-Wen Nienhuys | 2002-07-20 | 1 | -1/+1 |
* | Retire inclusion guard macro SCM_MAGIC_SNARFER. | Thien-Thi Nguyen | 2002-03-14 | 1 | -2/+0 |
* | * Removed lots of deprecated stuff. | Dirk Herrmann | 2001-08-31 | 1 | -1/+0 |
* | Remove "face-lift" comment. | Thien-Thi Nguyen | 2001-07-09 | 1 | -2/+0 |
* | (scm_hasher): Use SCM_UNPACK in the case labels so that...non-pointers are being compared. Thanks to Alexander Klimov!
| Marius Vollmer | 2001-06-04 | 1 | -4/+4 |
* | revert the ill-considered part of the 2001-05-24 changes | Michael Livshin | 2001-05-26 | 1 | -17/+17 |
* | * validate.h...(SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
new macros.
* unif.h: type renaming:
scm_array -> scm_array_t
scm_array_dim -> scm_array_dim_t
the old names are deprecated, all in-Guile uses changed.
* tags.h (scm_ubits_t): new typedef, representing unsigned
scm_bits_t.
* stacks.h: type renaming:
scm_info_frame -> scm_info_frame_t
scm_stack -> scm_stack_t
the old names are deprecated, all in-Guile uses changed.
* srcprop.h: type renaming:
scm_srcprops -> scm_srcprops_t
scm_srcprops_chunk -> scm_srcprops_chunk_t
the old names are deprecated, all in-Guile uses changed.
* gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
vectors.c, vports.c, weaks.c:
various int/size_t -> size_t/scm_bits_t changes.
* random.h: type renaming:
scm_rstate -> scm_rstate_t
scm_rng -> scm_rng_t
scm_i_rstate -> scm_i_rstate_t
the old names are deprecated, all in-Guile uses changed.
* procs.h: type renaming:
scm_subr_entry -> scm_subr_entry_t
the old name is deprecated, all in-Guile uses changed.
* options.h (scm_option_t.val): unsigned long -> scm_bits_t.
type renaming:
scm_option -> scm_option_t
the old name is deprecated, all in-Guile uses changed.
* objects.c: various long -> scm_bits_t changes.
(scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
* numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
SCM_I_FIXNUM_BIT.
* num2integral.i.c: new file, multiply included by numbers.c, used
to "templatize" the various integral <-> num conversion routines.
* numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
deprecated.
(scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
scm_num2size): new functions.
* modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.x
* load.c: change int -> size_t in various places (where the
variable is used to store a string length).
(search-path): call scm_done_free, not scm_done_malloc.
* list.c (scm_ilength): return a scm_bits_t, not long.
some other {int,long} -> scm_bits_t changes.
* hashtab.c: various [u]int -> scm_bits_t changes.
scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
(scm_ihashx): n: uint -> scm_bits_t
use scm_bits2num instead of scm_ulong2num.
* gsubr.c: various int -> scm_bits_t changes.
* gh_data.c (gh_scm2double): no loss of precision any more.
* gh.h (gh_str2scm): len: int -> size_t
(gh_{get,set}_substr): start: int -> scm_bits_t,
len: int -> size_t
(gh_<num>2scm): n: int -> scm_bits_t
(gh_*vector_length): return scm_[u]size_t, not unsigned long.
(gh_length): return scm_bits_t, not unsigned long.
* fports.h: type renaming:
scm_fport -> scm_fport_t
the old name is deprecated, all in-Guile uses changed.
* fports.c (fport_fill_input): count: int -> scm_bits_t
(fport_flush): init_size, remaining, count: int -> scm_bits_t
* debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
those prototypes, as the functions they prototype don't exist.
* fports.c (default_buffer_size): int -> size_t
(scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
default_size: int -> size_t
(scm_setvbuf): csize: int -> scm_bits_t
* fluids.c (n_fluids): int -> scm_bits_t
(grow_fluids): old_length, i: int -> scm_bits_t
(next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
scm_bits_t
(scm_c_with_fluids): flen, vlen: int -> scm_bits_t
* filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
the new and shiny SCM_NUM2INT.
* extensions.c: extension -> extension_t (and made a typedef).
* eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
there are no nasty surprises if/when the various deeply magic tag
bits move somewhere else.
* eval.c: changed the locals used to store results of SCM_IFRAME,
scm_ilength and such to be of type scm_bits_t (and not int/long).
(iqq): depth, edepth: int -> scm_bits_t
(scm_eval_stack): int -> scm_bits_t
(SCM_CEVAL): various vars are not scm_bits_t instead of int.
(check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
i: int -> scm_bits_t
* environments.c: changed the many calls to scm_ulong2num to
scm_ubits2num.
(import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
* dynwind.c (scm_dowinds): delta: long -> scm_bits_t
* debug.h: type renaming:
scm_debug_info -> scm_debug_info_t
scm_debug_frame -> scm_debug_frame_t
the old names are deprecated, all in-Guile uses changed.
(scm_debug_eframe_size): int -> scm_bits_t
* debug.c (scm_init_debug): use scm_c_define instead of the
deprecated scm_define.
* continuations.h: type renaming:
scm_contregs -> scm_contregs_t
the old name is deprecated, all in-Guile uses changed.
(scm_contregs_t.num_stack_items): size_t -> scm_bits_t
(scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
* continuations.c (scm_make_continuation): change the type of
stack_size form long to scm_bits_t.
* ports.h: type renaming:
scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
scm_port -> scm_port_t
scm_ptob_descriptor -> scm_ptob_descriptor_t
the old names are deprecated, all in-Guile uses changed.
(scm_port_t.entry): int -> scm_bits_t.
(scm_port_t.line_number): int -> long.
(scm_port_t.putback_buf_size): int -> size_t.
* __scm.h (long_long, ulong_long): deprecated (they pollute the
global namespace and have little value besides that).
(SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
SCM handle).
(ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
exist (for size_t & ptrdiff_t)
(scm_sizet): deprecated.
* Makefile.am (noinst_HEADERS): add num2integral.i.c
| Michael Livshin | 2001-05-24 | 1 | -34/+35 |
* | * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),... (scm_length, scm_append, scm_reverse, scm_list_ref),
(scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
(scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
(scm_delete1_x), gc.c (scm_map_free_list),
(scm_free_list_length), hash.c (scm_hashq, scm_hashv),
(scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
(scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
(scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
(scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
(scm_current_pstate), scmsigs.c (scm_usleep), goops.c
(scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
* weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
(scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
symbols.c (scm_symbol_interned_p), numbers.c
(scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
markup.
| Martin Grabmüller | 2001-03-16 | 1 | -22/+24 |
* | Remove #include <stdio.h>. Add #include <string.h>. | Keisuke Nishida | 2001-03-09 | 1 | -1/+0 |