Changeset 242519 in webkit
- Timestamp:
- Mar 5, 2019 4:20:07 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r242397 r242519 1 2019-03-05 Saam barati <sbarati@apple.com> 2 3 op_switch_char broken for rope strings after JSRopeString layout rewrite 4 https://bugs.webkit.org/show_bug.cgi?id=195339 5 <rdar://problem/48592545> 6 7 Reviewed by Yusuke Suzuki. 8 9 * stress/switch-on-char-llint-rope.js: Added. 10 1 11 2019-03-04 Yusuke Suzuki <ysuzuki@apple.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r242500 r242519 1 2019-03-05 Saam barati <sbarati@apple.com> 2 3 op_switch_char broken for rope strings after JSRopeString layout rewrite 4 https://bugs.webkit.org/show_bug.cgi?id=195339 5 <rdar://problem/48592545> 6 7 Reviewed by Yusuke Suzuki. 8 9 When we did the JSString rewrite, we accidentally broke LLInt's switch_char 10 for rope strings. That change made it so that we always go to the slow path 11 for ropes. That's wrong. The slow path should only be taken when the rope 12 is of length 1. For lengths other than 1, we need to fall through to the 13 default case. This patch fixes this. 14 15 * llint/LowLevelInterpreter32_64.asm: 16 * llint/LowLevelInterpreter64.asm: 17 * runtime/JSString.h: 18 1 19 2019-03-05 Yusuke Suzuki <ysuzuki@apple.com> 2 20 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r242252 r242519 1789 1789 bineq t1, CellTag, .opSwitchCharFallThrough 1790 1790 bbneq JSCell::m_type[t0], StringType, .opSwitchCharFallThrough 1791 loadp JSString::m_fiber[t0], t 01792 btpnz t 0, isRopeInPointer, .opSwitchOnRope1793 bineq StringImpl::m_length[t 0], 1, .opSwitchCharFallThrough1794 loadp StringImpl::m_data8[t 0], t11795 btinz StringImpl::m_hashAndFlags[t 0], HashFlags8BitBuffer, .opSwitchChar8Bit1796 loadh [t 1], t01791 loadp JSString::m_fiber[t0], t1 1792 btpnz t1, isRopeInPointer, .opSwitchOnRope 1793 bineq StringImpl::m_length[t1], 1, .opSwitchCharFallThrough 1794 loadp StringImpl::m_data8[t1], t0 1795 btinz StringImpl::m_hashAndFlags[t1], HashFlags8BitBuffer, .opSwitchChar8Bit 1796 loadh [t0], t0 1797 1797 jmp .opSwitchCharReady 1798 1798 .opSwitchChar8Bit: 1799 loadb [t 1], t01799 loadb [t0], t0 1800 1800 .opSwitchCharReady: 1801 1801 subi SimpleJumpTable::min[t2], t0 … … 1810 1810 1811 1811 .opSwitchOnRope: 1812 bineq JSRopeString::m_compactFibers + JSRopeString::CompactFibers::m_length[t0], 1, .opSwitchCharFallThrough 1813 1814 .opSwitchOnRopeChar: 1812 1815 callSlowPath(_llint_slow_path_switch_char) 1813 1816 nextInstruction() -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r242252 r242519 1899 1899 1900 1900 .opSwitchOnRope: 1901 bineq JSRopeString::m_compactFibers + JSRopeString::CompactFibers::m_length[t1], 1, .opSwitchCharFallThrough 1902 1903 .opSwitchOnRopeChar: 1901 1904 callSlowPath(_llint_slow_path_switch_char) 1902 1905 nextInstruction() -
trunk/Source/JavaScriptCore/runtime/JSString.h
r242399 r242519 312 312 313 313 private: 314 friend class LLIntOffsetsExtractor; 315 314 316 uint32_t m_length { 0 }; 315 317 uint32_t m_fiber1Lower { 0 }; … … 351 353 352 354 private: 355 friend class LLIntOffsetsExtractor; 356 353 357 uint32_t m_length { 0 }; 354 358 JSString* m_fiber1 { nullptr }; … … 439 443 440 444 private: 445 friend class LLIntOffsetsExtractor; 446 441 447 void convertToNonRope(String&&) const; 442 448
Note: See TracChangeset
for help on using the changeset viewer.