gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, objecturi, updated. a7c3e7d50d997974f


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, objecturi, updated. a7c3e7d50d997974f6a404a5902df7b5e8817462
Date: Tue, 28 Sep 2010 17:03:54 +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  a7c3e7d50d997974f6a404a5902df7b5e8817462 (commit)
       via  f873e92c96b90a00d291093552895c93cf764853 (commit)
       via  9e038f50af44a97b5923e8abe5b33cbdb0da3d11 (commit)
       via  76dce38eb0171a912ea220d4c5e4de694fd397f3 (commit)
       via  3d96aaab326465b46ee9d4ac3fe78d67c3b953ab (commit)
       via  f7582062891a3d46c86cd2ab3d65bb8cb3f0bf15 (commit)
       via  13577f071b45cad1d751dd1bde931101f7bf0bac (commit)
       via  6847d2d4505908ebbcac2253f8fb0f914c50bc88 (commit)
       via  6695ce99a151faa420fa0814eeeeb3fe01fbd6a1 (commit)
       via  c3ea60e58a8898ed5f4ac9844fc02b75b4b59002 (commit)
       via  ab97b0616b6282c32b078d7a930b3442da431e72 (commit)
       via  cf9688ce4bed8b70f8a084999500f9867f087f62 (commit)
      from  a8237a5a0679c36e25fc5bf03baf9735088d4324 (commit)

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

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=a7c3e7d50d997974f6a404a5902df7b5e8817462


commit a7c3e7d50d997974f6a404a5902df7b5e8817462
Merge: a8237a5 f873e92
Author: Sandro Santilli <address@hidden>
Date:   Tue Sep 28 19:03:39 2010 +0200

    Merge branch 'master' into objecturi
    
    Conflicts:
    
        libcore/asobj/Array_as.cpp
        libcore/asobj/Array_as.h

diff --cc libcore/asobj/Array_as.cpp
index 1fcf323,a676d23..364e3b5
--- a/libcore/asobj/Array_as.cpp
+++ b/libcore/asobj/Array_as.cpp
@@@ -62,52 -62,53 +62,53 @@@ enum SortFlags 
      SORT_NUMERIC = (1<<4) // 16
  };
  
- struct indexed_as_value;
- 
- typedef boost::function2<bool, const as_value&, const as_value&> as_cmp_fn;
- 
- void attachArrayInterface(as_object& proto);
- void attachArrayStatics(as_object& proto);
- 
- as_value join(as_object* array, const std::string& separator);
- 
- as_value array_new(const fn_call& fn);
- as_value array_slice(const fn_call& fn);
- as_value array_concat(const fn_call& fn);
- as_value array_toString(const fn_call& fn);
- as_value array_join(const fn_call& fn);
- as_value array_reverse(const fn_call& fn);
- as_value array_shift(const fn_call& fn);
- as_value array_pop(const fn_call& fn);
- as_value array_unshift(const fn_call& fn);
- as_value array_push(const fn_call& fn);
- as_value array_sortOn(const fn_call& fn);
- as_value array_sort(const fn_call& fn);
- as_value array_splice(const fn_call& fn);
- 
- ObjectURI getKey(const fn_call& fn, size_t i);
- int isIndex(const std::string& name);
- 
- /// Implementation of foreachArray that takes a start and end range.
- template<typename T> void foreachArray(as_object& array, int start,
-                                      int end, T& pred);
- 
- inline bool int_lt_or_eq (int a) {
-     return a <= 0;
- }
+     struct indexed_as_value;
+ 
+     typedef boost::function2<bool, const as_value&, const as_value&> 
as_cmp_fn;
+ 
+     void attachArrayInterface(as_object& proto);
+     void attachArrayStatics(as_object& proto);
+ 
+     as_value join(as_object* array, const std::string& separator);
+ 
+     as_value array_new(const fn_call& fn);
+     as_value array_slice(const fn_call& fn);
+     as_value array_concat(const fn_call& fn);
+     as_value array_toString(const fn_call& fn);
+     as_value array_join(const fn_call& fn);
+     as_value array_reverse(const fn_call& fn);
+     as_value array_shift(const fn_call& fn);
+     as_value array_pop(const fn_call& fn);
+     as_value array_unshift(const fn_call& fn);
+     as_value array_push(const fn_call& fn);
+     as_value array_sortOn(const fn_call& fn);
+     as_value array_sort(const fn_call& fn);
+     as_value array_splice(const fn_call& fn);
+ 
 -    string_table::key getKey(const fn_call& fn, size_t i);
++    ObjectURI getKey(const fn_call& fn, size_t i);
+     int isIndex(const std::string& name);
+ 
+     /// Implementation of foreachArray that takes a start and end range.
+     template<typename T> void foreachArray(as_object& array, int start,
+                            int end, T& pred);
+ 
+     inline bool int_lt_or_eq (int a) {
+         return a <= 0;
+     }
  
- inline bool int_gt (int a) {
-     return a > 0;
- }
+     inline bool int_gt (int a) {
+         return a > 0;
+     }
  
- void getIndexedElements(as_object& array, std::vector<indexed_as_value>& v);
+     void getIndexedElements(as_object& array, std::vector<indexed_as_value>& 
v);
  
- void pushIndices(as_object& o, const std::vector<indexed_as_value>& index);
+     void pushIndices(as_object& o, const std::vector<indexed_as_value>& 
index);
  
- /// Set the length property of an object only if it is a genuine array.
- void setArrayLength(as_object& o, const int size);
+     /// Set the length property of an object only if it is a genuine array.
+     void setArrayLength(as_object& o, const int size);
  
      void resizeArray(as_object& o, const int size);
+ 
  }
  
  /// Function objects for foreachArray()
@@@ -980,10 -984,9 +988,10 @@@ array_splice(const fn_call& fn
      const size_t newelements = fn.nargs > 2 ? fn.nargs - 2 : 0;
      
      // Push removed elements to the new array.
 +    ObjectURI propPush = getURI(getVM(fn), NSV::PROP_PUSH);
      for (size_t i = 0; i < remove; ++i) {
 -        const size_t key = getKey(fn, start + i);
 -        callMethod(ret, NSV::PROP_PUSH, arrayProperty(*array, key));
 +        const ObjectURI& key = getKey(fn, start + i);
-         callMethod(ret, propPush, array->getMember(key));
++        callMethod(ret, propPush, arrayProperty(*array, key));
      }
  
      // Shift elements in 'this' array by simple assignment, not delete
@@@ -1240,14 -1242,11 +1248,11 @@@ array_unshift(const fn_call& fn
  
      const size_t size = arrayLength(*array);
  
-     VM& vm = getVM(fn);
-     as_value ret = array->getMember(getURI(vm, "0"));
-     
      for (size_t i = size + shift - 1; i >= shift ; --i) {
 -        const string_table::key nextkey = getKey(fn, i - shift);
 -        const string_table::key currentkey = getKey(fn, i);
 +        const ObjectURI nextkey = getKey(fn, i - shift);
 +        const ObjectURI currentkey = getKey(fn, i);
          array->delProperty(currentkey);
-         array->set_member(currentkey, array->getMember(nextkey));
+         array->set_member(currentkey, arrayProperty(*array, nextkey));
      }
  
      for (size_t i = shift; i > 0; --i) {
@@@ -1270,8 -1269,8 +1275,8 @@@ array_pop(const fn_call& fn
      const size_t size = arrayLength(*array);
      if (size < 1) return as_value();
  
 -    const string_table::key ind = getKey(fn, size - 1);
 +    const ObjectURI ind = getKey(fn, size - 1);
-     as_value ret = array->getMember(ind);
+     as_value ret = arrayProperty(*array, ind);
      array->delProperty(ind);
      
      setArrayLength(*array, size - 1);
@@@ -1289,13 -1288,13 +1294,13 @@@ array_shift(const fn_call& fn
      // An array with no elements has nothing to return.
      if (size < 1) return as_value();
  
-     as_value ret = array->getMember(getKey(fn, 0));
+     as_value ret = arrayProperty(*array, getKey(fn, 0));
  
      for (size_t i = 0; i < static_cast<size_t>(size - 1); ++i) {
 -        const string_table::key nextkey = getKey(fn, i + 1);
 -        const string_table::key currentkey = getKey(fn, i);
 +        const ObjectURI nextkey = getKey(fn, i + 1);
 +        const ObjectURI currentkey = getKey(fn, i);
          array->delProperty(currentkey);
-         array->set_member(currentkey, array->getMember(nextkey));
+         array->set_member(currentkey, arrayProperty(*array, nextkey));
      }
      
      setArrayLength(*array, size - 1);
@@@ -1314,10 -1313,10 +1319,10 @@@ array_reverse(const fn_call& fn
      if (size < 2) return as_value();
  
      for (size_t i = 0; i < static_cast<size_t>(size) / 2; ++i) {
 -        const string_table::key bottomkey = getKey(fn, i);
 -        const string_table::key topkey = getKey(fn, size - i - 1);
 +        const ObjectURI bottomkey = getKey(fn, i);
 +        const ObjectURI topkey = getKey(fn, size - i - 1);
-         const as_value top = array->getMember(topkey);
-         const as_value bottom = array->getMember(bottomkey);
+         const as_value top = arrayProperty(*array, topkey);
+         const as_value bottom = arrayProperty(*array, bottomkey);
          array->delProperty(topkey);
          array->delProperty(bottomkey);
          array->set_member(bottomkey, top);
@@@ -1465,11 -1463,9 +1470,9 @@@ join(as_object* array, const std::strin
      const int version = getSWFVersion(*array);
  
      for (size_t i = 0; i < size; ++i) {
-         std::ostringstream os;
-         os << i;
          if (i) s += separator;
-         as_value el;
-         array->get_member(getURI(vm, os.str()), &el);
+         const std::string& index = boost::lexical_cast<std::string>(i);
 -        const as_value& el = arrayProperty(*array, st.find(index));
++        const as_value& el = arrayProperty(*array, getURI(vm, index));
          s += el.to_string(version);
      }
      return as_value(s);
@@@ -1500,10 -1496,10 +1503,10 @@@ void foreachArray(as_object& array, in
      assert(end >= start);
      assert(size >= end);
  
 -    string_table& st = getStringTable(array);
 +    VM& vm = getVM(array);
  
      for (size_t i = start; i < static_cast<size_t>(end); ++i) {
-         pred(array.getMember(arrayKey(vm, i)));
 -        pred(arrayProperty(array, arrayKey(st, i)));
++        pred(arrayProperty(array, arrayKey(vm, i)));
      }
  }
  
diff --cc libcore/asobj/Array_as.h
index f6806ae,1ad5203..6993a22
--- a/libcore/asobj/Array_as.h
+++ b/libcore/asobj/Array_as.h
@@@ -80,10 -91,10 +91,10 @@@ void foreachArray(as_object& array, T& 
      size_t size = arrayLength(array);
      if (!size) return;
  
 -    string_table& st = getStringTable(array);
 +    VM& vm = getVM(array);
  
      for (size_t i = 0; i < static_cast<size_t>(size); ++i) {
-         pred(array.getMember(arrayKey(vm, i)));
 -        pred(arrayProperty(array, arrayKey(st, i)));
++        pred(arrayProperty(array, arrayKey(vm, i)));
      }
  }
  

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

Summary of changes:
 libcore/DisplayList.cpp                 |    2 -
 libcore/MovieClip.cpp                   |    2 +-
 libcore/PropFlags.h                     |   45 +++++-----
 libcore/Property.h                      |   69 +++++++--------
 libcore/TextField.cpp                   |   10 +-
 libcore/asobj/Array_as.cpp              |  151 ++++++++++++++++---------------
 libcore/asobj/Array_as.h                |   13 +++-
 testsuite/actionscript.all/TextField.as |   18 +++-
 testsuite/actionscript.all/array.as     |   40 ++++++++-
 testsuite/libcore.all/ClassSizes.cpp    |    2 +-
 10 files changed, 202 insertions(+), 150 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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