rascal icon indicating copy to clipboard operation
rascal copied to clipboard

Call tracing is implemented using static fields of `AbstractFunction` breaking Evaluator instance encapsulation

Open jurgenvinju opened this issue 3 years ago • 0 comments

Describe the bug

In the tutor I know get the call traces of the compiler itself while running an example code that traces factorial.

The reason is this code in AbstractFunction, and the code that uses these fields:

protected static int callNesting = 0;
protected static boolean callTracing = false;

We should move the callNesting field to a property of the Evaluator instance itself; then all bugs related to this will be resolved.

jurgenvinju avatar Sep 16 '22 10:09 jurgenvinju