mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Implement debug info for willset/didset, and teach dispatch to be non-virtual
to didset/will set since we don't drop these in the class vtable. Swift SVN r13056
This commit is contained in:
@@ -800,7 +800,10 @@ public:
|
||||
// FIXME: Or if it's an ObjC method. Extension methods on classes will
|
||||
// hopefully become dynamically dispatched too.
|
||||
if (auto *fd = dyn_cast<FuncDecl>(e->getDecl())) {
|
||||
if (isa<ClassDecl>(fd->getDeclContext()) || fd->isObjC()) {
|
||||
if (fd->isObjC() ||
|
||||
(isa<ClassDecl>(fd->getDeclContext()) &&
|
||||
// didSet and willSet methods can always be directly dispatched.
|
||||
!fd->isDidSetWillSet())) {
|
||||
ApplyExpr *thisCallSite = callSites.back();
|
||||
callSites.pop_back();
|
||||
setSelfParam(gen.emitRValue(thisCallSite->getArg()), thisCallSite);
|
||||
|
||||
Reference in New Issue
Block a user