changeset 1992:4529ff71e646

[xemacs-hg @ 2004-04-07 02:20:12 by james] Fix --use-union-type breakage due to over-eager optimization.
author james
date Wed, 07 Apr 2004 02:20:14 +0000
parents d956f0da8a5e
children e567417c2e5d
files src/ChangeLog src/data.c
diffstat 2 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Apr 06 21:50:37 2004 +0000
+++ b/src/ChangeLog	Wed Apr 07 02:20:14 2004 +0000
@@ -1,3 +1,8 @@
+2004-04-06  Jerry James  <james@xemacs.org>
+
+	* data.c (Flogand): Fix for --use-union-type.
+	* data.c (Flogior): Ditto.
+
 2004-04-06  Jerry James  <james@xemacs.org>
 
 	* number-mp.c (bignum_to_double): Original algorithm was wrong.
--- a/src/data.c	Tue Apr 06 21:50:37 2004 +0000
+++ b/src/data.c	Wed Apr 07 02:20:14 2004 +0000
@@ -1995,10 +1995,7 @@
       switch (promote_args (&result, &other))
 	{
 	case FIXNUM_T:
-	  /* This looks evil, but it isn't.  The bits identifying the objects
-	     as fixnums will be present in both, so & will preserve them.
-	     The only bits possibly turned off are the actual data bits. */
-	  result &= other;
+	  result = make_int (XREALINT (result), XREALINT (other));
 	  break;
 	case BIGNUM_T:
 	  bignum_and (scratch_bignum, XBIGNUM_DATA (result),
@@ -2048,10 +2045,7 @@
       switch (promote_args (&result, &other))
 	{
 	case FIXNUM_T:
-	  /* This looks evil, but it isn't.  The bits identifying the objects
-	     as fixnums are the same in both, so | will preserve them.  The
-	     only bits possibly turned on are the actual data bits. */
-	  result |= other;
+	  result = make_int (XREALINT (result) | XREALINT (other));
 	  break;
 	case BIGNUM_T:
 	  bignum_ior (scratch_bignum, XBIGNUM_DATA (result),