Skip to content

Commit efda6f8

Browse files
author
William Grant
committed
remove dupe
1 parent 4b768d5 commit efda6f8

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

typed_python/compiler/runtime.py

-27
Original file line numberDiff line numberDiff line change
@@ -467,33 +467,6 @@ def Compiled(pyFunc):
467467
return f
468468

469469

470-
def getNativeIRCode(typedFunc: Function) -> str:
471-
"""
472-
Given a function compiled with Entrypoint, return a text representation
473-
of the generated native (one layer prior to LLVM) code.
474-
475-
Args:
476-
typedFunc (Function): a decorated python function.
477-
478-
Returns:
479-
A string for the function bodies generated (including constructors and destructors)
480-
"""
481-
converter = Runtime.singleton().llvm_compiler.converter
482-
function_name = typedFunc.__name__
483-
# relies on us maintaining our naming conventions (tests would break otherwise)
484-
output_str = ""
485-
for key, value in converter._function_definitions.items():
486-
if function_name in key:
487-
output_str += f'Function {key}' + '_'*20 + '\n'
488-
output_str += str(value.body.body) + '\n'
489-
output_str += "_"*80 + '\n'
490-
491-
if not output_str:
492-
raise ValueError('no matching function definitions found - has the code been compiled (and run)?')
493-
494-
return output_str
495-
496-
497470
def getNativeIRString(typedFunc: Function) -> str:
498471
"""
499472
Given a function compiled with Entrypoint, return a text representation

0 commit comments

Comments
 (0)