From 22d8e0048b7e2d140224ed6e4becf26a568fc80c Mon Sep 17 00:00:00 2001 From: Jon Riehl Date: Thu, 8 Nov 2012 15:51:14 -0600 Subject: [PATCH] Moved and updated LLPython (formerly LLNumba) documentation from Numba repository. --- docs/source/conf.py | 2 +- docs/source/doc/llpython/articles.rst | 10 ++++ docs/source/doc/llpython/ctmp_in_llpython.rst | 5 ++ docs/source/doc/llpython/index.rst | 9 ++++ docs/source/doc/llpython/intro_llpython.rst | 46 +++++++++++++++++++ .../doc/llpython/llpython.byte_control.rst | 6 +++ .../doc/llpython/llpython.byte_flow.rst | 6 +++ .../doc/llpython/llpython.byte_translator.rst | 6 +++ .../llpython/llpython.bytecode_visitor.rst | 6 +++ .../source/doc/llpython/llpython.bytetype.rst | 6 +++ .../doc/llpython/llpython.control_flow.rst | 6 +++ .../llpython.gen_bytecode_visitor.rst | 6 +++ docs/source/doc/llpython/llpython.nobitey.rst | 6 +++ .../doc/llpython/llpython.opcode_util.rst | 6 +++ .../doc/llpython/llpython.phi_injector.rst | 6 +++ .../doc/llpython/llpython.pyaddfunc.rst | 6 +++ docs/source/doc/llpython/llpython.rst | 6 +++ docs/source/doc/llpython/nobitey_dev.rst | 5 ++ docs/source/doc/llpython/reference.rst | 21 +++++++++ 19 files changed, 169 insertions(+), 1 deletion(-) create mode 100644 docs/source/doc/llpython/articles.rst create mode 100644 docs/source/doc/llpython/ctmp_in_llpython.rst create mode 100644 docs/source/doc/llpython/index.rst create mode 100644 docs/source/doc/llpython/intro_llpython.rst create mode 100644 docs/source/doc/llpython/llpython.byte_control.rst create mode 100644 docs/source/doc/llpython/llpython.byte_flow.rst create mode 100644 docs/source/doc/llpython/llpython.byte_translator.rst create mode 100644 docs/source/doc/llpython/llpython.bytecode_visitor.rst create mode 100644 docs/source/doc/llpython/llpython.bytetype.rst create mode 100644 docs/source/doc/llpython/llpython.control_flow.rst create mode 100644 docs/source/doc/llpython/llpython.gen_bytecode_visitor.rst create mode 100644 docs/source/doc/llpython/llpython.nobitey.rst create mode 100644 docs/source/doc/llpython/llpython.opcode_util.rst create mode 100644 docs/source/doc/llpython/llpython.phi_injector.rst create mode 100644 docs/source/doc/llpython/llpython.pyaddfunc.rst create mode 100644 docs/source/doc/llpython/llpython.rst create mode 100644 docs/source/doc/llpython/nobitey_dev.rst create mode 100644 docs/source/doc/llpython/reference.rst diff --git a/docs/source/conf.py b/docs/source/conf.py index b7a7342..758adf6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -25,7 +25,7 @@ import sys, os # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.mathjax'] +extensions = ['sphinx.ext.mathjax', 'sphinx.ext.autodoc'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/source/doc/llpython/articles.rst b/docs/source/doc/llpython/articles.rst new file mode 100644 index 0000000..ff7669c --- /dev/null +++ b/docs/source/doc/llpython/articles.rst @@ -0,0 +1,10 @@ +LLPython Articles +================= + +.. toctree:: + :titlesonly: + :maxdepth: 1 + + intro_llpython.rst + nobitey_dev.rst + ctmp_in_llpython.rst diff --git a/docs/source/doc/llpython/ctmp_in_llpython.rst b/docs/source/doc/llpython/ctmp_in_llpython.rst new file mode 100644 index 0000000..53f63bf --- /dev/null +++ b/docs/source/doc/llpython/ctmp_in_llpython.rst @@ -0,0 +1,5 @@ +Compile-time Metaprogramming in LLPython +======================================== + +In this article, we discuss how LLPython supports compile-time +metaprogramming. diff --git a/docs/source/doc/llpython/index.rst b/docs/source/doc/llpython/index.rst new file mode 100644 index 0000000..43ea17a --- /dev/null +++ b/docs/source/doc/llpython/index.rst @@ -0,0 +1,9 @@ +LLPython Documentation +====================== + +.. toctree:: + :titlesonly: + :maxdepth: 2 + + articles.rst + reference.rst diff --git a/docs/source/doc/llpython/intro_llpython.rst b/docs/source/doc/llpython/intro_llpython.rst new file mode 100644 index 0000000..47c0c2a --- /dev/null +++ b/docs/source/doc/llpython/intro_llpython.rst @@ -0,0 +1,46 @@ +==================== +Introducing LLPython +==================== + +In this article, we introduce the llpython package. The primary goal +of the llpython package is to provide a Python dialect/subset that +maps directly to LLVM code. LLPython differs from its originating +LLVM translator, Numba, in the following aspects: + + * LLPython code is not intended to work in Python if not translated + and wrapped. + * The LLPython translator only uses LLVM types. + * LLPython is explicitly typed, and does not support type inference. + LLPython does not support implicit casts, all casts must be explicit. + * LLPython supports code that directly calls the C API, the Python C + API, and the llvm.core.Builder methods. + +Additionally, we designed the sub-package to have the following +engineering properties: + + * Usable from Python 2.7, and 3.X. At the time of writing, we plan + to support Python 2.6. + * Clean from Numba dependencies (other than llvmpy), and can be used + as a standalone code generator without a full Numba installation. + * Provides a series of Python bytecode passes that can be easily + used by other projects. + + +LLPython Origins +================ + +We developed LLPython with the initial goal of simplifying writing +LLVM code. + + +LLPython Internals +================== + +In this section, we describe the various passes performed by the +LLPython translator. + + +Conclusions +=========== + +LLPython is neat. diff --git a/docs/source/doc/llpython/llpython.byte_control.rst b/docs/source/doc/llpython/llpython.byte_control.rst new file mode 100644 index 0000000..e851dac --- /dev/null +++ b/docs/source/doc/llpython/llpython.byte_control.rst @@ -0,0 +1,6 @@ +===================== +llpython.byte_control +===================== + +.. automodule:: llpython.byte_control + :members: diff --git a/docs/source/doc/llpython/llpython.byte_flow.rst b/docs/source/doc/llpython/llpython.byte_flow.rst new file mode 100644 index 0000000..783a54b --- /dev/null +++ b/docs/source/doc/llpython/llpython.byte_flow.rst @@ -0,0 +1,6 @@ +================== +llpython.byte_flow +================== + +.. automodule:: llpython.byte_flow + :members: diff --git a/docs/source/doc/llpython/llpython.byte_translator.rst b/docs/source/doc/llpython/llpython.byte_translator.rst new file mode 100644 index 0000000..2a5993c --- /dev/null +++ b/docs/source/doc/llpython/llpython.byte_translator.rst @@ -0,0 +1,6 @@ +======================== +llpython.byte_translator +======================== + +.. automodule:: llpython.byte_translator + :members: diff --git a/docs/source/doc/llpython/llpython.bytecode_visitor.rst b/docs/source/doc/llpython/llpython.bytecode_visitor.rst new file mode 100644 index 0000000..3479ff7 --- /dev/null +++ b/docs/source/doc/llpython/llpython.bytecode_visitor.rst @@ -0,0 +1,6 @@ +========================= +llpython.bytecode_visitor +========================= + +.. automodule:: llpython.bytecode_visitor + :members: diff --git a/docs/source/doc/llpython/llpython.bytetype.rst b/docs/source/doc/llpython/llpython.bytetype.rst new file mode 100644 index 0000000..81efe83 --- /dev/null +++ b/docs/source/doc/llpython/llpython.bytetype.rst @@ -0,0 +1,6 @@ +================= +llpython.bytetype +================= + +.. automodule:: llpython.bytetype + :members: diff --git a/docs/source/doc/llpython/llpython.control_flow.rst b/docs/source/doc/llpython/llpython.control_flow.rst new file mode 100644 index 0000000..c9aee7d --- /dev/null +++ b/docs/source/doc/llpython/llpython.control_flow.rst @@ -0,0 +1,6 @@ +===================== +llpython.control_flow +===================== + +.. automodule:: llpython.control_flow + :members: diff --git a/docs/source/doc/llpython/llpython.gen_bytecode_visitor.rst b/docs/source/doc/llpython/llpython.gen_bytecode_visitor.rst new file mode 100644 index 0000000..2bc19db --- /dev/null +++ b/docs/source/doc/llpython/llpython.gen_bytecode_visitor.rst @@ -0,0 +1,6 @@ +============================= +llpython.gen_bytecode_visitor +============================= + +.. automodule:: llpython.gen_bytecode_visitor + :members: diff --git a/docs/source/doc/llpython/llpython.nobitey.rst b/docs/source/doc/llpython/llpython.nobitey.rst new file mode 100644 index 0000000..59e052d --- /dev/null +++ b/docs/source/doc/llpython/llpython.nobitey.rst @@ -0,0 +1,6 @@ +================ +llpython.nobitey +================ + +.. automodule:: llpython.nobitey + :members: diff --git a/docs/source/doc/llpython/llpython.opcode_util.rst b/docs/source/doc/llpython/llpython.opcode_util.rst new file mode 100644 index 0000000..0fa5387 --- /dev/null +++ b/docs/source/doc/llpython/llpython.opcode_util.rst @@ -0,0 +1,6 @@ +==================== +llpython.opcode_util +==================== + +.. automodule:: llpython.opcode_util + :members: diff --git a/docs/source/doc/llpython/llpython.phi_injector.rst b/docs/source/doc/llpython/llpython.phi_injector.rst new file mode 100644 index 0000000..3db3863 --- /dev/null +++ b/docs/source/doc/llpython/llpython.phi_injector.rst @@ -0,0 +1,6 @@ +===================== +llpython.phi_injector +===================== + +.. automodule:: llpython.phi_injector + :members: diff --git a/docs/source/doc/llpython/llpython.pyaddfunc.rst b/docs/source/doc/llpython/llpython.pyaddfunc.rst new file mode 100644 index 0000000..39e0de7 --- /dev/null +++ b/docs/source/doc/llpython/llpython.pyaddfunc.rst @@ -0,0 +1,6 @@ +================== +llpython.pyaddfunc +================== + +.. automodule:: llpython.pyaddfunc + :members: diff --git a/docs/source/doc/llpython/llpython.rst b/docs/source/doc/llpython/llpython.rst new file mode 100644 index 0000000..87fd3d5 --- /dev/null +++ b/docs/source/doc/llpython/llpython.rst @@ -0,0 +1,6 @@ +======== +llpython +======== + +.. automodule:: llpython + :members: diff --git a/docs/source/doc/llpython/nobitey_dev.rst b/docs/source/doc/llpython/nobitey_dev.rst new file mode 100644 index 0000000..be7b4d8 --- /dev/null +++ b/docs/source/doc/llpython/nobitey_dev.rst @@ -0,0 +1,5 @@ +nobitey: Using ctypes and llvmpy to Bypass ctypes +================================================= + +In this article, we show how nobitey uses llvmpy to eliminate the +ctypes call overhead. diff --git a/docs/source/doc/llpython/reference.rst b/docs/source/doc/llpython/reference.rst new file mode 100644 index 0000000..7818100 --- /dev/null +++ b/docs/source/doc/llpython/reference.rst @@ -0,0 +1,21 @@ +LLPython Module Reference +========================= + +Contents: + +.. toctree:: + :titlesonly: + :maxdepth: 2 + + llpython.rst + llpython.bytecode_visitor.rst + llpython.byte_control.rst + llpython.byte_flow.rst + llpython.byte_translator.rst + llpython.bytetype.rst + llpython.control_flow.rst + llpython.gen_bytecode_visitor.rst + llpython.nobitey.rst + llpython.opcode_util.rst + llpython.phi_injector.rst + llpython.pyaddfunc.rst