[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/array.cpp testsuite/acti...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/array.cpp testsuite/acti... |
Date: |
Tue, 31 Jul 2007 02:39:05 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/07/31 02:39:05
Modified files:
. : ChangeLog
server : array.cpp
testsuite/actionscript.all: array.as
Log message:
* server/array.cpp (join): use the SWF-version aware version
of as_value to string conversion. Add TODO items.
* testsuite/actionscript.all/array.as: don't expect a failure
in the descending numeric sort
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3877&r2=1.3878
http://cvs.savannah.gnu.org/viewcvs/gnash/server/array.cpp?cvsroot=gnash&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/array.as?cvsroot=gnash&r1=1.22&r2=1.23
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3877
retrieving revision 1.3878
diff -u -b -r1.3877 -r1.3878
--- ChangeLog 31 Jul 2007 01:18:03 -0000 1.3877
+++ ChangeLog 31 Jul 2007 02:39:04 -0000 1.3878
@@ -1,9 +1,16 @@
+2007-07-31 Sandro Santilli <address@hidden>
+
+ * server/array.cpp (join): use the SWF-version aware version
+ of as_value to string conversion. Add TODO items.
+ * testsuite/actionscript.all/array.as: don't expect a failure
+ in the descending numeric sort
+
2007-07-31 Zou Lunkai <address@hidden>
* testsuite/misc-ming.all/duplicate_movie_clip_test.c,
place_object_test.c,
place_object_test2.c: trivial comments cleanups.
-2007-07-29 Sandro Santilli <address@hidden>
+2007-07-30 Sandro Santilli <address@hidden>
* libamf/Makefile.am: add BOOST libs
* testsuite/samples/Makefile.am: link in
Index: server/array.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/array.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- server/array.cpp 29 Jul 2007 12:57:01 -0000 1.67
+++ server/array.cpp 31 Jul 2007 02:39:05 -0000 1.68
@@ -61,18 +61,21 @@
inline static bool
as_value_lt (const as_value& a, const as_value& b)
{
+ // TODO: pass env, use versioned (to_string)
return a.to_string().compare(b.to_string()) < 0;
}
inline static bool
as_value_gt (const as_value& a, const as_value& b)
{
+ // TODO: pass env, use versioned (to_string)
return a.to_string().compare(b.to_string()) > 0;
}
inline static bool
as_value_eq (const as_value& a, const as_value& b)
{
+ // TODO: pass env, use versioned (to_string)
return a.to_string().compare(b.to_string()) == 0;
}
@@ -81,6 +84,7 @@
{
using namespace boost::algorithm;
+ // TODO: pass env, use versioned (to_string)
std::string strA = to_upper_copy(a.to_string());
std::string strB = to_upper_copy(b.to_string());
@@ -563,6 +567,8 @@
std::string temp;
//std::string temp = "("; // SWF > 7
+ int swfversion = _vm.getSWFVersion();
+
if ( ! elements.empty() )
{
std::deque<as_value>::const_iterator
@@ -570,12 +576,12 @@
itEnd=elements.end();
// print first element w/out separator prefix
- temp += (*it++).to_string(env);
+ temp += (*it++).to_string_versioned(swfversion, env);
// print subsequent elements with separator prefix
while ( it != itEnd )
{
- temp += separator + (*it++).to_string(env);
+ temp += separator +
(*it++).to_string_versioned(swfversion, env);
}
}
@@ -881,7 +887,7 @@
// case: sortOn("prop")
if ( fn.nargs == 1 && fn.arg(0).is_string() )
{
- std::string propField = PROPNAME(fn.arg(0).to_string());
+ std::string propField = PROPNAME(fn.arg(0).to_string()); //
TODO: pass env, use versioned
as_value_prop avc = as_value_prop(propField, &as_value_lt);
array->sort(&avc);
return as_value((boost::intrusive_ptr<as_object>)array);
@@ -891,7 +897,7 @@
bool do_unique = false, do_index = false;
if ( fn.nargs == 2 && fn.arg(0).is_string() )
{
- std::string propField = PROPNAME(fn.arg(0).to_string());
+ std::string propField = PROPNAME(fn.arg(0).to_string()); //
TODO: pass env, use versioned
if ( fn.arg(1).is_number() )
{
uint8_t flags =
@@ -927,7 +933,7 @@
for (std::deque<as_value>::const_iterator it = props->begin();
it != props->end(); ++it)
{
- std::string s = PROPNAME((*it).to_string());
+ std::string s = PROPNAME((*it).to_string()); // TODO:
pass env, use versioned
prp.push_back(s);
}
@@ -1052,7 +1058,7 @@
IF_VERBOSE_ACTION (
log_action(_("calling array pop, result:%s, new array size:%d"),
- rv.to_string().c_str(), array->size());
+ rv.to_debug_string().c_str(), array->size());
);
return rv;
}
@@ -1068,7 +1074,7 @@
IF_VERBOSE_ACTION (
log_action(_("calling array shift, result:%s, new array size:%d"),
- rv.to_string().c_str(), array->size());
+ rv.to_debug_string().c_str(), array->size());
);
return rv;
}
@@ -1085,7 +1091,7 @@
IF_VERBOSE_ACTION (
log_action(_("called array reverse, result:%s, new array size:%d"),
- rv.to_string().c_str(), array->size());
+ rv.to_debug_string().c_str(), array->size());
);
return rv;
}
@@ -1099,7 +1105,7 @@
std::string separator = ",";
if (fn.nargs > 0)
- separator = fn.arg(0).to_string();
+ separator = fn.arg(0).to_string(); // TODO: pass env, use
versioned
std::string ret = array->join(separator, &(fn.env()));
@@ -1266,6 +1272,7 @@
for (int i = 0; i < int(fn.arg(0).to_number()); i++)
{
index_number.set_int(i);
+ // TODO: pass env, use versioned (to_string)
ao->set_member(index_number.to_string().c_str(),
undef_value);
}
}
Index: testsuite/actionscript.all/array.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/array.as,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- testsuite/actionscript.all/array.as 29 Jul 2007 12:57:01 -0000 1.22
+++ testsuite/actionscript.all/array.as 31 Jul 2007 02:39:05 -0000 1.23
@@ -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.22 2007/07/29 12:57:01 strk Exp $";
+rcsid="$Id: array.as,v 1.23 2007/07/31 02:39:05 strk Exp $";
#include "check.as"
@@ -120,7 +120,7 @@
check_equals ( a.toString() , "7,7,7,7,7,8,8,8,9,200,200,200,200,551,551" );
a.sort( Array.UNIQUESORT | Array.DESCENDING | Array.NUMERIC);
-xcheck_equals (a.toString() , "7,7,7,7,7,8,8,8,9,200,200,200,200,551,551" );
+check_equals (a.toString() , "7,7,7,7,7,8,8,8,9,200,200,200,200,551,551" );
// Test multi-parameter constructor, and keep testing sort cases
var trysortarray = new Array("But", "alphabet", "Different", "capitalization");