[Issue 6192] std.algorithm.sort performance

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6192

--- Comment #9 from Andrei Alexandrescu  ---
https://github.com/dlang/phobos/pull/4826

--


[Issue 16567] dmd -wi leads compilation to get stuck when compiling lots of files

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16567

Timothee Cour  changed:

   What|Removed |Added

 CC||timothee.co...@gmail.com

--- Comment #1 from Timothee Cour  ---
more details:
this happened with:

```
dmd -c -o- -deps -g -vcolumns -color=on -wi $lots_of_files
```

Hard to reduce because there are lots of files.
After removing `-wi`, the command completes fast.

--


[Issue 15989] Initializing manifest constants with CTFE allocated data

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

--- Comment #10 from Walter Bright  ---
This needs more work for the PR.

--


[Issue 16567] New: dmd -wi leads compilation to get stuck when compiling lots of files

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16567

  Issue ID: 16567
   Summary: dmd -wi leads compilation to get stuck when compiling
lots of files
   Product: D
   Version: D2
  Hardware: x86
OS: Mac OS X
Status: NEW
  Severity: blocker
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: timothee.co...@gmail.com

```
(lldb) process attach --pid 34776
Process 34776 stopped
* thread #1: tid = 0xddb6f4, 0x7fff884fd612 libsystem_kernel.dylib
__write_nocancel + 10, stop reason = signal SIGSTOP
frame #0: 0x7fff884fd612 libsystem_kernel.dylib __write_nocancel + 10
libsystem_kernel.dylib`__write_nocancel:
->  0x7fff884fd612 <+10>: jae0x7fff884fd61c; <+20>
0x7fff884fd614 <+12>: movq   %rax, %rdi
0x7fff884fd617 <+15>: jmp0x7fff884f77cd; cerror_nocancel
0x7fff884fd61c <+20>: retq

(lldb) bt
* thread #1: tid = 0xddb6f4, 0x7fff884fd612 libsystem_kernel.dylib
__write_nocancel + 10, stop reason = signal SIGSTOP
  * frame #0: 0x7fff884fd612 libsystem_kernel.dylib __write_nocancel + 10
frame #1: 0x7fff8a7441fa libsystem_c.dylib _swrite + 87
frame #2: 0x7fff8a73edc4 libsystem_c.dylib __sfvwrite + 194
frame #3: 0x7fff8a73da84 libsystem_c.dylib fputs + 102
frame #4: 0x00010009967a dmd verrorPrint(Loc, COLOR, char const*, char
const*, __va_list_tag*, char const*, char const*) + 226
frame #5: 0x00010016b4b9 dmd Statement::warning(char const*, ...) + 241
frame #6: 0x00010016bcf3 dmd
Statement::blockExit::BlockExit::visit(CompoundStatement*) + 515
frame #7: 0x00010016fc8a dmd CompoundStatement::accept(Visitor*) + 26
frame #8: 0x00010016b9dd dmd Statement::blockExit(FuncDeclaration*,
bool) + 85
frame #9: 0x00010016be05 dmd
Statement::blockExit::BlockExit::visit(ScopeStatement*) + 37
frame #10: 0x000100170742 dmd ScopeStatement::accept(Visitor*) + 26
frame #11: 0x00010016b9dd dmd Statement::blockExit(FuncDeclaration*,
bool) + 85
frame #12: 0x00010016c27d dmd
Statement::blockExit::BlockExit::visit(CaseStatement*) + 37
frame #13: 0x00010017b385 dmd CaseStatement::accept(Visitor*) + 29
frame #14: 0x00010016b9dd dmd Statement::blockExit(FuncDeclaration*,
bool) + 85
frame #15: 0x00010016bd0e dmd
Statement::blockExit::BlockExit::visit(CompoundStatement*) + 542
frame #16: 0x00010016fc8a dmd CompoundStatement::accept(Visitor*) + 26
frame #17: 0x00010016b9dd dmd Statement::blockExit(FuncDeclaration*,
bool) + 85
frame #18: 0x00010016be05 dmd
Statement::blockExit::BlockExit::visit(ScopeStatement*) + 37
frame #19: 0x000100170742 dmd ScopeStatement::accept(Visitor*) + 26
frame #20: 0x00010016b9dd dmd Statement::blockExit(FuncDeclaration*,
bool) + 85
frame #21: 0x00010017aa0e dmd SwitchStatement::semantic(Scope*) + 2678
frame #22: 0x00010016ebb7 dmd CompoundStatement::semantic(Scope*) + 519
frame #23: 0x0001000d6254 dmd FuncDeclaration::semantic3(Scope*) + 6012
frame #24: 0x0001000920b5 dmd TemplateInstance::semantic3(Scope*) +
1173
frame #25: 0x0001000961a6 dmd TemplateInstance::trySemantic3(Scope*) +
94
frame #26: 0x00010009135e dmd TemplateInstance::semantic(Scope*,
Array*) + 4566
frame #27: 0x0001000916a8 dmd TemplateInstance::semantic(Scope*) + 16
frame #28: 0x0001000ab477 dmd ScopeExp::semantic(Scope*) + 999
frame #29: 0x0001000b8eb6 dmd CallExp::semantic(Scope*) + 1110
frame #30: 0x00010016d691 dmd ExpStatement::semantic(Scope*) + 49
frame #31: 0x00010016ebb7 dmd CompoundStatement::semantic(Scope*) + 519
frame #32: 0x000100170606 dmd ScopeStatement::semantic(Scope*) + 550
frame #33: 0x000100178c16 dmd IfStatement::semantic(Scope*) + 1446
frame #34: 0x00010016ebb7 dmd CompoundStatement::semantic(Scope*) + 519
frame #35: 0x000100170606 dmd ScopeStatement::semantic(Scope*) + 550
frame #36: 0x00010017027b dmd UnrolledLoopStatement::semantic(Scope*) +
531
frame #37: 0x000100172883 dmd ForeachStatement::semantic(Scope*) + 4915
frame #38: 0x00010016ebb7 dmd CompoundStatement::semantic(Scope*) + 519
frame #39: 0x0001000d6254 dmd FuncDeclaration::semantic3(Scope*) + 6012
frame #40: 0x0001000aeaf6 dmd FuncExp::semantic(Scope*) + 846
frame #41: 0x000100175443 dmd ForeachStatement::semantic(Scope*) +
16115
frame #42: 0x00010016ebb7 dmd CompoundStatement::semantic(Scope*) + 519
frame #43: 0x000100170606 dmd ScopeStatement::semantic(Scope*) + 550
frame #44: 0x00010017b2ad dmd CaseStatement::semantic(Scope*) + 1253
frame #45: 0x00010016ebb7 dmd CompoundStatement::semantic(Scope*) + 519
frame #46: 0x000100170606 dmd ScopeStatement::semantic(Scope*) + 550
frame #47: 

[Issue 16566] hasLength should enforce that length has type size_t

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16566

Sophie  changed:

   What|Removed |Added

 CC||meapineap...@gmail.com

--- Comment #1 from Sophie  ---
What is the rationale for disallowing other numeric primitives for length, or
types that act like numeric primitives?

--


[Issue 16566] New: hasLength should enforce that length has type size_t

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16566

  Issue ID: 16566
   Summary: hasLength should enforce that length has type size_t
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: and...@erdani.com

Currently hasLength verifies that length has the exact type size_t. Currently
it's more permissive allowing anything implicitly convertible to ulong. See
some discussion in https://github.com/dlang/phobos/pull/4815.

There is a gray area of 64-bit length on 32-bit system but I doubt much code
could work that way.

--


[Issue 15989] Initializing manifest constants with CTFE allocated data

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

Walter Bright  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #9 from Walter Bright  ---
https://github.com/dlang/dmd/pull/6164

--


[Issue 15989] Initializing manifest constants with CTFE allocated data

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

Walter Bright  changed:

   What|Removed |Added

Summary|Win32 optimizer bug |Initializing manifest
   ||constants with CTFE
   ||allocated data

--


[Issue 15989] Win32 optimizer bug

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

--- Comment #8 from uplink.co...@googlemail.com ---
No. It has to be static immutable. 
Otherwise it will not be there at CT.

--


[Issue 15989] Win32 optimizer bug

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

--- Comment #7 from Vladimir Panteleev  ---
Workaround: use "static const" instead of "enum"?

--


[Issue 15989] Win32 optimizer bug

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

Walter Bright  changed:

   What|Removed |Added

   Keywords|wrong-code  |accepts-invalid

--


[Issue 15989] Win32 optimizer bug

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

--- Comment #6 from uplink.co...@googlemail.com ---
Yes this code is invalid.
finding this condition will involve scanning the members of a struct for
classReferances and disallowing the creation of a manifest consntant if there
are those in there.

--


[Issue 15989] Win32 optimizer bug

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

--- Comment #5 from Walter Bright  ---
For example:

 void main()
 {
enum pi = new int(3);
*pi = 4;
 }

emits:

  foo4.d(4): Error: cannot use non-constant CTFE pointer in an initializer
'&[3][0]'

This error message should be printed for the bug case.

--


[Issue 15989] Win32 optimizer bug

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

--- Comment #4 from Walter Bright  ---
The trouble appears to be the line:

new ShiftOr();

which is evaluated at compile time (because of the enum) yet is expected to
exist at runtime. Creating items on the GC heap with operator new does not
transfer from compile time to runtime. I don't see how this can possibly work,
and the compiler should issue an error message for it.

It has nothing to do with optimizer flags, as it doesn't work regardless, it
just happens to fail in a way that doesn't seg fault when -O is not specified.

--


[Issue 15989] Win32 optimizer bug

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

uplink.co...@googlemail.com changed:

   What|Removed |Added

 CC||uplink.co...@googlemail.com

--- Comment #3 from uplink.co...@googlemail.com ---
This most likely happens as a consequence of not copying in optimize.d line
237-238.

--


[Issue 15989] Win32 optimizer bug

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
Simplified example:

interface Kickstart{
bool foo( int );
}

class ShiftOr : Kickstart
{
bool foo( int )
{
return false;
}
}

struct Regex
{
Kickstart kickstart;
}

Regex regex()
{
return Regex(new ShiftOr());
}

void main()
{
enum ctRegex = regex();
Regex r = ctRegex;
r.kickstart.foo(7);
}

--


[Issue 15989] Win32 optimizer bug

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15989

Vladimir Panteleev  changed:

   What|Removed |Added

   Keywords||wrong-code
 CC||thecybersha...@gmail.com

--


[Issue 16170] std.algorithm.sorting.partition has many issues

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16170

--- Comment #1 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/e21f2729ba3f99605c7db5572c96ad83b1b7ae86
[Issue 16170] Seperate std.algorithm.sorting.partition into various overloads
in order to facilitate further improvements

https://github.com/dlang/phobos/commit/b2978040ca3c0f061f283e4f433507b635337efb
Merge pull request #4429 from JackStouffer/issue16170

[Issue 16170] Partial Fix for Broken std.algorithm.sorting.partition

--


[Issue 16473] operator overloading is broken

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16473

--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/545dfd08d705574928eef96bffb914b646aa74e0
workaround for Issue 16473

https://github.com/dlang/phobos/commit/302632968f164867e4aa08f1cf8b1429a43cf2a6
Merge pull request #4820 from 9il/workaround16473

workaround for Issue 16473

--


[Issue 16547] -betterC switch no longer removes druntime symbols

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16547

Vladimir Panteleev  changed:

   What|Removed |Added

 CC||thecybersha...@gmail.com

--- Comment #1 from Vladimir Panteleev  ---
(In reply to Gary Willoughby from comment #0)
> When building an executable and using the -betterC flag using DMD v2.070.0
> the symbols emitted from the above program are thus:
> 
>  T _main
>  U _printf

I can't reproduce this.

$ uname -a
Linux home.thecybershadow.net 4.7.4-1-ARCH #1 SMP PREEMPT Thu Sep 15 15:24:29
CEST 2016 x86_64 GNU/Linux

$ dmd --version
DMD64 D Compiler v2.070.0
Copyright (c) 1999-2015 by Digital Mars written by Walter Bright

$ cat test.d   
import core.stdc.stdio;

extern(C) void main()
{
printf("Hello World!\n");
}

$ dmd -betterC test

$ nm test | wc -l  
1814

--


[Issue 16544] Add File.reopen

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16544

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 16544] Add File.reopen

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16544

--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/d63572fd775920b8d78c263c95ac45f387c09ba6
Fix Issue 16544 - Add File.reopen

https://github.com/dlang/phobos/commit/59b6392f2067d841385abd37c9eba45d18eaf7b7
Merge pull request #4822 from CyberShadow/pull-20160926-152950

Fix Issue 16544 - Add File.reopen

--


[Issue 15984] [REG2.071] Interface contracts retrieve garbage instead of parameters

2016-09-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15984

MichaelZ  changed:

   What|Removed |Added

 CC||dlang@bregalad.de

--