Hi,
An updated webrev is here:
http://cr.openjdk.java.net/~jlahoda/8203827/webrev.01/complete/
A webrev showing changes from the previous revision is here:
http://cr.openjdk.java.net/~jlahoda/8203827/webrev.01/delta/
The changes are:
-updated src/jdk.internal.le/share/legal/jline.md
-the
This is because the parser is recursively processing the if-else branches. This
is one huge if statement. It's basically equivalent to
if (true) {
print(x);
} else {
if (true) {
print(x);
} else {
if (true) {
print(x);
} else {
…
}
}
so the parser code
Nashorn throws a StackOverflowError if there are a few hundred if else
statements in a function.
function whyDoesThisThrowStackOverflowError(x) {
if (true) { print(x); }
else if (true) { print(x); }
else if (true) { print(x); }
else if (true) { print(x); }
else if (true) { print(x); }