Skip to content

Commit

Permalink
Remove FeatureSet.ES6_IMPL.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156933530
  • Loading branch information
shicks authored and blickly committed May 25, 2017
1 parent 82315a1 commit 1623666
Show file tree
Hide file tree
Showing 51 changed files with 140 additions and 149 deletions.
4 changes: 4 additions & 0 deletions src/com/google/javascript/jscomp/RewritePolyfills.java
Expand Up @@ -298,6 +298,10 @@ private boolean languageOutIsAtLeast(FeatureSet features) {
switch (features.version()) {
case "ts":
return languageOutIsAtLeast(LanguageMode.ECMASCRIPT6_TYPED);
case "es8":
return languageOutIsAtLeast(LanguageMode.ECMASCRIPT_2017);
case "es7":
return languageOutIsAtLeast(LanguageMode.ECMASCRIPT_2016);
case "es6":
case "es6-impl": // TODO(sdh): support a separate language mode for es6-impl?
return languageOutIsAtLeast(LanguageMode.ECMASCRIPT_2015);
Expand Down
Expand Up @@ -24,7 +24,7 @@ const fs = require('fs');
* Provides an ordering to ensure lower-versioned polyfills don't
* depend on higher versions.
*/
const ORDER = ['es3', 'es5', 'es6-impl', 'es6'];
const ORDER = ['es3', 'es5', 'es6'];

/**
* Prints to stderr and exits.
Expand Down
Expand Up @@ -59,4 +59,4 @@ $jscomp.polyfill('Array.prototype.copyWithin', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/array/entries.js
Expand Up @@ -35,4 +35,4 @@ $jscomp.polyfill('Array.prototype.entries', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/array/fill.js
Expand Up @@ -45,4 +45,4 @@ $jscomp.polyfill('Array.prototype.fill', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/array/find.js
Expand Up @@ -36,4 +36,4 @@ $jscomp.polyfill('Array.prototype.find', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/array/findindex.js
Expand Up @@ -36,4 +36,4 @@ $jscomp.polyfill('Array.prototype.findIndex', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/array/from.js
Expand Up @@ -62,4 +62,4 @@ $jscomp.polyfill('Array.from', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/array/keys.js
Expand Up @@ -31,4 +31,4 @@ $jscomp.polyfill('Array.prototype.keys', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/array/of.js
Expand Up @@ -35,4 +35,4 @@ $jscomp.polyfill('Array.of', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/map.js
Expand Up @@ -329,4 +329,4 @@ $jscomp.polyfill('Map',


return PolyfillMap;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/acosh.js
Expand Up @@ -33,4 +33,4 @@ $jscomp.polyfill('Math.acosh', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/asinh.js
Expand Up @@ -35,4 +35,4 @@ $jscomp.polyfill('Math.asinh', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/atanh.js
Expand Up @@ -35,4 +35,4 @@ $jscomp.polyfill('Math.atanh', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/cbrt.js
Expand Up @@ -35,4 +35,4 @@ $jscomp.polyfill('Math.cbrt', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/clz32.js
Expand Up @@ -53,4 +53,4 @@ $jscomp.polyfill('Math.clz32', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/cosh.js
Expand Up @@ -34,4 +34,4 @@ $jscomp.polyfill('Math.cosh', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/exp1m.js
Expand Up @@ -47,4 +47,4 @@ $jscomp.polyfill('Math.expm1', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/hypot.js
Expand Up @@ -59,4 +59,4 @@ $jscomp.polyfill('Math.hypot', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/imul.js
Expand Up @@ -44,4 +44,4 @@ $jscomp.polyfill('Math.imul', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/log10.js
Expand Up @@ -32,4 +32,4 @@ $jscomp.polyfill('Math.log10', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/log1p.js
Expand Up @@ -49,4 +49,4 @@ $jscomp.polyfill('Math.log1p', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/log2.js
Expand Up @@ -32,4 +32,4 @@ $jscomp.polyfill('Math.log2', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/sign.js
Expand Up @@ -35,4 +35,4 @@ $jscomp.polyfill('Math.sign', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/sinh.js
Expand Up @@ -35,4 +35,4 @@ $jscomp.polyfill('Math.sinh', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/tanh.js
Expand Up @@ -37,4 +37,4 @@ $jscomp.polyfill('Math.tanh', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/math/trunc.js
Expand Up @@ -35,4 +35,4 @@ $jscomp.polyfill('Math.trunc', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
4 changes: 2 additions & 2 deletions src/com/google/javascript/jscomp/js/es6/nopolyfill.js
Expand Up @@ -25,5 +25,5 @@

$jscomp.polyfill('Proxy', null, 'es6', 'es6');

$jscomp.polyfill('String.raw', null, 'es6-impl', 'es6-impl');
$jscomp.polyfill('String.prototype.normalize', null, 'es6-impl', 'es6-impl');
$jscomp.polyfill('String.raw', null, 'es6', 'es6');
$jscomp.polyfill('String.prototype.normalize', null, 'es6', 'es6');
6 changes: 3 additions & 3 deletions src/com/google/javascript/jscomp/js/es6/number/constants.js
Expand Up @@ -24,7 +24,7 @@ $jscomp.polyfill('Number.EPSILON', function(orig) {
* <p>Polyfills the static field Number.EPSILON.
*/
return Math.pow(2, -52);
}, 'es6-impl', 'es3');
}, 'es6', 'es3');


$jscomp.polyfill('Number.MAX_SAFE_INTEGER', function() {
Expand All @@ -34,7 +34,7 @@ $jscomp.polyfill('Number.MAX_SAFE_INTEGER', function() {
* <p>Polyfills the static field Number.MAX_SAFE_INTEGER.
*/
return 0x1fffffffffffff;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');


$jscomp.polyfill('Number.MIN_SAFE_INTEGER', function() {
Expand All @@ -44,4 +44,4 @@ $jscomp.polyfill('Number.MIN_SAFE_INTEGER', function() {
* <p>Polyfills the static field Number.MIN_SAFE_INTEGER.
*/
return -0x1fffffffffffff;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/number/isfinite.js
Expand Up @@ -33,4 +33,4 @@ $jscomp.polyfill('Number.isFinite', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
Expand Up @@ -34,4 +34,4 @@ $jscomp.polyfill('Number.isInteger', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/number/isnan.js
Expand Up @@ -33,4 +33,4 @@ $jscomp.polyfill('Number.isNaN', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
Expand Up @@ -35,4 +35,4 @@ $jscomp.polyfill('Number.isSafeInteger', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/object/assign.js
Expand Up @@ -43,4 +43,4 @@ $jscomp.polyfill('Object.assign', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
Expand Up @@ -24,4 +24,4 @@ $jscomp.polyfill('Object.getOwnPropertySymbols', function(orig) {
// the trade-off of "fixing" this behavior is not worth the costs
// in (a) code size, (b) brittleness, and (c) complexity.
return function() { return []; };
}, 'es6-impl', 'es5'); // Same as Object.getOwnPropertyNames
}, 'es6', 'es5'); // Same as Object.getOwnPropertyNames
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/object/is.js
Expand Up @@ -43,4 +43,4 @@ $jscomp.polyfill('Object.is', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/promise.js
Expand Up @@ -507,4 +507,4 @@ $jscomp.polyfill('Promise',
};

return PolyfillPromise;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/set.js
Expand Up @@ -154,4 +154,4 @@ $jscomp.polyfill('Set',


return PolyfillSet;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
Expand Up @@ -53,4 +53,4 @@ $jscomp.polyfill('String.prototype.codePointAt', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/string/endswith.js
Expand Up @@ -43,4 +43,4 @@ $jscomp.polyfill('String.prototype.endsWith', function(orig) {
return j <= 0;
};
return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
Expand Up @@ -47,4 +47,4 @@ $jscomp.polyfill('String.fromCodePoint', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/string/includes.js
Expand Up @@ -37,4 +37,4 @@ $jscomp.polyfill('String.prototype.includes', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/string/repeat.js
Expand Up @@ -45,4 +45,4 @@ $jscomp.polyfill('String.prototype.repeat', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
Expand Up @@ -47,4 +47,4 @@ $jscomp.polyfill('String.prototype.startsWith', function(orig) {
};

return polyfill;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/weakmap.js
Expand Up @@ -159,4 +159,4 @@ $jscomp.polyfill('WeakMap',
};

return PolyfillWeakMap;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/js/es6/weakset.js
Expand Up @@ -86,4 +86,4 @@ $jscomp.polyfill('WeakSet',
};

return PolyfillWeakSet;
}, 'es6-impl', 'es3');
}, 'es6', 'es3');

0 comments on commit 1623666

Please sign in to comment.