Jump to page: 1 2
Thread overview
[Issue 13242] imported aliases should be analyzed lazily
Aug 02, 2014
Martin Nowak
Aug 02, 2014
Walter Bright
Aug 04, 2014
Martin Nowak
Aug 05, 2014
Kenji Hara
Dec 18, 2014
Dragos Carp
Dec 18, 2014
Dragos Carp
May 12, 2015
Martin Nowak
Apr 22, 2016
Kenji Hara
May 23, 2017
Vladimir Panteleev
May 24, 2017
anonymous4
August 02, 2014
https://issues.dlang.org/show_bug.cgi?id=13242

--- Comment #1 from Martin Nowak <code@dawg.eu> ---
See issue 13232 for 2 slowdown examples in Phobos.

--
August 02, 2014
https://issues.dlang.org/show_bug.cgi?id=13242

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com
           Hardware|x86_64                      |All
            Version|unspecified                 |D2
                 OS|Linux                       |All

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
I have long wanted the compiler to go "full lazy" on semantic analysis, meaning it only does semantic analysis on imported symbols on demand.

It does it now for enums, but not for other symbols.

--
August 04, 2014
https://issues.dlang.org/show_bug.cgi?id=13242

--- Comment #3 from Martin Nowak <code@dawg.eu> ---
I (In reply to Walter Bright from comment #2)
> I have long wanted the compiler to go "full lazy" on semantic analysis, meaning it only does semantic analysis on imported symbols on demand.
> 
> It does it now for enums, but not for other symbols.

Right, so aliases would make for a good second case :).

--
August 05, 2014
https://issues.dlang.org/show_bug.cgi?id=13242

--- Comment #4 from Kenji Hara <k.hara.pg@gmail.com> ---
(In reply to Martin Nowak from comment #0)
> The following problem is pretty frequent.
> 
> lib.d
> 
> alias apiSymbol = expensiveTemplate!SomeArgs;
> void cheapFunc() {}
> 
> client.d
> import lib;
> void main() { cheapFunc(); }
> 
> Although the client only uses cheapFunc the compiler will still run semantic
> on the expensive template instance. This is a major slowdown and it also
> makes it useless to localize additional imports in the template.
> The semantic of the aliased symbol should be deferred until the alias is
> actually used. Even if it's used we should not generate code for the
> template, because that was already done when compiling lib. To allow this
> deferring should only happen for aliases in non-root modules.
> 
> I think it a sane proposal and it will have a big impact on compile times.

If the instantiation expensiveTemplate!SomeArgs contains some errors but apiSymbol is not used, the error won't be reported? It sounds not good.

--
December 18, 2014
https://issues.dlang.org/show_bug.cgi?id=13242

Dragos Carp <dragoscarp@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dragoscarp@gmail.com

--
December 18, 2014
https://issues.dlang.org/show_bug.cgi?id=13242

Dragos Carp <dragoscarp@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|dragoscarp@gmail.com        |

--
May 12, 2015
https://issues.dlang.org/show_bug.cgi?id=13242

--- Comment #5 from Martin Nowak <code@dawg.eu> ---
(In reply to Kenji Hara from comment #4)
> (In reply to Martin Nowak from comment #0)
> If the instantiation expensiveTemplate!SomeArgs contains some errors but
> apiSymbol is not used, the error won't be reported? It sounds not good.

It's fine, you'll get the error when compiling the library.

--
April 22, 2016
https://issues.dlang.org/show_bug.cgi?id=13242

Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #6 from Kenji Hara <k.hara.pg@gmail.com> ---
It's easy to do.

https://github.com/dlang/dmd/pull/5690

--
April 22, 2016
https://issues.dlang.org/show_bug.cgi?id=13242

--- Comment #7 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/a0e89b14eadb295b8578df7f49c193bca1525526 fix Issue 13242 - imported aliases should be analyzed lazily

https://github.com/dlang/dmd/commit/e2dfb4a3d87dd6e4e4dc006064ddf4ac5b6880a4 Merge pull request #5690 from 9rnsr/fix13242

Issue 13242 - imported aliases should be analyzed lazily

--
April 22, 2016
https://issues.dlang.org/show_bug.cgi?id=13242

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
« First   ‹ Prev
1 2