Commit 83ca6c8
committed
Make CCC compilation deterministic
This fixes an issue where using a set to unique the elements of a
CCC led to a nondeterministic ordering, which could then lead to
unexpected coalescing of separate scalars into a single character.
(e.g. `[\nA\r]` -> `["\r", "\n", "A"]` -> `["\r\n", "A"]`)
This change keeps the order of the original CCC, so coalescing into
characters should not occur unless the scalars are already in that
order.
Fixes swiftlang/swift#81427.
rdar://1510467151 parent 650b2c1 commit 83ca6c8
File tree
2 files changed
+23
-5
lines changed- Sources/_StringProcessing
- Tests/RegexTests
2 files changed
+23
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
943 | | - | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
944 | 946 | | |
945 | | - | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
946 | 950 | | |
947 | 951 | | |
948 | 952 | | |
949 | 953 | | |
950 | | - | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
951 | 959 | | |
952 | 960 | | |
953 | 961 | | |
954 | 962 | | |
955 | | - | |
956 | | - | |
957 | 963 | | |
958 | 964 | | |
959 | 965 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2864 | 2864 | | |
2865 | 2865 | | |
2866 | 2866 | | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
2867 | 2879 | | |
2868 | 2880 | | |
2869 | 2881 | | |
| |||
0 commit comments