File: 213-Accommodate-multiple-bytecodes-at-block-start-with-no.patch

package info (click to toggle)
numba 0.56.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 23,672 kB
  • sloc: python: 183,651; ansic: 15,370; cpp: 2,259; javascript: 424; sh: 308; makefile: 174
file content (26 lines) | stat: -rw-r--r-- 947 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 4a1031aaf0eda2872748cb92a7df91857aed596e Mon Sep 17 00:00:00 2001
From: Stuart Archibald <stuartarchibald@users.noreply.github.com>
Origin: https://github.com/numba/numba/pull/8639
Date: Mon, 28 Nov 2022 15:48:34 +0000
Subject: [PATCH 13/20] Accommodate multiple bytecodes at block start with no
 line number.

As title.
---
 numba/core/bytecode.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/numba/core/bytecode.py b/numba/core/bytecode.py
index ee51ae79ce4..4f5d449dd04 100644
--- a/numba/core/bytecode.py
+++ b/numba/core/bytecode.py
@@ -246,7 +246,7 @@ def _compute_lineno(cls, table, code):
                 table[adj_offset].lineno = lineno
         # Assign unfilled lineno
         # Start with first bytecode's lineno
-        known = table[_FIXED_OFFSET].lineno
+        known = code.co_firstlineno
         for inst in table.values():
             if inst.lineno >= 0:
                 known = inst.lineno