D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4278 - allow inlining of super calls (undo limitations of bug3500's fix)
Summary: allow inlining of super calls (undo limitations of bug3500's fix)
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other All
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, performance
Depends on: 4728
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-05 14:47 UTC by Brad Roberts
Modified: 2021-03-17 14:28 UTC (History)
5 users (show)

See Also:


Attachments
allow inlining of super.id(arg) calls (2.35 KB, patch)
2010-06-05 14:47 UTC, Brad Roberts
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Brad Roberts 2010-06-05 14:47:52 UTC
Created attachment 655 [details]
allow inlining of super.id(arg) calls

Bug 3500 reported bugginess with the inlining of super.id(args).  The fix there
was to not inline that style call.  The patch attached to this report removes
that block and fixes the underlying problem.

Now, the semantic pass rewrites super.id(args) to a direct call to the
baseclass.id(args).
Comment 1 Walter Bright 2010-08-28 12:25:06 UTC
http://www.dsource.org/projects/dmd/changeset/640
Comment 2 Walter Bright 2010-08-29 14:53:43 UTC
This patch produced a regression (from DFL):

---------
// main.d
import other;

class Foo : OtherModuleClass
{
        override void foo()
        {
                super.foo();
        }
}

void main()
{
        new Foo();
}

-----------
// other.d
class OtherModuleClass
{
        protected void foo()
        {
        }
}
-----------


> >dmd main other
main.d(8): Error: class other.OtherModuleClass member foo is not accessible

Reported by SHOO.
Comment 3 Haruki Shigemori 2010-08-29 17:07:10 UTC
Probably depends on 4728
Comment 4 hsteoh 2014-08-09 14:50:12 UTC
ping

Does this bug still apply to D2?
Comment 5 RazvanN 2021-03-17 14:28:57 UTC
No, the patch has been implemented [1]. Closing as fixed.

[1] https://github.com/dlang/dmd/blob/master/src/dmd/expressionsem.d#L11831