diff options
Diffstat (limited to 'src/jdk/nashorn/internal/codegen/TypeEvaluator.java')
-rw-r--r-- | src/jdk/nashorn/internal/codegen/TypeEvaluator.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jdk/nashorn/internal/codegen/TypeEvaluator.java b/src/jdk/nashorn/internal/codegen/TypeEvaluator.java index d5282a8b..ba9d7fd6 100644 --- a/src/jdk/nashorn/internal/codegen/TypeEvaluator.java +++ b/src/jdk/nashorn/internal/codegen/TypeEvaluator.java @@ -227,7 +227,8 @@ final class TypeEvaluator { // gradually introduce them as needed. An easy one would be to do the same for .call(this) idiom. final CallNode callExpr = (CallNode)expr; final Expression fnExpr = callExpr.getFunction(); - if (fnExpr instanceof FunctionNode) { + // Skip evaluation if running with eager compilation as we may violate constraints in RecompilableScriptFunctionData + if (fnExpr instanceof FunctionNode && compiler.getContext().getEnv()._lazy_compilation) { final FunctionNode fn = (FunctionNode)fnExpr; if (callExpr.getArgs().isEmpty()) { final RecompilableScriptFunctionData data = compiler.getScriptFunctionData(fn.getId()); |