[foreign-abi] [Rev 01] RFR: 8239784: Circular initialization causes C_XXX constants to be null
    Jorn Vernee 
    jvernee at openjdk.java.net
       
    Fri Feb 21 16:34:07 UTC 2020
    
    
  
> See the bug for a complete description. Essentially, the problem is that 
> 
> public static void main(String[] args) {
>     System.out.println(MemoryLayouts.WinABI.C_CHAR);
>     System.out.println(MemoryLayouts.C_CHAR);
> } 
> 
> Will print 
> 
> b8
> null
> Because of a circular dependency between the constants.
> 
> The fix is to extract the constants that the platform specific classes depend on into a separate, shared class, which removes the circular dependency. (This fix was suggested by Sundar)
The pull request has been updated with 1 additional commit.
-------------
Added commits:
 - c8257cdc: Review comments:
Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/26/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/26/files/e98fa46a..c8257cdc
Webrevs:
 - full: https://webrevs.openjdk.java.net/panama-foreign/26/webrev.01
 - incr: https://webrevs.openjdk.java.net/panama-foreign/26/webrev.00-01
  Stats: 143 lines in 4 files changed: 100 ins; 43 del; 0 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/26.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/26/head:pull/26
PR: https://git.openjdk.java.net/panama-foreign/pull/26
    
    
More information about the panama-dev
mailing list