summaryrefslogtreecommitdiff
path: root/docs/develop/qstr.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/develop/qstr.rst')
-rw-r--r--docs/develop/qstr.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/develop/qstr.rst b/docs/develop/qstr.rst
index 3550a8bd4..cd1fc4786 100644
--- a/docs/develop/qstr.rst
+++ b/docs/develop/qstr.rst
@@ -1,3 +1,5 @@
+.. _qstr:
+
MicroPython string interning
============================
@@ -57,6 +59,7 @@ Processing happens in the following stages:
information. Note that this step only uses files that have changed, which
means that ``qstr.i.last`` will only contain data from files that have
changed since the last compile.
+
2. ``qstr.split`` is an empty file created after running ``makeqstrdefs.py split``
on qstr.i.last. It's just used as a dependency to indicate that the step ran.
This script outputs one file per input C file, ``genhdr/qstr/...file.c.qstr``,
@@ -71,8 +74,8 @@ Processing happens in the following stages:
data is written to another file (``qstrdefs.collected.h.hash``) which allows
it to track changes across builds.
-4. ``qstrdefs.preprocessed.h`` adds in the QSTRs from qstrdefs*. It
- concatenates ``qstrdefs.collected.h`` with ``qstrdefs*.h``, then it transforms
+4. Generate an enumeration, each entry of which maps a ``MP_QSTR_Foo`` to it's corresponding index.
+ It concatenates ``qstrdefs.collected.h`` with ``qstrdefs*.h``, then it transforms
each line from ``Q(Foo)`` to ``"Q(Foo)"`` so they pass through the preprocessor
unchanged. Then the preprocessor is used to deal with any conditional
compilation in ``qstrdefs*.h``. Then the transformation is undone back to