I am a Google Maps API (javascript) developer. I have noticed that Google uses a Javascript minifier that has the following features:
I believe that YUICompressor does #1, except for the function names, and #2 using a special syntax that is removed during compression.
#3 is just a build task, not a function of the compressor.
YUICompressor