Change name to llpython and remove llnumba references.
This commit is contained in:
parent
affc4c016f
commit
ac791e5c38
5 changed files with 16 additions and 19 deletions
|
|
@ -19,7 +19,7 @@ class ControlFlowBuilder (BenignBytecodeVisitorMixin, BytecodeFlowVisitor):
|
|||
'''
|
||||
def visit (self, flow, nargs = 0, *args, **kws):
|
||||
'''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
|
||||
flow.'''
|
||||
self.nargs = nargs
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#! /usr/bin/env python
|
||||
# ______________________________________________________________________
|
||||
'''Defines a bytecode based LLVM translator for llnumba code.
|
||||
'''Defines a bytecode based LLVM translator for llpython code.
|
||||
'''
|
||||
# ______________________________________________________________________
|
||||
# Module imports
|
||||
|
|
@ -126,11 +126,11 @@ class LLVMTranslator (BytecodeFlowVisitor):
|
|||
'''Transformer responsible for visiting a set of bytecode flow
|
||||
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
|
||||
:py:class:`numba.llnumba.byte_flow.BytecodeFlowBuilder`, then
|
||||
:py:class:`numba.llnumba.byte_control.ControlFlowBuilder`, and
|
||||
then :py:class:`numba.llnumba.phi_injector.PhiInjector`.'''
|
||||
:py:class:`llpython.byte_flow.BytecodeFlowBuilder`, then
|
||||
:py:class:`llpython.byte_control.ControlFlowBuilder`, and
|
||||
then :py:class:`llpython.phi_injector.PhiInjector`.'''
|
||||
|
||||
def __init__ (self, llvm_module = None, *args, **kws):
|
||||
'''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().'''
|
||||
def _llnumba (func):
|
||||
def _llpython (func):
|
||||
return translate_function(func, lltype, llvm_module, **kws)
|
||||
return _llnumba
|
||||
return _llpython
|
||||
|
||||
# ______________________________________________________________________
|
||||
|
||||
def llnumba_into (llvm_function, **kws):
|
||||
def _llnumba_into (func):
|
||||
def llpython_into (llvm_function, **kws):
|
||||
def _llpython_into (func):
|
||||
return translate_into_function(llvm_function, func, **kws)
|
||||
return _llnumba_into
|
||||
return _llpython_into
|
||||
|
||||
# ______________________________________________________________________
|
||||
# Main (self-test) routine
|
||||
|
|
|
|||
|
|
@ -112,8 +112,8 @@ class NoBitey (object):
|
|||
handle_abi_casts = self.handle_abi_casts
|
||||
target_function_name = llvm_function.name + "_wrapper"
|
||||
# __________________________________________________
|
||||
@byte_translator.llnumba(bytetype.l_pyfunc, self.target_module,
|
||||
**locals())
|
||||
@byte_translator.llpython(bytetype.l_pyfunc, self.target_module,
|
||||
**locals())
|
||||
def _wrapper (self, args):
|
||||
ret_val = l_pyobj_p(0)
|
||||
parse_args = build_parse_args()
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@
|
|||
|
||||
import llvm.core as lc
|
||||
|
||||
try:
|
||||
from llnumba import bytetype
|
||||
except ImportError:
|
||||
from numba.llnumba import bytetype
|
||||
from llpython import bytetype
|
||||
|
||||
# ______________________________________________________________________
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue