Created
December 26, 2013 00:57
-
-
Save gonchar/8128432 to your computer and use it in GitHub Desktop.
a||=new Object()
a = a || new Object()
if(!a) a = new Object();
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import flash.display.Sprite; | |
public class ConditionTest extends Sprite{ | |
public function ConditionTest() { | |
} | |
private function func1():void { | |
var a:Sprite; | |
a||=new Sprite(); | |
} | |
// private function func1():void | |
// { | |
// @3 getlocal 0 | |
// @4 pushscope | |
// @5 pushnull | |
// @6 coerce Sprite | |
// @7 setlocal 1 | |
// @10 getlocal 1 (a) | |
// @11 coerce Sprite | |
// @12 dup | |
// @13 convert_b | |
// @14 iftrue @19 | |
// @15 pop | |
// @16 findpropstrict Sprite | |
// @17 constructprop Sprite, 0 args | |
// @18 coerce Sprite | |
// @19 coerce Sprite | |
// @20 setlocal 1 (a) | |
// @22 returnvoid | |
// } | |
private function func2():void { | |
var a:Sprite; | |
if(!a) a = new Sprite(); | |
} | |
// private function func2():void | |
// { | |
// @3 getlocal 0 | |
// @4 pushscope | |
// @5 pushnull | |
// @6 coerce Sprite | |
// @7 setlocal 1 | |
// @10 getlocal 1 (a) | |
// @11 not | |
// @12 iffalse @17 | |
// @13 findpropstrict Sprite | |
// @14 constructprop Sprite, 0 args | |
// @15 coerce Sprite | |
// @16 setlocal 1 (a) | |
// @18 returnvoid | |
// } | |
private function func3():void { | |
var a:Sprite; | |
a = a || new Sprite(); | |
} | |
// private function func3():void | |
// { | |
// @3 getlocal 0 | |
// @4 pushscope | |
// @5 pushnull | |
// @6 coerce Sprite | |
// @7 setlocal 1 | |
// @10 getlocal 1 (a) | |
// @11 coerce Sprite | |
// @12 dup | |
// @13 convert_b | |
// @14 iftrue @19 | |
// @15 pop | |
// @16 findpropstrict Sprite | |
// @17 constructprop Sprite, 0 args | |
// @18 coerce Sprite | |
// @19 coerce Sprite | |
// @20 setlocal 1 (a) | |
// @22 returnvoid | |
// } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment