From c1cd091d2790f074c6ad3a8bdbe782ebb350ad65 Mon Sep 17 00:00:00 2001 From: axexlck Date: Wed, 18 Sep 2024 22:58:15 +0200 Subject: [PATCH] =?UTF-8?q?=C3=88valEngine`=20don't=20check=20`Thread.inte?= =?UTF-8?q?rrupted()`=20for=20timeout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/matheclipse/core/eval/EvalEngine.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/eval/EvalEngine.java b/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/eval/EvalEngine.java index dad6c81b1..de3e350b1 100644 --- a/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/eval/EvalEngine.java +++ b/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/eval/EvalEngine.java @@ -784,6 +784,17 @@ public void setDeterminePrecision(IExpr expr) { // } } + // public void setDeterminePrecision(IExpr expr, boolean postParserProcessing) { + // try { + // // determine the precision of the input before evaluation + // long precision = expr.determinePrecision(postParserProcessing); + // if (precision > getNumericPrecision()) { + // setNumericPrecision(precision); + // } + // } catch (RecursionLimitExceeded rle) { + // // + // } + // } private IAST endTrace() { setTraceMode(false); @@ -1957,10 +1968,6 @@ private final IExpr evalLoop(final IExpr expr) { if ((fRecursionLimit > 0) && (fRecursionCounter > fRecursionLimit)) { RecursionLimitExceeded.throwIt(fRecursionLimit, expr); } - if (Thread.interrupted()) { - // check before going one recursion deeper - throw TimeoutException.TIMED_OUT; - } long iterationCounter = 0; if (fTraceMode) { @@ -2042,10 +2049,6 @@ private IExpr evalLoopTraceMode(final IExpr expr) { try { IExpr temp = result.evaluate(this); if (temp.isPresent()) { - if (Thread.interrupted()) { - throw TimeoutException.TIMED_OUT; - } - fTraceStack.add(expr, temp, fRecursionCounter, 0L, EVALUATION_LOOP); result = temp; long iterationCounter = 1;