8044803: Unnecessary restOf check

Reviewed-by: hannesw, jlaskey
This commit is contained in:
Attila Szegedi 2014-06-04 16:52:50 +02:00
parent a5af8cb53e
commit 1fa7f152d3

View File

@ -2423,7 +2423,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
}
assert undefinedSymbol != null; //remove warning
if (undefinedSymbol == null || !undefinedSymbol.isScope()) {
if (!undefinedSymbol.isScope()) {
return false; //disallow undefined as local var or parameter
}
@ -2440,11 +2440,6 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
return false;
}
// TODO: why?
if (isRestOf()) {
return false;
}
//make sure that undefined has not been overridden or scoped as a local var
//between us and global
if (!compiler.isGlobalSymbol(lc.getCurrentFunction(), "undefined")) {