Commit 1519fcfd authored by Michael Arntzenius's avatar Michael Arntzenius

make None.__class__ work in JIT mode

parent 0cfb2dff
......@@ -1440,7 +1440,7 @@ public:
CompilerType* getattrType(const std::string* attr, bool cls_only) override {
// Any changes here need to be mirrored in getattr()
if (canStaticallyResolveGetattrs()) {
Box* rtattr = cls->getattr(*attr);
Box* rtattr = typeLookup(cls, *attr, nullptr);
if (rtattr == NULL)
return UNDEF;
......@@ -1466,7 +1466,7 @@ public:
const std::string* attr, bool cls_only) override {
// Any changes here need to be mirrored in getattrType()
if (canStaticallyResolveGetattrs()) {
Box* rtattr = cls->getattr(*attr);
Box* rtattr = typeLookup(cls, *attr, nullptr);
if (rtattr == NULL) {
llvm::CallSite call = emitter.createCall2(info.unw_info, g.funcs.raiseAttributeErrorStr,
getStringConstantPtr(std::string(getNameOfClass(cls)) + "\0"),
......
print None.__class__
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