gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/avm2 r9473: SETPROPERTY opcode: initialize


From: Tom Stellard
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9473: SETPROPERTY opcode: initialize the property if it is not found.
Date: Sun, 17 Aug 2008 18:33:43 +0800
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9473
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Sun 2008-08-17 18:33:43 +0800
message:
  SETPROPERTY opcode: initialize the property if it is not found.
modified:
  libcore/vm/Machine.cpp
=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp    2008-08-17 10:08:45 +0000
+++ b/libcore/vm/Machine.cpp    2008-08-17 10:33:43 +0000
@@ -1512,15 +1512,12 @@
        {
                asName a = pool_name(mStream->read_V32(), mPoolObject);
                as_value value = pop_stack();
-               if (!a.isRuntime())
-               {
-                       //TODO: Get Namespace and name value off of the stack.
-               }
-               else
-               {
-                       as_object *object = pop_stack().to_object().get();
-                       object->set_member(a.getGlobalName(),value);
-               }
+               //TODO: Get Namespace and name value off of the stack if it is 
a runtime multiname.
+               as_object *object = pop_stack().to_object().get();
+               if(!object->set_member_default(a.getGlobalName(),value,0,true)){
+                       
object->init_member(mPoolObject->mStringPool[a.getABCName()],value,0,0);
+               }
+               print_stack();
                break;
        }
 /// 0x62 ABC_ACTION_GETLOCAL


reply via email to

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