Remove SegmentedString::m_pushedChar{1,2} optimization
Before r201294, SegmentedString::push() had an exotic behavior where two consecutive push() results are swapped. SegmentedString stored those two chars into m_pushedChar{1,2} to avoid messing up SegmentedSubString. After r201294, SegmentedString::push() is guaranteed to be used for ungetc()-like usecase, where it reverts the SegmentedString::advance() which was issued just before the call. This CL removes m_pushedChar{1,2} optimization, and replace it with SegmentedSubstring::push() which simply decrement m_data.string{8,16}Ptr. In pessimistic case, this may end up prepending wtf::String inside SegmentedSubstring, but this should be very rare. BUG=None TESTS=SegmentedStringTest Review URL: https://codereview.chromium.org/1319913002 git-svn-id: svn://svn.chromium.org/blink/trunk@201517 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment