[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/as_function.cpp server/s...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/as_function.cpp server/s... |
Date: |
Wed, 21 Mar 2007 14:37:20 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/03/21 14:37:20
Modified files:
. : ChangeLog
server : as_function.cpp swf_function.cpp
testsuite/actionscript.all: Function.as Inheritance.as
Log message:
* server/as_function.cpp (extends): when VM version is > 5
set 'prototype.__constructor__' in addition to
'prototype.constructor'
* server/swf_function.cpp (getSuper): user
__proto__.__constructor
rather then __proto__.constructor.
* testsuite/actionscript.all/: Function.as, Inheritance: more
successes.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2661&r2=1.2662
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_function.cpp?cvsroot=gnash&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf_function.cpp?cvsroot=gnash&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Function.as?cvsroot=gnash&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.29&r2=1.30
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2661
retrieving revision 1.2662
diff -u -b -r1.2661 -r1.2662
--- ChangeLog 21 Mar 2007 11:54:02 -0000 1.2661
+++ ChangeLog 21 Mar 2007 14:37:20 -0000 1.2662
@@ -1,5 +1,15 @@
2007-03-21 Sandro Santilli <address@hidden>
+ * server/as_function.cpp (extends): when VM version is > 5
+ set 'prototype.__constructor__' in addition to
+ 'prototype.constructor'
+ * server/swf_function.cpp (getSuper): user __proto__.__constructor
+ rather then __proto__.constructor.
+ * testsuite/actionscript.all/: Function.as, Inheritance: more
+ successes.
+
+2007-03-21 Sandro Santilli <address@hidden>
+
* testsuite/swfdec/PASSING: new successes: onload-childparent.swf,
registerclass-previous.swf.
* server/vm/ASHandlers.cpp (ActionCallFunction):
Index: server/as_function.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_function.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- server/as_function.cpp 20 Mar 2007 17:14:27 -0000 1.25
+++ server/as_function.cpp 21 Mar 2007 14:37:20 -0000 1.26
@@ -128,6 +128,10 @@
{
_properties = new as_object(superclass.getPrototype());
_properties->init_member("constructor", &superclass);
+ if ( VM::get().getSWFVersion() > 5 )
+ {
+ _properties->init_member("__constructor__", &superclass);
+ }
init_member("prototype", as_value(_properties.get()));
}
Index: server/swf_function.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf_function.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- server/swf_function.cpp 20 Mar 2007 17:14:27 -0000 1.26
+++ server/swf_function.cpp 21 Mar 2007 14:37:20 -0000 1.27
@@ -78,7 +78,8 @@
boost::intrusive_ptr<as_object>
swf_function::getSuper(as_object& obj)
{
- // Super class prototype is : obj.__proto__.constructor.prototype
+//#define GNASH_DEBUG_GETSUPER
+ // Super class prototype is : obj.__proto__.__constructor__.prototype
boost::intrusive_ptr<as_object> proto = obj.get_prototype();
if ( ! proto )
{
@@ -92,11 +93,11 @@
// returning an as_function ?
//
as_value ctor;
- bool ret = proto->get_member("constructor", &ctor);
+ bool ret = proto->get_member("__constructor__", &ctor);
if ( ! ret )
{
#ifdef GNASH_DEBUG_GETSUPER
- log_msg("Object.__proto__ %p doesn't have a constructor",
proto);
+ log_msg("Object.__proto__ %p doesn't have a __constructor__",
(void*)proto.get());
#endif
return NULL;
}
@@ -109,13 +110,13 @@
if ( ! ctor_obj )
{
#ifdef GNASH_DEBUG_GETSUPER
- log_msg("Object.__proto__.constructor doesn't cast to an
object");
+ log_msg("Object.__proto__.__constructor__ doesn't cast to an
object");
#endif
return NULL;
}
#ifdef GNASH_DEBUG_GETSUPER
- log_msg("ctor_obj is %p", ctor_obj);
+ log_msg("ctor_obj is %p", ctor_obj.get());
#endif
as_value ctor_proto;
@@ -123,7 +124,7 @@
if ( ! ret )
{
#ifdef GNASH_DEBUG_GETSUPER
- log_msg("Object.__proto__.constructor %p doesn't have a
prototype", ctor_obj);
+ log_msg("Object.__proto__.constructor %p doesn't have a
prototype", ctor_obj.get());
#endif
return NULL;
}
Index: testsuite/actionscript.all/Function.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Function.as,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- testsuite/actionscript.all/Function.as 21 Mar 2007 09:51:20 -0000
1.38
+++ testsuite/actionscript.all/Function.as 21 Mar 2007 14:37:20 -0000
1.39
@@ -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: Function.as,v 1.38 2007/03/21 09:51:20 strk Exp $";
+rcsid="$Id: Function.as,v 1.39 2007/03/21 14:37:20 strk Exp $";
#include "check.as"
@@ -575,8 +575,8 @@
myMail = new Email('greetings', "you", "hello");
check_equals(myMail.subject, 'greetings');
#if OUTPUT_VERSION > 5
-xcheck_equals(myMail.to, 'everyone');
-xcheck_equals(myMail.message, 'enlarge yourself');
+check_equals(myMail.to, 'everyone');
+check_equals(myMail.message, 'enlarge yourself');
#else
check_equals(myMail.to, undefined);
check_equals(myMail.message, undefined);
Index: testsuite/actionscript.all/Inheritance.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- testsuite/actionscript.all/Inheritance.as 20 Mar 2007 17:22:16 -0000
1.29
+++ testsuite/actionscript.all/Inheritance.as 21 Mar 2007 14:37:20 -0000
1.30
@@ -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: Inheritance.as,v 1.29 2007/03/20 17:22:16 strk Exp $";
+rcsid="$Id: Inheritance.as,v 1.30 2007/03/21 14:37:20 strk Exp $";
#include "check.as"
@@ -252,9 +252,9 @@
// One effect of 'extends' is setting up a __constructor__ member in the
prototype
#if OUTPUT_VERSION > 5
-xcheck_equals(typeof(DerivedClass1.prototype.__constructor__), 'function');
-xcheck(DerivedClass1.prototype.hasOwnProperty('__constructor__'));
-xcheck_equals(DerivedClass1.prototype.__constructor__, BaseClass1);
+check_equals(typeof(DerivedClass1.prototype.__constructor__), 'function');
+check(DerivedClass1.prototype.hasOwnProperty('__constructor__'));
+check_equals(DerivedClass1.prototype.__constructor__, BaseClass1);
check(DerivedClass1.prototype.__constructor__ != DerivedClass1);
#else // SWF5 or below don't set __constructor__, it seems
check_equals(typeof(DerivedClass1.prototype.__constructor__), 'undefined');
@@ -275,7 +275,7 @@
check_equals(typeof(obj.__constructor__), 'function');
check(obj.hasOwnProperty('__constructor__'));
check_equals(obj.__constructor__, DerivedClass1);
-xcheck_equals(obj.__proto__.__constructor__, BaseClass1);
+check_equals(obj.__proto__.__constructor__, BaseClass1);
#endif
// constructor of 'super' is not automatically called
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/as_function.cpp server/s...,
Sandro Santilli <=