Bug 4278 – allow inlining of super calls (undo limitations of bug3500's fix)

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2010-06-05T14:47:52Z
Last change time
2021-03-17T14:28:57Z
Keywords
patch, performance
Assigned to
No Owner
Creator
Brad Roberts
Depends on
4728

Attachments

IDFilenameSummaryContent-TypeSize
655bug3500.part2.diffallow inlining of super.id(arg) callstext/plain2411

Comments

Comment #0 by braddr — 2010-06-05T14:47:52Z
Created attachment 655 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 by bugzilla — 2010-08-28T12:25:06Z
Comment #2 by bugzilla — 2010-08-29T14:53:43Z
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 by rayerd.wiz — 2010-08-29T17:07:10Z
Probably depends on 4728
Comment #4 by hsteoh — 2014-08-09T14:50:12Z
ping Does this bug still apply to D2?
Comment #5 by razvan.nitu1305 — 2021-03-17T14:28:57Z
No, the patch has been implemented [1]. Closing as fixed. [1] https://github.com/dlang/dmd/blob/master/src/dmd/expressionsem.d#L11831