diff options
author | nanjekyejoannah <joannah.nanjekye@ibm.com> | 2020-10-12 17:25:05 -0300 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-01-27 16:59:58 +1100 |
commit | 4eaebc1988699db6ebfd35fbe56a3e8d4cd0b373 (patch) | |
tree | ae2efb6e48fc19241b94c2b22f800a7883fff608 /docs/develop/qstr.rst | |
parent | 203e1d2a65273db3f6ff063ba1124a89c3482c0f (diff) |
docs/develop: Add MicroPython Internals chapter.
This commit adds many new sections to the existing "Developing and building
MicroPython" chapter to make it all about the internals of MicroPython.
This work was done as part of Google's Season of Docs 2020.
Diffstat (limited to 'docs/develop/qstr.rst')
-rw-r--r-- | docs/develop/qstr.rst | 7 |
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 |