[Webkit-unassigned] [Bug 27060] Type cast for first argument in make_pair()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 17 06:26:12 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27060





--- Comment #7 from Norbert Leser <norbert.leser at nokia.com>  2009-08-17 06:26:09 PDT ---
(In reply to comment #6)
> Getting there..
> 
> It is not the make_pair function that fails, but the HashMap::Contains().
> 
> in WTF/StructureTransitionTable.h we define our HashTable to be type:
>     typedef HashMap<StructureTransitionTableHash::Key, Structure*,
> StructureTransitionTableHash, StructureTransitionTableHashTraits>
> StructureTransitionTable;
> 
> where the StructureTransitionTableHashTraits' SecondFirstTraits::TraitType is
> unsigned.
> 
> Looks like temporary pair is getting generated with unknown type. From illegal
> operand we can gather that this is not integer type.I looked at HashTraits.h to
> see if there was an obvious reason, but cold code reading doesn't help at this
> point. Unfortunately I don't have src for std so my debugging/preprocessing is
> limited here.
> 
> Again casting to unsigned is the easiest way to fix this.

If unconditional casting to unsigned is acceptable for any other platform, that
would be fine with me. However, I am not certain whether that may defeat any
possible 7-bit optimization.

The rationale for making the single header change to unsigned for
COMPILER(WINSCW)was that this is for symbian carbide emulator only, where this
space optimization is insignificant, and to avoid 3 #defines in the
implementation file.

Either solution is fine with me. The question is what's the cleanest without
regression on other platforms.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list