[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: |
Wed, 03 Oct 2007 09:26:31 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/10/03 09:26:31
Modified files:
. : ChangeLog
server/vm : ASHandlers.cpp
testsuite/actionscript.all: ops.as
Log message:
* testsuite/actionscript.all/ops.as: more tests for
ActionShiftRight
* server/vm/ASHandlers.cpp (ActionShiftRight): fix new testcases
(and the current 3dtris.swf problem with it - see bug #21074).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4505&r2=1.4506
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.137&r2=1.138
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/ops.as?cvsroot=gnash&r1=1.24&r2=1.25
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4505
retrieving revision 1.4506
diff -u -b -r1.4505 -r1.4506
--- ChangeLog 3 Oct 2007 08:06:53 -0000 1.4505
+++ ChangeLog 3 Oct 2007 09:26:30 -0000 1.4506
@@ -1,3 +1,9 @@
+2007-10-03 Sandro Santilli <address@hidden>
+
+ * testsuite/actionscript.all/ops.as: more tests for ActionShiftRight
+ * server/vm/ASHandlers.cpp (ActionShiftRight): fix new testcases
+ (and the current 3dtris.swf problem with it - see bug #21074).
+
2007-10-03 Chad Musick <address@hidden>
* server/vm/ASHandlers.cpp: Drop top of stack in ActionStringCompare,
Index: server/vm/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -b -r1.137 -r1.138
--- server/vm/ASHandlers.cpp 3 Oct 2007 08:06:53 -0000 1.137
+++ server/vm/ASHandlers.cpp 3 Oct 2007 09:26:31 -0000 1.138
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: ASHandlers.cpp,v 1.137 2007/10/03 08:06:53 cmusick Exp $ */
+/* $Id: ASHandlers.cpp,v 1.138 2007/10/03 09:26:31 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -3367,17 +3367,18 @@
void
SWFHandlers::ActionShiftRight(ActionExec& thread)
{
-// GNASH_REPORT_FUNCTION;
-//
- //env.top(1).lsr(env.top(0));
as_environment& env = thread.env;
thread.ensureStack(2);
- int16_t operand1 = env.top(1).to_int(env);
- int operand2 = env.top(0).to_int(env);
+ int32_t operand1 = env.top(1).to_int(env);
+ int32_t operand2 = env.top(0).to_int(env);
- env.top(1) = operand1 >> operand2;
+ int32_t res = operand1 >> operand2;
+
+ //log_debug("%d >> %d == %d", operand1, operand2, res);
+
+ env.top(1) = res;
env.drop(1);
}
@@ -3391,9 +3392,9 @@
thread.ensureStack(2);
uint32_t operand1 = env.top(1).to_int(env);
- int operand2 = env.top(0).to_int(env);
+ int32_t operand2 = env.top(0).to_int(env); // TODO: check this !
- env.top(1) = operand1 >> operand2;
+ env.top(1) = uint32_t( operand1 >> operand2 );
env.drop(1);
}
Index: testsuite/actionscript.all/ops.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/ops.as,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- testsuite/actionscript.all/ops.as 29 Sep 2007 16:22:59 -0000 1.24
+++ testsuite/actionscript.all/ops.as 3 Oct 2007 09:26:31 -0000 1.25
@@ -20,7 +20,7 @@
* Test binary predicates (equal, less_then, greater_then, logical and
bitwise ops)
*/
-rcsid="$Id: ops.as,v 1.24 2007/09/29 16:22:59 strk Exp $";
+rcsid="$Id: ops.as,v 1.25 2007/10/03 09:26:31 strk Exp $";
#include "check.as"
@@ -442,6 +442,9 @@
y = new String("2.999");
check_equals(x^y, 3);
+x = 1082401;
+y = x^32800;
+check_equals(y, 1049601);
//------------------------------------------------
// Shift left operator (ACTION_SHIFTLEFT : 0x63)
@@ -542,6 +545,36 @@
y = x >> 1;
check_equals(y, 3);
+x = 32800;
+y = x >> 5;
+check_equals(y, 1025);
+
+x = -32;
+y = x >> 5;
+check_equals(y, -1);
+
+x = -1023;
+y = x >> 5;
+check_equals(y, -32);
+
+x = -32736;
+y = x >> 5;
+check_equals(y, -1023);
+
+x = 32800;
+y = x >> 1082400;
+check_equals(y, 32800);
+
+x = 32800;
+y = x >> 1082401;
+check_equals(y, 16400);
+
+x = 32800;
+y = x >> -2;
+check_equals(y, 0);
+
+
+
//-------------------------------------------------
// Shift right2 operator (ACTION_SHIFTRIGHT2 : 0x65)
//-------------------------------------------------
- [Gnash-commit] gnash ChangeLog server/vm/ASHandlers.cpp testsu...,
Sandro Santilli <=