Commit 39732d08 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Fix a couple slice issues

parent e25ad306
......@@ -350,6 +350,7 @@ public:
llvm::Value* r = emitter.createCall3(info.unw_info, g.funcs.apply_slice, var->getValue(), cstart,
cstop, CAPI, getNullPtr(g.llvm_value_type_ptr));
emitter.setType(r, RefType::OWNED);
emitter.setNullable(r, true);
return new ConcreteCompilerVariable(static_cast<ConcreteCompilerType*>(return_type), r);
} else {
......
......@@ -1088,9 +1088,6 @@ public:
Py_INCREF(lower);
Py_INCREF(upper);
Py_INCREF(step);
ASSERT(lower->cls == none_cls || lower->cls == int_cls, "slice objects are not gc-aware (like in CPython)");
ASSERT(upper->cls == none_cls || upper->cls == int_cls, "slice objects are not gc-aware (like in CPython)");
ASSERT(step->cls == none_cls || step->cls == int_cls, "slice objects are not gc-aware (like in CPython)");
}
static void dealloc(Box* b) noexcept;
......
# expected: reffail
# This throws an exception in the import machinery when we try to access __path__,
# but that should get caught.
......
# expected: reffail
import inspect
def f1(a, b=2, *args, **kw):
......
# expected: reffail
# This would make a good Python quiz:
sl = slice(1,2)
......
# expected: reffail
class Indexable(object):
def __getitem__(self, idx):
print "called getitem on object", idx
......
# expected: reffail
print "-".join(["hello", "world"])
print "-".join(("hello", "world"))
......
# expected: reffail
import subprocess
subprocess.check_call(["true"])
......
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