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: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-446-gad6c1e9
Date: Thu, 07 Jul 2011 18:23:49 +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  ad6c1e98583e809fad79588a4619b880a967d4ab (commit)
      from  0774e9ab8412160c6a9a862482841bc7da7c8183 (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=ad6c1e98583e809fad79588a4619b880a967d4ab


commit ad6c1e98583e809fad79588a4619b880a967d4ab
Author: Sandro Santilli <address@hidden>
Date:   Thu Jul 7 20:23:28 2011 +0200

    Tabs to spaces

diff --git a/libcore/Function.cpp b/libcore/Function.cpp
index f23db44..68e30f3 100644
--- a/libcore/Function.cpp
+++ b/libcore/Function.cpp
@@ -34,16 +34,16 @@
 namespace gnash {
 
 Function::Function(const action_buffer& ab, as_environment& env,
-                       size_t start, const ScopeStack& scopeStack)
-       :
-       UserFunction(getGlobal(env)),
-       _env(env),
-       _action_buffer(ab),
-       _scopeStack(scopeStack),
-       _startPC(start),
-       _length(0)
+            size_t start, const ScopeStack& scopeStack)
+    :
+    UserFunction(getGlobal(env)),
+    _env(env),
+    _action_buffer(ab),
+    _scopeStack(scopeStack),
+    _startPC(start),
+    _length(0)
 {
-       assert( _startPC < _action_buffer.size() );
+    assert( _startPC < _action_buffer.size() );
 }
 
 TargetGuard::TargetGuard(as_environment& e, DisplayObject* ch,
@@ -73,35 +73,35 @@ Function::call(const fn_call& fn)
 
     as_object* caller = vm.calling() ? &vm.currentCall().function() : 0;
 
-       // Set up local stack frame, for parameters and locals.
-       FrameGuard guard(getVM(fn), *this);
+    // Set up local stack frame, for parameters and locals.
+    FrameGuard guard(getVM(fn), *this);
     CallFrame& cf = guard.callFrame();
 
-       DisplayObject* target = _env.target();
-       DisplayObject* orig_target = _env.get_original_target();
+    DisplayObject* target = _env.target();
+    DisplayObject* orig_target = _env.get_original_target();
 
-       // Some features are version-dependant.
-       const int swfversion = getSWFVersion(fn);
+    // Some features are version-dependant.
+    const int swfversion = getSWFVersion(fn);
 
-       if (swfversion < 6) {
-               // In SWF5, when 'this' is a DisplayObject it becomes
-               // the target for this function call.
-               // See actionscript.all/setProperty.as
+    if (swfversion < 6) {
+        // In SWF5, when 'this' is a DisplayObject it becomes
+        // the target for this function call.
+        // See actionscript.all/setProperty.as
         DisplayObject* ch = get<DisplayObject>(fn.this_ptr);
         if (ch) {
             target = ch;
             orig_target = ch;
         }
-       }
+    }
 
-       /// This is only needed for SWF5 (temp switch of target)
-       /// We do always and base 'target' value on SWF version.
-       /// TODO: simplify code by maybe using a custom as_environment
-       ///       instead, so to get an "original" target being 
-       ///       the one set now (rather then the really original one)
-       /// TODO: test scope when calling functions defined in another timeline
-       ///       (target, in particular).
-       TargetGuard targetGuard(_env, target, orig_target);
+    /// This is only needed for SWF5 (temp switch of target)
+    /// We do always and base 'target' value on SWF version.
+    /// TODO: simplify code by maybe using a custom as_environment
+    ///       instead, so to get an "original" target being 
+    ///       the one set now (rather then the really original one)
+    /// TODO: test scope when calling functions defined in another timeline
+    ///       (target, in particular).
+    TargetGuard targetGuard(_env, target, orig_target);
 
     // Push the arguments onto the local frame.
     for (size_t i = 0, n = _args.size(); i < n; ++i) {
@@ -135,7 +135,7 @@ Function::call(const fn_call& fn)
     // Put 'arguments' in a local var.
     setLocal(cf, NSV::PROP_ARGUMENTS, getArguments(*this, *args, fn, caller));
 
-       // Execute the actions.
+    // Execute the actions.
     as_value result;
     ActionExec(*this, _env, &result, fn.this_ptr)();
     return result;
@@ -144,8 +144,8 @@ Function::call(const fn_call& fn)
 void
 Function::setLength(size_t len)
 {
-       assert(_startPC + len <= _action_buffer.size());
-       _length = len;
+    assert(_startPC + len <= _action_buffer.size());
+    _length = len;
 }
 
 void
@@ -154,9 +154,9 @@ Function::markReachableResources() const
     std::for_each(_scopeStack.begin(), _scopeStack.end(),
         std::mem_fun(&as_object::setReachable));
 
-       _env.markReachableResources();
+    _env.markReachableResources();
 
-       // Invoke parent class marker
+    // Invoke parent class marker
     as_object::markReachableResources(); 
 }
 
@@ -165,12 +165,12 @@ getArguments(Function& callee, as_object& args, const 
fn_call& fn,
         as_object* caller)
 { 
 
-       for (size_t i = 0; i < fn.nargs; ++i) {
-               callMethod(&args, NSV::PROP_PUSH, fn.arg(i));
-       }
+    for (size_t i = 0; i < fn.nargs; ++i) {
+        callMethod(&args, NSV::PROP_PUSH, fn.arg(i));
+    }
 
-       args.init_member(NSV::PROP_CALLEE, &callee);
-       args.init_member(NSV::PROP_CALLER, caller);
+    args.init_member(NSV::PROP_CALLEE, &callee);
+    args.init_member(NSV::PROP_CALLER, caller);
     return &args;
 
 }

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

Summary of changes:
 libcore/Function.cpp |   76 +++++++++++++++++++++++++-------------------------
 1 files changed, 38 insertions(+), 38 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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