[webkit-reviews] review denied: [Bug 75595] Default HashTraits for Opcode don't work for Opcode = 0 : [Attachment 121203] Patch with indent change for stylebot

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 5 11:21:48 PST 2012


Geoffrey Garen <ggaren at apple.com> has denied Michael Saboff
<msaboff at apple.com>'s request for review:
Bug 75595: Default HashTraits for Opcode don't work for Opcode = 0
https://bugs.webkit.org/show_bug.cgi?id=75595

Attachment 121203: Patch with indent change for stylebot
https://bugs.webkit.org/attachment.cgi?id=121203&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
A few comments:

1. I believe you can just use WTF::UnsignedWithZeroKeyHashTraits. You can do
this by putting UnsignedWithZeroKeyHashTraits in the declaration of any hash
table using Opcode as key, or by declaring HashTraits<Opcode> to inherit from
UnsignedWithZeroKeyHashTraits. This is better than duplicating
UnsignedWithZeroKeyHashTraits.

2. This code should not be conditional on #if
ENABLE(COMPUTED_GOTO_INTERPRETER). That feature define does not have any
bearing on whether the Opcode type has 0 in its domain.

3. The best place to put HashTraits for Opcode is Opcode.h. That way, it's
impossible to put Opcode into a hash table inocrrectly.


More information about the webkit-reviews mailing list