gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/PropertyList.cpp server/...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/PropertyList.cpp server/...
Date: Mon, 05 May 2008 10:02:30 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/05/05 10:02:30

Modified files:
        .              : ChangeLog 
        server         : PropertyList.cpp PropertyList.h as_object.cpp 
                         as_object.h 
        server/asobj   : ClassHierarchy.cpp 

Log message:
                * server/PropertyList.{cpp,h}: rename addDestructiveGetterSetter
                  to addDestructiveGetter, as we're not using the setter anyway,
                  add a flagIfMissing to avoid a duplicated scan.
                * server/as_object.{cpp,h}: drop the 'setter' parameter to
                  init_destructive_property.
                * server/asobj/ClassHierarchy.cpp: don't create a useless
                  setter for all declarative properties.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6498&r2=1.6499
http://cvs.savannah.gnu.org/viewcvs/gnash/server/PropertyList.cpp?cvsroot=gnash&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/gnash/server/PropertyList.h?cvsroot=gnash&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.118&r2=1.119
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.h?cvsroot=gnash&r1=1.107&r2=1.108
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ClassHierarchy.cpp?cvsroot=gnash&r1=1.13&r2=1.14

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6498
retrieving revision 1.6499
diff -u -b -r1.6498 -r1.6499
--- ChangeLog   5 May 2008 08:57:26 -0000       1.6498
+++ ChangeLog   5 May 2008 10:02:29 -0000       1.6499
@@ -1,5 +1,15 @@
 2008-05-05 Sandro Santilli <address@hidden>
 
+       * server/PropertyList.{cpp,h}: rename addDestructiveGetterSetter
+         to addDestructiveGetter, as we're not using the setter anyway,
+         add a flagIfMissing to avoid a duplicated scan.
+       * server/as_object.{cpp,h}: drop the 'setter' parameter to
+         init_destructive_property.
+       * server/asobj/ClassHierarchy.cpp: don't create a useless
+         setter for all declarative properties.
+
+2008-05-05 Sandro Santilli <address@hidden>
+
        * server/asobj/: create a new subtree for the 'flash'
          ActionScript package. Stub all known classes there, moving
          also there the existing BitmapFilter classes which belongs

Index: server/PropertyList.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/PropertyList.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- server/PropertyList.cpp     7 Apr 2008 17:39:52 -0000       1.33
+++ server/PropertyList.cpp     5 May 2008 10:02:29 -0000       1.34
@@ -394,14 +394,16 @@
 }
 
 bool
-PropertyList::addDestructiveGetterSetter(string_table::key key,
-       as_function& getter, as_function& setter, string_table::key nsId)
+PropertyList::addDestructiveGetter(string_table::key key,
+       as_function& getter, string_table::key nsId,
+       const as_prop_flags& flagsIfMissing)
 {
        container::iterator found = iterator_find(_props, key, nsId);
        if (found != _props.end())
                return false; // Already exists.
 
-       Property a(key, nsId, &getter, &setter, 1);
+       // destructive getter don't need a setter
+       Property a(key, nsId, &getter, (as_function*)0, flagsIfMissing, true);
        a.setOrder(- ++mDefaultOrder - 1);
        _props.insert(a);
        return true;

Index: server/PropertyList.h
===================================================================
RCS file: /sources/gnash/gnash/server/PropertyList.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- server/PropertyList.h       7 Apr 2008 17:39:52 -0000       1.29
+++ server/PropertyList.h       5 May 2008 10:02:30 -0000       1.30
@@ -319,14 +319,15 @@
        /// @param getter
        /// A function to invoke when this property value is requested.
        ///
-       /// @param setter
-       /// A function to invoke when setting this property's value.
+       /// @param flagsIfMissing
+       ///     Flags to associate to the property if a new one is created.
        ///
        /// @return true if the property was successfully added, false
        /// otherwise.
        ///
-       bool addDestructiveGetterSetter(string_table::key key,
-               as_function& getter, as_function& setter, string_table::key ns 
= 0);
+       bool addDestructiveGetter(string_table::key key,
+               as_function& getter, string_table::key ns = 0,
+               const as_prop_flags& flagsIfMissing=0);
 
        /// Set the flags of a property.
        //

Index: server/as_object.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_object.cpp,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -b -r1.118 -r1.119
--- server/as_object.cpp        27 Apr 2008 18:13:14 -0000      1.118
+++ server/as_object.cpp        5 May 2008 10:02:30 -0000       1.119
@@ -802,13 +802,12 @@
 
 bool
 as_object::init_destructive_property(string_table::key key, as_function& 
getter,
-       as_function& setter, int flags, string_table::key nsname)
+       int flags, string_table::key nsname)
 {
        bool success;
 
        // No case check, since we've already got the key.
-       success = _members.addDestructiveGetterSetter(key, getter, setter, 
nsname);
-       _members.setFlags(key, flags, nsname);
+       success = _members.addDestructiveGetter(key, getter, nsname, flags);
        return success;
 }
 

Index: server/as_object.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_object.h,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -b -r1.107 -r1.108
--- server/as_object.h  27 Apr 2008 18:13:14 -0000      1.107
+++ server/as_object.h  5 May 2008 10:02:30 -0000       1.108
@@ -505,10 +505,6 @@
        ///     A function to invoke when this property value is requested.
        ///     add_ref will be called on the function.
        ///
-       /// @param setter
-       ///     A function to invoke when setting this property's value.
-       ///     add_ref will be called on the function.
-       ///
        /// @param flags
        ///     Flags for the new member. By default dontDelete and dontEnum.
        ///     See as_prop_flags::Flags.
@@ -518,7 +514,7 @@
        /// and will be matched by anything not asking for a specific namespace.
        ///
        bool init_destructive_property(string_table::key key, as_function& 
getter,
-               as_function& setter, int flags=as_prop_flags::dontEnum,
+               int flags=as_prop_flags::dontEnum,
                string_table::key nsname = 0);
 
        /// \brief

Index: server/asobj/ClassHierarchy.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/ClassHierarchy.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- server/asobj/ClassHierarchy.cpp     9 Apr 2008 20:34:52 -0000       1.13
+++ server/asobj/ClassHierarchy.cpp     5 May 2008 10:02:30 -0000       1.14
@@ -158,7 +158,6 @@
        virtual as_value operator()(const fn_call& /*fn*/)
        {
                string_table& st = VM::get().getStringTable();
-
                log_debug("Loading native class %s", 
st.value(mDeclaration.name));
 
                mDeclaration.initializer(*mTarget);
@@ -230,11 +229,8 @@
 
        boost::intrusive_ptr<as_function> getter =
                new declare_extension_function(c, mGlobal, mExtension);
-       boost::intrusive_ptr<as_function> setter =
-               new builtin_function(do_nothing);
 
-       return mGlobal->init_destructive_property(c.name,
-               *getter, *setter);
+       return mGlobal->init_destructive_property(c.name, *getter);
 }
 
 bool
@@ -251,11 +247,9 @@
 
        boost::intrusive_ptr<as_function> getter =
                new declare_native_function(c, mGlobal, mExtension);
-       boost::intrusive_ptr<as_function> setter =
-               new builtin_function(do_nothing);
 
        return mGlobal->init_destructive_property(c.name,
-               *getter, *setter);
+               *getter);
 }
 
 static ClassHierarchy::nativeClass knownClasses[] =




reply via email to

[Prev in Thread] Current Thread [Next in Thread]