Commit 7b75f912 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Enable runtime ics for hasnext uses that used to get patchpoints

parent b905e1e0
......@@ -709,10 +709,9 @@ static PyObject* slot_tp_iternext(PyObject* self) noexcept {
static bool slotTppHasnext(PyObject* self) {
static PyObject* hasnext_str;
Box* r = call_method(self, "__hasnext__", &hasnext_str, "()");
if (!r)
throwCAPIException();
return nonzero(r);
Box* r = self->hasnextOrNullIC();
assert(r);
return r->nonzeroIC();
}
static PyObject* slot_tp_descr_get(PyObject* self, PyObject* obj, PyObject* type) noexcept {
......
......@@ -710,6 +710,7 @@ ConcreteCompilerVariable* UnknownType::nonzero(IREmitter& emitter, const OpInfo&
ConcreteCompilerVariable* UnknownType::hasnext(IREmitter& emitter, const OpInfo& info, ConcreteCompilerVariable* var) {
bool do_patchpoint = ENABLE_ICS && !info.isInterpreted();
do_patchpoint = false; // we are currently using runtime ics for this
llvm::Value* rtn_val;
if (do_patchpoint) {
ICSetupInfo* pp = createHasnextIC(info.getTypeRecorder());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment