aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2013-09-22Actually let's move away those monsters from the evaluate functionMihai Bazon
ev() should do a single thing — evaluate constant expressions. if that's not possible, just return the original node. it's not the best place for partial evaluation there, instead doing it in the compress functions.
2013-09-22More dirty handling of [ ... ].join() in unsafe modeMihai Bazon
Close #300
2013-09-22Evaluate [...].join() if possible: minor bugfixDan Wolff
Follow-up to 78e98d2.
2013-09-19When `unsafe` is set, evaluate [...].join() if possibleMihai Bazon
Close #298
2013-09-19Concatenate strings also on the right-hand side of an expression that cannot ↵Dan Wolff
be evaluated. Fix #126 E.g. converts: a+'Hello'+'World' to a+'HelloWorld'
2013-09-06Avoid printing <!-- in the output (HTML5 comment)Mihai Bazon
2013-09-06Support HTML5 comment syntax (enabled by default!)Mihai Bazon
See http://javascript.spec.whatwg.org/#comment-syntax https://github.com/mishoo/UglifyJS/issues/503 https://github.com/marijnh/acorn/issues/62
2013-09-06minorMihai Bazon
2013-09-02Fix names.Mihai Bazon
2013-09-02Disallow `continue` referring to a non-IterationStatement. Fix #287Mihai Bazon
Simplifies handling of labels (their definition/references can be easily figured out at parse time, no need to do it in `figure_out_scope`).
2013-09-02Better fix for #286Mihai Bazon
2013-09-02Fix parsing `a.case /= 1`Mihai Bazon
Close #286
2013-09-02Fix parsing regexp after unary-prefix operatorMihai Bazon
++/x/.y Fix #284
2013-08-20Move support for `negate_iife` in the compressor, rather than code generatorMihai Bazon
(the code generator doesn't maintain enough context to know whether the return value is important or discarded) Fixes #272
2013-08-18fixes #259: don't unnecessarily quote object properties when --screw-ie8Michael Ficarra
2013-08-07Don't drop unused setter argument.Mihai Bazon
Fix #257
2013-08-04Don't pretend to evaluate lambdasMihai Bazon
Fix #255
2013-07-25Reverting "added option for dropping unused params"Mihai Bazon
Revert "added option for dropping unused params" (turns out we already had the `unused` option for this.) This reverts commit e54df2226f7f3887d2f850cea8caf5c0353dce00.
2013-07-25added option for dropping unused paramsDusan Bartos
2013-07-22Make `DefaultsError` a real `Error` objectForbes Lindesay
2013-07-18Fix output for arrays whose last element is a hole: [1,,]David Glasser
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,,].
2013-07-15Revert previous patch, it was no good.Mihai Bazon
2013-07-15Add "position" option to parser, to specify initial pos/line/colMihai Bazon
(for parsing embedded scripts)
2013-07-14Apply transformer to AST_VarDef's nameMihai Bazon
Fix #237
2013-07-12Fix typo.Mihai Bazon
Close #239
2013-06-07Don't swap binary ops when "use asm" is in effect.Mihai Bazon
Refs #167
2013-06-03Escape null characters as \x00Ville Lautanala
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.
2013-05-22Add `negate_iife` option to the code generator.Mihai Bazon
See discussion in a9511dfbe5c0d96d8cacb87582aa9a19737bbb98
2013-05-22Set "global" on undeclared SymbolDef-sMihai Bazon
2013-05-20Fix output of statement: `new function(){...};`Mihai Bazon
Close #209
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.Mihai Bazon
Only for `--unsafe`. Close #203
2013-05-14Fix a["1_1"]Mihai Bazon
Close #204
2013-05-09Use the negation hack rather than parens for a toplevel function expression callMihai Bazon
(only in !beautify mode)
2013-05-09Fix is_assignableMihai Bazon
(not likely to be noticed, it's only used in `strict` parse mode)
2013-05-08Fix property namesMihai Bazon
Close #199
2013-05-08Better fix for equality of typeof ... against "undefined"Mihai Bazon
2013-05-08Fixed typeof undefined optimization and updated related test case toJustin Lau
accomodates the sort behaviour changes made in commit mishoo/UglifyJS2@aebafad41eab48f43ed649ce8c77e8f1528b50da. Signed-off-by: Justin Lau <justin@tclau.com>
2013-05-07Fixed dot properties not optimizing unicode identifiers. Signed-off-by: ↵Justin Lau
Justin Lau <justin@tclau.com>
2013-05-05Fixed dot property issue with invlid identifier names.Justin Lau
Signed-off-by: Justin Lau <justin@tclau.com>
2013-04-29Workaround for missing `prefix` in UnaryExpression generated by EsprimaMihai Bazon
See #193
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 identifiersMihai Bazon
Fix #173
2013-03-31Output, to_ascii: Escape non-ascii chars with \xnn instead of \unnnn ↵Andreas Lind Petersen
whenever possible.
2013-03-25renamed --screw-ie to --screw-ie8, documented it in README.md, indicated it ↵Michał Gołębiowski
doesn't break IE9+
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.Mihai Bazon
Fix #159