aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-01-05 19:36:02 +0800
committerGitHub <noreply@github.com>2018-01-05 19:36:02 +0800
commit7f2a591c7ecdb13a20bbad5e7c614672dd890431 (patch)
treeb910855717b17a1b9edee369458769d46ac21b76 /lib/compress.js
parentafbcebddf63c7ffa5b0df9b3712ee3b560918f1e (diff)
downloadtracifyjs-7f2a591c7ecdb13a20bbad5e7c614672dd890431.tar.gz
tracifyjs-7f2a591c7ecdb13a20bbad5e7c614672dd890431.zip
warn on deprecated features (#2726)
- `function.arguments` - `function.callers` fixes #2719
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 3a3aac4f..e824d6ff 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -5461,6 +5461,14 @@ merge(Compressor.prototype, {
});
OPT(AST_Dot, function(self, compressor){
+ if (self.property == "arguments" || self.property == "caller") {
+ compressor.warn("Function.protoype.{prop} not supported [{file}:{line},{col}]", {
+ prop: self.property,
+ file: self.start.file,
+ line: self.start.line,
+ col: self.start.col
+ });
+ }
var def = self.resolve_defines(compressor);
if (def) {
return def.optimize(compressor);