Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Removed unintended changes from core/base.py #85

Merged
merged 1 commit into from
Nov 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions numba/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,6 @@ def _load_global_helpers():
ll.add_symbol("PyExc_%s" % (obj.__name__), id(obj))


def print_overloads(overloads):
for o in overloads:
print(type(o), o)

def print_defns(defns):
for k,v in defns.items():
print("Key:", k, v, type(k), type(v))
print_overloads(v.versions)

class BaseContext(object):
"""

Expand Down Expand Up @@ -435,9 +426,7 @@ def get_external_function_type(self, fndesc):
return fnty

def declare_function(self, module, fndesc):
#print("base.py: declare_function", module, "\n\targs:", fndesc.args, "\n\trestype:", fndesc.restype, "\n\targtypes:", fndesc.argtypes, fndesc.mangled_name, fndesc.noalias)
fnty = self.call_conv.get_function_type(fndesc.restype, fndesc.argtypes)
#print("fnty:", fnty)
fn = module.get_or_insert_function(fnty, name=fndesc.mangled_name)
self.call_conv.decorate_function(fn, fndesc.args, fndesc.argtypes, noalias=fndesc.noalias)
if fndesc.inline:
Expand Down Expand Up @@ -553,21 +542,14 @@ def get_function(self, fn, sig, _firstcall=True):
The return value is a callable with the signature (builder, args).
"""
assert sig is not None
# print("get_function", fn, sig, type(fn), type(sig))
sig = sig.as_function()
# print("get_function", sig, type(sig))
if isinstance(fn, (types.Function, types.BoundFunction,
types.Dispatcher)):
key = fn.get_impl_key(sig)
overloads = self._defns[key]
# print("function or boundfunction or dispatcher")
else:
key = fn
overloads = self._defns[key]
# print("other")
# print("overloads", overloads)
# print_overloads(overloads.versions)
# print_defns(self._defns)

try:
return _wrap_impl(overloads.find(sig.args), self, sig)
Expand Down