зеркало из https://github.com/mozilla/rhino.git
Lack of support for all the varieties of lambda function in Rhino in the new "interpreter peeling" code introduced to make continuations work better was holding back additional conversions to lambda functions.
This commit is contained in:
Родитель
7e4fa18e09
Коммит
8c4b663456
|
@ -1784,6 +1784,8 @@ public final class Interpreter extends Icode implements Evaluator {
|
|||
ArrowFunction afun = (ArrowFunction) fun;
|
||||
fun = afun.getTargetFunction();
|
||||
funThisObj = afun.getCallThis(cx);
|
||||
} else if (fun instanceof LambdaConstructor) {
|
||||
break;
|
||||
} else if (fun instanceof LambdaFunction) {
|
||||
fun = ((LambdaFunction) fun).getTarget();
|
||||
} else if (fun instanceof BoundFunction) {
|
||||
|
|
|
@ -37,7 +37,8 @@ public class LambdaFunctionTest {
|
|||
}
|
||||
|
||||
private void eval(String source) {
|
||||
cx.evaluateString(root, source, "test.js", 1, null);
|
||||
Utils.runWithAllOptimizationLevels(
|
||||
ignored -> cx.evaluateString(root, source, "test.js", 1, null));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Загрузка…
Ссылка в новой задаче