[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-commit] gnash ChangeLog server/as_function.cpp
From: |
zou lunkai |
Subject: |
Re: [Gnash-commit] gnash ChangeLog server/as_function.cpp |
Date: |
Tue, 1 Apr 2008 11:00:42 +0800 |
> constructor and __constructor__ still exist in swf5, just not-visible.
what is the definition of 'visible' in your conext?
visible == enumerable?
visible == accsessible(at least readable) from AS?
--zou
On 3/31/08, Sandro Santilli <address@hidden> wrote:
> CVSROOT: /sources/gnash
> Module name: gnash
> Changes by: Sandro Santilli <strk> 08/03/31 13:59:13
>
> Modified files:
> . : ChangeLog
> server : as_function.cpp
>
> Log message:
> constructor and __constructor__ still exist in swf5, just not-visible.
> Reduce string_table lookups.
>
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6117&r2=1.6118
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_function.cpp?cvsroot=gnash&r1=1.56&r2=1.57
>
> Patches:
> Index: ChangeLog
> ===================================================================
> RCS file: /sources/gnash/gnash/ChangeLog,v
> retrieving revision 1.6117
> retrieving revision 1.6118
> diff -u -b -r1.6117 -r1.6118
> --- ChangeLog 31 Mar 2008 13:34:26 -0000 1.6117
> +++ ChangeLog 31 Mar 2008 13:59:12 -0000 1.6118
> @@ -1,3 +1,8 @@
> +2008-03-31 Sandro Santilli <address@hidden>
> +
> + * server/as_function.cpp: constructor and __constructor__ still exist
> + in swf5, just not-visible. Reduce string_table lookups.
> +
> 2008-03-31 Benjamin Wolsey <address@hidden>
>
> * testsuite/actionscript.all/Date.as: lots of failing tests, some
>
> Index: server/as_function.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/as_function.cpp,v
> retrieving revision 1.56
> retrieving revision 1.57
> diff -u -b -r1.56 -r1.57
> --- server/as_function.cpp 31 Mar 2008 11:56:43 -0000 1.56
> +++ server/as_function.cpp 31 Mar 2008 13:59:13 -0000 1.57
> @@ -125,8 +125,8 @@
>
> if ( iface )
> {
> - iface->init_member("constructor", this);
> - init_member("prototype", as_value(iface));
> + iface->init_member(NSV::PROP_CONSTRUCTOR, this);
> + init_member(NSV::PROP_PROTOTYPE, as_value(iface));
> }
> }
>
> @@ -134,19 +134,21 @@
> as_function::setPrototype(as_object* proto)
> {
> //_properties = proto;
> - init_member("prototype", as_value(proto));
> + init_member(NSV::PROP_PROTOTYPE, as_value(proto));
> }
>
> void
> as_function::extends(as_function& superclass)
> {
> as_object* newproto = new as_object(superclass.getPrototype().get());
> - newproto->init_member("__proto__", superclass.getPrototype().get());
> + newproto->init_member(NSV::PROP_uuPROTOuu,
> superclass.getPrototype().get());
> +
> if ( VM::get().getSWFVersion() > 5 )
> {
> - newproto->init_member("__constructor__", &superclass);
> + newproto->init_member(NSV::PROP_uuCONSTRUCTORuu, &superclass);
> }
> - init_member("prototype", as_value(newproto));
> +
> + init_member(NSV::PROP_PROTOTYPE, as_value(newproto));
> }
>
> boost::intrusive_ptr<as_object>
> @@ -391,14 +393,12 @@
> // Add a __constructor__ member to the new object, but only
> for SWF6 up
> // (to be checked). NOTE that we assume the builtin
> constructors
> // won't set __constructor__ to some other value...
> - if ( swfversion > 5 )
> - {
> - newobj->init_member("__constructor__",
> as_value(this), as_prop_flags::dontEnum); // can delete
> + int flags =
> as_prop_flags::dontEnum|as_prop_flags::onlySWF6Up; // can delete, hidden in
> swf5
> + newobj->init_member(NSV::PROP_uuCONSTRUCTORuu,
> as_value(this), flags);
>
> - if ( swfversion == 6 )
> + if ( swfversion < 7 )
> {
> - newobj->init_member("constructor",
> as_value(this), as_prop_flags::dontEnum); // can delete
> - }
> + newobj->init_member(NSV::PROP_CONSTRUCTOR,
> as_value(this), flags);
> }
>
> }
> @@ -426,14 +426,12 @@
>
> // Add a __constructor__ member to the new object, but only
> for SWF6 up
> // (to be checked)
> - if ( swfversion > 5 )
> - {
> - newobj->init_member("__constructor__",
> as_value(this), as_prop_flags::dontEnum); // can delete
> + int flags =
> as_prop_flags::dontEnum|as_prop_flags::onlySWF6Up; // can delete, hidden in
> swf5
> + newobj->init_member(NSV::PROP_uuCONSTRUCTORuu,
> as_value(this), flags);
>
> - if ( swfversion == 6 )
> + if ( swfversion < 7 )
> {
> - newobj->init_member("constructor",
> as_value(this), as_prop_flags::dontEnum); // can delete
> - }
> + newobj->init_member(NSV::PROP_CONSTRUCTOR,
> as_value(this), flags);
> }
>
> // Super is constructed from this function's prototype
>
>
> _______________________________________________
> Gnash-commit mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnash-commit
>