Changeset 85621 in webkit
- Timestamp:
- May 3, 2011 10:34:15 AM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r85605 r85621 1 2011-05-03 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Anders Carlsson. 4 5 Compile error with GCC 4.6.0, tries to assign unsigned& to bitfield 6 https://bugs.webkit.org/show_bug.cgi?id=59261 7 8 Use unary '+' to force proper type detection in template arguments 9 with GCC 4.6.0. See bug report for more details. 10 11 * runtime/Structure.cpp: 12 (JSC::StructureTransitionTable::remove): Use '+' to force precise type detection. 13 (JSC::StructureTransitionTable::add): ditto. 14 * runtime/Structure.h: 15 (JSC::StructureTransitionTable::keyForWeakGCMapFinalizer): ditto. 16 1 17 2011-05-03 Jessie Berlin <jberlin@apple.com> 2 18 -
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r85605 r85621 97 97 // entry is structure (the latter check may fail if we initially had a 98 98 // transition with a specific value, and this has been despecified). 99 TransitionMap::iterator entry = map()->find(make_pair(structure->m_nameInPrevious, structure->m_attributesInPrevious)); 99 100 // Newer versions of the STL have an std::make_pair function that takes rvalue references. 101 // When either of the parameters are bitfields, the C++ compiler will try to bind them as lvalues, which is invalid. To work around this, use unary "+" to make the parameter an rvalue. 102 // See https://bugs.webkit.org/show_bug.cgi?id=59261 for more details 103 TransitionMap::iterator entry = map()->find(make_pair(structure->m_nameInPrevious, +structure->m_attributesInPrevious)); 100 104 if (entry != map()->end() && structure == entry.get().second) 101 105 map()->remove(entry); … … 121 125 122 126 // Add the structure to the map. 123 std::pair<TransitionMap::iterator, bool> result = map()->add(globalData, make_pair(structure->m_nameInPrevious, structure->m_attributesInPrevious), structure); 127 128 // Newer versions of the STL have an std::make_pair function that takes rvalue references. 129 // When either of the parameters are bitfields, the C++ compiler will try to bind them as lvalues, which is invalid. To work around this, use unary "+" to make the parameter an rvalue. 130 // See https://bugs.webkit.org/show_bug.cgi?id=59261 for more details 131 std::pair<TransitionMap::iterator, bool> result = map()->add(globalData, make_pair(structure->m_nameInPrevious, +structure->m_attributesInPrevious), structure); 124 132 if (!result.second) { 125 133 // There already is an entry! - we should only hit this when despecifying. -
trunk/Source/JavaScriptCore/runtime/Structure.h
r85605 r85621 306 306 inline StructureTransitionTable::Hash::Key StructureTransitionTable::keyForWeakGCMapFinalizer(void*, Structure* structure) 307 307 { 308 return Hash::Key(structure->m_nameInPrevious.get(), structure->m_attributesInPrevious); 308 // Newer versions of the STL have an std::make_pair function that takes rvalue references. 309 // When either of the parameters are bitfields, the C++ compiler will try to bind them as lvalues, which is invalid. To work around this, use unary "+" to make the parameter an rvalue. 310 // See https://bugs.webkit.org/show_bug.cgi?id=59261 for more details. 311 return Hash::Key(structure->m_nameInPrevious.get(), +structure->m_attributesInPrevious); 309 312 } 310 313
Note: See TracChangeset
for help on using the changeset viewer.