aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Expand)Author
2013-09-02Fix names.Mihai Bazon
2013-09-02Disallow `continue` referring to a non-IterationStatement. Fix #287...Simplifies handling of labels (their definition/references can be easily figured out at parse time, no need to do it in `figure_out_scope`). Mihai Bazon
2013-09-02Better fix for #286Mihai Bazon
2013-09-02Fix parsing `a.case /= 1`...Close #286 Mihai Bazon
2013-09-02Fix parsing regexp after unary-prefix operator...++/x/.y Fix #284 Mihai Bazon
2013-08-20Move support for `negate_iife` in the compressor, rather than code generator...(the code generator doesn't maintain enough context to know whether the return value is important or discarded) Fixes #272 Mihai Bazon
2013-08-18fixes #259: don't unnecessarily quote object properties when --screw-ie8Michael Ficarra
2013-08-07Don't drop unused setter argument....Fix #257 Mihai Bazon
2013-08-04Don't pretend to evaluate lambdas...Fix #255 Mihai Bazon
2013-07-25Reverting "added option for dropping unused params"...Revert "added option for dropping unused params" (turns out we already had the `unused` option for this.) This reverts commit e54df2226f7f3887d2f850cea8caf5c0353dce00. Mihai Bazon
2013-07-25added option for dropping unused paramsDusan Bartos
2013-07-18Fix output for arrays whose last element is a hole: [1,,]...1529ab96 started to do this (by considering holes to be separate from "undefined") but it still converted [1,,] (length 2, last element hole, trailing comma) to [1,] (length 1, trailing comma) Unfortunately the test suite doesn't really make this clear: the new test here passes with or without this patch because run-tests.js beautifys the expected output (in "make_code"), which does the incorrect transformation! If you make some manual change to arrays.js to make the test fail and see the INPUT and OUTPUT, then you can see that without this fix, [1,,] -> [1,], and with this fix it stays [1,,]. David Glasser
2013-07-15Revert previous patch, it was no good.Mihai Bazon
2013-07-15Add "position" option to parser, to specify initial pos/line/col...(for parsing embedded scripts) Mihai Bazon
2013-07-14Apply transformer to AST_VarDef's name...Fix #237 Mihai Bazon
2013-07-12Fix typo....Close #239 Mihai Bazon
2013-06-07Don't swap binary ops when "use asm" is in effect....Refs #167 Mihai Bazon
2013-06-03Escape null characters as \x00...Since \0 might be mistakenly interpreted as octal if followed by a number and using literal null is in some cases interpreted as end of string, escape null as \x00.Ville Lautanala
2013-05-22Add `negate_iife` option to the code generator....See discussion in a9511dfbe5c0d96d8cacb87582aa9a19737bbb98 Mihai Bazon
2013-05-22Set "global" on undeclared SymbolDef-sMihai Bazon
2013-05-20Fix output of statement: `new function(){...};`...Close #209 Mihai Bazon
2013-05-15Add `--expr`, an option to parse a single expression (suitable for JSON)Mihai Bazon
2013-05-14Only compress code in `new Function` if all arguments are strings.Mihai Bazon
2013-05-14Compress code passed to `new Function` if it's a constant....Only for `--unsafe`. Close #203 Mihai Bazon
2013-05-14Fix a["1_1"]...Close #204 Mihai Bazon
2013-05-09Use the negation hack rather than parens for a toplevel function expression call...(only in !beautify mode) Mihai Bazon
2013-05-09Fix is_assignable...(not likely to be noticed, it's only used in `strict` parse mode) Mihai Bazon
2013-05-08Fix property names...Close #199 Mihai Bazon
2013-05-08Better fix for equality of typeof ... against "undefined"Mihai Bazon
2013-05-08Fixed typeof undefined optimization and updated related test case to...accomodates the sort behaviour changes made in commit mishoo/UglifyJS2@aebafad41eab48f43ed649ce8c77e8f1528b50da. Signed-off-by: Justin Lau <justin@tclau.com> Justin Lau
2013-05-07Fixed dot properties not optimizing unicode identifiers. Signed-off-by: Justi...Justin Lau
2013-05-05Fixed dot property issue with invlid identifier names....Signed-off-by: Justin Lau <justin@tclau.com> Justin Lau
2013-04-29Workaround for missing `prefix` in UnaryExpression generated by Esprima...See #193 Mihai Bazon
2013-04-20fixes #189: use dotted member access when --screw-ie8 option givenMichael Ficarra
2013-04-03Fix typeof evaluation for regex and functionRoman Bataev
2013-03-31Quote objects with numeric keysVladimir Zhuravlev
2013-03-31Don't use \xYY for identifiers...Fix #173 Mihai Bazon
2013-03-31Output, to_ascii: Escape non-ascii chars with \xnn instead of \unnnn whenever...Andreas Lind Petersen
2013-03-25renamed --screw-ie to --screw-ie8, documented it in README.md, indicated it d...Michał Gołębiowski
2013-03-24Add support for enclose option. Closes #139.Jake Harding
2013-03-24Don't print the warning on parse error, just throw a JS_Parse_Error....Fix #159 Mihai Bazon
2013-03-22Keep legit code working even when --screw-ie is not passed....Previously: Without `--screw-ie`, UglifyJS would always leak names of function expressions into the containing scope, as if they were function declarations. That was to emulate IE<9 behavior. Code relying on this IE bug would continue to work properly after mangling, although it would only work in IE (since other engines don't share the bug). Sometimes this broke legitimage code (see #153 and #155). With `--screw-ie` the names would not be leaked into the current scope, working properly in legit cases; but still it broke legit code when running in IE<9 (see #24). Currently: Regardless of the `--screw-ie` setting, the names will not be leaked. Code relying on the IE bug will not work properly after mangling. <evil laughter here> Without `--screw-ie`: a hack has been added to the mangler to avoid using the same name for a function expression and some other variable in the same scope. This keeps legit code working, at the (negligible, indeed) cost of one more identifier. With `--screw-ie` you allow the mangler to name function expressions with the same identifier as another variable in scope. After mangling code might break in IE<9. Oh man, the commit message is longer than the patch. Fix #153, #155 Mihai Bazon
2013-03-13Support mangling toplevel names...Close #127 Mihai Bazon
2013-03-11Disable `unsafe` by default...Close #147 Mihai Bazon
2013-03-04Fix reordering comparisons...Close #143 Mihai Bazon
2013-03-02Add `--screw-ie` option...For now the implication is that UglifyJS will not leak a function expression's name in the surrounding scope (IE < 9 does that). (ref. mishoo/UglifyJS#485) Mihai Bazon
2013-03-01Drop last `default:` if it's the last branch and empty...Close #141 Mihai Bazon
2013-03-01Compress boolean constants after evaluation...Close #137 Mihai Bazon
2013-02-19Fix compressing `do {...} while (false)`...It's not safe to transform it to {...} because the body might contain `break`. The solution could be more elaborate (detect if body contains `break`) but I don't think it's worth the trouble. Close #129 Mihai Bazon
2013-02-06Force space after literal regexp when used in "instanceof" or "in"...Close #118 Mihai Bazon