diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-04-09T12·00+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-04-09T12·00+0000 |
commit | f3dc7ab877c736ec1500f6b503ab71a62ce90305 (patch) | |
tree | 5807ecef874e9392d1e9d1a6e2602d03240c594e /src/libexpr/eval.hh | |
parent | b7b3dd55f9e30e2eccb54aca22830852c5c2b514 (diff) |
* Keep more statistics about stack space usage.
* Reduce stack space usage.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r-- | src/libexpr/eval.hh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 0ea474447f1f..fb4dd802e0b0 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -144,10 +144,6 @@ public: private: SrcToStore srcToStore; - unsigned long nrValues; - unsigned long nrEnvs; - unsigned long nrEvaluated; - bool allowUnsafeEquality; ATermMap parseTrees; @@ -155,6 +151,7 @@ private: public: EvalState(); + ~EvalState(); /* Evaluate an expression read from the given file to normal form. */ @@ -242,6 +239,17 @@ public: /* Print statistics. */ void printStats(); + +private: + + unsigned long nrValues; + unsigned long nrEnvs; + unsigned long nrEvaluated; + unsigned int recursionDepth; + unsigned int maxRecursionDepth; + char * deepestStack; /* for measuring stack usage */ + + friend class RecursionCounter; }; |