[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/swf_function.cpp server/...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/swf_function.cpp server/... |
Date: |
Sat, 01 Sep 2007 09:40:07 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/09/01 09:40:07
Modified files:
. : ChangeLog
server : swf_function.cpp
server/asobj : Object.cpp
testsuite/actionscript.all: Inheritance.as Object.as
toString_valueOf.as
Log message:
* server/swf_function.cpp (ctor): make sure user-defined
function's initial prototype inherits from Object.
* server/asobj/Object.cpp (getObjectInterface): really
end the inheritance chain (ie: don't override __proto__).
* testsuite/actionscript.all/Inheritance.as: a couple tests
added.
* testsuite/actionscript.all/Object.as: more successes, and
an additional (still failing due to non-proper __proto__
member)
test.
* testsuite/actionscript.all/toString_valueOf.as: one more
success.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4181&r2=1.4182
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf_function.cpp?cvsroot=gnash&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Object.cpp?cvsroot=gnash&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Object.as?cvsroot=gnash&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/toString_valueOf.as?cvsroot=gnash&r1=1.10&r2=1.11
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4181
retrieving revision 1.4182
diff -u -b -r1.4181 -r1.4182
--- ChangeLog 1 Sep 2007 01:59:32 -0000 1.4181
+++ ChangeLog 1 Sep 2007 09:40:04 -0000 1.4182
@@ -1,3 +1,16 @@
+2007-09-01 Sandro Santilli <address@hidden>
+
+ * server/swf_function.cpp (ctor): make sure user-defined
+ function's initial prototype inherits from Object.
+ * server/asobj/Object.cpp (getObjectInterface): really
+ end the inheritance chain (ie: don't override __proto__).
+ * testsuite/actionscript.all/Inheritance.as: a couple tests
+ added.
+ * testsuite/actionscript.all/Object.as: more successes, and
+ an additional (still failing due to non-proper __proto__ member)
+ test.
+ * testsuite/actionscript.all/toString_valueOf.as: one more success.
+
2007-09-01 Ivor Blockley <address@hidden>
* server/array.cpp: make to_number calls environment-aware.
Index: server/swf_function.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf_function.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- server/swf_function.cpp 1 Jul 2007 10:54:25 -0000 1.32
+++ server/swf_function.cpp 1 Sep 2007 09:40:05 -0000 1.33
@@ -29,6 +29,7 @@
#include "ActionExec.h" // for operator()
#include "VM.h" // for storing _global in a local register
#include "builtin_function.h" // for Function constructor
+#include "Object.h" // for getObjectInterface
#include <typeinfo>
#include <iostream>
@@ -50,7 +51,7 @@
as_environment* env,
size_t start, const ScopeStack& scopeStack)
:
- as_function(NULL),
+ as_function(new as_object(getObjectInterface())),
//ctor(0),
m_action_buffer(ab),
m_env(env),
Index: server/asobj/Object.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Object.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- server/asobj/Object.cpp 31 Aug 2007 21:53:32 -0000 1.27
+++ server/asobj/Object.cpp 1 Sep 2007 09:40:05 -0000 1.28
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: Object.cpp,v 1.27 2007/08/31 21:53:32 strk Exp $ */
+/* $Id: Object.cpp,v 1.28 2007/09/01 09:40:05 strk Exp $ */
#include "tu_config.h"
#include "Object.h"
@@ -81,7 +81,7 @@
{
o = new as_object(); // end of the inheritance chain
attachObjectInterface(*o);
- o->set_prototype(o.get());
+ //o->set_prototype(o.get()); // proto is self ?
}
return o.get();
}
Index: testsuite/actionscript.all/Inheritance.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- testsuite/actionscript.all/Inheritance.as 17 Aug 2007 03:21:47 -0000
1.35
+++ testsuite/actionscript.all/Inheritance.as 1 Sep 2007 09:40:06 -0000
1.36
@@ -21,7 +21,7 @@
// compile this test case with Ming makeswf, and then
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: Inheritance.as,v 1.35 2007/08/17 03:21:47 zoulunkai Exp $";
+rcsid="$Id: Inheritance.as,v 1.36 2007/09/01 09:40:06 strk Exp $";
#include "check.as"
@@ -125,8 +125,10 @@
{
if ( changeit ) this.__constructor__ = Object;
}
+check_equals(TypeChanger.__proto__, Function.prototype);
o1 = new TypeChanger(false);
+check_equals(o1.__proto__, TypeChanger.prototype);
#if OUTPUT_VERSION > 5
check_equals(o1.__constructor__, TypeChanger);
#else
Index: testsuite/actionscript.all/Object.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Object.as,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- testsuite/actionscript.all/Object.as 31 Aug 2007 19:05:48 -0000
1.31
+++ testsuite/actionscript.all/Object.as 1 Sep 2007 09:40:06 -0000
1.32
@@ -20,7 +20,7 @@
// compile this test case with Ming makeswf, and then
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: Object.as,v 1.31 2007/08/31 19:05:48 strk Exp $";
+rcsid="$Id: Object.as,v 1.32 2007/09/01 09:40:06 strk Exp $";
#include "check.as"
@@ -33,13 +33,17 @@
check_equals(typeof(Object.prototype.toString), 'function');
check_equals(typeof(Object.prototype.valueOf), 'function');
check_equals(typeof(Object.prototype.constructor), 'function');
+#if OUTPUT_VERSION > 5
+ check(Object.prototype.hasOwnProperty('toString'));
+ check(Object.prototype.hasOwnProperty('valueOf'));
+#endif
check_equals(Object.prototype.prototype, undefined);
// The bug below (no end in the inheritance chain) triggers endless
// recursions during run of the trace_properties() function defined
// in trace_properties.as from swfdec testsuite.
// WE WANT THIS FIXED !!
-xcheck_equals(Object.prototype.__proto__, undefined);
+check_equals(Object.prototype.__proto__, undefined);
#if OUTPUT_VERSION > 5
check(!Object.prototype.hasOwnProperty("__proto__"));
#endif
@@ -50,6 +54,8 @@
// Through test of existance of methods!
+xcheck(Object.hasOwnProperty('__proto__'));
+
O = Object;
check_equals(O, Object);
Index: testsuite/actionscript.all/toString_valueOf.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/toString_valueOf.as,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- testsuite/actionscript.all/toString_valueOf.as 27 Aug 2007 07:13:44
-0000 1.10
+++ testsuite/actionscript.all/toString_valueOf.as 1 Sep 2007 09:40:06
-0000 1.11
@@ -40,7 +40,7 @@
check(Function.prototype.__proto__.hasOwnProperty('toString'));
check(Function.prototype.__proto__.hasOwnProperty('valueOf'));
check_equals(Function.prototype.__proto__, Object.prototype);
- xcheck_equals(Object.prototype.__proto__, undefined);
+ check_equals(Object.prototype.__proto__, undefined);
check_equals(typeof(Function.prototype['toString']), 'function');
check_equals(typeof(Function.prototype['valueOf']), 'function');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/swf_function.cpp server/...,
Sandro Santilli <=