Review request for JDK-8009240

Hannes Wallnoefer hannes.wallnoefer at oracle.com
Thu Feb 28 12:13:47 PST 2013


Please review patch for JDK-8009240 - RegExpScanner code is inefficient 
and too complex.

http://cr.openjdk.java.net/~hannesw/8009240/

This gets rid of the token tree in RegExpScanner and instead directly 
generates the rewritten regex. The code is more efficient now and I 
think it's also easier to understand.

The generated regular expressions should be the same as before except 
for the case of the empty character class followed by a min-0 quantifier 
which isn't optimized away in the new version, mostly because I don't 
think this is really relevant for real code.

I've tested with ant test, test262parallel and octane. Haven't run 
nodejar tests yet but will do so before I push.

Hannes


More information about the nashorn-dev mailing list