[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp testsu...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp testsu... |
Date: |
Tue, 31 Jul 2007 04:25:59 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/07/31 04:25:59
Modified files:
. : ChangeLog
server/vm : ASHandlers.cpp
testsuite/actionscript.all: array.as
Log message:
* server/vm/ASHandlers.cpp (ActionBitwiseXor, ActionBitwiseOr):
take nan operands as zero.
* testsuite/actionscript.all/array.as: expect less failures.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3880&r2=1.3881
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.112&r2=1.113
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/array.as?cvsroot=gnash&r1=1.24&r2=1.25
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3880
retrieving revision 1.3881
diff -u -b -r1.3880 -r1.3881
--- ChangeLog 31 Jul 2007 04:01:32 -0000 1.3880
+++ ChangeLog 31 Jul 2007 04:25:59 -0000 1.3881
@@ -1,3 +1,9 @@
+2007-07-31 Sandro Santilli <address@hidden>
+
+ * server/vm/ASHandlers.cpp (ActionBitwiseXor, ActionBitwiseOr):
+ take nan operands as zero.
+ * testsuite/actionscript.all/array.as: expect less failures.
+
2007-07-31 Zou Lunkai <address@hidden>
* testsuite/misc-ming.all/place_object_test2.c, Makefile.am
Index: server/vm/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -b -r1.112 -r1.113
--- server/vm/ASHandlers.cpp 10 Jul 2007 23:48:42 -0000 1.112
+++ server/vm/ASHandlers.cpp 31 Jul 2007 04:25:59 -0000 1.113
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: ASHandlers.cpp,v 1.112 2007/07/10 23:48:42 strk Exp $ */
+/* $Id: ASHandlers.cpp,v 1.113 2007/07/31 04:25:59 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -3089,6 +3089,9 @@
double operand1 = env.top(1).to_number(&env);
double operand2 = env.top(0).to_number(&env);
+ if ( isnan(operand1) ) operand1 = 0;
+ if ( isnan(operand2) ) operand2 = 0;
+
env.top(1) = int(operand1)|int(operand2);
env.drop(1);
}
@@ -3104,6 +3107,9 @@
double operand1 = env.top(1).to_number(&env);
double operand2 = env.top(0).to_number(&env);
+ if ( isnan(operand1) ) operand1 = 0;
+ if ( isnan(operand2) ) operand2 = 0;
+
env.top(1) = int(operand1)^int(operand2);
env.drop(1);
}
Index: testsuite/actionscript.all/array.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/array.as,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- testsuite/actionscript.all/array.as 31 Jul 2007 03:18:45 -0000 1.24
+++ testsuite/actionscript.all/array.as 31 Jul 2007 04:25:59 -0000 1.25
@@ -5,7 +5,7 @@
// Updated with sort functions, and to use check() macro
// by Mike Carlson Feb. 14th, 2006
-rcsid="$Id: array.as,v 1.24 2007/07/31 03:18:45 strk Exp $";
+rcsid="$Id: array.as,v 1.25 2007/07/31 04:25:59 strk Exp $";
#include "check.as"
@@ -104,6 +104,22 @@
check_equals ( Array.RETURNINDEXEDARRAY , 8 );
check_equals ( Array.NUMERIC , 16 );
+check_equals( typeof(Array.UNIQUE), 'undefined' );
+
+// the following tests do not belong here, but
+// better somewhere then nowhere (are here due to
+// a typo in this testcase triggering this bug)
+//
+check_equals( (undefined|1), 1 );
+check_equals( (1|undefined), 1 );
+check_equals( (undefined&1), 0 );
+check_equals( (1&undefined), 0 );
+check_equals( (undefined^1), 1 );
+check_equals( (1^undefined), 1 );
+
+
+check_equals( Array.UNIQUE | Array.CASEINSENSITIVE | Array.RETURNINDEXEDARRAY,
9 );
+
// Check sort functions
a.sort();
check_equals ( a.toString(), "200,551,7,8,9" );
@@ -742,7 +758,7 @@
a.push({Name: "Harvard Mark I", Year: 1944, Mass: 4500});
a.sortOn(["Electronic", "Year"], Array.DESCENDING | Array.IGNORECASE );
-xcheck_equals( tostr(a), "Harvard Mark I,1944,undefined | ENIAC,1944,true |
Colossus,1943,true | Atanasoff-Berry,1941,true | Zuse Z3,1941,false" );
+check_equals( tostr(a), "Harvard Mark I,1944,undefined | ENIAC,1944,true |
Colossus,1943,true | Atanasoff-Berry,1941,true | Zuse Z3,1941,false" );
a.sortOn( ["Electronic", "Name"], [Array.NUMERIC, Array.DESCENDING] );
check_equals( tostr(a), "Zuse Z3,1941,false | ENIAC,1944,true |
Colossus,1943,true | Atanasoff-Berry,1941,true | Harvard Mark I,1944,undefined"
);
- [Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp testsu...,
Sandro Santilli <=