On Sat, 24 May 2014 02:54:01 -0700, FG <[email protected]> wrote:

Bloody Thunderbird. I think I pressed Reply instead of Followup. Sorry, Steven.

It's OK, it went into my spam folder anyway ;)

On 2014-05-19 15:31, Steven Schveighoffer wrote:
No, in that DMD file, the bucket is a tree, not a doubly-linked list.

Silly me. A look at the body of delnodes should have made it clear that it's a binary tree.

opCmp is not used in D's AA.

Really? Then what does TypeInfo.compare(void*, void*) use? For example here:

     auto key_hash = keyti.getHash(pkey); Entry *e;
     /* ... */
     if (key_hash == e.hash) {
         auto c = keyti.compare(pkey, e + 1);
         if (c == 0) goto Lret;
     }

You know what, you are right. I assumed it used keyti.equals. This is a bug imo, since opCmp will be used, and opEquals will be ignored. Just checking for opCmp == 0 is identical to opEquals, except some types can define opEquals but not opCmp.

But I don't know if it will get fixed. The whole AA runtime has to be redone at some point.

-Steve

Reply via email to