[Issue 4172] Improve varargs

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4172



--- Comment #3 from Sobirari Muhomori  2010-11-25 
22:11:11 PST ---
And TypeInfo is immutable and doesn't require construction on every call.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4172] Improve varargs

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4172



--- Comment #2 from Sobirari Muhomori  2010-11-25 
22:08:23 PST ---
(In reply to comment #1)
> The clean way to fix this (and what LDC does) is to pack all arguments
> (aligning them) in a stack allocated array, create the typeinfo array, and 
> then
> call the function passing to it a void* to the packed array and the typeinfo
> array.

Doesn't dmd do the same?

More handy way is to pack arguments into struct and pass single TypeInfo for
that struct. It already has all necessary align and offset info there.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5257] std.algorithm.count works incorrectly with UTF8 and UTF16 strings

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5257



--- Comment #5 from Masahiro Nakagawa  2010-11-25 
21:48:06 PST ---
(In reply to comment #4)
> Thanks, Masahiro. I fixed with simpler means that don't need special casing.

Good!

Are you going to deprecate std.utf.count?
std.algorithm.count(now, default pred is "true") and std.utf.count seem to be
duplicate.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4900] compiler still slow due to a single function

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4900


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #2 from bearophile_h...@eml.cc 2010-11-25 20:19:58 PST ---
See also bug 5276 for another possible (smaller) benchmark.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5276] Template compilation slower than G++ 4.5

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5276



--- Comment #1 from bearophile_h...@eml.cc 2010-11-25 20:18:22 PST ---
Created an attachment (id=833)
C++ G++ 4.5 version of the benchmark

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5276] New: Template compilation slower than G++ 4.5

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5276

   Summary: Template compilation slower than G++ 4.5
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: performance
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2010-11-25 20:17:36 PST ---
Created an attachment (id=832)
D2 version of the benchmark

This performance bug may share the same cause of bug 4900
If this turns out to be true then we may close this as resolved duplicated.

In attach there are two programs that perform many computations at compile time
using just templates, one written in C++ and one in D2.

This is not idiomatic D code, because for this purpose CTFE is better, but it
may be good enough as first performance benchmark for templates.

Compilation time (N=7): G++ 0.95 seconds, dmd 12.4 seconds.

G++ uses about 34 MB RAM, DMD about 130+ MB RAM.
I have used MinGW 4.5.1 and DMD 2.050.

Compilation:
g++ nqueens_cpp.cpp -o nqueens_cpp
dmd nqueens_d.d

See also:
http://cpptruths.blogspot.com/2010/03/faster-meta-programs-using-gcc-45-and.html

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5264] x86_64 changes for druntime 2

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5264



--- Comment #4 from Brad Roberts  2010-11-25 15:04:41 PST 
---
I'm splitting #3 into a standalone bug report.  dmd-1.x exhibits the same
problem and it's unrelated to druntime at all.  New bug 5275.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5275] New: x86_64 related hidden function parameter mishandled

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5275

   Summary: x86_64 related hidden function parameter mishandled
   Product: D
   Version: D1 & D2
  Platform: Other
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bra...@puremagic.com


--- Comment #0 from Brad Roberts  2010-11-25 15:03:52 PST 
---
(split off from bug 5264)

module hrm;

struct BlkInfo { size_t size; }

extern (C) BlkInfo gc_qalloc();

void __setArrayAllocLength(ref BlkInfo info)
{
if(info.size) {}
}

extern (C) void foo()
{
BlkInfo info = gc_qalloc();
__setArrayAllocLength(info);
}

$ dmd -m64 -c hrm.d   
Internal error: backend/cod1.c 2554

(same error and line number for both dmd1 and dmd2 from tip of svn for both)

call cleanup code in cod1.c funccall():

2936 if (tym1 == TYhfunc)
2937 {   // Hidden parameter is popped off by the callee
2938 c = genadjesp(c, -4);
2939 stackpush -= 4;

This code isn't aware of the 32 vs 64 bit calling convention differences yet?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5257] std.algorithm.count works incorrectly with UTF8 and UTF16 strings

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5257


Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


--- Comment #4 from Andrei Alexandrescu  2010-11-25 
14:51:45 PST ---
Thanks, Masahiro. I fixed with simpler means that don't need special casing.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4351] string literal postfix

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4351


Ellery Newcomer  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #2 from Ellery Newcomer  2010-11-25 
14:31:28 PST ---
fix to 1351 also fixes this

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5225] Signed right shift operator is ridiculous

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5225


Stewart Gordon  changed:

   What|Removed |Added

 CC||s...@iname.com


--- Comment #2 from Stewart Gordon  2010-11-25 13:39:36 PST ---
This is closely related to issue 1977.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5225] Signed right shift operator is ridiculous

2010-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5225


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #1 from Don  2010-11-25 06:49:02 PST ---
This is a simple range propagation bug, rather than a problem with the operator
itself (unlike bug 2809).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---