gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r12287: Drop some odd and incorrect


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r12287: Drop some odd and incorrect things from core code that were intended to get
Date: Fri, 09 Jul 2010 20:19:40 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 12287 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Fri 2010-07-09 20:19:40 +0200
message:
  Drop some odd and incorrect things from core code that were intended to get
  AVM2 working without doing it properly.
modified:
  libcore/ClassHierarchy.cpp
  libcore/ClassHierarchy.h
  libcore/ObjectURI.h
  libcore/PropFlags.h
  libcore/Property.cpp
  libcore/Property.h
  libcore/PropertyList.cpp
  libcore/PropertyList.h
  libcore/as_object.cpp
  libcore/as_object.h
  libcore/asobj/Globals.cpp
  libcore/asobj/System_as.cpp
  libcore/asobj/flash/display/display_pkg.cpp
  libcore/asobj/flash/external/external_pkg.cpp
  libcore/asobj/flash/filters/filters_pkg.cpp
  libcore/asobj/flash/flash_pkg.cpp
  libcore/asobj/flash/geom/geom_pkg.cpp
  libcore/asobj/flash/net/net_pkg.cpp
  libcore/asobj/flash/text/text_pkg.cpp
=== modified file 'libcore/ClassHierarchy.cpp'
--- a/libcore/ClassHierarchy.cpp        2010-07-09 05:18:06 +0000
+++ b/libcore/ClassHierarchy.cpp        2010-07-09 10:57:44 +0000
@@ -82,31 +82,6 @@
         string_table& st = getStringTable(fn);
         log_debug("Loading extension class %s", st.value(getName(_decl.uri)));
 
-        as_value super;
-        if (getName(_decl.super))
-        {
-            // Check to be sure our super exists.
-            // This will trigger its instantiation if necessary.
-            if (!mTarget->get_member(_decl.super, &super)) {
-                // Error here -- doesn't exist.
-                log_error("Can't find %s.%s (Superclass of %s.%s)",
-                    st.value(getNamespace(_decl.super)),
-                    st.value(getName(_decl.super)),
-                    st.value(getNamespace(_decl.uri)),
-                    st.value(getName(_decl.uri)));
-                super.set_undefined();
-                return super;
-            }
-            if (!super.is_function())
-            {
-                // Error here -- not an object.
-                log_error("%s (Superclass of %s) is not a function (%s)",
-                    st.value(getName(_decl.super)),
-                    st.value(getName(_decl.uri)), super);
-                super.set_undefined();
-                return super;
-            }
-        }
         if (mExtension->initModuleWithFunc(_decl.file_name,
             _decl.init_name, *mTarget))
         {
@@ -117,8 +92,7 @@
         }
         // Error here -- not successful in loading.
         log_error("Could not load class %s", st.value(getName(_decl.uri)));
-        super.set_undefined();
-        return super;
+        return as_value();
     }
 };
 
@@ -146,36 +120,7 @@
         // Successfully loaded it, now find it, set its proto, and return.
         as_value us;
         if (mTarget->get_member(_decl.uri, &us)) {
-
-            as_value super;
-            if (getName(_decl.super))
-            {
-                // Check to be sure our super exists.
-                // This will trigger its instantiation if necessary.
-                if (!mTarget->get_member(_decl.super, &super)) {
-                    // Error here -- doesn't exist.
-                    log_error("Can't find %s.%s (Superclass of %s.%s)",
-                        st.value(getNamespace(_decl.super)),
-                        st.value(getName(_decl.super)),
-                        st.value(getNamespace(_decl.uri)),
-                        st.value(getName(_decl.uri)));
-                    super.set_undefined();
-                    return super;
-                }
-                if (!super.is_function())
-                {
-                    // Error here -- not an object.
-                    log_error("%s (Superclass of %s) is not a function (%s)",
-                        st.value(getName(_decl.super)),
-                        st.value(getName(_decl.uri)), super);
-                    super.set_undefined();
-                    return super;
-                }
-                assert(super.to_function());
-            }
-
             Global_as& gl = getGlobal(fn);
-
             if (!us.to_object(gl)) {
                 log_error("Native class %s is not an object after "
                         "initialization (%s)",
@@ -249,8 +194,6 @@
 
     os << "("
         << " name:" << st.value(getName(c.uri))
-        << " super:" << st.value(getName(c.super))
-        << " namespace:" << st.value(getNamespace(c.uri))
         << " version:" << c.version
         << ")";
 
@@ -265,8 +208,6 @@
     os << "(file:" << c.file_name
         << " init:" << c.init_name
         << " name:" << st.value(getName(c.uri))
-        << " super:" << st.value(getName(c.super))
-        << " namespace:" << st.value(getNamespace(c.uri))
         << " version:" << c.version
         << ")";
 

=== modified file 'libcore/ClassHierarchy.h'
--- a/libcore/ClassHierarchy.h  2010-07-09 05:18:06 +0000
+++ b/libcore/ClassHierarchy.h  2010-07-09 10:57:44 +0000
@@ -64,7 +64,6 @@
                std::string init_name;
 
         const ObjectURI uri;
-        const ObjectURI super;
 
                /// The version at which this should be added.
                int version;
@@ -76,12 +75,10 @@
         /// The type of function to use for initialization
                typedef void (*InitFunc)(as_object& obj, const ObjectURI& uri);
 
-        NativeClass(InitFunc init, const ObjectURI& u, const ObjectURI& s,
-                int ver)
+        NativeClass(InitFunc init, const ObjectURI& u, int ver)
             :
             initializer(init),
             uri(u),
-            super(s),
             version(ver)
         {}
 
@@ -93,9 +90,6 @@
                /// The name of the class.
                const ObjectURI uri;
 
-               /// The name of the inherited class.
-               const ObjectURI super;
-
                /// The version at which this should be visible.
                int version;
        };

=== modified file 'libcore/ObjectURI.h'
--- a/libcore/ObjectURI.h       2010-06-05 10:19:45 +0000
+++ b/libcore/ObjectURI.h       2010-07-09 10:57:44 +0000
@@ -5,9 +5,6 @@
 #include "string_table.h"
 #include <string>
 #include <ostream>
-/// Define this for verbose logging of ObjectURIs
-//#define FULL_OBJECT_URI_LOGGING 1
-
 
 namespace gnash {
 
@@ -21,30 +18,26 @@
     class Logger;
 
     /// Construct an ObjectURI from name and namespace.
-    ObjectURI(string_table::key name, string_table::key ns = 0)
+    ObjectURI(string_table::key name)
         :
-        name(name),
-        ns(ns)
+        name(name)
     {}
 
     string_table::key name;
-    string_table::key ns;
-
 };
 
-/// ObjectURIs are equal if both name and namespace are equal.
+/// ObjectURIs are equal if name is equal
 inline bool
 operator==(const ObjectURI& a, const ObjectURI& b)
 {
-    return a.name == b.name && a.ns == b.ns;
+    return a.name == b.name;
 }
 
 /// Comparator for ObjectURI so it can serve as a key in stdlib containers.
 inline bool
 operator<(const ObjectURI& a, const ObjectURI& b)
 {
-    if (a.name < b.name) return true;
-    return (a.name == b.name) && a.ns < b.ns;
+    return a.name < b.name;
 }
 
 /// Get the name element of an ObjectURI
@@ -54,34 +47,14 @@
     return o.name;
 }
 
-/// Get the namespace element of an ObjectURI
-inline string_table::key
-getNamespace(const ObjectURI& o)
-{
-    return o.ns;
-}
-
 class ObjectURI::Logger
 {
 public:
     Logger(string_table& st) : _st(st) {}
 
     std::string operator()(const ObjectURI& uri) const {
-
-#ifdef FULL_OBJECT_URI_LOGGING
-        const string_table::key ns = getNamespace(uri);
-        const string_table::key name = getName(uri);
-
-        boost::format f = boost::format("URI: property %1%(%2%) in namespace "
-               " %3%(%4%)") % _st.value(name) % name % _st.value(ns) % ns;
-        return f.str();
-#else
-        const string_table::key ns = getNamespace(uri);
-        const string_table::key name = getName(uri);
-        if (ns) return _st.value(ns) + "." + _st.value(name);
+        const string_table::key name = getName(uri);
         return _st.value(name);
-#endif
-
     }
 private:
     string_table& _st;

=== modified file 'libcore/PropFlags.h'
--- a/libcore/PropFlags.h       2010-01-11 06:41:38 +0000
+++ b/libcore/PropFlags.h       2010-07-09 10:03:54 +0000
@@ -47,9 +47,6 @@
                /// Protect from assigning a value
                readOnly        = 1 << 2, // 4
 
-               /// Property is static -- assignments change, not override.
-               staticProp      = 1 << 3, // 8
-
                /// Flags are protected from changes
                isProtected     = 1 << 4, // 16
 
@@ -101,18 +98,6 @@
                return ( _flags != o._flags );
        }
 
-       /// Get "static" flag
-       bool get_static() const
-       {
-           return (_flags & staticProp);
-       }
-
-       /// Set "static" flag
-       void set_static() { _flags |= staticProp; }
-
-       /// Clear "static" flag
-       void clear_static() { _flags &= ~staticProp; }
-
        /// Get "read-only" flag 
        bool get_read_only() const
        {
@@ -211,7 +196,6 @@
 operator << (std::ostream& os, const PropFlags& fl)
 {
        os << "(";
-       if ( fl.get_static() ) os << " static";
        if ( fl.get_read_only() ) os << " readonly";
        if ( fl.get_dont_delete() ) os << " nodelete";
        if ( fl.get_dont_enum() ) os << " noenum";

=== modified file 'libcore/Property.cpp'
--- a/libcore/Property.cpp      2010-07-05 15:43:51 +0000
+++ b/libcore/Property.cpp      2010-07-09 09:44:33 +0000
@@ -97,29 +97,6 @@
 }
 
 void
-Property::setSetter(as_function* func)
-{
-       if (isGetterSetter())
-       {
-               GetterSetter* a = boost::get<GetterSetter>(&_bound);
-               a->setSetter(func);
-       }
-       else
-               _bound = GetterSetter(NULL, func);
-}
-
-void
-Property::setGetter(as_function* func)
-{
-       if (isGetterSetter())
-       {
-               GetterSetter* a = boost::get<GetterSetter>(&_bound);
-               a->setGetter(func);
-       }
-       else _bound = GetterSetter(func, 0);
-}
-
-void
 Property::setReachable() const
 {
        switch (_bound.which())

=== modified file 'libcore/Property.h'
--- a/libcore/Property.h        2010-07-05 15:43:51 +0000
+++ b/libcore/Property.h        2010-07-09 10:16:56 +0000
@@ -111,22 +111,6 @@
                return undefVal;
        }
 
-       /// Set a user-defined getter
-       void setGetter(as_function* fun)
-       {
-               if (_getset.which() == 0) {
-                       
boost::get<UserDefinedGetterSetter>(_getset).setGetter(fun);
-               }
-       }
-
-       /// Set a user-defined setter
-       void setSetter(as_function* fun)
-       {
-               if (_getset.which() == 0) {
-                       
boost::get<UserDefinedGetterSetter>(_getset).setSetter(fun);
-               }
-       }
-
        void markReachableResources() const
        {
                if (_getset.which() == 0) {
@@ -162,12 +146,6 @@
                /// Set the underlying value
                void setUnderlying(const as_value& v) { _underlyingValue = v; }
 
-               /// Set the setter
-               void setSetter(as_function* setter) { _setter = setter; }
-
-               /// Set the getter
-               void setGetter(as_function* getter) { _getter = getter; }
-
                void markReachableResources() const;
 
        private:
@@ -266,15 +244,6 @@
         _uri(uri)
        {}
 
-       /// Copy constructor
-       Property(const Property& p)
-        :
-               _flags(p._flags),
-        _bound(p._bound),
-        _destructive(p._destructive),
-        _uri(p._uri)
-       {}
-
        Property(const ObjectURI& uri, const as_value& value,
             const PropFlags& flags = PropFlags())
         :
@@ -312,12 +281,15 @@
         _destructive(destroy),
         _uri(uri)
        {}
-
-       /// Set a user-defined setter
-       void setSetter(as_function* fun);
-
-       /// Set a user-defined getter
-       void setGetter(as_function* fun);
+       
+    /// Copy constructor
+       Property(const Property& p)
+        :
+               _flags(p._flags),
+        _bound(p._bound),
+        _destructive(p._destructive),
+        _uri(p._uri)
+       {}
 
        /// accessor to the properties flags
        const PropFlags& getFlags() const { return _flags; }
@@ -345,7 +317,6 @@
        /// to watch for infinitely recurse on calling the getter
        /// or setter; Native getter-setter has no cache,
        /// undefined will be returned for them.
-       ///
        const as_value& getCache() const;
 
        /// Set internal cached value of this property
@@ -372,12 +343,8 @@
        ///     The new value for this property. It will be used as first
        ///     argument of the 'setter' function if this is a Getter/Setter
        ///     property. @see isGetterSetter().
-       ///
        void setValue(as_object& this_ptr, const as_value &value) const;
 
-       /// is this a read-only member ?
-       bool isReadOnly() const { return _flags.get_read_only(); }
-
        /// Is this a getter/setter property?
        bool isGetterSetter() const {
         return _bound.which() == TYPE_GETTER_SETTER;
@@ -386,14 +353,6 @@
        /// is this a destructive property ?
        bool isDestructive() const { return _destructive; }
 
-       /// Is this a static property?
-       bool isStatic() const { return _flags.get_static(); }
-
-       /// Is this member supposed to be visible by a VM of given version ?
-       bool visible(int swfVersion) const {
-        return _flags.get_visible(swfVersion);
-    }
-
        /// Clear visibility flags
        void clearVisible(int swfVersion) { _flags.clear_visible(swfVersion); }
 
@@ -437,6 +396,18 @@
     ObjectURI _uri;
 
 };
+       
+/// is this a read-only member ?
+inline bool
+readOnly(const Property& prop) {
+    return prop.getFlags().get_read_only();
+}
+
+/// Is this member supposed to be visible by a VM of given version ?
+inline bool
+visible(const Property& prop, int version) {
+    return prop.getFlags().get_visible(version);
+}
 
 } // namespace gnash
 

=== modified file 'libcore/PropertyList.cpp'
--- a/libcore/PropertyList.cpp  2010-07-09 05:14:26 +0000
+++ b/libcore/PropertyList.cpp  2010-07-09 10:57:44 +0000
@@ -82,7 +82,7 @@
        }
 
        const Property& prop = found->first;
-       if (prop.isReadOnly() && ! prop.isDestructive())
+       if (readOnly(prop) && ! prop.isDestructive())
        {
         ObjectURI::Logger l(getStringTable(_owner));
                log_error(_("Property %s is read-only %s, not setting it to 
%s"), 
@@ -169,11 +169,7 @@
         const ObjectURI& uri = i->first.uri();
 
                if (donelist.insert(uri).second) {
-
-            const std::string& qname = getNamespace(uri) ?
-                st.value(getName(uri)) + "." + st.value(getNamespace(uri)) :
-                st.value(getName(uri));
-
+            const std::string& qname = st.value(getName(uri));
                        env.push(qname);
                }
        }

=== modified file 'libcore/PropertyList.h'
--- a/libcore/PropertyList.h    2010-07-09 05:14:26 +0000
+++ b/libcore/PropertyList.h    2010-07-09 13:25:36 +0000
@@ -172,8 +172,7 @@
     /// @return     A Property or 0, if no such property exists.
     ///             All Property objects are owned by this PropertyList. Do
     ///             not delete them.
-    Property* getProperty(const ObjectURI& uri)
-        const;
+    Property* getProperty(const ObjectURI& uri) const;
 
     /// Delete a Property, if existing and not protected from deletion.
     //

=== modified file 'libcore/as_object.cpp'
--- a/libcore/as_object.cpp     2010-07-09 05:14:26 +0000
+++ b/libcore/as_object.cpp     2010-07-09 10:57:44 +0000
@@ -340,12 +340,10 @@
     string_table& st = getStringTable(*this);
     string_table::key k = st.find(name);
 
-    as_value cacheVal;
-
     Property* prop = _members.getProperty(k);
 
     if (prop) {
-        cacheVal = prop->getCache();
+        as_value cacheVal = prop->getCache();
         // Used to return the return value of addGetterSetter, but this
         // is always true.
         _members.addGetterSetter(k, getter, setter, cacheVal);
@@ -355,20 +353,21 @@
     }
     else {
 
-        _members.addGetterSetter(k, getter, setter, cacheVal);
+        _members.addGetterSetter(k, getter, setter, as_value());
 
         // Nothing more to do if there are no triggers.
         if (!_trigs.get()) return;
 
         // check if we have a trigger, if so, invoke it
         // and set val to its return
-        TriggerContainer::iterator trigIter = _trigs->find(ObjectURI(k, 0));
+        TriggerContainer::iterator trigIter = _trigs->find(k);
+
         if (trigIter != _trigs->end()) {
+
             Trigger& trig = trigIter->second;
 
-            log_debug("add_property: property %s is being watched, "
-                      "current val: %s", name, cacheVal);
-            cacheVal = trig.call(cacheVal, as_value(), *this);
+            log_debug("add_property: property %s is being watched" , name);
+            as_value v = trig.call(as_value(), as_value(), *this);
 
             // The trigger call could have deleted the property,
             // so we check for its existence again, and do NOT put
@@ -379,7 +378,7 @@
                           "(getter-setter)", name);
                 return;
             }
-            prop->setCache(cacheVal);
+            prop->setCache(v);
         }
         return;
     }
@@ -506,8 +505,7 @@
 
     while (pr()) {
         if ((prop = pr.getProperty())) {
-            if ((prop->isStatic() || prop->isGetterSetter()) &&
-                prop->visible(swfVersion)) {
+            if (prop->isGetterSetter() && visible(*prop, swfVersion)) {
                 return prop;
             }
         }
@@ -613,8 +611,7 @@
         const int version = getSWFVersion(*this);
         while (pr()) {
             if ((prop = pr.getProperty())) {
-                if ((prop->isStatic() || prop->isGetterSetter()) &&
-                    prop->visible(version)) {
+                if ((prop->isGetterSetter()) && visible(*prop, version)) {
                     break;
                 }
                 else prop = 0;
@@ -623,7 +620,7 @@
     }
         
     if (prop) {
-        if (prop->isReadOnly()) {
+        if (readOnly(*prop)) {
             IF_VERBOSE_ASCODING_ERRORS(
                 ObjectURI::Logger l(getStringTable(*this));
                 log_aserror(_("Attempt to set read-only property '%s'"),
@@ -667,10 +664,9 @@
 
 
 void
-as_object::init_member(const std::string& key1, const as_value& val, int flags,
-                       string_table::key nsname)
+as_object::init_member(const std::string& key1, const as_value& val, int flags)
 {
-    const ObjectURI uri(getStringTable(*this).find(key1), nsname);
+    const ObjectURI uri(getStringTable(*this).find(key1));
     init_member(uri, val, flags);
 }
 
@@ -690,10 +686,10 @@
 
 void
 as_object::init_property(const std::string& key, as_function& getter,
-                         as_function& setter, int flags, string_table::key 
nsname)
+                         as_function& setter, int flags)
 {
     string_table::key k = getStringTable(*this).find(key);
-    init_property(ObjectURI(k, nsname), getter, setter, flags);
+    init_property(k, getter, setter, flags);
 }
 
 void
@@ -709,10 +705,10 @@
 
 void
 as_object::init_property(const std::string& key, as_c_function_ptr getter,
-                         as_c_function_ptr setter, int flags, 
string_table::key nsname)
+                         as_c_function_ptr setter, int flags)
 {
     string_table::key k = getStringTable(*this).find(key);
-    init_property(ObjectURI(k, nsname), getter, setter, flags);
+    init_property(k, getter, setter, flags);
 }
 
 void
@@ -744,13 +740,13 @@
 
 void
 as_object::init_readonly_property(const std::string& key, as_function& getter,
-                                  int initflags, string_table::key nsname)
+                                  int initflags)
 {
     string_table::key k = getStringTable(*this).find(key);
 
-    init_property(ObjectURI(k, nsname), getter, getter,
+    init_property(k, getter, getter,
                   initflags | PropFlags::readOnly | PropFlags::isProtected);
-    assert(_members.getProperty(ObjectURI(k, nsname)));
+    assert(_members.getProperty(k));
 }
 
 void
@@ -764,13 +760,13 @@
 
 void
 as_object::init_readonly_property(const std::string& key,
-                                  as_c_function_ptr getter, int initflags, 
string_table::key nsname)
+                                  as_c_function_ptr getter, int initflags)
 {
     string_table::key k = getStringTable(*this).find(key);
 
-    init_property(ObjectURI(k, nsname), getter, getter,
+    init_property(k, getter, getter,
                   initflags | PropFlags::readOnly | PropFlags::isProtected);
-    assert(_members.getProperty(ObjectURI(k, nsname)));
+    assert(_members.getProperty(k));
 }
 
 void
@@ -1007,7 +1003,7 @@
     
     Property* prop = _members.getProperty(NSV::PROP_uuPROTOuu);
     if (!prop) return 0;
-    if (!prop->visible(swfVersion)) return 0;
+    if (!visible(*prop, swfVersion)) return 0;
     
     as_value tmp = prop->getValue(*this);
     

=== modified file 'libcore/as_object.h'
--- a/libcore/as_object.h       2010-07-09 05:14:26 +0000
+++ b/libcore/as_object.h       2010-07-09 10:57:44 +0000
@@ -270,13 +270,10 @@
     //
     /// @param name         Name of the member.
     /// @param val          Value to assign to the member.
-    ///
     /// @param flags        Flags for the new member. By default dontDelete
     ///                     and dontEnum.
-    /// @param nsname       The id of the namespace to which this member
-    ///                     belongs.
     void init_member(const std::string& name, const as_value& val, 
-        int flags = DefaultFlags, string_table::key nsname = 0);
+        int flags = DefaultFlags);
 
     /// Initialize a member value by key
     //
@@ -320,13 +317,9 @@
     /// @param flags
     ///     Flags for the new member. By default dontDelete and dontEnum.
     ///    See PropFlags::Flags.
-    ///
-    /// @param nsname
-    /// The id of the namespace to which this member belongs. 0 is a wildcard
-    /// and will be matched by anything not asking for a specific namespace.
     void init_property(const std::string& key, as_function& getter,
-        as_function& setter, int flags = DefaultFlags,
-        string_table::key nsname = 0);
+        as_function& setter, int flags = DefaultFlags);
+        
 
     /// Initialize a getter/setter property by name
     //
@@ -342,10 +335,8 @@
     ///                 value.
     /// @param flags    Flags for the new member. By default dontDelete and
     ///                 dontEnum. See PropFlags::Flags.
-    /// @param nsname   The id of the namespace to which this member belongs.
     void init_property(const std::string& key, as_c_function_ptr getter,
-        as_c_function_ptr setter, int flags = DefaultFlags,
-        string_table::key nsname = 0);
+        as_c_function_ptr setter, int flags = DefaultFlags);
 
     /// Initialize a getter/setter property by key
     //
@@ -420,11 +411,8 @@
     /// @param key      Property name id
     /// @param getter   The getter function
     /// @param flags    Property flags
-    /// @param nsname   The id of the namespace to which this member belongs.
-    ///                 0 is a wildcard and will be matched by anything not
-    ///                 asking for a specific namespace.
     void init_readonly_property(const std::string& key, as_function& getter,
-            int flags = DefaultFlags, string_table::key nsname = 0);
+            int flags = DefaultFlags);
 
     void init_readonly_property(const ObjectURI& uri,
             as_function& getter, int flags = DefaultFlags);
@@ -442,12 +430,8 @@
     /// @param key      Property name id
     /// @param getter   The getter function
     /// @param flags    Property flags
-    /// @param nsname   The id of the namespace to which this member belongs.
-    ///                 0 is a wildcard and will be matched by anything not
-    ///                 asking for a specific namespace.
     void init_readonly_property(const std::string& key,
-            as_c_function_ptr getter, int flags = DefaultFlags,
-            string_table::key nsname = 0);
+            as_c_function_ptr getter, int flags = DefaultFlags);
 
     void init_readonly_property(const ObjectURI& uri,
             as_c_function_ptr getter, int flags = DefaultFlags);
@@ -833,7 +817,7 @@
 public:
     IsVisible(int version) : _version(version) {}
     bool operator()(const Property& prop) const {
-        return prop.visible(_version);
+        return visible(prop, _version);
     }
 private:
     const int _version;

=== modified file 'libcore/asobj/Globals.cpp'
--- a/libcore/asobj/Globals.cpp 2010-07-09 07:37:30 +0000
+++ b/libcore/asobj/Globals.cpp 2010-07-09 10:57:44 +0000
@@ -373,40 +373,40 @@
     // An ObjectURI constructed without a namespace is in the global namespace.
     static const ClassHierarchy::NativeClasses s = boost::assign::list_of
 
-        (N(system_class_init, NSV::CLASS_SYSTEM, 0, 1))
-        (N(stage_class_init, NSV::CLASS_STAGE, 0, 1))
-        (N(movieclip_class_init, NSV::CLASS_MOVIE_CLIP, 0, 3))
-        (N(textfield_class_init, NSV::CLASS_TEXT_FIELD, 0, 3))
-        (N(math_class_init, NSV::CLASS_MATH, 0, 4))
-        (N(boolean_class_init, NSV::CLASS_BOOLEAN, 0, 5))
-        (N(button_class_init, NSV::CLASS_BUTTON, 0, 5))
-        (N(color_class_init, NSV::CLASS_COLOR, 0, 5))
-        (N(selection_class_init, NSV::CLASS_SELECTION, 0, 5))
-        (N(sound_class_init, NSV::CLASS_SOUND, 0, 5))
-        (N(xmlsocket_class_init, NSV::CLASS_XMLSOCKET, 0, 5))
-        (N(date_class_init, NSV::CLASS_DATE, 0, 5))
-        (N(xmlnode_class_init, NSV::CLASS_XMLNODE, 0, 5))
-        (N(xml_class_init, NSV::CLASS_XML, 0, 5))
-        (N(mouse_class_init, NSV::CLASS_MOUSE, 0, 5))
-        (N(number_class_init, NSV::CLASS_NUMBER, 0, 5))
-        (N(textformat_class_init, NSV::CLASS_TEXT_FORMAT, 0, 5))
-        (N(key_class_init, NSV::CLASS_KEY, 0, 5))
-        (N(AsBroadcaster::init, NSV::CLASS_AS_BROADCASTER, 0, 5))
-        (N(textsnapshot_class_init, NSV::CLASS_TEXT_SNAPSHOT, 0, 5))
-        (N(video_class_init, NSV::CLASS_VIDEO, 0, 6))
-        (N(camera_class_init, NSV::CLASS_CAMERA, 0, 5))
-        (N(microphone_class_init, NSV::CLASS_MICROPHONE, 0, 5))
-        (N(sharedobject_class_init, NSV::CLASS_SHARED_OBJECT, 0, 5))
-        (N(loadvars_class_init, NSV::CLASS_LOAD_VARS, 0, 5))
-        (N(localconnection_class_init, NSV::CLASS_LOCALCONNECTION, 0, 6))
-        (N(customactions_class_init, NSV::CLASS_CUSTOM_ACTIONS, 0, 6))
-        (N(netconnection_class_init, NSV::CLASS_NET_CONNECTION, 0, 6))
-        (N(netstream_class_init, NSV::CLASS_NET_STREAM, 0, 6))
-        (N(contextmenu_class_init, NSV::CLASS_CONTEXTMENU, 0, 5))
-        (N(contextmenuitem_class_init, NSV::CLASS_CONTEXTMENUITEM, 0, 5))
-        (N(moviecliploader_class_init, NSV::CLASS_MOVIE_CLIP_LOADER, 0, 5))
-        (N(Error_class_init, NSV::CLASS_ERROR, 0, 5))
-        (N(accessibility_class_init, NSV::CLASS_ACCESSIBILITY, 0, 5));
+        (N(system_class_init, NSV::CLASS_SYSTEM, 1))
+        (N(stage_class_init, NSV::CLASS_STAGE, 1))
+        (N(movieclip_class_init, NSV::CLASS_MOVIE_CLIP, 3))
+        (N(textfield_class_init, NSV::CLASS_TEXT_FIELD, 3))
+        (N(math_class_init, NSV::CLASS_MATH, 4))
+        (N(boolean_class_init, NSV::CLASS_BOOLEAN, 5))
+        (N(button_class_init, NSV::CLASS_BUTTON, 5))
+        (N(color_class_init, NSV::CLASS_COLOR, 5))
+        (N(selection_class_init, NSV::CLASS_SELECTION, 5))
+        (N(sound_class_init, NSV::CLASS_SOUND, 5))
+        (N(xmlsocket_class_init, NSV::CLASS_XMLSOCKET, 5))
+        (N(date_class_init, NSV::CLASS_DATE, 5))
+        (N(xmlnode_class_init, NSV::CLASS_XMLNODE, 5))
+        (N(xml_class_init, NSV::CLASS_XML, 5))
+        (N(mouse_class_init, NSV::CLASS_MOUSE, 5))
+        (N(number_class_init, NSV::CLASS_NUMBER, 5))
+        (N(textformat_class_init, NSV::CLASS_TEXT_FORMAT, 5))
+        (N(key_class_init, NSV::CLASS_KEY, 5))
+        (N(AsBroadcaster::init, NSV::CLASS_AS_BROADCASTER, 5))
+        (N(textsnapshot_class_init, NSV::CLASS_TEXT_SNAPSHOT, 5))
+        (N(video_class_init, NSV::CLASS_VIDEO, 6))
+        (N(camera_class_init, NSV::CLASS_CAMERA, 5))
+        (N(microphone_class_init, NSV::CLASS_MICROPHONE, 5))
+        (N(sharedobject_class_init, NSV::CLASS_SHARED_OBJECT, 5))
+        (N(loadvars_class_init, NSV::CLASS_LOAD_VARS, 5))
+        (N(localconnection_class_init, NSV::CLASS_LOCALCONNECTION, 6))
+        (N(customactions_class_init, NSV::CLASS_CUSTOM_ACTIONS, 6))
+        (N(netconnection_class_init, NSV::CLASS_NET_CONNECTION, 6))
+        (N(netstream_class_init, NSV::CLASS_NET_STREAM, 6))
+        (N(contextmenu_class_init, NSV::CLASS_CONTEXTMENU, 5))
+        (N(contextmenuitem_class_init, NSV::CLASS_CONTEXTMENUITEM, 5))
+        (N(moviecliploader_class_init, NSV::CLASS_MOVIE_CLIP_LOADER, 5))
+        (N(Error_class_init, NSV::CLASS_ERROR, 5))
+        (N(accessibility_class_init, NSV::CLASS_ACCESSIBILITY, 5));
 
     return s;
 

=== modified file 'libcore/asobj/System_as.cpp'
--- a/libcore/asobj/System_as.cpp       2010-07-09 06:58:02 +0000
+++ b/libcore/asobj/System_as.cpp       2010-07-09 10:57:44 +0000
@@ -291,9 +291,9 @@
     
     string_table& st = getStringTable(proto);
     registerBuiltinObject(proto, attachSystemSecurityInterface,
-                          ObjectURI(st.find("security"), 0));
+                          st.find("security"));
     registerBuiltinObject(proto, attachSystemCapabilitiesInterface,
-                          ObjectURI(st.find("capabilities"), 0));
+                          st.find("capabilities"));
     
     proto.init_member("setClipboard", 
                       gl.createFunction(system_setClipboard));

=== modified file 'libcore/asobj/flash/display/display_pkg.cpp'
--- a/libcore/asobj/flash/display/display_pkg.cpp       2010-01-11 06:41:38 
+0000
+++ b/libcore/asobj/flash/display/display_pkg.cpp       2010-07-09 10:57:44 
+0000
@@ -41,9 +41,8 @@
     as_object* pkg = gl.createObject();
     
     string_table& st = getStringTable(fn);
-    const string_table::key global = 0;
 
-    bitmapdata_class_init(*pkg, ObjectURI(st.find("BitmapData"), global));
+    bitmapdata_class_init(*pkg, st.find("BitmapData"));
 
        return pkg;
 }

=== modified file 'libcore/asobj/flash/external/external_pkg.cpp'
--- a/libcore/asobj/flash/external/external_pkg.cpp     2010-01-11 06:41:38 
+0000
+++ b/libcore/asobj/flash/external/external_pkg.cpp     2010-07-09 10:57:44 
+0000
@@ -42,10 +42,8 @@
     as_object* pkg = gl.createObject();
     
     string_table& st = getStringTable(fn);
-    const string_table::key global = 0;
 
-    externalinterface_class_init(*pkg,
-            ObjectURI(st.find("ExternalInterface"), global));
+    externalinterface_class_init(*pkg, st.find("ExternalInterface"));
 
     return pkg;
 }

=== modified file 'libcore/asobj/flash/filters/filters_pkg.cpp'
--- a/libcore/asobj/flash/filters/filters_pkg.cpp       2010-01-11 06:41:38 
+0000
+++ b/libcore/asobj/flash/filters/filters_pkg.cpp       2010-07-09 10:57:44 
+0000
@@ -50,28 +50,17 @@
     as_object* pkg = gl.createObject();
 
     string_table& st = getStringTable(fn);
-    const string_table::key global = 0;
 
-    bitmapfilter_class_init(*pkg,
-            ObjectURI(st.find("BitmapFilter"), global));
-    bevelfilter_class_init(*pkg,
-            ObjectURI(st.find("BevelFilter"), global));
-    blurfilter_class_init(*pkg,
-            ObjectURI(st.find("BlurFilter"), global));
-    colormatrixfilter_class_init(*pkg,
-            ObjectURI(st.find("ColorMatrixFilter"), global));
-    convolutionfilter_class_init(*pkg,
-            ObjectURI(st.find("ConvolutionFilter"), global));
-    displacementmapfilter_class_init(*pkg,
-            ObjectURI(st.find("DisplacementMapFilter"), global));
-    dropshadowfilter_class_init(*pkg,
-            ObjectURI(st.find("DropShadowFilter"), global));
-    glowfilter_class_init(*pkg,
-            ObjectURI(st.find("GlowFilter"), global));
-    gradientbevelfilter_class_init(*pkg,
-            ObjectURI(st.find("GradientBevelFilter"), global));
-    gradientglowfilter_class_init(*pkg,
-            ObjectURI(st.find("GradientGlowFilter"), global));
+    bitmapfilter_class_init(*pkg, st.find("BitmapFilter"));
+    bevelfilter_class_init(*pkg, st.find("BevelFilter"));
+    blurfilter_class_init(*pkg, st.find("BlurFilter"));
+    colormatrixfilter_class_init(*pkg, st.find("ColorMatrixFilter"));
+    convolutionfilter_class_init(*pkg, st.find("ConvolutionFilter"));
+    displacementmapfilter_class_init(*pkg, st.find("DisplacementMapFilter"));
+    dropshadowfilter_class_init(*pkg, st.find("DropShadowFilter"));
+    glowfilter_class_init(*pkg, st.find("GlowFilter"));
+    gradientbevelfilter_class_init(*pkg, st.find("GradientBevelFilter"));
+    gradientglowfilter_class_init(*pkg, st.find("GradientGlowFilter"));
     
     return pkg;
 }

=== modified file 'libcore/asobj/flash/flash_pkg.cpp'
--- a/libcore/asobj/flash/flash_pkg.cpp 2010-04-25 17:50:48 +0000
+++ b/libcore/asobj/flash/flash_pkg.cpp 2010-07-09 10:57:44 +0000
@@ -44,14 +44,12 @@
     
     string_table& st = getStringTable(fn);
 
-    const string_table::key global = 0;
-
-    flash_text_package_init(*pkg, ObjectURI(st.find("text"), global));
-    flash_display_package_init(*pkg, ObjectURI(st.find("display"), global));
-    flash_filters_package_init(*pkg, ObjectURI(st.find("filters"), global));
-    flash_geom_package_init(*pkg, ObjectURI(st.find("geom"), global));
-    flash_net_package_init(*pkg, ObjectURI(st.find("net"), global));
-    flash_external_package_init(*pkg, ObjectURI(st.find("external"), global));
+    flash_text_package_init(*pkg, st.find("text"));
+    flash_display_package_init(*pkg, st.find("display"));
+    flash_filters_package_init(*pkg, st.find("filters"));
+    flash_geom_package_init(*pkg, st.find("geom"));
+    flash_net_package_init(*pkg, st.find("net"));
+    flash_external_package_init(*pkg, st.find("external"));
 
     return pkg;
 }

=== modified file 'libcore/asobj/flash/geom/geom_pkg.cpp'
--- a/libcore/asobj/flash/geom/geom_pkg.cpp     2010-01-11 06:41:38 +0000
+++ b/libcore/asobj/flash/geom/geom_pkg.cpp     2010-07-09 10:57:44 +0000
@@ -44,14 +44,12 @@
     as_object *pkg = gl.createObject();
        
     string_table& st = getStringTable(fn);
-    const string_table::key global = 0;
 
-    colortransform_class_init(*pkg,
-            ObjectURI(st.find("ColorTransform"), global));
-       matrix_class_init(*pkg, ObjectURI(st.find("Matrix"), global));
-       point_class_init(*pkg, ObjectURI(st.find("Point"), global));
-       rectangle_class_init(*pkg, ObjectURI(st.find("Rectangle"), global));
-       transform_class_init(*pkg, ObjectURI(st.find("Transform"), global));
+    colortransform_class_init(*pkg, st.find("ColorTransform"));
+       matrix_class_init(*pkg, st.find("Matrix"));
+       point_class_init(*pkg, st.find("Point"));
+       rectangle_class_init(*pkg, st.find("Rectangle"));
+       transform_class_init(*pkg, st.find("Transform"));
 
     return pkg;
 }

=== modified file 'libcore/asobj/flash/net/net_pkg.cpp'
--- a/libcore/asobj/flash/net/net_pkg.cpp       2010-01-11 06:41:38 +0000
+++ b/libcore/asobj/flash/net/net_pkg.cpp       2010-07-09 10:57:44 +0000
@@ -40,9 +40,8 @@
     as_object* pkg = gl.createObject();
     
     string_table& st = getStringTable(fn);
-    const string_table::key global = 0;
 
-    filereference_class_init(*pkg, ObjectURI(st.find("FileReference"), 
global));
+    filereference_class_init(*pkg, st.find("FileReference"));
 
     return pkg;
 }

=== modified file 'libcore/asobj/flash/text/text_pkg.cpp'
--- a/libcore/asobj/flash/text/text_pkg.cpp     2010-01-11 06:41:38 +0000
+++ b/libcore/asobj/flash/text/text_pkg.cpp     2010-07-09 10:57:44 +0000
@@ -38,9 +38,8 @@
     as_object* pkg = gl.createObject();
     
     string_table& st = getStringTable(fn);
-    const string_table::key global = 0;
 
-    textrenderer_class_init(*pkg, ObjectURI(st.find("TextRenderer"), global));
+    textrenderer_class_init(*pkg, st.find("TextRenderer"));
 
     return pkg;
 }


reply via email to

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