mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-08 05:58:38 +00:00
8044803: Unnecessary restOf check
Reviewed-by: hannesw, jlaskey
This commit is contained in:
parent
a5af8cb53e
commit
1fa7f152d3
@ -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")) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user