efront 4.20.2 → 4.21.0

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.
Files changed (39) hide show
  1. package/#/345/233/275/351/231/205/345/214/226.yml +3 -0
  2. package/coms/basic/#loader.js +4 -4
  3. package/coms/basic/ArrayFill.js +1 -5
  4. package/coms/basic/extend.js +1 -17
  5. package/coms/basic/isSubpath.js +2 -0
  6. package/coms/basic_/{Array2.js → &Array.js} +2 -1
  7. package/coms/basic_/&ArrayFill.js +5 -0
  8. package/coms/basic_/{aster_.js → &aster.js} +3 -2
  9. package/coms/basic_/&async.js +5 -0
  10. package/coms/basic_/{asyncAster_.js → &asyncAster.js} +3 -2
  11. package/coms/basic_/&async_test.js +15 -0
  12. package/coms/basic_/{exec_.js → &exec.js} +2 -1
  13. package/coms/basic_/&extend.js +18 -0
  14. package/coms/basic_/{extends_.js → &extends.js} +2 -1
  15. package/coms/basic_/readme-en.md +3 -3
  16. package/coms/basic_/readme.md +3 -3
  17. package/coms/compile/Javascript.js +2 -2
  18. package/coms/compile/Program.js +20 -4
  19. package/coms/compile/downLevel.js +20 -20
  20. package/coms/compile/downLevel_test.js +91 -91
  21. package/coms/compile/nametill.js +13 -0
  22. package/coms/compile/polyfill.js +1 -1
  23. package/coms/compile/run-test262.js +8 -8
  24. package/coms/compile/scanner2.js +22 -3
  25. package/coms/compile/unstruct.js +3 -3
  26. package/coms/compile/unstruct_test.js +1 -1
  27. package/coms/reptile/colored_console.js +1 -1
  28. package/coms/zimoli/XMLHttpRequest.js +29 -25
  29. package/package.json +1 -1
  30. package/public/efront.js +1 -1
  31. package/coms/basic_/async_.js +0 -4
  32. package/coms/basic_/async_test.js +0 -11
  33. /package/coms/basic_/{exec_test.js → &exec_test.js} +0 -0
  34. /package/coms/basic_/{nullish_.js → &nullish.js} +0 -0
  35. /package/coms/basic_/{power_.js → &power.js} +0 -0
  36. /package/coms/basic_/{rest_.js → &rest.js} +0 -0
  37. /package/coms/basic_/{restIter_.js → &restIter.js} +0 -0
  38. /package/coms/basic_/{withget_.js → &wget.js} +0 -0
  39. /package/coms/basic_/{with_.js → &with.js} +0 -0
@@ -1,3 +1,6 @@
1
+ - zh-CN: 路径$1未找到入口文件
2
+ en: Path $1 entry file not found
3
+
1
4
  - zh-CN: 数据标识不能有“.”符号
2
5
  en: "Data identification cannot have a '.' symbol"
3
6
 
@@ -247,7 +247,7 @@ var multiModules = Object.create(null);
247
247
  // -->
248
248
  var hasOwnProperty = {}.hasOwnProperty;
249
249
  var loadModule = function (url, then, prebuilds = {}) {
250
- var name = url.replace(/[\#\*~\?][\s\S]*$/, '');
250
+ var name = url.replace(/[\*~][\s\S]*$/, '');
251
251
  if (/^(?:module|exports|define|import_meta|require|window|global|undefined)$/.test(name)) return then();
252
252
  if ((hasOwnProperty.call(prebuilds, url)) || hasOwnProperty.call(modules, url) || (!hasOwnProperty.call(forceRequest, name) && !/^on/.test(name) && window[name] !== null && window[name] !== void 0)
253
253
  ) return then();
@@ -381,7 +381,7 @@ var getArgs = function (text, aftfix) {
381
381
  } else {
382
382
  functionBody = text;
383
383
  }
384
- var [, isAsync, isYield] = /^(@?)(\*?)/.exec(functionBody);
384
+ var [, isAsync, isYield] = /^(~?)(\*?)/.exec(functionBody);
385
385
  if (isAsync || isYield) functionBody = functionBody.slice(+!!isAsync + +!!isYield);
386
386
  return [argNames || [], functionBody, args || [], required || '', strs || [], !!isAsync, !!isYield];
387
387
  };
@@ -443,7 +443,7 @@ var createModule = function (exec, originNames, compiledNames, prebuilds = {}) {
443
443
  var required = exec.required;
444
444
  if (required) required = required.map(a => loadedModules[keyprefix + a]);
445
445
  var argsList = originNames.map(function (aName) {
446
- var argName = aName.replace(/[\#\*~\?][\s\S]*$/, '');
446
+ var argName = aName.replace(/[\*~][\s\S]*$/, '');
447
447
  if (hasOwnProperty.call(prebuilds, argName)) {
448
448
  return prebuilds[argName];
449
449
  }
@@ -523,7 +523,7 @@ var init = function (url, then, prebuilds, keeppage) {
523
523
  if (then) then(modules[url]);
524
524
  return modules[url];
525
525
  }
526
- var name = url.replace(/[\#\*~\?][\s\S]*$/, '');
526
+ var name = url.replace(/[\*~][\s\S]*$/, '');
527
527
  if (!hasOwnProperty.call(forceRequest, name) && name in window && !/^on/.test(name)) {
528
528
  try {
529
529
  var value = window[name];
@@ -1,5 +1 @@
1
- function ArrayFill(size, item) {
2
- var result = Array(size);
3
- for (var cx = 0; cx < size; cx++)result[cx] = item;
4
- return result;
5
- }
1
+ &ArrayFill;
@@ -1,17 +1 @@
1
- /*
2
- * 不枝雀
3
- * 2017-3-18 11:18:18
4
- */
5
-
6
- var hasOwnProperty = {}.hasOwnProperty, Object = {}.constructor;
7
-
8
- var extend = Object.assign || function (o1) {
9
- o1 = Object(o1);
10
- for (var cx = 1, dx = arguments.length; cx < dx; cx++) {
11
- var o2 = arguments[cx];
12
- for (var k in o2) {
13
- if (hasOwnProperty.call(o2, k)) o1[k] = o2[k];
14
- }
15
- }
16
- return o1;
17
- };
1
+ Object.assign;
@@ -1,5 +1,7 @@
1
1
  var normalize = function (url) {
2
2
  var normal = [];
3
+ if (!isHandled(url)) return normal;
4
+ url = String(url);
3
5
  var protocol = /^\w+\:/.exec(url);
4
6
  if (protocol) {
5
7
  url = url.slice(protocol[0].length).replace(/^[\\\/]+/, '');
@@ -63,4 +63,5 @@ function Array2() {
63
63
  var obj = setPrototypeOf(Array.apply(this, arguments), proto);
64
64
  return obj;
65
65
  }
66
- Array2.prototype = Array.prototype;
66
+ Array2.prototype = Array.prototype;
67
+ return Array2;
@@ -0,0 +1,5 @@
1
+ function ArrayFill(size, item) {
2
+ var result = Array(size);
3
+ for (var cx = 0; cx < size; cx++)result[cx] = item;
4
+ return result;
5
+ }
@@ -31,5 +31,6 @@ class Generator {
31
31
  }
32
32
 
33
33
  function aster_() {
34
- return new Generator(exec_.bind(this, arguments));
35
- }
34
+ return new Generator(&exec.bind(this, arguments));
35
+ }
36
+ return aster_;
@@ -0,0 +1,5 @@
1
+
2
+ function async_() {
3
+ return new Promise(&exec.bind(this, arguments));
4
+ }
5
+ return async_;
@@ -50,5 +50,6 @@ class AsyncGenerator {
50
50
  }
51
51
  }
52
52
  function asyncAster_() {
53
- return new AsyncGenerator(exec_.bind(this, arguments));
54
- }
53
+ return new AsyncGenerator(&exec.bind(this, arguments));
54
+ }
55
+ return asyncAster_;
@@ -0,0 +1,15 @@
1
+ var async_ = require("./&async.js");
2
+ var test = async function (queue, expect) {
3
+ var res = await async_.apply(null, queue);
4
+ assert(res, expect);
5
+ }
6
+ test([function () {
7
+ return [1, 0]
8
+ }, function () {
9
+ return [2, 2];
10
+ }], 2);
11
+
12
+ var i = 0;
13
+ test(compile$unstruct(compile$scanner2(`return 1+2`), a => '_' + ++i).map(a => {
14
+ return new Function(compile$common.createString(a))
15
+ }), 3);
@@ -90,4 +90,5 @@ var exec_ = function (args, ok, oh, int) {
90
90
  ticked = true;
91
91
  })
92
92
  next();
93
- };
93
+ };
94
+ return exec_;
@@ -0,0 +1,18 @@
1
+ /*
2
+ * 不枝雀
3
+ * 2017-3-18 11:18:18
4
+ */
5
+
6
+ var hasOwnProperty = {}.hasOwnProperty, Object = {}.constructor;
7
+
8
+ var extend = Object.assign || function (o1) {
9
+ o1 = Object(o1);
10
+ for (var cx = 1, dx = arguments.length; cx < dx; cx++) {
11
+ var o2 = arguments[cx];
12
+ for (var k in o2) {
13
+ if (hasOwnProperty.call(o2, k)) o1[k] = o2[k];
14
+ }
15
+ }
16
+ return o1;
17
+ };
18
+ return extend;
@@ -11,4 +11,5 @@ function extends_(A, B) {
11
11
  __static(A, B);
12
12
  A.prototype = B === null ? Object.create(null) : new (_ = function () { setConstructor(this, A) }, _.prototype = B.prototype, _);
13
13
  var _;
14
- }
14
+ }
15
+ return extends_;
@@ -5,12 +5,12 @@
5
5
  1. ```javascript
6
6
  class ... extends Array {...}
7
7
  ```
8
- Because if one level of prototype is added, the characteristics of the array will disappear, and `efront` has not yet implemented a perfect downgrade plan, and the possibility of future implementation is also unlikely. After similar statements are converted by `typescript`, the newly defined methods will be lost. `efront` uses `class extends Array2 {...}` will be replaced, and `Array2` will mount the defined method to the newly generated object.
8
+ Because if one level of prototype is added, the characteristics of the array will disappear, and `efront` has not yet implemented a perfect downgrade plan, and the possibility of future implementation is also unlikely. After similar statements are converted by `typescript`, the newly defined methods will be lost. `efront` uses `class extends &Array {...}` will be replaced, and `&Array` will mount the defined method to the newly generated object.
9
9
 
10
10
  2. ```javascript
11
11
  import(...)
12
12
  ```
13
- The result imported with `import (...)`, efront will not actively wrap a layer of Promise. If you use `await` in the root scope of the module, the returned result is an instance of `Promise`. Otherwise, what you export in the imported file will be the result of this `import(...)`. If you are unsure about the content of the imported file and do not blindly use methods such as `import(...).then (...)`, you can use `await import(...)` to wait for the import to complete.
13
+ The result imported with `import(...)`, efront will not actively wrap a layer of Promise. If you use `await` in the root scope of the module, the returned result is an instance of `Promise`. Otherwise, what you export in the imported file will be the result of this `import(...)`. If you are unsure about the content of the imported file and do not blindly use methods such as `import(...).then(...)`, you can use `await import(...)` to wait for the import to complete.
14
14
 
15
15
  3. ```javascript
16
16
  import.meta
@@ -86,7 +86,7 @@
86
86
  9. ```javascript
87
87
  Object.assign
88
88
  ```
89
- Object.assign and `ie` series browsers are not supported. Because they are often used by `efront` developers, during the downgrade Compile time period, if the '--no-polyfill' parameter is not specified, `efront` will be processed as a substitute [extend](../basic/extend.js)
89
+ Object.assign and `ie` series browsers are not supported. Because they are often used by `efront` developers, during the downgrade Compile time period, if the '--no-polyfill' parameter is not specified, `efront` will be processed as a substitute [&extend](../basic_/&extend.js)
90
90
 
91
91
  10. ```javascript
92
92
  Promise
@@ -5,7 +5,7 @@
5
5
  1. ```javascript
6
6
  class ... extends Array {...}
7
7
  ```
8
- 因为如果增加一级原型,数组的特性便会消失,`efront`暂时并没有实现完美的降级方案,未来实现的可能性也不大。类似语句经`typescript`转换后新定义的方法会丢失, `efront` 在降级编译期使用 `class ... extends Array2 {...}` 进行替换,`Array2`会将定义的方法挂载到新生成的对象上。
8
+ 因为如果增加一级原型,数组的特性便会消失,`efront`暂时并没有实现完美的降级方案,未来实现的可能性也不大。类似语句经`typescript`转换后新定义的方法会丢失, `efront` 在降级编译期使用 `class ... extends &Array {...}` 进行替换,`&Array`会将定义的方法挂载到新生成的对象上。
9
9
 
10
10
  2. ```javascript
11
11
  import(...)
@@ -75,14 +75,14 @@
75
75
  Array.prototype.fill
76
76
  Array(3).fill(0) // 类似这种的将变成[0,0,0]一个常量数组
77
77
  var [a,b,c]=Array(3).fill(0).map((_,i)=>i+1) // 类似这种用于生成常量并赋值的,将直接变成赋值语句 var a=1,b=2,c=3
78
- Array(3).fill(a)// 类似这种非常量的,将由类似 ArrayFill(3,a) 的语句替换
78
+ Array(3).fill(a)// 类似这种非常量的,将由类似 &ArrayFill(3,a) 的语句替换
79
79
  ```
80
80
  `Array(...).fill(...).map(...)`这种写法经常被`efront`开发者用来生成自增赋值序列,并且非所有运行环境都支持,所以包括其它显式用到`Array.prototype.fill`的几种写法都会被替换。为了目标代码的性能考虑,这种替换在自动常量化之前就要执行,所以不再支持用`polyfill`的开关进行关闭。如果要关闭,请使用参数`--no-autoeval`将自动常量化的功能一同关闭。
81
81
 
82
82
  9. ```javascript
83
83
  Object.assign
84
84
  ```
85
- Object.assign,`ie`系列浏览器均不支持,由于经常被`efront`开发者使用,在降级编译期,如果没有指定`--no-polyfill`参数,将由`efront`处理成替代品[extend](../basic/extend.js)
85
+ Object.assign,`ie`系列浏览器均不支持,由于经常被`efront`开发者使用,在降级编译期,如果没有指定`--no-polyfill`参数,将由`efront`处理成替代品[&extend](../basic_/&extend.js)
86
86
  10. ```javascript
87
87
  Promise
88
88
  Promise.prototype.then
@@ -492,8 +492,8 @@ var scan = function (data) {
492
492
  };
493
493
  var detourTemplate = function (raw, params) {
494
494
  var spliter = { text: ",", type: STAMP };
495
- var template = scan(`extend([],{["raw"]:[]})`);
496
- rootenvs.extend = true;
495
+ var template = scan(`&extend([],{["raw"]:[]})`);
496
+ rootenvs["&extend"] = true;
497
497
  var str0 = template[1].first;
498
498
  var str1 = template[1][2][2];
499
499
  for (var r of raw) {
@@ -79,7 +79,8 @@ class Program {
79
79
  ["[", "]"],
80
80
  ["{", "}"],
81
81
  ]
82
- stamps = "/=+;|:?<>-!~%^&*,".split("")
82
+ stamps = "/=+;|:?<>-!~%^&*,".split("");
83
+ prefix = '&^%?:'.split('');
83
84
  value_reg = /^(false|true|null)$/
84
85
  number_reg = number_reg;
85
86
  digit_reg = digit_reg;
@@ -226,7 +227,7 @@ class Program {
226
227
  o.unary = true;
227
228
  }
228
229
  else if (!last || last.type === STAMP && (!(last.text in powermap)) && !last.istype) {
229
- if (!queue.istype && powermap[o.text] > powermap["="]) o.unary = true;
230
+ if (powermap[o.text] > powermap["="]) o.unary = true;
230
231
  }
231
232
  else if (last.type === STRAP && !last.isend || last.type === STAMP && !last.istype && !/^(\+\+|\-\-)$/.test(last.text) || last.type === SCOPED && /^[\{\[]$/.test(last.entry) && !last.isExpress) {
232
233
  o.unary = /^[^=;,\:]$/.test(o.text);
@@ -267,6 +268,7 @@ class Program {
267
268
  lasttype = cache_stamp.type;
268
269
  cache_stamp = null;
269
270
  }
271
+ var prefix_reg = this.prefix_reg;
270
272
  var save = (type) => {
271
273
  if (type === STAMP) {
272
274
  if (cache_stamp) {
@@ -284,6 +286,18 @@ class Program {
284
286
  else {
285
287
  if (cache_stamp) push_stamp();
286
288
  }
289
+ var last = queue.last;
290
+ if (type & (EXPRESS | STRAP | VALUE) && lasttype === STAMP && prefix_reg.test(last.text) && last.unary) {
291
+ m = last.text + m;
292
+ delete last.unary;
293
+ if (value_reg.test(m)) last.type = VALUE;
294
+ else if (strap_reg.test(m)) last.type = STRAP;
295
+ else last.type = EXPRESS;
296
+ last.text = m;
297
+ last.end = end;
298
+ return;
299
+ }
300
+
287
301
  var scope = {
288
302
  type,
289
303
  start,
@@ -296,7 +310,7 @@ class Program {
296
310
  lasttype = type;
297
311
  if (type === STAMP) {
298
312
  cache_stamp = scope;
299
- scope.prev = queue.last;
313
+ scope.prev = last;
300
314
  return;
301
315
  }
302
316
  if (type === STRAP) {
@@ -860,7 +874,7 @@ class Program {
860
874
  scope.istype = true;
861
875
  }
862
876
  }
863
- if (!last || (last.type & (SCOPED | STAMP))) queue.inExpress = true;
877
+ if (!last || (last.type !== STRAP && (!last.isObject || m === '(') || last.transive)) queue.inExpress = true;
864
878
  scope.isExpress = queue.inExpress;
865
879
  scope.inExpress = true;
866
880
  }
@@ -996,6 +1010,8 @@ class Program {
996
1010
  var entries_reg = new RegExp(`^(${powers_entries}|${quotes_entries}|${scopes})$`, this.nocase ? 'iu' : '');
997
1011
  stamps = this.compile(this.stamps.filter(s => !entries_reg.test(s)).join(''));
998
1012
  var number_reg = this.number_reg;
1013
+ var prefix_reg = new RegExp(`^[${this.prefix.join('')}]$`);
1014
+ this.prefix_reg = prefix_reg;
999
1015
  var numbers = number_reg.source.replace(/^\^|\$$/g, "");
1000
1016
  this.digit_reg = new RegExp(/^[+\-]?/.source + numbers, number_reg.flags);
1001
1017
  this.entry_reg = new RegExp([`${spaceDefined.reg.source}|${quotes_entries}|[${scopes}]|${numbers}(?:${spaceDefined.avoid(tokens)})*|${express}|${powers_entries}|[${stamps}]`], "gi");
@@ -167,8 +167,7 @@ var killdec = function (queue, i, getobjname, _var = 'var', killobj, islet) {
167
167
  i += init.length;
168
168
  }
169
169
  return() {
170
- var retn = scanner2(`${index++ > 0 ? "," : ''}${this.tname}=(!${this.tname}||!${this.tname}["done"])&& isFunction(${this.iname}["return"])&&${this.iname}["return"]()`);
171
- rootenvs.isFunction = true;
170
+ var retn = scanner2(`${index++ > 0 ? "," : ''}${this.tname}=(!${this.tname}||!${this.tname}["done"])&&typeof ${this.iname}["return"]==="function"&&${this.iname}["return"]()`);
172
171
  splice(queue, i, 0, ...retn);
173
172
  i += retn.length;
174
173
  }
@@ -219,7 +218,7 @@ var killdec = function (queue, i, getobjname, _var = 'var', killobj, islet) {
219
218
  map[a] = a;
220
219
  });
221
220
  d.attributes.forEach(dec);
222
- write(name, `${patchMark}rest_(${tmpname},[${Object.keys(map)}])`, false), rootenvs[patchMark + "rest_"] = true;
221
+ write(name, `${patchMark}rest(${tmpname},[${Object.keys(map)}])`, false), rootenvs[patchMark + "rest"] = true;
223
222
  }
224
223
  else {
225
224
  doged = at + 1;
@@ -227,9 +226,9 @@ var killdec = function (queue, i, getobjname, _var = 'var', killobj, islet) {
227
226
  if (iter) {
228
227
  while (iter.index < a) iter.next();
229
228
  iter.done = true;
230
- write(name, `${patchMark}restIter_(${tmpname})`), rootenvs[patchMark + "restIter_"] = true;
229
+ write(name, `${patchMark}restIter(${tmpname})`), rootenvs[patchMark + "restIter"] = true;
231
230
  }
232
- else write(name, `slice_["call"](${tmpname},${at}${a > at ? `,${at - a}` : ''})`, rest.length > 0), rootenvs.slice_ = true;
231
+ else write(name, `${patchMark}slice["call"](${tmpname},${at}${a > at ? `,${at - a}` : ''})`, rest.length > 0), rootenvs[patchMark + 'slice'] = true;
233
232
  total = rest.length;
234
233
  rest.forEach(dec);
235
234
  }
@@ -477,13 +476,13 @@ var killmap = function (body, i, _getobjname, _getnewname, killobj) {
477
476
  }
478
477
  if (q) {
479
478
  t = scanner2(`${patchMark}extend(${_getobjname()},)`);
480
- rootenvs.extend = true;
479
+ rootenvs[patchMark + "extend"] = true;
481
480
  insert1(q, null, ...t);
482
481
  }
483
482
  else {
484
483
  if (!t) {
485
484
  t = scanner2(`${patchMark}extend()`);
486
- rootenvs.extend = true;
485
+ rootenvs[patchMark + "extend"] = true;
487
486
  var [o0] = splice(body, i, 1, ...t);
488
487
  t[1].push(o0);
489
488
  l = 2;
@@ -635,7 +634,7 @@ var killcls = function (body, i, letname_, getname_) {
635
634
  while (next && !next.isClass) next = next.next;
636
635
  base = createString(splice2(body, o, o = next));
637
636
  }
638
- if (base === 'Array') base = 'Array2', rootenvs.Array2 = true;
637
+ if (base === 'Array') base = patchMark + 'Array', rootenvs[patchMark + "Array"] = true;
639
638
  var index = 0;
640
639
  while (o && o.isClass) {
641
640
  var scoped = o.scoped;
@@ -723,7 +722,7 @@ var killcls = function (body, i, letname_, getname_) {
723
722
  }
724
723
  insert1(invokes, null, ...constructor);
725
724
  o = o.next;
726
- if (base) defines.unshift(...scanner2(`${patchMark}extends_(${clz.name},${base})${defines.length ? "\r\n" : ""}`)), rootenvs[patchMark + "extends_"] = true;
725
+ if (base) defines.unshift(...scanner2(`${patchMark}extends(${clz.name},${base})${defines.length ? "\r\n" : ""}`)), rootenvs[patchMark + "extends"] = true;
727
726
  base = clz.name;
728
727
  if (clz.name) insert1(head, null, ...scanner2(`${head.length ? ',' : ''}${clz.name}`));
729
728
  index++;
@@ -775,8 +774,8 @@ var killspr = function (body, i, _getobjname, killobj) {
775
774
  if (!s.text) v.shift();
776
775
  if (m) splice2(o, m, m = m.next);
777
776
  killobj(v);
778
- var q = scanner2(`slice_["call"]()`);
779
- rootenvs.slice_ = true;
777
+ var q = scanner2(`${patchMark}slice["call"]()`);
778
+ rootenvs[patchMark + "slice"] = true;
780
779
  insert1(q[q.length - 1], null, ...v);
781
780
  return q;
782
781
  };
@@ -1242,9 +1241,8 @@ var unforof = function (o, getnewname, used, killobj) {
1242
1241
  else splice(o[o.length - 7 - hasawait], 0, 1);
1243
1242
  var n = o.next;
1244
1243
  n = skipSentenceQueue(n);
1245
- var tf = scanner2(`try{}finally{if(${iname}&&!${iname}["done"]&&isFunction(${gname}["return"]))${gname}["return"]()}`);
1244
+ var tf = scanner2(`try{}finally{if(${iname}&&!${iname}["done"]&&typeof ${gname}["return"]==="function")${gname}["return"]()}`);
1246
1245
  splice(tf[1], 0, 0, ...splice2(r.queue, r, n, ...tf));
1247
- rootenvs.isFunction = true;
1248
1246
  }
1249
1247
  };
1250
1248
  var unarrow = function (body, i, killobj, letname_) {
@@ -1366,7 +1364,7 @@ var killarg = function (head, body, _getname, setarg = true) {
1366
1364
  return `${a}=arguments["length"]>${collect + n - 1}?arguments[arguments["length"] - ${n}]:undefined`;
1367
1365
  }));
1368
1366
 
1369
- if (cname) argcodes.unshift(`var ${cname}=slice_["call"](arguments,${collect}${index > collect ? `,${collect - index}` : ""})`), rootenvs.slice_ = true;
1367
+ if (cname) argcodes.unshift(`var ${cname}=${patchMark}slice["call"](arguments,${collect}${index > collect ? `,${collect - index}` : ""})`), rootenvs[patchMark + 'slice'] = true;
1370
1368
  }
1371
1369
  if (argcodes.length && setarg) {
1372
1370
  if (!body) {
@@ -1633,7 +1631,7 @@ var newpunc = function (body, i, newname) {
1633
1631
  var r = puncRight(o);
1634
1632
  var li = body.lastIndexOf(l, i);
1635
1633
  var ri = body.indexOf(r, i);
1636
- var name = t === '??' ? 'nullish_' : "power_";
1634
+ var name = t === '??' ? 'nullish' : "power";
1637
1635
  name = patchMark + name;
1638
1636
  rootenvs[name] = true;
1639
1637
  o.text = ',';
@@ -1649,7 +1647,7 @@ var newpunc = function (body, i, newname) {
1649
1647
  var down = function (scoped) {
1650
1648
  var inAsync = scoped.async;
1651
1649
  var inAster = scoped.yield;
1652
- var funcMark = [, "aster_", "async_", "asyncAster_"][inAsync << 1 | inAster];
1650
+ var funcMark = [, "aster", "async", "asyncAster"][inAsync << 1 | inAster];
1653
1651
  if (funcMark) funcMark = patchMark + funcMark;
1654
1652
  if (funcMark) rootenvs[funcMark] = true;
1655
1653
  var vars = Object.assign(Object.create(null), scoped.vars);
@@ -1887,7 +1885,7 @@ function downLevel(data) {
1887
1885
  code = downcode(code);
1888
1886
  return code.toString();
1889
1887
  }
1890
- var patchMark = '';
1888
+ var patchMark = '&';
1891
1889
  var downcode = downLevel.code = function (code) {
1892
1890
  rootenvs = code.envs;
1893
1891
  rootHyper = rootenvs.Symbol || code.yield || code.async;
@@ -1895,9 +1893,11 @@ var downcode = downLevel.code = function (code) {
1895
1893
  if (code.patchMark) patchMark = code.patchMark;
1896
1894
  down(code.scoped);
1897
1895
  code.keepcolor = false;
1898
- if (rootenvs.slice_) {
1899
- delete rootenvs.slice_;
1900
- if (!code.vars.slice_) splice(code, 0, 0, ...scanner2('var slice_ = Array["prototype"]["slice"];\r\n'));
1896
+ var slice_ = patchMark + 'slice';
1897
+ if (rootenvs[slice_]) {
1898
+ delete rootenvs[slice_];
1899
+ if (!code.vars[slice_]) splice(code, 0, 0, ...scanner2(`var ${slice_} = Array["prototype"]["slice"];\r\n`));
1900
+ code.vars[slice_] = true;
1901
1901
  }
1902
1902
  rootenvs = null;
1903
1903
  patchMark = patchMark_;