Commit a951853a authored by Kevin Modzelewski's avatar Kevin Modzelewski

More small fixes

parent 05b35703
......@@ -421,6 +421,7 @@ public:
if (o->cls == unicode_cls) {
o = PyUnicode_AsUTF8String(o);
RELEASE_ASSERT(o, "");
AUTO_DECREF(o);
auto r = new AST_Str();
r->str_data = static_cast<BoxedString*>(o)->s();
......
......@@ -552,9 +552,10 @@ public:
// to a function which could throw an exception, inspect the python call frame,...
// Only patchpoint don't need to set the current statement because the stmt will be inluded in the stackmap args.
void emitSetCurrentStmt(AST_stmt* stmt) {
getBuilder()->CreateStore(stmt ? embedRelocatablePtr(stmt, g.llvm_aststmt_type_ptr)
: getNullPtr(g.llvm_aststmt_type_ptr),
irstate->getStmtVar());
if (stmt)
getBuilder()->CreateStore(stmt ? embedRelocatablePtr(stmt, g.llvm_aststmt_type_ptr)
: getNullPtr(g.llvm_aststmt_type_ptr),
irstate->getStmtVar());
}
llvm::Instruction* createCall(const UnwindInfo& unw_info, llvm::Value* callee,
......
......@@ -3973,6 +3973,9 @@ type_clear(PyTypeObject *type)
}
int HCAttrs::traverse(visitproc visit, void* arg) noexcept {
if (!hcls)
return 0;
int nattrs = hcls->attributeArraySize();
for (int i = 0; i < nattrs; i++) {
Py_VISIT(attr_list->attrs[i]);
......@@ -4845,7 +4848,7 @@ extern "C" void Py_Finalize() noexcept {
PRINT_TOTAL_REFS();
#ifdef Py_REF_DEBUG
#ifdef Py_TRACE_REFS
if (_Py_RefTotal > 0)
if (_Py_RefTotal != 0)
_Py_PrintReferenceAddressesCapped(stderr, 10);
#endif
......
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