Commit 996d35a
committed
Fix unsafe lowering of fast path for String.charAt: we optimistically load a cached value into the result operand. But if the cached value is null, we'll have to call a helper to complete the operation, and if the result operand and string source have the same symbol, then we have overwritten the string we pass to the helper with null. Use a temp in such a case and copy it to the result operand only if it is non-null.
1 parent 291ebec commit 996d35a
2 files changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5700 | 5700 | | |
5701 | 5701 | | |
5702 | 5702 | | |
| 5703 | + | |
| 5704 | + | |
| 5705 | + | |
| 5706 | + | |
| 5707 | + | |
| 5708 | + | |
| 5709 | + | |
| 5710 | + | |
| 5711 | + | |
5703 | 5712 | | |
5704 | 5713 | | |
5705 | 5714 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6852 | 6852 | | |
6853 | 6853 | | |
6854 | 6854 | | |
| 6855 | + | |
| 6856 | + | |
| 6857 | + | |
| 6858 | + | |
| 6859 | + | |
| 6860 | + | |
| 6861 | + | |
| 6862 | + | |
| 6863 | + | |
6855 | 6864 | | |
6856 | 6865 | | |
6857 | 6866 | | |
| |||
0 commit comments