Commit 435131ee authored by Marius Wachtler's avatar Marius Wachtler

recordType: don't call recordType inside getattr rewrite path

this is a duplicate - we will allready emit a call to recordType inside the bjit
parent e4f5dd18
...@@ -2879,13 +2879,7 @@ template <ExceptionStyle S> Box* _getattrEntry(Box* obj, BoxedString* attr, void ...@@ -2879,13 +2879,7 @@ template <ExceptionStyle S> Box* _getattrEntry(Box* obj, BoxedString* attr, void
rewriter->getArg(0)->setType(RefType::BORROWED); rewriter->getArg(0)->setType(RefType::BORROWED);
rewriter->getArg(1)->setType(RefType::BORROWED); rewriter->getArg(1)->setType(RefType::BORROWED);
Location dest; GetattrRewriteArgs rewrite_args(rewriter.get(), rewriter->getArg(0), rewriter->getReturnDestination());
TypeRecorder* recorder = rewriter->getTypeRecorder();
if (recorder)
dest = Location::forArg(1);
else
dest = rewriter->getReturnDestination();
GetattrRewriteArgs rewrite_args(rewriter.get(), rewriter->getArg(0), dest);
val = getattrInternal<S>(obj, attr, &rewrite_args); val = getattrInternal<S>(obj, attr, &rewrite_args);
if (rewrite_args.isSuccessful()) { if (rewrite_args.isSuccessful()) {
...@@ -2914,15 +2908,8 @@ template <ExceptionStyle S> Box* _getattrEntry(Box* obj, BoxedString* attr, void ...@@ -2914,15 +2908,8 @@ template <ExceptionStyle S> Box* _getattrEntry(Box* obj, BoxedString* attr, void
} }
if (return_convention == ReturnConvention::HAS_RETURN if (return_convention == ReturnConvention::HAS_RETURN
|| (S == CAPI && return_convention == ReturnConvention::CAPI_RETURN)) { || (S == CAPI && return_convention == ReturnConvention::CAPI_RETURN))
if (recorder) {
rtn = rewriter->call(false, (void*)recordType,
rewriter->loadConst((intptr_t)recorder, Location::forArg(0)), rtn);
recordType(recorder, val);
}
rewriter->commitReturning(rtn); rewriter->commitReturning(rtn);
}
} }
} else { } else {
val = getattrInternal<S>(obj, attr); val = getattrInternal<S>(obj, attr);
......
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