mishoo/UglifyJS2 — pull request #301 by Skalman (2013-09-23 00:33:25+00:00)
Title: [...].join() - handle null and better compress [...].join("str")

* `null`, `undefined`, and holes in arrays are interpreted as an empty
string by `Array.prototype.join`. This commit fixes various issues when
compressing them, or values that can be `null` or `undefined`.
* Compress `[foo+"str","123"+bar].join("-")` -> `foo+"str-123"+bar`

The only issue that I can see now is that `[ "foo", bar + "baz" ].join("-")` produces `"foo-"+(bar+"baz")`. I might fix that too.

Btw, thanks for moving these out of `evaluate()`. I find it difficult to know where to add code sometimes.