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 27 28 29 30 31 32 33 34 35 36 37 38
|
From: Siu Kwan Lam <1929845+sklam@users.noreply.github.com>
Origin: https://github.com/numba/numba/pull/8545
Date: Fri, 26 Aug 2022 17:40:46 -0500
Subject: Get more jump opcodes
---
numba/core/byteflow.py | 3 +++
numba/core/interpreter.py | 3 +++
2 files changed, 6 insertions(+)
diff --git a/numba/core/byteflow.py b/numba/core/byteflow.py
index 981fc45..ad33ca5 100644
--- a/numba/core/byteflow.py
+++ b/numba/core/byteflow.py
@@ -644,6 +644,9 @@ class TraceRunner(object):
op_JUMP_IF_FALSE_OR_POP = _op_JUMP_IF_OR_POP
op_JUMP_IF_TRUE_OR_POP = _op_JUMP_IF_OR_POP
+ def op_POP_JUMP_FORWARD_IF_FALSE(self, state, inst):
+ self._op_POP_JUMP_IF(state, inst)
+
def op_JUMP_FORWARD(self, state, inst):
state.append(inst)
state.fork(pc=inst.get_jump_target())
diff --git a/numba/core/interpreter.py b/numba/core/interpreter.py
index 16c2b4e..de3c93d 100644
--- a/numba/core/interpreter.py
+++ b/numba/core/interpreter.py
@@ -2696,6 +2696,9 @@ class Interpreter(object):
def op_JUMP_IF_TRUE(self, inst, pred):
self._op_JUMP_IF(inst, pred=pred, iftrue=True)
+ def op_POP_JUMP_FORWARD_IF_FALSE(self, inst, pred):
+ self._op_JUMP_IF(inst, pred=pred, iftrue=False)
+
def op_POP_JUMP_IF_FALSE(self, inst, pred):
self._op_JUMP_IF(inst, pred=pred, iftrue=False)
|