Bug 13246 – _d_invariant called on final class without invariants

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-03T19:39:30Z
Last change time
2024-12-13T18:23:23Z
Keywords
contracts, performance
Assigned to
No Owner
Creator
Orvid King
Moved to GitHub: dmd#17673 →

Comments

Comment #0 by blah38621 — 2014-08-03T19:39:30Z
Currently, DMD will generate a call to _d_invariant for a virtual class member even if that class is final, and neither it, nor any of it's ancestors, define an invariant. This call, for obvious reasons, is only present in debug builds, but really isn't needed. As a further note, we could probably remove almost all calls to this in the average debug build if we were doing a whole program compilation. The compile-time cost for it would likely not be worth it as it's a debug build.
Comment #1 by robert.schadek — 2024-12-13T18:23:23Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17673 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB