gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10828: Various class cleanups, co


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10828: Various class cleanups, const correctness and correction to BitmapFilter
Date: Thu, 23 Apr 2009 17:51:18 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10828
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2009-04-23 17:51:18 +0200
message:
  Various class cleanups, const correctness and correction to BitmapFilter
  classes.
modified:
  libcore/Button.cpp
  libcore/DisplayList.cpp
  libcore/DisplayObject.cpp
  libcore/DisplayObject.h
  libcore/MovieClip.cpp
  libcore/MovieClip.h
  libcore/as_environment.cpp
  libcore/as_function.cpp
  libcore/as_function.h
  libcore/asobj/Color_as.cpp
  libcore/asobj/TextSnapshot_as.cpp
  libcore/asobj/flash/filters/BevelFilter_as.cpp
  libcore/asobj/flash/filters/BitmapFilter_as.cpp
  libcore/asobj/flash/filters/BitmapFilter_as.h
  libcore/asobj/flash/filters/BlurFilter_as.cpp
  libcore/asobj/flash/filters/ColorMatrixFilter_as.cpp
  libcore/asobj/flash/filters/ConvolutionFilter_as.cpp
  libcore/asobj/flash/filters/DropShadowFilter_as.cpp
  libcore/asobj/flash/filters/GlowFilter_as.cpp
  libcore/asobj/flash/filters/GradientBevelFilter_as.cpp
  libcore/asobj/flash/filters/GradientGlowFilter_as.cpp
  libcore/movie_root.cpp
  libcore/swf_function.cpp
  libcore/vm/ActionExec.cpp
  libcore/vm/ExecutableCode.h
  testsuite/swfdec/PASSING
    ------------------------------------------------------------
    revno: 10822.1.1
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Wed 2009-04-22 13:55:09 +0200
    message:
      Clear properties of all destroyed DisplayObjects.
            
      Const correct isUnloaded(), rename to unloaded(). Unregister mask and mask
      during unload(), not during GC resource marking.
            
      Minor optimization (cleaner code) for masking.
    modified:
      libcore/Button.cpp
      libcore/DisplayList.cpp
      libcore/DisplayObject.cpp
      libcore/DisplayObject.h
      libcore/MovieClip.cpp
      libcore/asobj/Color_as.cpp
      libcore/asobj/TextSnapshot_as.cpp
      libcore/movie_root.cpp
      libcore/vm/ActionExec.cpp
      libcore/vm/ExecutableCode.h
    ------------------------------------------------------------
    revno: 10822.1.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Wed 2009-04-22 17:16:35 +0200
    message:
      getAsRoot should be non-const, for reasons now explain in the 
documentation.
    modified:
      libcore/DisplayObject.cpp
      libcore/DisplayObject.h
      libcore/MovieClip.cpp
      libcore/MovieClip.h
    ------------------------------------------------------------
    revno: 10822.1.3
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Wed 2009-04-22 17:17:32 +0200
    message:
      No need to const_cast getAsRoot return.
    modified:
      libcore/Button.cpp
    ------------------------------------------------------------
    revno: 10822.1.4
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Wed 2009-04-22 17:17:57 +0200
    message:
      Drop const_casts.
    modified:
      libcore/as_environment.cpp
      libcore/swf_function.cpp
    ------------------------------------------------------------
    revno: 10822.1.5
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Wed 2009-04-22 18:48:21 +0200
    message:
      Start to clean up the BitmapFilter classes. Passes in swfdec testsuite.
    modified:
      libcore/asobj/flash/filters/BevelFilter_as.cpp
      libcore/asobj/flash/filters/BitmapFilter_as.cpp
      libcore/asobj/flash/filters/BitmapFilter_as.h
      libcore/asobj/flash/filters/BlurFilter_as.cpp
      libcore/asobj/flash/filters/ColorMatrixFilter_as.cpp
      libcore/asobj/flash/filters/ConvolutionFilter_as.cpp
      libcore/asobj/flash/filters/DropShadowFilter_as.cpp
      libcore/asobj/flash/filters/GlowFilter_as.cpp
      libcore/asobj/flash/filters/GradientBevelFilter_as.cpp
      libcore/asobj/flash/filters/GradientGlowFilter_as.cpp
    ------------------------------------------------------------
    revno: 10822.1.6
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-04-23 09:16:23 +0200
    message:
      Implement ConvolutionFilter interface more correctly. Drop existing
      implementation because it's generally wrong.
    modified:
      libcore/asobj/flash/filters/BitmapFilter_as.cpp
      libcore/asobj/flash/filters/ConvolutionFilter_as.cpp
    ------------------------------------------------------------
    revno: 10822.1.7
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-04-23 14:49:08 +0200
    message:
      Clean up as_function.
    modified:
      libcore/as_function.cpp
      libcore/as_function.h
=== modified file 'libcore/Button.cpp'
--- a/libcore/Button.cpp        2009-04-15 09:08:37 +0000
+++ b/libcore/Button.cpp        2009-04-22 15:17:32 +0000
@@ -232,7 +232,7 @@
 /// 2) if we don't want unloaded DisplayObjects and the DisplayObject is 
unloaded.
 static bool isCharacterNull(DisplayObject* ch, bool includeUnloaded)
 {
-    return (!ch || (!includeUnloaded && ch->isUnloaded()));
+    return (!ch || (!includeUnloaded && ch->unloaded()));
 }
 
 static void
@@ -335,7 +335,7 @@
 bool
 Button::on_event(const event_id& id)
 {
-    if ( isUnloaded() )
+    if ( unloaded() )
     {
         // We dont' respond to events while unloaded
         // See bug #22982
@@ -451,7 +451,7 @@
 void
 Button::mouseEvent(const event_id& event)
 {
-    if ( isUnloaded() )
+    if ( unloaded() )
     {
         // We don't respond to events while unloaded. See bug #22982.
         log_debug("Button %s received %s button event while unloaded: ignored",
@@ -652,7 +652,7 @@
         {
             ss << ch->getTarget() << " (depth:" << 
                 ch->get_depth()-DisplayObject::staticDepthOffset-1
-                << " unloaded:" << ch->isUnloaded() <<
+                << " unloaded:" << ch->unloaded() <<
                 " destroyed:" << ch->isDestroyed() << ")";
         }
         ss << std::endl;
@@ -686,7 +686,7 @@
         if ( ! shouldBeThere )
         {
             // is there, but is unloaded: destroy, clear slot and go on
-            if ( oldch && oldch->isUnloaded() )
+            if ( oldch && oldch->unloaded() )
             {
                 if ( ! oldch->isDestroyed() ) oldch->destroy();
                 _stateCharacters[i] = NULL;
@@ -718,7 +718,7 @@
         else // should be there
         {
             // Is there already, but is unloaded: destroy and consider as gone
-            if ( oldch && oldch->isUnloaded() )
+            if ( oldch && oldch->unloaded() )
             {
                 if ( ! oldch->isDestroyed() ) oldch->destroy();
                 _stateCharacters[i] = NULL;
@@ -997,7 +997,7 @@
     {
         DisplayObject* ch = *i;
         if ( ! ch ) continue;
-        if ( ch->isUnloaded() ) continue;
+        if ( ch->unloaded() ) continue;
         if ( ch->unload() ) childsHaveUnload = true;
     }
 
@@ -1050,7 +1050,7 @@
     //
     if (name_key == NSV::PROP_uROOT) {
         // getAsRoot() will take care of _lockroot
-        val->set_as_object( const_cast<MovieClip*>( getAsRoot() )    );
+        val->set_as_object(getAsRoot());
         return true;
     }
 

=== modified file 'libcore/DisplayList.cpp'
--- a/libcore/DisplayList.cpp   2009-04-15 05:33:51 +0000
+++ b/libcore/DisplayList.cpp   2009-04-22 11:55:09 +0000
@@ -208,7 +208,7 @@
 void
 DisplayList::placeDisplayObject(DisplayObject* ch, int depth, as_object* 
initObj)
 {
-    assert(!ch->isUnloaded());
+    assert(!ch->unloaded());
     ch->set_invalidated();
     ch->set_depth(depth);
 
@@ -271,7 +271,7 @@
     testInvariant();
 
     //GNASH_REPORT_FUNCTION;
-    assert(!ch->isUnloaded());
+    assert(!ch->unloaded());
 
     ch->set_invalidated();
     ch->set_depth(depth);
@@ -356,9 +356,9 @@
         return;
     }
 
-    if (ch->isUnloaded()) {
+    if (ch->unloaded()) {
         log_error("Request to move an unloaded DisplayObject");
-        assert(!ch->isUnloaded());
+        assert(!ch->unloaded());
     }
 
     // TODO: is sign of depth related to accepting anim moves ?
@@ -515,7 +515,7 @@
         DisplayItem di = *it;
 
         // skip if already unloaded
-        if (di->isUnloaded()) {
+        if (di->unloaded()) {
             // TODO: call di->destroy(); ?
             ++it;
             continue;
@@ -572,14 +572,14 @@
     std::stack<int> clipDepthStack;
     
     // We only display DisplayObjects which are out of the "removed" zone
-    // (or should we check isUnloaded?)
+    // (or should we check unloaded?)
     iterator it = beginNonRemoved(_charsByDepth);
     for (iterator endIt = _charsByDepth.end(); it != endIt; ++it)
     {
         DisplayObject* ch = it->get();
 
         DisplayObject* mask = ch->getMask();
-        if (mask && ch->visible() && ! mask->isUnloaded())
+        if (mask && ch->visible() && ! mask->unloaded())
         {
             render::begin_submit_mask();
             
@@ -599,7 +599,7 @@
         // Don't display dynamic masks
         if (ch->isDynamicMask()) continue;
 
-        assert(! ch->isUnloaded() ); // we don't advance unloaded chars
+        assert(! ch->unloaded() ); // we don't advance unloaded chars
 
         // Check if this charater or any of its parents is a mask.
         // Characters acting as masks should always be rendered to the
@@ -924,7 +924,7 @@
         boost::intrusive_ptr<DisplayObject> chNew = itNew->get();
         int depthNew = chNew->get_depth();
 
-        if (chNew->isUnloaded()) {
+        if (chNew->unloaded()) {
             iterator it =
                 std::find_if(_charsByDepth.begin(), _charsByDepth.end(),
                     DepthGreaterOrEqual(depthNew));
@@ -942,7 +942,7 @@
             e = newList._charsByDepth.end(); i != e; ++i) {
 
         DisplayObject* ch = (*i).get();
-        if (!ch->isUnloaded()) {
+        if (!ch->unloaded()) {
 
             iterator found =
                 std::find(_charsByDepth.begin(), _charsByDepth.end(), ch);
@@ -969,7 +969,7 @@
 void
 DisplayList::reinsertRemovedCharacter(boost::intrusive_ptr<DisplayObject> ch)
 {
-    assert(ch->isUnloaded());
+    assert(ch->unloaded());
     testInvariant();
 
     // TODO: have this done by DisplayObject::unload() instead ?
@@ -992,7 +992,7 @@
 {
     testInvariant();
 
-    _charsByDepth.remove_if(boost::mem_fn(&DisplayObject::isUnloaded));
+    _charsByDepth.remove_if(boost::mem_fn(&DisplayObject::unloaded));
 
     testInvariant();
 }

=== modified file 'libcore/DisplayObject.cpp'
--- a/libcore/DisplayObject.cpp 2009-04-16 12:33:43 +0000
+++ b/libcore/DisplayObject.cpp 2009-04-22 15:16:35 +0000
@@ -149,7 +149,7 @@
        if (_vm.getSWFVersion() > 4 && key == NSV::PROP_uROOT)
        {
                // getAsRoot() will handle _lockroot 
-               return const_cast<MovieClip*>(getAsRoot());
+               return getAsRoot();
        }
 
        const std::string& name = _vm.getStringTable().value(key);
@@ -593,7 +593,8 @@
 as_value
 DisplayObject::alpha_getset(const fn_call& fn)
 {
-       boost::intrusive_ptr<DisplayObject> ptr = 
ensureType<DisplayObject>(fn.this_ptr);
+       boost::intrusive_ptr<DisplayObject> ptr =
+        ensureType<DisplayObject>(fn.this_ptr);
 
        as_value rv;
        if ( fn.nargs == 0 ) // getter
@@ -728,7 +729,8 @@
 as_value
 DisplayObject::visible_getset(const fn_call& fn)
 {
-       boost::intrusive_ptr<DisplayObject> ptr = 
ensureType<DisplayObject>(fn.this_ptr);
+       boost::intrusive_ptr<DisplayObject> ptr =
+        ensureType<DisplayObject>(fn.this_ptr);
 
        as_value rv;
        if (!fn.nargs) // getter
@@ -1070,11 +1072,14 @@
 DisplayObject::unload()
 {
 
-       if ( ! _unloaded )
-       {
+       if (!_unloaded) {
                queueEvent(event_id::UNLOAD, movie_root::apDOACTION);
        }
 
+    // Unregister this DisplayObject as mask and/or maskee.
+    if (_maskee) _maskee->setMask(0);
+    if (_mask) _mask->setMaskee(0);
+
        bool hasEvent = hasEventHandler(event_id::UNLOAD);
 
        _unloaded = true;
@@ -1096,7 +1101,7 @@
 DisplayObject::hasEventHandler(const event_id& id) const
 {
        Events::const_iterator it = _event_handlers.find(id);
-       if ( it != _event_handlers.end() ) return true;
+       if (it != _event_handlers.end()) return true;
 
        boost::intrusive_ptr<as_function> method = 
         getUserDefinedEventHandler(id.functionKey());
@@ -1326,13 +1331,17 @@
 void
 DisplayObject::destroy()
 {
-       // in case we are destroyed w/out being unloaded first
+       // in case we are destroyed without being unloaded first
        // see bug #21842
        _unloaded = true;
 
        /// we may destory a DisplayObject that's not unloaded.
-       ///(we don't have chance to unload it in current model, see 
new_child_in_unload_test.c)
+       ///(we don't have chance to unload it in current model,
+    /// see new_child_in_unload_test.c)
        /// We don't destroy ourself twice, right ?
+
+    clearProperties();
+
        assert(!_destroyed);
        _destroyed = true;
 }
@@ -1341,34 +1350,17 @@
 DisplayObject::markDisplayObjectReachable() const
 {
        if ( m_parent ) m_parent->setReachable();
-       if ( _mask )
-       {
-               // Stop being masked if the mask was unloaded
-               if ( _mask->isUnloaded() )
-               {
-                       const_cast<DisplayObject*>(this)->setMask(0);
-               }
-               else _mask->setReachable();
-       }
-       if ( _maskee )
-       {
-               // Stop masking if the masked DisplayObject was unloaded
-               if ( _maskee->isUnloaded() )
-               {
-                       const_cast<DisplayObject*>(this)->setMaskee(0);
-               }
-               else _maskee->setReachable();
-       }
+       if (_mask) _mask->setReachable();
+       if (_maskee) _maskee->setReachable();
        markAsObjectReachable();
 }
 
 void
 DisplayObject::setMask(DisplayObject* mask)
 {
-       if ( _mask != mask )
-       {
-               set_invalidated();
-       }
+       if ( _mask == mask ) return;
+
+    set_invalidated();
 
        // Backup this before setMaskee has a chance to change it..
        DisplayObject* prevMaskee = _maskee;
@@ -1385,36 +1377,29 @@
 
        // if we had a maskee, notify it to stop using
        // us as a mask
-       if ( prevMaskee )
-       {
-               prevMaskee->setMask(0); 
-       }
+       if (prevMaskee) prevMaskee->setMask(0);
 
        // TODO: should we reset any original clip depth
        //       specified by PlaceObject tag ?
-       set_clip_depth(noClipDepthValue); // this will set _mask !!
+       set_clip_depth(noClipDepthValue); 
        _mask = mask;
        _maskee = 0;
 
        if ( _mask )
        {
                log_debug(" %s.setMask(%s): registering with new mask %s",
-                       getTarget(),
-                       mask ? mask->getTarget() : "null",
+                       getTarget(), mask ? mask->getTarget() : "null",
                        _mask->getTarget());
                /// Register as as masked by the mask
                _mask->setMaskee(this);
        }
 }
 
-/*private*/
 void
 DisplayObject::setMaskee(DisplayObject* maskee)
 {
-       if ( _maskee == maskee )
-       {
-               return;
-       }
+       if ( _maskee == maskee ) { return; }
+
        if ( _maskee )
        {
                // We don't want the maskee to call setMaskee(null)
@@ -1483,7 +1468,7 @@
        tr.append_child(it, StringPair(_("Dynamic"), isDynamic() ? yes : no));  
        tr.append_child(it, StringPair(_("Mask"), isMaskLayer() ? yes : no));   
    
        tr.append_child(it, StringPair(_("Destroyed"), isDestroyed() ? yes : 
no));
-       tr.append_child(it, StringPair(_("Unloaded"), isUnloaded() ? yes : no));
+       tr.append_child(it, StringPair(_("Unloaded"), unloaded() ? yes : no));
        
     os.str("");
     os << _blendMode;
@@ -1498,8 +1483,8 @@
 }
 #endif
 
-const MovieClip*
-DisplayObject::getAsRoot() const
+MovieClip*
+DisplayObject::getAsRoot()
 {
     return get_root();
 }

=== modified file 'libcore/DisplayObject.h'
--- a/libcore/DisplayObject.h   2009-04-15 05:33:51 +0000
+++ b/libcore/DisplayObject.h   2009-04-22 15:16:35 +0000
@@ -297,9 +297,9 @@
         m_clip_depth = d;
     }
         
-    /// Returns true when the DisplayObject (and it's childs) is used as a mask
+    /// Returns true when the DisplayObject (and its childs) is used as a mask
     /// for other DisplayObjects at higher depth (up to get_clip_depth).
-    /// isMaskLayer() does *not* return true when one of it's
+    /// isMaskLayer() does not return true when one of its
     /// parents is a mask and the DisplayObject itself is not.
     ///
     /// See also isDynamicMask() and isMask()
@@ -309,9 +309,9 @@
         return (m_clip_depth != noClipDepthValue && !_maskee);
     }
 
-    /// Returns true when the DisplayObject (and it's childs) is used as a mask
+    /// Returns true when the DisplayObject (and its childs) is used as a mask
     /// for another DisplayObject.
-    /// isDynamicMask() does *not* return true when one of it's
+    /// isDynamicMask() does not return true when one of its
     /// parents is a mask and the DisplayObject itself is not.
     ///
     /// NOTE: there's no way to obtain the maskee from a dynamic mask
@@ -502,9 +502,10 @@
 
     /// Return the _root ActionScript property of this DisplayObject.
     //
-    /// By default calls get_root().
-    ///
-    virtual const MovieClip* getAsRoot() const;
+    /// By default calls get_root(). The resulting MovieClip may be passed
+    /// to actionscript methods, so it is not const. As the override in
+    /// MovieClip may return this, the method cannot be const either.
+    virtual MovieClip* getAsRoot();
 
     /// Find the object which is one degree removed from us,
     /// given the relative pathname.
@@ -797,7 +798,7 @@
     virtual bool unload();
 
     /// Return true if this DisplayObject was unloaded from the stage
-    bool isUnloaded() { return _unloaded; }
+    bool unloaded() const { return _unloaded; }
 
     /// Mark this DisplayObject as destroyed
     //

=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp     2009-04-20 13:59:41 +0000
+++ b/libcore/MovieClip.cpp     2009-04-22 15:16:35 +0000
@@ -431,7 +431,7 @@
 
     void operator() (DisplayObject* ch) {
         // don't include bounds of unloaded DisplayObjects
-        if ( ch->isUnloaded() ) return;
+        if ( ch->unloaded() ) return;
         rect chb = ch->getBounds();
         SWFMatrix m = ch->getMatrix();
         _bounds.expand_to_transformed_rect(m, chb);
@@ -458,7 +458,7 @@
 
     void operator() (DisplayObject* ch) {
         // don't include bounds of unloaded DisplayObjects
-        if ( ch->isUnloaded() ) return;
+        if ( ch->unloaded() ) return;
 
         // TODO: Are script-transformed object to be kept ?
         //             Need a testcase for this
@@ -556,15 +556,13 @@
     string_table::key nsname)
 {
     // FIXME: use addProperty interface for these !!
-    // TODO: or at least have a DisplayObject:: protected method take
-    //             care of these ?
-    //             Duplicates code in DisplayObject::getPathElementSeparator 
too..
-    //
+    // TODO: or at least have a DisplayObject protected method take
+    //       care of these ?
+    //       Duplicates code in DisplayObject::getPathElementSeparator too.
     if (getSWFVersion() > 4 && name_key == NSV::PROP_uROOT)
     {
-
         // getAsRoot() will take care of _lockroot
-        val->set_as_object( const_cast<MovieClip*>( getAsRoot() )    );
+        val->set_as_object(getAsRoot());
         return true;
     }
 
@@ -573,7 +571,7 @@
     //             an SWF6 (to, say, _level2), _global will be unavailable
     //             to the SWF4 code but available to the SWF6 one.
     //
-    if ( getSWFVersion() > 5 && name_key == NSV::PROP_uGLOBAL ) // see 
MovieClip.as
+    if (getSWFVersion() > 5 && name_key == NSV::PROP_uGLOBAL) 
     {
         // The "_global" ref was added in SWF6
         val->set_as_object( _vm.getGlobal() );
@@ -862,7 +860,7 @@
 #endif
 
     // We do not execute ENTER_FRAME if unloaded
-    if ( id.id() == event_id::ENTER_FRAME && isUnloaded() )
+    if ( id.id() == event_id::ENTER_FRAME && unloaded() )
     {
 #ifdef GNASH_DEBUG
         log_debug(_("Sprite %s ignored ENTER_FRAME event (is unloaded)"), 
getTarget());
@@ -1080,7 +1078,7 @@
         get_frame_count());
 #endif
 
-    assert(!isUnloaded());
+    assert(!unloaded());
 
     // call_frame should never trigger advance_movieclip
     assert(!_callingFrameActions);
@@ -1679,7 +1677,7 @@
 #endif
         return false;
     }
-    DisplayObject* mask = getMask(); // dynamic one
+    const DisplayObject* mask = getMask(); // dynamic one
     if ( mask && mask->visible() && ! mask->pointInShape(x, y) )
     {
 #ifdef GNASH_DEBUG_HITTEST
@@ -1960,7 +1958,7 @@
     {
         TextFields& v=i->second;
         TextFields::iterator lastValid = std::remove_if(v.begin(), v.end(),
-                    boost::mem_fn(&DisplayObject::isUnloaded));
+                    boost::mem_fn(&DisplayObject::unloaded));
         v.erase(lastValid, v.end());
     }
 }
@@ -2046,7 +2044,7 @@
 void
 MovieClip::stagePlacementCallback(as_object* initObj)
 {
-    assert(!isUnloaded());
+    assert(!unloaded());
 
     saveOriginalTarget();
 
@@ -2534,7 +2532,7 @@
     void operator() (DisplayObject* ch)
     {
         // don't enumerate unloaded DisplayObjects
-        if ( ch->isUnloaded() ) return;
+        if ( ch->unloaded() ) return;
 
         _env.push(ch->get_name());
     }
@@ -2601,12 +2599,7 @@
 MovieClip::destroy()
 {
     stopStreamSound();
-
     _displayList.destroy();
-
-    /// We don't need these anymore
-    clearProperties();
-
     DisplayObject::destroy();
 }
 
@@ -2624,8 +2617,8 @@
     return _swf;
 }
 
-const MovieClip*
-MovieClip::getAsRoot() const
+MovieClip*
+MovieClip::getAsRoot()
 {
 
     // TODO1: as an optimization, if swf version < 7 
@@ -2723,7 +2716,7 @@
     void operator() (DisplayObject* ch)
     {
         // Should we still print these?
-        //if ( ch->isUnloaded() ) return; 
+        //if ( ch->unloaded() ) return; 
 
         ch->getMovieInfo(_tr, _it);
     }

=== modified file 'libcore/MovieClip.h'
--- a/libcore/MovieClip.h       2009-04-15 05:54:30 +0000
+++ b/libcore/MovieClip.h       2009-04-22 15:16:35 +0000
@@ -131,13 +131,11 @@
     // Return the originating SWF
     virtual Movie* get_root() const;
 
-    /// Return the _swf ActionScript property of this sprite.
+    /// Return the _root ActionScript property of this sprite.
     //
-    /// Relative or absolute is determined by
-    /// the _lockroot property, see getLockRoot
-    /// and setLockRoot.
-    ///
-    virtual const MovieClip* getAsRoot() const;
+    /// Relative or absolute is determined by the _lockroot property,
+    /// see getLockRoot and setLockRoot. May return this.
+    virtual MovieClip* getAsRoot();
 
     /// Get the composite bounds of all component drawing elements
     virtual rect getBounds() const;

=== modified file 'libcore/as_environment.cpp'
--- a/libcore/as_environment.cpp        2009-04-16 12:11:44 +0000
+++ b/libcore/as_environment.cpp        2009-04-22 15:17:57 +0000
@@ -584,13 +584,13 @@
     {
         // Absolute path.  Start at the (AS) root (handle _lockroot)
         MovieClip* root = 0;
-        if ( m_target ) root = const_cast<MovieClip*>(m_target->getAsRoot());
+        if ( m_target ) root = m_target->getAsRoot();
         else {
             if ( _original_target )
             {
                 log_debug("current target is undefined on "
                         "as_environment::find_object, we'll use original");
-                root = const_cast<MovieClip*>(_original_target->getAsRoot());
+                root = _original_target->getAsRoot();
             }
             else
             {

=== modified file 'libcore/as_function.cpp'
--- a/libcore/as_function.cpp   2009-04-01 07:00:32 +0000
+++ b/libcore/as_function.cpp   2009-04-23 12:49:08 +0000
@@ -33,107 +33,62 @@
 
 namespace gnash {
 
-// should be static, probably
-as_value function_apply(const fn_call& fn);
-as_value function_call(const fn_call& fn);
-static as_object* getFunctionPrototype();
-static as_value function_ctor(const fn_call& fn);
-
-/* 
- * This function returns the singleton
- * instance of the ActionScript Function object
- * prototype, which is what the AS Function class
- * exports, thus what each AS function instance inherit.
- *
- * The returned object can be accessed by ActionScript
- * code through Function.__proto__.prototype.
- * User AS code can add or modify members of this object
- * to modify behaviour of all Function AS instances.
- *
- * FIXME: do not use a static specifier for the proto
- * object, as multiple runs of a single movie should
- * each use a 'clean', unmodified, version of the
- * prototype. What should really happen is that this
- * prototype gets initializated by initialization of
- * the Function class itself, which would be a member
- * of the _global object for each movie instance.
- * 
- */
-static as_object* getFunctionPrototype()
-{
-       // Make sure the prototype is always
-       // alive (static boost::intrusive_ptr<> should ensure this)
-       static boost::intrusive_ptr<as_object> proto;
-
-       if ( proto.get() == NULL ) {
-
-               // Initialize Function prototype
-               proto = new as_object();
-
-               // We initialize the __proto__ member separately, as 
getObjectInterface
-               // will end up calling getFunctionPrototype again and we want 
that
-               // call to return the still-not-completely-constructed 
prototype rather
-               // then create a new one. 
-               proto->set_prototype(getObjectInterface());
-
-               VM::get().addStatic(proto.get());
-
-               const int flags = as_prop_flags::dontDelete | 
-                          as_prop_flags::dontEnum | 
-                          as_prop_flags::onlySWF6Up; 
-
-               proto->init_member("apply", new 
builtin_function(function_apply), flags);
-               proto->init_member("call", new builtin_function(function_call), 
flags);
-       }
-
-       return proto.get();
-
-}
-
-static as_value
-function_ctor(const fn_call& /* fn */)
-{
-       boost::intrusive_ptr<as_object> func = new 
as_object(getFunctionPrototype());
-       //log_debug(_("User tried to invoke new Function()"));
-       return as_value(func.get());
-}
-
-as_function::as_function()
-       :
-       // all functions inherit from global Function class
-       //as_object(getFunctionPrototype())
-       as_object()
-{
-       int flags = as_prop_flags::dontDelete |
-                   as_prop_flags::dontEnum | 
-                   as_prop_flags::onlySWF6Up;
-       init_member(NSV::PROP_uuPROTOuu, as_value(getFunctionPrototype()), 
flags);
-}
-
-
-// What if we want a function to inherit from Object instead ?
+// Forward declarations
+namespace {
+    as_value function_apply(const fn_call& fn);
+    as_value function_call(const fn_call& fn);
+    as_object* getFunctionPrototype();
+    as_value function_ctor(const fn_call& fn);
+}
+
+// This function returns the singleton
+// instance of the ActionScript Function object
+// prototype, which is what the AS Function class
+// exports, thus what each AS function instance inherit.
+// 
+// The returned object can be accessed by ActionScript
+// code through Function.__proto__.prototype.
+// User AS code can add or modify members of this object
+// to modify behaviour of all Function AS instances.
+// 
+// FIXME: do not use a static specifier for the proto
+// object, as multiple runs of a single movie should
+// each use a 'clean', unmodified, version of the
+// prototype. What should really happen is that this
+// prototype gets initializated by initialization of
+// the Function class itself, which would be a member
+// of the _global object for each movie instance.
+
 as_function::as_function(as_object* iface)
        :
-       // all functions inherit from global Function class
-       //as_object(getFunctionPrototype())
        as_object()
 {
        int flags = as_prop_flags::dontDelete |
                    as_prop_flags::dontEnum |
                    as_prop_flags::onlySWF6Up;
-       init_member(NSV::PROP_uuPROTOuu, as_value(getFunctionPrototype()), 
flags);
-
-       if ( iface )
-       {
+
+    init_member(NSV::PROP_uuPROTOuu, as_value(getFunctionPrototype()), flags);
+
+       if (iface) {
                iface->init_member(NSV::PROP_CONSTRUCTOR, this); 
                init_member(NSV::PROP_PROTOTYPE, as_value(iface));
        }
 }
 
+as_function::as_function()
+       :
+       as_object()
+{
+       int flags = as_prop_flags::dontDelete |
+                   as_prop_flags::dontEnum | 
+                   as_prop_flags::onlySWF6Up;
+       init_member(NSV::PROP_uuPROTOuu, as_value(getFunctionPrototype()), 
flags);
+}
+
+
 void
 as_function::setPrototype(as_object* proto)
 {
-       //_properties = proto;
        init_member(NSV::PROP_PROTOTYPE, as_value(proto));
 }
 
@@ -163,26 +118,134 @@
        return proto.to_object();
 }
 
-/* static public */
 boost::intrusive_ptr<builtin_function>
 as_function::getFunctionConstructor()
 {
        static boost::intrusive_ptr<builtin_function> func = NULL;
        if ( ! func )
        {
-               func = new builtin_function(
-                       function_ctor, // function constructor doesn't do 
anything
-                       getFunctionPrototype(), // exported interface
-                       true // use "this" as constructor
-                       );
+               func = new builtin_function(function_ctor, 
getFunctionPrototype(),
+                true);
                VM::get().addStatic(func.get());
        }
        return func;
 }
 
-/*
- * Initialize the "Function" member of a _global object.
- */
+boost::intrusive_ptr<as_object>
+as_function::constructInstance(const as_environment& env,
+       std::auto_ptr<std::vector<as_value> > args)
+{
+
+#ifndef GNASH_USE_GC
+       assert(get_ref_count() > 0);
+#endif // GNASH_USE_GC
+
+       int swfversion = env.getVM().getSWFVersion();
+
+       boost::intrusive_ptr<as_object> newobj;
+
+       as_value us;
+       
+    get_member(NSV::PROP_PROTOTYPE, &us);
+       
+    bool has_proto = !us.is_undefined();
+
+    // a built-in class takes care of assigning a prototype
+    // TODO: change this
+    if (isBuiltin()) {
+               IF_VERBOSE_ACTION (
+            log_action(_("it's a built-in class"));
+               )
+
+               fn_call fn(0, env, args);
+               as_value ret;
+
+               try {
+                       ret = call(fn);
+               }
+        catch (GnashException& ex) {
+            // Catching a std::exception here can mask all sorts of bad 
+            // behaviour, as (for instance) a poorly constructed string may
+            // smash the stack, throw an exception, but not abort.
+            // This is very effective at confusing debugging tools.
+            // We only throw GnashExceptions. A std::bad_alloc may also be
+            // reasonable, but anything else shouldn't be caught here.
+                       log_debug("Native function called as constructor threw 
exception: "
+                    "%s", ex.what());
+               }
+
+               if (ret.is_object()) newobj = ret.to_object();
+               else {
+                       log_debug("Native function called as constructor 
returned %s", ret);
+                       newobj = new as_object();
+               }
+
+               assert(newobj); // we assume builtin functions do return 
objects !!
+
+               // Add a __constructor__ member to the new object, but only for 
SWF6 up
+               // (to be checked). NOTE that we assume the builtin constructors
+               // won't set __constructor__ to some other value...
+               int flags = as_prop_flags::dontEnum | 
+                    as_prop_flags::onlySWF6Up; 
+
+               newobj->init_member(NSV::PROP_uuCONSTRUCTORuu, as_value(this), 
flags);
+
+        // Also for SWF5+ only?
+               if (swfversion < 7) {
+                       newobj->init_member(NSV::PROP_CONSTRUCTOR, 
as_value(this), flags);
+               }
+
+    }
+       else {
+               // Set up the prototype.
+               as_value proto;
+
+               // We can safely call as_object::get_member here as member name 
is 
+               // a literal string in lowercase. (we should likely avoid 
calling
+               // get_member as a whole actually, and use a getProto() or 
similar
+               // method directly instead) TODO
+               /*bool func_has_prototype=*/ get_member(NSV::PROP_PROTOTYPE, 
&proto);
+
+               // User could have dropped the prototype.
+               // see construct-properties-#.swf from swfdec testsuite
+
+               IF_VERBOSE_ACTION(
+            log_action(_("constructor prototype is %s"), proto);
+               );
+
+               // Create an empty object, with a ref to the constructor's 
prototype.
+               newobj = new as_object(proto.to_object());
+
+               // Add a __constructor__ member to the new object, but only for 
SWF6 up
+               // (to be checked)
+        // Can delete, hidden in swf5 
+               int flags = as_prop_flags::dontEnum | 
+                    as_prop_flags::onlySWF6Up; 
+
+               newobj->init_member(NSV::PROP_uuCONSTRUCTORuu, this, flags);
+
+               if (swfversion < 7) {
+                       newobj->init_member(NSV::PROP_CONSTRUCTOR, this, flags);
+               }
+
+               // Super is computed from the object we're constructing,
+               // It will work as long as we did set it's __proto__ and 
__constructor__
+               // properties already.
+               as_object* super = newobj->get_super();
+
+               // Call the actual constructor function; new_obj is its 'this'.
+
+               // We don't need the function result.
+               fn_call fn(newobj.get(), env, args, super);
+               call(fn);
+       }
+
+       if (!has_proto) set_member(NSV::PROP_PROTOTYPE, as_value(newobj));
+    
+       return newobj;
+}
+
+
 void
 function_class_init(as_object& global)
 {
@@ -194,8 +257,49 @@
                     as_prop_flags::dontDelete | 
                     as_prop_flags::onlySWF6Up;
        global.init_member("Function", func.get(), swf6flags);
-
-}
+}
+
+namespace {
+
+as_object*
+getFunctionPrototype()
+{
+       static boost::intrusive_ptr<as_object> proto;
+
+       if (proto.get() == NULL) {
+
+               // Initialize Function prototype
+               proto = new as_object();
+
+               // We initialize the __proto__ member separately, as 
getObjectInterface
+               // will end up calling getFunctionPrototype again and we want 
that
+               // call to return the still-not-completely-constructed 
prototype rather
+               // then create a new one. 
+               proto->set_prototype(getObjectInterface());
+
+               VM::get().addStatic(proto.get());
+
+               const int flags = as_prop_flags::dontDelete | 
+                          as_prop_flags::dontEnum | 
+                          as_prop_flags::onlySWF6Up; 
+
+               proto->init_member("apply", new 
builtin_function(function_apply),
+                flags);
+               proto->init_member("call", new builtin_function(function_call), 
flags);
+       }
+
+       return proto.get();
+
+}
+
+as_value
+function_ctor(const fn_call& /* fn */)
+{
+       boost::intrusive_ptr<as_object> func = 
+        new as_object(getFunctionPrototype());
+       return as_value(func.get());
+}
+
 
 as_value
 function_apply(const fn_call& fn)
@@ -340,119 +444,6 @@
 
 }
 
-boost::intrusive_ptr<as_object>
-as_function::constructInstance(const as_environment& env,
-       std::auto_ptr<std::vector<as_value> > args)
-{
-
-#ifndef GNASH_USE_GC
-       assert(get_ref_count() > 0);
-#endif // GNASH_USE_GC
-
-       int swfversion = env.getVM().getSWFVersion();
-
-       boost::intrusive_ptr<as_object> newobj;
-
-       as_value us;
-       
-    get_member(NSV::PROP_PROTOTYPE, &us);
-       
-    bool has_proto = !us.is_undefined();
-
-    // a built-in class takes care of assigning a prototype
-    // TODO: change this
-    if (isBuiltin()) {
-               IF_VERBOSE_ACTION (
-            log_action(_("it's a built-in class"));
-               )
-
-               fn_call fn(0, env, args);
-               as_value ret;
-
-               try {
-                       ret = call(fn);
-               }
-        catch (GnashException& ex) {
-            // Catching a std::exception here can mask all sorts of bad 
-            // behaviour, as (for instance) a poorly constructed string may
-            // smash the stack, throw an exception, but not abort.
-            // This is very effective at confusing debugging tools.
-            // We only throw GnashExceptions. A std::bad_alloc may also be
-            // reasonable, but anything else shouldn't be caught here.
-                       log_debug("Native function called as constructor threw 
exception: "
-                    "%s", ex.what());
-               }
-
-               if (ret.is_object()) newobj = ret.to_object();
-               else {
-                       log_debug("Native function called as constructor 
returned %s", ret);
-                       newobj = new as_object();
-               }
-
-               assert(newobj); // we assume builtin functions do return 
objects !!
-
-               // Add a __constructor__ member to the new object, but only for 
SWF6 up
-               // (to be checked). NOTE that we assume the builtin constructors
-               // won't set __constructor__ to some other value...
-               int flags = as_prop_flags::dontEnum | 
-                    as_prop_flags::onlySWF6Up; 
-
-               newobj->init_member(NSV::PROP_uuCONSTRUCTORuu, as_value(this), 
flags);
-
-        // Also for SWF5+ only?
-               if (swfversion < 7) {
-                       newobj->init_member(NSV::PROP_CONSTRUCTOR, 
as_value(this), flags);
-               }
-
-    }
-       else {
-               // Set up the prototype.
-               as_value proto;
-
-               // We can safely call as_object::get_member here as member name 
is 
-               // a literal string in lowercase. (we should likely avoid 
calling
-               // get_member as a whole actually, and use a getProto() or 
similar
-               // method directly instead) TODO
-               /*bool func_has_prototype=*/ get_member(NSV::PROP_PROTOTYPE, 
&proto);
-
-               // User could have dropped the prototype.
-               // see construct-properties-#.swf from swfdec testsuite
-
-               IF_VERBOSE_ACTION(
-            log_action(_("constructor prototype is %s"), proto);
-               );
-
-               // Create an empty object, with a ref to the constructor's 
prototype.
-               newobj = new as_object(proto.to_object());
-
-               // Add a __constructor__ member to the new object, but only for 
SWF6 up
-               // (to be checked)
-        // Can delete, hidden in swf5 
-               int flags = as_prop_flags::dontEnum | 
-                    as_prop_flags::onlySWF6Up; 
-
-               newobj->init_member(NSV::PROP_uuCONSTRUCTORuu, this, flags);
-
-               if (swfversion < 7) {
-                       newobj->init_member(NSV::PROP_CONSTRUCTOR, this, flags);
-               }
-
-               // Super is computed from the object we're constructing,
-               // It will work as long as we did set it's __proto__ and 
__constructor__
-               // properties already.
-               as_object* super = newobj->get_super();
-
-               // Call the actual constructor function; new_obj is its 'this'.
-
-               // We don't need the function result.
-               fn_call fn(newobj.get(), env, args, super);
-               call(fn);
-       }
-
-       if (!has_proto) set_member(NSV::PROP_PROTOTYPE, as_value(newobj));
-    
-       return newobj;
-}
-
-} // end of gnash namespace
+} // anonymous namespace
+} // gnash namespace
 

=== modified file 'libcore/as_function.h'
--- a/libcore/as_function.h     2009-04-01 07:00:32 +0000
+++ b/libcore/as_function.h     2009-04-23 12:49:08 +0000
@@ -33,11 +33,11 @@
 //
 /// In ActionScript, every Function is also a class.
 /// The *exported interface* of the class is defined
-/// as an 'prototype' member of the function object.
+/// as a 'prototype' member of the function object.
 ///
 /// Any instance of the class defined by this function will
 /// inherit any member of the class 'prototype'.
-/// To have an object inherit from a class you can set it's
+/// To have an object inherit from a class you can set its
 /// __proto__ member so to point to the class prototype, ie:
 ///
 ///   function MyClass() {}
@@ -56,9 +56,6 @@
 /// This class will automatically setup the 'prototype' member
 /// if not explicitly provided (ie: will set 'constructor' so
 /// that it points to the instance).
-/// 
-///
-///
 class as_function : public as_object
 {
 public:
@@ -70,7 +67,7 @@
        as_function* to_function() { return this; }
 
        /// Dispatch.
-       virtual as_value operator()(const fn_call& fn)=0;
+       virtual as_value operator()(const fn_call& fn) = 0;
 
        /// Alias for operator()
        as_value call(const fn_call& fn) { return operator()(fn); }
@@ -89,7 +86,7 @@
        ///     Arguments for the constructor invocation
        ///
        boost::intrusive_ptr<as_object> constructInstance(const as_environment& 
env,
-                       std::auto_ptr< std::vector<as_value> > args);
+                       std::auto_ptr<std::vector<as_value> > args);
 
        /// Get this function's "prototype" member (exported interface).
        ///
@@ -99,7 +96,7 @@
        void extends(as_function& superclass);
 
        /// Return true if this is a built-in class.
-       virtual bool isBuiltin()  { return false; }
+       virtual bool isBuiltin() { return false; }
 
        /// TODO: check if a user-defined 'toString'
        ///       will be used when available.
@@ -177,13 +174,7 @@
 /// Initialize the global Function constructor
 void function_class_init(as_object& global);
 
-// To be made statics instead
-as_value function_apply(const fn_call& fn);
-as_value function_call(const fn_call& fn);
-
-
-} // end of gnash namespace
-
-// _GNASH_AS_FUNCTION_H_
+} // gnash namespace
+
 #endif
 

=== modified file 'libcore/asobj/Color_as.cpp'
--- a/libcore/asobj/Color_as.cpp        2009-04-16 12:11:44 +0000
+++ b/libcore/asobj/Color_as.cpp        2009-04-22 11:55:09 +0000
@@ -77,7 +77,7 @@
        {
                if ( checkSprite() )
                {
-                       assert ( ! _sprite->isUnloaded() );
+                       assert ( ! _sprite->unloaded() );
                        _sprite->setReachable();
                }
                markAsObjectReachable();
@@ -111,7 +111,7 @@
        bool checkSprite() const
        {
                if ( ! _sprite ) return false;
-               if ( _sprite->isUnloaded() )
+               if ( _sprite->unloaded() )
                {
                        _sprite = 0;
                        return false;

=== modified file 'libcore/asobj/TextSnapshot_as.cpp'
--- a/libcore/asobj/TextSnapshot_as.cpp 2009-04-03 09:18:40 +0000
+++ b/libcore/asobj/TextSnapshot_as.cpp 2009-04-22 11:55:09 +0000
@@ -86,7 +86,7 @@
     void operator()(DisplayObject* ch) {
 
         /// This is not tested.
-        if (ch->isUnloaded()) return;
+        if (ch->unloaded()) return;
 
         TextSnapshot_as::Records text;
         StaticText* tf;

=== modified file 'libcore/asobj/flash/filters/BevelFilter_as.cpp'
--- a/libcore/asobj/flash/filters/BevelFilter_as.cpp    2009-04-16 14:42:17 
+0000
+++ b/libcore/asobj/flash/filters/BevelFilter_as.cpp    2009-04-22 16:48:21 
+0000
@@ -65,7 +65,7 @@
 as_object*
 BevelFilter_as::Interface() {
     if (BevelFilter_as::s_interface == NULL) {
-        BevelFilter_as::s_interface = new as_object (bitmapFilter_interface());
+        BevelFilter_as::s_interface = new as_object 
(getBitmapFilterInterface());
         VM::get().addStatic(BevelFilter_as::s_interface.get());
         BevelFilter_as::attachInterface(*BevelFilter_as::s_interface);
     }

=== modified file 'libcore/asobj/flash/filters/BitmapFilter_as.cpp'
--- a/libcore/asobj/flash/filters/BitmapFilter_as.cpp   2009-04-16 14:47:26 
+0000
+++ b/libcore/asobj/flash/filters/BitmapFilter_as.cpp   2009-04-23 07:16:23 
+0000
@@ -20,80 +20,80 @@
 #include "BitmapFilter.h"
 #include "VM.h"
 #include "builtin_function.h"
+#include "Object.h"
 
 namespace gnash {
 
+namespace {
+    
+    as_value bitmapfilter_ctor(const fn_call& fn);
+    as_value bitmapfilter_clone(const fn_call& fn);
+    as_value getBitmapFilterConstructor(const fn_call& fn);
+    void attachBitmapFilterInterface(as_object& o);
+}
+ 
+// TODO: Use composition, not inheritance.
 class BitmapFilter_as : public as_object, public BitmapFilter
 {
 public:
-    static as_value bitmap_clone(const fn_call& fn);
-
-    virtual boost::intrusive_ptr<as_object> clone();
-
     BitmapFilter_as(as_object *obj)
            :
         as_object(obj)
     {}
-    static as_object* Interface();
-    static void attachInterface(as_object& o);
-    static void attachProperties(as_object& o);
-    static void registerCtor(as_object& global);
-    static as_value ctor(const fn_call& fn);
-private:
-    static boost::intrusive_ptr<as_object> s_interface;
-    static boost::intrusive_ptr<builtin_function> s_ctor;
 };
 
-boost::intrusive_ptr<as_object> BitmapFilter_as::s_interface;
-boost:: intrusive_ptr<builtin_function> BitmapFilter_as::s_ctor;
+
+void
+BitmapFilter_class_init(as_object& global)
+{
+    string_table& st = global.getVM().getStringTable();
+    global.init_destructive_property(st.find("BitmapFilter"),
+            getBitmapFilterConstructor);
+}
 
 as_object*
-BitmapFilter_as::Interface() {
-    if (BitmapFilter_as::s_interface == NULL) {
-        BitmapFilter_as::s_interface = new as_object;
-        VM::get().addStatic(BitmapFilter_as::s_interface.get());
-        BitmapFilter_as::attachInterface(*BitmapFilter_as::s_interface);
+getBitmapFilterInterface()
+{
+    static as_object* o;
+    if (!o) {
+        o = new as_object(getObjectInterface());
+        VM::get().addStatic(o);
+        attachBitmapFilterInterface(*o);
     }
-    return BitmapFilter_as::s_interface.get();
-}
-
-void
-BitmapFilter_as::registerCtor(as_object& global) {
-    if (BitmapFilter_as::s_ctor != NULL) return;
-    BitmapFilter_as::s_ctor = new builtin_function(&BitmapFilter_as::ctor, 
BitmapFilter_as::Interface());
-    VM::get().addStatic(BitmapFilter_as::s_ctor.get());
-    BitmapFilter_as::attachInterface(*BitmapFilter_as::s_ctor);
-    global.init_member("BitmapFilter" , BitmapFilter_as::s_ctor.get());
-}
-
-void
-BitmapFilter_class_init(as_object& global) {
-    BitmapFilter_as::registerCtor(global);
-}
-
-void
-BitmapFilter_as::attachInterface(as_object& o)
-{
-    boost::intrusive_ptr<builtin_function> gs;
-    o.init_member("clone" , new builtin_function(bitmap_clone));
-}
-
-
-boost::intrusive_ptr<as_object> BitmapFilter_as::clone()
-{
-    boost::intrusive_ptr<as_object> o = new 
BitmapFilter_as(BitmapFilter_as::Interface());
     return o;
 }
 
-as_value
-BitmapFilter_as::ctor(const fn_call& )
-{
-    boost::intrusive_ptr<as_object> obj = new 
BitmapFilter_as(BitmapFilter_as::Interface());
+namespace {
+
+void
+attachBitmapFilterInterface(as_object& o)
+{
+    const int flags = 0;
+    o.init_member("clone", new builtin_function(bitmapfilter_clone), flags);
+}
+
+as_value
+getBitmapFilterConstructor(const fn_call& fn)
+{
+    static builtin_function* cl;
+    if (!cl) {
+        cl = new builtin_function(&bitmapfilter_ctor,
+                getBitmapFilterInterface());
+        fn.getVM().addStatic(cl);
+    }
+    return cl;
+}
+
+as_value
+bitmapfilter_ctor(const fn_call& /*fn*/)
+{
+    boost::intrusive_ptr<as_object> obj =
+        new BitmapFilter_as(getBitmapFilterInterface());
     return as_value(obj);
 }
 
 as_value
-BitmapFilter_as::bitmap_clone(const fn_call& fn)
+bitmapfilter_clone(const fn_call& fn)
 {
     boost::intrusive_ptr<BitmapFilter_as> to_copy = 
ensureType<BitmapFilter_as> (fn.this_ptr);
     boost::intrusive_ptr<BitmapFilter_as> filter = new 
BitmapFilter_as(*to_copy);
@@ -103,11 +103,5 @@
 
     return as_value(r);
 }
-
-as_object*
-bitmapFilter_interface()
-{
-    return BitmapFilter_as::Interface();
-}
-
-}
+} // anonymous namespace
+} // gnash namespace

=== modified file 'libcore/asobj/flash/filters/BitmapFilter_as.h'
--- a/libcore/asobj/flash/filters/BitmapFilter_as.h     2009-02-25 22:33:03 
+0000
+++ b/libcore/asobj/flash/filters/BitmapFilter_as.h     2009-04-22 16:48:21 
+0000
@@ -16,8 +16,8 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-#ifndef __GNASH_ASOBJ_BITMAPFILTER_H__
-#define __GNASH_ASOBJ_BITMAPFILTER_H__
+#ifndef GNASH_ASOBJ_BITMAPFILTER_H
+#define GNASH_ASOBJ_BITMAPFILTER_H
 
 #ifdef HAVE_CONFIG_H
 #include "gnashconfig.h"
@@ -31,26 +31,9 @@
 void BitmapFilter_class_init(as_object& global);
 
 /// Get the interface, for inheritance.
-as_object *bitmapFilter_interface();
+as_object *getBitmapFilterInterface();
 
 } // end of gnash namespace
 
-// __GNASH_ASOBJ_BITMAPFILTER_H__
 #endif
 
-#ifdef phelp_helper
-#ifndef easy_clone
-#define easy_clone(sp_name) \
-as_value \
-sp_name::bitmap_clone(const fn_call& fn) \
-{ \
-    boost::intrusive_ptr<sp_name> ptr = ensureType<sp_name>(fn.this_ptr); \
-    boost::intrusive_ptr<sp_name> obj = new sp_name(*ptr); \
-    boost::intrusive_ptr<as_object> r = obj; \
-    r->set_prototype(ptr->get_prototype()); \
-    r->copyProperties(*ptr); \
-\
-    return as_value(r); \
-}
-#endif /* easy_clone */
-#endif /* phelp_helper */

=== modified file 'libcore/asobj/flash/filters/BlurFilter_as.cpp'
--- a/libcore/asobj/flash/filters/BlurFilter_as.cpp     2009-04-16 14:56:56 
+0000
+++ b/libcore/asobj/flash/filters/BlurFilter_as.cpp     2009-04-22 16:48:21 
+0000
@@ -57,7 +57,7 @@
 as_object*
 BlurFilter_as::Interface() {
     if (BlurFilter_as::s_interface == NULL) {
-        BlurFilter_as::s_interface = new as_object(bitmapFilter_interface());
+        BlurFilter_as::s_interface = new as_object(getBitmapFilterInterface());
         VM::get().addStatic(BlurFilter_as::s_interface.get());
         BlurFilter_as::attachInterface(*BlurFilter_as::s_interface);
     }

=== modified file 'libcore/asobj/flash/filters/ColorMatrixFilter_as.cpp'
--- a/libcore/asobj/flash/filters/ColorMatrixFilter_as.cpp      2009-04-16 
15:16:22 +0000
+++ b/libcore/asobj/flash/filters/ColorMatrixFilter_as.cpp      2009-04-22 
16:48:21 +0000
@@ -51,7 +51,7 @@
 
 as_object* ColorMatrixFilter_as::Interface() {
     if (ColorMatrixFilter_as::s_interface == NULL) {
-        ColorMatrixFilter_as::s_interface = new as_object 
(bitmapFilter_interface());
+        ColorMatrixFilter_as::s_interface = new as_object 
(getBitmapFilterInterface());
         VM::get().addStatic(ColorMatrixFilter_as::s_interface.get());
         
ColorMatrixFilter_as::attachInterface(*ColorMatrixFilter_as::s_interface);
     }

=== modified file 'libcore/asobj/flash/filters/ConvolutionFilter_as.cpp'
--- a/libcore/asobj/flash/filters/ConvolutionFilter_as.cpp      2009-04-16 
14:32:04 +0000
+++ b/libcore/asobj/flash/filters/ConvolutionFilter_as.cpp      2009-04-23 
07:16:23 +0000
@@ -20,232 +20,204 @@
 #include "ConvolutionFilter.h"
 #include "VM.h"
 #include "builtin_function.h"
-
+#include "Object.h"
 #include "BitmapFilter_as.h"
 
 namespace gnash {
 
+namespace {
+    
+    as_value convolutionfilter_ctor(const fn_call& fn);
+    as_value convolutionfilter_clone(const fn_call& fn);
+    as_value getConvolutionFilterConstructor(const fn_call& fn);
+    as_value convolutionfilter_matrixX(const fn_call& fn);
+    as_value convolutionfilter_matrixY(const fn_call& fn);
+    as_value convolutionfilter_matrix(const fn_call& fn);
+    as_value convolutionfilter_divisor(const fn_call& fn);
+    as_value convolutionfilter_bias(const fn_call& fn);
+    as_value convolutionfilter_preserveAlpha(const fn_call& fn);
+    as_value convolutionfilter_clamp(const fn_call& fn);
+    as_value convolutionfilter_color(const fn_call& fn);
+    as_value convolutionfilter_alpha(const fn_call& fn);
+
+    void attachConvolutionFilterInterface(as_object& o);
+}
+ 
+// TODO: Use composition, not inheritance.
 class ConvolutionFilter_as : public as_object, public ConvolutionFilter
 {
 public:
-    static as_value matrixX_gs(const fn_call& fn);
-    static as_value matrixY_gs(const fn_call& fn);
-    static as_value matrix_gs(const fn_call& fn);
-    static as_value divisor_gs(const fn_call& fn);
-    static as_value bias_gs(const fn_call& fn);
-    static as_value preserveAlpha_gs(const fn_call& fn);
-    static as_value clamp_gs(const fn_call& fn);
-    static as_value color_gs(const fn_call& fn);
-    static as_value alpha_gs(const fn_call& fn);
-    static as_value bitmap_clone(const fn_call& fn);
-
     ConvolutionFilter_as(as_object *obj)
-        :
+           :
         as_object(obj)
-    {
-    }
-
-    static as_object* Interface();
-    static void attachInterface(as_object& o);
-    static void attachProperties(as_object& o);
-    static void registerCtor(as_object& global);
-    static as_value ctor(const fn_call& fn);
-private:
-static boost::intrusive_ptr<as_object> s_interface;
-static boost::intrusive_ptr<builtin_function> s_ctor;
+    {}
 
 };
 
-boost::intrusive_ptr<as_object> ConvolutionFilter_as::s_interface;
 
-boost::intrusive_ptr<builtin_function> ConvolutionFilter_as::s_ctor;
+void
+ConvolutionFilter_class_init(as_object& global)
+{
+    string_table& st = global.getVM().getStringTable();
+    global.init_destructive_property(st.find("ConvolutionFilter"),
+            getConvolutionFilterConstructor);
+}
 
 as_object*
-ConvolutionFilter_as::Interface()
-{
-    if (ConvolutionFilter_as::s_interface == NULL) {
-        ConvolutionFilter_as::s_interface = new as_object 
(bitmapFilter_interface());
-         VM::get().addStatic(ConvolutionFilter_as::s_interface.get());
-         
ConvolutionFilter_as::attachInterface(*ConvolutionFilter_as::s_interface);
-    }
-    return ConvolutionFilter_as::s_interface.get();
-}
-
-void
-ConvolutionFilter_as::registerCtor(as_object& global)
-{
-    if (ConvolutionFilter_as::s_ctor != NULL) return;
-    ConvolutionFilter_as::s_ctor = new 
builtin_function(&ConvolutionFilter_as::ctor, 
ConvolutionFilter_as::Interface());
-    VM::get().addStatic(ConvolutionFilter_as::s_ctor.get());
-    ConvolutionFilter_as::attachInterface(*ConvolutionFilter_as::s_ctor);
-    global.init_member("ConvolutionFilter" , 
ConvolutionFilter_as::s_ctor.get());
-}
-
-void
-ConvolutionFilter_class_init(as_object& global)
-{
-    ConvolutionFilter_as::registerCtor(global);
-}
-
-void
-ConvolutionFilter_as::attachInterface(as_object& o)
-{
-    boost::intrusive_ptr<builtin_function> gs;
-    o.set_member(VM::get().getStringTable().find("clone"), new 
builtin_function(bitmap_clone));
-}
-
-void
-ConvolutionFilter_as::attachProperties(as_object& o) {
-    boost::intrusive_ptr<builtin_function> gs;
-
-    gs = new builtin_function(ConvolutionFilter_as::matrixX_gs, NULL);
-    o.init_property("matrixX" , *gs, *gs);
-
-    gs = new builtin_function(ConvolutionFilter_as::matrixY_gs, NULL);
-    o.init_property("matrixY" , *gs, *gs);
-
-    gs = new builtin_function(ConvolutionFilter_as::matrix_gs, NULL);
-    o.init_property("matrix" , *gs, *gs);
-
-    gs = new builtin_function(ConvolutionFilter_as::divisor_gs, NULL);
-    o.init_property("divisor" , *gs, *gs);
-
-    gs = new builtin_function(ConvolutionFilter_as::bias_gs, NULL);
-    o.init_property("bias" , *gs, *gs);
-
-    gs = new builtin_function(ConvolutionFilter_as::preserveAlpha_gs, NULL);
-    o.init_property("preserveAlpha" , *gs, *gs);
-
-    gs = new builtin_function(ConvolutionFilter_as::clamp_gs, NULL);
-    o.init_property("clamp" , *gs, *gs);
-
-    gs = new builtin_function(ConvolutionFilter_as::color_gs, NULL);
-    o.init_property("color" , *gs, *gs);
-
-    gs = new builtin_function(ConvolutionFilter_as::alpha_gs, NULL);
-    o.init_property("alpha" , *gs, *gs);
-
-}
-
-as_value
-ConvolutionFilter_as::matrixX_gs(const fn_call& fn)
-{
-       boost::intrusive_ptr<ConvolutionFilter_as> ptr = 
ensureType<ConvolutionFilter_as>(fn.this_ptr);
-    if (fn.nargs == 0) {
-        return as_value(ptr->_matrixX );
-    }
-    boost::uint8_t sp_matrixX = fn.arg(0).to_number<boost::uint8_t> ();
-    ptr->_matrixX = sp_matrixX;
-    return as_value();
-}
-
-as_value
-ConvolutionFilter_as::matrixY_gs(const fn_call& fn)
-{
-       boost::intrusive_ptr<ConvolutionFilter_as> ptr = 
ensureType<ConvolutionFilter_as>(fn.this_ptr);
-    if (fn.nargs == 0) {
-        return as_value(ptr->_matrixY );
-    }
-    boost::uint8_t sp_matrixY = fn.arg(0).to_number<boost::uint8_t> ();
-    ptr->_matrixY = sp_matrixY;
-    return as_value();
-}
-
-as_value
-ConvolutionFilter_as::divisor_gs(const fn_call& fn)
-{
-       boost::intrusive_ptr<ConvolutionFilter_as> ptr = 
ensureType<ConvolutionFilter_as>(fn.this_ptr);
-    if (fn.nargs == 0) {
-        return as_value(ptr->_divisor );
-    }
-    float sp_divisor = fn.arg(0).to_number<float> ();
-    ptr->_divisor = sp_divisor;
-    return as_value();
-}
-
-as_value
-ConvolutionFilter_as::bias_gs(const fn_call& fn)
-{
-       boost::intrusive_ptr<ConvolutionFilter_as> ptr = 
ensureType<ConvolutionFilter_as>(fn.this_ptr);
-    if (fn.nargs == 0) { return as_value(ptr->_bias );
-    }
-    float sp_bias = fn.arg(0).to_number<float> ();
-    ptr->_bias = sp_bias;
-    return as_value();
-}
-
-as_value
-ConvolutionFilter_as::preserveAlpha_gs(const fn_call& fn)
-{
-       boost::intrusive_ptr<ConvolutionFilter_as> ptr = 
ensureType<ConvolutionFilter_as>(fn.this_ptr);
-    if (fn.nargs == 0) {
-        return as_value(ptr->_preserveAlpha);
-    }
-    bool sp_preserveAlpha = fn.arg(0).to_bool();
-    ptr->_preserveAlpha = sp_preserveAlpha;
-    return as_value();
-}
-
-as_value
-ConvolutionFilter_as::clamp_gs(const fn_call& fn)
-{
-       boost::intrusive_ptr<ConvolutionFilter_as> ptr = 
ensureType<ConvolutionFilter_as>(fn.this_ptr);
-    if (fn.nargs == 0) {
-        return as_value(ptr->_clamp );
-    }
-    bool sp_clamp = fn.arg(0).to_bool ();
-    ptr->_clamp = sp_clamp;
-    return as_value();
-}
-
-as_value
-ConvolutionFilter_as::color_gs(const fn_call& fn)
-{
-       boost::intrusive_ptr<ConvolutionFilter_as> ptr = 
ensureType<ConvolutionFilter_as>(fn.this_ptr);
-    if (fn.nargs == 0) {
-        return as_value(ptr->_color );
-    } 
-    boost::uint32_t sp_color = fn.arg(0).to_number<boost::uint32_t> ();
-    ptr->_color = sp_color;
-    return as_value();
-}
-
-as_value
-ConvolutionFilter_as::alpha_gs(const fn_call& fn)
-{
-       boost::intrusive_ptr<ConvolutionFilter_as> ptr = 
ensureType<ConvolutionFilter_as>(fn.this_ptr);
-    if (fn.nargs == 0) {
-        return as_value(ptr->_alpha );
-    }
-    boost::uint8_t sp_alpha = fn.arg(0).to_number<boost::uint8_t> ();
-    ptr->_alpha = sp_alpha;
-    return as_value();
-}
-
-as_value
-ConvolutionFilter_as::matrix_gs(const fn_call& fn)
-{
-       boost::intrusive_ptr<ConvolutionFilter_as> ptr = 
ensureType<ConvolutionFilter_as>(fn.this_ptr);
-    return as_value();
-}
-
-as_value
-ConvolutionFilter_as::bitmap_clone(const fn_call& fn)
-{
-       boost::intrusive_ptr<ConvolutionFilter_as> ptr = 
ensureType<ConvolutionFilter_as>(fn.this_ptr);
-    boost::intrusive_ptr<ConvolutionFilter_as> obj = new 
ConvolutionFilter_as(*ptr);
-    boost::intrusive_ptr<as_object> r = obj;
-    r->set_prototype(ptr->get_prototype());
-    r->copyProperties(*ptr);
-    return as_value(r);
-}
-
-as_value
-ConvolutionFilter_as::ctor(const fn_call& )
-{
-    boost::intrusive_ptr<as_object> obj = new 
ConvolutionFilter_as(ConvolutionFilter_as::Interface());
-    ConvolutionFilter_as::attachProperties(*obj);
-    return as_value(obj.get());
-}
-
-}
+getConvolutionFilterInterface()
+{
+    static as_object* o;
+    if (!o) {
+        o = new as_object(getBitmapFilterInterface());
+        VM::get().addStatic(o);
+        attachConvolutionFilterInterface(*o);
+    }
+    return o;
+}
+
+namespace {
+
+void
+attachConvolutionFilterInterface(as_object& o)
+{
+    const int flags = 0;
+    o.init_property("matrixX" , convolutionfilter_matrixX,
+            convolutionfilter_matrixX, flags);
+    o.init_property("divisor" , convolutionfilter_divisor,
+            convolutionfilter_divisor, flags);
+    o.init_property("matrix" , convolutionfilter_matrix,
+            convolutionfilter_matrix, flags);
+    o.init_property("matrixY" , convolutionfilter_matrixY,
+            convolutionfilter_matrixY, flags);
+    o.init_property("alpha" , convolutionfilter_alpha,
+            convolutionfilter_alpha, flags);
+    o.init_property("clamp" , convolutionfilter_clamp,
+            convolutionfilter_clamp, flags);
+    o.init_property("preserveAlpha" , convolutionfilter_preserveAlpha,
+            convolutionfilter_preserveAlpha, flags);
+    o.init_property("bias" , convolutionfilter_bias,
+            convolutionfilter_bias, flags);
+    o.init_property("color" , convolutionfilter_color,
+            convolutionfilter_color, flags);
+}
+
+as_value
+getConvolutionFilterConstructor(const fn_call& fn)
+{
+    static builtin_function* cl;
+    if (!cl) {
+        cl = new builtin_function(&convolutionfilter_ctor,
+                getConvolutionFilterInterface());
+        fn.getVM().addStatic(cl);
+    }
+    return cl;
+}
+
+as_value
+convolutionfilter_ctor(const fn_call& /*fn*/)
+{
+    boost::intrusive_ptr<as_object> obj =
+        new ConvolutionFilter_as(getConvolutionFilterInterface());
+    return as_value(obj);
+}
+
+as_value
+convolutionfilter_matrixX(const fn_call& fn)
+{
+    // TODO: check whether this is necessary (probably is).
+       boost::intrusive_ptr<ConvolutionFilter_as> ptr =
+        ensureType<ConvolutionFilter_as>(fn.this_ptr);
+    UNUSED(ptr);
+    log_unimpl(__PRETTY_FUNCTION__);
+    return as_value();
+}
+
+as_value
+convolutionfilter_matrixY(const fn_call& fn)
+{
+       boost::intrusive_ptr<ConvolutionFilter_as> ptr =
+        ensureType<ConvolutionFilter_as>(fn.this_ptr);
+    UNUSED(ptr);
+    log_unimpl(__PRETTY_FUNCTION__);
+    return as_value();
+}
+
+as_value
+convolutionfilter_divisor(const fn_call& fn)
+{
+    // TODO: check whether this is necessary (probably is).
+       boost::intrusive_ptr<ConvolutionFilter_as> ptr =
+        ensureType<ConvolutionFilter_as>(fn.this_ptr);
+    UNUSED(ptr);
+    log_unimpl(__PRETTY_FUNCTION__);
+    return as_value();
+}
+
+as_value
+convolutionfilter_bias(const fn_call& fn)
+{
+    // TODO: check whether this is necessary (probably is).
+       boost::intrusive_ptr<ConvolutionFilter_as> ptr =
+        ensureType<ConvolutionFilter_as>(fn.this_ptr);
+    UNUSED(ptr);
+    log_unimpl(__PRETTY_FUNCTION__);
+    return as_value();
+}
+
+as_value
+convolutionfilter_preserveAlpha(const fn_call& fn)
+{
+    // TODO: check whether this is necessary (probably is).
+       boost::intrusive_ptr<ConvolutionFilter_as> ptr =
+        ensureType<ConvolutionFilter_as>(fn.this_ptr);
+    UNUSED(ptr);
+    log_unimpl(__PRETTY_FUNCTION__);
+    return as_value();
+}
+
+as_value
+convolutionfilter_clamp(const fn_call& fn)
+{
+    // TODO: check whether this is necessary (probably is).
+       boost::intrusive_ptr<ConvolutionFilter_as> ptr =
+        ensureType<ConvolutionFilter_as>(fn.this_ptr);
+    UNUSED(ptr);
+    log_unimpl(__PRETTY_FUNCTION__);
+    return as_value();
+}
+
+as_value
+convolutionfilter_color(const fn_call& fn)
+{
+    // TODO: check whether this is necessary (probably is).
+       boost::intrusive_ptr<ConvolutionFilter_as> ptr =
+        ensureType<ConvolutionFilter_as>(fn.this_ptr);
+    UNUSED(ptr);
+    log_unimpl(__PRETTY_FUNCTION__);
+    return as_value();
+}
+
+as_value
+convolutionfilter_alpha(const fn_call& fn)
+{
+    // TODO: check whether this is necessary (probably is).
+       boost::intrusive_ptr<ConvolutionFilter_as> ptr =
+        ensureType<ConvolutionFilter_as>(fn.this_ptr);
+    UNUSED(ptr);
+    log_unimpl(__PRETTY_FUNCTION__);
+    return as_value();
+}
+
+as_value
+convolutionfilter_matrix(const fn_call& fn)
+{
+    // TODO: check whether this is necessary (probably is).
+       boost::intrusive_ptr<ConvolutionFilter_as> ptr =
+        ensureType<ConvolutionFilter_as>(fn.this_ptr);
+    UNUSED(ptr);
+    log_unimpl(__PRETTY_FUNCTION__);
+    return as_value();
+}
+
+} // anonymous namespace
+} // namespace gnash

=== modified file 'libcore/asobj/flash/filters/DropShadowFilter_as.cpp'
--- a/libcore/asobj/flash/filters/DropShadowFilter_as.cpp       2009-04-16 
16:56:54 +0000
+++ b/libcore/asobj/flash/filters/DropShadowFilter_as.cpp       2009-04-22 
16:48:21 +0000
@@ -66,7 +66,7 @@
 as_object*
 DropShadowFilter_as::Interface() {
     if (DropShadowFilter_as::s_interface == NULL) {
-        DropShadowFilter_as::s_interface = new as_object 
(bitmapFilter_interface());
+        DropShadowFilter_as::s_interface = new as_object 
(getBitmapFilterInterface());
     VM::get().addStatic(DropShadowFilter_as::s_interface.get());
     DropShadowFilter_as::attachInterface(*DropShadowFilter_as::s_interface);
     }

=== modified file 'libcore/asobj/flash/filters/GlowFilter_as.cpp'
--- a/libcore/asobj/flash/filters/GlowFilter_as.cpp     2009-04-16 16:16:43 
+0000
+++ b/libcore/asobj/flash/filters/GlowFilter_as.cpp     2009-04-22 16:48:21 
+0000
@@ -69,7 +69,7 @@
 as_object*
 GlowFilter_as::Interface() {
     if (GlowFilter_as::s_interface == NULL) {
-        GlowFilter_as::s_interface = new as_object (bitmapFilter_interface());
+        GlowFilter_as::s_interface = new as_object 
(getBitmapFilterInterface());
         VM::get().addStatic(GlowFilter_as::s_interface.get());
         GlowFilter_as::attachInterface(*GlowFilter_as::s_interface);
     }

=== modified file 'libcore/asobj/flash/filters/GradientBevelFilter_as.cpp'
--- a/libcore/asobj/flash/filters/GradientBevelFilter_as.cpp    2009-04-16 
15:27:36 +0000
+++ b/libcore/asobj/flash/filters/GradientBevelFilter_as.cpp    2009-04-22 
16:48:21 +0000
@@ -64,7 +64,7 @@
 as_object*
 GradientBevelFilter_as::Interface() {
     if (GradientBevelFilter_as::s_interface == NULL) {
-        GradientBevelFilter_as::s_interface = new as_object 
(bitmapFilter_interface());
+        GradientBevelFilter_as::s_interface = new as_object 
(getBitmapFilterInterface());
         VM::get().addStatic(GradientBevelFilter_as::s_interface.get());
         
GradientBevelFilter_as::attachInterface(*GradientBevelFilter_as::s_interface);
     }

=== modified file 'libcore/asobj/flash/filters/GradientGlowFilter_as.cpp'
--- a/libcore/asobj/flash/filters/GradientGlowFilter_as.cpp     2009-04-16 
15:06:59 +0000
+++ b/libcore/asobj/flash/filters/GradientGlowFilter_as.cpp     2009-04-22 
16:48:21 +0000
@@ -66,7 +66,7 @@
 GradientGlowFilter_as::Interface()
 {
     if (GradientGlowFilter_as::s_interface == NULL) {
-        GradientGlowFilter_as::s_interface = new as_object 
(bitmapFilter_interface());
+        GradientGlowFilter_as::s_interface = new as_object 
(getBitmapFilterInterface());
         VM::get().addStatic(GradientGlowFilter_as::s_interface.get());
         
GradientGlowFilter_as::attachInterface(*GradientGlowFilter_as::s_interface);
     }

=== modified file 'libcore/movie_root.cpp'
--- a/libcore/movie_root.cpp    2009-04-15 05:33:51 +0000
+++ b/libcore/movie_root.cpp    2009-04-22 11:55:09 +0000
@@ -932,7 +932,7 @@
        DisplayObject* dragChar = getDraggingCharacter(); 
        if ( ! dragChar ) return; // nothing to do
 
-       if ( dragChar->isUnloaded() )
+       if ( dragChar->unloaded() )
        {
                // Reset drag state if dragging char was unloaded
                m_drag_state.reset();
@@ -1169,7 +1169,7 @@
       for (CharacterList::iterator iter = ll.begin(); iter != ll.end(); )
       {
           DisplayObject* const ch = *iter;
-          if ( ch->isUnloaded() )
+          if ( ch->unloaded() )
           {
             if ( ! ch->isDestroyed() )
             {
@@ -1206,7 +1206,7 @@
        {
                // sprite, button & input_edit_text DisplayObjects
                DisplayObject* const ch = *iter;
-               if ( ! ch->isUnloaded() )
+               if ( ! ch->unloaded() )
                {
                        if(down)
                        {
@@ -1259,7 +1259,7 @@
                        iter != itEnd; ++iter)
        {
                DisplayObject* const ch = *iter;
-               if (!ch->isUnloaded())
+               if (!ch->unloaded())
                {
                        ch->on_event(event);
                }
@@ -1986,7 +1986,7 @@
                for (LiveChars::iterator i=_liveChars.begin(), 
e=_liveChars.end(); i!=e;)
                {
                        DisplayObject* ch = *i;
-                       if ( ch->isUnloaded() )
+                       if ( ch->unloaded() )
                        {
                                // the sprite might have been destroyed already
                                // by effect of an unload() call with no 
onUnload
@@ -2037,7 +2037,7 @@
 void
 movie_root::advanceLiveChar(boost::intrusive_ptr<DisplayObject> ch)
 {
-       if (!ch->isUnloaded())
+       if (!ch->unloaded())
        {
 #ifdef GNASH_DEBUG
                log_debug("    advancing DisplayObject %s", ch->getTarget());

=== modified file 'libcore/swf_function.cpp'
--- a/libcore/swf_function.cpp  2009-04-03 09:48:13 +0000
+++ b/libcore/swf_function.cpp  2009-04-22 15:17:57 +0000
@@ -291,7 +291,7 @@
                        if ( tgtch )
                        {
                                // NOTE: _lockroot will be hanlded by 
getAsRoot()
-                               as_object* r = 
const_cast<MovieClip*>(tgtch->getAsRoot());
+                               as_object* r = tgtch->getAsRoot();
                                our_env->setRegister(current_reg, as_value(r));
                                current_reg++;
                        }

=== modified file 'libcore/vm/ActionExec.cpp'
--- a/libcore/vm/ActionExec.cpp 2009-04-03 09:18:40 +0000
+++ b/libcore/vm/ActionExec.cpp 2009-04-22 11:55:09 +0000
@@ -298,7 +298,7 @@
             DisplayObject* guardedChar = env.get_target();
 #endif
 
-            if ( _abortOnUnload && guardedChar && guardedChar->isUnloaded() )
+            if ( _abortOnUnload && guardedChar && guardedChar->unloaded() )
             // action_execution_order_test8.c shows that the opcode guard is 
not SWF version based (TODO: automate it!)
             {
                 std::stringstream ss;

=== modified file 'libcore/vm/ExecutableCode.h'
--- a/libcore/vm/ExecutableCode.h       2009-04-03 09:18:40 +0000
+++ b/libcore/vm/ExecutableCode.h       2009-04-22 11:55:09 +0000
@@ -67,7 +67,7 @@
 
     virtual void execute()
     {
-        if ( ! target->isUnloaded() )
+        if ( ! target->unloaded() )
         {
             ActionExec exec(buffer, target->get_environment());
             exec();
@@ -143,7 +143,8 @@
         for (BufferList::iterator it=_buffers.begin(), itEnd=_buffers.end();
                 it != itEnd; ++it)
         {
-            // onClipEvents code are guarded by isDestroyed(), still might be 
also guarded by isUnloaded()
+            // onClipEvents code are guarded by isDestroyed(),
+            // still might be also guarded by unloaded()
             if( _target->isDestroyed() )  break;
 
             ActionExec exec(*(*it), _target->get_environment(), false);

=== modified file 'testsuite/swfdec/PASSING'
--- a/testsuite/swfdec/PASSING  2009-03-04 18:28:12 +0000
+++ b/testsuite/swfdec/PASSING  2009-04-23 15:51:18 +0000
@@ -107,6 +107,9 @@
 bitmapdata-getters-8.swf:2fd651b565796622a06accb8d958cf71
 bitmap-filter-properties-5.swf:62973bfcdf9f1fd383440fabcbfebca9
 bitmap-filter-properties-5.swf:d69ea38322111b3626c6b9577838674f
+bitmap-filter-properties-6.swf:b825fdee4983181b18b9ab39928735e6
+bitmap-filter-properties-7.swf:99fd7b00846cde242fee873f9fdcd506
+bitmap-filter-properties-8.swf:6e0c27125368ed34099191dd1bffc568
 bitwise-5.swf:98475055aae4796a066e7728d5a7a944
 bitwise-6.swf:ef818f643cc14a4cc57248473e05a48c
 bitwise-7.swf:c18505cd0d075c512d15b6d96ab221d0


reply via email to

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