www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16208] New: moduleinfo importedModules contains needless


          Issue ID: 16208
           Summary: moduleinfo importedModules contains needless
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: schveiguy yahoo.com

When trying to debug a module cycle issue, I stumbled across the realization
that each time a module imports another module, that reference is added to the
list of imported modules, even if it's already there.

The compiler should eliminate these duplicates, as it slows down runtime
startup during module cycle detection, and bloats the executable.

Especially when idiomatic D code is supposed to import locally only when
needed. Each of these local imports adds another reference.

Jun 27 2016