Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use N-bit lengths for VZV IndexN format types #5594

Merged
merged 7 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- `zerotrie`
- `zerovec`
- This release has multiple changes that affect the bit representation of various types. Do not update to this release if you wish to retain stable data formats.
- Change the `VarZeroVecFormat` values shipped by default to use the same index and length width. This breaks data layout for all `VarZeroVec`s. (https://github.com/unicode-org/icu4x/pull/5594)
- Optimize `MultiFieldsULE` to not store a length anymore. This breaks data layout for any `#[make_varule]`-using struct with multiple variable-sized fields. (https://github.com/unicode-org/icu4x/pull/5593)
- `writeable`

Expand Down

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions components/plurals/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1073,10 +1073,10 @@ fn test_serde_nonsingleton_roundtrip() {
assert_eq!(
postcard_bytes,
&[
16, // Postcard header
14, // Postcard header
0x80, // Discriminant
3, b'a', b'b', b'c', // String of length 3
1, 0, 0, 0, 0, 0, // VarZeroVec of length 1
1, 0, 0, 0, // VarZeroVec of length 1
0x10, b'd', b'e', b'f', b'g' // Plural category 1 and string "defg"
]
);
Expand Down
2 changes: 1 addition & 1 deletion components/plurals/src/rules/runtime/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ mod test {
let vzv = VarZeroVec::<_>::from(relations.as_slice());
assert_eq!(
vzv.as_bytes(),
&[1, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0]
&[1, 0, 0, 0, 192, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0]
);
}
}
2 changes: 1 addition & 1 deletion provider/blob/benches/auxkey_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ fn make_blob_v2() -> Vec<u8> {
put_payloads::<MarkerD>(&mut exporter);
exporter.close().unwrap();
drop(exporter);
assert_eq!(blob.len(), 32982);
assert_eq!(blob.len(), 32980);
assert!(blob.len() > 100);
blob
}
Expand Down
Binary file modified provider/blob/tests/data/v2.postcard
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions provider/data/casemap/data/case_map_v1_marker.rs.data

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions provider/data/casemap/fingerprints.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
props/casemap@1, <singleton>, 22515B, 22428B, ff76a17649a34363
props/casemap_unfold@1, <singleton>, 976B, 932B, 85d63de2fdea5a3d
props/casemap@1, <singleton>, 22513B, 22426B, a4a125633510e06d
props/casemap_unfold@1, <singleton>, 972B, 928B, b861f4456b3907f

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions provider/data/casemap/stubdata/case_map_v1_marker.rs.data

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading