[foreign] RFR 8218742: Refine Scope API

Jorn Vernee jbvernee at xs4all.nl
Mon Feb 11 13:46:29 UTC 2019


Hi Maurizio,

The patch does not apply cleanly after JDK-8218669 [1] was merged. I'm 
getting some merge failures in References.java

About ScopeImpl;

   - The parent scope field is called `owner`, but the accessor is called 
`parent()`, I'd say go with either "parent" or "owner" as a name for 
both.

   - Also, There are a bunch of casts to ScopeImpl, mostly in the 
implementation of ScopeImpl::merge. Should the field's type be changed 
to ScopeImpl instead, and have 1 cast in the constructor?

- Changes in jextract/staticForwarder/StaticForwarderTest.java don't 
seem to be needed?

- Also, Scope inference is in the proposal, but it doesn't seem to be 
implemented with this patch. I guess that will come later?

Rest looks good,
Jorn

[1] : https://bugs.openjdk.java.net/projects/JDK/issues/JDK-8218669

Maurizio Cimadamore schreef op 2019-02-11 14:03:
> Hi,
> this is an official RFR for the changes discussed in the writeup in
> [1] and in the subsequent thread [2].
> 
> Webrev:
> 
> http://cr.openjdk.java.net/~mcimadamore/panama/8218742/
> 
> I've updated the examples document to reflect the API changes, as well
> as polished the code, fixup javadocs etc.
> 
> The tests pass on all platforms.
> 
> Cheers
> Maurizio
> 
> [1] - http://cr.openjdk.java.net/~mcimadamore/panama/scopes.html
> [2] -
> https://mail.openjdk.java.net/pipermail/panama-dev/2019-January/003926.html


More information about the panama-dev mailing list