summaryrefslogtreecommitdiff
path: root/libguile/vm-i-scheme.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-05-13 15:45:43 +0200
committerAndy Wingo <wingo@pobox.com>2011-05-13 15:45:43 +0200
commit86fb1eb631d455aec634aa475a14d2c88052752c (patch)
tree98936072396a05aa1e4a6d177452f6d5e65a62f5 /libguile/vm-i-scheme.c
parentfc7bd367ab4b5027a7f80686b1e229c62e43c90b (diff)
parent2002f1f84797c2c46d0634eabd5ac5fd61e13d73 (diff)
downloadguile-86fb1eb631d455aec634aa475a14d2c88052752c.tar.gz
merge strictness branch from 2.0
Diffstat (limited to 'libguile/vm-i-scheme.c')
-rw-r--r--libguile/vm-i-scheme.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c
index 60e44521e..2d8501253 100644
--- a/libguile/vm-i-scheme.c
+++ b/libguile/vm-i-scheme.c
@@ -168,15 +168,15 @@ VM_DEFINE_INSTRUCTION (144, set_cdr, "set-cdr!", 0, 2, 0)
*/
#undef REL
-#define REL(crel,srel) \
-{ \
- ARGS2 (x, y); \
- if (SCM_I_INUMP (x) && SCM_I_INUMP (y)) \
- RETURN (scm_from_bool ((scm_t_signed_bits) (x) \
- crel (scm_t_signed_bits) (y))); \
- SYNC_REGISTER (); \
- RETURN (srel (x, y)); \
-}
+#define REL(crel,srel) \
+ { \
+ ARGS2 (x, y); \
+ if (SCM_I_INUMP (x) && SCM_I_INUMP (y)) \
+ RETURN (scm_from_bool (((scm_t_signed_bits) SCM_UNPACK (x)) \
+ crel ((scm_t_signed_bits) SCM_UNPACK (y)))); \
+ SYNC_REGISTER (); \
+ RETURN (srel (x, y)); \
+ }
VM_DEFINE_FUNCTION (145, ee, "ee?", 2)
{
@@ -297,13 +297,13 @@ VM_DEFINE_FUNCTION (151, add1, "add1", 1)
ARGS1 (x);
/* Check for overflow. */
- if (SCM_LIKELY ((scm_t_intptr) x < INUM_MAX))
+ if (SCM_LIKELY ((scm_t_intptr) SCM_UNPACK (x) < INUM_MAX))
{
SCM result;
/* Add the integers without untagging. */
- result = SCM_PACK ((scm_t_intptr) x
- + (scm_t_intptr) SCM_I_MAKINUM (1)
+ result = SCM_PACK ((scm_t_intptr) SCM_UNPACK (x)
+ + (scm_t_intptr) SCM_UNPACK (SCM_I_MAKINUM (1))
- scm_tc2_int);
if (SCM_LIKELY (SCM_I_INUMP (result)))
@@ -331,13 +331,13 @@ VM_DEFINE_FUNCTION (153, sub1, "sub1", 1)
ARGS1 (x);
/* Check for underflow. */
- if (SCM_LIKELY ((scm_t_intptr) x > INUM_MIN))
+ if (SCM_LIKELY ((scm_t_intptr) SCM_UNPACK (x) > INUM_MIN))
{
SCM result;
/* Substract the integers without untagging. */
- result = SCM_PACK ((scm_t_intptr) x
- - (scm_t_intptr) SCM_I_MAKINUM (1)
+ result = SCM_PACK ((scm_t_intptr) SCM_UNPACK (x)
+ - (scm_t_intptr) SCM_UNPACK (SCM_I_MAKINUM (1))
+ scm_tc2_int);
if (SCM_LIKELY (SCM_I_INUMP (result)))