Change name to llpython and remove llnumba references.

This commit is contained in:
Travis E. Oliphant 2012-11-07 12:14:01 -06:00
commit ac791e5c38
5 changed files with 16 additions and 19 deletions

View file

@ -19,7 +19,7 @@ class ControlFlowBuilder (BenignBytecodeVisitorMixin, BytecodeFlowVisitor):
''' '''
def visit (self, flow, nargs = 0, *args, **kws): def visit (self, flow, nargs = 0, *args, **kws):
'''Given a bytecode flow, and an optional number of arguments, '''Given a bytecode flow, and an optional number of arguments,
return a :py:class:`numba.llnumba.control_flow.ControlFlowGraph` return a :py:class:`llpython.control_flow.ControlFlowGraph`
instance describing the full control flow of the bytecode instance describing the full control flow of the bytecode
flow.''' flow.'''
self.nargs = nargs self.nargs = nargs

View file

@ -1,6 +1,6 @@
#! /usr/bin/env python #! /usr/bin/env python
# ______________________________________________________________________ # ______________________________________________________________________
'''Defines a bytecode based LLVM translator for llnumba code. '''Defines a bytecode based LLVM translator for llpython code.
''' '''
# ______________________________________________________________________ # ______________________________________________________________________
# Module imports # Module imports
@ -126,11 +126,11 @@ class LLVMTranslator (BytecodeFlowVisitor):
'''Transformer responsible for visiting a set of bytecode flow '''Transformer responsible for visiting a set of bytecode flow
trees, emitting LLVM code. trees, emitting LLVM code.
Unlike other translators in :py:mod:`numba.llnumba`, this Unlike other translators in :py:mod:`llpython`, this
incorporates the full transformation chain, starting with incorporates the full transformation chain, starting with
:py:class:`numba.llnumba.byte_flow.BytecodeFlowBuilder`, then :py:class:`llpython.byte_flow.BytecodeFlowBuilder`, then
:py:class:`numba.llnumba.byte_control.ControlFlowBuilder`, and :py:class:`llpython.byte_control.ControlFlowBuilder`, and
then :py:class:`numba.llnumba.phi_injector.PhiInjector`.''' then :py:class:`llpython.phi_injector.PhiInjector`.'''
def __init__ (self, llvm_module = None, *args, **kws): def __init__ (self, llvm_module = None, *args, **kws):
'''Constructor for LLVMTranslator.''' '''Constructor for LLVMTranslator.'''
@ -563,18 +563,18 @@ def translate_into_function (py_function, llvm_function, **kws):
# ______________________________________________________________________ # ______________________________________________________________________
def llnumba (lltype, llvm_module = None, **kws): def llpython (lltype, llvm_module = None, **kws):
'''Decorator version of translate_function().''' '''Decorator version of translate_function().'''
def _llnumba (func): def _llpython (func):
return translate_function(func, lltype, llvm_module, **kws) return translate_function(func, lltype, llvm_module, **kws)
return _llnumba return _llpython
# ______________________________________________________________________ # ______________________________________________________________________
def llnumba_into (llvm_function, **kws): def llpython_into (llvm_function, **kws):
def _llnumba_into (func): def _llpython_into (func):
return translate_into_function(llvm_function, func, **kws) return translate_into_function(llvm_function, func, **kws)
return _llnumba_into return _llpython_into
# ______________________________________________________________________ # ______________________________________________________________________
# Main (self-test) routine # Main (self-test) routine

View file

@ -112,8 +112,8 @@ class NoBitey (object):
handle_abi_casts = self.handle_abi_casts handle_abi_casts = self.handle_abi_casts
target_function_name = llvm_function.name + "_wrapper" target_function_name = llvm_function.name + "_wrapper"
# __________________________________________________ # __________________________________________________
@byte_translator.llnumba(bytetype.l_pyfunc, self.target_module, @byte_translator.llpython(bytetype.l_pyfunc, self.target_module,
**locals()) **locals())
def _wrapper (self, args): def _wrapper (self, args):
ret_val = l_pyobj_p(0) ret_val = l_pyobj_p(0)
parse_args = build_parse_args() parse_args = build_parse_args()

View file

@ -3,10 +3,7 @@
import llvm.core as lc import llvm.core as lc
try: from llpython import bytetype
from llnumba import bytetype
except ImportError:
from numba.llnumba import bytetype
# ______________________________________________________________________ # ______________________________________________________________________

View file

@ -129,7 +129,7 @@ setup(
author = 'Mahadevan R', author = 'Mahadevan R',
author_email = 'mdevan@mdevan.org', author_email = 'mdevan@mdevan.org',
url = 'http://www.llvmpy.org/', url = 'http://www.llvmpy.org/',
packages = ['llvm', 'llvm_cbuilder'], packages = ['llvm', 'llvm_cbuilder', 'llpython'],
py_modules = ['llvm.core'], py_modules = ['llvm.core'],
license = "BSD", license = "BSD",
classifiers = [ classifiers = [