[foreign-abi] RFR: 8239345: need an enum for standard C types and a way to get a memory layout for those C types
    Anthony Vanelverdinghe 
    github.com+15714253+anthonyvdotbe at openjdk.java.net
       
    Wed Feb 19 19:47:52 UTC 2020
    
    
  
On Wed, 19 Feb 2020 17:47:51 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:
> SystemABI.Type enum added and ABI_CLASS attribute of layout removed (inferred from Type instead)
src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/abi/x64/sysv/CallArranger.java line 534:
> 533:                 return COMPLEX_X87_CLASSES;
> 534:             }
> 535:         }
Analog as above, this can be simplified with `Optional::map` to:
`java
if(type.abiType().map(SysVx64ABI::argumentClassFor) == ArgumentClassImpl.COMPLEX_X87) {
    return COMPLEX_X87_CLASSES;
}
`
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/24
    
    
More information about the panama-dev
mailing list