www.digitalmars.com         C & C++   DMDScript  

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

https://issues.dlang.org/show_bug.cgi?id=16208

          Issue ID: 16208
           Summary: moduleinfo importedModules contains needless
                    duplicates
           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