gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/avm2 r9591: Replace 'new Object' with '{}'


From: Tom Stellard
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9591: Replace 'new Object' with '{}'
Date: Wed, 08 Oct 2008 13:14:54 +0800
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9591
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Wed 2008-10-08 13:14:54 +0800
message:
  Replace 'new Object' with '{}'
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-05 13:07:54 
+0000
+++ b/testsuite/actionscript.all/haxe-swf9/as_to_hx.pl  2008-10-08 05:14:54 
+0000
@@ -62,8 +62,8 @@
                #Replace things like: new String; with new String();
                $_ =~ s/(new \w+)(;)/$1\(\)$2/g;
                $_ =~ s/(new \w+)(\))/$1\(\)$2/g;
-               #Replace things like o = new Object; with o = "";
-               $_ =~ s/new Object\(\)/""/g;
+               #Replace things like o = new Object(); with o = {};
+               $_ =~ s/\s*(\w+)\s*=\s*new Object\(\)/$1={}/g;
                #Add extra arguments when Date() is called with less than 6 
args.
                if($_ =~ /new Date\(.+\)/){
                        my $num_args = length(split(/,/,$_));
@@ -178,13 +178,7 @@
                skip_line();
                next;
        }
-       #Remove lines that contain things like this:
-       # o = {}
-       #I am not sure what this means.
-       if($_ =~ /=.+\{\}/){
-               skip_line();
-               next; 
-       }
+
        #Remove return calls(TEMP).
        if(index($_,"return") != $[-1){
                skip_line();


reply via email to

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