在 Sat, 13 Jun 2009 02:17:03 +0800,Daniel Keep
写道:
davidl wrote:
The runtime vararg push into stack with align of 4, however programmer
might neglect this easily and cause problem.
...
That's because you're not supposed to do that.
std.stdarg
Then you probably want to accuse the spec
Daniel Keep wrote:
davidl wrote:
The runtime vararg push into stack with align of 4, however programmer
might neglect this easily and cause problem.
...
That's because you're not supposed to do that.
std.stdarg
Contains only a template. Here's the solution (untested):
void* va_arg(inout
Don wrote:
> That's true. What you are doing is removing the int/byte inconsistency,
> by making uint == int comparisons behave the same way that ubyte ==
> byte comparisons do now.
> Notice that your proposal
> (1) preserves the existing behaviour of byte==ubyte (which the original
> poster was c
davidl wrote:
> The runtime vararg push into stack with align of 4, however programmer
> might neglect this easily and cause problem.
>
> ...
>
That's because you're not supposed to do that.
std.stdarg
davidl wrote:
Also the whole paradigm of coding a runtime vararg func is so
troublesome and even much complex compared to the compile time vararg.
Maybe we should borrow something from compiletime to aid the runtime
vararg programming.
Got my vote!
Jarrett Billingsley wrote:
It's not foolproof, but I found it useful enough; maybe others will too.
// Parsing mangles for fun and profit.
char[] _getJustName(char[] mangle)
{
size_t idx = 1;
size_t start = idx;
size_t len = 0;
while(idx < mangle.length && mangle[idx] >= '0' &&
2009/6/12 davidl :
> 在 Sat, 13 Jun 2009 00:40:09 +0800,Jarrett Billingsley
> 写道:
>
>> It's not foolproof, but I found it useful enough; maybe others will too.
>>
>> // Parsing mangles for fun and profit.
>> char[] _getJustName(char[] mangle)
>> {
>>size_t idx = 1;
>>size_t start = idx;
>>
在 Sat, 13 Jun 2009 00:40:09 +0800,Jarrett Billingsley
写道:
It's not foolproof, but I found it useful enough; maybe others will too.
// Parsing mangles for fun and profit.
char[] _getJustName(char[] mangle)
{
size_t idx = 1;
size_t start = idx;
size_t len = 0;
while(idx < mang
The runtime vararg push into stack with align of 4, however programmer
might neglect this easily and cause problem.
import std.boxer;
import std.stdio;
void func(...)
{
Box[] arguments;
arguments.length = _arguments.length;
for(int i;i<_arguments.length;i++)
{
arguments[i] = box(_a
It's not foolproof, but I found it useful enough; maybe others will too.
// Parsing mangles for fun and profit.
char[] _getJustName(char[] mangle)
{
size_t idx = 1;
size_t start = idx;
size_t len = 0;
while(idx < mangle.length && mangle[idx] >= '0' &&
mangle[idx] <= '9')
bearophile wrote:
D2 language already has many of those features, monads can be implemented (even
if the language doesn't offer syntax to manage them). Pattern Matching is
missing (but this isn't too much bad: adding pattern matching to D2 may
increase its complexity a bit too much). I think
On 2009-06-10 20:14:25 -0400, Andrei Alexandrescu
said:
Michel Fortin wrote:
On 2009-06-10 17:38:55 -0400, Andrei Alexandrescu
said:
* there is nothing to improve threads, further demotivating support for
Deadlock-Oriented Programming (DOP) in D
On the contrary. I believe they're doing
12 matches
Mail list logo