Add 'xo-jit/' from commit '855887df71'

git-subtree-dir: xo-jit
git-subtree-mainline: 35555df976
git-subtree-split: 855887df71
This commit is contained in:
Roland Conybeare 2025-05-11 01:54:47 -05:00
commit 757dfed99c
49 changed files with 7305 additions and 0 deletions

View file

@ -0,0 +1,7 @@
# xo-jit/docs/CMakeLists.txt
xo_doxygen_collect_deps()
xo_docdir_doxygen_config()
xo_docdir_sphinx_config(
index.rst glossary.rst
)

70
xo-jit/docs/README Normal file
View file

@ -0,0 +1,70 @@
build
+-----------------------------------------------+
| cmake |
| CMakeLists.txt |
| $PREFIX/share/cmake/xo_macros/xo_cxx.cmake |
+-----------------------------------------------+
|
| +----------------------+
+------------------------------------------------->| .build/docs/Doxyfile |
| +----------------------+
| |
| /------------/
| |
| v
| +---------------------------------------+ +-----------------+
+---->| doxygen |--->| .build/docs/dox |
| | $PREFIX/share/xo-macros/Doxyfile.in | | +- html/ |
| +---------------------------------------+ | +- xml/ |
| +-----------------+
| |
| /------------/
| |
| v
| +---------------------------------------+ +--------------------+
\---->| sphinx |--->| .build/docs/sphinx |
| +- conf.py | | +- html/ |
| +- _static/ | +--------------------+
| +- *.rst |
+---------------------------------------+
files
README this file
CMakeLists.txt build entry point
conf.py sphinx config
_static static files for sphinx
map
index.rst
+- install.rst
+- examples.rst
+- unit-quantities.rst
+- classes.rst
+- glossary.rst
...
examples
.. doxygenclass:: ${c++ class name}
:project:
:path:
:members:
:protected-members:
:private-members:
:undoc-members:
:member-groups:
:members-only:
:outline:
:no-link:
:allow-dot-graphs:
.. doxygendefine:: ${c preprocessor define}
.. doxygenconcept:: ${c++ concept definition}
.. doxygenenum:: ${c++ enum definition}
.. doxygenfunction:: ${c++ function name}

39
xo-jit/docs/conf.py Normal file
View file

@ -0,0 +1,39 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'xo jit documentation'
copyright = '2024, Roland Conybeare'
author = 'Roland Conybeare'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
#extensions = []
extensions = [ "breathe",
"sphinx.ext.mathjax", # inline math
"sphinx.ext.autodoc", # generate info from docstrings
"sphinxcontrib.ditaa", # diagrams-through-ascii-art
"sphinxcontrib.plantuml" # text -> uml diagrams
]
# note: breathe requires doxygen xml output -> must have GENERATE_XML = YES in Doxyfile.in
# match project name in Doxyfile.in
breathe_default_project = "xodoxxml"
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
pygments_style = 'sphinx'
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
#html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
html_favicon = '_static/img/favicon.ico'

67
xo-jit/docs/glossary.rst Normal file
View file

@ -0,0 +1,67 @@
.. _glossary:
Glossary
--------
.. glossary::
ABI
| Short for Application Binary Interface.
| In this context applies to conventions adopted by `xo-jit`.
c.foo
| llvm typename for automatically-generated closure type for a lambda
| with name `foo`.
e.foo
| llvm typename for automatically-generated local environment for a
| lambda with name `foo`.
w.foo
| llvm typename for automatically-generated wrapper function for a
| primitive function `foo`. The wrapper function accepts and ignores
| an extra initial argument supplying an environment pointer.
|
| We apply this practice so that lambdas and primitives support the
| same ABI, so that we can support pointers to abstract functions
| that might at runtime turn out to be either primitives or lambdas
lambda
| Common use is for lambda to refer to an anonymous function.
| In llvm we need all functions to be named, and those names
| have to be unique.
|
| Since all functions have to be named, we cheerfully adopt
| the oxymoron 'named lambda'
|
| Practices:
| 1. Automatically generate unique names for anonymous lambdas.
| 2. Incorporate user-provided names for convenience, when provided.
| 3. Still have to uniqueify names for user-provided nested lambdas.
localenv
| Shorthand for local environment.
| Represents an explicit runtime repsentation for a struct that
| holds captured function arguments with the ability to be persisted
| (for example, moved to the the heap).
|
| Note that library `xo-expression` also uses the term environment, but differently.
| In that context describes all function arguments.
lvtype
| Shorthand for `llvm::Type`:
| llvm-owned representation for a datatype
xsession
| Shorthand for `llvm::orc::ExecutionSession`.
| Manages running JIT-generated machine code in the host process
td
| Short for `xo::reflect::TypeDescr`.
XO
A set of integrated c++ libraries for complex event processing, with browser and python integration.
`xo documentation here`_
.. _xo documentation here: https://rconybea.github.io/web/sw/xo.html
.. toctree::

21
xo-jit/docs/index.rst Normal file
View file

@ -0,0 +1,21 @@
.. xo-jit documentation master file, created by
sphinx-quickstart on Wed Mar 6 23:32:27 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
xo-jit documentation
====================
xo-jit compiles xo-expression AST's to runnable-in-this-process machine code.
* uses C++ reflection to simplify making c++ type-equivalents available in LLVM
* uses C++ reflection to simplify making c++ functions available in LLVM
* integration with python (see sister project xo-pyjit)
.. toctree::
:maxdepth: 2
:caption: xo-jit contents
glossary
genindex
search