[foreign-memaccess+abi] Withdrawn: 8291639: Improve the ability to visualize a MemorySegment in human readable forms
Per Minborg
pminborg at openjdk.org
Tue Sep 5 07:37:05 UTC 2023
On Tue, 2 Aug 2022 15:22:13 GMT, Per Minborg <pminborg at openjdk.org> wrote:
> This PR improves the ability to visualize a memory abstraction (e.g. `MemorySegment`, `ByteBuffer`, `byte[]`) in human-readable forms.
>
> The existing `HexFormat` class will get a new configurable `MemoryDumper` that can produce dumps of MemorySegments, byte arrays and ByteBuffers:
>
>
> 0000000000000000 54 68 65 20 71 75 69 63 6B 20 62 72 6F 77 6E 20 |The quick brown |
> 0000000000000010 66 6F 78 20 6A 75 6D 70 65 64 20 6F 76 65 72 20 |fox jumped over |
> 0000000000000020 74 68 65 20 6C 61 7A 79 20 64 6F 67 0A 53 65 63 |the lazy dog.Sec|
> 0000000000000030 6F 6E 64 20 6C 69 6E 65 09 3A 68 65 72 65 00 00 |ond line.:here..|
> 0000000000000040 00 00 00 00 |.... |
>
>
> A MemoryDumper can contain any number of columns (either index or data) which can be formatted in a large number of ways using composable `HexFormat` instances. Even more configuration possibilities can be achieved by providing custom formatting lambdas.
This pull request has been closed without being integrated.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/695
More information about the panama-dev
mailing list