-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit cfc8e6d
[vm] Have Read/WriteStream use (S)LEB128 for variable-length encoding.
Previously, the non-fixed read and write methods of ReadStream and
WriteStream used a similar but slightly different encoding to LEB128 for
unsigned values and SLEB128 for signed values. The only difference was
the high continuation marker bit, which was unset in non-final parts and
set in final parts in the previous encoding, but is set for non-final
parts and unset in final parts in (S)LEB128.
This CL changes it so that they instead use the standard LEB128 and
SLEB128 encodings. Among other things, this means that one-byte
encodings of values in snapshots will be the value itself, not the value
with the high bit set. This also means that when outputting specific
formats that use (S)LEB128, like DWARF, the format writers can just use
WriteStream::Write(Unsigned) directly instead of needing to write a
separate encoder.
Cq-Include-Trybots: luci.dart.try:vm-kernel-ubsan-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try
Change-Id: I409a22e7da9e4672011dfaccd3790c122ec3e522
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150526
Commit-Queue: Tess Strickland <[email protected]>
Reviewed-by: Ryan Macnak <[email protected]>1 parent b215880 commit cfc8e6dCopy full SHA for cfc8e6d
File tree
Expand file treeCollapse file tree
2 files changed
+156
-207
lines changedOpen diff view settings
Filter options
- runtime/vm
Expand file treeCollapse file tree
2 files changed
+156
-207
lines changedOpen diff view settings
0 commit comments