From 8e78fbb2f63754a3195157fb14d968498bcd05fe Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Sat, 16 Apr 2016 12:40:54 +0100 Subject: [PATCH] Fix typos and document restrictions on gather argument. Copied from Perforce Change: 191184 ServerID: perforce.ravenbrook.com --- mps/design/diag.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mps/design/diag.txt b/mps/design/diag.txt index 2ce6bbc65e6..90918307a6c 100644 --- a/mps/design/diag.txt +++ b/mps/design/diag.txt @@ -153,11 +153,11 @@ defined (in the cool variety) and compiled out if ``STATISTIC_DECL(decl)`` -_`.stat.decl`: The ``STATISTIC_DECL`` macro is used to wrap a +_`.stat.decl`: The ``STATISTIC_DECL`` macro is used to wrap the declaration of storage for a statistic. Note that the expansion -supplies the terminating semi-colin and so it must not be following by -a semi-colon in use. This is so that it can be used in structure -definitions. +supplies a terminating semi-colon and so it must not be followed by a +semi-colon in use. This is so that it can be used in structure +declarations. ``STATISTIC(gather)`` @@ -169,6 +169,11 @@ check the syntax of the statement because it is expected to use fields that have been compiled away by ``STATISTIC_DECL``, and these will cause compilation errors.) +_`.stat.gather.effect`: The argument to the ``STATISTIC`` macro is not +executed in non-statistical varieties and must have no side effects, +except for updates to fields that are declared in ``STATISTIC_DECL``, +and telemetry output containing the values of such fields. + ``STATISTIC_WRITE(format, arg)`` _`.stat.write`: The ``STATISTIC_WRITE`` macro is used in ``WriteF()``