gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog extensions/gtk2/gtkext.cpp serv...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog extensions/gtk2/gtkext.cpp serv...
Date: Mon, 17 Dec 2007 22:24:59 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/12/17 22:24:59

Modified files:
        .              : ChangeLog 
        extensions/gtk2: gtkext.cpp 
        server         : as_environment.h as_function.cpp 
        server/asobj   : NetStream.cpp 
        server/vm      : ASHandlers.cpp 

Log message:
        drop as_environment's push_val, make push non-templated
        and taking an as_value. I belive this drops a copy-construction
        of as_value for every push use ...

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5196&r2=1.5197
http://cvs.savannah.gnu.org/viewcvs/gnash/extensions/gtk2/gtkext.cpp?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_environment.h?cvsroot=gnash&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_function.cpp?cvsroot=gnash&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.cpp?cvsroot=gnash&r1=1.77&r2=1.78
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.172&r2=1.173

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5196
retrieving revision 1.5197
diff -u -b -r1.5196 -r1.5197
--- ChangeLog   17 Dec 2007 16:06:44 -0000      1.5196
+++ ChangeLog   17 Dec 2007 22:24:58 -0000      1.5197
@@ -1,3 +1,12 @@
+2007-12-17 Sandro Santilli <address@hidden>
+
+       * server/as_environment.h: drop push_val, make push non-templated
+         and taking an as_value. I belive this drops a copy-construction
+         of as_value for every push use ...
+       * extensions/gtk2/gtkext.cpp, server/as_function.cpp,
+         server/asobj/NetStream.cpp, server/vm/ASHandlers.cpp: replace
+         the few push_val calls with push.
+
 2007-12-17 Benjamin Wolsey <address@hidden>
 
        * plugin/plugin.cpp: change NPAPI error messages so as not to

Index: extensions/gtk2/gtkext.cpp
===================================================================
RCS file: /sources/gnash/gnash/extensions/gtk2/gtkext.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- extensions/gtk2/gtkext.cpp  26 Oct 2007 21:35:02 -0000      1.7
+++ extensions/gtk2/gtkext.cpp  17 Dec 2007 22:24:59 -0000      1.8
@@ -106,9 +106,9 @@
     
     as_value   val;
     as_environment env;
-    env.push_val(handler.to_object());
+    env.push(handler);
     env.push(event);
-    env.push(handler.to_string());
+    env.push(handler);
     as_object obj = val.to_object();
 
     // Call the AS function defined in the source file using this extension

Index: server/as_environment.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_environment.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- server/as_environment.h     12 Dec 2007 10:07:00 -0000      1.67
+++ server/as_environment.h     17 Dec 2007 22:24:59 -0000      1.68
@@ -67,11 +67,11 @@
 
        /// @{ Stack access/manipulation
 
-       // @@ TODO do more checking on these
-       template<class T>
-       // stack access/manipulation
-       void    push(T val) { push_val(as_value(val)); }
-       void    push_val(const as_value& val) { m_stack.push_back(val); }
+       /// Push a value on the stack
+       void    push(const as_value& val)
+       {
+               m_stack.push_back(val);
+       }
 
 
        /// Pops an as_value off the stack top and return it.

Index: server/as_function.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_function.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- server/as_function.cpp      11 Dec 2007 19:23:50 -0000      1.46
+++ server/as_function.cpp      17 Dec 2007 22:24:59 -0000      1.47
@@ -267,11 +267,9 @@
                        unsigned int nelems = arg_array->size();
 
                        //log_error(_("Function.apply(this_ref, array[%d])\n"), 
nelems);
-                       as_value index, value;
                        for (unsigned int i=nelems; i; i--)
                        {
-                               value=arg_array->at(i-1);
-                               fn.env().push_val(value);
+                               fn.env().push(arg_array->at(i-1));
                                pushed++;
                        }
 

Index: server/asobj/NetStream.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStream.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -b -r1.77 -r1.78
--- server/asobj/NetStream.cpp  4 Dec 2007 11:45:31 -0000       1.77
+++ server/asobj/NetStream.cpp  17 Dec 2007 22:24:59 -0000      1.78
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: NetStream.cpp,v 1.77 2007/12/04 11:45:31 strk Exp $ */
+/* $Id: NetStream.cpp,v 1.78 2007/12/17 22:24:59 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -481,7 +481,7 @@
                // TODO: optimize by reusing the same as_object ?
                boost::intrusive_ptr<as_object> o = getStatusObject(code);
 
-               m_env->push_val(as_value(o.get()));
+               m_env->push(as_value(o.get()));
                call_method(status, m_env, this, 1, m_env->get_top_index() );
 
        }

Index: server/vm/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -b -r1.172 -r1.173
--- server/vm/ASHandlers.cpp    16 Dec 2007 10:10:52 -0000      1.172
+++ server/vm/ASHandlers.cpp    17 Dec 2007 22:24:59 -0000      1.173
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: ASHandlers.cpp,v 1.172 2007/12/16 10:10:52 strk Exp $ */
+/* $Id: ASHandlers.cpp,v 1.173 2007/12/17 22:24:59 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -3764,7 +3764,7 @@
        // Otherwise push the function literal on the stack
        else
        {
-               env.push_val(function_value);
+               env.push(function_value);
        }
 #ifdef USE_DEBUGGER
        // WARNING: function_value.to_object() can return a newly allocated
@@ -3989,7 +3989,7 @@
        // Otherwise push the function literal on the stack
        else
        {
-               env.push_val(function_value);
+               env.push(function_value);
        }
 
        //cerr << "After ActionDefineFunction:"<<endl;




reply via email to

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