Skip to content

Commit 0c1681e

Browse files
committed
Initialize CallTarget for TpStopIterNext.NEXT_NOT_IMPLEMENTED
1 parent 8517f1f commit 0c1681e

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type/TpSlots.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,6 +1720,7 @@ public static void setSlots(PythonAbstractClass klass, TpSlots slots) {
17201720
}
17211721

17221722
public static void initializeBuiltinSlots(PythonLanguage language) {
1723+
TpSlotIterNext.initNextNotImplementedCallTarget(language);
17231724
for (PythonBuiltinClassType klass : PythonBuiltinClassType.VALUES) {
17241725
for (TpSlotMeta slotMeta : TpSlotMeta.VALUES) {
17251726
TpSlot slotValue = slotMeta.getValue(klass.getDeclaredSlots());

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type/slots/TpSlotIterNext.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ private TpSlotIterNext() {
9191
/** Equivalent of {@code _PyObject_NextNotImplemented} */
9292
public static final TpSlot NEXT_NOT_IMPLEMENTED = TpSlotIterNextSlotsGen.SLOTS.tp_iternext();
9393

94+
public static void initNextNotImplementedCallTarget(PythonLanguage language) {
95+
((TpSlotIterNext.TpSlotIterNextBuiltin<?>) NEXT_NOT_IMPLEMENTED).initialize(language);
96+
}
97+
9498
public abstract static class TpSlotIterNextBuiltin<T extends PythonUnaryBuiltinNode> extends TpSlotBuiltin<T> {
9599
final int callTargetIndex = TpSlotBuiltinCallTargetRegistry.getNextCallTargetIndex();
96100

0 commit comments

Comments
 (0)