Changeset 143994 in webkit
- Timestamp:
- Feb 25, 2013 6:10:02 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r143986 r143994 1 2013-02-25 Michael Saboff <msaboff@apple.com> 2 3 For JSVALUE32_64, maxOffsetRelativeToPatchedStorage() doesn't compute the maximum negative offset 4 https://bugs.webkit.org/show_bug.cgi?id=110828 5 6 Reviewed by Oliver Hunt. 7 8 * runtime/JSObject.h: 9 (JSC::maxOffsetRelativeToPatchedStorage): Only add the OBJECT_OFFSETOF(tag) for positive offsets. 10 That way this function will return the offset farthest from 0 needed to access either the payload 11 or tag. 12 1 13 2013-02-25 Jeffrey Pfau <jpfau@apple.com> 2 14 -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r141154 r143994 1422 1422 } 1423 1423 1424 // Returns the maximum offset a load instruction will encode.1424 // Returns the maximum offset (away from zero) a load instruction will encode. 1425 1425 inline size_t maxOffsetRelativeToPatchedStorage(PropertyOffset offset) 1426 1426 { 1427 ptrdiff_t addressOffset = static_cast<ptrdiff_t>(offsetRelativeToPatchedStorage(offset)); 1427 1428 #if USE(JSVALUE32_64) 1428 return offsetRelativeToPatchedStorage(offset) 1429 + OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag); 1430 #else 1431 return offsetRelativeToPatchedStorage(offset); 1429 if (addressOffset >= 0) 1430 return static_cast<size_t>(addressOffset) + OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag); 1432 1431 #endif 1432 return static_cast<size_t>(addressOffset); 1433 1433 } 1434 1434
Note: See TracChangeset
for help on using the changeset viewer.