gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2079-g6ac302b
Date: Thu, 29 May 2014 00:14:11 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  6ac302be005f61667a5259eb58eeda7f1a2a1027 (commit)
       via  c672a3c77594dd06627d986838790f41c885cabf (commit)
       via  703d9b7663908d45d033947de608d1eef9914e71 (commit)
      from  a7ee297b3d55b268e6cd4434d93943ad6d1cdde0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=6ac302be005f61667a5259eb58eeda7f1a2a1027


commit 6ac302be005f61667a5259eb58eeda7f1a2a1027
Author: Bastiaan Jacques <address@hidden>
Date:   Thu May 29 01:58:05 2014 +0200

    Make some constructors constexpr.

diff --git a/libbase/Point2d.h b/libbase/Point2d.h
index 0b561fe..4cb502e 100644
--- a/libbase/Point2d.h
+++ b/libbase/Point2d.h
@@ -46,7 +46,7 @@ public:
        std::int32_t  y;  // TWIPS
 
        /// Construct a Point2d with default x and y coordinates
-       Point2d()
+       constexpr Point2d()
                :
                x(0), y(0)
        {
diff --git a/libcore/RGBA.h b/libcore/RGBA.h
index 216adf4..abe5c37 100644
--- a/libcore/RGBA.h
+++ b/libcore/RGBA.h
@@ -39,7 +39,7 @@ public:
     /// Construct default RGBA value.
     //
     /// Default value is 0xffffffff (solid white).
-    rgba()
+    constexpr rgba()
         :
         m_r(255),
         m_g(255),
diff --git a/libcore/SWFMatrix.h b/libcore/SWFMatrix.h
index b8251a9..d567fa5 100644
--- a/libcore/SWFMatrix.h
+++ b/libcore/SWFMatrix.h
@@ -55,7 +55,7 @@ class DSOEXPORT SWFMatrix
 public:
 
     /// Construct an identity SWFMatrix
-    SWFMatrix()
+    constexpr SWFMatrix()
         :
         _a(65536),
         _b(0),
diff --git a/libcore/SWFRect.h b/libcore/SWFRect.h
index d5cdfe7..11f552b 100644
--- a/libcore/SWFRect.h
+++ b/libcore/SWFRect.h
@@ -46,14 +46,14 @@ class SWFRect
 
 public:
 
-    static const std::int32_t rectNull = 0x80000000;
-    static const std::int32_t rectMax = 0x7fffffff;
+    constexpr static std::int32_t rectNull = 0x80000000;
+    constexpr static std::int32_t rectMax = 0x7fffffff;
     
     /// Ouput operator
     friend std::ostream& operator<< (std::ostream& os, const SWFRect& SWFRect);
 
     /// Construct a NULL rectangle
-    SWFRect()
+    constexpr SWFRect()
         :
        _xMin(rectNull),
        _yMin(rectNull),
@@ -62,7 +62,7 @@ public:
     {}
 
     /// Construct a rectangle with given coordinates
-    SWFRect(int xmin, int ymin, int xmax, int ymax)
+    constexpr SWFRect(int xmin, int ymin, int xmax, int ymax)
         :
         _xMin(xmin),
         _yMin(ymin),

http://git.savannah.gnu.org/cgit//commit/?id=c672a3c77594dd06627d986838790f41c885cabf


commit c672a3c77594dd06627d986838790f41c885cabf
Author: Bastiaan Jacques <address@hidden>
Date:   Thu May 29 01:09:39 2014 +0200

    Implement callMethod with variadic templates.

diff --git a/libcore/asobj/Global_as.h b/libcore/asobj/Global_as.h
index 5fe9263..a8a581c 100644
--- a/libcore/asobj/Global_as.h
+++ b/libcore/asobj/Global_as.h
@@ -21,12 +21,6 @@
 #define GNASH_GLOBAL_H
 
 #include <string>
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
-#include <boost/preprocessor/seq/for_each.hpp>
-#include <boost/preprocessor/facilities/empty.hpp>
 #include <memory>
 
 #include "as_object.h" 
@@ -201,13 +195,9 @@ invoke(const as_value& method, const as_environment& env, 
as_object* this_ptr,
        return val;
 }
 
-/// Helper macros for callMethod arguments.
-#define FUNC_PARAM(z, n, t) BOOST_PP_COMMA_IF(n) t arg##n
-#define VALUE_ARG(z, n, t) BOOST_PP_COMMA_IF(n) arg##n
-
 /// Call a member function of this object in an AS-compatible way
 //
-/// This is a macro to cope with a varying number of arguments. The function
+/// This is a variadic function to cope with a varying number of arguments. Its
 /// signature is as follows:
 //
 /// as_value callMethod(as_object* obj, const ObjectURI& uri,
@@ -224,26 +214,33 @@ invoke(const as_value& method, const as_environment& env, 
as_object* this_ptr,
 /// @param arg0..argN   The arguments to pass
 ///
 /// @return             The return value of the call (possibly undefined).
-#define CALL_METHOD(x, n, t) \
-inline as_value \
-callMethod(as_object* obj, const ObjectURI& uri BOOST_PP_COMMA_IF(n)\
-        BOOST_PP_REPEAT(n, FUNC_PARAM, const as_value&)) {\
-    if (!obj) return as_value();\
-    as_value func;\
-    if (!obj->get_member(uri, &func)) return as_value();\
-    fn_call::Args args;\
-    BOOST_PP_EXPR_IF(n, (args += BOOST_PP_REPEAT(n, VALUE_ARG, 
BOOST_PP_EMPTY));)\
-    return invoke(func, as_environment(getVM(*obj)), obj, args);\
+
+inline as_value
+callMethod(fn_call::Args& args, as_object* obj, const ObjectURI& uri)
+{
+    if (!obj) return as_value();
+    as_value func;
+    if (!obj->get_member(uri, &func)) return as_value();
+
+    return invoke(func, as_environment(getVM(*obj)), obj, args);
+}
+
+template <typename Param, typename... Params>
+inline as_value
+callMethod(fn_call::Args& args, as_object* obj, const ObjectURI& uri, Param 
param, Params... params)
+{
+    args += param;
+    return callMethod(args, obj, uri, params...);
 }
 
-/// The maximum number of as_value arguments allowed in callMethod functions.
-#define MAX_ARGS 4
-BOOST_PP_REPEAT(BOOST_PP_INC(MAX_ARGS), CALL_METHOD, BOOST_PP_EMPTY)
 
-#undef VALUE_ARG
-#undef FUNC_PARAM
-#undef MAX_ARGS
-#undef CALL_METHOD
+template <typename... Params>
+inline as_value
+callMethod(as_object* obj, const ObjectURI& uri, Params... params)
+{
+    fn_call::Args args;
+    return callMethod(args, obj, uri, params...);
+}
 
 /// Convenience function for finding a class constructor.
 //

http://git.savannah.gnu.org/cgit//commit/?id=703d9b7663908d45d033947de608d1eef9914e71


commit 703d9b7663908d45d033947de608d1eef9914e71
Author: Bastiaan Jacques <address@hidden>
Date:   Wed May 28 22:04:27 2014 +0200

    Some more forward declarations.

diff --git a/libcore/CharacterProxy.h b/libcore/CharacterProxy.h
index 2d16519..e4264da 100644
--- a/libcore/CharacterProxy.h
+++ b/libcore/CharacterProxy.h
@@ -21,7 +21,6 @@
 #define GNASH_CHARACTER_PROXY_H
 
 #include <string>
-#include <cassert>
 #include "dsodefs.h"
 
 // Forward declarations
diff --git a/libcore/LoadVariablesThread.h b/libcore/LoadVariablesThread.h
index a1d6ccc..0be3985 100644
--- a/libcore/LoadVariablesThread.h
+++ b/libcore/LoadVariablesThread.h
@@ -23,15 +23,14 @@
 
 #include <string>
 #include <map>
-#include <functional>
 #include <future>
-#include <cassert>
+#include <atomic>
 
-#include "URL.h" // for inlines
 
 namespace gnash {
     class StreamProvider;
     class IOChannel;
+    class URL;
 }
 
 namespace gnash {
diff --git a/libcore/MovieClip.h b/libcore/MovieClip.h
index 6c0fdc7..7aa00b1 100644
--- a/libcore/MovieClip.h
+++ b/libcore/MovieClip.h
@@ -34,7 +34,6 @@
 
 #include "ControlTag.h"
 #include "movie_definition.h" // for inlines
-#include "DisplayList.h" // DisplayList 
 #include "DisplayObjectContainer.h"
 #include "as_environment.h" // for composition
 #include "DynamicShape.h" // for composition
@@ -50,6 +49,7 @@ namespace gnash {
     class TextField;
     class BitmapData_as;
     class CachedBitmap;
+    class DisplayList;
     namespace SWF {
         class PlaceObject2Tag;
     }
diff --git a/libcore/builtin_function.h b/libcore/builtin_function.h
index c9d0045..ac270b6 100644
--- a/libcore/builtin_function.h
+++ b/libcore/builtin_function.h
@@ -20,11 +20,14 @@
 #define GNASH_BUILTIN_FUNCTION_H
 
 #include "UserFunction.h" 
-#include "fn_call.h"
 
 #include <cassert>
 
 namespace gnash {
+    class fn_call;
+}
+
+namespace gnash {
 
 
 /// This is a special type of function implementing AS-code in C++

-----------------------------------------------------------------------

Summary of changes:
 libbase/Point2d.h             |    2 +-
 libcore/CharacterProxy.h      |    1 -
 libcore/LoadVariablesThread.h |    5 +--
 libcore/MovieClip.h           |    2 +-
 libcore/RGBA.h                |    2 +-
 libcore/SWFMatrix.h           |    2 +-
 libcore/SWFRect.h             |    8 +++---
 libcore/asobj/Global_as.h     |   53 +++++++++++++++++++---------------------
 libcore/builtin_function.h    |    5 +++-
 9 files changed, 39 insertions(+), 41 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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