gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo...
Date: Sat, 16 Jun 2007 11:27:40 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/06/16 11:27:40

Modified files:
        .              : ChangeLog 
        server         : movie_root.cpp movie_root.h 
        server/vm      : ExecutableCode.h 

Log message:
                * server/vm/ExecutableCode.h: implement markReachableResources
                  for executable code.
                * server/movie_root.{cpp,h}: mark resources reachable by
                  the executable code in the global action queue.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3560&r2=1.3561
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.58&r2=1.59
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ExecutableCode.h?cvsroot=gnash&r1=1.5&r2=1.6

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3560
retrieving revision 1.3561
diff -u -b -r1.3560 -r1.3561
--- ChangeLog   16 Jun 2007 10:40:56 -0000      1.3560
+++ ChangeLog   16 Jun 2007 11:27:38 -0000      1.3561
@@ -1,5 +1,12 @@
 2007-06-16 Sandro Santilli <address@hidden>
 
+       * server/vm/ExecutableCode.h: implement markReachableResources
+         for executable code.
+       * server/movie_root.{cpp,h}: mark resources reachable by 
+         the executable code in the global action queue.
+
+2007-06-16 Sandro Santilli <address@hidden>
+
        * server/parser/morph2_character_def.{cpp,h}: do not explicitly
          delete the shape_character_defs, rather keep by intrusive_ptr
          (which means leave ownership to the GC in the GC case).

Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- server/movie_root.cpp       16 Jun 2007 09:07:35 -0000      1.67
+++ server/movie_root.cpp       16 Jun 2007 11:27:40 -0000      1.68
@@ -1033,6 +1033,13 @@
        {
                i->markReachableResources();
        }
+
+       // Mark resources reachable by queued action code
+       for (ActionQueue::const_iterator i=_actionQueue.begin(), 
e=_actionQueue.end();
+                       i != e; ++i)
+       {
+               (*i)->markReachableResources();
+       }
 }
 #endif // GNASH_USE_GC
 

Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- server/movie_root.h 16 Jun 2007 09:07:35 -0000      1.58
+++ server/movie_root.h 16 Jun 2007 11:27:40 -0000      1.59
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: movie_root.h,v 1.58 2007/06/16 09:07:35 strk Exp $ */
+/* $Id: movie_root.h,v 1.59 2007/06/16 11:27:40 strk Exp $ */
 
 /// \page events_handling Handling of user events
 ///
@@ -447,6 +447,7 @@
        ///     - All _level# movies (_movie)
        ///     - Mouse entities (m_mouse_button_state)
        ///     - Timer targets (_intervalTimers)
+       ///     - Resources reachable by ActionQueue code (_actionQueue)
        ///
        void markReachableResources() const;
 #endif // GNASH_USE_GC

Index: server/vm/ExecutableCode.h
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ExecutableCode.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- server/vm/ExecutableCode.h  28 May 2007 15:41:10 -0000      1.5
+++ server/vm/ExecutableCode.h  16 Jun 2007 11:27:40 -0000      1.6
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: ExecutableCode.h,v 1.5 2007/05/28 15:41:10 ann Exp $ */
+/* $Id: ExecutableCode.h,v 1.6 2007/06/16 11:27:40 strk Exp $ */
 
 #ifndef GNASH_EXECUTABLECODE_H
 #define GNASH_EXECUTABLECODE_H
@@ -46,6 +46,11 @@
        virtual ExecutableCode* clone() const=0;
 
        virtual ~ExecutableCode() {}
+
+#ifdef GNASH_USE_GC
+       /// Mark reachable resources (for the GC)
+       virtual void markReachableResources() const=0;
+#endif // GNASU_USE_GC
 };
 
 /// Global code (out of any function)
@@ -77,6 +82,18 @@
                }
        }
 
+#ifdef GNASH_USE_GC
+       /// Mark reachable resources (for the GC)
+       //
+       /// Reachable resources are:
+       ///      - the action target (target)
+       ///
+       virtual void markReachableResources() const
+       {
+               if ( target ) target->setReachable();
+       }
+#endif // GNASU_USE_GC
+
 private:
 
        const action_buffer& buffer;
@@ -136,6 +153,18 @@
                }
        }
 
+#ifdef GNASH_USE_GC
+       /// Mark reachable resources (for the GC)
+       //
+       /// Reachable resources are:
+       ///      - the action target (_target)
+       ///
+       virtual void markReachableResources() const
+       {
+               if ( _target ) _target->setReachable();
+       }
+#endif // GNASU_USE_GC
+
 private:
 
        boost::intrusive_ptr<character> _target;
@@ -166,6 +195,20 @@
                func->call(fn_call(target.get(), &env, 0, 0));
        }
 
+#ifdef GNASH_USE_GC
+       /// Mark reachable resources (for the GC)
+       //
+       /// Reachable resources are:
+       ///      - the function body (func)
+       ///      - the action target (target)
+       ///
+       virtual void markReachableResources() const
+       {
+               if ( func ) func->setReachable();
+               if ( func ) func->setReachable();
+       }
+#endif // GNASU_USE_GC
+
 private:
 
        boost::intrusive_ptr<as_function> func;




reply via email to

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