From a084df5e0f237ae0e331f2fe43f850853eec5fb6 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 21 Mar 2012 15:50:28 -0700 Subject: * arith.c (plus, minus, mul): Removing unnecessary type checks, which are already implied by the switch case. --- ChangeLog | 5 +++++ arith.c | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index de1ce0ca..0b07cdbf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-21 Kaz Kylheku + + * arith.c (plus, minus, mul): Removing unnecessary type checks, + which are already implied by the switch case. + 2012-03-21 Kaz Kylheku * txr.1: Doc stubs for new functions floatp, integerp, diff --git a/arith.c b/arith.c index 51fcaa25..1a5981ec 100644 --- a/arith.c +++ b/arith.c @@ -305,7 +305,6 @@ tail: case BGNUM: { val n; - type_check(anum, BGNUM); n = make_bignum(); if (sizeof (int_ptr_t) <= sizeof (mp_digit)) { cnum b = c_num(bnum); @@ -334,8 +333,6 @@ tail: case TYPE_PAIR(BGNUM, BGNUM): { val n; - type_check(anum, BGNUM); - type_check(bnum, BGNUM); n = make_bignum(); mp_add(mp(anum), mp(bnum), mp(n)); return normalize(n); @@ -456,8 +453,6 @@ tail: case TYPE_PAIR(BGNUM, BGNUM): { val n; - type_check(anum, BGNUM); - type_check(bnum, BGNUM); n = make_bignum(); mp_sub(mp(anum), mp(bnum), mp(n)); return normalize(n); @@ -618,8 +613,6 @@ tail: case TYPE_PAIR(BGNUM, BGNUM): { val n; - type_check(anum, BGNUM); - type_check(bnum, BGNUM); n = make_bignum(); mp_mul(mp(anum), mp(bnum), mp(n)); return n; -- cgit v1.2.3