Skip to content

Commit 2d63784

Browse files
Fix up bug in lineinfo wrt decref
1 parent e8a9230 commit 2d63784

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎numba/core/lowering.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,11 @@ def decref(self, typ, val):
14071407
if not self.context.enable_nrt:
14081408
return
14091409

1410-
self.context.nrt.decref(self.builder, typ, val)
1410+
# do not associate decref with "use", it creates "jumpy" line info as
1411+
# the decrefs are usually where the ir.Del nodes are, which is at the
1412+
# end of the block.
1413+
with debuginfo.suspend_emission(self.builder):
1414+
self.context.nrt.decref(self.builder, typ, val)
14111415

14121416

14131417
def _lit_or_omitted(value):

0 commit comments

Comments
 (0)