gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] gnash ChangeLog server/array.cpp server/as_valu...


From: zou lunkai
Subject: Re: [Gnash-commit] gnash ChangeLog server/array.cpp server/as_valu...
Date: Tue, 20 Nov 2007 08:57:56 +0800

>  Removing as_environment from value conversion calls.
>      3 unexpected successes, no unexpected failures.

Cool.   Was there any reason to_xxx() need a as_environment?  Strk
mentioned some possibilities IIRC, right(strk)?

--zou


On Nov 20, 2007 8:44 AM, Chad Musick <address@hidden> wrote:
> CVSROOT:        /sources/gnash
> Module name:    gnash
> Changes by:     Chad Musick <cmusick>   07/11/20 00:44:05
>
> Modified files:
>         .              : ChangeLog
>         server         : array.cpp as_value.cpp as_value.h character.cpp
>                          edit_text_character.cpp sprite_instance.cpp
>                          timers.cpp
>         server/asobj   : AsBroadcaster.cpp Color.cpp Global.cpp
>                          MovieClipLoader.cpp NetConnection.cpp
>                          NetStream.cpp Object.cpp Sound.cpp Stage.cpp
>                          string.cpp xml.cpp xmlnode.cpp xmlsocket.cpp
>         server/vm      : ASHandlers.cpp
>         testsuite/actionscript.all: TextField.as
>         testsuite/misc-ming.all: intervalTestRunner.cpp
>
> Log message:
>         Removing as_environment from value conversion calls.
>         3 unexpected successes, no unexpected failures.
>
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4894&r2=1.4895
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/array.cpp?cvsroot=gnash&r1=1.82&r2=1.83
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.cpp?cvsroot=gnash&r1=1.95&r2=1.96
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.h?cvsroot=gnash&r1=1.73&r2=1.74
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.cpp?cvsroot=gnash&r1=1.63&r2=1.64
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.cpp?cvsroot=gnash&r1=1.131&r2=1.132
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.388&r2=1.389
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/timers.cpp?cvsroot=gnash&r1=1.38&r2=1.39
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/AsBroadcaster.cpp?cvsroot=gnash&r1=1.8&r2=1.9
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Color.cpp?cvsroot=gnash&r1=1.17&r2=1.18
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Global.cpp?cvsroot=gnash&r1=1.75&r2=1.76
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/MovieClipLoader.cpp?cvsroot=gnash&r1=1.34&r2=1.35
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.cpp?cvsroot=gnash&r1=1.50&r2=1.51
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.cpp?cvsroot=gnash&r1=1.74&r2=1.75
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Object.cpp?cvsroot=gnash&r1=1.35&r2=1.36
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Sound.cpp?cvsroot=gnash&r1=1.20&r2=1.21
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Stage.cpp?cvsroot=gnash&r1=1.25&r2=1.26
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/string.cpp?cvsroot=gnash&r1=1.41&r2=1.42
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xml.cpp?cvsroot=gnash&r1=1.52&r2=1.53
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlnode.cpp?cvsroot=gnash&r1=1.40&r2=1.41
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/xmlsocket.cpp?cvsroot=gnash&r1=1.36&r2=1.37
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.153&r2=1.154
> http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/TextField.as?cvsroot=gnash&r1=1.31&r2=1.32
> http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/intervalTestRunner.cpp?cvsroot=gnash&r1=1.8&r2=1.9
>
> Patches:
> Index: ChangeLog
> ===================================================================
> RCS file: /sources/gnash/gnash/ChangeLog,v
> retrieving revision 1.4894
> retrieving revision 1.4895
> diff -u -b -r1.4894 -r1.4895
> --- ChangeLog   19 Nov 2007 19:01:37 -0000      1.4894
> +++ ChangeLog   20 Nov 2007 00:44:02 -0000      1.4895
> @@ -1,3 +1,16 @@
> +2007-10-20 Chad Musick <address@hidden>
> +
> +       * server/array.cpp as_value.cpp as_value.h character.cpp
> +         edit_text_character.cpp sprite_instance.cpp timers.cpp:
> +         Remove as_environment from value conversions.
> +       * server/asobj/AsBroadcaster.cpp Color.cpp Global.cpp
> +         MoveClipLoader.cpp NetConnection.cpp NetStream.cpp Object.cpp
> +         Sound.cpp Stage.cpp string.cpp xml.cpp xmlnode.cpp xmlsocket.cpp:
> +         Remove as_environment from value conversions.
> +       * testsuite/actionscript.all/TextField.as: Unexpected successes.
> +       * testsuite/misc-ming.all/intervalTestRunner.cpp: Remove 
> as_environment
> +         from value conversion.
> +
>  2007-11-19 Benjamin Wolsey <address@hidden>
>
>         * server/parser/sound_definition.{h,cpp}: remove compiler
>
> Index: server/array.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/array.cpp,v
> retrieving revision 1.82
> retrieving revision 1.83
> diff -u -b -r1.82 -r1.83
> --- server/array.cpp    18 Oct 2007 11:47:53 -0000      1.82
> +++ server/array.cpp    20 Nov 2007 00:44:03 -0000      1.83
> @@ -74,16 +74,16 @@
>
>         inline int str_cmp(const as_value& a, const as_value& b)
>         {
> -               std::string s = a.to_string_versioned(_sv, &_env);
> -               return s.compare(b.to_string_versioned(_sv, &_env));
> +               std::string s = a.to_string_versioned(_sv);
> +               return s.compare(b.to_string_versioned(_sv));
>         }
>
>         inline int str_nocase_cmp(const as_value& a, const as_value& b)
>         {
>                 using namespace boost::algorithm;
>
> -               std::string c = to_upper_copy(a.to_string_versioned(_sv, 
> &_env));
> -               std::string d = to_upper_copy(b.to_string_versioned(_sv, 
> &_env));
> +               std::string c = to_upper_copy(a.to_string_versioned(_sv));
> +               std::string d = to_upper_copy(b.to_string_versioned(_sv));
>                 return c.compare(d);
>         }
>
> @@ -93,8 +93,8 @@
>                 if (b.is_undefined()) return true;
>                 if (a.is_null()) return false;
>                 if (b.is_null()) return true;
> -               double aval = a.to_number(&_env);
> -               double bval = b.to_number(&_env);
> +               double aval = a.to_number();
> +               double bval = b.to_number();
>                 if (isnan(aval)) return false;
>                 if (isnan(bval)) return true;
>                 return aval < bval;
> @@ -106,8 +106,8 @@
>                 if (a.is_undefined()) return true;
>                 if (b.is_null()) return false;
>                 if (a.is_null()) return true;
> -               double aval = a.to_number(&_env);
> -               double bval = b.to_number(&_env);
> +               double aval = a.to_number();
> +               double bval = b.to_number();
>                 if (isnan(bval)) return false;
>                 if (isnan(aval)) return true;
>                 return aval > bval;
> @@ -117,8 +117,8 @@
>         {
>                 if (a.is_undefined() && b.is_undefined()) return true;
>                 if (a.is_null() && b.is_null()) return true;
> -               double aval = a.to_number(&_env);
> -               double bval = b.to_number(&_env);
> +               double aval = a.to_number();
> +               double bval = b.to_number();
>                 if (isnan(aval) && isnan(bval)) return true;
>                 return aval == bval;
>         }
> @@ -375,7 +375,7 @@
>                 assert(prevStackSize == _env.stack_size());
>  #endif
>
> -               return (*_zeroCmp)((int)ret.to_number(&_env));
> +               return (*_zeroCmp)((int)ret.to_number());
>         }
>  };
>
> @@ -643,7 +643,7 @@
>  }
>
>  std::string
> -as_array_object::join(const std::string& separator, as_environment* env) 
> const
> +as_array_object::join(const std::string& separator, as_environment*) const
>  {
>         // TODO - confirm this is the right format!
>         // Reportedly, flash version 7 on linux, and Flash 8 on IE look like
> @@ -664,12 +664,12 @@
>                         itEnd=elements.end();
>
>                 // print first element w/out separator prefix
> -               temp += (*it++).to_string_versioned(swfversion, env);
> +               temp += (*it++).to_string_versioned(swfversion);
>
>                 // print subsequent elements with separator prefix
>                 while ( it != itEnd )
>                 {
> -                       temp += separator + 
> (*it++).to_string_versioned(swfversion, env);
> +                       temp += separator + 
> (*it++).to_string_versioned(swfversion);
>                 }
>         }
>
> @@ -780,11 +780,11 @@
>  }
>
>  bool
> -as_array_object::removeFirst(const as_value& v, as_environment& env)
> +as_array_object::removeFirst(const as_value& v, as_environment&)
>  {
>         for (iterator it = elements.begin(); it != elements.end(); ++it)
>         {
> -               if ( v.equals(*it, env) )
> +               if ( v.equals(*it) )
>                 {
>                         elements.erase(it);
>                         return true;
> @@ -892,7 +892,7 @@
>         // Get start offset
>         //----------------
>         unsigned startoffset;
> -       int start = fn.arg(0).to_number<int>(&(fn.env()));
> +       int start = fn.arg(0).to_number<int>();
>         if ( start < 0 ) start = array->size()+start; // start is negative, 
> so + means -abs()
>         startoffset = iclamp(start, 0, origlen);
>  #ifdef GNASH_DEBUG
> @@ -906,7 +906,7 @@
>         unsigned len = origlen - start;
>         if (fn.nargs > 1)
>         {
> -               int lenval = fn.arg(1).to_number<int>(&(fn.env()));
> +               int lenval = fn.arg(1).to_number<int>();
>                 if ( lenval < 0 )
>                 {
>                         IF_VERBOSE_ASCODING_ERRORS(
> @@ -1012,11 +1012,11 @@
>         if ( fn.nargs > 0 && fn.arg(0).is_string() )
>         {
>                 std::string propField =
> -                       PROPNAME(fn.arg(0).to_string_versioned(sv, &env));
> +                       PROPNAME(fn.arg(0).to_string_versioned(sv));
>
>                 if ( fn.nargs > 1 && fn.arg(1).is_number() )
>                 {
> -                       flags = 
> static_cast<uint8_t>(fn.arg(1).to_number(&env));
> +                       flags = static_cast<uint8_t>(fn.arg(1).to_number());
>                         flags = flag_preprocess(flags, &do_unique, &do_index);
>                 }
>                 as_value_prop avc = as_value_prop(propField,
> @@ -1049,7 +1049,7 @@
>                         it != props->end(); ++it)
>                 {
>                         std::string s =
> -                               PROPNAME((*it).to_string_versioned(sv, &env));
> +                               PROPNAME((*it).to_string_versioned(sv));
>                         prp.push_back(s);
>                 }
>
> @@ -1229,7 +1229,7 @@
>         as_environment* env = &(fn.env());
>
>         if (fn.nargs > 0)
> -               separator = fn.arg(0).to_string_versioned(swfversion, env);
> +               separator = fn.arg(0).to_string_versioned(swfversion);
>
>         std::string ret = array->join(separator, env);
>
> @@ -1251,7 +1251,7 @@
>  {
>         boost::intrusive_ptr<as_array_object> array = 
> ensureType<as_array_object>(fn.this_ptr);
>
> -       std::string ret = array->toString(&(fn.env()));
> +       std::string ret = array->toString();
>
>                 IF_VERBOSE_ACTION
>                 (
> @@ -1304,7 +1304,6 @@
>         // start and end index of the part we're slicing
>         int startindex, endindex;
>         unsigned int arraysize = array->size();
> -       as_environment& env = fn.env();
>
>         if (fn.nargs > 2)
>         {
> @@ -1324,7 +1323,7 @@
>         }
>
>
> -       startindex = int(fn.arg(0).to_number(&env));
> +       startindex = int(fn.arg(0).to_number());
>
>         // if the index is negative, it means "places from the end"
>         // where -1 is the last element
> @@ -1333,7 +1332,7 @@
>         // if we sent at least two arguments, setup endindex
>         if (fn.nargs >= 2)
>         {
> -               endindex = int(fn.arg(1).to_number(&env));
> +               endindex = int(fn.arg(1).to_number());
>
>                 // if the index is negative, it means
>                 // "places from the end" where -1 is the last element
> @@ -1365,7 +1364,7 @@
>
>         if ( fn.nargs ) // setter
>         {
> -               int length = fn.arg(0).to_int(fn.env());
> +               int length = fn.arg(0).to_int();
>                 if ( length < 0 ) // TODO: set a max limit too ?
>                 {
>                         IF_VERBOSE_ASCODING_ERRORS(
> @@ -1402,14 +1401,13 @@
>                 //
>                 as_value index_number, undef_value;
>                 int sv = VM::get().getSWFVersion();
> -               as_environment* env = &(fn.env());
>                 string_table& st = VM::get().getStringTable();
>
>                 undef_value.set_undefined();
>                 for (int i = 0; i < int(fn.arg(0).to_number()); i++)
>                 {
>                         index_number.set_int(i);
> -                       
> ao->set_member(st.find(index_number.to_string_versioned(sv, env)), 
> undef_value);
> +                       
> ao->set_member(st.find(index_number.to_string_versioned(sv)), undef_value);
>                 }
>         }
>         else
>
> Index: server/as_value.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/as_value.cpp,v
> retrieving revision 1.95
> retrieving revision 1.96
> diff -u -b -r1.95 -r1.96
> --- server/as_value.cpp 17 Nov 2007 08:33:54 -0000      1.95
> +++ server/as_value.cpp 20 Nov 2007 00:44:03 -0000      1.96
> @@ -77,7 +77,7 @@
>
>  // Conversion to const std::string&.
>  std::string
> -as_value::to_string(as_environment* env) const
> +as_value::to_string() const
>  {
>         switch (m_type)
>         {
> @@ -129,11 +129,9 @@
>                 case AS_FUNCTION:
>                 {
>                         as_object* obj = m_type == OBJECT ? getObj().get() : 
> getFun().get();
> -                       if ( env )
> -                       {
>                                 try
>                                 {
> -                                       as_value ret = to_primitive(*env, 
> STRING);
> +                               as_value ret = to_primitive(STRING);
>                                         // This additional is_string test is 
> NOT compliant with ECMA-262
>                                         // specification, but seems required 
> for compatibility with the
>                                         // reference player.
> @@ -147,8 +145,6 @@
>                                         log_debug(_("to_primitive(%s, STRING) 
> threw an ActionTypeError %s"),
>                                                         
> to_debug_string().c_str(), e.what());
>                                 }
> -                       }
> -                       else log_debug("%s.to_number() called w/out env", 
> to_debug_string().c_str());
>
>                         if ( m_type == OBJECT ) return "[type Object]";
>                         assert(m_type == AS_FUNCTION);
> @@ -164,7 +160,7 @@
>
>  // Conversion to const std::string&.
>  std::string
> -as_value::to_string_versioned(int version, as_environment* env) const
> +as_value::to_string_versioned(int version) const
>  {
>         if (m_type == UNDEFINED)
>         {
> @@ -176,7 +172,7 @@
>                 return "undefined";
>         }
>
> -       return to_string(env);
> +       return to_string();
>  }
>
>  primitive_types
> @@ -212,7 +208,7 @@
>
>  // Conversion to primitive value.
>  as_value
> -as_value::to_primitive(as_environment& env) const
> +as_value::to_primitive() const
>  {
>         VM& vm = VM::get();
>         int swfVersion = vm.getSWFVersion();
> @@ -231,12 +227,12 @@
>         }
>  #endif
>
> -       return to_primitive(env, hint);
> +       return to_primitive(hint);
>  }
>
>  // Conversion to primitive value.
>  as_value
> -as_value::to_primitive(as_environment& env, type hint) const
> +as_value::to_primitive(type hint) const
>  {
>         if ( m_type != OBJECT && m_type != AS_FUNCTION ) return *this;
>         //if ( ! is_object() ) return *this; // include MOVIECLIP !!
> @@ -289,7 +285,6 @@
>                 if ( m_type == OBJECT ) obj = getObj().get();
>                 else obj = getFun().get();
>
> -               //printf("as_value to string conversion, env=%p\n", env);
>                 // @@ Moock says, "the value that results from
>                 // calling toString() on the object".
>                 //
> @@ -324,6 +319,7 @@
>
>         assert(obj);
>
> +       as_environment env;
>         as_value ret = call_method0(method, &env, obj);
>  #if GNASH_DEBUG_CONVERSION_TO_PRIMITIVE
>         log_debug("to_primitive: method call returned %s", 
> ret.to_debug_string().c_str());
> @@ -339,7 +335,7 @@
>  }
>
>  double
> -as_value::to_number(as_environment* env) const
> +as_value::to_number() const
>  {
>         // TODO:  split in to_number_# (version based)
>
> @@ -394,15 +390,10 @@
>                         //
>                         // Arrays and Movieclips should return NaN.
>
> -                       //log_msg(_("OBJECT to number conversion, env is 
> %p"), env);
> -
>                         as_object* obj = m_type == OBJECT ? getObj().get() : 
> getFun().get();
> -                       if ( env )
> -                       {
>                                 try
>                                 {
> -                                       as_value ret = to_primitive(*env, 
> NUMBER);
> -                                       // env shouldn't be needed as 
> to_primitive ensure a primitive type is returned
> +                               as_value ret = to_primitive(NUMBER);
>                                         return ret.to_number();
>                                 }
>                                 catch (ActionTypeError& e)
> @@ -419,12 +410,6 @@
>                                         }
>                                 }
>                         }
> -                       else
> -                       {
> -                               log_debug("%s.to_number() called w/out env", 
> to_debug_string().c_str());
> -                               return obj->get_numeric_value();
> -                       }
> -                   }
>
>                 case MOVIECLIP:
>                         // This is tested, no valueOf is going
> @@ -440,9 +425,9 @@
>  }
>
>  int32_t
> -as_value::to_int(as_environment& env) const
> +as_value::to_int() const
>  {
> -       double d = to_number(&env);
> +       double d = to_number();
>         int i=0;
>
>         if ( ! isfinite(d) ) return 0;
> @@ -636,9 +621,9 @@
>
>  // Force type to number.
>  void
> -as_value::convert_to_number(as_environment* env)
> +as_value::convert_to_number()
>  {
> -    set_double(to_number(env));
> +    set_double(to_number());
>  }
>
>  // Force type to string.
> @@ -653,10 +638,10 @@
>
>
>  void
> -as_value::convert_to_string_versioned(int version, as_environment* env)
> +as_value::convert_to_string_versioned(int version)
>      // Force type to string.
>  {
> -    std::string ns = to_string_versioned(version, env);
> +    std::string ns = to_string_versioned(version);
>      drop_refs();
>      m_type = STRING;   // force type.
>      _value = ns;
> @@ -740,7 +725,7 @@
>  }
>
>  bool
> -as_value::equals(const as_value& v, as_environment& env) const
> +as_value::equals(const as_value& v) const
>  {
>      // Comments starting with numbers refer to the ECMA-262 document
>
> @@ -749,7 +734,7 @@
>      log_debug("equals(%s, %s) called [%d]", to_debug_string().c_str(), 
> v.to_debug_string().c_str(), count++);
>  #endif
>
> -    int SWFVersion = env.get_version();
> +    int SWFVersion = VM::get().getSWFVersion();
>
>      bool this_nulltype = (m_type == UNDEFINED || m_type == NULLTYPE);
>      bool v_nulltype = (v.get_type() == UNDEFINED || v.get_type() == 
> NULLTYPE);
> @@ -786,7 +771,7 @@
>      //    return the result of the comparison x == ToNumber(y).
>      if (m_type == NUMBER && v.m_type == STRING)
>      {
> -       double n = v.to_number(&env); // no need for the env actually
> +       double n = v.to_number();
>         if ( ! isfinite(n) ) return false;
>          return equalsSameType(n);
>      }
> @@ -795,7 +780,7 @@
>      //     return the result of the comparison ToNumber(x) == y.
>      if (v.m_type == NUMBER && m_type == STRING)
>      {
> -       double n = to_number(&env); // no need for the env actually
> +       double n = to_number();
>         if ( ! isfinite(n) ) return false;
>          return v.equalsSameType(n);
>      }
> @@ -803,13 +788,13 @@
>      // 18. If Type(x) is Boolean, return the result of the comparison 
> ToNumber(x) == y.
>      if (m_type == BOOLEAN)
>      {
> -        return as_value(to_number(&env)).equals(v, env);
> +        return as_value(to_number()).equals(v);
>      }
>
>      // 19. If Type(y) is Boolean, return the result of the comparison x == 
> ToNumber(y).
>      if (v.m_type == BOOLEAN)
>      {
> -        return as_value(v.to_number(&env)).equals(*this, env);
> +        return as_value(v.to_number()).equals(*this);
>      }
>
>      // 20. If Type(x) is either String or Number and Type(y) is Object,
> @@ -819,14 +804,14 @@
>          // convert this value to a primitive and recurse
>         try
>         {
> -               as_value v2 = v.to_primitive(env);
> +               as_value v2 = v.to_primitive();
>                 if ( v.strictly_equals(v2) ) return false;
>
>  #ifdef GNASH_DEBUG_EQUALITY
>                 log_debug(" 20: convertion to primitive : %s -> %s", 
> v.to_debug_string().c_str(), v2.to_debug_string().c_str());
>  #endif
>
> -               return equals(v2, env);
> +               return equals(v2);
>         }
>         catch (ActionTypeError& e)
>         {
> @@ -845,14 +830,14 @@
>          // convert this value to a primitive and recurse
>          try
>         {
> -               as_value v2 = to_primitive(env);
> +               as_value v2 = to_primitive();
>                 if ( strictly_equals(v2) ) return false;
>
>  #ifdef GNASH_DEBUG_EQUALITY
>                 log_debug(" 21: convertion to primitive : %s -> %s", 
> to_debug_string().c_str(), v2.to_debug_string().c_str());
>  #endif
>
> -               return v2.equals(v, env);
> +               return v2.equals(v);
>         }
>         catch (ActionTypeError& e)
>         {
> @@ -880,7 +865,7 @@
>         int converted = 0;
>         try
>         {
> -               p = to_primitive(env);
> +               p = to_primitive();
>                 if ( ! strictly_equals(p) ) ++converted;
>  #ifdef GNASH_DEBUG_EQUALITY
>                 log_debug(" convertion to primitive (this): %s -> %s", 
> to_debug_string().c_str(), p.to_debug_string().c_str());
> @@ -896,7 +881,7 @@
>
>         try
>         {
> -               vp = v.to_primitive(env);
> +               vp = v.to_primitive();
>                 if ( ! v.strictly_equals(vp) ) ++converted;
>  #ifdef GNASH_DEBUG_EQUALITY
>                 log_debug(" convertion to primitive (that): %s -> %s", 
> v.to_debug_string().c_str(), vp.to_debug_string().c_str());
> @@ -915,7 +900,7 @@
>  #ifdef GNASH_DEBUG_EQUALITY
>                 log_debug(" some conversion took place, recurring");
>  #endif
> -               return p.equals(vp, env);
> +               return p.equals(vp);
>         }
>         else
>         {
>
> Index: server/as_value.h
> ===================================================================
> RCS file: /sources/gnash/gnash/server/as_value.h,v
> retrieving revision 1.73
> retrieving revision 1.74
> diff -u -b -r1.73 -r1.74
> --- server/as_value.h   1 Nov 2007 16:14:20 -0000       1.73
> +++ server/as_value.h   20 Nov 2007 00:44:03 -0000      1.74
> @@ -15,7 +15,7 @@
>  // along with this program; if not, write to the Free Software
>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>
> -/* $Id: as_value.h,v 1.73 2007/11/01 16:14:20 strk Exp $ */
> +/* $Id: as_value.h,v 1.74 2007/11/20 00:44:03 cmusick Exp $ */
>
>  #ifndef GNASH_AS_VALUE_H
>  #define GNASH_AS_VALUE_H
> @@ -42,7 +42,6 @@
>  class fn_call;
>  class as_function;
>  class sprite_instance;
> -class as_environment;
>  class asNamespace;
>  class asName;
>
> @@ -268,7 +267,7 @@
>         ///     The environment to use for running the toString() method
>         ///     for object values. If NULL, toString() won't be run.
>         ///
> -       std::string to_string(as_environment* env=NULL) const;
> +       std::string to_string() const;
>
>         std::string to_debug_string() const;
>
> @@ -283,7 +282,7 @@
>         ///     The environment to use for running the toString() method
>         ///     for object values. If NULL, toString() won't be run.
>         ///
> -       std::string to_string_versioned(int version, as_environment* 
> env=NULL) const;
> +       std::string to_string_versioned(int version) const;
>
>         /// Get a number representation for this value
>         //
> @@ -291,7 +290,7 @@
>         ///     The environment to use for running the valueOf() method
>         ///     for object values. If NULL, valueOf() won't be run.
>         ///
> -       double  to_number(as_environment* env=NULL) const;
> +       double  to_number() const;
>
>         /// Conversion to 32bit integer
>         //
> @@ -302,7 +301,7 @@
>         ///     The environment to use for running the valueOf() method
>         ///     for object values.
>         ///
> -       int32_t to_int(as_environment& env) const;
> +       int32_t to_int() const;
>
>         /// Shorthand: casts the result of to_number() to the requested number
>         /// type.
> @@ -314,9 +313,9 @@
>         ///       Implementing specializations for *all* integer types might 
> be tedious
>         ///
>         template <typename T>
> -       T to_number (as_environment* env=NULL) const
> +       T to_number () const
>         {
> -               return static_cast<T>(to_number(env));
> +               return static_cast<T>(to_number());
>         }
>
>         /// Conversion to boolean.
> @@ -389,7 +388,7 @@
>         ///
>         /// @throw ActionTypeError if an object can't be converted to a 
> primitive
>         ///
> -       as_value to_primitive(as_environment& env) const;
> +       as_value to_primitive() const;
>
>         /// Return value as a primitive type, with a preference
>         //
> @@ -404,7 +403,7 @@
>         ///
>         /// @throw ActionTypeError if an object can't be converted to a 
> primitive
>         ///
> -       as_value to_primitive(as_environment& env, type hint) const;
> +       as_value to_primitive(type hint) const;
>
>         /// Force type to number.
>         //
> @@ -412,7 +411,7 @@
>         ///     The environment to use for running the valueOf() method
>         ///     for object values. If NULL, valueOf() won't be run.
>         ///
> -       void    convert_to_number(as_environment* env);
> +       void    convert_to_number();
>
>         /// Force type to string.
>         void    convert_to_string();
> @@ -427,7 +426,7 @@
>         ///
>         /// @see to_string_versionioned
>         ///
> -       void    convert_to_string_versioned(int version, as_environment* 
> env=NULL);
> +       void    convert_to_string_versioned(int version);
>
>         // These set_*()'s are more type-safe; should be used
>         // in preference to generic overloaded set().  You are
> @@ -534,7 +533,7 @@
>         ///     The environment to use for running the toString() and 
> valueOf()
>         ///     methods for object values.
>         ///
> -       bool equals(const as_value& v, as_environment& env) const;
> +       bool equals(const as_value& v) const;
>
>         /// Sets this value to this string plus the given string.
>         void    string_concat(const std::string& str);
>
> Index: server/character.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/character.cpp,v
> retrieving revision 1.63
> retrieving revision 1.64
> diff -u -b -r1.63 -r1.64
> --- server/character.cpp        10 Nov 2007 11:51:42 -0000      1.63
> +++ server/character.cpp        20 Nov 2007 00:44:03 -0000      1.64
> @@ -17,7 +17,7 @@
>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>  //
>
> -/* $Id: character.cpp,v 1.63 2007/11/10 11:51:42 strk Exp $ */
> +/* $Id: character.cpp,v 1.64 2007/11/20 00:44:03 cmusick Exp $ */
>
>  #ifdef HAVE_CONFIG_H
>  #include "config.h"
> @@ -214,7 +214,7 @@
>         }
>         else // setter
>         {
> -               double newx = fn.arg(0).to_number(&(fn.env()));
> +               double newx = fn.arg(0).to_number();
>                 matrix m = ptr->get_matrix();
>                 m.set_x_translation(infinite_to_fzero(PIXELS_TO_TWIPS(newx)));
>                 ptr->set_matrix(m);
> @@ -237,7 +237,7 @@
>         }
>         else // setter
>         {
> -               double newy = fn.arg(0).to_number(&(fn.env()));
> +               double newy = fn.arg(0).to_number();
>                 matrix m = ptr->get_matrix();
>                 m.set_y_translation(infinite_to_fzero(PIXELS_TO_TWIPS(newy)));
>                 ptr->set_matrix(m);
> @@ -263,7 +263,7 @@
>         {
>                 matrix m = ptr->get_matrix();
>
> -               double scale_percent = fn.arg(0).to_number(&(fn.env()));
> +               double scale_percent = fn.arg(0).to_number();
>
>                 // Handle bogus values
>                 if (isnan(scale_percent))
> @@ -299,7 +299,7 @@
>         {
>                 matrix m = ptr->get_matrix();
>
> -               double scale_percent = fn.arg(0).to_number(&(fn.env()));
> +               double scale_percent = fn.arg(0).to_number();
>
>                 // Handle bogus values
>                 if (isnan(scale_percent))
> @@ -430,7 +430,7 @@
>                 double oldwidth = bounds.width();
>                 assert(oldwidth>0);
>
> -               double newwidth = 
> PIXELS_TO_TWIPS(fn.arg(0).to_number(&(fn.env())));
> +               double newwidth = PIXELS_TO_TWIPS(fn.arg(0).to_number());
>                 if ( newwidth <= 0 )
>                 {
>                         IF_VERBOSE_ASCODING_ERRORS(
> @@ -475,7 +475,7 @@
>                 double oldheight = bounds.height();
>                 assert(oldheight>0);
>
> -               double newheight = 
> PIXELS_TO_TWIPS(fn.arg(0).to_number(&(fn.env())));
> +               double newheight = PIXELS_TO_TWIPS(fn.arg(0).to_number());
>                 if ( newheight <= 0 )
>                 {
>                         IF_VERBOSE_ASCODING_ERRORS(
> @@ -511,7 +511,7 @@
>                 matrix m = ptr->get_matrix();
>
>                 // input is in degrees
> -               float rotation = (float) fn.arg(0).to_number(&(fn.env())) * 
> float(M_PI) / 180.f;
> +               float rotation = (float) fn.arg(0).to_number() * float(M_PI) 
> / 180.f;
>                 m.set_rotation(rotation);
>
>                 ptr->set_matrix(m);
> @@ -562,7 +562,7 @@
>         }
>         else // setter
>         {
> -               ptr->set_name(fn.arg(0).to_string(&fn.env()).c_str());
> +               ptr->set_name(fn.arg(0).to_string().c_str());
>         }
>
>         return as_value();
>
> Index: server/edit_text_character.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/edit_text_character.cpp,v
> retrieving revision 1.131
> retrieving revision 1.132
> diff -u -b -r1.131 -r1.132
> --- server/edit_text_character.cpp      16 Nov 2007 07:43:53 -0000      1.131
> +++ server/edit_text_character.cpp      20 Nov 2007 00:44:03 -0000      1.132
> @@ -17,7 +17,7 @@
>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>  //
>
> -/* $Id: edit_text_character.cpp,v 1.131 2007/11/16 07:43:53 zoulunkai Exp $ 
> */
> +/* $Id: edit_text_character.cpp,v 1.132 2007/11/20 00:44:03 cmusick Exp $ */
>
>  #ifdef HAVE_CONFIG_H
>  #include "config.h"
> @@ -108,7 +108,7 @@
>         boost::intrusive_ptr<edit_text_character> text = 
> ensureType<edit_text_character>(fn.this_ptr);
>
>         assert ( fn.nargs > 0 );
> -       const std::string& newname = fn.arg(0).to_string(&fn.env());
> +       const std::string& newname = fn.arg(0).to_string();
>
>         text->set_variable_name(newname);
>
> @@ -1842,7 +1842,7 @@
>         else // setter
>         {
>                 rgba newColor;
> -               newColor.parseRGB( fn.arg(0).to_number<uint32_t>(&fn.env()) );
> +               newColor.parseRGB( fn.arg(0).to_number<uint32_t>() );
>                 ptr->setBackgroundColor(newColor);
>         }
>
> @@ -1861,7 +1861,7 @@
>         else // setter
>         {
>                 rgba newColor;
> -               newColor.parseRGB( fn.arg(0).to_number<uint32_t>(&fn.env()) );
> +               newColor.parseRGB( fn.arg(0).to_number<uint32_t>() );
>                 ptr->setBorderColor(newColor);
>         }
>
> @@ -1880,7 +1880,7 @@
>         else // setter
>         {
>                 rgba newColor;
> -               newColor.parseRGB( fn.arg(0).to_number<uint32_t>(&fn.env()) );
> +               newColor.parseRGB( fn.arg(0).to_number<uint32_t>() );
>                 ptr->setTextColor(newColor);
>         }
>
> @@ -1980,7 +1980,7 @@
>                 }
>                 else
>                 {
> -                       std::string strval = arg.to_string(&(fn.env()));
> +                       std::string strval = arg.to_string();
>                         edit_text_character::AutoSizeValue val = 
> ptr->parseAutoSizeValue(strval);
>                         //log_debug("%s => %d", strval.c_str(), val);
>                         ptr->setAutoSize( val );
>
> Index: server/sprite_instance.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
> retrieving revision 1.388
> retrieving revision 1.389
> diff -u -b -r1.388 -r1.389
> --- server/sprite_instance.cpp  16 Nov 2007 07:43:53 -0000      1.388
> +++ server/sprite_instance.cpp  20 Nov 2007 00:44:03 -0000      1.389
> @@ -213,7 +213,7 @@
>         }
>
>         // Get exported resource
> -       const std::string& id_name = fn.arg(0).to_string(&fn.env());
> +       const std::string& id_name = fn.arg(0).to_string();
>
>         boost::intrusive_ptr<resource> exported = 
> sprite->get_movie_definition()->get_exported_resource(id_name);
>         if ( exported == NULL )
> @@ -239,7 +239,7 @@
>                 return rv;
>         }
>
> -       const std::string& newname = fn.arg(1).to_string(&fn.env());
> +       const std::string& newname = fn.arg(1).to_string();
>
>         // should we support negative depths ? YES !
>         int depth_val = uint16_t(fn.arg(2).to_number());
> @@ -416,7 +416,7 @@
>         // sprite.swapDepth(depth)
>         else
>         {
> -               double td = fn.arg(0).to_number(&(fn.env()));
> +               double td = fn.arg(0).to_number();
>                 if ( isnan(td) )
>                 {
>                         IF_VERBOSE_ASCODING_ERRORS(
> @@ -474,7 +474,7 @@
>                 return as_value();
>         }
>
> -       const std::string& newname = fn.arg(0).to_string(&fn.env());
> +       const std::string& newname = fn.arg(0).to_string();
>         int depth = int(fn.arg(1).to_number());
>
>         boost::intrusive_ptr<sprite_instance> ch;
> @@ -590,7 +590,7 @@
>                 return as_value();
>         }
>
> -       const std::string& urlstr = fn.arg(0).to_string(&fn.env());
> +       const std::string& urlstr = fn.arg(0).to_string();
>         if (urlstr.empty())
>         {
>                 IF_VERBOSE_ASCODING_ERRORS(
> @@ -638,7 +638,7 @@
>                 return as_value();
>         }
>
> -       const std::string& urlstr = fn.arg(0).to_string(&fn.env());
> +       const std::string& urlstr = fn.arg(0).to_string();
>         if (urlstr.empty())
>         {
>                 IF_VERBOSE_ASCODING_ERRORS(
> @@ -657,7 +657,7 @@
>
>         if (fn.nargs > 1)
>         {
> -               const std::string& methodstring = 
> fn.arg(1).to_string(&fn.env());
> +               const std::string& methodstring = fn.arg(1).to_string();
>                 // Should we be case-insensitive in comparing these ?
>                 if ( methodstring == "GET" ) method = 1;
>                 else if ( methodstring == "POST" ) method = 2;
> @@ -694,14 +694,12 @@
>         boost::intrusive_ptr<sprite_instance> sprite = 
> ensureType<sprite_instance>(fn.this_ptr);
>         UNUSED(sprite);
>
> -       as_environment& env = fn.env();
> -
>         switch (fn.nargs)
>         {
>                 case 1: // target
>                 {
>                         as_value& tgt_val = fn.arg(0);
> -                       character* target = 
> fn.env().find_target(tgt_val.to_string(&env));
> +                       character* target = 
> fn.env().find_target(tgt_val.to_string());
>                         if ( ! target )
>                         {
>                                 IF_VERBOSE_ASCODING_ERRORS(
> @@ -726,16 +724,16 @@
>
>                 case 2: // x, y
>                 {
> -                       float x = PIXELS_TO_TWIPS(fn.arg(0).to_number(&env));
> -                       float y = PIXELS_TO_TWIPS(fn.arg(1).to_number(&env));
> +                       float x = PIXELS_TO_TWIPS(fn.arg(0).to_number());
> +                       float y = PIXELS_TO_TWIPS(fn.arg(1).to_number());
>
>                         return sprite->pointInBounds(x, y);
>                 }
>
>                 case 3: // x, y, shapeFlag
>                 {
> -                       double x = PIXELS_TO_TWIPS(fn.arg(0).to_number(&env));
> -                       double y = PIXELS_TO_TWIPS(fn.arg(1).to_number(&env));
> +                       double x = PIXELS_TO_TWIPS(fn.arg(0).to_number());
> +                       double y = PIXELS_TO_TWIPS(fn.arg(1).to_number());
>                         bool shapeFlag = fn.arg(2).to_bool();
>
>                         if ( ! shapeFlag ) return sprite->pointInBounds(x, y);
> @@ -818,7 +816,7 @@
>                 );
>                 return as_value();
>         }
> -       float txt_width = fn.arg(4).to_number(&fn.env());
> +       float txt_width = fn.arg(4).to_number();
>         if ( txt_width < 0 )
>         {
>                 IF_VERBOSE_ASCODING_ERRORS(
> @@ -836,7 +834,7 @@
>                 );
>                 return as_value();
>         }
> -       float txt_height = fn.arg(5).to_number(&fn.env());
> +       float txt_height = fn.arg(5).to_number();
>         if ( txt_height < 0 )
>         {
>                 IF_VERBOSE_ASCODING_ERRORS(
> @@ -878,7 +876,7 @@
>                 return as_value();
>         }
>
> -       int depth = fn.arg(0).to_number<int>(&fn.env());
> +       int depth = fn.arg(0).to_number<int>();
>         boost::intrusive_ptr<character> ch = 
> sprite->get_character_at_depth(depth);
>         if ( ! ch ) return as_value(); // we want 'undefined', not 'null'
>         return as_value(ch.get());
> @@ -1019,7 +1017,7 @@
>                 );
>                 return ret;
>         }
> -       x = PIXELS_TO_TWIPS(tmp.to_number(&fn.env()));
> +       x = PIXELS_TO_TWIPS(tmp.to_number());
>
>         if ( ! obj->get_member(NSV::PROP_Y, &tmp) )
>         {
> @@ -1030,7 +1028,7 @@
>                 );
>                 return ret;
>         }
> -       y = PIXELS_TO_TWIPS(tmp.to_number(&fn.env()));
> +       y = PIXELS_TO_TWIPS(tmp.to_number());
>
>         point pt(x, y);
>         matrix world_mat = sprite->get_world_matrix();
> @@ -1081,7 +1079,7 @@
>                 );
>                 return ret;
>         }
> -       x = PIXELS_TO_TWIPS(tmp.to_number(&fn.env()));
> +       x = PIXELS_TO_TWIPS(tmp.to_number());
>
>         if ( ! obj->get_member(NSV::PROP_Y, &tmp) )
>         {
> @@ -1092,7 +1090,7 @@
>                 );
>                 return ret;
>         }
> -       y = PIXELS_TO_TWIPS(tmp.to_number(&fn.env()));
> +       y = PIXELS_TO_TWIPS(tmp.to_number());
>
>         point pt(x, y);
>         matrix world_mat = sprite->get_world_matrix();
> @@ -1224,19 +1222,19 @@
>                 return as_value();
>         }
>
> -       thickness = 
> uint16_t(PIXELS_TO_TWIPS(uint16_t(fclamp(fn.arg(0).to_number(&fn.env()), 0, 
> 255))));
> +       thickness = 
> uint16_t(PIXELS_TO_TWIPS(uint16_t(fclamp(fn.arg(0).to_number(), 0, 255))));
>
>         if ( fn.nargs > 1 )
>         {
>                 // 2^24 is the max here
> -               uint32_t rgbval = 
> uint32_t(fclamp(fn.arg(1).to_number(&fn.env()), 0, 16777216));
> +               uint32_t rgbval = uint32_t(fclamp(fn.arg(1).to_number(), 0, 
> 16777216));
>                 r = uint8_t( (rgbval&0xFF0000) >> 16);
>                 g = uint8_t( (rgbval&0x00FF00) >> 8);
>                 b = uint8_t( (rgbval&0x0000FF) );
>
>                 if ( fn.nargs > 2 )
>                 {
> -                       float alphaval = 
> fclamp(fn.arg(2).to_number(&fn.env()), 0, 100);
> +                       float alphaval = fclamp(fn.arg(2).to_number(), 0, 
> 100);
>                         a = uint8_t( 255 * (alphaval/100) );
>                 }
>         }
> @@ -1950,12 +1948,11 @@
>  {
>         //GNASH_REPORT_FUNCTION;
>
> -       as_environment* env = const_cast<as_environment*>(&m_as_environment);
> -       std::string fspecStr = frame_spec.to_string(env);
> +       std::string fspecStr = frame_spec.to_string();
>
>         as_value str(fspecStr);
>
> -       double num =  str.to_number(env);
> +       double num =  str.to_number();
>
>         //log_debug("get_frame_number(%s), num: %g", 
> frame_spec.to_debug_string().c_str(), num);
>
> @@ -2347,11 +2344,10 @@
>  #ifdef DEBUG_DYNTEXT_VARIABLES
>                 log_debug(_("it's a Text Variable, associated with " 
> SIZET_FMT " TextFields"), etc->size());
>  #endif
> -               as_environment* env = 
> const_cast<as_environment*>(&m_as_environment);
>                 for (TextFieldPtrVect::iterator i=etc->begin(), e=etc->end(); 
> i!=e; ++i)
>                 {
>                         TextFieldPtr tf = *i;
> -                       tf->updateText(val.to_string(env));
> +                       tf->updateText(val.to_string());
>                 }
>         }
>  #ifdef DEBUG_DYNTEXT_VARIABLES
>
> Index: server/timers.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/timers.cpp,v
> retrieving revision 1.38
> retrieving revision 1.39
> diff -u -b -r1.38 -r1.39
> --- server/timers.cpp   19 Sep 2007 14:20:49 -0000      1.38
> +++ server/timers.cpp   20 Nov 2007 00:44:04 -0000      1.39
> @@ -19,7 +19,7 @@
>  //
>  //
>
> -/* $Id: timers.cpp,v 1.38 2007/09/19 14:20:49 cmusick Exp $ */
> +/* $Id: timers.cpp,v 1.39 2007/11/20 00:44:04 cmusick Exp $ */
>
>  #include "timers.h"
>  #include "as_function.h" // for class as_function
> @@ -187,7 +187,7 @@
>         if ( ! as_func )
>         {
>                 as_value method;
> -               const std::string& method_name = 
> fn.arg(1).to_string(&fn.env());
> +               const std::string& method_name = fn.arg(1).to_string();
>                 if 
> (!obj->get_member(VM::get().getStringTable().find(method_name), &method) )
>                 {
>                         IF_VERBOSE_ASCODING_ERRORS(
>
> Index: server/asobj/AsBroadcaster.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/AsBroadcaster.cpp,v
> retrieving revision 1.8
> retrieving revision 1.9
> diff -u -b -r1.8 -r1.9
> --- server/asobj/AsBroadcaster.cpp      6 Oct 2007 09:54:54 -0000       1.8
> +++ server/asobj/AsBroadcaster.cpp      20 Nov 2007 00:44:04 -0000      1.9
> @@ -284,13 +284,13 @@
>                 );
>
>                 // TODO: implement brute force scan of pseudo-array
> -               unsigned int length = 
> listenersObj->getMember(NSV::PROP_LENGTH).to_int(fn.env());
> +               unsigned int length = 
> listenersObj->getMember(NSV::PROP_LENGTH).to_int();
>                 for (unsigned int i=0; i<length; ++i)
>                 {
>                         as_value iVal(i);
> -                       std::string n = iVal.to_string(&(fn.env()));
> +                       std::string n = iVal.to_string();
>                         as_value v = 
> listenersObj->getMember(VM::get().getStringTable().find(n));
> -                       if ( v.equals(listenerToRemove, fn.env()) )
> +                       if ( v.equals(listenerToRemove) )
>                         {
>                                 listenersObj->callMethod(NSV::PROP_SPLICE, 
> fn.env(), iVal, as_value(1));
>                                 return as_value(true);
>
> Index: server/asobj/Color.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/Color.cpp,v
> retrieving revision 1.17
> retrieving revision 1.18
> diff -u -b -r1.17 -r1.18
> --- server/asobj/Color.cpp      17 Nov 2007 11:50:35 -0000      1.17
> +++ server/asobj/Color.cpp      20 Nov 2007 00:44:04 -0000      1.18
> @@ -239,7 +239,7 @@
>                 return as_value();
>         }
>
> -       int32_t color = fn.arg(0).to_int(fn.env());
> +       int32_t color = fn.arg(0).to_int();
>
>         int r = (color&0xFF0000) >> 16;
>         int g = (color&0x00FF00) >> 8;
> @@ -265,7 +265,7 @@
>         double d;
>
>         if ( ! obj.get_member(key, &tmp) ) return;
> -       d = tmp.to_number(&env);
> +       d = tmp.to_number();
>         if ( scale ) *target = d/100.0;
>         else *target = d;
>  }
> @@ -356,7 +356,7 @@
>                 {
>                         // must be a target..
>                         as_environment& env = fn.env();
> -                       character* ch = 
> env.find_target(fn.arg(0).to_string(&env));
> +                       character* ch = 
> env.find_target(fn.arg(0).to_string());
>                         if ( ch ) sp = ch->to_movie();
>                 }
>
>
> Index: server/asobj/Global.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/Global.cpp,v
> retrieving revision 1.75
> retrieving revision 1.76
> diff -u -b -r1.75 -r1.76
> --- server/asobj/Global.cpp     2 Nov 2007 15:10:43 -0000       1.75
> +++ server/asobj/Global.cpp     20 Nov 2007 00:44:04 -0000      1.76
> @@ -17,7 +17,7 @@
>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>  //
>
> -/* $Id: Global.cpp,v 1.75 2007/11/02 15:10:43 strk Exp $ */
> +/* $Id: Global.cpp,v 1.76 2007/11/20 00:44:04 cmusick Exp $ */
>
>  #ifdef HAVE_CONFIG_H
>  #include "config.h"
> @@ -106,7 +106,7 @@
>      //
>      // @@ Nothing needs special treatment,
>      //    as_value::to_string() will take care of everything
> -    const char* arg0 = fn.arg(0).to_string(&fn.env()).c_str();
> +    const char* arg0 = fn.arg(0).to_string().c_str();
>      log_trace("%s", arg0);
>      return as_value();
>  }
> @@ -117,7 +117,7 @@
>  {
>      ASSERT_FN_ARGS_IS_1
>
> -    return as_value( static_cast<bool>(isnan(fn.arg(0).to_number(&fn.env())) 
> ));
> +    return as_value( static_cast<bool>(isnan(fn.arg(0).to_number()) ));
>  }
>
>  static as_value
> @@ -125,7 +125,7 @@
>  {
>      ASSERT_FN_ARGS_IS_1
>
> -    return as_value( isfinite(fn.arg(0).to_number(&fn.env())) );
> +    return as_value( isfinite(fn.arg(0).to_number()) );
>  }
>
>  /// \brief Encode a string to URL-encoded format
> @@ -189,8 +189,6 @@
>  static as_value
>  as_global_parseint(const fn_call& fn)
>  {
> -    as_environment& env = fn.env();
> -
>      // assert(fn.nargs == 2 || fn.nargs == 1);
>      if (fn.nargs < 1) {
>         IF_VERBOSE_ASCODING_ERRORS(
> @@ -211,7 +209,7 @@
>      }
>  #endif
>
> -    const std::string& expr = fn.arg(0).to_string(&env);
> +    const std::string& expr = fn.arg(0).to_string();
>
>      int base = 10; // the default base
>
> @@ -245,7 +243,7 @@
>      if (fn.nargs > 1)
>         {
>             // to_number returns a double. atoi() would be better
> -           base = (int)(fn.arg(1).to_number(&env));
> +           base = (int)(fn.arg(1).to_number());
>         }
>      // if the string starts with "0x" then a hex digit
>      else if (strlen(input) > 2 && input[0] == '0' && input[1] == 'X'
> @@ -349,7 +347,7 @@
>      // are used to determine whether the list of child names should be 
> hidden,
>      // un-hidden, protected from over-write, un-protected from over-write,
>      // protected from deletion and un-protected from deletion
> -    int set_true = int(fn.arg(2).to_number(env)) & 
> as_prop_flags::as_prop_flags_mask;
> +    int set_true = int(fn.arg(2).to_number()) & 
> as_prop_flags::as_prop_flags_mask;
>
>      // Is another integer bitmask that works like set_true,
>      // except it sets the attributes to false. The
> @@ -358,7 +356,7 @@
>      // ASSetPropFlags was exposed in Flash 5, however the fourth argument 
> 'set_false'
>      // was not required as it always defaulted to the value '~0'.
>      int set_false = (fn.nargs == 3 ?
> -                    (version == 5 ? ~0 : 0) : int(fn.arg(3).to_number(env)))
> +                    (version == 5 ? ~0 : 0) : int(fn.arg(3).to_number()))
>         & as_prop_flags::as_prop_flags_mask;
>
>         obj->setPropFlags(props, set_false, set_true);
> @@ -381,10 +379,8 @@
>                 return ret;
>         }
>
> -       as_environment& env = fn.env();
> -
> -       int sx = fn.arg(0).to_int(env);
> -       int sy = fn.arg(1).to_int(env);
> +       int sx = fn.arg(0).to_int();
> +       int sy = fn.arg(1).to_int();
>
>         if ( sx < 0 )
>         {
>
> Index: server/asobj/MovieClipLoader.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/MovieClipLoader.cpp,v
> retrieving revision 1.34
> retrieving revision 1.35
> diff -u -b -r1.34 -r1.35
> --- server/asobj/MovieClipLoader.cpp    16 Nov 2007 15:26:10 -0000      1.34
> +++ server/asobj/MovieClipLoader.cpp    20 Nov 2007 00:44:04 -0000      1.35
> @@ -288,9 +288,9 @@
>                 return;
>         }
>  #endif
> -       std::string str_url = url_arg.to_string(&env);
> +       std::string str_url = url_arg.to_string();
>
> -       character* target = fn.env().find_target(fn.arg(1).to_string(&env));
> +       character* target = fn.env().find_target(fn.arg(1).to_string());
>         if ( ! target )
>         {
>                 log_error(_("Could not find target %s"), 
> fn.arg(1).to_string().c_str());
>
> Index: server/asobj/NetConnection.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/NetConnection.cpp,v
> retrieving revision 1.50
> retrieving revision 1.51
> diff -u -b -r1.50 -r1.51
> --- server/asobj/NetConnection.cpp      31 Aug 2007 21:53:32 -0000      1.50
> +++ server/asobj/NetConnection.cpp      20 Nov 2007 00:44:04 -0000      1.51
> @@ -17,7 +17,7 @@
>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>  //
>
> -/* $Id: NetConnection.cpp,v 1.50 2007/08/31 21:53:32 strk Exp $ */
> +/* $Id: NetConnection.cpp,v 1.51 2007/11/20 00:44:04 cmusick Exp $ */
>
>  #ifdef HAVE_CONFIG_H
>  #include "config.h"
> @@ -238,7 +238,7 @@
>         }
>
>         /// .. TODO: checkme ... addToURL ?? shoudnl't we attempt a 
> connection ??
> -       ptr->addToURL(url_val.to_string(&fn.env()));
> +       ptr->addToURL(url_val.to_string());
>
>         if ( fn.nargs > 1 )
>         {
>
> Index: server/asobj/NetStream.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/NetStream.cpp,v
> retrieving revision 1.74
> retrieving revision 1.75
> diff -u -b -r1.74 -r1.75
> --- server/asobj/NetStream.cpp  23 Sep 2007 08:48:18 -0000      1.74
> +++ server/asobj/NetStream.cpp  20 Nov 2007 00:44:04 -0000      1.75
> @@ -17,7 +17,7 @@
>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>  //
>
> -/* $Id: NetStream.cpp,v 1.74 2007/09/23 08:48:18 cmusick Exp $ */
> +/* $Id: NetStream.cpp,v 1.75 2007/11/20 00:44:04 cmusick Exp $ */
>
>  #ifdef HAVE_CONFIG_H
>  #include "config.h"
> @@ -152,7 +152,7 @@
>                 return as_value();
>         }
>
> -       ns->play(fn.arg(0).to_string(&fn.env()));
> +       ns->play(fn.arg(0).to_string());
>
>         return as_value();
>  }
> @@ -163,7 +163,7 @@
>         uint32_t time = 0;
>         if (fn.nargs > 0)
>         {
> -               time = fn.arg(0).to_number<uint32_t>(&fn.env());
> +               time = fn.arg(0).to_number<uint32_t>();
>         }
>         ns->seek(static_cast<uint32_t>(time*1000.0));
>
> @@ -182,7 +182,7 @@
>         double time = 0;
>         if (fn.nargs > 0)
>         {
> -               time = fn.arg(0).to_number(&fn.env());
> +               time = fn.arg(0).to_number();
>         }
>         ns->setBufferTime(uint32_t(time*1000));
>
>
> Index: server/asobj/Object.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/Object.cpp,v
> retrieving revision 1.35
> retrieving revision 1.36
> diff -u -b -r1.35 -r1.36
> --- server/asobj/Object.cpp     14 Nov 2007 21:17:32 -0000      1.35
> +++ server/asobj/Object.cpp     20 Nov 2007 00:44:04 -0000      1.36
> @@ -17,7 +17,7 @@
>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>  //
>
> -/* $Id: Object.cpp,v 1.35 2007/11/14 21:17:32 strk Exp $ */
> +/* $Id: Object.cpp,v 1.36 2007/11/20 00:44:04 cmusick Exp $ */
>
>  #include "tu_config.h"
>  #include "Object.h"
> @@ -204,7 +204,7 @@
>                 }
>         }
>
> -       const std::string& propname = fn.arg(0).to_string(&(fn.env()));
> +       const std::string& propname = fn.arg(0).to_string();
>         if ( propname.empty() )
>         {
>                 IF_VERBOSE_ASCODING_ERRORS(
> @@ -268,7 +268,7 @@
>                 }
>         }
>
> -       const std::string& symbolid = fn.arg(0).to_string(&(fn.env()));
> +       const std::string& symbolid = fn.arg(0).to_string();
>         if ( symbolid.empty() )
>         {
>                 IF_VERBOSE_ASCODING_ERRORS(
> @@ -345,7 +345,7 @@
>                 return as_value(false);
>         }
>         as_value& arg = fn.arg(0);
> -       const std::string& propname = arg.to_string(&(fn.env()));
> +       const std::string& propname = arg.to_string();
>         if ( arg.is_undefined() || propname.empty() )
>         {
>                 IF_VERBOSE_ASCODING_ERRORS(
> @@ -368,7 +368,7 @@
>                 return as_value();
>         }
>         as_value& arg = fn.arg(0);
> -       const std::string& propname = arg.to_string(&(fn.env()));
> +       const std::string& propname = arg.to_string();
>         if ( arg.is_undefined() || propname.empty() )
>         {
>                 IF_VERBOSE_ASCODING_ERRORS(
>
> Index: server/asobj/Sound.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/Sound.cpp,v
> retrieving revision 1.20
> retrieving revision 1.21
> diff -u -b -r1.20 -r1.21
> --- server/asobj/Sound.cpp      31 Aug 2007 21:53:32 -0000      1.20
> +++ server/asobj/Sound.cpp      20 Nov 2007 00:44:04 -0000      1.21
> @@ -286,7 +286,7 @@
>         int si = -1;
>
>         if (fn.nargs > 0) {
> -               const std::string& name = fn.arg(0).to_string(&(fn.env()));
> +               const std::string& name = fn.arg(0).to_string();
>
>                 // check the import.
>                 movie_definition* def = 
> fn.env().get_target()->get_root_movie()->get_movie_definition();
> @@ -334,7 +334,7 @@
>
>         boost::intrusive_ptr<Sound> so = ensureType<Sound>(fn.this_ptr);
>
> -    const std::string& name = fn.arg(0).to_string(&(fn.env()));
> +    const std::string& name = fn.arg(0).to_string();
>      if (name.empty()) {
>                 IF_VERBOSE_ASCODING_ERRORS(
>                 log_aserror(_("attachSound needs a non-empty string"));
> @@ -444,7 +444,7 @@
>         }
>
>         boost::intrusive_ptr<Sound> so = ensureType<Sound>(fn.this_ptr);
> -       so->loadSound(fn.arg(0).to_string(&(fn.env())), fn.arg(1).to_bool());
> +       so->loadSound(fn.arg(0).to_string(), fn.arg(1).to_bool());
>
>         return as_value();
>  }
>
> Index: server/asobj/Stage.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/Stage.cpp,v
> retrieving revision 1.25
> retrieving revision 1.26
> diff -u -b -r1.25 -r1.26
> --- server/asobj/Stage.cpp      22 Oct 2007 19:19:20 -0000      1.25
> +++ server/asobj/Stage.cpp      20 Nov 2007 00:44:04 -0000      1.26
> @@ -71,7 +71,7 @@
>  Stage::onResize(as_environment* env)
>  {
>         as_value v;
> -       if (get_member(NSV::PROP_SCALE_MODE, &v) && v.to_string(env) == 
> "noScale" )
> +       if (get_member(NSV::PROP_SCALE_MODE, &v) && v.to_string() == 
> "noScale" )
>         {
>                 notifyResize(env);
>         }
> @@ -240,7 +240,7 @@
>         {
>                 Stage::ScaleMode mode = Stage::showAll;
>
> -               const std::string& str = fn.arg(0).to_string(&(fn.env()));
> +               const std::string& str = fn.arg(0).to_string();
>                 if ( str == "noScale" ) mode = Stage::noScale;
>                 else if ( str == "exactFill" ) mode = Stage::exactFill;
>                 else if ( str == "noBorder" ) mode = Stage::noBorder;
>
> Index: server/asobj/string.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/string.cpp,v
> retrieving revision 1.41
> retrieving revision 1.42
> diff -u -b -r1.41 -r1.42
> --- server/asobj/string.cpp     26 Oct 2007 08:26:54 -0000      1.41
> +++ server/asobj/string.cpp     20 Nov 2007 00:44:04 -0000      1.42
> @@ -16,7 +16,7 @@
>  // along with this program; if not, write to the Free Software
>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>
> -/* $Id: string.cpp,v 1.41 2007/10/26 08:26:54 strk Exp $ */
> +/* $Id: string.cpp,v 1.42 2007/11/20 00:44:04 cmusick Exp $ */
>
>  #ifdef HAVE_CONFIG_H
>  #include "config.h"
> @@ -162,7 +162,7 @@
>      std::string str = obj->str();
>
>      for (unsigned int i = 0; i < fn.nargs; i++) {
> -        str += fn.arg(i).to_string(&(fn.env()));
> +        str += fn.arg(i).to_string();
>      }
>
>      return as_value(str);
> @@ -238,7 +238,7 @@
>          return as_value(array.get());
>      }
>
> -    const std::string& delim = fn.arg(0).to_string(&(fn.env()));
> +    const std::string& delim = fn.arg(0).to_string();
>
>      // SWF5 didn't support multichar or empty delimiter
>      if ( SWFVersion < 6 )
> @@ -314,7 +314,7 @@
>
>      ENSURE_FN_ARGS(1, 2, -1);
>
> -    const std::string& toFind = fn.arg(0).to_string(&(fn.env()));
> +    const std::string& toFind = fn.arg(0).to_string();
>
>      size_t start = str.size();
>
> @@ -344,13 +344,13 @@
>
>      as_environment& env = fn.env();
>
> -    int start = valid_index(str, fn.arg(0).to_int(env));
> +    int start = valid_index(str, fn.arg(0).to_int());
>
>      int num = str.size();
>
>      if (fn.nargs >= 2)
>      {
> -        num = fn.arg(1).to_int(env);
> +        num = fn.arg(1).to_int();
>         if ( num < 0 )
>         {
>                 if ( -num <= start ) num = 0;
> @@ -425,14 +425,14 @@
>      ENSURE_FN_ARGS(1, 2, -1);
>
>      as_value& tfarg = fn.arg(0); // to find arg
> -    const std::string& toFind = tfarg.to_string(&(fn.env()));
> +    const std::string& toFind = tfarg.to_string();
>
>      size_t start = 0;
>
>      if (fn.nargs >= 2)
>      {
>          as_value& saval = fn.arg(1); // start arg val
> -        int start_arg = saval.to_int(fn.env());
> +        int start_arg = saval.to_int();
>          if ( start_arg > 0 ) start = (size_t) start_arg;
>         else
>         {
> @@ -569,7 +569,7 @@
>      std::string& str = obj->str();
>
>      if (fn.nargs > 0) {
> -        str = fn.arg(0).to_string(&(fn.env()));
> +        str = fn.arg(0).to_string();
>      }
>
>      // this shouldn't be needed
>
> Index: server/asobj/xml.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/xml.cpp,v
> retrieving revision 1.52
> retrieving revision 1.53
> diff -u -b -r1.52 -r1.53
> --- server/asobj/xml.cpp        14 Nov 2007 09:16:49 -0000      1.52
> +++ server/asobj/xml.cpp        20 Nov 2007 00:44:05 -0000      1.53
> @@ -17,7 +17,7 @@
>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>  //
>
> -/* $Id: xml.cpp,v 1.52 2007/11/14 09:16:49 bwy Exp $ */
> +/* $Id: xml.cpp,v 1.53 2007/11/20 00:44:05 cmusick Exp $ */
>
>  #ifdef HAVE_CONFIG_H
>  #include "config.h"
> @@ -533,7 +533,7 @@
>
>      boost::intrusive_ptr<XML> xml_obj = ensureType<XML>(fn.this_ptr);
>
> -    const std::string& filespec = fn.arg(0).to_string(&(fn.env()));
> +    const std::string& filespec = fn.arg(0).to_string();
>
>      URL url(filespec, get_base_url());
>
> @@ -608,7 +608,7 @@
>              }
>          }
>
> -        const std::string& xml_in = fn.arg(0).to_string(&(fn.env()));
> +        const std::string& xml_in = fn.arg(0).to_string();
>          if ( xml_in.empty() )
>          {
>              IF_VERBOSE_ASCODING_ERRORS(
> @@ -660,7 +660,7 @@
>  //    GNASH_REPORT_FUNCTION;
>
>      if (fn.nargs > 0) {
> -        const std::string& text = fn.arg(0).to_string(&(fn.env()));
> +        const std::string& text = fn.arg(0).to_string();
>         XMLNode *xml_obj = new XMLNode();
>         xml_obj->nodeNameSet(text);
>         xml_obj->nodeTypeSet(XMLNode::tText);
> @@ -690,7 +690,7 @@
>      XMLNode *xml_obj;
>
>      if (fn.nargs > 0) {
> -       const std::string& text = fn.arg(0).to_string(&(fn.env()));
> +       const std::string& text = fn.arg(0).to_string();
>         xml_obj = new XMLNode;
>         xml_obj->nodeValueSet(text);
>         xml_obj->nodeTypeSet(XMLNode::tText);
> @@ -743,7 +743,7 @@
>          return as_value();
>      }
>
> -    const std::string& text = fn.arg(0).to_string(&(fn.env()));
> +    const std::string& text = fn.arg(0).to_string();
>      ptr->parseXML(text);
>
>      return as_value();
>
> Index: server/asobj/xmlnode.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/xmlnode.cpp,v
> retrieving revision 1.40
> retrieving revision 1.41
> diff -u -b -r1.40 -r1.41
> --- server/asobj/xmlnode.cpp    14 Nov 2007 09:16:50 -0000      1.40
> +++ server/asobj/xmlnode.cpp    20 Nov 2007 00:44:05 -0000      1.41
> @@ -16,7 +16,7 @@
>  // along with this program; if not, write to the Free Software
>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>
> -/* $Id: xmlnode.cpp,v 1.40 2007/11/14 09:16:50 bwy Exp $ */
> +/* $Id: xmlnode.cpp,v 1.41 2007/11/20 00:44:05 cmusick Exp $ */
>
>  #ifdef HAVE_CONFIG_H
>  #include "config.h"
> @@ -439,10 +439,10 @@
>      XMLNode *xml_obj = new XMLNode;
>      if ( fn.nargs > 0 )
>      {
> -        
> xml_obj->nodeTypeSet(XMLNode::NodeType(int(fn.arg(0).to_number(&(fn.env())))));
> +        xml_obj->nodeTypeSet(XMLNode::NodeType(int(fn.arg(0).to_number())));
>          if (fn.nargs > 1)
>          {
> -            xml_obj->nodeValueSet(fn.arg(1).to_string(&(fn.env())));
> +            xml_obj->nodeValueSet(fn.arg(1).to_string());
>          }
>      }
>
> @@ -590,7 +590,7 @@
>      }
>      else
>      {
> -        ptr->nodeValueSet(fn.arg(0).to_string(&(fn.env())));
> +        ptr->nodeValueSet(fn.arg(0).to_string());
>      }
>      return rv;
>  }
> @@ -610,7 +610,7 @@
>      }
>      else
>      {
> -       ptr->nodeNameSet(fn.arg(0).to_string(&(fn.env())));
> +       ptr->nodeNameSet(fn.arg(0).to_string());
>      }
>      return rv;
>  }
>
> Index: server/asobj/xmlsocket.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/asobj/xmlsocket.cpp,v
> retrieving revision 1.36
> retrieving revision 1.37
> diff -u -b -r1.36 -r1.37
> --- server/asobj/xmlsocket.cpp  20 Oct 2007 06:00:13 -0000      1.36
> +++ server/asobj/xmlsocket.cpp  20 Nov 2007 00:44:05 -0000      1.37
> @@ -439,8 +439,8 @@
>      }
>
>      as_value hostval = fn.arg(0);
> -    const std::string& host = hostval.to_string(&fn.env());
> -    int port = int(fn.arg(1).to_number(&fn.env()));
> +    const std::string& host = hostval.to_string();
> +    int port = int(fn.arg(1).to_number());
>
>      bool success = ptr->obj.connect(host.c_str(), port);
>
> @@ -481,7 +481,7 @@
>      GNASH_REPORT_FUNCTION;
>
>      boost::intrusive_ptr<xmlsocket_as_object> ptr = 
> ensureType<xmlsocket_as_object>(fn.this_ptr);
> -    const std::string& object = fn.arg(0).to_string(&fn.env());
> +    const std::string& object = fn.arg(0).to_string();
>      //  log_msg(_("%s: host=%s, port=%g"), __FUNCTION__, host, port);
>      return as_value(ptr->obj.send(object));
>  }
> @@ -557,7 +557,7 @@
>      }
>
>      as_environment& env = fn.env();
> -    const std::string& xmlin = fn.arg(0).to_string(&env);
> +    const std::string& xmlin = fn.arg(0).to_string();
>
>      if ( xmlin.empty() )
>      {
>
> Index: server/vm/ASHandlers.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
> retrieving revision 1.153
> retrieving revision 1.154
> diff -u -b -r1.153 -r1.154
> --- server/vm/ASHandlers.cpp    16 Nov 2007 21:28:54 -0000      1.153
> +++ server/vm/ASHandlers.cpp    20 Nov 2007 00:44:05 -0000      1.154
> @@ -17,7 +17,7 @@
>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>  //
>
> -/* $Id: ASHandlers.cpp,v 1.153 2007/11/16 21:28:54 strk Exp $ */
> +/* $Id: ASHandlers.cpp,v 1.154 2007/11/20 00:44:05 cmusick Exp $ */
>
>  #ifdef HAVE_CONFIG_H
>  #include "config.h"
> @@ -726,8 +726,8 @@
>
>         as_environment& env = thread.env;
>         thread.ensureStack(2);
> -       double operand1 = env.top(1).to_number(&env);
> -       double operand2 = env.top(0).to_number(&env);
> +       double operand1 = env.top(1).to_number();
> +       double operand2 = env.top(0).to_number();
>         env.top(1) = operand1 + operand2;
>         env.drop(1);
>  }
> @@ -741,8 +741,8 @@
>
>         as_environment& env = thread.env;
>         thread.ensureStack(2);
> -       double operand1 = env.top(1).to_number(&env);
> -       double operand2 = env.top(0).to_number(&env);
> +       double operand1 = env.top(1).to_number();
> +       double operand2 = env.top(0).to_number();
>         env.top(1) = operand1 - operand2;
>         env.drop(1);
>  }
> @@ -756,8 +756,8 @@
>
>         as_environment& env = thread.env;
>         thread.ensureStack(2);
> -       double operand1 = env.top(1).to_number(&env);
> -       double operand2 = env.top(0).to_number(&env);
> +       double operand1 = env.top(1).to_number();
> +       double operand2 = env.top(0).to_number();
>         env.top(1) = operand1 * operand2;
>         env.drop(1);
>  }
> @@ -771,8 +771,8 @@
>
>         as_environment& env = thread.env;
>         thread.ensureStack(2);
> -       double operand1 = env.top(1).to_number(&env);
> -       double operand2 = env.top(0).to_number(&env);
> +       double operand1 = env.top(1).to_number();
> +       double operand2 = env.top(0).to_number();
>
>         if (operand2 == 0 && env.get_version() < 5)
>         {
> @@ -798,11 +798,11 @@
>      as_value& op1 = env.top(0);
>      as_value& op2 = env.top(1);
>
> -    env.top(1).set_bool(op1.to_number(&env) == op2.to_number(&env));
> +    env.top(1).set_bool(op1.to_number() == op2.to_number());
>
>      // Flash4 used 1 and 0 as return from this tag
>      if ( env.get_version() < 5 ) {
> -      env.top(1).to_number(&env);
> +      env.top(1).to_number();
>      }
>
>      env.drop(1);
> @@ -814,7 +814,7 @@
>  //    GNASH_REPORT_FUNCTION;
>      as_environment& env = thread.env;
>      thread.ensureStack(2);
> -    env.top(1).set_bool(env.top(1).to_number(&env) < 
> env.top(0).to_number(&env));
> +    env.top(1).set_bool(env.top(1).to_number() < env.top(0).to_number());
>      env.drop(1);
>  }
>
> @@ -853,7 +853,7 @@
>  //    GNASH_REPORT_FUNCTION;
>      as_environment& env = thread.env;
>      thread.ensureStack(2);
> -    env.top(1).set_bool(env.top(1).to_string(&env) == 
> env.top(0).to_string(&env));
> +    env.top(1).set_bool(env.top(1).to_string() == env.top(0).to_string());
>      env.drop(1);
>  }
>
> @@ -888,9 +888,9 @@
>         return;
>      }
>
> -    int size = unsigned(size_val.to_number(&env));
> +    int size = unsigned(size_val.to_number());
>
> -    int        base = int(base_val.to_number(&env)); // TODO: use to_int ?
> +    int        base = int(base_val.to_number()); // TODO: use to_int ?
>      int version = env.get_version();
>      const std::string& str = string_val.to_string_versioned(version);
>
> @@ -973,7 +973,7 @@
>  //    GNASH_REPORT_FUNCTION;
>      as_environment& env = thread.env;
>      thread.ensureStack(1);
> -    env.top(0).set_int(int(floor(env.top(0).to_number(&env)))); // TODO: use 
> to_int ?
> +    env.top(0).set_int(int(floor(env.top(0).to_number()))); // TODO: use 
> to_int ?
>  }
>
>  void
> @@ -985,7 +985,7 @@
>         thread.ensureStack(1); // variable name
>
>         as_value& top_value = env.top(0);
> -       string var_string = top_value.to_string(&env);
> +       string var_string = top_value.to_string();
>         if ( var_string.empty() )
>         {
>                 top_value.set_undefined();
> @@ -1015,7 +1015,7 @@
>         // stack must be contain at least two items
>         thread.ensureStack(2);
>
> -        const string& name = env.top(1).to_string(&env);
> +        const string& name = env.top(1).to_string();
>         thread.setVariable(name, env.top(0));
>
>          IF_VERBOSE_ACTION (
> @@ -1043,7 +1043,7 @@
>         // we don't ues the target sprite directly, instead we fetch the 
> _target(string type)
>         // of that sprite first and then search the final target(might be a 
> different one).
>         // see tests in opcode_guard_test2.sc
> -       const string& target_name = env.top(0).to_string(&env);
> +       const string& target_name = env.top(0).to_string();
>
>         CommonSetTarget(thread, target_name);
>
> @@ -1073,7 +1073,7 @@
>         thread.ensureStack(2); // prop num, target
>
>         as_value& tgt_val = env.top(1);
> -       std::string tgt_str = tgt_val.to_string(&env);
> +       std::string tgt_str = tgt_val.to_string();
>         character *target = NULL;
>         if ( tgt_str.empty() )
>         {
> @@ -1091,7 +1091,7 @@
>         {
>                 target = env.find_target(tgt_str);
>         }
> -       unsigned int prop_number = (unsigned int)env.top(0).to_number(&env);
> +       unsigned int prop_number = (unsigned int)env.top(0).to_number();
>         if (target)
>         {
>                 if ( prop_number < get_property_names().size() )
> @@ -1132,8 +1132,8 @@
>
>      thread.ensureStack(3); // prop val, prop num, target
>
> -    character *target = env.find_target(env.top(2).to_string(&env));
> -    unsigned int prop_number = (unsigned int)env.top(1).to_number(&env);
> +    character *target = env.find_target(env.top(2).to_string());
> +    unsigned int prop_number = (unsigned int)env.top(1).to_number();
>      as_value prop_val = env.top(0);
>
>      if (target) {
> @@ -1172,9 +1172,9 @@
>
>         thread.ensureStack(3);
>
> -       int depth = 
> int(env.top(0).to_number(&env))+character::staticDepthOffset; // TODO: use 
> to_int ?
> -       const std::string& newname = env.top(1).to_string(&env);
> -       const std::string& path = env.top(2).to_string(&env);
> +       int depth = int(env.top(0).to_number())+character::staticDepthOffset; 
> // TODO: use to_int ?
> +       const std::string& newname = env.top(1).to_string();
> +       const std::string& path = env.top(2).to_string();
>
>         character* ch = env.find_target(path);
>         if ( ! ch )
> @@ -1210,7 +1210,7 @@
>
>         thread.ensureStack(1);
>
> -       std::string path = env.pop().to_string(&env);
> +       std::string path = env.pop().to_string();
>
>         character* ch = env.find_target(path);
>         if ( ! ch )
> @@ -1245,7 +1245,7 @@
>      thread.ensureStack(1);
>
>      //std::string val = 
> env.pop().to_string_versioned(VM::get().getSWFVersion(), &env);
> -    std::string val = env.pop().to_string(&env);
> +    std::string val = env.pop().to_string();
>      log_trace("%s", val.c_str());
>  }
>
> @@ -1261,7 +1261,7 @@
>
>         drag_state st;
>
> -       character* tgt = env.find_target(env.top(0).to_string(&env));
> +       character* tgt = env.find_target(env.top(0).to_string());
>         if ( tgt )
>         {
>                 st.setCharacter( tgt );
> @@ -1285,10 +1285,10 @@
>                 // It looks like coordinates of drag bounds are
>                 // given as PIXELS :
>                 // http://www.richsalter.btinternet.co.uk/cks1/cks1.swf
> -               float y1 = PIXELS_TO_TWIPS(env.top(3).to_number(&env));
> -               float x1 = PIXELS_TO_TWIPS(env.top(4).to_number(&env));
> -               float y0 = PIXELS_TO_TWIPS(env.top(5).to_number(&env));
> -               float x0 = PIXELS_TO_TWIPS(env.top(6).to_number(&env));
> +               float y1 = PIXELS_TO_TWIPS(env.top(3).to_number());
> +               float x1 = PIXELS_TO_TWIPS(env.top(4).to_number());
> +               float y0 = PIXELS_TO_TWIPS(env.top(5).to_number());
> +               float x0 = PIXELS_TO_TWIPS(env.top(6).to_number());
>
>                 // check for swapped values
>                 if ( y1 < y0 )
> @@ -1338,7 +1338,7 @@
>  //    GNASH_REPORT_FUNCTION;
>      as_environment& env = thread.env;
>      thread.ensureStack(2);
> -    env.top(1).set_bool(env.top(1).to_string(&env) < 
> env.top(0).to_string(&env));
> +    env.top(1).set_bool(env.top(1).to_string() < env.top(0).to_string());
>         env.drop(1);
>  }
>
> @@ -1409,7 +1409,7 @@
>         thread.ensureStack(2);
>
>         as_object *obj = env.pop().to_object().get();
> -       int count = static_cast<int>(env.pop().to_number(&env));
> +       int count = static_cast<int>(env.pop().to_number());
>         as_value a(1);
>
>         if (!obj)
> @@ -1440,7 +1440,7 @@
>
>         thread.ensureStack(1);  // max
>
> -       int     max = int(env.top(0).to_number(&env)); // TODO: use to_int ?
> +       int     max = int(env.top(0).to_number()); // TODO: use to_int ?
>         if (max < 1) max = 1;
>         env.top(0).set_int(tu_random::next_random() % max);
>  }
> @@ -1542,7 +1542,7 @@
>      as_environment& env = thread.env;
>
>      thread.ensureStack(1);
> -    string str = env.top(0).to_string(&env);
> +    string str = env.top(0).to_string();
>
>      if (str.empty())
>      {
> @@ -1563,7 +1563,7 @@
>  //    GNASH_REPORT_FUNCTION;
>      as_environment& env = thread.env;
>      thread.ensureStack(1);
> -    string str = env.top(0).to_string(&env);
> +    string str = env.top(0).to_string();
>      if ( str.empty() )
>      {
>         env.top(0).set_undefined();
> @@ -1581,7 +1581,7 @@
>      as_environment& env = thread.env;
>      thread.ensureStack(1);
>      char       buf[2];
> -    buf[0] = int(env.top(0).to_number(&env)); // TODO: use to_int() ?
> +    buf[0] = int(env.top(0).to_number()); // TODO: use to_int() ?
>      buf[1] = 0;
>      env.top(0).set_string(buf);
>  }
> @@ -1603,8 +1603,8 @@
>
>      thread.ensureStack(3);
>
> -    int size = env.top(0).to_int(env);
> -    int start = env.top(1).to_int(env);
> +    int size = env.top(0).to_int();
> +    int start = env.top(1).to_int();
>      as_value& string_val = env.top(2);
>
>      env.drop(2);
> @@ -1630,7 +1630,7 @@
>          return;
>      }
>
> -    string str = string_val.to_string(&env);
> +    string str = string_val.to_string();
>      int length = 0;
>      std::vector<int> offsets;
>      offsets.reserve(str.length() + 1);
> @@ -1687,7 +1687,7 @@
>
>      thread.ensureStack(1);
>
> -    wchar_t i = static_cast<wchar_t> (env.top(0).to_int(env));
> +    wchar_t i = static_cast<wchar_t> (env.top(0).to_int());
>      boost::scoped_array<char> strng(new char [MB_CUR_MAX + 1]);
>      char *str = strng.get();
>      memset(str, '\0', MB_CUR_MAX + 1);
> @@ -2034,7 +2034,7 @@
>         string target_string;
>         if ( ! target.is_undefined() && ! target.is_null() )
>         {
> -               target_string = target.to_string(&env);
> +               target_string = target.to_string();
>         }
>
>         // If the url starts with "FSCommand:", then this is
> @@ -2087,7 +2087,7 @@
>                 return;
>         }
>
> -       character* target_ch = env.find_target(target.to_string(&env));
> +       character* target_ch = env.find_target(target.to_string());
>         sprite_instance* target_movie = target_ch ? target_ch->to_movie() : 0;
>
>         if ( loadVariableFlag )
> @@ -2250,7 +2250,7 @@
>         }
>         else
>         {
> -               const string& url = url_val.to_string(&env);
> +               const string& url = url_val.to_string();
>                 CommonGetUrl(env, env.top(0), url.c_str(), method);
>         }
>
> @@ -2299,7 +2299,7 @@
>
>         thread.ensureStack(1); // frame spec
>
> -       const string& target_frame = env.top(0).to_string(&env);
> +       const string& target_frame = env.top(0).to_string();
>         string target_path;
>         string frame_var;
>
> @@ -2360,7 +2360,7 @@
>         unsigned char play_flag = code[pc + 3];
>         sprite_instance::play_state state = play_flag ? sprite_instance::PLAY 
> : sprite_instance::STOP;
>
> -       string target_frame = env.pop().to_string(&env);
> +       string target_frame = env.pop().to_string();
>         string target_path;
>         string frame_var;
>
> @@ -2418,7 +2418,7 @@
>         thread.ensureStack(2); // obj, member
>
>         // TODO: some parameter checking ?
> -       const std::string& propname = env.top(0).to_string(&env);
> +       const std::string& propname = env.top(0).to_string();
>         boost::intrusive_ptr<as_object> obj = env.top(1).to_object();
>
>         if ( ! obj )
> @@ -2451,7 +2451,7 @@
>         thread.ensureStack(1); // var
>
>         // See bug #18482, this works fine now (assuming the bug report is 
> correct)
> -       env.top(0) = thread.delVariable(env.top(0).to_string(&env));
> +       env.top(0) = thread.delVariable(env.top(0).to_string());
>  }
>
>  void
> @@ -2463,10 +2463,10 @@
>
>      as_value& value = env.top(0);
>      as_value& varname = env.top(1);
> -    thread.setLocalVariable(varname.to_string(&env), value);
> +    thread.setLocalVariable(varname.to_string(), value);
>
>      IF_VERBOSE_ACTION (
> -    log_action(_("-- set local var: %s = %s"), 
> varname.to_string(&env).c_str(), value.to_debug_string().c_str());
> +    log_action(_("-- set local var: %s = %s"), varname.to_string().c_str(), 
> value.to_debug_string().c_str());
>      );
>
>      env.drop(2);
> @@ -2485,7 +2485,7 @@
>      //env.dump_stack();
>
>      // Let's consider it a as a string and lookup the function.
> -    const std::string& funcname = env.top(0).to_string(&env);
> +    const std::string& funcname = env.top(0).to_string();
>      as_object* this_ptr = thread.getThisPointer();
>
>      as_value function = thread.getVariable(funcname, &this_ptr);
> @@ -2493,7 +2493,7 @@
>      if ( ! function.is_object() )
>      {
>          IF_VERBOSE_ASCODING_ERRORS (
> -        log_aserror(_("ActionCallFunction: %s is not an object"), 
> env.top(0).to_string(&env).c_str());
> +        log_aserror(_("ActionCallFunction: %s is not an object"), 
> env.top(0).to_string().c_str());
>          )
>      }
>      else if ( ! function.is_function() )
> @@ -2510,7 +2510,7 @@
>      }
>
>      // Get number of args, modifying it if not enough values are on the 
> stack.
> -    unsigned nargs = unsigned(env.top(1).to_number(&env));
> +    unsigned nargs = unsigned(env.top(1).to_number());
>      unsigned available_args = env.stack_size()-2; // 2 for func name and 
> nargs
>      if ( available_args < nargs )
>      {
> @@ -2532,7 +2532,7 @@
>      as_value result = call_method(function, &env, this_ptr,
>                    nargs, env.get_top_index() - 2);
>
> -    //log_msg(_("Function's result: %s"), result.to_string(&env));
> +    //log_msg(_("Function's result: %s"), result.to_string();
>
>      env.drop(nargs + 1);
>      env.top(0) = result;
> @@ -2564,7 +2564,7 @@
>         env.drop(1);
>
>  #ifdef USE_DEBUGGER
> -//        cerr << "Returning from function: " << env.top(0).to_string(&env) 
> << endl;
> +//        cerr << "Returning from function: " << env.top(0).to_string << 
> endl;
>          debugger.callStackPop();
>  #endif
>
> @@ -2585,14 +2585,14 @@
>      thread.ensureStack(2); // x, ,y
>
>      as_value   result;
> -    double     y = env.pop().to_number(&env);
> -    double     x = env.pop().to_number(&env);
> +    double     y = env.pop().to_number();
> +    double     x = env.pop().to_number();
>  //  Don't need to check for y being 0 here - if it's zero, fmod returns NaN
>  //  which is what flash would do too
>      result = fmod(x, y);
>  //  env.top(1).set_double(fmod(env.top(1).to_bool() && env.top(0).to_bool());
>  //  env.drop(1);
> -//  log_error(_("modulo x=%f, y=%f, z=%f"), x, y, result.to_number(&env));
> +//  log_error(_("modulo x=%f, y=%f, z=%f"), x, y, result.to_number());
>      env.push(result);
>  }
>
> @@ -2605,14 +2605,14 @@
>         thread.ensureStack(2); // classname, nargs
>
>         as_value val = env.pop();
> -       const string& classname = val.to_string(&env);
> +       const string& classname = val.to_string();
>
>         IF_VERBOSE_ACTION (
>                 log_action(_("---new object: %s"),
>                         classname.c_str());
>         );
>
> -       unsigned nargs = unsigned(env.pop().to_number(&env));
> +       unsigned nargs = unsigned(env.pop().to_number());
>
>         thread.ensureStack(nargs); // previous 2 entries popped
>
> @@ -2655,7 +2655,7 @@
>  //    GNASH_REPORT_FUNCTION;
>      as_environment& env = thread.env;
>      thread.ensureStack(1); // var name
> -    const string& varname = env.top(0).to_string(&env);
> +    const string& varname = env.top(0).to_string();
>      if ( thread.isFunction() )
>      {
>         env.declare_local(varname);
> @@ -2677,7 +2677,7 @@
>
>      thread.ensureStack(1); // array size name
>
> -    int        array_size = (int) env.pop().to_number(&env);
> +    int        array_size = (int) env.pop().to_number();
>      assert(array_size >= 0);
>
>      thread.ensureStack((unsigned int)array_size); // array elements
> @@ -2697,8 +2697,8 @@
>          // @@ TODO a set_member that takes an int or as_value?
>         // @@ TODO: don'e use as_value for converting a number to a string !!
>          index_number.set_int(i);
> -        //ao->set_member(index_number.to_string(&env), env.pop());
> -        thread.setObjectMember(*ao, index_number.to_string(&env), env.pop());
> +        //ao->set_member(index_number.to_string(), env.pop());
> +        thread.setObjectMember(*ao, index_number.to_string(), env.pop());
>      }
>
>      env.push(result);
> @@ -2725,7 +2725,7 @@
>      //     [003]   Integer: 1
>      //    SWFACTION_INITOBJECT
>
> -    int nmembers = (int) env.pop().to_number(&env);
> +    int nmembers = (int) env.pop().to_number();
>
>      thread.ensureStack(nmembers*2); // name, value for each member
>
> @@ -2734,7 +2734,7 @@
>      // Set provided members
>      for (int i=0; i<nmembers; ++i) {
>          as_value member_value = env.top(0);
> -       string member_name = env.top(1).to_string(&env);
> +       string member_name = env.top(1).to_string();
>          //new_obj_ptr->set_member(member_name, member_value);
>         thread.setObjectMember(*new_obj_ptr, member_name, member_value);
>         env.drop(2);
> @@ -2808,7 +2808,7 @@
>
>         // Get the object
>         as_value& var_name = env.top(0);
> -       string var_string = var_name.to_string(&env);
> +       string var_string = var_name.to_string();
>
>         as_value variable = thread.getVariable(var_string);
>
> @@ -2844,14 +2844,14 @@
>         as_value v1 = env.top(0);
>         as_value v2 = env.top(1);
>
> -       try { v1 = v1.to_primitive(env); }
> +       try { v1 = v1.to_primitive(); }
>         catch (ActionTypeError& e)
>         {
>                 log_debug("%s.to_primitive() threw an error during 
> ActionNewAdd",
>                         env.top(0).to_debug_string().c_str());
>         }
>
> -       try { v2 = v2.to_primitive(env); }
> +       try { v2 = v2.to_primitive(); }
>         catch (ActionTypeError& e)
>         {
>                 log_debug("%s.to_primitive() threw an error during 
> ActionNewAdd",
> @@ -2869,16 +2869,16 @@
>         if (v1.is_string() || v2.is_string() )
>         {
>                 int version = env.get_version();
> -               v2.convert_to_string_versioned(version, &env);
> -               v2.string_concat(v1.to_string_versioned(version, &env));
> +               v2.convert_to_string_versioned(version);
> +               v2.string_concat(v1.to_string_versioned(version));
>                 env.top(1) = v2;
>         }
>         else
>         {
>                 // use numeric semantic
> -               double v2num = v2.to_number(&env);
> +               double v2num = v2.to_number();
>                 //log_msg(_("v2 num = %g"), v2num);
> -               double v1num = v1.to_number(&env);
> +               double v1num = v1.to_number();
>                 //log_msg(_("v1 num = %g"), v1num);
>
>                 v2.set_double(v2num + v1num);
> @@ -2903,14 +2903,14 @@
>         as_value operand1;
>         as_value operand2;
>
> -       try { operand1 = op1_in.to_primitive(env); }
> +       try { operand1 = op1_in.to_primitive(); }
>         catch (ActionTypeError& e)
>         {
>                 log_debug("%s.to_primitive() threw an error during 
> ActionNewLessThen",
>                         op1_in.to_debug_string().c_str());
>         }
>
> -       try { operand2 = op2_in.to_primitive(env); }
> +       try { operand2 = op2_in.to_primitive(); }
>         catch (ActionTypeError& e)
>         {
>                 log_debug("%s.to_primitive() threw an error during 
> ActionNewLessThen",
> @@ -2919,12 +2919,12 @@
>
>         if ( operand1.is_string() && operand2.is_string() )
>         {
> -               env.top(1).set_bool(operand1.to_string(&env) < 
> operand2.to_string(&env));
> +               env.top(1).set_bool(operand1.to_string() < 
> operand2.to_string());
>         }
>         else
>         {
> -               double op1 = operand1.to_number(&env);
> -               double op2 = operand2.to_number(&env);
> +               double op1 = operand1.to_number();
> +               double op2 = operand2.to_number();
>
>                 if ( isnan(op1) || isnan(op2) )
>                 {
> @@ -2949,7 +2949,7 @@
>      thread.ensureStack(2);
>
>      /// ECMA-262 abstract equality comparison (sect 11.9.3)
> -    env.top(1).set_bool(env.top(1).equals(env.top(0), env));
> +    env.top(1).set_bool(env.top(1).equals(env.top(0)));
>      env.drop(1);
>  }
>
> @@ -2959,7 +2959,7 @@
>  //    GNASH_REPORT_FUNCTION;
>      as_environment& env = thread.env;
>      thread.ensureStack(1);
> -    env.top(0).convert_to_number(&env);
> +    env.top(0).convert_to_number();
>  }
>
>  void
> @@ -3010,7 +3010,7 @@
>      if (!obj) {
>  //         IF_VERBOSE_DEBUG(log_msg(_("getMember called against "
>  //                                  "a value that does not cast "
> -//                                  "to an as_object: %s"), 
> target.to_string(&env).c_str()));
> +//                                  "to an as_object: %s"), 
> target.to_string.c_str()));
>          env.top(1).set_undefined();
>          env.drop(1);
>          return;
> @@ -3021,7 +3021,7 @@
>                 target.to_debug_string().c_str(), (void*)obj.get());
>         );
>
> -        if ( ! thread.getObjectMember(*obj, member_name.to_string(&env), 
> env.top(1)) )
> +        if ( ! thread.getObjectMember(*obj, member_name.to_string(), 
> env.top(1)) )
>         {
>              env.top(1).set_undefined();
>          }
> @@ -3046,7 +3046,7 @@
>         thread.ensureStack(3); // value, member, object
>
>         boost::intrusive_ptr<as_object> obj = env.top(2).to_object();
> -       const string& member_name = env.top(1).to_string(&env);
> +       const string& member_name = env.top(1).to_string();
>         const as_value& member_value = env.top(0);
>
>         if (obj)
> @@ -3084,7 +3084,7 @@
>
>      thread.ensureStack(1);
>
> -    env.top(0).set_double(env.top(0).to_number(&env)+1);
> +    env.top(0).set_double(env.top(0).to_number()+1);
>  }
>
>  void
> @@ -3093,7 +3093,7 @@
>  //    GNASH_REPORT_FUNCTION;
>      as_environment& env = thread.env;
>      thread.ensureStack(1);
> -    env.top(0).set_double(env.top(0).to_number(&env)-1);
> +    env.top(0).set_double(env.top(0).to_number()-1);
>  }
>
>  void
> @@ -3115,7 +3115,7 @@
>         as_value& obj_value = env.top(1);
>
>         // Get number of args, modifying it if not enough values are on the 
> stack.
> -       unsigned nargs = unsigned(env.top(2).to_number(&env));
> +       unsigned nargs = unsigned(env.top(2).to_number());
>         unsigned available_args = env.stack_size()-3; // 3 for obj, func and 
> nargs
>         if ( available_args < nargs )
>         {
> @@ -3134,7 +3134,7 @@
>         log_action(_(" method nargs: %d"), nargs);
>         );
>
> -       string method_string = method_name.to_string(&env);
> +       string method_string = method_name.to_string();
>         as_value method_val;
>         boost::intrusive_ptr<as_object> obj = obj_value.to_object();
>         if ( method_name.is_undefined() || method_string.empty() )
> @@ -3219,8 +3219,8 @@
>  //     // IT IS NOT GUARANTEE WE DO HAVE A METHOD NAME HERE !
>         if ( ! method_name.is_undefined() )
>         {
> -               debugger.callStackPush(method_name.to_string(&env));
> -               debugger.matchBreakPoint(method_name.to_string(&env), true);
> +               debugger.callStackPush(method_name.to_string();
> +               debugger.matchBreakPoint(method_name.to_string(), true);
>         }
>         else
>         {
> @@ -3263,7 +3263,7 @@
>         as_value obj_val = env.pop();
>
>         // Get number of args, modifying it if not enough values are on the 
> stack.
> -       unsigned nargs = unsigned(env.pop().to_number(&env));
> +       unsigned nargs = unsigned(env.pop().to_number());
>         unsigned available_args = env.stack_size(); // previous 3 entries 
> popped
>         if ( available_args < nargs )
>         {
> @@ -3287,7 +3287,7 @@
>                 return;
>         }
>
> -       string method_string = method_name.to_string(&env);
> +       string method_string = method_name.to_string();
>         as_value method_val;
>         if ( method_name.is_undefined() || method_string.empty() )
>         {
> @@ -3325,8 +3325,8 @@
>         boost::intrusive_ptr<as_object> new_obj = 
> construct_object(method.get(),
>                         env, nargs, env.get_top_index());
>
> -       //log_msg(_("%s( [%d args] ) returned %s"), 
> method_val.to_string(&env),
> -       //      nargs, new_obj.to_string(&env));
> +       //log_msg(_("%s( [%d args] ) returned %s"), method_val.to_string(),
> +       //      nargs, new_obj.to_string();
>
>
>         env.drop(nargs);
> @@ -3406,8 +3406,8 @@
>         as_environment& env = thread.env;
>         thread.ensureStack(2);
>
> -       int operand1 = env.top(1).to_int(env);
> -       int operand2 = env.top(0).to_int(env);
> +       int operand1 = env.top(1).to_int();
> +       int operand2 = env.top(0).to_int();
>
>         env.top(1) = operand1 & operand2;
>         env.drop(1);
> @@ -3420,8 +3420,8 @@
>         as_environment& env = thread.env;
>         thread.ensureStack(2);
>
> -       int operand1 = env.top(1).to_int(env);
> -       int operand2 = env.top(0).to_int(env);
> +       int operand1 = env.top(1).to_int();
> +       int operand2 = env.top(0).to_int();
>
>         env.top(1) = operand1|operand2;
>         env.drop(1);
> @@ -3435,8 +3435,8 @@
>         as_environment& env = thread.env;
>         thread.ensureStack(2);
>
> -       int operand1 = env.top(1).to_int(env);
> -       int operand2 = env.top(0).to_int(env);
> +       int operand1 = env.top(1).to_int();
> +       int operand2 = env.top(0).to_int();
>
>         env.top(1) = operand1^operand2;
>         env.drop(1);
> @@ -3452,8 +3452,8 @@
>         as_environment& env = thread.env;
>         thread.ensureStack(2);
>
> -       int16_t operand1 = env.top(1).to_int(env);
> -       int16_t operand2 = env.top(0).to_int(env);
> +       int16_t operand1 = env.top(1).to_int();
> +       int16_t operand2 = env.top(0).to_int();
>
>         env.top(1) = operand1 << operand2;
>         env.drop(1);
> @@ -3466,8 +3466,8 @@
>         as_environment& env = thread.env;
>         thread.ensureStack(2);
>
> -       int32_t operand1 = env.top(1).to_int(env);
> -       int32_t operand2 = env.top(0).to_int(env);
> +       int32_t operand1 = env.top(1).to_int();
> +       int32_t operand2 = env.top(0).to_int();
>
>         int32_t res = operand1 >> operand2;
>
> @@ -3486,8 +3486,8 @@
>         as_environment& env = thread.env;
>         thread.ensureStack(2);
>
> -       uint32_t operand1 = env.top(1).to_int(env);
> -       int32_t operand2 = env.top(0).to_int(env); // TODO: check this !
> +       uint32_t operand1 = env.top(1).to_int();
> +       int32_t operand2 = env.top(0).to_int(); // TODO: check this !
>
>         env.top(1) = uint32_t( operand1 >> operand2 );
>         env.drop(1);
> @@ -3517,12 +3517,12 @@
>
>         if ( operand1.is_string() && operand2.is_string() )
>         {
> -               env.top(1).set_bool(operand1.to_string(&env) > 
> operand2.to_string(&env));
> +               env.top(1).set_bool(operand1.to_string() > 
> operand2.to_string());
>         }
>         else
>         {
> -               double op1 = operand1.to_number(&env);
> -               double op2 = operand2.to_number(&env);
> +               double op1 = operand1.to_number();
> +               double op2 = operand2.to_number();
>
>                 if ( isnan(op1) || isnan(op2) )
>                 {
> @@ -3542,7 +3542,7 @@
>  //    GNASH_REPORT_FUNCTION;
>      as_environment& env = thread.env;
>      thread.ensureStack(2);
> -    env.top(1).set_bool(env.top(1).to_string(&env) > 
> env.top(0).to_string(&env));
> +    env.top(1).set_bool(env.top(1).to_string() > env.top(0).to_string());
>      env.drop(1);
>  }
>
>
> Index: testsuite/actionscript.all/TextField.as
> ===================================================================
> RCS file: /sources/gnash/gnash/testsuite/actionscript.all/TextField.as,v
> retrieving revision 1.31
> retrieving revision 1.32
> diff -u -b -r1.31 -r1.32
> --- testsuite/actionscript.all/TextField.as     14 Nov 2007 16:31:50 -0000    
>   1.31
> +++ testsuite/actionscript.all/TextField.as     20 Nov 2007 00:44:05 -0000    
>   1.32
> @@ -19,7 +19,7 @@
>  // compile this test case with Ming makeswf, and then
>  // execute it like this gnash -1 -r 0 -v out.swf
>
> -rcsid="$Id: TextField.as,v 1.31 2007/11/14 16:31:50 strk Exp $";
> +rcsid="$Id: TextField.as,v 1.32 2007/11/20 00:44:05 cmusick Exp $";
>
>  #include "check.as"
>
> @@ -294,7 +294,7 @@
>  check_equals(tf.htmlText, '');
>  tf.htmlText = new Array;
>  check_equals(typeof(tf.htmlText), 'string'); // forced cast to string
> -xcheck_equals(tf.htmlText, '');
> +check_equals(tf.htmlText, '');
>  check_equals(tf.html, false);
>  tf.htmlText = "Hello <b>html</b> world";
>  check_equals(tf.html, false); // assigning to htmlText doesn't change the 
> 'html' flag
>
> Index: testsuite/misc-ming.all/intervalTestRunner.cpp
> ===================================================================
> RCS file: 
> /sources/gnash/gnash/testsuite/misc-ming.all/intervalTestRunner.cpp,v
> retrieving revision 1.8
> retrieving revision 1.9
> diff -u -b -r1.8 -r1.9
> --- testsuite/misc-ming.all/intervalTestRunner.cpp      19 Sep 2007 14:20:51 
> -0000      1.8
> +++ testsuite/misc-ming.all/intervalTestRunner.cpp      20 Nov 2007 00:44:05 
> -0000      1.9
> @@ -118,7 +118,7 @@
>
>         root->get_member(st.find("pushed_args"), &tmp);
>         as_environment env; // needed for proper to_string()
> -       check_equals(tmp.to_string(&env), std::string("8,9,10"));
> +       check_equals(tmp.to_string(), std::string("8,9,10"));
>
>         root->get_member(st.find("test_completed"), &tmp);
>         check_equals(tmp.to_number(), 1);
>
>
> _______________________________________________
> Gnash-commit mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnash-commit
>




reply via email to

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