[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: |
Sat, 15 Mar 2008 09:03:53 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/03/15 09:03:52
Modified files:
. : ChangeLog
server/vm : ASHandlers.cpp
testsuite/actionscript.all: Inheritance.as
Log message:
* server/vm/ASHadlers.cpp (ActionCallMethod): for SWF7+ compute
super from the actual object containing the called function
(also when finding out from super).
* testsuite/actionscript.all/Inheritance.as: successes.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5925&r2=1.5926
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.211&r2=1.212
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?cvsroot=gnash&r1=1.52&r2=1.53
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5925
retrieving revision 1.5926
diff -u -b -r1.5925 -r1.5926
--- ChangeLog 15 Mar 2008 08:29:20 -0000 1.5925
+++ ChangeLog 15 Mar 2008 09:03:51 -0000 1.5926
@@ -1,5 +1,12 @@
2008-03-15 Sandro Santilli <address@hidden>
+ * server/vm/ASHadlers.cpp (ActionCallMethod): for SWF7+ compute
+ super from the actual object containing the called function
+ (also when finding out from super).
+ * testsuite/actionscript.all/Inheritance.as: successes.
+
+2008-03-15 Sandro Santilli <address@hidden>
+
* testsuite/actionscript.all/Inheritance.as: more tests for
gaps in inheritance chain (SWF7+ fails in gnash).
* server/stream.cpp: use the float conversion function found
Index: server/vm/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -b -r1.211 -r1.212
--- server/vm/ASHandlers.cpp 14 Mar 2008 18:03:45 -0000 1.211
+++ server/vm/ASHandlers.cpp 15 Mar 2008 09:03:52 -0000 1.212
@@ -3447,7 +3447,27 @@
if ( obj->isSuper() )
{
if ( thread.isFunction() ) this_ptr =
thread.getThisPointer();
- super = obj->get_super();
+
+ as_object* proto = obj->get_prototype().get();
+ as_object* owner = proto;
+ if ( hasMethodName )
+ {
+ VM& vm = VM::get();
+ if ( vm.getSWFVersion() > 6 )
+ {
+ string_table::key k =
vm.getStringTable().find(method_string);
+ Property* p = obj->findProperty(k, 0,
&owner);
+ if ( p )
+ {
+ assert(owner);
+ if ( owner != obj.get() ) // I
think it would be impossible for owner to be == obj (since obj is super.)
+ {
+ proto = owner;
+ }
+ }
+ }
+ }
+ super = proto->get_super();
}
else
{
Index: testsuite/actionscript.all/Inheritance.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Inheritance.as,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- testsuite/actionscript.all/Inheritance.as 15 Mar 2008 08:29:21 -0000
1.52
+++ testsuite/actionscript.all/Inheritance.as 15 Mar 2008 09:03:52 -0000
1.53
@@ -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.52 2008/03/15 08:29:21 strk Exp $";
+rcsid="$Id: Inheritance.as,v 1.53 2008/03/15 09:03:52 strk Exp $";
#include "check.as"
check_equals(typeof(Object.prototype.constructor), 'function');
@@ -286,10 +286,10 @@
check_equals(ActorCalls, 2);
#endif
#if OUTPUT_VERSION > 6
- xcheck_equals(co.myName(), "FAC"); // super in C references A proto and B
ctor
- xcheck_equals(FctorCalls, 2);
- xcheck_equals(BctorCalls, 2);
- xcheck_equals(ActorCalls, 0); // B.prototype calling super() calls F
prototype, not A's
+ check_equals(co.myName(), "FAC"); // super in C references A proto and B ctor
+ check_equals(FctorCalls, 2);
+ check_equals(BctorCalls, 2);
+ check_equals(ActorCalls, 0); // B.prototype calling super() calls F
prototype, not A's
#endif
//------------------------------------------------