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

make None.__class__ work in JIT mode

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