Commit 2c9e575d authored by Boxiang Sun's avatar Boxiang Sun

[WIP]Oct 25 fixing

parent 919582f2
...@@ -374,8 +374,8 @@ static Box* instanceGetattributeSimple(BoxedInstance* inst, BoxedString* attr_st ...@@ -374,8 +374,8 @@ static Box* instanceGetattributeSimple(BoxedInstance* inst, BoxedString* attr_st
Box* r = inst->getattr<rewritable>(attr_str, rewrite_args); Box* r = inst->getattr<rewritable>(attr_str, rewrite_args);
if (r) { if (r) {
if (rewrite_args) // if (rewrite_args)
rewrite_args->assertReturnConvention(ReturnConvention::HAS_RETURN); // rewrite_args->assertReturnConvention(ReturnConvention::HAS_RETURN);
return incref(r); return incref(r);
} }
......
...@@ -1239,6 +1239,10 @@ template <Rewritable rewritable> BORROWED(Box*) Box::getattr(BoxedString* attr, ...@@ -1239,6 +1239,10 @@ template <Rewritable rewritable> BORROWED(Box*) Box::getattr(BoxedString* attr,
assert(attr->data()[attr->size()] == '\0'); assert(attr->data()[attr->size()] == '\0');
Box* r = PyDict_GetItem(d, attr); Box* r = PyDict_GetItem(d, attr);
// r can be NULL if the item didn't exist // r can be NULL if the item didn't exist
// if (r && rewrite_args)
// rewrite_args->setReturn(r, ReturnConvention::HAS_RETURN);
// else
// rewrite_args = NULL;
return r; return r;
} }
......
...@@ -178,9 +178,10 @@ template <ExceptionStyle S> BORROWED(BoxedClass*) superCheck(BoxedClass* type, B ...@@ -178,9 +178,10 @@ template <ExceptionStyle S> BORROWED(BoxedClass*) superCheck(BoxedClass* type, B
} }
static BoxedString* class_str = getStaticString("__class__"); static BoxedString* class_str = getStaticString("__class__");
Box* class_attr = obj->getattr(class_str); // Box* class_attr = obj->getattr(class_str);
PyObject* class_attr = PyObject_GetAttr(obj, class_str);
if (class_attr && PyType_Check(class_attr) && class_attr != obj->cls) { if (class_attr && PyType_Check(class_attr) && class_attr != obj->cls) {
Py_FatalError("warning: this path never tested"); // blindly copied from CPython // Py_FatalError("warning: this path never tested"); // blindly copied from CPython
return static_cast<BoxedClass*>(class_attr); return static_cast<BoxedClass*>(class_attr);
} }
......
...@@ -68,11 +68,11 @@ modified_list = [ ...@@ -68,11 +68,11 @@ modified_list = [
("Acquisition-2.13.9", "https://lab.nexedi.com/Daetalus/Acquisition-2.13.9/repository/archive.zip?ref=python_implementation"), ("Acquisition-2.13.9", "https://lab.nexedi.com/Daetalus/Acquisition-2.13.9/repository/archive.zip?ref=python_implementation"),
("AccessControl-2.13.14", "https://lab.nexedi.com/Daetalus/AccessControl-2.13.14/repository/archive.zip?ref=python_implementation"), ("AccessControl-2.13.14", "https://lab.nexedi.com/Daetalus/AccessControl-2.13.14/repository/archive.zip?ref=python_implementation"),
("ExtensionClass-2.13.2", "https://lab.nexedi.com/Daetalus/ExtensionClass-2.13.2/repository/archive.zip?ref=pyston_patch"), ("ExtensionClass-2.13.2", "https://lab.nexedi.com/Daetalus/ExtensionClass-2.13.2/repository/archive.zip?ref=pyston_patch"),
("zope.container-3.11.2", "https://lab.nexedi.com/Daetalus/zope.container-3.11.2/repository/archive.zip?ref=master"), ("zope.container-3.11.2", "https://lab.nexedi.com/Daetalus/zope.container-3.11.2/repository/archive.zip?ref=pyston_patch"),
("zope.proxy-3.6.1", "https://lab.nexedi.com/Daetalus/zope.proxy-3.6.1/repository/archive.zip?ref=master"), ("zope.proxy-3.6.1", "https://lab.nexedi.com/Daetalus/zope.proxy-3.6.1/repository/archive.zip?ref=pyston_patch"),
("zope.security-3.7.4", "https://lab.nexedi.com/Daetalus/zope.security-3.7.4/repository/archive.zip?ref=master"), ("zope.security-3.7.4", "https://lab.nexedi.com/Daetalus/zope.security-3.7.4/repository/archive.zip?ref=pyston_patch"),
("DocumentTemplate-2.13.2", "https://lab.nexedi.com/Daetalus/DocumentTemplate-2.13.2/repository/archive.zip?ref=master"), ("DocumentTemplate-2.13.2", "https://lab.nexedi.com/Daetalus/DocumentTemplate-2.13.2/repository/archive.zip?ref=pyston_implementation"),
("RestrictedPython-3.6.0", "https://lab.nexedi.com/Daetalus/RestrictedPython-3.6.0/repository/archive.zip?ref=master"), ("RestrictedPython-3.6.0", "https://lab.nexedi.com/Daetalus/RestrictedPython-3.6.0/repository/archive.zip?ref=pyston_patch"),
("ZODB3-3.10.5", "https://lab.nexedi.com/Daetalus/ZODB3-3.10.5/repository/archive.zip?ref=pyston_patch"), ("ZODB3-3.10.5", "https://lab.nexedi.com/Daetalus/ZODB3-3.10.5/repository/archive.zip?ref=pyston_patch"),
("Zope2-2.13.24", "https://lab.nexedi.com/Daetalus/Zope2-2.13.24/repository/archive.zip?ref=python_implementation"),] ("Zope2-2.13.24", "https://lab.nexedi.com/Daetalus/Zope2-2.13.24/repository/archive.zip?ref=python_implementation"),]
......
# expected: fail # skip-if:True
# - not implemented yet # - not implemented yet
import sys import sys
......
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