[Issue 17484] New: high penalty for vbroadcastsd with -mcpu=avx

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17484

  Issue ID: 17484
   Summary: high penalty for vbroadcastsd with -mcpu=avx
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P3
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: c...@dawg.eu

With -mcpu=avx, the compiler emits

  vbroadcastsd ymm2, qword ptr [rsp]

even when initializing only 128-bit wide double2 variables.
This causes a high 50-80 cycle penalty when later some legacy SSE instruction
is used with such a register value (or a derived value), because the CPU does
not know that the upper bits are zero, and apparently preserves them in an
internal register buffer.

https://software.intel.com/en-us/articles/intel-avx-state-transitions-migrating-sse-code-to-avx

We should A not write to 256-bit wide YMM registers when only 128-bit wide XMM
registers are used, and B avoid mixing legacy encoded SSE instructions (movsd)
with vex encoded AVX-128 instructions, i.e. use vmovsd instead of movsd.

--


[Issue 17478] Socket.select return a write status change, but no connection is established.

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17478

spring  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from spring  ---
thanks for your reply.

i misunderstand the c's api select.

Either established or error occurred , a write status will change.

i'm afraid the d document
[https://dlang.org/library/std/socket/socket.select.html] has a little mistake.
for a connecting socket , a writet status change . may establelished or error
occurred.

--


[Issue 17483] New: std.numeric.gcd cannot inline function

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17483

  Issue ID: 17483
   Summary: std.numeric.gcd cannot inline function
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: stanislav.bli...@gmail.com

Not only can it not be inlined, due to this function's implementation it turns
into two function calls when called with const/immutable arguments.

---
import std.traits : isIntegral, Unqual;

pragma(inline, true)
// pasted from std.numeric
T gcd(T)(T a, T b) if (isIntegral!T) {
static if (is(T == const) || is(T == immutable)) {
return gcd!(Unqual!T)(a, b);
} else version(DigitalMars) {
static if (T.min < 0) {
assert(a >= 0 && b >= 0);
}
while (b) {
immutable t = b;
b = a % b;
a = t;
}
return a;
} else {
if (a == 0)
return b;
if (b == 0)
return a;

import core.bitop : bsf;
import std.algorithm.mutation : swap;

immutable uint shift = bsf(a | b);
a >>= a.bsf;

do {
b >>= b.bsf;
if (a > b)
swap(a, b);
b -= a;
} while (b);

return a << shift;
}
}

void foo() {
size_t a, b;
gcd(a, b);
}
---

--


[Issue 17482] New: [REG 2.074] comile error: Comparing Nullable!Variant with basic type

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17482

  Issue ID: 17482
   Summary: [REG 2.074] comile error: Comparing Nullable!Variant
with basic type
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: regression
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: bus_dbugzi...@semitwist.com

Worked fine up through 2.073.2, but 2.074.0 gives a compiler error:


import std.variant, std.typecons;

void main()
{
Nullable!Variant a;
a == 11; // Yes, comparison intended
}


test_nullable_variant.d(6): Error: template
std.typecons.Nullable!(VariantN!32LU).Nullable.opEquals cannot deduce function
from argument types !()(int), candidates are:
/home/nick/.dvm/compilers/dmd-2.074.0/linux/bin/../../src/phobos/std/typecons.d(2212):
   std.typecons.Nullable!(VariantN!32LU).Nullable.opEquals()(auto ref
const(typeof(this)) rhs)
/home/nick/.dvm/compilers/dmd-2.074.0/linux/bin/../../src/phobos/std/typecons.d():
   std.typecons.Nullable!(VariantN!32LU).Nullable.opEquals()(auto ref
const(T) rhs)

--


[Issue 17399] core.checkedint.addu cannot inline function

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17399

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

   What|Removed |Added

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

--


[Issue 17399] core.checkedint.addu cannot inline function

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17399

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

https://github.com/dlang/dmd/commit/8ff0a0a185e0a7d0c04812cf916fbbe6615f792c
fix Issue 17399 - core.checkedint.addu cannot inline function

https://github.com/dlang/dmd/commit/c18a27f5a11912695f0b7a74177bde149427496b
Merge pull request #6815 from WalterBright/fix17399

fix Issue 17399 - core.checkedint.addu cannot inline function
merged-on-behalf-of: unknown

--


[Issue 17481] New: [REG 2.069.0] synchronized: Access Violation with dmd -O on win32

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17481

  Issue ID: 17481
   Summary: [REG 2.069.0] synchronized: Access Violation with dmd
-O on win32
   Product: D
   Version: D2
  Hardware: x86
OS: Windows
Status: NEW
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: ga...@mail.ru

Code:

-
class Obj{
  synchronized void trigger(){ new ubyte[1]; }
}

void main(){
  auto k = new shared Obj;
  k.trigger;
}
-

When compiled on win32 with just "dmd", it runs fine.
When compiled with "dmd -O -g", it gives the following error at runtime:

-
object.Error@(0): Access Violation

0x0065
0x00402C6B in _d_newarrayU
0x004023EF in _d_newarrayT
0x00402A7F in scope void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).runAll()
0x00402980 in _d_run_main
0x00402288 in main at C:\programs\stuff\dlang\synchronized-memory-bug\a.d(8)
0x76D5336A in BaseThreadInitThunk
0x77369902 in RtlInitializeExceptionChain
0x773698D5 in RtlInitializeExceptionChain
-

Win64 is OK.  Win32 with dmd 2.068.2 or earlier is OK.  Win32 with dmd 2.069.0
or later gives the error above.

Original thread at D.learn:
https://forum.dlang.org/post/wdebefxpjvvxyqiol...@forum.dlang.org

--


[Issue 17480] [Downloads]

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17480

--- Comment #2 from Martin Tschierschke  ---
Hmm, I tried 
curl -fsS https://dlang.org/install.sh | bash -s dmd

But it seamed that no dub was included.

So I used  sudo dpkg -i dmd_2.074.1-0_amd64.deb after downloading
it with wget
http://downloads.dlang.org/releases/2.x/2.074.1/dmd_2.074.1-0_amd64.deb
Everything fine. But nevertheless it would be useful to put the info,
that the packet manager is included on the page, too.
Regards mt. Thanks for your effort!

--


[Issue 17480] [Downloads]

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17480

greenify  changed:

   What|Removed |Added

 CC||greeen...@gmail.com

--- Comment #1 from greenify  ---
DUB is part of the release bundles since 2.072
However, the installer will install DUB even for earlier versions.
What version are you testing?

--


[Issue 17480] New: [Downloads]

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17480

  Issue ID: 17480
   Summary: [Downloads]
   Product: D
   Version: D2
  Hardware: All
   URL: http://dlang.org/
OS: All
Status: NEW
  Severity: enhancement
  Priority: P3
 Component: dlang.org
  Assignee: nob...@puremagic.com
  Reporter: m...@smartdolphin.de

Just realized:
Please consider to add that DUB is part of the .deb package but not of the
install script!

--


[Issue 16615] std.process is missing functionality for child processes

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16615

Vladimir Panteleev  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=17479

--


[Issue 17479] Public constructor for std.process.Pid

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17479

Vladimir Panteleev  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=16615

--


[Issue 17479] Public constructor for std.process.Pid

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17479

Vladimir Panteleev  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #2 from Vladimir Panteleev  ---
I see you created a PR:

https://github.com/dlang/phobos/pull/5450

--


[Issue 17479] Public constructor for std.process.Pid

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17479

Vladimir Panteleev  changed:

   What|Removed |Added

 CC||thecybersha...@gmail.com

--- Comment #1 from Vladimir Panteleev  ---
(In reply to Chris Wright from comment #0)
> I want to handle them in the same fashion.

Why? Waiting on a process that is not your child is not possible, so in that
way, this would allow constructing an invalid Pid. Is it just for .kill()?

--


[Issue 17478] Socket.select return a write status change, but no connection is established.

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17478

Vladimir Panteleev  changed:

   What|Removed |Added

 CC||thecybersha...@gmail.com

--- Comment #1 from Vladimir Panteleev  ---
std.socket is just a simple translation layer to C APIs.

Does the same program written in C behave differently?

--


[Issue 16615] std.process is missing functionality for child processes

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16615

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

https://github.com/dlang/phobos/commit/71ca4c5b1428e6b4a9b2d89586cd8851c48619a6
Partial Fix For Issue 16615 - convert os pid to std.process Pid

https://github.com/dlang/phobos/commit/15a5a4898c67d0ecb7c7d2a5d9e744eeaf188ca1
Merge pull request #5086 from edi33416/process_enhancement

Partial Fix Issue 16615 - convert os pid to std.process Pid
merged-on-behalf-of: Andrei Alexandrescu 

--


[Issue 16615] std.process is missing functionality for child processes

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16615

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

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--