Created
January 11, 2015 21:19
-
-
Save laszlopandy/602cd66d4b8e402dc1fc to your computer and use it in GitHub Desktop.
Closure compiler dead-code-elimination test.
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
this['Elm'] = (function() { | |
var Elm_Debug_make = function() { | |
function watchSummary() { | |
return "Banana1"; | |
} | |
function crash() { | |
throw new Error("crash"); | |
} | |
return { watchSummary: watchSummary, crash: crash }; | |
}; | |
var Elm = {}; | |
Elm.Main = {}; | |
Elm.Main.make = function() { | |
var Debug = Elm_Debug_make(); | |
Debug.crash(); | |
} | |
return Elm; | |
})(); |
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
/* Output of Closure compiler advanced mode (beautified so it's easier to read): | |
java -jar compiler.jar --js minimal_test.js --js_output_file minimal_test.min.js -O ADVANCED | |
*/ | |
this.Elm = function() { | |
function b() { | |
return { | |
d: function() { | |
return "Banana1" | |
}, | |
b: function() { | |
throw Error("crash"); | |
} | |
} | |
} | |
var a = { | |
a: {} | |
}; | |
a.a.c = function() { | |
b().b() | |
}; | |
return a | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment