Marius Vollmer
aacff585bc
*** empty log message ***
2004-01-06 18:17:30 +00:00
Marius Vollmer
9320d21970
dynwind.h (SCM_F_WIND_EXPLICITELY, SCM_F_WIND_EXPLICITLY): It's
...
"explicitly" not "explicitely", damn. Changed all uses.
2004-01-06 18:11:55 +00:00
Marius Vollmer
b42170a484
(swap_ports, scm_with_current_foo_port): Do not allocate swap_data on
...
stack, use a 'malloc obj'.
2004-01-06 18:09:42 +00:00
Marius Vollmer
a52dbe0177
(scm_make_initial_fluids, scm_copy_fluids, scm_swap_fluids,
...
scm_swap_fluids_reverse): Renamed to scm_i_... since they are
internal. Changed all uses.
2004-01-06 18:08:31 +00:00
Marius Vollmer
a520e4f0d0
(frame_print): Removed, use the default printer. (WINDER_F_MARK,
...
WINDER_MARK_P, winder_mark): New. (scm_on_unwind_with_scm,
scm_on_rewind_with_scm): New. Use above to protect SCM values.
2004-01-06 18:04:47 +00:00
Marius Vollmer
62f3c0957e
(SCM_F_WIND_EXPLICITELY, SCM_F_WIND_EXPLICITLY): It's "explicitly" not
...
"explicitely", damn. Changed all uses.
2004-01-06 17:57:41 +00:00
Marius Vollmer
49c00ecc7b
*** empty log message ***
2004-01-04 23:45:38 +00:00
Marius Vollmer
185e369a7f
(scm_with_current_input_port, scm_with_current_output_port,
...
scm_with_current_error_port): New.
2004-01-04 23:40:14 +00:00
Marius Vollmer
b57a0953fe
(scm_with_blocked_asyncs, scm_with_unblocked_asyncs): New.
2004-01-04 23:36:49 +00:00
Kevin Ryde
e049920715
*** empty log message ***
2004-01-03 22:34:05 +00:00
Kevin Ryde
f40771d883
(scm_current_time, scm_gettimeofday): Add a comment about
...
setzone/restorezone protection for DOS.
2004-01-03 22:25:24 +00:00
Marius Vollmer
dab514a843
*** empty log message ***
2004-01-03 21:56:35 +00:00
Marius Vollmer
d3c6aef934
(copy_stack): New, do only the stack copying
...
part of copy_stack_and_call.
(copy_stack_and_call): Copy the stack after unwinding and before
rewinding.
(scm_dynthrow): Do not call scm_dowinds, this is now done by
copy_stack_and_call.
2004-01-03 21:52:34 +00:00
Marius Vollmer
4845bbae3a
(scm_t_frame_flags, scm_t_wind_flags,
...
scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
New.
(scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
scm_i_dowinds and extended to handle frames and to invoke a 'turn'
function when the outermost wind point has been reached. The
latter is used to copy a continuation stack at the right time.
scm_dowinds remains available.
(SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
tc16_guard, guards_print): Removed.
(scm_internal_dynamic_wind): Reimplemented using frames.
2004-01-03 21:49:16 +00:00
Kevin Ryde
441a25d9e7
*** empty log message ***
2004-01-03 21:41:31 +00:00
Kevin Ryde
a5f0b59988
(scm_less_p): Don't convert frac to float for compares,
...
can give wrong results due to rounding.
2004-01-03 21:38:38 +00:00
Marius Vollmer
89fcf1b4aa
*** empty log message ***
2003-12-26 19:09:03 +00:00
Marius Vollmer
fc54d9376d
Arrange for scm_t_intmax and scm_t_uintmax to be defined in
...
scmconfig.h
2003-12-26 19:04:55 +00:00
Kevin Ryde
caff34d4fa
*** empty log message ***
2003-12-02 21:38:04 +00:00
Kevin Ryde
084b1d8eec
(scm_less_p): Remove spurious xisnan from frac+big case.
2003-12-02 21:36:39 +00:00
Kevin Ryde
2fa2d87937
(scm_real_part): Return fraction unchanged rather than converting to flonum.
2003-12-02 21:27:13 +00:00
Kevin Ryde
dd5130cadf
(scm_make_ratio): Check for numerator equal to
...
SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
giving integer -1.
2003-12-02 21:21:14 +00:00
Dirk Herrmann
2d0b85acf8
* modules.c (module_variable): Fixed (and thus simplified) the
...
definition of SCM_BOUND_THING_P to reflect the fact that since
after the 1.4 series of guile, obarrays only hold variable
objects.
2003-11-30 12:41:34 +00:00
Marius Vollmer
2297981dde
*** empty log message ***
2003-11-30 01:00:16 +00:00
Marius Vollmer
535f2a516a
(scm_logand): It's "#b...", not "#\b...".
2003-11-30 00:59:40 +00:00
Marius Vollmer
fea8e14239
(scm_iprin1): use \xNN hexadecimal sequences when writing control
...
characters in strings.
2003-11-30 00:57:14 +00:00
Marius Vollmer
b645ea8c7e
(scm_lreadr): Signal an error for invalid escape sequences in strings.
...
Code cleanups too.
2003-11-30 00:57:03 +00:00
Dirk Herrmann
5c26400756
* Forgot to submit the Changelog last time.
2003-11-21 23:28:15 +00:00
Dirk Herrmann
6bff13687c
* eval.c (s_bad_define): New static identifier.
...
(m_body): Fixed comment.
(scm_m_define): Don't generate memoized code for definitions that
are not on the top level. As a consequence, no memoized code at
all is generated for definitions any more: Top level definitions
are executed immediately during memoization and internal
definitions are handled separately in m_expand_body.
(scm_unmemocopy, unmemocopy): Removed code for unmemoizing
definitions. Consequently, there is no unmemoizing code any more
that might modify the environment. Thus, the old scm_unmemocopy
is removed and the old unmemocopy is renamed to scm_unmemocopy.
(SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
over SCM_NIMP in places, where the argument is known to be part of
a proper list.
2003-11-21 23:21:34 +00:00
Marius Vollmer
28a6e1b0b6
(scm_drain_input): Bug fix: only access the port after checking that
...
it indeed is one.
2003-11-21 17:08:31 +00:00
Kevin Ryde
018d4730fe
*** empty log message ***
2003-11-21 00:45:07 +00:00
Kevin Ryde
7f84824269
(scm_bit_extract): Use mpz functions, rearrange inum case
...
to share some shifting.
2003-11-21 00:33:44 +00:00
Kevin Ryde
ae38324d9c
(scm_abs): Allocate a new real only for negatives, as done for bignums.
2003-11-21 00:07:13 +00:00
Kevin Ryde
753ac1e7e1
(scm_integer_expt): Don't mpz_init after scm_i_clonebig or
...
scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
since gc does this.
2003-11-21 00:03:54 +00:00
Rob Browning
c412e408c5
(scm_system_star): new prototype.
2003-11-19 21:40:42 +00:00
Rob Browning
0db17ef9ab
(scm_system_star): new function.
2003-11-19 21:40:32 +00:00
Marius Vollmer
fb16d26e23
*** empty log message ***
2003-11-19 05:13:53 +00:00
Marius Vollmer
c60e130c97
* numbers.c (scm_make_ratio): Rewritten to have a simpler
...
structure. Previously, not all cases with a negative denominator
were covered.
2003-11-19 05:12:08 +00:00
Marius Vollmer
0b0c8e3b4c
* numbers.c (scm_make_ratio): Don't declare divisible_p after
...
statements.
2003-11-19 04:30:40 +00:00
Marius Vollmer
4bca30d83a
*** empty log message ***
2003-11-19 03:51:21 +00:00
Marius Vollmer
02164269a7
* numbers.c (scm_i_fraction_equalp): Do not treat the return value
...
of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
fractions were equal to each other regardless of value. Ooops.
* numbers.c (scm_rationalize): Return an inexact result when given
inexact arguments.
2003-11-19 03:50:26 +00:00
Marius Vollmer
eb927cb95c
* numbers.c (scm_exact_p, scm_inexact_p): Throw error for non-numbers.
2003-11-19 02:38:37 +00:00
Marius Vollmer
d8592269ab
(mem2decimal_from_point): use scm_divide instead of scm_divide2real
...
when forming the fractional part. This allows "#e1.2" to yield 6/5.
2003-11-19 02:19:03 +00:00
Marius Vollmer
bdf26b606b
*** empty log message ***
2003-11-18 20:01:57 +00:00
Marius Vollmer
f92e85f735
* 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.
2003-11-18 19:59:53 +00:00
Rob Browning
28fda54472
*** empty log message ***
2003-11-18 06:14:29 +00:00
Rob Browning
9ca20a9c88
* gen-scmconfig.c (main): remove public definition of
...
SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
direct typedef of long_long and ulong_long inside deprecated block
when appropriate.
2003-11-18 06:10:39 +00:00
Rob Browning
1fe5648d31
move long_long and ulong_long definitions to
...
gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
2003-11-18 06:10:11 +00:00
Marius Vollmer
9a1d7d7c8b
*** empty log message ***
2003-11-17 16:57:27 +00:00
Marius Vollmer
b4d5926184
(scm_string_hash): New hashing algorithm that takes the complete
...
string into account.
2003-11-17 16:56:48 +00:00