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-2130-gff6159b
Date: Tue, 10 Jun 2014 21:33:43 +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  ff6159b96718ddea32198355039280558ba94860 (commit)
       via  220150cd316b7f984da45cd08ed941e7610cc9fe (commit)
      from  5e61379cc0dc50ea32ae0d848fab0b795a3819a7 (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=ff6159b96718ddea32198355039280558ba94860


commit ff6159b96718ddea32198355039280558ba94860
Author: Bastiaan Jacques <address@hidden>
Date:   Tue Jun 10 23:23:36 2014 +0200

    Tidy up.

diff --git a/libcore/vm/ActionExec.cpp b/libcore/vm/ActionExec.cpp
index be7b0b9..842d8ef 100644
--- a/libcore/vm/ActionExec.cpp
+++ b/libcore/vm/ActionExec.cpp
@@ -68,10 +68,6 @@ ActionExec::ActionExec(const Function& func, as_environment& 
newEnv,
     _scopeStack(func.getScopeStack()),
     _func(&func),
     _this_ptr(this_ptr),
-    _initialStackSize(0),
-    _originalTarget(nullptr),
-    _origExecSWFVersion(0),
-    _returning(false),
     _abortOnUnload(false),
     pc(func.getStartPC()),
     next_pc(pc),
@@ -110,10 +106,6 @@ ActionExec::ActionExec(const action_buffer& abuf, 
as_environment& newEnv,
     _scopeStack(),
     _func(nullptr),
     _this_ptr(nullptr),
-    _initialStackSize(0),
-    _originalTarget(nullptr),
-    _origExecSWFVersion(0),
-    _returning(false),
     _abortOnUnload(abortOnUnloaded),
     pc(0),
     next_pc(0),
diff --git a/libcore/vm/ActionExec.h b/libcore/vm/ActionExec.h
index 4edd528..492f59d 100644
--- a/libcore/vm/ActionExec.h
+++ b/libcore/vm/ActionExec.h
@@ -306,15 +306,15 @@ private:
        as_object* _this_ptr;
 
        /// Stack size at start of execution
-       size_t _initialStackSize;
+       size_t _initialStackSize = 0;
 
-       DisplayObject* _originalTarget;
+       DisplayObject* _originalTarget = nullptr;
 
-       int _origExecSWFVersion;
+       int _origExecSWFVersion = 0;
 
        std::stack<TryBlock> _tryList;
 
-       bool _returning;
+       bool _returning = false;
 
        bool _abortOnUnload;
 

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


commit 220150cd316b7f984da45cd08ed941e7610cc9fe
Author: Bastiaan Jacques <address@hidden>
Date:   Tue Jun 10 23:14:27 2014 +0200

    _tryList is used exactly as a stack, so use std::stack instead of std::list.

diff --git a/libcore/vm/ActionExec.cpp b/libcore/vm/ActionExec.cpp
index 3816099..be7b0b9 100644
--- a/libcore/vm/ActionExec.cpp
+++ b/libcore/vm/ActionExec.cpp
@@ -71,7 +71,6 @@ ActionExec::ActionExec(const Function& func, as_environment& 
newEnv,
     _initialStackSize(0),
     _originalTarget(nullptr),
     _origExecSWFVersion(0),
-    _tryList(),
     _returning(false),
     _abortOnUnload(false),
     pc(func.getStartPC()),
@@ -114,7 +113,6 @@ ActionExec::ActionExec(const action_buffer& abuf, 
as_environment& newEnv,
     _initialStackSize(0),
     _originalTarget(nullptr),
     _origExecSWFVersion(0),
-    _tryList(),
     _returning(false),
     _abortOnUnload(abortOnUnloaded),
     pc(0),
@@ -197,7 +195,7 @@ ActionExec::operator()()
                 }
 
                 // If we are in a try block, check to see if we have thrown.
-                TryBlock& t = _tryList.back();
+                TryBlock& t = _tryList.top();
                 
                 if (!processExceptions(t)) break;
 
@@ -485,7 +483,7 @@ ActionExec::processExceptions(TryBlock& t)
                 log_debug("END: exception thrown in finally(%s). "
                           "Leaving on the stack", ex);
 #endif
-                _tryList.pop_back();
+                _tryList.pop();
                 return true;
             }
             else if (t._lastThrow.is_exception()) {
@@ -501,7 +499,7 @@ ActionExec::processExceptions(TryBlock& t)
                 env.push(t._lastThrow);
  
 
-                _tryList.pop_back();
+                _tryList.pop();
                 return true;
             }
 #ifdef GNASH_DEBUG_TRY
@@ -512,7 +510,7 @@ ActionExec::processExceptions(TryBlock& t)
             stop_pc = t._savedEndOffset;
             
             // Finished with this TryBlock.
-            _tryList.pop_back();
+            _tryList.pop();
             
             // Will break out of action execution.
             if (_returning) return false;
@@ -654,7 +652,7 @@ ActionExec::pushTryBlock(TryBlock t)
     t._savedEndOffset = stop_pc;
     stop_pc = t._catchOffset;
 
-    _tryList.push_back(t);
+    _tryList.push(std::move(t));
 }
 
 void
diff --git a/libcore/vm/ActionExec.h b/libcore/vm/ActionExec.h
index 5786dae..4edd528 100644
--- a/libcore/vm/ActionExec.h
+++ b/libcore/vm/ActionExec.h
@@ -20,7 +20,7 @@
 #define GNASH_ACTIONEXEC_H
 
 #include <string>
-#include <list>
+#include <stack>
 #include <vector>
 #include <boost/noncopyable.hpp>
 
@@ -312,7 +312,7 @@ private:
 
        int _origExecSWFVersion;
 
-       std::list<TryBlock> _tryList;
+       std::stack<TryBlock> _tryList;
 
        bool _returning;
 

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

Summary of changes:
 libcore/vm/ActionExec.cpp |   20 +++++---------------
 libcore/vm/ActionExec.h   |   12 ++++++------
 2 files changed, 11 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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