[Issue 18414] New: More lazy symbol resolvement
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 10 02:31:47 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18414
Issue ID: 18414
Summary: More lazy symbol resolvement
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: greensunny12 at gmail.com
tl;dr: imports could reduce a lot of their overhead if the compiler would
resolve symbols only when required.
foo.d
---
struct Foo
{
import mybigfilewithlotsofctfe;
}
struct Bar;
---
test.d
----
void main()
{
import foo;
Bar b;
}
---
Ideally the compiler wouldn't even look at Foo and thus not open
`mybigfilewithlotsofctfe`.
Note that this is already done if `struct Foo` is a template.
--
More information about the Digitalmars-d-bugs
mailing list