New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some simplication to lowering #3607
Conversation
sklam
commented
Dec 17, 2018
- Get rid of NumbaFunction
- Get rid of codegen.add_linking_library.
- Clean up lower_call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patches. Couple of queries but otherwise looks good.
numba/lowering.py
Outdated
argvals = self.fold_call_args( | ||
fnty, signature, expr.args, expr.vararg, expr.kws, | ||
) | ||
# Handle a C function pointer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this comment should go directly under the function definition?
@@ -691,169 +691,203 @@ def lower_call(self, resty, expr): | |||
fnty = self.typeof(expr.func.name) | |||
|
|||
if isinstance(fnty, types.ObjModeDispatcher): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I right in thinking that these large-ish changes are a simple refactor to put the bodies of the isinstance
branches into functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
numba/targets/base.py
Outdated
@@ -1107,6 +1104,13 @@ def push_code_library(self, lib): | |||
finally: | |||
self._codelib_stack.pop() | |||
|
|||
def add_linking_libs(self, libs): | |||
"""Add list of linking librarys to the *active_code_library*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list? just needs to be iterable?
Thanks for the fixes, this looks good. CI failures are timeouts. |