Added llpython.af_to_api module. Started work on a code generator that accepts address flows, and outputs an LLVM function that implements the given code object using (undefined) API calls for bytecode instructions.

This commit is contained in:
Jon Riehl 2013-06-13 15:25:28 -05:00
commit fd41a93554
2 changed files with 246 additions and 0 deletions

View file

@ -280,5 +280,12 @@ def build_basic_blocks (co_obj):
labels + [len(co_code)]))
return blocks
# ______________________________________________________________________
def get_nargs(co_obj):
flags = co_obj.co_flags
return (1 + co_obj.co_argcount + (1 if flags & 4 else 0) +
(1 if flags & 8 else 0))
# ______________________________________________________________________
# End of opcode_util.py