[Top][All Lists]

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

[Gnash-commit] [SCM] Gnash branch, objecturi, updated. 7b4a82f98ab0d2d51

From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, objecturi, updated. 7b4a82f98ab0d2d5197dfc657f47c717be997eec
Date: Thu, 23 Sep 2010 15:42:42 +0000

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

The branch, objecturi has been updated
       via  7b4a82f98ab0d2d5197dfc657f47c717be997eec (commit)
      from  4a91e3e60a6c8b9b341b087c48906b025afe3c76 (commit)

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

- Log -----------------------------------------------------------------

commit 7b4a82f98ab0d2d5197dfc657f47c717be997eec
Author: Sandro Santilli <address@hidden>
Date:   Thu Sep 23 17:39:20 2010 +0200

    Reduce uses of string_table building ObjectURI earlier, for better caching.
    Most notably an ObjectURI->string_table::key->ObjectURI round trip was 
    from as_object::get_member while querying for DisplayObject, which may 
    the load of lowercase lookups for system events (we expect to have a single
    noCase lookup per event function now)

diff --git a/libcore/as_object.cpp b/libcore/as_object.cpp
index df61755..a85f119 100644
--- a/libcore/as_object.cpp
+++ b/libcore/as_object.cpp
@@ -329,29 +329,29 @@ as_object::add_property(const std::string& name, 
as_function& getter,
                         as_function* setter)
     string_table& st = getStringTable(*this);
-    string_table::key k = st.find(name);
+    ObjectURI uri(st.find(name));
-    Property* prop = _members.getProperty(k);
+    Property* prop = _members.getProperty(uri);
     if (prop) {
         as_value cacheVal = prop->getCache();
         // Used to return the return value of addGetterSetter, but this
         // is always true.
-        _members.addGetterSetter(k, getter, setter, cacheVal);
+        _members.addGetterSetter(uri, getter, setter, cacheVal);
         // NOTE: watch triggers not called when adding a new
         // getter-setter property
     else {
-        _members.addGetterSetter(k, getter, setter, as_value());
+        _members.addGetterSetter(uri, 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(k);
+        TriggerContainer::iterator trigIter = _trigs->find(uri);
         if (trigIter != _trigs->end()) {
@@ -363,7 +363,7 @@ as_object::add_property(const std::string& name, 
as_function& getter,
             // The trigger call could have deleted the property,
             // so we check for its existence again, and do NOT put
             // it back in if it was deleted
-            prop = _members.getProperty(k);
+            prop = _members.getProperty(uri);
             if (!prop) {
                 log_debug("Property %s deleted by trigger on create "
                           "(getter-setter)", name);
@@ -397,7 +397,7 @@ as_object::get_member(const ObjectURI& uri, as_value* val)
     if (!prop) {
         if (displayObject()) {
             DisplayObject* d = displayObject();
-            if (getDisplayObjectProperty(*d, getName(uri), *val)) return true;
+            if (getDisplayObjectProperty(*d, uri, *val)) return true;
         while (pr()) {
             if ((prop = pr.getProperty())) break;


Summary of changes:
 libcore/as_object.cpp |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)


reply via email to

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