gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11920: Fix bug #28830. This removes


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11920: Fix bug #28830. This removes a bogus assertion to prevent crashes with
Date: Mon, 08 Feb 2010 09:36:14 +0100
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 11920 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2010-02-08 09:36:14 +0100
message:
  Fix bug #28830. This removes a bogus assertion to prevent crashes with
  malformed or unsupported bytecode and handles the ActionStrictMode opcode
  for completeness and so that Gnash doesn't warn about it (it is only relevant
  for compilers).
modified:
  libcore/parser/action_buffer.cpp
  libcore/swf/SWF.h
  libcore/vm/ASHandlers.cpp
  libcore/vm/ASHandlers.h
=== modified file 'libcore/parser/action_buffer.cpp'
--- a/libcore/parser/action_buffer.cpp  2010-01-25 18:52:20 +0000
+++ b/libcore/parser/action_buffer.cpp  2010-02-08 08:00:15 +0000
@@ -160,7 +160,8 @@
 // and prevents malformed instructions causing a read past the
 // end of the buffer.
 static std::string
-disasm_instruction(const unsigned char* instruction_data, size_t 
maxBufferLength)
+disasm_instruction(const unsigned char* instruction_data,
+        size_t maxBufferLength)
 {
 
     using namespace SWF;
@@ -188,7 +189,7 @@
         assert (maxBufferLength >= 3);
         ss << " (";
         fmt = ash[action_id].getArgFormat();
-        assert(fmt != ARG_NONE);
+        
         size_t length = (instruction_data[1] | (instruction_data[2] << 8));
         
         // Assert that length without the three initial bytes
@@ -201,28 +202,28 @@
                 break;
 
             case ARG_HEX:
-            {
                 ss << hexify(&instruction_data[3], length, false) << " ";
                 break;
-            }
 
             case ARG_STR:
             {
-                std::string str = hexify(&instruction_data[3], length, true);
+                const std::string str =
+                    hexify(&instruction_data[3], length, true);
                 ss << "\"" << str.c_str() << "\"";
                 break;
             }
 
             case ARG_U8:
             {
-                int val = instruction_data[3];
+                const int val = instruction_data[3];
                 ss << " " << val;
                 break;
             }
 
             case ARG_U16:
             {
-                int val = instruction_data[3] | (instruction_data[4] << 8);
+                const int val =
+                    instruction_data[3] | (instruction_data[4] << 8);
                 ss << " " << val;
                 break;
             }
@@ -238,16 +239,15 @@
             case ARG_PUSH_DATA:
             {
                 size_t i = 0;
-                while (i < length)
-                {
+                while (i < length) {
                     int type = instruction_data[3 + i];
                     
-                    // This should be safe, as the buffer is always 
0-terminated.
-                    if ( i++ ) ss << ", ";
+                    // This should be safe, as the buffer is always
+                    // 0-terminated.
+                    if (i++) ss << ", ";
 
                     switch (type)
                     {
-
                         case 0:
                         {
                             // string

=== modified file 'libcore/swf/SWF.h'
--- a/libcore/swf/SWF.h 2010-01-11 06:41:38 +0000
+++ b/libcore/swf/SWF.h 2010-02-08 07:20:42 +0000
@@ -29,11 +29,10 @@
 /// SWF tag types. Symbolic names copied from Ming
 enum TagType
 {
-    /// end of sprite or movie definition
     END                   =  0,
     SHOWFRAME             =  1,
     DEFINESHAPE           =  2,
-    FREECHARACTER        =  3,
+    FREECHARACTER         =  3,
     PLACEOBJECT           =  4,
     REMOVEOBJECT          =  5,
     DEFINEBITS            =  6,
@@ -45,154 +44,81 @@
     DOACTION              = 12,
     DEFINEFONTINFO        = 13,
     DEFINESOUND           = 14,
-
-    /// See http://sswf.sourceforge.net/SWFalexref.html#tag_startsound
     STARTSOUND            = 15,
-
-    STOPSOUND             = 16, // SWF 9
+    STOPSOUND             = 16, 
     DEFINEBUTTONSOUND     = 17,
-
-    /// SWF2
-    /// See http://sswf.sourceforge.net/SWFalexref.html#tag_soundstreamhead
     SOUNDSTREAMHEAD       = 18,
-
     SOUNDSTREAMBLOCK      = 19,
     DEFINELOSSLESS        = 20,
     DEFINEBITSJPEG2       = 21,
     DEFINESHAPE2          = 22,
     DEFINEBUTTONCXFORM    = 23,
     PROTECT               = 24,
-    PATHSAREPOSTSCRIPT   = 25,
+    PATHSAREPOSTSCRIPT    = 25,
     PLACEOBJECT2          = 26,
     REMOVEOBJECT2         = 28,
-    SYNCFRAME            = 29,
-    FREEALL              = 31,
+    SYNCFRAME             = 29,
+    FREEALL               = 31,
     DEFINESHAPE3          = 32,
     DEFINETEXT2           = 33,
     DEFINEBUTTON2         = 34,
     DEFINEBITSJPEG3       = 35,
     DEFINELOSSLESS2       = 36,
-    DEFINEEDITTEXT       = 37,
-    DEFINEVIDEO                  = 38,
-
-    /// Definition of a Sprite/MovieClip
+    DEFINEEDITTEXT        = 37,
+    DEFINEVIDEO           = 38,
     DEFINESPRITE          = 39,
-
-    NAMECHARACTER        = 40,
+    NAMECHARACTER         = 40,
     SERIALNUMBER          = 41,
-    DEFINETEXTFORMAT     = 42,
+    DEFINETEXTFORMAT      = 42,
     FRAMELABEL            = 43,
-    DEFINEBEHAVIOR        = 44, // SWF 9
-
-    /// SWF3
-    /// See http://sswf.sourceforge.net/SWFalexref.html#tag_soundstreamhead2
+    DEFINEBEHAVIOR        = 44, 
     SOUNDSTREAMHEAD2      = 45,
-
     DEFINEMORPHSHAPE      = 46,
-    FRAMETAG             = 47,
+    FRAMETAG              = 47,
     DEFINEFONT2           = 48,
-    GENCOMMAND           = 49,
-    DEFINECOMMANDOBJ     = 50,
-    CHARACTERSET         = 51,
-    FONTREF              = 52,
-    DEFINEFUNCTION        = 53, // SWF 9
-    PLACEFUNCTION         = 54, // SWF 9
-    GENTAGOBJECT          = 55, // SWF 9
+    GENCOMMAND            = 49,
+    DEFINECOMMANDOBJ      = 50,
+    CHARACTERSET          = 51,
+    FONTREF               = 52,
+    DEFINEFUNCTION        = 53,
+    PLACEFUNCTION         = 54,
+    GENTAGOBJECT          = 55,
     EXPORTASSETS          = 56,
     IMPORTASSETS          = 57,
-
-    /// See http://sswf.sourceforge.net/SWFalexref.html#tag_protectdebug
-    ENABLEDEBUGGER       = 58,
-
-    /// For actions specified with initclip directive
-    INITACTION           = 59,
-
-    DEFINEVIDEOSTREAM    = 60,
-    VIDEOFRAME           = 61,
-
-    /// DefineFontInfo2 (swf6)
+    ENABLEDEBUGGER        = 58,
+    INITACTION            = 59,
+    DEFINEVIDEOSTREAM     = 60,
+    VIDEOFRAME            = 61,
     DEFINEFONTINFO2       = 62,
-
-    DEBUGID               = 63, // SWF 9
-
-    /// See http://flasm.sourceforge.net/#protect
-    /// See http://sswf.sourceforge.net/SWFalexref.html#tag_protectdebug
-    ENABLEDEBUGGER2      = 64,
-
-    /// SWF_version  >= 7 
-    /// See http://sswf.sourceforge.net/SWFalexref.html#tag_scriptlimits
+    DEBUGID               = 63, 
+    ENABLEDEBUGGER2       = 64,
     SCRIPTLIMITS          = 65, 
-
-    /// SWF_version  >= 7 
-    /// See http://www.m2osw.com/en/swf_alexref.html#tag_settabindex
     SETTABINDEX           = 66, 
-
-    DEFINESHAPE4_         = 67, // SWF 9
-    DEFINEMORPHSHAPE2_    = 68, // SWF 9
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_fileattributes
+    DEFINESHAPE4_         = 67,
+    DEFINEMORPHSHAPE2_    = 68,
     FILEATTRIBUTES        = 69,
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_placeobject3
     PLACEOBJECT3          = 70,
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_import2
     IMPORTASSETS2         = 71,
-
     DOABC                 = 72,
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_definefontalignzones
     DEFINEALIGNZONES      = 73,
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_csmtextsettings
     CSMTEXTSETTINGS       = 74,
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_definefont3
     DEFINEFONT3           = 75,
-
-    /// SWF9
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_symbolclass
     SYMBOLCLASS           = 76,
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_metadata
     METADATA              = 77,
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_definescalinggrid
     DEFINESCALINGGRID     = 78,
-
-    /// SWF9
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_doabcdefine
     DOABCDEFINE           = 82,
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_definemorphshape2
     DEFINESHAPE4          = 83,
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#tag_definemorphshape2
     DEFINEMORPHSHAPE2     = 84,
-
     DEFINESCENEANDFRAMELABELDATA = 86,
-
-    /// http://www.m2osw.com/en/swf_alexref.html#tag_definebinarydata
     DEFINEBINARYDATA      = 87,
-
-    /// http://www.m2osw.com/en/swf_alexref.html#tag_definefontname
-    DEFINEFONTNAME        = 88,        
-
+    DEFINEFONTNAME        = 88,    
     STARTSOUND2           = 89,
-
-    /// (SWF10) http://www.m2osw.com/en/swf_alexref.html#tag_definebitsjpeg4
     DEFINEBITSJPEG4       = 90,
-
     REFLEX                = 777,
-
     DEFINEBITSPTR         = 1023
 };
 
 /// SWF action ids. Symbolic names copied from Ming.
-//
-/// For semantic of each action see:
-/// http://sswf.sourceforge.net/SWFalexref.html
-///
 enum ActionType
 {
     ACTION_END                     = 0x00,
@@ -211,10 +137,7 @@
     ACTION_SUBTRACT                = 0x0B,
     ACTION_MULTIPLY                = 0x0C,
     ACTION_DIVIDE                  = 0x0D,
-
-    /// Numeric equality (SWF4, replaced by ACTION_NEWEQUALS starting at SWF5)
     ACTION_EQUAL                   = 0x0E,
-
     ACTION_LESSTHAN                = 0x0F,
     ACTION_LOGICALAND              = 0x10,
     ACTION_LOGICALOR               = 0x11,
@@ -236,11 +159,6 @@
     ACTION_STARTDRAGMOVIE          = 0x27,
     ACTION_STOPDRAGMOVIE           = 0x28,
     ACTION_STRINGCOMPARE           = 0x29,
-
-    /// SWF7
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_throw
-    ///
     ACTION_THROW                   = 0x2A,
 
     /// SWF7
@@ -250,10 +168,6 @@
     /// then o1 is pushed back onto the stack. Otherwise Null is
     /// pushed back onto the stack. The comparison is identical
     /// to the one applied by the Instance Of  action.
-    ///
-    /// See:
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_cast_object
-    ///
     ACTION_CASTOP                  = 0x2B,
 
     /// SWF7
@@ -263,14 +177,12 @@
     /// be indicated by i2. An interface is referenced by its
     /// name (which happens to be the same as the constructor
     /// function name.)
-    ///
-    /// See:
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_implements
-    ///
     ACTION_IMPLEMENTSOP            = 0x2C,
 
     /// SWF7
-    ///
+    //
+    /// This is Flash Lite only and is ignored in the full player.
+    //
     /// This action executes an fscommand.
     /// Stack In:
     ///  i1            -- number of arguments (int)
@@ -278,12 +190,7 @@
     ///  [s3..sn]      -- arguments, as many as specified in i1
     /// Stack Out:
     ///  not known
-    ///
-    /// See:
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_fscommand2
-    ///
     ACTION_FSCOMMAND2              = 0x2D,
-
     ACTION_RANDOM                  = 0x30,
     ACTION_MBLENGTH                = 0x31,
     ACTION_ORD                     = 0x32,
@@ -292,6 +199,7 @@
     ACTION_MBSUBSTRING             = 0x35,
     ACTION_MBORD                   = 0x36,
     ACTION_MBCHR                   = 0x37,
+    ACTION_STRICTMODE              = 0x89,
     ACTION_WAITFORFRAMEEXPRESSION  = 0x8D,
     ACTION_PUSHDATA                = 0x96,
     ACTION_BRANCHALWAYS            = 0x99,
@@ -301,14 +209,8 @@
 
     /// aka GOTOFRAME2
     ACTION_GOTOEXPRESSION          = 0x9F,
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_delete
     ACTION_DELETE                  = 0x3A,
-
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_delete_all
-    /// The information in SWFalexref is pretty confusing, not sure it is 
correct...
     ACTION_DELETE2                 = 0x3B,
-
     ACTION_VAREQUALS               = 0x3C, // DEFINELOCAL actually
     ACTION_CALLFUNCTION            = 0x3D,
     ACTION_RETURN                  = 0x3E,
@@ -323,17 +225,10 @@
     /// constructor is discarded. Push the created object
     /// on the stack. The object should then be saved in
     /// a variable or object method.
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_new
-    ///
     ACTION_NEW                     = 0x40,
-
     ACTION_VAR                     = 0x41,
     ACTION_INITARRAY               = 0x42,
 
-
-    /// SWF5
-    ///
     /// Pops the number of members in the object. Pop
     /// one value and one name per member and set the
     /// corresponding member in the object. The resulting
@@ -343,103 +238,35 @@
     /// be strings thought anything is supported.
     ///
     /// Also known as 'ACTION_DECLAREOBJECT'.
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_declare_object
-    ///
     ACTION_INITOBJECT              = 0x43,
-
     ACTION_TYPEOF                  = 0x44,
 
-    /// SWF5
-    ///
     /// Pop a value from the stack. If it is a valid movieclip push
-    /// it's target back on the stack (example: _level0.sprite1.sprite2).
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_get_target
-    ///
+    /// its target back on the stack (example: _level0.sprite1.sprite2).
     ACTION_TARGETPATH              = 0x45,
-
-    /// SWF5
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_enumerate
-    ///
     ACTION_ENUMERATE               = 0x46,
-
-    /// SWF5
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_add_typed
-    ///
     ACTION_NEWADD                  = 0x47,
-
     ACTION_NEWLESSTHAN             = 0x48,
 
     /// ECMA-262 "Abstract Equality Comparison"
     //
     /// See section 11.9.3 of the ECMA 262 spec
-    ///
     ACTION_NEWEQUALS               = 0x49,
-
-    /// SWF5
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_number
-    ///
     ACTION_TONUMBER                = 0x4A,
-
-    /// SWF5
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_string
-    ///
     ACTION_TOSTRING                = 0x4B,
-
-    /// SWF5
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_duplicate
-    ///
     ACTION_DUP                     = 0x4C,
-
-    /// SWF5
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_swap
-    ///
     ACTION_SWAP                    = 0x4D,
-
-    /// SWF5
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_get_member
-    ///
     ACTION_GETMEMBER               = 0x4E,
-
-    /// SWF5
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_set_member
-    ///
     ACTION_SETMEMBER               = 0x4F,
-
-    /// SWF5
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_increment
-    ///
     ACTION_INCREMENT               = 0x50,
-
-    /// SWF5
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_decrement
-    ///
     ACTION_DECREMENT               = 0x51,
 
-    /// SWF5
-    ///
     /// Pops the name of a method (can be the empty string),
     /// pop an object, pop the number of arguments, pop each
     /// argument, call the method (function) of the object,
     /// push the returned value on the stack.
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_invoke
-    ///
     ACTION_CALLMETHOD              = 0x52,
 
-    /// SWF5
-    ///
     /// Pops the name of a method (can be the empty string),
     /// pop an object (created with the Declare Object,)
     /// pop the number of arguments, pop each argument,
@@ -447,13 +274,8 @@
     /// (function) as the constructor function of the object,
     /// push the returned value on the stack. This allows
     /// for overloaded constructors as in C++.
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_new_method
-    ///
     ACTION_NEWMETHOD               = 0x53, 
 
-    /// SWF6
-    ///
     /// Pops the name of a constructor (s1 - ie. "Color")
     /// then the name of an object (s2). Checks whether the
     /// named object is part of the class defined by the
@@ -462,20 +284,11 @@
     /// to cast an object to another using the Cast Object
     /// action. This action returns a copy of the object or
     /// Null, which in many cases can be much more practical.
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_instance_of
-    ///
     ACTION_INSTANCEOF              = 0x54,
 
-    /// SWF6
-    ///
     /// Pops an object from the stack, push a null, then
     /// push the name of each member on the stack.
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_enumerate_object
-    ///
     ACTION_ENUM2                   = 0x55,
-
     ACTION_BITWISEAND              = 0x60,
     ACTION_BITWISEOR               = 0x61,
     ACTION_BITWISEXOR              = 0x62,
@@ -484,36 +297,21 @@
     ACTION_SHIFTRIGHT2             = 0x65,
     ACTION_STRICTEQ                = 0x66,
 
-    /// SWF6
-    ///
     /// Similar to Swap + Less Than. It checks whether the
     /// second parameter is greater than the first and return
     /// the boolean result on the stack.
-    ///
-    /// See:
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_greater_than_typed
-    ///
     ACTION_GREATER                 = 0x67,
 
-    /// SWF6
-    ///
     /// Similar to Swap + String Less Than. It checks whether
     /// the second string is greater than the first and
     /// return the boolean result on the stack.
-    ///
-    /// See:
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_string_greater_than
-    ///
     ACTION_STRINGGREATER           = 0x68,
 
-    ///
-    /// SWF7
-    ///
     /// The Extends action will be used to define a new object
     /// which extends another object. The declaration in
     /// ActionScript is:
     ///
-    ///        class A extends B;
+    ///    class A extends B;
     ///
     /// In an SWF action script, you don't exactly declare
     /// objects, you actually instantiate them and define their
@@ -522,33 +320,12 @@
     ///
     /// Use this action whenever you need to inherit an object
     /// without calling its constructor.
-    ///
-    /// See:
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_extends
-    ///
     ACTION_EXTENDS                 = 0x69,
-
-    /// See:
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_declare_dictionary
     ACTION_CONSTANTPOOL            = 0x88,
-
-
-    /// SWF7
-    ///
-    /// See:
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_declare_function2
-    ///
     ACTION_DEFINEFUNCTION2         = 0x8E,
-
-    /// SWF7
-    ///
-    /// http://sswf.sourceforge.net/SWFalexref.html#action_try
-    ///
     ACTION_TRY                     = 0x8F,
-
     ACTION_WITH                    = 0x94,
     ACTION_DEFINEFUNCTION          = 0x9B,
-
     ACTION_SETREGISTER             = 0x87
 
 };
@@ -1413,7 +1190,7 @@
     /// b
     /// Stack Out:
     /// a + b (double if numeric)
-    ABC_ACTION_ADD                = 0xA0,
+    ABC_ACTION_ADD           = 0xA0,
 
     /// Stack In:    /// Stack In:
     ///  a
@@ -1738,18 +1515,18 @@
 /// http://sswf.sourceforge.net/SWFalexref.html#swf_fill_style
 ///
 enum fill_style_type {
-       FILL_SOLID                   = 0x00,
-       FILL_LINEAR_GRADIENT         = 0x10,
-       FILL_RADIAL_GRADIENT         = 0x12,
-       FILL_FOCAL_GRADIENT          = 0x13,
-       FILL_TILED_BITMAP            = 0x40,
-       FILL_CLIPPED_BITMAP          = 0x41,
-
-       /// swf8 (alexis is wrong), non-smoothed / hard edges
-       FILL_TILED_BITMAP_HARD       = 0x42, 
-
-       /// swf8 (alexis is wrong), non-smoothed / hard edges
-       FILL_CLIPPED_BITMAP_HARD     = 0x43
+    FILL_SOLID                   = 0x00,
+    FILL_LINEAR_GRADIENT         = 0x10,
+    FILL_RADIAL_GRADIENT         = 0x12,
+    FILL_FOCAL_GRADIENT          = 0x13,
+    FILL_TILED_BITMAP            = 0x40,
+    FILL_CLIPPED_BITMAP          = 0x41,
+
+    /// swf8 (alexis is wrong), non-smoothed / hard edges
+    FILL_TILED_BITMAP_HARD       = 0x42, 
+
+    /// swf8 (alexis is wrong), non-smoothed / hard edges
+    FILL_CLIPPED_BITMAP_HARD     = 0x43
 
 };
 

=== modified file 'libcore/vm/ASHandlers.cpp'
--- a/libcore/vm/ASHandlers.cpp 2010-01-11 06:41:38 +0000
+++ b/libcore/vm/ASHandlers.cpp 2010-02-08 07:55:30 +0000
@@ -64,7 +64,6 @@
 // 0 : no assertions
 // 1 : quick assertions
 // 2 : check that handlers are called on correct tag
-//
 #ifndef GNASH_PARANOIA_LEVEL
 # define GNASH_PARANOIA_LEVEL 1
 #endif
@@ -83,33 +82,148 @@
             unsigned int nargs);
     as_object* toObject(Global_as& gl, const as_value& val);
 
-       /// Common code for ActionGetUrl and ActionGetUrl2
-       //
-       /// @see http://sswf.sourceforge.net/SWFalexref.html#action_get_url2
-       /// @see http://sswf.sourceforge.net/SWFalexref.html#action_get_url
-       ///
-       /// @param target
-       ///     the target window or _level1 to _level10
-       ///
-       /// @param method
-       ///     0:NONE, 1:GET, 2:POST
-       ///
-       void commonGetURL(as_environment& env, as_value target,
+    /// Common code for ActionGetUrl and ActionGetUrl2
+    //
+    /// @param target         the target window or _level1 to _level10
+    /// @param method       0:NONE, 1:GET, 2:POST
+    void commonGetURL(as_environment& env, as_value target,
             const std::string& url, boost::uint8_t method);
-}
-
-namespace SWF { // gnash::SWF
-
-static void unsupported_action_handler(ActionExec& thread)
-{
-    log_error(_("Unsupported action handler invoked, code at pc is %#x"),
-            static_cast<int>(thread.code[thread.getCurrentPC()]));
-}
-
+    
+    /// Common code for SetTarget and SetTargetExpression
+    ///
+    /// @param target_name      The target name. If empty new target will
+    ///                         be the main movie.
+    /// @param thread           The current execution thread.
+    void commonSetTarget(ActionExec& thread, const std::string& target_name);
+
+
+    enum as_encoding_guess_t {
+        ENCGUESS_UNICODE = 0,
+        ENCGUESS_JIS = 1,
+        ENCGUESS_OTHER = 2
+    };
+
+    /// Common code for guessing at the encoding of random text, between
+    // Shift-Jis, UTF8, and other. Puts the DisplayObject count in length,
+    // and the offsets to the DisplayObjects in offsets, if offsets is not 
NULL.
+    // If not NULL, offsets should be at least s.length().
+    // offsets are not accurate if the return value is GUESSENC_OTHER
+    //
+    /// NB It's doubtful if this even works.
+    as_encoding_guess_t guessEncoding(const std::string& s, int& length,
+            std::vector<int>& offsets);
+
+    
+    void ActionEnd(ActionExec& thread);
+    void ActionNextFrame(ActionExec& thread);
+    void ActionPrevFrame(ActionExec& thread);
+    void ActionPlay(ActionExec& thread);
+    void ActionStop(ActionExec& thread);
+    void ActionToggleQuality(ActionExec& thread);
+    void ActionStopSounds(ActionExec& thread);
+    void ActionGotoFrame(ActionExec& thread);
+    void ActionGetUrl(ActionExec& thread);
+    void ActionWaitForFrame(ActionExec& thread);
+    void ActionSetTarget(ActionExec& thread);
+    void ActionGotoLabel(ActionExec& thread);
+    void ActionAdd(ActionExec& thread);
+    void ActionSubtract(ActionExec& thread);
+    void ActionMultiply(ActionExec& thread);
+    void ActionDivide(ActionExec& thread);
+    void ActionEqual(ActionExec& thread);
+    void ActionLessThan(ActionExec& thread);
+    void ActionLogicalAnd(ActionExec& thread);
+    void ActionLogicalOr(ActionExec& thread);
+    void ActionLogicalNot(ActionExec& thread);
+    void ActionStringEq(ActionExec& thread);
+    void ActionStringLength(ActionExec& thread);
+    void ActionSubString(ActionExec& thread);
+    void ActionPop(ActionExec& thread);
+    void ActionInt(ActionExec& thread);
+    void ActionGetVariable(ActionExec& thread);
+    void ActionSetVariable(ActionExec& thread);
+    void ActionSetTargetExpression(ActionExec& thread);
+    void ActionStringConcat(ActionExec& thread);
+    void ActionGetProperty(ActionExec& thread);
+    void ActionSetProperty(ActionExec& thread);
+    void ActionDuplicateClip(ActionExec& thread);
+    void ActionRemoveClip(ActionExec& thread);
+    void ActionTrace(ActionExec& thread);
+    void ActionStartDragMovie(ActionExec& thread);
+    void ActionStopDragMovie(ActionExec& thread);
+    void ActionStringCompare(ActionExec& thread);
+    void ActionThrow(ActionExec& thread);
+    void ActionCastOp(ActionExec& thread);
+    void ActionImplementsOp(ActionExec& thread);
+    void ActionFscommand2(ActionExec& thread);
+    void ActionRandom(ActionExec& thread);
+    void ActionMbLength(ActionExec& thread);
+    void ActionOrd(ActionExec& thread);
+    void ActionChr(ActionExec& thread);
+    void ActionGetTimer(ActionExec& thread);
+    void ActionMbSubString(ActionExec& thread);
+    void ActionMbOrd(ActionExec& thread);
+    void ActionMbChr(ActionExec& thread);
+    void ActionStrictMode(ActionExec& thread);
+    void ActionWaitForFrameExpression(ActionExec& thread);
+    void ActionPushData(ActionExec& thread);
+    void ActionBranchAlways(ActionExec& thread);
+    void ActionGetUrl2(ActionExec& thread);
+    void ActionBranchIfTrue(ActionExec& thread);
+    void ActionCallFrame(ActionExec& thread);
+    void ActionGotoExpression(ActionExec& thread);
+    void ActionDelete(ActionExec& thread);
+    void ActionDelete2(ActionExec& thread);
+    void ActionVarEquals(ActionExec& thread);
+    void ActionCallFunction(ActionExec& thread);
+    void ActionReturn(ActionExec& thread);
+    void ActionModulo(ActionExec& thread);
+    void ActionNew(ActionExec& thread);
+    void ActionVar(ActionExec& thread);
+    void ActionInitArray(ActionExec& thread);
+    void ActionInitObject(ActionExec& thread);
+    void ActionTypeOf(ActionExec& thread);
+    void ActionTargetPath(ActionExec& thread);
+    void ActionEnumerate(ActionExec& thread);
+    void ActionNewAdd(ActionExec& thread);
+    void ActionNewLessThan(ActionExec& thread);
+    void ActionNewEquals(ActionExec& thread);
+    void ActionToNumber(ActionExec& thread);
+    void ActionToString(ActionExec& thread);
+    void ActionDup(ActionExec& thread);
+    void ActionSwap(ActionExec& thread);
+    void ActionGetMember(ActionExec& thread);
+    void ActionSetMember(ActionExec& thread);
+    void ActionIncrement(ActionExec& thread);
+    void ActionDecrement(ActionExec& thread);
+    void ActionCallMethod(ActionExec& thread);
+    void ActionNewMethod(ActionExec& thread);
+    void ActionInstanceOf(ActionExec& thread);
+    void ActionEnum2(ActionExec& thread);
+    void ActionBitwiseAnd(ActionExec& thread);
+    void ActionBitwiseOr(ActionExec& thread);
+    void ActionBitwiseXor(ActionExec& thread);
+    void ActionShiftLeft(ActionExec& thread);
+    void ActionShiftRight(ActionExec& thread);
+    void ActionShiftRight2(ActionExec& thread);
+    void ActionStrictEq(ActionExec& thread);
+    void ActionGreater(ActionExec& thread);
+    void ActionStringGreater(ActionExec& thread);
+    void ActionExtends(ActionExec& thread);
+    void ActionConstantPool(ActionExec& thread);
+    void ActionDefineFunction2(ActionExec& thread);
+    void ActionTry(ActionExec& thread);
+    void ActionWith(ActionExec& thread);
+    void ActionDefineFunction(ActionExec& thread);
+    void ActionSetRegister(ActionExec& thread);
+    void ActionUnsupported(ActionExec& thread);
+}
+
+namespace SWF { 
 ActionHandler::ActionHandler()
     :
     _name("unsupported"),
-    _callback(unsupported_action_handler),
+    _callback(ActionUnsupported),
     _debug(false),
     _arg_format(ARG_NONE)
 {
@@ -155,219 +269,220 @@
 SWFHandlers::SWFHandlers()
 {
 
-    // Just to be sure we can start using different handler
-    // based on version (would make sense)
-    if ( ! VM::isInitialized() )
-    {
-        log_error(_("FIXME: VM not initialized at SWFHandlers construction 
time, can't set action handlers based on SWF version"));
-    }
-
     container_type & handlers = get_handlers();
 
     handlers[ACTION_END] = ActionHandler(ACTION_END,
-             "<End>", SWFHandlers::ActionEnd);
+             "End", ActionEnd);
     handlers[ACTION_NEXTFRAME] = ActionHandler(ACTION_NEXTFRAME,
-             "NextFrame", SWFHandlers::ActionNextFrame);
+             "NextFrame", ActionNextFrame);
     handlers[ACTION_PREVFRAME] =  ActionHandler(ACTION_PREVFRAME,
-             "PreviousFrame", SWFHandlers::ActionPrevFrame);
+             "PreviousFrame", ActionPrevFrame);
     handlers[ACTION_PLAY] = ActionHandler(ACTION_PLAY,
-             "Play", SWFHandlers::ActionPlay);
+             "Play", ActionPlay);
     handlers[ACTION_STOP] = ActionHandler(ACTION_STOP,
-             "Stop", SWFHandlers::ActionStop);
+             "Stop", ActionStop);
     handlers[ACTION_TOGGLEQUALITY] = ActionHandler(ACTION_TOGGLEQUALITY,
-             "ToggleQuality", SWFHandlers::ActionToggleQuality);
+             "ToggleQuality", ActionToggleQuality);
     handlers[ACTION_STOPSOUNDS] = ActionHandler(ACTION_STOPSOUNDS,
-             "StopSounds", SWFHandlers::ActionStopSounds);
+             "StopSounds", ActionStopSounds);
     handlers[ACTION_GOTOFRAME] = ActionHandler(ACTION_GOTOFRAME,
-             "GotoFrame", SWFHandlers::ActionGotoFrame, ARG_U16);
+             "GotoFrame", ActionGotoFrame, ARG_U16);
     handlers[ACTION_GETURL] = ActionHandler(ACTION_GETURL,
-             "GetUrl", SWFHandlers::ActionGetUrl, ARG_STR);
+             "GetUrl", ActionGetUrl, ARG_STR);
     handlers[ACTION_WAITFORFRAME] = ActionHandler(ACTION_WAITFORFRAME,
-             "WaitForFrame", SWFHandlers::ActionWaitForFrame, ARG_HEX);
+             "WaitForFrame", ActionWaitForFrame, ARG_HEX);
     handlers[ACTION_SETTARGET] = ActionHandler(ACTION_SETTARGET,
-             "SetTarget", SWFHandlers::ActionSetTarget, ARG_STR);
+             "SetTarget", ActionSetTarget, ARG_STR);
     handlers[ACTION_GOTOLABEL] = ActionHandler(ACTION_GOTOLABEL,
-             "GotoLabel", SWFHandlers::ActionGotoLabel, ARG_STR);
+             "GotoLabel", ActionGotoLabel, ARG_STR);
     handlers[ACTION_ADD] = ActionHandler(ACTION_ADD,
-             "Add", SWFHandlers::ActionAdd);
+             "Add", ActionAdd);
     handlers[ACTION_SUBTRACT] = ActionHandler(ACTION_SUBTRACT,
-             "Subtract", SWFHandlers::ActionSubtract);
+             "Subtract", ActionSubtract);
     handlers[ACTION_MULTIPLY] = ActionHandler(ACTION_MULTIPLY,
-             "Multiply", SWFHandlers::ActionMultiply);
+             "Multiply", ActionMultiply);
     handlers[ACTION_DIVIDE] = ActionHandler(ACTION_DIVIDE,
-             "Divide", SWFHandlers::ActionDivide);
+             "Divide", ActionDivide);
     handlers[ACTION_EQUAL] = ActionHandler(ACTION_EQUAL,
-             "Equal", SWFHandlers::ActionEqual);
+             "Equal", ActionEqual);
     handlers[ACTION_LESSTHAN] = ActionHandler(ACTION_LESSTHAN,
-             "LessThan", SWFHandlers::ActionLessThan);
+             "LessThan", ActionLessThan);
     handlers[ACTION_LOGICALAND] = ActionHandler(ACTION_LOGICALAND,
-             "LogicalAnd", SWFHandlers::ActionLogicalAnd);
+             "LogicalAnd", ActionLogicalAnd);
     handlers[ACTION_LOGICALOR] = ActionHandler(ACTION_LOGICALOR,
-             "LogicalOr", SWFHandlers::ActionLogicalOr);
+             "LogicalOr", ActionLogicalOr);
     handlers[ACTION_LOGICALNOT] = ActionHandler(ACTION_LOGICALNOT,
-             "LogicalNot", SWFHandlers::ActionLogicalNot);
+             "LogicalNot", ActionLogicalNot);
     handlers[ACTION_STRINGEQ] = ActionHandler(ACTION_STRINGEQ,
-             "StringEq", SWFHandlers::ActionStringEq);
+             "StringEq", ActionStringEq);
     handlers[ACTION_STRINGLENGTH] = ActionHandler(ACTION_STRINGLENGTH,
-             "ActionStringLength", SWFHandlers::ActionStringLength);
+             "ActionStringLength", ActionStringLength);
     handlers[ACTION_SUBSTRING] = ActionHandler(ACTION_SUBSTRING,
-             "ActionSubString", SWFHandlers::ActionSubString);
+             "ActionSubString", ActionSubString);
     handlers[ACTION_POP] = ActionHandler(ACTION_POP,
-             "ActionPop", SWFHandlers::ActionPop);
+             "ActionPop", ActionPop);
     handlers[ACTION_INT] = ActionHandler(ACTION_INT,
-             "ActionInt", SWFHandlers::ActionInt);
+             "ActionInt", ActionInt);
     handlers[ACTION_GETVARIABLE] = ActionHandler(ACTION_GETVARIABLE,
-             "ActionGetVariable", SWFHandlers::ActionGetVariable);
+             "ActionGetVariable", ActionGetVariable);
     handlers[ACTION_SETVARIABLE] = ActionHandler(ACTION_SETVARIABLE,
-             "ActionSetVariable", SWFHandlers::ActionSetVariable);
-    handlers[ACTION_SETTARGETEXPRESSION] = 
ActionHandler(ACTION_SETTARGETEXPRESSION,
-             "ActionSetTargetExpression", 
SWFHandlers::ActionSetTargetExpression);
+             "ActionSetVariable", ActionSetVariable);
+    handlers[ACTION_SETTARGETEXPRESSION] =
+        ActionHandler(ACTION_SETTARGETEXPRESSION,
+             "ActionSetTargetExpression",
+             ActionSetTargetExpression);
     handlers[ACTION_STRINGCONCAT] = ActionHandler(ACTION_STRINGCONCAT,
-             "ActionStringConcat", SWFHandlers::ActionStringConcat);
+             "ActionStringConcat", ActionStringConcat);
     handlers[ACTION_GETPROPERTY] = ActionHandler(ACTION_GETPROPERTY,
-             "ActionGetProperty", SWFHandlers::ActionGetProperty);
+             "ActionGetProperty", ActionGetProperty);
     handlers[ACTION_SETPROPERTY] = ActionHandler(ACTION_SETPROPERTY,
-             "ActionSetProperty", SWFHandlers::ActionSetProperty);
+             "ActionSetProperty", ActionSetProperty);
     handlers[ACTION_DUPLICATECLIP] = ActionHandler(ACTION_DUPLICATECLIP,
-             "ActionDuplicateClip", SWFHandlers::ActionDuplicateClip);
+             "ActionDuplicateClip", ActionDuplicateClip);
     handlers[ACTION_REMOVECLIP] = ActionHandler(ACTION_REMOVECLIP,
-             "ActionRemoveClip", SWFHandlers::ActionRemoveClip);
+             "ActionRemoveClip", ActionRemoveClip);
     handlers[ACTION_TRACE] = ActionHandler(ACTION_TRACE,
-             "ActionTrace", SWFHandlers::ActionTrace);
+             "ActionTrace", ActionTrace);
     handlers[ACTION_STARTDRAGMOVIE] = ActionHandler(ACTION_STARTDRAGMOVIE,
-             "ActionStartDragMovie", SWFHandlers::ActionStartDragMovie);
+             "ActionStartDragMovie", ActionStartDragMovie);
     handlers[ACTION_STOPDRAGMOVIE] = ActionHandler(ACTION_STOPDRAGMOVIE,
-             "ActionStopDragMovie", SWFHandlers::ActionStopDragMovie);
+             "ActionStopDragMovie", ActionStopDragMovie);
     handlers[ACTION_STRINGCOMPARE] = ActionHandler(ACTION_STRINGCOMPARE,
-             "ActionStringCompare", SWFHandlers::ActionStringCompare);
+             "ActionStringCompare", ActionStringCompare);
     handlers[ACTION_THROW] = ActionHandler(ACTION_THROW,
-             "ActionThrow", SWFHandlers::ActionThrow);
+             "ActionThrow", ActionThrow);
     handlers[ACTION_CASTOP] = ActionHandler(ACTION_CASTOP,
-             "ActionCastOp", SWFHandlers::ActionCastOp);
+             "ActionCastOp", ActionCastOp);
     handlers[ACTION_IMPLEMENTSOP] = ActionHandler(ACTION_IMPLEMENTSOP,
-             "ActionImplementsOp", SWFHandlers::ActionImplementsOp);
+             "ActionImplementsOp", ActionImplementsOp);
     handlers[ACTION_FSCOMMAND2] = ActionHandler(ACTION_FSCOMMAND2,
-             "ActionFscommand2", SWFHandlers::ActionFscommand2);
+             "ActionFscommand2", ActionFscommand2);
     handlers[ACTION_RANDOM] = ActionHandler(ACTION_RANDOM,
-             "ActionRandom", SWFHandlers::ActionRandom);
+             "ActionRandom", ActionRandom);
     handlers[ACTION_MBLENGTH] = ActionHandler(ACTION_MBLENGTH,
-             "ActionMbLength", SWFHandlers::ActionMbLength);
+             "ActionMbLength", ActionMbLength);
     handlers[ACTION_ORD] = ActionHandler(ACTION_ORD,
-             "ActionOrd", SWFHandlers::ActionOrd);
+             "ActionOrd", ActionOrd);
     handlers[ACTION_CHR] = ActionHandler(ACTION_CHR,
-             "ActionChr", SWFHandlers::ActionChr);
+             "ActionChr", ActionChr);
     handlers[ACTION_GETTIMER] = ActionHandler(ACTION_GETTIMER,
-             "ActionGetTimer", SWFHandlers::ActionGetTimer);
+             "ActionGetTimer", ActionGetTimer);
     handlers[ACTION_MBSUBSTRING] = ActionHandler(ACTION_MBSUBSTRING,
-             "ActionMbSubString", SWFHandlers::ActionMbSubString);
+             "ActionMbSubString", ActionMbSubString);
     handlers[ACTION_MBORD] = ActionHandler(ACTION_MBORD,
-             "ActionMbOrd", SWFHandlers::ActionMbOrd);
+             "ActionMbOrd", ActionMbOrd);
     handlers[ACTION_MBCHR] = ActionHandler(ACTION_MBCHR,
-             "ActionMbChr", SWFHandlers::ActionMbChr);
-    handlers[ACTION_WAITFORFRAMEEXPRESSION] = 
ActionHandler(ACTION_WAITFORFRAMEEXPRESSION,
+             "ActionMbChr", ActionMbChr);
+    handlers[ACTION_STRICTMODE] = ActionHandler(ACTION_STRICTMODE,
+             "ActionStrictMode", ActionStrictMode, ARG_U8);
+    handlers[ACTION_WAITFORFRAMEEXPRESSION] =
+        ActionHandler(ACTION_WAITFORFRAMEEXPRESSION,
              "ActionWaitForFrameExpression",
-             SWFHandlers::ActionWaitForFrameExpression, ARG_HEX);
+             ActionWaitForFrameExpression, ARG_HEX);
     handlers[ACTION_PUSHDATA] = ActionHandler(ACTION_PUSHDATA,
-             "ActionPushData", SWFHandlers::ActionPushData, ARG_PUSH_DATA);
+             "ActionPushData", ActionPushData, ARG_PUSH_DATA);
     handlers[ACTION_BRANCHALWAYS] = ActionHandler(ACTION_BRANCHALWAYS,
-             "ActionBranchAlways", SWFHandlers::ActionBranchAlways, ARG_S16);
+             "ActionBranchAlways", ActionBranchAlways, ARG_S16);
     handlers[ACTION_GETURL2] = ActionHandler(ACTION_GETURL2,
-             "ActionGetUrl2", SWFHandlers::ActionGetUrl2, ARG_HEX);
+             "ActionGetUrl2", ActionGetUrl2, ARG_HEX);
     handlers[ACTION_BRANCHIFTRUE] = ActionHandler(ACTION_BRANCHIFTRUE,
-             "ActionBranchIfTrue", SWFHandlers::ActionBranchIfTrue, ARG_S16);
+             "ActionBranchIfTrue", ActionBranchIfTrue, ARG_S16);
     handlers[ACTION_CALLFRAME] = ActionHandler(ACTION_CALLFRAME,
-             "ActionCallFrame", SWFHandlers::ActionCallFrame, ARG_HEX);
+             "ActionCallFrame", ActionCallFrame, ARG_HEX);
     handlers[ACTION_GOTOEXPRESSION] = ActionHandler(ACTION_GOTOEXPRESSION,
-             "ActionGotoExpression", SWFHandlers::ActionGotoExpression, 
ARG_HEX);
+             "ActionGotoExpression",
+             ActionGotoExpression, ARG_HEX);
     handlers[ACTION_DELETE] = ActionHandler(ACTION_DELETE,
-             "ActionDelete", SWFHandlers::ActionDelete);
+             "ActionDelete", ActionDelete);
     handlers[ACTION_DELETE2] = ActionHandler(ACTION_DELETE2,
-             "ActionDelete2", SWFHandlers::ActionDelete2);
+             "ActionDelete2", ActionDelete2);
     handlers[ACTION_VAREQUALS] = ActionHandler(ACTION_VAREQUALS,
-             "ActionVarEquals", SWFHandlers::ActionVarEquals);
+             "ActionVarEquals", ActionVarEquals);
     handlers[ACTION_CALLFUNCTION] = ActionHandler(ACTION_CALLFUNCTION,
-             "ActionCallFunction", SWFHandlers::ActionCallFunction);
+             "ActionCallFunction", ActionCallFunction);
     handlers[ACTION_RETURN] = ActionHandler(ACTION_RETURN,
-             "ActionReturn", SWFHandlers::ActionReturn);
+             "ActionReturn", ActionReturn);
     handlers[ACTION_MODULO] = ActionHandler(ACTION_MODULO,
-             "ActionModulo", SWFHandlers::ActionModulo);
+             "ActionModulo", ActionModulo);
     handlers[ACTION_NEW] = ActionHandler(ACTION_NEW,
-             "ActionNew", SWFHandlers::ActionNew);
+             "ActionNew", ActionNew);
     handlers[ACTION_VAR] = ActionHandler(ACTION_VAR,
-             "ActionVar", SWFHandlers::ActionVar);
+             "ActionVar", ActionVar);
     handlers[ACTION_INITARRAY] = ActionHandler(ACTION_INITARRAY,
-             "ActionInitArray", SWFHandlers::ActionInitArray);
+             "ActionInitArray", ActionInitArray);
     handlers[ACTION_INITOBJECT] = ActionHandler(ACTION_INITOBJECT,
-             "ActionInitObject", SWFHandlers::ActionInitObject);
+             "ActionInitObject", ActionInitObject);
     handlers[ACTION_TYPEOF] = ActionHandler(ACTION_TYPEOF,
-             "ActionTypeOf", SWFHandlers::ActionTypeOf);
+             "ActionTypeOf", ActionTypeOf);
     handlers[ACTION_TARGETPATH] = ActionHandler(ACTION_TARGETPATH,
-             "ActionTargetPath", SWFHandlers::ActionTargetPath);
+             "ActionTargetPath", ActionTargetPath);
     handlers[ACTION_ENUMERATE] = ActionHandler(ACTION_ENUMERATE,
-             "ActionEnumerate", SWFHandlers::ActionEnumerate);
+             "ActionEnumerate", ActionEnumerate);
     handlers[ACTION_NEWADD] = ActionHandler(ACTION_NEWADD,
-             "ActionNewAdd", SWFHandlers::ActionNewAdd);
+             "ActionNewAdd", ActionNewAdd);
     handlers[ACTION_NEWLESSTHAN] = ActionHandler(ACTION_NEWLESSTHAN,
-             "ActionNewLessThan", SWFHandlers::ActionNewLessThan);
+             "ActionNewLessThan", ActionNewLessThan);
     handlers[ACTION_NEWEQUALS] = ActionHandler(ACTION_NEWEQUALS,
-             "ActionNewEquals", SWFHandlers::ActionNewEquals);
+             "ActionNewEquals", ActionNewEquals);
     handlers[ACTION_TONUMBER] = ActionHandler(ACTION_TONUMBER,
-             "ActionToNumber", SWFHandlers::ActionToNumber);
+             "ActionToNumber", ActionToNumber);
     handlers[ACTION_TOSTRING] = ActionHandler(ACTION_TOSTRING,
-             "ActionToString", SWFHandlers::ActionToString);
+             "ActionToString", ActionToString);
     handlers[ACTION_DUP] = ActionHandler(ACTION_DUP,
-             "ActionDup", SWFHandlers::ActionDup);
+             "ActionDup", ActionDup);
     handlers[ACTION_SWAP] = ActionHandler(ACTION_SWAP,
-             "ActionSwap", SWFHandlers::ActionSwap);
+             "ActionSwap", ActionSwap);
     handlers[ACTION_GETMEMBER] = ActionHandler(ACTION_GETMEMBER,
-             "ActionGetMember", SWFHandlers::ActionGetMember);
+             "ActionGetMember", ActionGetMember);
     handlers[ACTION_SETMEMBER] = ActionHandler(ACTION_SETMEMBER,
-             "ActionSetMember", SWFHandlers::ActionSetMember);
+             "ActionSetMember", ActionSetMember);
     handlers[ACTION_INCREMENT] = ActionHandler(ACTION_INCREMENT,
-             "ActionIncrement", SWFHandlers::ActionIncrement);
+             "ActionIncrement", ActionIncrement);
     handlers[ACTION_DECREMENT] = ActionHandler(ACTION_DECREMENT,
-             "ActionDecrement", SWFHandlers::ActionDecrement);
+             "ActionDecrement", ActionDecrement);
     handlers[ACTION_CALLMETHOD] = ActionHandler(ACTION_CALLMETHOD,
-             "ActionCallMethod", SWFHandlers::ActionCallMethod);
+             "ActionCallMethod", ActionCallMethod);
     handlers[ACTION_NEWMETHOD] = ActionHandler(ACTION_NEWMETHOD,
-             "ActionNewMethod", SWFHandlers::ActionNewMethod);
+             "ActionNewMethod", ActionNewMethod);
     handlers[ACTION_INSTANCEOF] = ActionHandler(ACTION_INSTANCEOF,
-             "ActionInstanceOf", SWFHandlers::ActionInstanceOf);
+             "ActionInstanceOf", ActionInstanceOf);
     handlers[ACTION_ENUM2] = ActionHandler(ACTION_ENUM2,
-             "ActionEnum2", SWFHandlers::ActionEnum2);
+             "ActionEnum2", ActionEnum2);
     handlers[ACTION_BITWISEAND] = ActionHandler(ACTION_BITWISEAND,
-             "ActionBitwiseAnd", SWFHandlers::ActionBitwiseAnd);
+             "ActionBitwiseAnd", ActionBitwiseAnd);
     handlers[ACTION_BITWISEOR] = ActionHandler(ACTION_BITWISEOR,
-             "ActionBitwiseOr", SWFHandlers::ActionBitwiseOr);
+             "ActionBitwiseOr", ActionBitwiseOr);
     handlers[ACTION_BITWISEXOR] = ActionHandler(ACTION_BITWISEXOR,
-             "ActionBitwiseXor", SWFHandlers::ActionBitwiseXor);
+             "ActionBitwiseXor", ActionBitwiseXor);
     handlers[ACTION_SHIFTLEFT] = ActionHandler(ACTION_SHIFTLEFT,
-             "ActionShiftLeft", SWFHandlers::ActionShiftLeft);
+             "ActionShiftLeft", ActionShiftLeft);
     handlers[ACTION_SHIFTRIGHT] = ActionHandler(ACTION_SHIFTRIGHT,
-             "ActionShiftRight", SWFHandlers::ActionShiftRight);
+             "ActionShiftRight", ActionShiftRight);
     handlers[ACTION_SHIFTRIGHT2] = ActionHandler(ACTION_SHIFTRIGHT2,
-             "ActionShiftRight2", SWFHandlers::ActionShiftRight2);
+             "ActionShiftRight2", ActionShiftRight2);
     handlers[ACTION_STRICTEQ] = ActionHandler(ACTION_STRICTEQ,
-             "ActionStrictEq", SWFHandlers::ActionStrictEq);
+             "ActionStrictEq", ActionStrictEq);
     handlers[ACTION_GREATER] = ActionHandler(ACTION_GREATER,
-             "ActionGreater", SWFHandlers::ActionGreater);
+             "ActionGreater", ActionGreater);
     handlers[ACTION_STRINGGREATER] = ActionHandler(ACTION_STRINGGREATER,
-             "ActionStringGreater", SWFHandlers::ActionStringGreater);
+             "ActionStringGreater", ActionStringGreater);
     handlers[ACTION_EXTENDS] = ActionHandler(ACTION_EXTENDS,
-             "ActionExtends", SWFHandlers::ActionExtends);
+             "ActionExtends", ActionExtends);
     handlers[ACTION_CONSTANTPOOL] = ActionHandler(ACTION_CONSTANTPOOL,
-             "ActionConstantPool", SWFHandlers::ActionConstantPool, 
ARG_DECL_DICT);
+             "ActionConstantPool", ActionConstantPool,
+             ARG_DECL_DICT);
     handlers[ACTION_DEFINEFUNCTION2] = ActionHandler(ACTION_DEFINEFUNCTION2,
-             "ActionDefineFunction2", SWFHandlers::ActionDefineFunction2,
+             "ActionDefineFunction2", ActionDefineFunction2,
              ARG_FUNCTION2);
     handlers[ACTION_TRY] = ActionHandler(ACTION_TRY,
-             "ActionTry", SWFHandlers::ActionTry, ARG_FUNCTION2);
+             "ActionTry", ActionTry, ARG_FUNCTION2);
     handlers[ACTION_WITH] = ActionHandler(ACTION_WITH,
-             "ActionWith", SWFHandlers::ActionWith, ARG_U16);
+             "ActionWith", ActionWith, ARG_U16);
     handlers[ACTION_DEFINEFUNCTION] = ActionHandler(ACTION_DEFINEFUNCTION,
-             "ActionDefineFunction", SWFHandlers::ActionDefineFunction, 
ARG_HEX);
+             "ActionDefineFunction", ActionDefineFunction,
+             ARG_HEX);
     handlers[ACTION_SETREGISTER] = ActionHandler(ACTION_SETREGISTER,
-             "ActionSetRegister", SWFHandlers::ActionSetRegister, ARG_U8);
+             "ActionSetRegister", ActionSetRegister, ARG_U8);
 }
 
 SWFHandlers::~SWFHandlers()
@@ -400,8 +515,30 @@
     }
 }
 
+const char*
+SWFHandlers::action_name(ActionType x) const
+{
+    if (static_cast<size_t>(x) > get_handlers().size())
+    {
+        log_error(_("at SWFHandlers::action_name(%d) call time, "
+                    "_handlers size is %d"),
+                    x, get_handlers().size());
+        return NULL;
+    }
+    else
+    {
+        return get_handlers()[x].getName().c_str();
+    }
+}
+
+
+} // namespace SWF
+
+
+namespace {
+
 void
-SWFHandlers::ActionEnd(ActionExec& thread)
+ActionEnd(ActionExec& thread)
 {
 
 #if GNASH_PARANOIA_LEVEL > 1
@@ -414,7 +551,7 @@
 
 
 void
-SWFHandlers::ActionNextFrame(ActionExec& thread)
+ActionNextFrame(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -430,7 +567,7 @@
 }
 
 void
-SWFHandlers::ActionPrevFrame(ActionExec& thread)
+ActionPrevFrame(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -446,7 +583,7 @@
 }
 
 void
-SWFHandlers::ActionPlay(ActionExec& thread)
+ActionPlay(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -462,7 +599,7 @@
 }
 
 void
-SWFHandlers::ActionStop(ActionExec& thread)
+ActionStop(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -478,7 +615,7 @@
 }
 
 void
-SWFHandlers::ActionToggleQuality(ActionExec&
+ActionToggleQuality(ActionExec&
 #if GNASH_PARANOIA_LEVEL > 1
     thread
 #endif
@@ -493,7 +630,7 @@
 }
 
 void
-SWFHandlers::ActionStopSounds(ActionExec& thread)
+ActionStopSounds(ActionExec& thread)
 {
 
 #if GNASH_PARANOIA_LEVEL > 1
@@ -509,7 +646,7 @@
 }
 
 void
-SWFHandlers::ActionGotoFrame(ActionExec& thread)
+ActionGotoFrame(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -533,7 +670,7 @@
 }
 
 void
-SWFHandlers::ActionGetUrl(ActionExec& thread)
+ActionGetUrl(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -569,7 +706,7 @@
 }
 
 void
-SWFHandlers::ActionWaitForFrame(ActionExec& thread)
+ActionWaitForFrame(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -628,7 +765,7 @@
 }
 
 void
-SWFHandlers::ActionSetTarget(ActionExec& thread)
+ActionSetTarget(ActionExec& thread)
 {
 
     const action_buffer& code = thread.code;
@@ -641,11 +778,11 @@
     // Change the movie we're working on.
     std::string target_name ( code.read_string(pc+3) );
 
-    CommonSetTarget(thread, target_name);
+    commonSetTarget(thread, target_name);
 }
 
 void
-SWFHandlers::ActionGotoLabel(ActionExec& thread)
+ActionGotoLabel(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -666,7 +803,7 @@
 }
 
 void
-SWFHandlers::ActionAdd(ActionExec& thread)
+ActionAdd(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -678,7 +815,7 @@
 }
 
 void
-SWFHandlers::ActionSubtract(ActionExec& thread)
+ActionSubtract(ActionExec& thread)
 {
     as_environment& env = thread.env;
     subtract(env.top(1), env.top(0), getVM(env));
@@ -686,7 +823,7 @@
 }
 
 void
-SWFHandlers::ActionMultiply(ActionExec& thread)
+ActionMultiply(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -703,7 +840,7 @@
 // 0 / 0 : NaN
 // Either operand is NaN: NaN
 void
-SWFHandlers::ActionDivide(ActionExec& thread)
+ActionDivide(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -738,7 +875,7 @@
 }
 
 void
-SWFHandlers::ActionEqual(ActionExec& thread)
+ActionEqual(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -759,7 +896,7 @@
 }
 
 void
-SWFHandlers::ActionLessThan(ActionExec& thread)
+ActionLessThan(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -773,7 +910,7 @@
 }
 
 void
-SWFHandlers::ActionLogicalAnd(ActionExec& thread)
+ActionLogicalAnd(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -783,7 +920,7 @@
 }
 
 void
-SWFHandlers::ActionLogicalOr(ActionExec& thread)
+ActionLogicalOr(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -793,7 +930,7 @@
 }
 
 void
-SWFHandlers::ActionLogicalNot(ActionExec& thread)
+ActionLogicalNot(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -805,7 +942,7 @@
 }
 
 void
-SWFHandlers::ActionStringEq(ActionExec& thread)
+ActionStringEq(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -819,7 +956,7 @@
 }
 
 void
-SWFHandlers::ActionStringLength(ActionExec& thread)
+ActionStringLength(ActionExec& thread)
 {
     as_environment& env = thread.env;
 
@@ -840,7 +977,7 @@
 }
 
 void
-SWFHandlers::ActionSubString(ActionExec& thread)
+ActionSubString(ActionExec& thread)
 {
 
     // substring("string",  base,  size) 
@@ -924,7 +1061,7 @@
 }
 
 void
-SWFHandlers::ActionPop(ActionExec& thread)
+ActionPop(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -934,14 +1071,14 @@
 }
 
 void
-SWFHandlers::ActionInt(ActionExec& thread)
+ActionInt(ActionExec& thread)
 {
     as_environment& env = thread.env;
     env.top(0).set_double(toInt(env.top(0)));
 }
 
 void
-SWFHandlers::ActionGetVariable(ActionExec& thread)
+ActionGetVariable(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -978,7 +1115,7 @@
 }
 
 void
-SWFHandlers::ActionSetVariable(ActionExec& thread)
+ActionSetVariable(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -1010,7 +1147,7 @@
 
 // See: http://sswf.sourceforge.net/SWFalexref.html#action_get_dynamic
 void
-SWFHandlers::ActionSetTargetExpression(ActionExec& thread)
+ActionSetTargetExpression(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -1024,13 +1161,13 @@
     // 
     std::string target_name = env.top(0).to_string(env.get_version());
 
-    CommonSetTarget(thread, target_name);
+    commonSetTarget(thread, target_name);
 
     env.drop(1); // pop the target sprite off the stack
 }
 
 void
-SWFHandlers::ActionStringConcat(ActionExec& thread)
+ActionStringConcat(ActionExec& thread)
 {
     as_environment& env = thread.env;
     const int version = getSWFVersion(env);
@@ -1041,7 +1178,7 @@
 }
 
 void
-SWFHandlers::ActionGetProperty(ActionExec& thread)
+ActionGetProperty(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -1083,7 +1220,7 @@
 }
 
 void
-SWFHandlers::ActionSetProperty(ActionExec& thread)
+ActionSetProperty(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -1109,7 +1246,7 @@
 }
 
 void
-SWFHandlers::ActionDuplicateClip(ActionExec& thread)
+ActionDuplicateClip(ActionExec& thread)
 {
     //GNASH_REPORT_FUNCTION;
     as_environment& env = thread.env;
@@ -1162,7 +1299,7 @@
 }
 
 void
-SWFHandlers::ActionRemoveClip(ActionExec& thread)
+ActionRemoveClip(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -1194,7 +1331,7 @@
 
 /// \brief Trace messages from the Flash movie using trace();
 void
-SWFHandlers::ActionTrace(ActionExec& thread)
+ActionTrace(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -1209,7 +1346,7 @@
 }
 
 void
-SWFHandlers::ActionStartDragMovie(ActionExec& thread)
+ActionStartDragMovie(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -1284,7 +1421,7 @@
 }
 
 void
-SWFHandlers::ActionStopDragMovie(ActionExec& thread)
+ActionStopDragMovie(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -1295,7 +1432,7 @@
 }
 
 void
-SWFHandlers::ActionStringCompare(ActionExec& thread)
+ActionStringCompare(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -1306,7 +1443,7 @@
 }
 
 void
-SWFHandlers::ActionThrow(ActionExec& thread)
+ActionThrow(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -1319,7 +1456,7 @@
 }
 
 void
-SWFHandlers::ActionCastOp(ActionExec& thread)
+ActionCastOp(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -1370,7 +1507,7 @@
 /// for "c instanceOf B);". That seems to be the end of its usefulness, as
 /// c inherits no properties from B.
 void
-SWFHandlers::ActionImplementsOp(ActionExec& thread)
+ActionImplementsOp(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -1449,7 +1586,7 @@
 /// Flash Lite (from 1.1 onwards) and is used to control
 /// devices (backlight, vibrate etc).
 void
-SWFHandlers::ActionFscommand2(ActionExec& thread)
+ActionFscommand2(ActionExec& thread)
 {
 
 #if GNASH_PARANOIA_LEVEL > 1
@@ -1483,7 +1620,7 @@
 }
 
 void
-SWFHandlers::ActionRandom(ActionExec& thread)
+ActionRandom(ActionExec& thread)
 {
 
     // Action random(n) should return an integer from 0 up to (not
@@ -1508,103 +1645,8 @@
     env.top(0).set_double(uni());
 }
 
-as_encoding_guess_t
-SWFHandlers::guessEncoding(const std::string &str, int &length, 
std::vector<int>& offsets)
-{
-    int width = 0; // The remaining width, not the total.
-    bool is_sought = true;
-
-    std::string::const_iterator it = str.begin();
-    const std::string::const_iterator e = str.end();
-
-    length = 0;
-    
-    // First, assume it's UTF8 and try to be wrong.
-    while (it != e && is_sought)
-    {
-        ++length;
-
-        offsets.push_back(it - str.begin()); // current position
-
-        // Advances the iterator to point to the next 
-        boost::uint32_t c = utf8::decodeNextUnicodeCharacter(it, e);
-
-        if (c == utf8::invalid)
-        {
-            is_sought = false;
-            break;
-        }
-    }
-
-    offsets.push_back(it - str.begin()); // current position
-
-    if (it == e && is_sought)
-    {
-        // No characters left, so it's almost certainly UTF8.
-        return ENCGUESS_UNICODE;
-    }
-
-    it = str.begin();
-    int index = 0;
-    is_sought = true;
-    width = 0;
-    length = 0;
-    bool was_odd = true;
-    bool was_even = true;
-    // Now, assume it's SHIFT_JIS and try to be wrong.
-    while (it != e && is_sought)
-    {
-        int c = static_cast<int> (*it);
-
-        if (width)
-        {
-            --width;
-            if ((c < 0x40) || ((c < 0x9F) && was_even) ||
-                ((c > 0x9E) && was_odd) || (c == 0x7F))
-            {
-                is_sought = false;
-            }
-            continue;
-        }
-
-        ++length;
-        offsets.push_back(index); // [length - 1] = index;
-
-        if ((c == 0x80) || (c == 0xA0) || (c >= 0xF0))
-        {
-            is_sought = false;
-            break;
-        }
-
-        if (((c >= 0x81) && (c <= 0x9F)) || ((c >= 0xE0) && (c <= 0xEF)))
-        {
-            width = 1;
-            was_odd = c & 0x01;
-            was_even = !was_odd;
-        }
-    
-        it++;
-        index++;    
-    }
-    offsets.push_back(index); // [length - 1] = index;
-    
-    if (!width && is_sought)
-    {
-        // No width left, so it's probably SHIFT_JIS.
-        return ENCGUESS_JIS;
-    }
-
-    // It's something else.
-    length = std::mbstowcs(NULL, str.c_str(), 0);
-    if (length == -1)
-    {
-        length = str.length();
-    }
-    return ENCGUESS_OTHER;
-}
-
 void
-SWFHandlers::ActionMbLength(ActionExec& thread)
+ActionMbLength(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -1627,7 +1669,7 @@
 }
 
 void
-SWFHandlers::ActionOrd(ActionExec& thread)
+ActionOrd(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -1653,7 +1695,7 @@
 }
 
 void
-SWFHandlers::ActionChr(ActionExec& thread)
+ActionChr(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -1693,7 +1735,7 @@
 }
 
 void
-SWFHandlers::ActionGetTimer(ActionExec& thread)
+ActionGetTimer(ActionExec& thread)
 {
     
     
@@ -1704,7 +1746,7 @@
 }
 
 void
-SWFHandlers::ActionMbSubString(ActionExec& thread)
+ActionMbSubString(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -1731,9 +1773,6 @@
 
     as_encoding_guess_t encoding = guessEncoding(str, length, offsets);
 
-    //log_debug("Guessed encoding for %s: %d - len:%d, offsets.size:%d", str, 
encoding, length, offsets.size());
-    //for (int i=0; i<offsets.size(); ++i) log_debug("  offsets[%d]: %d", i, 
offsets[i]);
-
     if (size < 0)
     {
         IF_VERBOSE_ASCODING_ERRORS(
@@ -1789,7 +1828,7 @@
 }
 
 void
-SWFHandlers::ActionMbOrd(ActionExec& thread)
+ActionMbOrd(ActionExec& thread)
 {
     /// This only deals with UTF-8 characters.
     /// TODO: what else is possible?
@@ -1814,7 +1853,7 @@
 }
 
 void
-SWFHandlers::ActionMbChr(ActionExec& thread)
+ActionMbChr(ActionExec& thread)
 {
     /// This only generates UTF-8 characters. No idea
     /// what difference user locale might make, but UTF-8
@@ -1839,18 +1878,34 @@
 
 }
 
+/// Sets strict mode in the compiler.
+//
+/// This is irrelevant for execution, but included for completeness.
+void
+ActionStrictMode(ActionExec& thread)
+{
+    const action_buffer& code = thread.code;
+    
+    // off if 0, on for anything else.
+    const bool on = code[thread.getCurrentPC() + 3];
+    
+    IF_VERBOSE_ACTION(
+        log_action(_("ActionStrictMode set to %1%"), on);
+    );
+}
+
+
+
 // also known as WaitForFrame2
 void
-SWFHandlers::ActionWaitForFrameExpression(ActionExec& thread)
+ActionWaitForFrameExpression(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
     const action_buffer& code = thread.code;
 
-    
-
     // how many actions to skip if frame has not been loaded
-    boost::uint8_t skip = code[thread.getCurrentPC()+3];
+    const boost::uint8_t skip = code[thread.getCurrentPC() + 3];
 
     // env.top(0) contains frame specification,
     // evaluated as for ActionGotoExpression
@@ -1858,15 +1913,14 @@
 
     DisplayObject* tgtch = env.get_target();
     MovieClip* target_sprite = tgtch ? tgtch->to_movie() : 0;
-    if ( ! target_sprite )
-    {
+    if (!target_sprite) {
         log_error(_("%s: environment target is null or not a MovieClip"),
             __FUNCTION__);
         return;
     }
 
     size_t framenum;
-        if ( ! target_sprite->get_frame_number(framespec, framenum) )
+    if ( ! target_sprite->get_frame_number(framespec, framenum) )
     {
         IF_VERBOSE_ASCODING_ERRORS(
         log_aserror(_("Frame spec found on stack "
@@ -1877,10 +1931,8 @@
         return;
     }
 
-    size_t lastloaded = target_sprite->get_loaded_frames();
-    if ( lastloaded < framenum )
-    {
-        //log_debug(_("ActionWaitForFrameExpression: frame %u not reached yet 
(loaded %u), skipping next %u actions"), framenum, lastloaded, skip);
+    const size_t lastloaded = target_sprite->get_loaded_frames();
+    if (lastloaded < framenum) {
         // better delegate this to ActionExec
         thread.skip_actions(skip);
     }
@@ -1888,7 +1940,7 @@
 }
 
 void
-SWFHandlers::ActionPushData(ActionExec& thread)
+ActionPushData(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -2057,24 +2109,23 @@
             }
         }
 
-        IF_VERBOSE_ACTION (
-        if ( type == pushDict8 || type == pushDict16 )
-        {
-            log_action(_("\t%d) type=%s (%d), value=%s"),
-                count, pushType[type], id, env.top(0));
-        }
-        else
-        {
-            log_action(_("\t%d) type=%s, value=%s"),
-                count, pushType[type], env.top(0));
-        }
-        ++count;
+        IF_VERBOSE_ACTION(
+            if (type == pushDict8 || type == pushDict16) {
+                log_action(_("\t%d) type=%s (%d), value=%s"),
+                    count, pushType[type], id, env.top(0));
+            }
+            else
+            {
+                log_action(_("\t%d) type=%s, value=%s"),
+                    count, pushType[type], env.top(0));
+            }
+            ++count;
         );
     }
 }
 
 void
-SWFHandlers::ActionBranchAlways(ActionExec& thread)
+ActionBranchAlways(ActionExec& thread)
 {
     
 
@@ -2083,39 +2134,8 @@
     // @@ TODO range checks
 }
 
-// Common code for SetTarget and SetTargetExpression. See:
-// http://sswf.sourceforge.net/SWFalexref.html#action_set_target
-// http://sswf.sourceforge.net/SWFalexref.html#action_get_dynamic
-void
-SWFHandlers::CommonSetTarget(ActionExec& thread, const std::string& 
target_name)
-{
-    as_environment& env = thread.env;
-
-    // see swfdec's settarget-relative-*.swf
-    env.reset_target();
-
-    DisplayObject *new_target;
-
-    // if the string is blank, we reset the target to its original value
-    if ( target_name.empty() ) return;
-
-    new_target = env.find_target(target_name); // TODO: pass 
thread.getScopeStack()
-    if (new_target == NULL)
-    {
-        IF_VERBOSE_ASCODING_ERRORS (
-        log_aserror(_("Couldn't find movie \"%s\" to set target to!"
-            " Setting target to NULL..."), target_name);
-        );
-        //return;
-    }
-    //else
-    //{
-        env.set_target(new_target);
-    //}
-}
-
-void
-SWFHandlers::ActionGetUrl2(ActionExec& thread)
+void
+ActionGetUrl2(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -2141,7 +2161,7 @@
 }
 
 void
-SWFHandlers::ActionBranchIfTrue(ActionExec& thread)
+ActionBranchIfTrue(ActionExec& thread)
 {
 
     // Alias these
@@ -2174,7 +2194,7 @@
 }
 
 void
-SWFHandlers::ActionCallFrame(ActionExec& thread)
+ActionCallFrame(ActionExec& thread)
 {
     //GNASH_REPORT_FUNCTION;
     as_environment& env = thread.env;
@@ -2211,7 +2231,7 @@
 }
 
 void
-SWFHandlers::ActionGotoExpression(ActionExec& thread)
+ActionGotoExpression(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -2283,7 +2303,7 @@
 
 
 void
-SWFHandlers::ActionDelete(ActionExec& thread)
+ActionDelete(ActionExec& thread)
 {
     //GNASH_REPORT_FUNCTION;
     as_environment& env = thread.env;
@@ -2371,7 +2391,7 @@
 }
 
 void
-SWFHandlers::ActionDelete2(ActionExec& thread)
+ActionDelete2(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -2411,7 +2431,7 @@
 }
 
 void
-SWFHandlers::ActionVarEquals(ActionExec& thread)
+ActionVarEquals(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -2428,7 +2448,7 @@
 }
 
 void
-SWFHandlers::ActionCallFunction(ActionExec& thread)
+ActionCallFunction(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -2505,7 +2525,7 @@
 }
 
 void
-SWFHandlers::ActionReturn(ActionExec& thread)
+ActionReturn(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -2525,7 +2545,7 @@
 }
 
 void
-SWFHandlers::ActionModulo(ActionExec& thread)
+ActionModulo(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -2541,7 +2561,7 @@
 }
 
 void
-SWFHandlers::ActionNew(ActionExec& thread)
+ActionNew(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -2588,7 +2608,7 @@
 }
 
 void
-SWFHandlers::ActionVar(ActionExec& thread)
+ActionVar(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -2608,7 +2628,7 @@
 }
 
 void
-SWFHandlers::ActionInitArray(ActionExec& thread)
+ActionInitArray(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -2632,7 +2652,7 @@
 }
 
 void
-SWFHandlers::ActionInitObject(ActionExec& thread)
+ActionInitObject(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -2670,14 +2690,14 @@
 }
 
 void
-SWFHandlers::ActionTypeOf(ActionExec& thread)
+ActionTypeOf(ActionExec& thread)
 {
     as_environment& env = thread.env;
     env.top(0).set_string(env.top(0).typeOf());
 }
 
 void
-SWFHandlers::ActionTargetPath(ActionExec& thread)
+ActionTargetPath(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -2707,7 +2727,7 @@
 }
 
 void
-SWFHandlers::ActionEnumerate(ActionExec& thread)
+ActionEnumerate(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -2735,7 +2755,7 @@
 }
 
 void
-SWFHandlers::ActionNewAdd(ActionExec& thread)
+ActionNewAdd(ActionExec& thread)
 {
     as_environment& env = thread.env;
 
@@ -2745,7 +2765,7 @@
 }
 
 void
-SWFHandlers::ActionNewLessThan(ActionExec& thread)
+ActionNewLessThan(ActionExec& thread)
 {
     as_environment& env = thread.env;
     env.top(1) = newLessThan(env.top(1), env.top(0), getVM(env));
@@ -2753,7 +2773,7 @@
 }
 
 void
-SWFHandlers::ActionNewEquals(ActionExec& thread)
+ActionNewEquals(ActionExec& thread)
 {
     as_environment& env = thread.env;
 
@@ -2793,35 +2813,35 @@
 }
 
 void
-SWFHandlers::ActionToNumber(ActionExec& thread)
+ActionToNumber(ActionExec& thread)
 {
     as_environment& env = thread.env;
     convertToNumber(env.top(0), getVM(env));
 }
 
 void
-SWFHandlers::ActionToString(ActionExec& thread)
+ActionToString(ActionExec& thread)
 {
     as_environment& env = thread.env;
     convertToString(env.top(0), getVM(env));
 }
 
 void
-SWFHandlers::ActionDup(ActionExec& thread)
+ActionDup(ActionExec& thread)
 {
     as_environment& env = thread.env;
     env.push(env.top(0));
 }
 
 void
-SWFHandlers::ActionSwap(ActionExec& thread)
+ActionSwap(ActionExec& thread)
 {
     as_environment& env = thread.env;
     std::swap(env.top(1), env.top(0));
 }
 
 void
-SWFHandlers::ActionGetMember(ActionExec& thread)
+ActionGetMember(ActionExec& thread)
 {
         
     as_environment& env = thread.env;
@@ -2870,7 +2890,7 @@
 }
 
 void
-SWFHandlers::ActionSetMember(ActionExec& thread)
+ActionSetMember(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -2913,14 +2933,14 @@
 }
 
 void
-SWFHandlers::ActionIncrement(ActionExec& thread)
+ActionIncrement(ActionExec& thread)
 {
     as_environment& env = thread.env;
     env.top(0).set_double(env.top(0).to_number() + 1);
 }
 
 void
-SWFHandlers::ActionDecrement(ActionExec& thread)
+ActionDecrement(ActionExec& thread)
 {
     as_environment& env = thread.env;
     env.top(0).set_double(env.top(0).to_number() - 1);
@@ -2948,7 +2968,7 @@
 //
 /// In both usages the arguments are passed.
 void
-SWFHandlers::ActionCallMethod(ActionExec& thread)
+ActionCallMethod(ActionExec& thread)
 {
     as_environment& env = thread.env;
 
@@ -3088,7 +3108,7 @@
     call.super = super;
     call.callerDef = &(thread.code.getMovieDefinition());
     as_value result;
-       try {
+    try {
         result = method_obj->call(call);
     } catch (ActionTypeError& e) {
         IF_VERBOSE_ASCODING_ERRORS(
@@ -3104,7 +3124,7 @@
 }
 
 void
-SWFHandlers::ActionNewMethod(ActionExec& thread)
+ActionNewMethod(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -3187,7 +3207,7 @@
 }
 
 void
-SWFHandlers::ActionInstanceOf(ActionExec& thread)
+ActionInstanceOf(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -3217,7 +3237,7 @@
 }
 
 void
-SWFHandlers::ActionEnum2(ActionExec& thread)
+ActionEnum2(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -3244,7 +3264,7 @@
 }
 
 void
-SWFHandlers::ActionBitwiseAnd(ActionExec& thread)
+ActionBitwiseAnd(ActionExec& thread)
 {
     as_environment& env = thread.env;
 
@@ -3256,7 +3276,7 @@
 }
 
 void
-SWFHandlers::ActionBitwiseOr(ActionExec& thread)
+ActionBitwiseOr(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -3269,7 +3289,7 @@
 }
 
 void
-SWFHandlers::ActionBitwiseXor(ActionExec& thread)
+ActionBitwiseXor(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -3282,7 +3302,7 @@
 }
 
 void
-SWFHandlers::ActionShiftLeft(ActionExec& thread)
+ActionShiftLeft(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -3302,7 +3322,7 @@
 }
 
 void
-SWFHandlers::ActionShiftRight(ActionExec& thread)
+ActionShiftRight(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -3317,7 +3337,7 @@
 }
 
 void
-SWFHandlers::ActionShiftRight2(ActionExec& thread)
+ActionShiftRight2(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -3332,7 +3352,7 @@
 }
 
 void
-SWFHandlers::ActionStrictEq(ActionExec& thread)
+ActionStrictEq(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -3342,7 +3362,7 @@
 }
 
 void
-SWFHandlers::ActionGreater(ActionExec& thread)
+ActionGreater(ActionExec& thread)
 {
     // Just swap the operator and invoke ActionNewLessThan
     as_environment& env = thread.env;
@@ -3353,7 +3373,7 @@
 }
 
 void
-SWFHandlers::ActionStringGreater(ActionExec& thread)
+ActionStringGreater(ActionExec& thread)
 {
     
     as_environment& env = thread.env;
@@ -3364,7 +3384,7 @@
 }
 
 void
-SWFHandlers::ActionExtends(ActionExec& thread)
+ActionExtends(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -3390,27 +3410,27 @@
     }
     env.drop(2);
 
-       as_object* newproto = new as_object(gl);
-       as_object* p = super->getMember(NSV::PROP_PROTOTYPE).to_object(gl);
-       newproto->set_prototype(p);
+    as_object* newproto = new as_object(gl);
+    as_object* p = super->getMember(NSV::PROP_PROTOTYPE).to_object(gl);
+    newproto->set_prototype(p);
 
     if (getSWFVersion(*super) > 5) {
         const int flags = PropFlags::dontEnum;
         newproto->init_member(NSV::PROP_uuCONSTRUCTORuu, super, flags); 
     }
 
-       sub->init_member(NSV::PROP_PROTOTYPE, as_value(newproto));
+    sub->init_member(NSV::PROP_PROTOTYPE, as_value(newproto));
 
 }
 
 void
-SWFHandlers::ActionConstantPool(ActionExec& thread)
+ActionConstantPool(ActionExec& thread)
 {
     thread.code.process_decl_dict(thread.getCurrentPC(), thread.getNextPC());
 }
 
 void
-SWFHandlers::ActionDefineFunction2(ActionExec& thread)
+ActionDefineFunction2(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -3518,7 +3538,7 @@
 }
 
 void
-SWFHandlers::ActionTry(ActionExec& thread)
+ActionTry(ActionExec& thread)
 {
 
     const action_buffer& code = thread.code;
@@ -3575,7 +3595,7 @@
 
 /// See: http://sswf.sourceforge.net/SWFalexref.html#action_with
 void
-SWFHandlers::ActionWith(ActionExec& thread)
+ActionWith(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -3636,7 +3656,7 @@
 }
 
 void
-SWFHandlers::ActionDefineFunction(ActionExec& thread)
+ActionDefineFunction(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -3729,7 +3749,7 @@
 }
 
 void
-SWFHandlers::ActionSetRegister(ActionExec& thread)
+ActionSetRegister(ActionExec& thread)
 {
 
     as_environment& env = thread.env;
@@ -3770,27 +3790,14 @@
     }
 }
 
-const char*
-SWFHandlers::action_name(ActionType x) const
+
+void
+ActionUnsupported(ActionExec& thread)
 {
-    if (static_cast<size_t>(x) > get_handlers().size())
-    {
-        log_error(_("at SWFHandlers::action_name(%d) call time, "
-                    "_handlers size is %d"),
-                    x, get_handlers().size());
-        return NULL;
-    }
-    else
-    {
-        return get_handlers()[x].getName().c_str();
-    }
+    log_error(_("Unsupported action handler invoked, code at pc is %#x"),
+            static_cast<int>(thread.code[thread.getCurrentPC()]));
 }
 
-} // namespace gnash::SWF
-
-/// Helper functions.
-namespace {
-
 as_object*
 toObject(Global_as& gl, const as_value& val)
 {
@@ -4023,6 +4030,130 @@
 
 }
 
+// Common code for SetTarget and SetTargetExpression. See:
+// http://sswf.sourceforge.net/SWFalexref.html#action_set_target
+// http://sswf.sourceforge.net/SWFalexref.html#action_get_dynamic
+void
+commonSetTarget(ActionExec& thread, const std::string& target_name)
+{
+    as_environment& env = thread.env;
+
+    // see swfdec's settarget-relative-*.swf
+    env.reset_target();
+
+    DisplayObject *new_target;
+
+    // if the string is blank, we reset the target to its original value
+    if ( target_name.empty() ) return;
+
+    // TODO: pass thread.getScopeStack()
+    new_target = env.find_target(target_name); 
+    if (!new_target) {
+        IF_VERBOSE_ASCODING_ERRORS (
+        log_aserror(_("Couldn't find movie \"%s\" to set target to!"
+            " Setting target to NULL..."), target_name);
+        );
+    }
+    
+    env.set_target(new_target);
+}
+
+as_encoding_guess_t
+guessEncoding(const std::string &str, int &length, std::vector<int>& offsets)
+{
+    int width = 0; // The remaining width, not the total.
+    bool is_sought = true;
+
+    std::string::const_iterator it = str.begin();
+    const std::string::const_iterator e = str.end();
+
+    length = 0;
+    
+    // First, assume it's UTF8 and try to be wrong.
+    while (it != e && is_sought)
+    {
+        ++length;
+
+        offsets.push_back(it - str.begin()); // current position
+
+        // Advances the iterator to point to the next 
+        boost::uint32_t c = utf8::decodeNextUnicodeCharacter(it, e);
+
+        if (c == utf8::invalid)
+        {
+            is_sought = false;
+            break;
+        }
+    }
+
+    offsets.push_back(it - str.begin()); // current position
+
+    if (it == e && is_sought)
+    {
+        // No characters left, so it's almost certainly UTF8.
+        return ENCGUESS_UNICODE;
+    }
+
+    it = str.begin();
+    int index = 0;
+    is_sought = true;
+    width = 0;
+    length = 0;
+    bool was_odd = true;
+    bool was_even = true;
+    // Now, assume it's SHIFT_JIS and try to be wrong.
+    while (it != e && is_sought)
+    {
+        int c = static_cast<int> (*it);
+
+        if (width)
+        {
+            --width;
+            if ((c < 0x40) || ((c < 0x9F) && was_even) ||
+                ((c > 0x9E) && was_odd) || (c == 0x7F))
+            {
+                is_sought = false;
+            }
+            continue;
+        }
+
+        ++length;
+        offsets.push_back(index); // [length - 1] = index;
+
+        if ((c == 0x80) || (c == 0xA0) || (c >= 0xF0))
+        {
+            is_sought = false;
+            break;
+        }
+
+        if (((c >= 0x81) && (c <= 0x9F)) || ((c >= 0xE0) && (c <= 0xEF)))
+        {
+            width = 1;
+            was_odd = c & 0x01;
+            was_even = !was_odd;
+        }
+    
+        it++;
+        index++;    
+    }
+    offsets.push_back(index); // [length - 1] = index;
+    
+    if (!width && is_sought)
+    {
+        // No width left, so it's probably SHIFT_JIS.
+        return ENCGUESS_JIS;
+    }
+
+    // It's something else.
+    length = std::mbstowcs(NULL, str.c_str(), 0);
+    if (length == -1)
+    {
+        length = str.length();
+    }
+    return ENCGUESS_OTHER;
+}
+
+
 }
 
 

=== modified file 'libcore/vm/ASHandlers.h'
--- a/libcore/vm/ASHandlers.h   2010-01-11 06:41:38 +0000
+++ b/libcore/vm/ASHandlers.h   2010-02-08 07:44:10 +0000
@@ -47,12 +47,6 @@
     ARG_FUNCTION2
 };
 
-enum as_encoding_guess_t {
-    ENCGUESS_UNICODE = 0,
-    ENCGUESS_JIS = 1,
-    ENCGUESS_OTHER = 2
-};
-
 
 class ActionHandler
 {
@@ -88,11 +82,6 @@
 {
 public:
 
-       /// TODO: use a vector as we can have at most 254 actions
-       /// (127 w/out length, 127 with length, the high bit is
-       ///  used to distinguish the two types)
-       //typedef std::map<ActionType, ActionHandler> container_type;
-
        // Indexed by action id
        typedef std::vector<ActionHandler> container_type;
 
@@ -122,130 +111,6 @@
 
        static container_type & get_handlers();
 
-       /// Common code for SetTarget and SetTargetExpression
-       //
-       /// @see http://sswf.sourceforge.net/SWFalexref.html#action_set_target
-       /// @see http://sswf.sourceforge.net/SWFalexref.html#action_get_dynamic
-       ///
-       /// @param target_name
-       ///     The target name. If empty new target will be the main movie.
-       ///
-       /// @param thread
-       ///     The current execution thread.
-       ///
-       static void CommonSetTarget(ActionExec& thread, 
-                       const std::string& target_name);
-
-    /// Common code for guessing at the encoding of random text, between
-    // Shift-Jis, UTF8, and other. Puts the DisplayObject count in length,
-    // and the offsets to the DisplayObjects in offsets, if offsets is not 
NULL.
-    // If not NULL, offsets should be at least s.length().
-    // offsets are not accurate if the return value is GUESSENC_OTHER
-    static as_encoding_guess_t guessEncoding(const std::string& s, int& length,
-            std::vector<int>& offsets);
-
-       static void ActionEnd(ActionExec& thread);
-       static void ActionNextFrame(ActionExec& thread);
-       static void ActionPrevFrame(ActionExec& thread);
-       static void ActionPlay(ActionExec& thread);
-       static void ActionStop(ActionExec& thread);
-       static void ActionToggleQuality(ActionExec& thread);
-       static void ActionStopSounds(ActionExec& thread);
-       static void ActionGotoFrame(ActionExec& thread);
-       static void ActionGetUrl(ActionExec& thread);
-       static void ActionWaitForFrame(ActionExec& thread);
-       static void ActionSetTarget(ActionExec& thread);
-       static void ActionGotoLabel(ActionExec& thread);
-       static void ActionAdd(ActionExec& thread);
-       static void ActionSubtract(ActionExec& thread);
-       static void ActionMultiply(ActionExec& thread);
-       static void ActionDivide(ActionExec& thread);
-       static void ActionEqual(ActionExec& thread);
-       static void ActionLessThan(ActionExec& thread);
-       static void ActionLogicalAnd(ActionExec& thread);
-       static void ActionLogicalOr(ActionExec& thread);
-       static void ActionLogicalNot(ActionExec& thread);
-       static void ActionStringEq(ActionExec& thread);
-       static void ActionStringLength(ActionExec& thread);
-       static void ActionSubString(ActionExec& thread);
-       static void ActionPop(ActionExec& thread);
-       static void ActionInt(ActionExec& thread);
-       static void ActionGetVariable(ActionExec& thread);
-       static void ActionSetVariable(ActionExec& thread);
-       static void ActionSetTargetExpression(ActionExec& thread);
-       static void ActionStringConcat(ActionExec& thread);
-       static void ActionGetProperty(ActionExec& thread);
-       static void ActionSetProperty(ActionExec& thread);
-       static void ActionDuplicateClip(ActionExec& thread);
-       static void ActionRemoveClip(ActionExec& thread);
-       static void ActionTrace(ActionExec& thread);
-       static void ActionStartDragMovie(ActionExec& thread);
-       static void ActionStopDragMovie(ActionExec& thread);
-       static void ActionStringCompare(ActionExec& thread);
-       static void ActionThrow(ActionExec& thread);
-       static void ActionCastOp(ActionExec& thread);
-       static void ActionImplementsOp(ActionExec& thread);
-       static void ActionFscommand2(ActionExec& thread);
-       static void ActionRandom(ActionExec& thread);
-       static void ActionMbLength(ActionExec& thread);
-       static void ActionOrd(ActionExec& thread);
-       static void ActionChr(ActionExec& thread);
-       static void ActionGetTimer(ActionExec& thread);
-       static void ActionMbSubString(ActionExec& thread);
-       static void ActionMbOrd(ActionExec& thread);
-       static void ActionMbChr(ActionExec& thread);
-       static void ActionWaitForFrameExpression(ActionExec& thread);
-       static void ActionPushData(ActionExec& thread);
-       static void ActionBranchAlways(ActionExec& thread);
-       static void ActionGetUrl2(ActionExec& thread);
-       static void ActionBranchIfTrue(ActionExec& thread);
-       static void ActionCallFrame(ActionExec& thread);
-       static void ActionGotoExpression(ActionExec& thread);
-       static void ActionDelete(ActionExec& thread);
-       static void ActionDelete2(ActionExec& thread);
-       static void ActionVarEquals(ActionExec& thread);
-       static void ActionCallFunction(ActionExec& thread);
-       static void ActionReturn(ActionExec& thread);
-       static void ActionModulo(ActionExec& thread);
-       static void ActionNew(ActionExec& thread);
-       static void ActionVar(ActionExec& thread);
-       static void ActionInitArray(ActionExec& thread);
-       static void ActionInitObject(ActionExec& thread);
-       static void ActionTypeOf(ActionExec& thread);
-       static void ActionTargetPath(ActionExec& thread);
-       static void ActionEnumerate(ActionExec& thread);
-       static void ActionNewAdd(ActionExec& thread);
-       static void ActionNewLessThan(ActionExec& thread);
-       static void ActionNewEquals(ActionExec& thread);
-       static void ActionToNumber(ActionExec& thread);
-       static void ActionToString(ActionExec& thread);
-       static void ActionDup(ActionExec& thread);
-       static void ActionSwap(ActionExec& thread);
-       static void ActionGetMember(ActionExec& thread);
-       static void ActionSetMember(ActionExec& thread);
-       static void ActionIncrement(ActionExec& thread);
-       static void ActionDecrement(ActionExec& thread);
-       static void ActionCallMethod(ActionExec& thread);
-       static void ActionNewMethod(ActionExec& thread);
-       static void ActionInstanceOf(ActionExec& thread);
-       static void ActionEnum2(ActionExec& thread);
-       static void ActionBitwiseAnd(ActionExec& thread);
-       static void ActionBitwiseOr(ActionExec& thread);
-       static void ActionBitwiseXor(ActionExec& thread);
-       static void ActionShiftLeft(ActionExec& thread);
-       static void ActionShiftRight(ActionExec& thread);
-       static void ActionShiftRight2(ActionExec& thread);
-       static void ActionStrictEq(ActionExec& thread);
-       static void ActionGreater(ActionExec& thread);
-       static void ActionStringGreater(ActionExec& thread);
-       static void ActionExtends(ActionExec& thread);
-       static void ActionConstantPool(ActionExec& thread);
-       static void ActionDefineFunction2(ActionExec& thread);
-       static void ActionTry(ActionExec& thread);
-       static void ActionWith(ActionExec& thread);
-       static void ActionDefineFunction(ActionExec& thread);
-       static void ActionSetRegister(ActionExec& thread);
-
        bool _debug;
 
        // Use the ::instance() method to get a reference
@@ -257,8 +122,7 @@
 };
 
 
-} // namespace gnash::SWF
-
+} // namespace SWF
 } // namespace gnash
 
-#endif // end of __ASHANDLERS_H__
+#endif


reply via email to

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