terser 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/terser.js CHANGED
@@ -81,7 +81,7 @@ function defaults(args, defs, croak) {
81
81
  for (const i in defs) if (HOP(defs, i)) {
82
82
  if (!args || !HOP(args, i)) {
83
83
  ret[i] = defs[i];
84
- } else if (i === "ecma") {
84
+ } else if (i === "ecma" || i === "builtins_ecma") {
85
85
  let ecma = args[i] | 0;
86
86
  if (ecma > 5 && ecma < 2015) ecma += 2009;
87
87
  ret[i] = ecma;
@@ -277,6 +277,130 @@ function clear_annotation(node, annotation) {
277
277
  node._annotations &= ~annotation;
278
278
  }
279
279
 
280
+ // surrogate safe regexps adapted from https://github.com/mathiasbynens/unicode-8.0.0/tree/89b412d8a71ecca9ed593d9e9fa073ab64acfebe/Binary_Property
281
+ /** Used for checking if a string is an identifier during output.
282
+ * We don't use \p{ID_Start} and \p{ID_Continue} because that's a moving target
283
+ * and Terser's output should run on old browsers.
284
+ */
285
+ var UNICODE_NARROW = {
286
+ ID_Start: /[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2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u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\u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\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
287
+ ID_Continue: /(?:[$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0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A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76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03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-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uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])+/,
288
+ };
289
+
290
+ /** For detecting and bounding identifiers in source text. Broader than
291
+ * UNICODE_NARROW depending on the JS runtime's unicode version */
292
+ var UNICODE_BROAD = UNICODE_NARROW;
293
+ try {
294
+ UNICODE_BROAD = {
295
+ // https://262.ecma-international.org/13.0/#prod-IdentifierStartChar
296
+ // $, _, ID_Start
297
+ ID_Start: new RegExp("[_$\\p{ID_Start}]", "u"),
298
+ // https://262.ecma-international.org/13.0/#prod-IdentifierPartChar
299
+ // $, zero-width-joiner, zero-width-non-joiner, ID_Continue
300
+ ID_Continue: new RegExp("[$\\u200C\\u200D\\p{ID_Continue}]+", "u"),
301
+ };
302
+ } catch(e) {
303
+ // Could not use modern JS \p{...}.
304
+ }
305
+
306
+ const BASIC_IDENT = /^[a-z_$][a-z0-9_$]*$/i;
307
+
308
+ function is_basic_identifier_string(str) {
309
+ return BASIC_IDENT.test(str);
310
+ }
311
+
312
+ function get_full_char(str, pos) {
313
+ if (is_surrogate_pair_head(str.charCodeAt(pos))) {
314
+ if (is_surrogate_pair_tail(str.charCodeAt(pos + 1))) {
315
+ return str.charAt(pos) + str.charAt(pos + 1);
316
+ }
317
+ } else if (is_surrogate_pair_tail(str.charCodeAt(pos))) {
318
+ if (is_surrogate_pair_head(str.charCodeAt(pos - 1))) {
319
+ return str.charAt(pos - 1) + str.charAt(pos);
320
+ }
321
+ }
322
+ return str.charAt(pos);
323
+ }
324
+
325
+ function get_full_char_code(str, pos) {
326
+ // https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates
327
+ const char_code = str.charCodeAt(pos);
328
+ if (is_surrogate_pair_head(char_code)) {
329
+ return 0x10000 + (char_code - 0xd800 << 10) + str.charCodeAt(pos + 1) - 0xdc00;
330
+ }
331
+ return char_code;
332
+ }
333
+
334
+ function get_full_char_length(str) {
335
+ var surrogates = 0;
336
+
337
+ for (var i = 0; i < str.length; i++) {
338
+ if (is_surrogate_pair_head(str.charCodeAt(i)) && is_surrogate_pair_tail(str.charCodeAt(i + 1))) {
339
+ surrogates++;
340
+ i++;
341
+ }
342
+ }
343
+
344
+ return str.length - surrogates;
345
+ }
346
+
347
+ function from_char_code(code) {
348
+ // Based on https://github.com/mathiasbynens/String.fromCodePoint/blob/master/fromcodepoint.js
349
+ if (code > 0xFFFF) {
350
+ code -= 0x10000;
351
+ return (String.fromCharCode((code >> 10) + 0xD800) +
352
+ String.fromCharCode((code % 0x400) + 0xDC00));
353
+ }
354
+ return String.fromCharCode(code);
355
+ }
356
+
357
+ function is_surrogate_pair_head(code) {
358
+ return code >= 0xd800 && code <= 0xdbff;
359
+ }
360
+
361
+ function is_surrogate_pair_tail(code) {
362
+ return code >= 0xdc00 && code <= 0xdfff;
363
+ }
364
+
365
+ function is_identifier_start(ch) {
366
+ return UNICODE_NARROW.ID_Start.test(ch);
367
+ }
368
+
369
+ function is_identifier_char(ch) {
370
+ return UNICODE_NARROW.ID_Continue.test(ch);
371
+ }
372
+
373
+ /** supports a "wider" range of identifiers -- as unicode evolves, new characters are accepted */
374
+ function is_identifier_start_broad(ch) {
375
+ return UNICODE_BROAD.ID_Start.test(ch);
376
+ }
377
+
378
+ /** supports a "wider" range of identifiers -- as unicode evolves, new characters are accepted */
379
+ function is_identifier_char_broad(ch) {
380
+ return UNICODE_BROAD.ID_Continue.test(ch);
381
+ }
382
+
383
+ function is_identifier_string(str, allow_surrogates) {
384
+ if (BASIC_IDENT.test(str)) {
385
+ return true;
386
+ }
387
+ if (!allow_surrogates && /[\ud800-\udfff]/.test(str)) {
388
+ return false;
389
+ }
390
+ var match = UNICODE_NARROW.ID_Start.exec(str);
391
+ if (!match || match.index !== 0) {
392
+ return false;
393
+ }
394
+
395
+ str = str.slice(match[0].length);
396
+ if (!str) {
397
+ return true;
398
+ }
399
+
400
+ match = UNICODE_NARROW.ID_Continue.exec(str);
401
+ return !!match && match[0].length === str.length;
402
+ }
403
+
280
404
  /***********************************************************************
281
405
 
282
406
  A JavaScript tokenizer / parser / beautifier / compressor.
@@ -412,103 +536,10 @@ var PUNC_CHARS = makePredicate(characters("[]{}(),;:"));
412
536
 
413
537
  /* -----[ Tokenizer ]----- */
414
538
 
415
- // surrogate safe regexps adapted from https://github.com/mathiasbynens/unicode-8.0.0/tree/89b412d8a71ecca9ed593d9e9fa073ab64acfebe/Binary_Property
416
- var UNICODE = {
417
- ID_Start: /[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
418
- ID_Continue: /(?:[$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F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\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\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CE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])+/,
419
- };
420
-
421
- function get_full_char(str, pos) {
422
- if (is_surrogate_pair_head(str.charCodeAt(pos))) {
423
- if (is_surrogate_pair_tail(str.charCodeAt(pos + 1))) {
424
- return str.charAt(pos) + str.charAt(pos + 1);
425
- }
426
- } else if (is_surrogate_pair_tail(str.charCodeAt(pos))) {
427
- if (is_surrogate_pair_head(str.charCodeAt(pos - 1))) {
428
- return str.charAt(pos - 1) + str.charAt(pos);
429
- }
430
- }
431
- return str.charAt(pos);
432
- }
433
-
434
- function get_full_char_code(str, pos) {
435
- // https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates
436
- if (is_surrogate_pair_head(str.charCodeAt(pos))) {
437
- return 0x10000 + (str.charCodeAt(pos) - 0xd800 << 10) + str.charCodeAt(pos + 1) - 0xdc00;
438
- }
439
- return str.charCodeAt(pos);
440
- }
441
-
442
- function get_full_char_length(str) {
443
- var surrogates = 0;
444
-
445
- for (var i = 0; i < str.length; i++) {
446
- if (is_surrogate_pair_head(str.charCodeAt(i)) && is_surrogate_pair_tail(str.charCodeAt(i + 1))) {
447
- surrogates++;
448
- i++;
449
- }
450
- }
451
-
452
- return str.length - surrogates;
453
- }
454
-
455
- function from_char_code(code) {
456
- // Based on https://github.com/mathiasbynens/String.fromCodePoint/blob/master/fromcodepoint.js
457
- if (code > 0xFFFF) {
458
- code -= 0x10000;
459
- return (String.fromCharCode((code >> 10) + 0xD800) +
460
- String.fromCharCode((code % 0x400) + 0xDC00));
461
- }
462
- return String.fromCharCode(code);
463
- }
464
-
465
- function is_surrogate_pair_head(code) {
466
- return code >= 0xd800 && code <= 0xdbff;
467
- }
468
-
469
- function is_surrogate_pair_tail(code) {
470
- return code >= 0xdc00 && code <= 0xdfff;
471
- }
472
-
473
539
  function is_digit(code) {
474
540
  return code >= 48 && code <= 57;
475
541
  }
476
542
 
477
- function is_identifier_start(ch) {
478
- return UNICODE.ID_Start.test(ch);
479
- }
480
-
481
- function is_identifier_char(ch) {
482
- return UNICODE.ID_Continue.test(ch);
483
- }
484
-
485
- const BASIC_IDENT = /^[a-z_$][a-z0-9_$]*$/i;
486
-
487
- function is_basic_identifier_string(str) {
488
- return BASIC_IDENT.test(str);
489
- }
490
-
491
- function is_identifier_string(str, allow_surrogates) {
492
- if (BASIC_IDENT.test(str)) {
493
- return true;
494
- }
495
- if (!allow_surrogates && /[\ud800-\udfff]/.test(str)) {
496
- return false;
497
- }
498
- var match = UNICODE.ID_Start.exec(str);
499
- if (!match || match.index !== 0) {
500
- return false;
501
- }
502
-
503
- str = str.slice(match[0].length);
504
- if (!str) {
505
- return true;
506
- }
507
-
508
- match = UNICODE.ID_Continue.exec(str);
509
- return !!match && match[0].length === str.length;
510
- }
511
-
512
543
  function parse_js_number(num, allow_e = true) {
513
544
  if (!allow_e && num.includes("e")) {
514
545
  return NaN;
@@ -707,11 +738,11 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
707
738
  function ch_starts_binding_identifier(ch, pos) {
708
739
  if (ch == "\\") {
709
740
  return true;
710
- } else if (is_identifier_start(ch)) {
741
+ } else if (is_identifier_start_broad(ch)) {
711
742
  RE_KEYWORD_RELATIONAL_OPERATORS.lastIndex = pos;
712
743
  if (RE_KEYWORD_RELATIONAL_OPERATORS.test(S.text)) {
713
744
  var after = get_full_char(S.text, RE_KEYWORD_RELATIONAL_OPERATORS.lastIndex);
714
- if (!is_identifier_char(after) && after != "\\") {
745
+ if (!is_identifier_char_broad(after) && after != "\\") {
715
746
  // "in" or "instanceof" are keywords, not binding identifiers
716
747
  return false;
717
748
  }
@@ -964,7 +995,7 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
964
995
  );
965
996
 
966
997
  // 0x7F is very rare in actual code, so we compare it to "~" (0x7E)
967
- if (end > start + 1 && ch && ch !== "\\" && !is_identifier_char(ch) && ch <= "~") {
998
+ if (end > start + 1 && ch && ch !== "\\" && !is_identifier_char_broad(ch) && ch <= "~") {
968
999
  S.pos += end - start;
969
1000
  S.col += end - start;
970
1001
  return S.text.slice(start, S.pos);
@@ -987,10 +1018,10 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
987
1018
  // Read first character (ID_Start)
988
1019
  if ((ch = peek()) === "\\") {
989
1020
  ch = read_escaped_identifier_char();
990
- if (!is_identifier_start(ch)) {
1021
+ if (!is_identifier_start_broad(ch)) {
991
1022
  parse_error("First identifier char is an invalid identifier char");
992
1023
  }
993
- } else if (is_identifier_start(ch)) {
1024
+ } else if (is_identifier_start_broad(ch)) {
994
1025
  next();
995
1026
  } else {
996
1027
  return "";
@@ -1002,11 +1033,11 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
1002
1033
  while ((ch = peek()) != null) {
1003
1034
  if ((ch = peek()) === "\\") {
1004
1035
  ch = read_escaped_identifier_char();
1005
- if (!is_identifier_char(ch)) {
1036
+ if (!is_identifier_char_broad(ch)) {
1006
1037
  parse_error("Invalid escaped identifier char");
1007
1038
  }
1008
1039
  } else {
1009
- if (!is_identifier_char(ch)) {
1040
+ if (!is_identifier_char_broad(ch)) {
1010
1041
  break;
1011
1042
  }
1012
1043
  next();
@@ -1182,7 +1213,7 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
1182
1213
  if (is_digit(code)) return read_num();
1183
1214
  if (PUNC_CHARS.has(ch)) return token("punc", next());
1184
1215
  if (OPERATOR_CHARS.has(ch)) return read_operator();
1185
- if (code == 92 || is_identifier_start(ch)) return read_word();
1216
+ if (code == 92 || is_identifier_start_broad(ch)) return read_word();
1186
1217
  if (code == 35) return read_private_word();
1187
1218
  break;
1188
1219
  }
@@ -2578,7 +2609,7 @@ function parse($TEXT, options) {
2578
2609
  return new_(allow_calls);
2579
2610
  }
2580
2611
  if (is("name", "import") && is_token(peek(), "punc", ".")) {
2581
- return import_meta(allow_calls);
2612
+ return parse_import_expr(allow_calls);
2582
2613
  }
2583
2614
  var start = S.token;
2584
2615
  var peeked;
@@ -3018,6 +3049,17 @@ function parse($TEXT, options) {
3018
3049
  function import_statement() {
3019
3050
  var start = prev();
3020
3051
 
3052
+ // import source x from "..."
3053
+ // import defer * as x from "..."
3054
+ var phase = null;
3055
+ if (is("name", "source") || is("name", "defer")) {
3056
+ var peeked = peek();
3057
+ if (!is_token(peeked, "name", "from") && !is_token(peeked, "punc", ",")) {
3058
+ phase = S.token.value;
3059
+ next();
3060
+ }
3061
+ }
3062
+
3021
3063
  var imported_name;
3022
3064
  var imported_names;
3023
3065
  if (is("name")) {
@@ -3052,14 +3094,33 @@ function parse($TEXT, options) {
3052
3094
  end: mod_str,
3053
3095
  }),
3054
3096
  attributes,
3097
+ phase,
3055
3098
  end: S.token,
3056
3099
  });
3057
3100
  }
3058
3101
 
3059
- function import_meta(allow_calls) {
3102
+ // import.meta
3103
+ // import.source("module")
3104
+ // import.defer("module")
3105
+ function parse_import_expr(allow_calls) {
3060
3106
  var start = S.token;
3061
3107
  expect_token("name", "import");
3062
3108
  expect_token("punc", ".");
3109
+ if (is("name", "source") || is("name", "defer")) {
3110
+ var phase = S.token.value;
3111
+ next();
3112
+ if (!is("punc", "(")) {
3113
+ croak("'import." + phase + "' can only be used in a dynamic import");
3114
+ }
3115
+ next();
3116
+ var args = expr_list(")");
3117
+ return subscripts(new AST_DynamicImport({
3118
+ start: start,
3119
+ phase: phase,
3120
+ args: args,
3121
+ end: prev()
3122
+ }), allow_calls);
3123
+ }
3063
3124
  expect_token("name", "meta");
3064
3125
  return subscripts(new AST_ImportMeta({
3065
3126
  start: start,
@@ -5292,9 +5353,10 @@ var AST_NameMapping = DEFNODE("NameMapping", "foreign_name name", function AST_N
5292
5353
 
5293
5354
  var AST_Import = DEFNODE(
5294
5355
  "Import",
5295
- "imported_name imported_names module_name attributes",
5356
+ "phase imported_name imported_names module_name attributes",
5296
5357
  function AST_Import(props) {
5297
5358
  if (props) {
5359
+ this.phase = props.phase;
5298
5360
  this.imported_name = props.imported_name;
5299
5361
  this.imported_names = props.imported_names;
5300
5362
  this.module_name = props.module_name;
@@ -5308,6 +5370,7 @@ var AST_Import = DEFNODE(
5308
5370
  {
5309
5371
  $documentation: "An `import` statement",
5310
5372
  $propdoc: {
5373
+ phase: "[string?] Phase keyword: 'source', 'defer', or null.",
5311
5374
  imported_name: "[AST_SymbolImport] The name of the variable holding the module's default export.",
5312
5375
  imported_names: "[AST_NameMapping*] The names of non-default imported variables",
5313
5376
  module_name: "[AST_String] String literal describing where this module came from",
@@ -5348,6 +5411,40 @@ var AST_ImportMeta = DEFNODE("ImportMeta", null, function AST_ImportMeta(props)
5348
5411
  $documentation: "A reference to import.meta",
5349
5412
  });
5350
5413
 
5414
+ var AST_DynamicImport = DEFNODE(
5415
+ "DynamicImport",
5416
+ "phase args",
5417
+ function AST_DynamicImport(props) {
5418
+ if (props) {
5419
+ this.phase = props.phase;
5420
+ this.args = props.args;
5421
+ this.start = props.start;
5422
+ this.end = props.end;
5423
+ }
5424
+
5425
+ this.flags = 0;
5426
+ },
5427
+ {
5428
+ $documentation: "A phased dynamic import expression: `import.source(specifier [, options])` or `import.defer(specifier [, options])`. Plain `import(x)` continues to be parsed as an AST_Call with a synthetic `import` SymbolRef callee.",
5429
+ $propdoc: {
5430
+ phase: "[string] Phase keyword ('source' or 'defer').",
5431
+ args: "[AST_Node*] specifier followed by optional options argument"
5432
+ },
5433
+ _walk: function(visitor) {
5434
+ return visitor._visit(this, function() {
5435
+ var args = this.args;
5436
+ for (var i = 0, len = args.length; i < len; i++) {
5437
+ args[i]._walk(visitor);
5438
+ }
5439
+ });
5440
+ },
5441
+ _children_backwards(push) {
5442
+ let i = this.args.length;
5443
+ while (i--) push(this.args[i]);
5444
+ },
5445
+ }
5446
+ );
5447
+
5351
5448
  var AST_Export = DEFNODE(
5352
5449
  "Export",
5353
5450
  "exported_definition exported_value is_default exported_names module_name attributes",
@@ -7811,7 +7908,8 @@ def_transform(AST_PrefixedTemplateString, function(self, tw) {
7811
7908
  imported_name: imported_name,
7812
7909
  imported_names : imported_names,
7813
7910
  module_name : from_moz(M.source),
7814
- attributes: import_attributes_from_moz(M.attributes || M.assertions)
7911
+ attributes: import_attributes_from_moz(M.attributes || M.assertions),
7912
+ phase: M.phase || null
7815
7913
  });
7816
7914
  },
7817
7915
 
@@ -7842,6 +7940,14 @@ def_transform(AST_PrefixedTemplateString, function(self, tw) {
7842
7940
  if (M.options) {
7843
7941
  args.push(from_moz(M.options));
7844
7942
  }
7943
+ if (M.phase) {
7944
+ return new AST_DynamicImport({
7945
+ start: my_start_token(M),
7946
+ end: my_end_token(M),
7947
+ phase: M.phase,
7948
+ args: args
7949
+ });
7950
+ }
7845
7951
  return new AST_Call({
7846
7952
  start: my_start_token(M),
7847
7953
  end: my_end_token(M),
@@ -8441,6 +8547,16 @@ def_transform(AST_PrefixedTemplateString, function(self, tw) {
8441
8547
  };
8442
8548
  });
8443
8549
 
8550
+ def_to_moz(AST_DynamicImport, function To_Moz_ImportExpression(M) {
8551
+ const [source, options] = M.args.map(to_moz);
8552
+ return {
8553
+ type: "ImportExpression",
8554
+ source,
8555
+ options: options || null,
8556
+ phase: M.phase
8557
+ };
8558
+ });
8559
+
8444
8560
  def_to_moz(AST_Toplevel, function To_Moz_Program(M) {
8445
8561
  return to_moz_scope("Program", M);
8446
8562
  });
@@ -8705,12 +8821,14 @@ def_transform(AST_PrefixedTemplateString, function(self, tw) {
8705
8821
  });
8706
8822
  }
8707
8823
  }
8708
- return {
8824
+ var moz = {
8709
8825
  type: "ImportDeclaration",
8710
8826
  specifiers: specifiers,
8711
8827
  source: to_moz(M.module_name),
8712
8828
  attributes: import_attributes_to_moz(M.attributes)
8713
8829
  };
8830
+ if (M.phase) moz.phase = M.phase;
8831
+ return moz;
8714
8832
  });
8715
8833
 
8716
8834
  def_to_moz(AST_ImportMeta, function To_Moz_MetaProperty() {
@@ -9600,6 +9718,56 @@ function OutputStream(options) {
9600
9718
  });
9601
9719
  };
9602
9720
 
9721
+ /** Matches an identifier with non-ascii characters */
9722
+ var re_high_identifier = (() => {
9723
+ try {
9724
+ return new RegExp("^(?![\\u0000-\\u00ff]+$)([\\p{ID_Start}][\\p{ID_Continue}]*)$", "u");
9725
+ } catch (_) {
9726
+ return undefined; /* \p in regex above is unsupported */
9727
+ }
9728
+ })();
9729
+
9730
+ var ident_to_utf8 = (options.ascii_only || !re_high_identifier) ? to_utf8 : function (str) {
9731
+ if (re_high_identifier.test(str)) {
9732
+ str = str.replace(/[\ud800-\udbff][\udc00-\udfff]|([\ud800-\udbff]|[\udc00-\udfff])/g, function(match, lone) {
9733
+ if (lone) {
9734
+ return "\\u" + lone.charCodeAt(0).toString(16).padStart(4, "0");
9735
+ }
9736
+ return match;
9737
+ });
9738
+
9739
+ // Escape identifier characters from higher unicode versions
9740
+ var char = get_full_char(str, 0);
9741
+ var escaped = char;
9742
+ if (
9743
+ is_identifier_start_broad(char)
9744
+ && !is_identifier_start(char)
9745
+ ) {
9746
+ const code_point = char.codePointAt(0);
9747
+ escaped = code_point <= 0xffff
9748
+ ? `\\u${code_point.toString(16).padStart(4, "0")}`
9749
+ : `\\u{${code_point.toString(16)}}`;
9750
+ }
9751
+ for (var i = char.length; i < str.length; i += char.length) {
9752
+ char = get_full_char(str, i);
9753
+ if (
9754
+ is_identifier_char_broad(char)
9755
+ && !is_identifier_char(char)
9756
+ ) {
9757
+ const code_point = char.codePointAt(0);
9758
+ escaped += code_point <= 0xffff
9759
+ ? `\\u${code_point.toString(16).padStart(4, "0")}`
9760
+ : `\\u{${code_point.toString(16)}}`;
9761
+ } else {
9762
+ escaped += char;
9763
+ }
9764
+ }
9765
+ return escaped;
9766
+ } else {
9767
+ return str;
9768
+ }
9769
+ };
9770
+
9603
9771
  function make_string(str, quote) {
9604
9772
  var dq = 0, sq = 0;
9605
9773
  str = str.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g,
@@ -9657,7 +9825,7 @@ function OutputStream(options) {
9657
9825
 
9658
9826
  function make_name(name) {
9659
9827
  name = name.toString();
9660
- name = to_utf8(name, true);
9828
+ name = ident_to_utf8(name, true);
9661
9829
  return name;
9662
9830
  }
9663
9831
 
@@ -9774,8 +9942,8 @@ function OutputStream(options) {
9774
9942
  }
9775
9943
 
9776
9944
  if (might_need_space) {
9777
- if ((is_identifier_char(prev)
9778
- && (is_identifier_char(ch) || ch == "\\"))
9945
+ if ((is_identifier_char_broad(prev)
9946
+ && (is_identifier_char_broad(ch) || ch == "\\"))
9779
9947
  || (ch == "/" && ch == prev)
9780
9948
  || ((ch == "+" || ch == "-") && ch == last)
9781
9949
  ) {
@@ -11003,6 +11171,10 @@ function OutputStream(options) {
11003
11171
  DEFPRINT(AST_Import, function(self, output) {
11004
11172
  output.print("import");
11005
11173
  output.space();
11174
+ if (self.phase) {
11175
+ output.print(self.phase);
11176
+ output.space();
11177
+ }
11006
11178
  if (self.imported_name) {
11007
11179
  self.imported_name.print(output);
11008
11180
  }
@@ -11043,6 +11215,15 @@ function OutputStream(options) {
11043
11215
  DEFPRINT(AST_ImportMeta, function(self, output) {
11044
11216
  output.print("import.meta");
11045
11217
  });
11218
+ DEFPRINT(AST_DynamicImport, function(self, output) {
11219
+ output.print("import." + self.phase);
11220
+ output.with_parens(function() {
11221
+ self.args.forEach(function(arg, i) {
11222
+ if (i) output.comma();
11223
+ arg.print(output);
11224
+ });
11225
+ });
11226
+ });
11046
11227
 
11047
11228
  DEFPRINT(AST_NameMapping, function(self, output) {
11048
11229
  var is_import = output.parent() instanceof AST_Import;
@@ -11895,11 +12076,18 @@ AST_VarDefLike.prototype.shallow_cmp = function(other) {
11895
12076
  AST_NameMapping.prototype.shallow_cmp = pass_through;
11896
12077
 
11897
12078
  AST_Import.prototype.shallow_cmp = function(other) {
11898
- return (this.imported_name == null ? other.imported_name == null : this.imported_name === other.imported_name) && (this.imported_names == null ? other.imported_names == null : this.imported_names === other.imported_names) && (this.attributes == null ? other.attributes == null : this.attributes === other.attributes);
12079
+ return (this.imported_name || null) === (other.imported_name || null)
12080
+ && (this.imported_names || null) === (other.imported_names || null)
12081
+ && (this.attributes || null) === (other.attributes || null)
12082
+ && (this.phase || null) === (other.phase || null);
11899
12083
  };
11900
12084
 
11901
12085
  AST_ImportMeta.prototype.shallow_cmp = pass_through;
11902
12086
 
12087
+ AST_DynamicImport.prototype.shallow_cmp = function(other) {
12088
+ return (this.phase || null) === (other.phase || null) && this.args.length === other.args.length;
12089
+ };
12090
+
11903
12091
  AST_Export.prototype.shallow_cmp = function(other) {
11904
12092
  return (this.exported_definition == null ? other.exported_definition == null : this.exported_definition === other.exported_definition) && (this.exported_value == null ? other.exported_value == null : this.exported_value === other.exported_value) && (this.exported_names == null ? other.exported_names == null : this.exported_names === other.exported_names) && (this.attributes == null ? other.attributes == null : this.attributes === other.attributes) && this.module_name === other.module_name && this.is_default === other.is_default;
11905
12093
  };
@@ -11913,7 +12101,10 @@ AST_PropAccess.prototype.shallow_cmp = pass_through;
11913
12101
  AST_Chain.prototype.shallow_cmp = pass_through;
11914
12102
 
11915
12103
  AST_Dot.prototype.shallow_cmp = function(other) {
11916
- return this.property === other.property;
12104
+ return (
12105
+ this.property === other.property
12106
+ && !!this.quote === !!other.quote
12107
+ );
11917
12108
  };
11918
12109
 
11919
12110
  AST_DotHash.prototype.shallow_cmp = function(other) {
@@ -12792,6 +12983,7 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options) {
12792
12983
  if (
12793
12984
  function_defs
12794
12985
  && node instanceof AST_VarDef
12986
+ && node.name instanceof AST_Symbol
12795
12987
  && node.value instanceof AST_Lambda
12796
12988
  && !node.value.name
12797
12989
  && keep_name(options.keep_fnames, node.name.name)
@@ -13184,6 +13376,11 @@ AST_Import.prototype._size = function () {
13184
13376
 
13185
13377
  AST_ImportMeta.prototype._size = () => 11;
13186
13378
 
13379
+ AST_DynamicImport.prototype._size = function () {
13380
+ // `import.` + phase + `()` + arg overhead
13381
+ return 9 + this.phase.length + list_overhead(this.args);
13382
+ };
13383
+
13187
13384
  AST_Export.prototype._size = function () {
13188
13385
  let size = 7 + (this.is_default ? 8 : 0);
13189
13386
 
@@ -13848,10 +14045,14 @@ function retain_top_func(fn, compressor) {
13848
14045
  // Note: Lots of methods and functions are missing here, in case they aren't pure
13849
14046
  // or not available in all JS environments.
13850
14047
 
13851
- function make_nested_lookup(obj) {
14048
+ const make_nested_lookup = (feature_callback) => (compressor) => {
14049
+ const obj = feature_callback(feature_variables(compressor));
14050
+
13852
14051
  const out = new Map();
13853
14052
  for (var key of Object.keys(obj)) {
13854
- out.set(key, makePredicate(obj[key]));
14053
+ if (obj[key]) {
14054
+ out.set(key, makePredicate(remove_false(obj[key])));
14055
+ }
13855
14056
  }
13856
14057
 
13857
14058
  const does_have = (global_name, fname) => {
@@ -13859,8 +14060,74 @@ function make_nested_lookup(obj) {
13859
14060
  return inner_map != null && inner_map.has(fname);
13860
14061
  };
13861
14062
  return does_have;
14063
+ };
14064
+
14065
+ const make_lookup = (feature_callback) => (compressor) => {
14066
+ const obj = feature_callback(feature_variables(compressor));
14067
+
14068
+ const predicate = makePredicate(remove_false(obj));
14069
+ const does_have = (global_name) => {
14070
+ return predicate.has(global_name);
14071
+ };
14072
+ return does_have;
14073
+ };
14074
+
14075
+ function remove_false(arr) {
14076
+ for (let i = 0; i < arr.length; i++) {
14077
+ if (arr[i] === false) {
14078
+ arr.splice(i, 1);
14079
+ i--;
14080
+ }
14081
+ }
14082
+ return arr;
14083
+ }
14084
+
14085
+ /** Generate the object with arguments seen below */
14086
+ function feature_variables(compressor) {
14087
+ return {
14088
+ sloppy: compressor.option("unsafe"),
14089
+ es: compressor.option("builtins_ecma"),
14090
+ };
13862
14091
  }
13863
14092
 
14093
+ // eslint-disable-next-line no-unused-vars
14094
+ const pure_access_globals = make_lookup(({ sloppy, es }) => [
14095
+ "Array",
14096
+ "Boolean",
14097
+ "clearInterval",
14098
+ "clearTimeout",
14099
+ "console",
14100
+ "Date",
14101
+ "decodeURI",
14102
+ "decodeURIComponent",
14103
+ "encodeURI",
14104
+ "encodeURIComponent",
14105
+ "Error",
14106
+ "escape",
14107
+ "eval",
14108
+ "EvalError",
14109
+ "Function",
14110
+ es >= 2020 && "globalThis",
14111
+ "isFinite",
14112
+ "isNaN",
14113
+ "JSON",
14114
+ "Math",
14115
+ "Number",
14116
+ "parseFloat",
14117
+ "parseInt",
14118
+ "RangeError",
14119
+ "ReferenceError",
14120
+ "RegExp",
14121
+ "Object",
14122
+ "setInterval",
14123
+ "setTimeout",
14124
+ "String",
14125
+ "SyntaxError",
14126
+ "TypeError",
14127
+ "unescape",
14128
+ "URIError",
14129
+ ]);
14130
+
13864
14131
  // Objects which are safe to access without throwing or causing a side effect.
13865
14132
  // Usually we'd check the `unsafe` option first but these are way too common for that
13866
14133
  const pure_prop_access_globals = new Set([
@@ -13872,17 +14139,90 @@ const pure_prop_access_globals = new Set([
13872
14139
  "Promise",
13873
14140
  ]);
13874
14141
 
14142
+ // eslint-disable-next-line no-unused-vars
14143
+ const is_pure_native_fn = make_lookup(({ sloppy, es }) => [
14144
+ sloppy && es >= 2021 && "AggregateError",
14145
+ "Array",
14146
+ "ArrayBuffer",
14147
+ es >= 2020 && "BigInt",
14148
+ es >= 2020 && "BigInt64Array",
14149
+ es >= 2020 && "BigUint64Array",
14150
+ "Boolean",
14151
+ "Date",
14152
+ sloppy && "decodeURI",
14153
+ sloppy && "decodeURIComponent",
14154
+ sloppy && "encodeURI",
14155
+ sloppy && "encodeURIComponent",
14156
+ "Error",
14157
+ "escape",
14158
+ "EvalError",
14159
+ es >= 2021 && "FinalizationRegistry",
14160
+ es >= 2026 && "Float16Array",
14161
+ "Float32Array",
14162
+ "Float64Array",
14163
+ "Int16Array",
14164
+ "Int32Array",
14165
+ "Int8Array",
14166
+ "isFinite",
14167
+ "isNaN",
14168
+ es >= 2026 && "Iterator",
14169
+ es >= 2015 && "Map",
14170
+ "Number",
14171
+ "parseFloat",
14172
+ "parseInt",
14173
+ es >= 2015 && "Promise",
14174
+ es >= 2015 && "Proxy",
14175
+ "RangeError",
14176
+ "ReferenceError",
14177
+ sloppy && "RegExp",
14178
+ es >= 2015 && "Set",
14179
+ "String",
14180
+ es >= 2015 && "Symbol",
14181
+ "SyntaxError",
14182
+ "TypeError",
14183
+ "Uint16Array",
14184
+ "Uint32Array",
14185
+ "Uint8Array",
14186
+ "Uint8ClampedArray",
14187
+ sloppy && "unescape",
14188
+ "URIError",
14189
+ sloppy && es >= 2015 && "WeakMap",
14190
+ sloppy && es >= 2021 && "WeakRef",
14191
+ sloppy && es >= 2015 && "WeakSet",
14192
+ ]);
14193
+
14194
+ const arg1_is_iterable = new Set([
14195
+ "Map",
14196
+ "Set",
14197
+ "WeakMap",
14198
+ "WeakSet",
14199
+ ]);
14200
+ const arg1_is_range_or_iterable = new Set([
14201
+ "ArrayBuffer",
14202
+ "Float32Array",
14203
+ "Float64Array",
14204
+ "Int16Array",
14205
+ "Int32Array",
14206
+ "Int8Array",
14207
+ "Uint16Array",
14208
+ "Uint32Array",
14209
+ "Uint8Array",
14210
+ "Uint8ClampedArray",
14211
+ ]);
14212
+ const lone_arg_is_range = new Set(["Array"]);
14213
+
13875
14214
  const object_methods = [
13876
14215
  "constructor",
13877
14216
  "toString",
13878
14217
  "valueOf",
13879
14218
  ];
13880
14219
 
13881
- const is_pure_native_method = make_nested_lookup({
14220
+ // eslint-disable-next-line no-unused-vars
14221
+ const is_pure_native_method = make_nested_lookup(({ sloppy, es }) => ({
13882
14222
  Array: [
13883
- "at",
13884
- "flat",
13885
- "includes",
14223
+ es >= 2022 && "at",
14224
+ es >= 2019 && "flat",
14225
+ es >= 2016 && "includes",
13886
14226
  "indexOf",
13887
14227
  "join",
13888
14228
  "lastIndexOf",
@@ -13903,90 +14243,160 @@ const is_pure_native_method = make_nested_lookup({
13903
14243
  ...object_methods,
13904
14244
  ],
13905
14245
  String: [
13906
- "at",
14246
+ es >= 2022 && "at",
13907
14247
  "charAt",
13908
14248
  "charCodeAt",
13909
- "charPointAt",
14249
+ es >= 2015 && "codePointAt",
13910
14250
  "concat",
13911
- "endsWith",
13912
- "fromCharCode",
13913
- "fromCodePoint",
13914
- "includes",
14251
+ es >= 2025 && "endsWith",
14252
+ es >= 2015 && "includes",
13915
14253
  "indexOf",
13916
14254
  "italics",
13917
14255
  "lastIndexOf",
13918
- "localeCompare",
14256
+ es >= 2020 && "localeCompare",
13919
14257
  "match",
13920
- "matchAll",
13921
- "normalize",
13922
- "padStart",
13923
- "padEnd",
13924
- "repeat",
14258
+ es >= 2020 && "matchAll",
14259
+ es >= 2015 && "normalize",
14260
+ es >= 2017 && "padStart",
14261
+ es >= 2017 && "padEnd",
14262
+ es >= 2015 && sloppy && "repeat",
13925
14263
  "replace",
13926
- "replaceAll",
14264
+ es >= 2021 && "replaceAll",
13927
14265
  "search",
13928
14266
  "slice",
13929
14267
  "split",
13930
- "startsWith",
14268
+ es >= 2015 && "startsWith",
13931
14269
  "substr",
13932
14270
  "substring",
13933
- "repeat",
14271
+ es >= 2015 && "repeat",
13934
14272
  "toLocaleLowerCase",
13935
14273
  "toLocaleUpperCase",
13936
14274
  "toLowerCase",
13937
14275
  "toUpperCase",
13938
14276
  "trim",
13939
- "trimEnd",
13940
- "trimStart",
14277
+ es >= 2019 && "trimEnd",
14278
+ es >= 2019 && "trimStart",
14279
+ es >= 2019 && "trimLeft",
14280
+ es >= 2019 && "trimRight",
13941
14281
  ...object_methods,
13942
14282
  ],
13943
- });
14283
+ }));
13944
14284
 
13945
- const is_pure_native_fn = make_nested_lookup({
14285
+ // eslint-disable-next-line no-unused-vars
14286
+ const is_pure_native_static_fn = make_nested_lookup(({ sloppy, es }) => ({
13946
14287
  Array: [
13947
14288
  "isArray",
14289
+ es >= 2015 && "of",
14290
+ ],
14291
+ ArrayBuffer: [
14292
+ "isView",
14293
+ ],
14294
+ BigInt: es >= 2020 && [
14295
+ sloppy && "asIntN",
14296
+ sloppy && "asUintN",
14297
+ ],
14298
+ BigInt64Array: sloppy && es >= 2020 && ["of"],
14299
+ BigUint64Array: sloppy && es >= 2020 && ["of"],
14300
+ Date: [
14301
+ "now",
14302
+ "parse",
14303
+ "UTC",
14304
+ ],
14305
+ Error: [
14306
+ es >= 2026 && "isError",
13948
14307
  ],
14308
+ Float16Array: sloppy && es >= 2026 && ["of"],
14309
+ Float32Array: sloppy && ["of"],
14310
+ Float64Array: sloppy && ["of"],
14311
+ Int16Array: sloppy && ["of"],
14312
+ Int32Array: sloppy && ["of"],
14313
+ Int8Array: sloppy && ["of"],
13949
14314
  Math: [
13950
14315
  "abs",
13951
14316
  "acos",
14317
+ es >= 2015 && "acosh",
13952
14318
  "asin",
14319
+ es >= 2015 && "asinh",
13953
14320
  "atan",
14321
+ "atan2",
14322
+ es >= 2015 && "atanh",
14323
+ es >= 2015 && "cbrt",
13954
14324
  "ceil",
14325
+ es >= 2015 && "clz32",
13955
14326
  "cos",
14327
+ es >= 2015 && "cosh",
13956
14328
  "exp",
14329
+ es >= 2015 && "expm1",
13957
14330
  "floor",
14331
+ es >= 2026 && "f16round",
14332
+ es >= 2015 && "fround",
14333
+ es >= 2015 && "hypot",
14334
+ es >= 2015 && "imul",
13958
14335
  "log",
14336
+ es >= 2015 && "log10",
14337
+ es >= 2015 && "log1p",
14338
+ es >= 2015 && "log2",
14339
+ "max",
14340
+ "min",
14341
+ "pow",
13959
14342
  "round",
14343
+ es >= 2015 && "sign",
13960
14344
  "sin",
14345
+ es >= 2015 && "sinh",
13961
14346
  "sqrt",
13962
14347
  "tan",
13963
- "atan2",
13964
- "pow",
13965
- "max",
13966
- "min",
14348
+ es >= 2015 && "tanh",
14349
+ es >= 2015 && "trunc",
13967
14350
  ],
13968
14351
  Number: [
13969
- "isFinite",
13970
- "isNaN",
14352
+ es >= 2015 && "isFinite",
14353
+ es >= 2015 && "isInteger",
14354
+ es >= 2015 && "isSafeInteger",
14355
+ es >= 2015 && "isNaN",
14356
+ es >= 2015 && "parseFloat",
14357
+ es >= 2015 && "parseInt",
13971
14358
  ],
13972
14359
  Object: [
13973
- "create",
13974
- "getOwnPropertyDescriptor",
13975
- "getOwnPropertyNames",
13976
- "getPrototypeOf",
14360
+ sloppy && "create",
14361
+ sloppy && "getOwnPropertyDescriptor",
14362
+ es >= 2017 && sloppy && "getOwnPropertyDescriptors",
14363
+ sloppy && "getOwnPropertyNames",
14364
+ es >= 2015 && sloppy && "getOwnPropertySymbols",
14365
+ sloppy && "getPrototypeOf",
14366
+ es >= 2022 && sloppy && "hasOwn",
14367
+ es >= 2015 && "is",
13977
14368
  "isExtensible",
13978
14369
  "isFrozen",
13979
14370
  "isSealed",
13980
- "hasOwn",
13981
- "keys",
14371
+ es >= 2015 && sloppy && "keys",
14372
+ ],
14373
+ Promise: es >= 2015 && [
14374
+ es >= 2024 && "withResolvers",
14375
+ ],
14376
+ Proxy: es >= 2015 && [
14377
+ sloppy && "revocable",
14378
+ ],
14379
+ Reflect: es >= 2015 && [
14380
+ sloppy && "has",
14381
+ sloppy && "isExtensible",
14382
+ sloppy && "ownKeys",
14383
+ ],
14384
+ RegExp: [
14385
+ es >= 2026 && sloppy && "escape",
13982
14386
  ],
13983
14387
  String: [
13984
14388
  "fromCharCode",
14389
+ sloppy && es >= 2025 && "fromCodePoint",
13985
14390
  ],
13986
- });
14391
+ Uint16Array: ["of"],
14392
+ Uint32Array: ["of"],
14393
+ Uint8Array: ["of"],
14394
+ Uint8ClampedArray: ["of"],
14395
+ }));
13987
14396
 
13988
14397
  // Known numeric values which come with JS environments
13989
- const is_pure_native_value = make_nested_lookup({
14398
+ // eslint-disable-next-line no-unused-vars
14399
+ const is_pure_native_static_property = make_nested_lookup(({ sloppy, es }) => ({
13990
14400
  Math: [
13991
14401
  "E",
13992
14402
  "LN10",
@@ -13998,13 +14408,130 @@ const is_pure_native_value = make_nested_lookup({
13998
14408
  "SQRT2",
13999
14409
  ],
14000
14410
  Number: [
14411
+ es >= 2015 && "EPSILON",
14412
+ es >= 2015 && "MAX_SAFE_VALUE",
14001
14413
  "MAX_VALUE",
14414
+ es >= 2015 && "MIN_SAFE_VALUE",
14002
14415
  "MIN_VALUE",
14003
14416
  "NaN",
14004
14417
  "NEGATIVE_INFINITY",
14005
14418
  "POSITIVE_INFINITY",
14006
14419
  ],
14007
- });
14420
+ RegExp: [
14421
+ "$_",
14422
+ "$0",
14423
+ "$1",
14424
+ "$2",
14425
+ "$3",
14426
+ "$4",
14427
+ "$5",
14428
+ "$6",
14429
+ "$7",
14430
+ "$8",
14431
+ "$9",
14432
+ "input",
14433
+ "lastMatch",
14434
+ "lastParen",
14435
+ "leftContext",
14436
+ "rightContext",
14437
+ ],
14438
+ }));
14439
+
14440
+ const re_uppercase_first_letter = /^[A-Z]/;
14441
+ function is_pure_builtin_call(compressor, call) {
14442
+ let builtin = "";
14443
+ let method = "";
14444
+
14445
+ let exp = call.expression;
14446
+ if (is_undeclared_ref(exp)) {
14447
+ builtin = exp.name;
14448
+ } else if (exp instanceof AST_Dot) {
14449
+ method = exp.property;
14450
+
14451
+ exp = exp.expression;
14452
+ if (is_undeclared_ref(exp)) {
14453
+ if (
14454
+ // globalThis.pureFunc()
14455
+ exp.name === "globalThis"
14456
+ && compressor.option("builtins_ecma") >= 2020
14457
+ ) {
14458
+ builtin = method;
14459
+ method = "";
14460
+ } else {
14461
+ // SomeBuiltin.pureFunc()
14462
+ builtin = exp.name;
14463
+ }
14464
+ } else if (exp instanceof AST_Dot) {
14465
+ if (
14466
+ is_undeclared_ref(exp.expression)
14467
+ && exp.expression.name === "globalThis"
14468
+ && compressor.option("builtins_ecma") >= 2020
14469
+ ) {
14470
+ // globalThis.SomeBuiltin.pureFunc()
14471
+ builtin = exp.property;
14472
+ } else {
14473
+ return false;
14474
+ }
14475
+ } else {
14476
+ return false;
14477
+ }
14478
+ } else {
14479
+ return false;
14480
+ }
14481
+
14482
+ if (!method) {
14483
+ if (compressor.is_pure_native_fn(builtin)) {
14484
+ // some require `new`, others throw if you use it
14485
+ const is_new = call instanceof AST_New;
14486
+ const should_be_new = re_uppercase_first_letter.test(builtin); // true of all `is_pure_native_fn`
14487
+ if (is_new !== should_be_new) return false;
14488
+
14489
+ if (!is_builtin_pure_with_these_args(builtin, call.args)) {
14490
+ return false;
14491
+ }
14492
+
14493
+ return true;
14494
+ }
14495
+
14496
+ return false;
14497
+ } else {
14498
+ return compressor.is_pure_native_static_fn(builtin, method);
14499
+ }
14500
+ }
14501
+
14502
+ /** Some builtins are listed above but their purity is subject to some conditions */
14503
+ function is_builtin_pure_with_these_args(builtin, args) {
14504
+ // all the builtins we deal with here are ok with getting 0 args
14505
+ if (args.length === 0) return true;
14506
+
14507
+ let arg1 = args[0];
14508
+ if (arg1 instanceof AST_SymbolRef) {
14509
+ arg1 = arg1.fixed_value();
14510
+ }
14511
+
14512
+ if (lone_arg_is_range.has(builtin)) { // new Array(number)
14513
+ const arg_valid = args.length > 1
14514
+ || arg1 instanceof AST_Number
14515
+ && arg1.value >= 0 && arg1.value <= 0xffffffff;
14516
+ // TODO: or, we are asked to ignore TypeError
14517
+ if (!arg_valid) return false;
14518
+ }
14519
+
14520
+ if (arg1_is_range_or_iterable.has(builtin)) { // new Float32Array(number | Array)
14521
+ const arg_valid = args.length === 0
14522
+ || arg1 instanceof AST_Array
14523
+ || arg1 instanceof AST_Number
14524
+ && arg1.value >= 0 && arg1.value <= 0xffffffff;
14525
+ if (!arg_valid) return false;
14526
+ }
14527
+
14528
+ if (arg1_is_iterable.has(builtin)) { // new Set(iterable)
14529
+ const arg_valid = args.length === 0 || arg1 instanceof AST_Array;
14530
+ if (!arg_valid) return false;
14531
+ }
14532
+
14533
+ return true;
14534
+ }
14008
14535
 
14009
14536
  /***********************************************************************
14010
14537
 
@@ -14322,6 +14849,10 @@ function is_nullish(node, compressor) {
14322
14849
  || this.alternative && this.alternative.has_side_effects(compressor);
14323
14850
  });
14324
14851
  def_has_side_effects(AST_ImportMeta, return_false);
14852
+ def_has_side_effects(AST_DynamicImport, function() {
14853
+ // `import.source(x)` only compiles the module, which is side-effect free
14854
+ return this.phase !== "source";
14855
+ });
14325
14856
  def_has_side_effects(AST_LabeledStatement, function(compressor) {
14326
14857
  return this.body.has_side_effects(compressor);
14327
14858
  });
@@ -14888,13 +15419,9 @@ AST_Call.DEFMETHOD("is_callee_pure", function(compressor) {
14888
15419
  return false;
14889
15420
  }
14890
15421
  if (is_undeclared_ref(expr) && global_pure_fns.has(expr.name)) return true;
14891
- if (
14892
- expr instanceof AST_Dot
14893
- && is_undeclared_ref(expr.expression)
14894
- && is_pure_native_fn(expr.expression.name, expr.property)
14895
- ) {
14896
- return true;
14897
- }
15422
+ if (is_pure_builtin_call(compressor, this)) return true;
15423
+ } else if (compressor.option("builtins_pure")) {
15424
+ if (is_pure_builtin_call(compressor, this)) return true;
14898
15425
  }
14899
15426
  if ((this instanceof AST_New) && compressor.option("pure_new")) {
14900
15427
  return true;
@@ -14925,7 +15452,7 @@ AST_Dot.DEFMETHOD("is_call_pure", function(compressor) {
14925
15452
  } else if (!this.may_throw_on_access(compressor)) {
14926
15453
  native_obj = "Object";
14927
15454
  }
14928
- return native_obj != null && is_pure_native_method(native_obj, this.property);
15455
+ return native_obj != null && compressor.is_pure_native_method(native_obj, this.property);
14929
15456
  });
14930
15457
 
14931
15458
  // tell me if a statement aborts
@@ -15306,12 +15833,15 @@ def_eval(AST_Binary, function (compressor, depth) {
15306
15833
  return this;
15307
15834
  }
15308
15835
 
15309
- // Do not mix BigInt and Number; Don't use `>>>` on BigInt or `/ 0n`
15836
+ // Do not mix BigInt and Number
15837
+ // Don't use `>>>` on BigInt or `/ 0n` (error)
15838
+ // Don't use `**` on BigInt (slow)
15310
15839
  if (
15311
15840
  (typeof left === "bigint") !== (typeof right === "bigint")
15312
15841
  || typeof left === "bigint"
15313
- && (this.operator === ">>>"
15314
- || this.operator === "/" && Number(right) === 0)
15842
+ && (this.operator === "/" && Number(right) === 0
15843
+ || this.operator === ">>>"
15844
+ || this.operator === "**")
15315
15845
  ) {
15316
15846
  return this;
15317
15847
  }
@@ -15454,7 +15984,7 @@ def_eval(AST_PropAccess, function (compressor, depth, ast_chain) {
15454
15984
  if (first_arg == null || first_arg.thedef && first_arg.thedef.undeclared) {
15455
15985
  return this.clone();
15456
15986
  }
15457
- if (!is_pure_native_value(exp.name, key))
15987
+ if (!compressor.is_pure_native_static_property(exp.name, key))
15458
15988
  return this;
15459
15989
  obj = global_objs[exp.name];
15460
15990
  } else {
@@ -15510,14 +16040,14 @@ def_eval(AST_Call, function (compressor, depth, ast_chain) {
15510
16040
  if ((first_arg == null || first_arg.thedef && first_arg.thedef.undeclared)) {
15511
16041
  return this.clone();
15512
16042
  }
15513
- if (!is_pure_native_fn(e.name, key)) return this;
16043
+ if (!compressor.is_pure_native_static_fn(e.name, key)) return this;
15514
16044
  val = global_objs[e.name];
15515
16045
  } else {
15516
16046
  val = e._eval(compressor, depth + 1, /* don't pass ast_chain (exponential work) */);
15517
16047
 
15518
16048
  if (val === e || !val)
15519
16049
  return this;
15520
- if (!is_pure_native_method(val.constructor.name, key))
16050
+ if (!compressor.is_pure_native_method(val.constructor.name, key))
15521
16051
  return this;
15522
16052
  }
15523
16053
  var args = [];
@@ -15649,6 +16179,12 @@ def_drop_side_effect_free(AST_Call, function (compressor, first_in_statement) {
15649
16179
  return args && make_sequence(this, args);
15650
16180
  });
15651
16181
 
16182
+ def_drop_side_effect_free(AST_DynamicImport, function (compressor, first_in_statement) {
16183
+ if (this.phase !== "source") return this;
16184
+ var args = trim(this.args, compressor, first_in_statement);
16185
+ return args && make_sequence(this, args);
16186
+ });
16187
+
15652
16188
  def_drop_side_effect_free(AST_Accessor, return_null);
15653
16189
 
15654
16190
  def_drop_side_effect_free(AST_Function, return_null);
@@ -15809,8 +16345,8 @@ def_drop_side_effect_free([
15809
16345
  AST_ConciseMethod,
15810
16346
  AST_ObjectGetter,
15811
16347
  AST_ObjectSetter,
15812
- ], function () {
15813
- return this.computed_key() ? this.key : null;
16348
+ ], function (compressor, first_in_statement) {
16349
+ return this.computed_key() ? this.key.drop_side_effect_free(compressor, first_in_statement) : null;
15814
16350
  });
15815
16351
 
15816
16352
  def_drop_side_effect_free([
@@ -16032,6 +16568,7 @@ AST_Scope.DEFMETHOD("drop_unused", function(compressor) {
16032
16568
  return scan_ref_scoped(node, descend);
16033
16569
  });
16034
16570
  self.walk(tw);
16571
+
16035
16572
  // pass 2: for every used symbol we need to walk its
16036
16573
  // initialization code to figure out if it uses other
16037
16574
  // symbols (that may not be in_use).
@@ -16042,6 +16579,7 @@ AST_Scope.DEFMETHOD("drop_unused", function(compressor) {
16042
16579
  init.walk(tw);
16043
16580
  });
16044
16581
  });
16582
+
16045
16583
  // pass 3: we should drop declarations not in_use
16046
16584
  var tt = new TreeTransformer(
16047
16585
  function before(node, descend, in_list) {
@@ -19301,6 +19839,8 @@ class Compressor extends TreeWalker {
19301
19839
  drop_console : false,
19302
19840
  drop_debugger : !false_by_default,
19303
19841
  ecma : 5,
19842
+ builtins_ecma : 5,
19843
+ builtins_pure : false,
19304
19844
  evaluate : !false_by_default,
19305
19845
  expression : false,
19306
19846
  global_defs : false,
@@ -19396,6 +19936,12 @@ class Compressor extends TreeWalker {
19396
19936
  this._mangle_options = mangle_options
19397
19937
  ? format_mangler_options(mangle_options)
19398
19938
  : mangle_options;
19939
+
19940
+ this.pure_access_globals = pure_access_globals(this);
19941
+ this.is_pure_native_fn = is_pure_native_fn(this);
19942
+ this.is_pure_native_method = is_pure_native_method(this);
19943
+ this.is_pure_native_static_fn = is_pure_native_static_fn(this);
19944
+ this.is_pure_native_static_property = is_pure_native_static_property(this);
19399
19945
  }
19400
19946
 
19401
19947
  mangle_options() {
@@ -19730,10 +20276,9 @@ function find_variable(compressor, name) {
19730
20276
  return scope.find_variable(name);
19731
20277
  }
19732
20278
 
19733
- var global_names = makePredicate("Array Boolean clearInterval clearTimeout console Date decodeURI decodeURIComponent encodeURI encodeURIComponent Error escape eval EvalError Function isFinite isNaN JSON Math Number parseFloat parseInt RangeError ReferenceError RegExp Object setInterval setTimeout String SyntaxError TypeError unescape URIError");
19734
20279
  AST_SymbolRef.DEFMETHOD("is_declared", function(compressor) {
19735
20280
  return !this.definition().undeclared
19736
- || compressor.option("unsafe") && global_names.has(this.name);
20281
+ || (compressor.option("unsafe") || compressor.option("builtins_pure")) && compressor.pure_access_globals(this.name);
19737
20282
  });
19738
20283
 
19739
20284
  /* -----[ optimizers ]----- */
@@ -27029,6 +27574,7 @@ var domprops = [
27029
27574
  "boundingWidth",
27030
27575
  "bounds",
27031
27576
  "boundsGeometry",
27577
+ "box",
27032
27578
  "box-decoration-break",
27033
27579
  "box-shadow",
27034
27580
  "box-sizing",
@@ -27074,6 +27620,7 @@ var domprops = [
27074
27620
  "c",
27075
27621
  "cache",
27076
27622
  "caches",
27623
+ "calendar",
27077
27624
  "call",
27078
27625
  "caller",
27079
27626
  "camera",
@@ -27128,6 +27675,7 @@ var domprops = [
27128
27675
  "cast",
27129
27676
  "catch",
27130
27677
  "category",
27678
+ "cause",
27131
27679
  "cbrt",
27132
27680
  "cd",
27133
27681
  "ceil",
@@ -27672,7 +28220,11 @@ var domprops = [
27672
28220
  "databases",
27673
28221
  "datagrams",
27674
28222
  "dataset",
28223
+ "dateStyle",
27675
28224
  "dateTime",
28225
+ "day",
28226
+ "dayPeriod",
28227
+ "days",
27676
28228
  "db",
27677
28229
  "debug",
27678
28230
  "debuggerEnabled",
@@ -28025,6 +28577,7 @@ var domprops = [
28025
28577
  "enumerateEditable",
28026
28578
  "environmentBlendMode",
28027
28579
  "equals",
28580
+ "era",
28028
28581
  "error",
28029
28582
  "errorCode",
28030
28583
  "errorDetail",
@@ -28270,6 +28823,7 @@ var domprops = [
28270
28823
  "forwardZ",
28271
28824
  "foundation",
28272
28825
  "fr",
28826
+ "fractionalSecondDigits",
28273
28827
  "fragment",
28274
28828
  "fragmentDirective",
28275
28829
  "frame",
@@ -28800,6 +29354,10 @@ var domprops = [
28800
29354
  "host",
28801
29355
  "hostCandidate",
28802
29356
  "hostname",
29357
+ "hour",
29358
+ "hour12",
29359
+ "hourCycle",
29360
+ "hours",
28803
29361
  "href",
28804
29362
  "hrefTranslate",
28805
29363
  "hreflang",
@@ -29487,7 +30045,9 @@ var domprops = [
29487
30045
  "method",
29488
30046
  "methodDetails",
29489
30047
  "methodName",
30048
+ "microseconds",
29490
30049
  "mid",
30050
+ "milliseconds",
29491
30051
  "mimeType",
29492
30052
  "mimeTypes",
29493
30053
  "min",
@@ -29507,6 +30067,8 @@ var domprops = [
29507
30067
  "minValue",
29508
30068
  "minWidth",
29509
30069
  "minimumLatency",
30070
+ "minute",
30071
+ "minutes",
29510
30072
  "mipLevel",
29511
30073
  "mipLevelCount",
29512
30074
  "mipmapFilter",
@@ -29519,6 +30081,8 @@ var domprops = [
29519
30081
  "model",
29520
30082
  "modify",
29521
30083
  "module",
30084
+ "month",
30085
+ "months",
29522
30086
  "mount",
29523
30087
  "move",
29524
30088
  "moveBefore",
@@ -29785,6 +30349,7 @@ var domprops = [
29785
30349
  "names",
29786
30350
  "namespaceURI",
29787
30351
  "namespaces",
30352
+ "nanoseconds",
29788
30353
  "nativeApplication",
29789
30354
  "nativeMap",
29790
30355
  "nativeObjectCreate",
@@ -29855,6 +30420,8 @@ var domprops = [
29855
30420
  "numberOfItems",
29856
30421
  "numberOfOutputs",
29857
30422
  "numberValue",
30423
+ "numberingSystem",
30424
+ "numeric",
29858
30425
  "oMatchesSelector",
29859
30426
  "object",
29860
30427
  "object-fit",
@@ -31202,6 +31769,8 @@ var domprops = [
31202
31769
  "searchBox",
31203
31770
  "searchBoxJavaBridge_",
31204
31771
  "searchParams",
31772
+ "second",
31773
+ "seconds",
31205
31774
  "sectionRowIndex",
31206
31775
  "secureConnectionStart",
31207
31776
  "securePaymentConfirmationAvailability",
@@ -31850,6 +32419,9 @@ var domprops = [
31850
32419
  "timeOrigin",
31851
32420
  "timeRemaining",
31852
32421
  "timeStamp",
32422
+ "timeStyle",
32423
+ "timeZone",
32424
+ "timeZoneName",
31853
32425
  "timecode",
31854
32426
  "timeline",
31855
32427
  "timelineTime",
@@ -32439,6 +33011,8 @@ var domprops = [
32439
33011
  "webkitdirectory",
32440
33012
  "webkitdropzone",
32441
33013
  "webstore",
33014
+ "weekday",
33015
+ "weeks",
32442
33016
  "weight",
32443
33017
  "wgslLanguageFeatures",
32444
33018
  "whatToShow",
@@ -32515,6 +33089,8 @@ var domprops = [
32515
33089
  "y2",
32516
33090
  "yChannelSelector",
32517
33091
  "yandex",
33092
+ "year",
33093
+ "years",
32518
33094
  "yield",
32519
33095
  "z",
32520
33096
  "z-index",