summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_checker.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2022-12-16 11:16:45 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2022-12-19 08:25:47 +0000
commit419484b8d944122049f2517bf9a2e482d26575b5 (patch)
treef945d37932372b8d359937cb42992c688a7d3d70 /compiler/optimizing/graph_checker.cc
parent88a7d206e7b50661a8256d844acca3d1a2dc5922 (diff)
Clean up Modified UTF-8 encoding.
The function `String::GetUtfLength()` is used exclusively in `String::ToModifiedUtf8()`, so rename it to better reflect the intent, namely to `String::GetModifiedUtf8Length(). Similarly, rename the function `CountUtf8Bytes()` used only in the above function to `CountModifiedUtf8BytesInUtf16()`. Rename a copy of the function used in tests. Reimplement `CountModifiedUtf8Bytes()` and the renamed `CountModifiedUtf8BytesInUtf16()` with equivalent code using the helper template function `ConvertUtf16ToUtf8<>()` and flag the fact that despite the name referencing Modified UTF-8, the generated encoding can contain 4-byte sequences. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: m libctstiagent Bug: 192935764 Change-Id: I942a3b77ee3af0194ee8315e0631ec217a0af67d
Diffstat (limited to 'compiler/optimizing/graph_checker.cc')
0 files changed, 0 insertions, 0 deletions