http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #18 from nfx...@gmail.com 2010-12-21 20:41:46 PST ---
(In reply to comment #17)
> We could invent our own ABI for varargs, and it would be simple. But then,
> we're screwed trying to interoperate with C code that uses varargs.
The D
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #17 from Walter Bright 2010-12-21
20:25:56 PST ---
(In reply to comment #16)
> Here we can see the result of the "old" varargs being ported to 64 bits:
> http://dsource.org/projects/phobos/changeset/2229
> The compiler got more com
http://d.puremagic.com/issues/show_bug.cgi?id=4172
nfx...@gmail.com changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #16 from nfx...@gmail.com 2010-12-21 20:10:23 PST ---
Here we can see the result of the "old" varargs being ported to 64 bits:
http://dsource.org/projects/phobos/changeset/2229
The compiler got more complicated too. Good job, Walter
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #15 from Fawzi Mohamed 2010-12-02 05:51:36 PST ---
To keep backward compatibility and a working D1 compiler at least for D1, if
marshalling is too difficult with the current compiler I would evaluate the
effort of creating a hidden
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #14 from Andrei Alexandrescu 2010-11-30
07:50:14 PST ---
Should we close this then? Again, for D2 the vararg problem is settled, and I
see little reason to put much work on improving D1's varargs only.
--
Configure issuemail: htt
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #13 from nfx...@gmail.com 2010-11-30 01:19:50 PST ---
PS: passing a void[]* instead of void* would also allow users to build varargs
at on the call site.
Backward compatibility with the old way (for D1) can be achieved by naming the
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #12 from nfx...@gmail.com 2010-11-30 01:09:11 PST ---
(In reply to comment #9)
> We can revisit this and look into making it more efficient later, but for now
> I
> just want to get it working.
It's about ease of use, not efficienc
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #11 from Fawzi Mohamed 2010-11-30 00:05:15 PST ---
This discussion might be relevant
http://dsource.org/projects/tango/ticket/1042
should the C ABI be used, then one is better off using compile time varargs
(maybe using an explici
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #10 from Fawzi Mohamed 2010-11-29 23:33:33 PST ---
I don't understand why an ldc like approach (caller has to prepare marshalled
array, vararg function is equivalent to (void*,TypeInfo[])) would not work if
typeinfo has align info.
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #9 from Walter Bright 2010-11-29
21:56:33 PST ---
Unfortunately, the 64 bit C ABI is rather disastrously complex for varargs. I
went back and forth for a while on how to implement it, and whether to use the
C ABI for D variadic fun
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #8 from Fawzi Mohamed 2010-11-28 12:53:12 PST ---
I agree, I came to this from a discussion on the IRC, and I was thinking it
was a GDC bug (which has a badly broken implementation.
If implemented correctly, and with alignment info
http://d.puremagic.com/issues/show_bug.cgi?id=4172
Andrei Alexandrescu changed:
What|Removed |Added
Status|NEW |ASSIGNED
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #6 from nfx...@gmail.com 2010-11-26 14:15:36 PST ---
(In reply to comment #5)
> TypeInfo has offTi property that returns OffsetTypeInfo[], which is exactly
> what you want - types and offsets of struct members.
That information is (
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #5 from Sobirari Muhomori 2010-11-26
10:43:31 PST ---
TypeInfo has offTi property that returns OffsetTypeInfo[], which is exactly
what you want - types and offsets of struct members.
What problem do you have with struct layout? Yo
http://d.puremagic.com/issues/show_bug.cgi?id=4172
--- Comment #4 from nfx...@gmail.com 2010-11-26 01:00:56 PST ---
(In reply to comment #2)
> (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, creat
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 receivi
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
>
http://d.puremagic.com/issues/show_bug.cgi?id=4172
Fawzi Mohamed changed:
What|Removed |Added
CC||fa...@gmx.ch
--- Comment #1 from Fawzi
19 matches
Mail list logo