On Thursday, 4 January 2018 at 17:40:55 UTC, David Nadlinger wrote:

This is slightly inaccurate. Regular stack cleanup doesn't involve the runtime at all; druntime only comes into play for exception handling. Since destructors also need to be run when the scope is left by an exception, they are implemented via `try {} finally {}` internally. The EH part of these depends on druntime, but not the regular path.




This is somewhat confusingly worded as well. It's actually mostly the other way around – druntime depends on ModuleInfo to be emitted, crucially for static constructor, destructors and unit tests to be run. At least without shared libraries in the picture, it would be fairly easy to manually look up the set of ModuleInfos in a druntime-less D program.

 — David

Thanks, David!


  • Re: Releas... H. S. Teoh via Digitalmars-d-announce
  • Re: Releas... Seb via Digitalmars-d-announce
  • Re: Releas... Mike Parker via Digitalmars-d-announce
    • Re: R... Mike Parker via Digitalmars-d-announce
      • R... Joakim via Digitalmars-d-announce
        • ... Mike Parker via Digitalmars-d-announce
      • R... jmh530 via Digitalmars-d-announce
        • ... Mike Parker via Digitalmars-d-announce
          • ... Jack Stouffer via Digitalmars-d-announce
      • R... David Nadlinger via Digitalmars-d-announce
        • ... Mike Parker via Digitalmars-d-announce
        • ... Mike Franklin via Digitalmars-d-announce
  • Re: Releas... Walter Bright via Digitalmars-d-announce
  • Re: Releas... thedeemon via Digitalmars-d-announce
    • Re: R... Rainer Schuetze via Digitalmars-d-announce
      • R... thedeemon via Digitalmars-d-announce
  • Re: Releas... IM via Digitalmars-d-announce
  • Re: Releas... Глеб Куликов/Gleb Kulikov via Digitalmars-d-announce
    • Re: R... rikki cattermole via Digitalmars-d-announce
    • Re: R... user789 via Digitalmars-d-announce
      • R... gleb via Digitalmars-d-announce

Reply via email to