RFR: 8027302: Identifiers containing unicode escapes are not recognized as reserved words

Jim Laskey (Oracle) james.laskey at oracle.com
Fri Oct 13 12:24:50 UTC 2017


+1


> On Oct 13, 2017, at 5:36 AM, Hannes Wallnöfer <hannes.wallnoefer at oracle.com> wrote:
> 
> Please review: 
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8027302
> Webrev: http://cr.openjdk.java.net/~hannesw/8027302/webrev.01
> 
> ES6 and ES5 require different handling regarding unencoding Unicode escapes in keywords and identifiers. This patch makes handling more compliant and more efficient in ES6 mode (previously we didn’t cover all cases, and checked every identifier instead of just those containing escapes).
> 
> About the removal of Lexer.isEscapeCharacter: this method always returns true in Lexer, and it’s only purpose was to be overridden in JSON parser, but JSON parser doesn’t extend Lexer/Parser anymore.
> 
> Thanks,
> Hannes



More information about the nashorn-dev mailing list