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:
parent
5f81cab357
commit
fd41a93554
2 changed files with 246 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue