gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/avm2 r9634: Replace String() with new Stri


From: Tom Stellard
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9634: Replace String() with new String("")
Date: Sun, 19 Oct 2008 19:26:22 +0800
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9634
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Sun 2008-10-19 19:26:22 +0800
message:
  Replace String() with new String("")
modified:
  testsuite/actionscript.all/haxe-swf9/as_to_hx.pl
=== modified file 'testsuite/actionscript.all/haxe-swf9/as_to_hx.pl'
--- a/testsuite/actionscript.all/haxe-swf9/as_to_hx.pl  2008-10-19 11:16:07 
+0000
+++ b/testsuite/actionscript.all/haxe-swf9/as_to_hx.pl  2008-10-19 11:26:22 
+0000
@@ -137,24 +137,8 @@
        #TODO: Handle typeof and typeOf differently?
        $_ =~ s/type[Oo]f\(\s*(\S+)\s*\)/Type.typeof($1)/g;
 
-       #Skip String()
-       if($_ =~ /\WString\(\)/){
-               skip_line();
-               next;
-       }
-       if(index($_,"String") != $[-1){
-#              $_ =~ s/new +String/Std\.string/g;
-#              $_ =~ s/String/Std\.string/g;
-               #Don't ignore new String()
-               #Fix this.
-               if($_ =~ /new String\(.+\)/){
-                       
-               }
-               else{
-#                      print "//".$_;
-#                      next;
-               }
-       }
+       #Replace String() with new String("")
+       $_ =~ s/(\W)String\(\)/$1new String("")/g;
        
        #Replace Class.prototype with Reflect.field(Class,'prototype')
        $_ =~ s/(\w+)\.(prototype|__proto__)/Reflect.field($1,'$2')/g;


reply via email to

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