Commit 05edd7f6 authored by Kevin Modzelewski's avatar Kevin Modzelewski

misc fixes

parent 0bae98b5
......@@ -2627,7 +2627,8 @@ private:
llvm::Value* v;
if (phi_type == phi_type->getBoxType()) {
v = emitter.getNone()->getValue();
_setVRegIfUserVisible(*it, [&]() { return v; }, NULL);
if (new_state != DEAD)
_setVRegIfUserVisible(*it, [&]() { return v; }, NULL);
} else {
v = llvm::UndefValue::get(phi_type->llvmType());
}
......
......@@ -385,7 +385,7 @@ extern "C" Box* tupleNew(Box* _cls, BoxedTuple* args, BoxedDict* kwargs) {
return BoxedTuple::create(elts.size(), &elts[0], cls);
} else {
if (cls == tuple_cls)
return EmptyTuple;
return incref(EmptyTuple);
return BoxedTuple::create(0, cls);
}
}
......
......@@ -2895,7 +2895,7 @@ static Box* typeAbstractMethods(Box* _type, void*) {
if (!mod) {
raiseExcHelper(AttributeError, "__abstractmethods__");
}
return mod;
return incref(mod);
}
static PyObject* object_new(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept {
......
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