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. 34c4f25b8bad99e67


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, objecturi, updated. 34c4f25b8bad99e67a3ca3230169c431f39e3e2f
Date: Sun, 10 Oct 2010 10:35:44 +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  34c4f25b8bad99e67a3ca3230169c431f39e3e2f (commit)
       via  dab4c60dedd8b838cd7f363fac5757c97a507b4f (commit)
       via  b3f67e4517f3b1df235236202a907cd2812d94b7 (commit)
       via  49b3be6b3ae754cdae63259b1456168567ffa5fb (commit)
       via  1ccc57a06173668a903b1f177889f50cf5b97fb8 (commit)
       via  3b6bfc5cb1928ab6f8801f48f46981926b7c3c73 (commit)
       via  1ff2df07c59157b84e56d2c13c4ed65c8083673b (commit)
       via  83bd299caa019f782d067e3ea47376ae9ee40609 (commit)
      from  712c9b3303a8782899590d584c7cb5d487d03b0d (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=34c4f25b8bad99e67a3ca3230169c431f39e3e2f


commit 34c4f25b8bad99e67a3ca3230169c431f39e3e2f
Merge: 712c9b3 dab4c60
Author: Benjamin Wolsey <address@hidden>
Date:   Sat Oct 9 12:04:39 2010 +0200

    Merge from master, fix conflicts

diff --cc libcore/as_object.cpp
index 0c50962,55f8835..b690cd0
--- a/libcore/as_object.cpp
+++ b/libcore/as_object.cpp
@@@ -1135,11 -1137,11 +1135,11 @@@ sendEvent(as_object& o, const as_enviro
  }
  
  as_object*
 -getObjectWithPrototype(Global_as& gl, string_table::key c)
 +getObjectWithPrototype(Global_as& gl, const ObjectURI& c)
  {
-     as_object* ctor = getMember(gl, c).to_object(gl);
-     as_object* proto = ctor ?
-         getMember(*ctor, NSV::PROP_PROTOTYPE).to_object(gl) : 0;
+     as_object* ctor = toObject(getMember(gl, c), getVM(gl));
+     as_object* proto = ctor ? 
+         toObject(getMember(*ctor, NSV::PROP_PROTOTYPE), getVM(gl)) : 0;
  
      as_object* o = createObject(gl);
      o->set_prototype(proto ? proto : as_value());
diff --cc libcore/as_value.cpp
index c1224aa,4714544..edd4d36
--- a/libcore/as_value.cpp
+++ b/libcore/as_value.cpp
@@@ -69,7 -69,9 +69,9 @@@ namespace 
              int version);
      bool compareBoolean(const as_value& boolean, const as_value& other,
              int version);
 -    inline bool findMethod(as_object& obj, string_table::key m, as_value& 
ret);
 +    inline bool findMethod(as_object& obj, const ObjectURI& m, as_value& ret);
+     template<typename T> as_object* constructObject(VM& vm, const T& arg,
 -            string_table::key className);
++            const ObjectURI& className);
  }
  
  namespace {
@@@ -975,6 -978,49 +978,49 @@@ findMethod(as_object& obj, const Object
      return obj.get_member(m, &ret) && ret.is_object();
  }
  
+ /// Construct an instance of the specified global class.
+ //
+ /// If the class is not present or is not a constructor function, this
+ /// function throws an ActionTypeError.
+ //
+ /// TODO: consider whether ActionTypeError is an appropriate exception.
+ /// TODO: test the other failure cases.
+ template<typename T>
+ as_object*
 -constructObject(VM& vm, const T& arg, string_table::key className)
++constructObject(VM& vm, const T& arg, const ObjectURI& className)
+ {
+ 
+     as_object& gl = *vm.getGlobal();
+ 
+     as_value clval;
+ 
+     // This is tested in actionscript.all/Object.as to return an 
+     // undefined value. We throw the exception back to the VM, which pushes
+     // an undefined value onto the stack.
+     if (!gl.get_member(className, &clval) ) {
+         throw ActionTypeError();
+     }
+     
+     // This is not properly tested.
+     if (!clval.is_function()) {
+         throw ActionTypeError();
+     }
+     
+     as_function* ctor = clval.to_function();
+ 
+     // This is also not properly tested.
+     if (!ctor) throw ActionTypeError();
+ 
+     fn_call::Args args;
+     args += arg;
+ 
+     as_environment env(vm);
+     as_object* ret = constructInstance(*ctor, env, args);
+ 
+     return ret;
+ 
+ }
+ 
  } // unnamed namespace
  
  std::ostream&
diff --cc libcore/asobj/Array_as.cpp
index 03b21cc,4ce58c1..9627ab1
--- a/libcore/asobj/Array_as.cpp
+++ b/libcore/asobj/Array_as.cpp
@@@ -1119,11 -1113,11 +1119,11 @@@ array_sortOn(const fn_call& fn
      // case: sortOn(["prop1", "prop2"] ...)
      if (fn.arg(0).is_object()) 
      {
-         as_object* props = fn.arg(0).to_object(getGlobal(fn));
+         as_object* props = toObject(fn.arg(0), getVM(fn));
          assert(props);
  
 -        std::vector<string_table::key> prp;
 -        GetKeys gk(prp, st, version);
 +        std::vector<ObjectURI> prp;
 +        GetKeys gk(prp, vm, version);
          foreachArray(*props, gk);
          
          std::vector<as_cmp_fn> cmp;
diff --cc libcore/asobj/ContextMenu_as.cpp
index 6df1e32,c649426..93047e5
--- a/libcore/asobj/ContextMenu_as.cpp
+++ b/libcore/asobj/ContextMenu_as.cpp
@@@ -59,11 -59,10 +59,10 @@@ namespace 
  class CopyMenuItems
  {
  public:
 -    CopyMenuItems(string_table::key c, as_object& nc) : _c(c), _target(nc) {}
 +    CopyMenuItems(const ObjectURI& c, as_object& nc) : _c(c), _target(nc) {}
  
      void operator()(const as_value& val) {
-         Global_as& gl = getGlobal(_target);
-         as_object* obj = val.to_object(gl);
+         as_object* obj = toObject(val, getVM(_target));
          as_value cp = callMethod(obj, _c);
          callMethod(&_target, NSV::PROP_PUSH, cp);
      }
@@@ -159,8 -158,8 +158,8 @@@ contextmenu_copy(const fn_call& fn
          if (arr) {
              as_object* customs;
              if (customItems.is_object() &&
-                     (customs = customItems.to_object(getGlobal(fn)))) {
+                     (customs = toObject(customItems, getVM(fn)))) {
 -                string_table::key copykey = getStringTable(fn).find("copy");
 +                const ObjectURI& copykey = getURI(getVM(fn), "copy");
                  CopyMenuItems c(copykey, *arr);
                  foreachArray(*customs, c);
              }
diff --cc libcore/vm/ASHandlers.cpp
index 26425dc,b582922..e1f0cfa
--- a/libcore/vm/ASHandlers.cpp
+++ b/libcore/vm/ASHandlers.cpp
@@@ -2710,12 -2713,13 +2713,12 @@@ ActionGetMember(ActionExec& thread
          return;
      }
  
-     IF_VERBOSE_ACTION (
-     log_action(_(" ActionGetMember: target: %s (object %p)"),
-                target, static_cast<void *>(obj.get()));
+     IF_VERBOSE_ACTION(
+         log_action(_(" ActionGetMember: target: %s (object %p)"),
+                    target, static_cast<void*>(obj));
      );
  
 -    string_table& st = getStringTable(env);
 -    const string_table::key k = st.find(member_name.to_string());
 +    const ObjectURI& k = getURI(getVM(env), member_name.to_string());
  
      if (!obj->get_member(k, &env.top(1))) {
  

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

Summary of changes:
 cygnal/cvm.cpp                                     |    2 +-
 extensions/mysql/mysql_db.cpp                      |    2 +-
 gui/Player.cpp                                     |    2 +-
 libcore/ClassHierarchy.cpp                         |    3 +-
 libcore/DisplayObject.h                            |    7 +-
 libcore/Makefile.am                                |    1 -
 libcore/MorphShape.cpp                             |    2 +-
 libcore/MovieClip.cpp                              |   18 ++--
 libcore/MovieFactory.cpp                           |    7 ++
 libcore/MovieFactory.h                             |    5 +
 libcore/RunResources.h                             |    2 +-
 libcore/Timers.h                                   |    1 -
 libcore/Video.cpp                                  |    2 +-
 libcore/as_function.cpp                            |   26 +-----
 libcore/as_object.cpp                              |   12 ++--
 libcore/as_value.cpp                               |   60 ++++++++++++--
 libcore/as_value.h                                 |    2 +-
 libcore/asobj/Array_as.cpp                         |   19 ++---
 libcore/asobj/AsBroadcaster.cpp                    |   16 ++--
 libcore/asobj/Camera_as.cpp                        |    4 +-
 libcore/asobj/Color_as.cpp                         |    6 +-
 libcore/asobj/ContextMenu_as.cpp                   |    5 +-
 libcore/asobj/Global_as.cpp                        |   81 ++-----------------
 libcore/asobj/Global_as.h                          |    8 +--
 libcore/asobj/LoadableObject.cpp                   |   15 ++--
 libcore/asobj/Microphone_as.cpp                    |    2 +-
 libcore/asobj/MovieClipLoader.cpp                  |    2 +-
 libcore/asobj/MovieClip_as.cpp                     |   31 +++----
 libcore/asobj/NetConnection_as.cpp                 |    2 +-
 libcore/asobj/NetStream_as.cpp                     |    2 +-
 libcore/asobj/Object.cpp                           |    8 +-
 libcore/asobj/Selection_as.cpp                     |    2 +-
 libcore/asobj/Sound_as.cpp                         |    2 +-
 libcore/asobj/TextField_as.cpp                     |    2 +-
 libcore/asobj/TextFormat_as.cpp                    |    2 +-
 libcore/asobj/XMLNode_as.cpp                       |    8 +-
 libcore/asobj/XML_as.cpp                           |    2 +-
 libcore/asobj/flash/display/BitmapData_as.cpp      |    8 +-
 .../asobj/flash/external/ExternalInterface_as.cpp  |    8 +-
 libcore/asobj/flash/geom/ColorTransform_as.cpp     |    2 +-
 libcore/asobj/flash/geom/Matrix_as.cpp             |    6 +-
 libcore/asobj/flash/geom/Point_as.cpp              |   14 ++--
 libcore/asobj/flash/geom/Rectangle_as.cpp          |    2 +-
 libcore/asobj/flash/geom/Transform_as.cpp          |    6 +-
 libcore/debugger.cpp                               |    6 +-
 libcore/gnash.h                                    |   14 ---
 libcore/impl.cpp                                   |   86 --------------------
 libcore/movie_root.cpp                             |   12 +--
 libcore/movie_root.h                               |   34 +++-----
 libcore/parser/sprite_definition.cpp               |    6 +-
 libcore/swf/ExportAssetsTag.h                      |    1 -
 libcore/swf/tag_loaders.cpp                        |    1 -
 libcore/vm/ASHandlers.cpp                          |   80 ++++++++----------
 libcore/vm/VM.cpp                                  |    6 ++
 libcore/vm/VM.h                                    |   11 ++-
 testsuite/MovieTester.cpp                          |    2 +-
 utilities/processor.cpp                            |   13 +---
 57 files changed, 264 insertions(+), 427 deletions(-)
 delete mode 100644 libcore/impl.cpp


hooks/post-receive
-- 
Gnash



reply via email to

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