RFR: 8323601: Improve LayoutPath.PathElement::toString [v2]

Jorn Vernee jvernee at openjdk.org
Mon Jan 15 17:13:21 UTC 2024


On Mon, 15 Jan 2024 16:01:32 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> This PR proposes to add an improved Improve `LayoutPath.PathElement::toString` method simplifying debugging.
>> 
>> Opinions and suggestions for `static PathElement sequenceElement(long start, long step)` are welcome.
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Rework PathElement:toString

src/java.base/share/classes/java/lang/foreign/MemoryLayout.java line 958:

> 956:             return new LayoutPath.PathElementImpl(PathKind.DEREF_ELEMENT,
> 957:                     LayoutPath::derefElement,
> 958:                     "*");

It seems that this would result in paths like `a.b*` rather than the `*a.b`, which is correct C syntax.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17417#discussion_r1452611709


More information about the core-libs-dev mailing list