mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts: libguile/deprecated.h libguile/programs.c libguile/programs.h
This commit is contained in:
commit
d7928d7c61
7 changed files with 17 additions and 16 deletions
2
THANKS
2
THANKS
|
@ -74,7 +74,7 @@ For fixes or providing information which led to a fix:
|
||||||
David Fang
|
David Fang
|
||||||
Barry Fishman
|
Barry Fishman
|
||||||
Kevin J. Fletcher
|
Kevin J. Fletcher
|
||||||
Josep Portella Florit
|
Josep Portella Florit
|
||||||
Charles Gagnon
|
Charles Gagnon
|
||||||
Fu-gangqiang
|
Fu-gangqiang
|
||||||
Aidan Gauland
|
Aidan Gauland
|
||||||
|
|
|
@ -88,7 +88,7 @@ default @code{C} locale which usually represents conventions in use in
|
||||||
the USA):
|
the USA):
|
||||||
|
|
||||||
@example
|
@example
|
||||||
(make-locale (list LC_MESSAGE LC_CTYPE) "sv_SE")
|
(make-locale (list LC_MESSAGES LC_CTYPE) "sv_SE")
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The following example combines the use of Esperanto messages and
|
The following example combines the use of Esperanto messages and
|
||||||
|
|
|
@ -297,7 +297,7 @@ list, or @code{#f} if this information is not available.
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
(program-lambda-alist
|
(program-lambda-list
|
||||||
(lambda* (a b #:optional c #:key (d 1) #:rest e)
|
(lambda* (a b #:optional c #:key (d 1) #:rest e)
|
||||||
#t)) @result{}
|
#t)) @result{}
|
||||||
@end example
|
@end example
|
||||||
|
|
|
@ -4977,11 +4977,14 @@ left_shift_exact_integer (SCM n, long count)
|
||||||
{
|
{
|
||||||
scm_t_inum nn = SCM_I_INUM (n);
|
scm_t_inum nn = SCM_I_INUM (n);
|
||||||
|
|
||||||
/* Left shift of count >= SCM_I_FIXNUM_BIT-1 will always
|
/* Left shift of count >= SCM_I_FIXNUM_BIT-1 will almost[*] always
|
||||||
overflow a non-zero fixnum. For smaller shifts we check the
|
overflow a non-zero fixnum. For smaller shifts we check the
|
||||||
bits going into positions above SCM_I_FIXNUM_BIT-1. If they're
|
bits going into positions above SCM_I_FIXNUM_BIT-1. If they're
|
||||||
all 0s for nn>=0, or all 1s for nn<0 then there's no overflow.
|
all 0s for nn>=0, or all 1s for nn<0 then there's no overflow.
|
||||||
Those bits are "nn >> (SCM_I_FIXNUM_BIT-1 - count)". */
|
Those bits are "nn >> (SCM_I_FIXNUM_BIT-1 - count)".
|
||||||
|
|
||||||
|
[*] There's one exception:
|
||||||
|
(-1) << SCM_I_FIXNUM_BIT-1 == SCM_MOST_NEGATIVE_FIXNUM */
|
||||||
|
|
||||||
if (nn == 0)
|
if (nn == 0)
|
||||||
return n;
|
return n;
|
||||||
|
@ -4994,8 +4997,8 @@ left_shift_exact_integer (SCM n, long count)
|
||||||
SCM result = scm_i_inum2big (nn);
|
SCM result = scm_i_inum2big (nn);
|
||||||
mpz_mul_2exp (SCM_I_BIG_MPZ (result), SCM_I_BIG_MPZ (result),
|
mpz_mul_2exp (SCM_I_BIG_MPZ (result), SCM_I_BIG_MPZ (result),
|
||||||
count);
|
count);
|
||||||
return result;
|
return scm_i_normbig (result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (SCM_BIGP (n))
|
else if (SCM_BIGP (n))
|
||||||
{
|
{
|
||||||
|
|
|
@ -392,12 +392,6 @@ SCM_DEFINE (scm_program_source, "program-source", 2, 1, 0,
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
|
||||||
extern SCM
|
|
||||||
scm_c_program_source (SCM program, size_t ip)
|
|
||||||
{
|
|
||||||
return program_source (program, ip, scm_program_sources (program));
|
|
||||||
}
|
|
||||||
|
|
||||||
SCM_DEFINE (scm_program_num_free_variables, "program-num-free-variables", 1, 0, 0,
|
SCM_DEFINE (scm_program_num_free_variables, "program-num-free-variables", 1, 0, 0,
|
||||||
(SCM program),
|
(SCM program),
|
||||||
"")
|
"")
|
||||||
|
|
|
@ -89,8 +89,6 @@ SCM_API SCM scm_program_free_variable_ref (SCM program, SCM i);
|
||||||
SCM_API SCM scm_program_free_variable_set_x (SCM program, SCM i, SCM x);
|
SCM_API SCM scm_program_free_variable_set_x (SCM program, SCM i, SCM x);
|
||||||
SCM_API SCM scm_program_objcode (SCM program);
|
SCM_API SCM scm_program_objcode (SCM program);
|
||||||
|
|
||||||
SCM_API SCM scm_c_program_source (SCM program, size_t ip);
|
|
||||||
|
|
||||||
SCM_INTERNAL SCM scm_i_program_properties (SCM program);
|
SCM_INTERNAL SCM scm_i_program_properties (SCM program);
|
||||||
SCM_INTERNAL int scm_i_program_arity (SCM program, int *req, int *opt, int *rest);
|
SCM_INTERNAL int scm_i_program_arity (SCM program, int *req, int *opt, int *rest);
|
||||||
SCM_INTERNAL void scm_i_program_print (SCM program, SCM port,
|
SCM_INTERNAL void scm_i_program_print (SCM program, SCM port,
|
||||||
|
|
|
@ -5360,7 +5360,13 @@
|
||||||
|
|
||||||
(for-each (lambda (n)
|
(for-each (lambda (n)
|
||||||
(for-each (lambda (count) (test n count))
|
(for-each (lambda (count) (test n count))
|
||||||
'(-1000 -3 -2 -1 0 1 2 3 1000)))
|
`(-1000
|
||||||
|
,(- fixnum-bit)
|
||||||
|
,(- (- fixnum-bit 1))
|
||||||
|
-3 -2 -1 0 1 2 3
|
||||||
|
,(- fixnum-bit 1)
|
||||||
|
,fixnum-bit
|
||||||
|
1000)))
|
||||||
(list 0 1 3 23 -1 -3 -23
|
(list 0 1 3 23 -1 -3 -23
|
||||||
fixnum-max
|
fixnum-max
|
||||||
(1+ fixnum-max)
|
(1+ fixnum-max)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue