<div style="font-family: Arial, sans-serif; font-size: 14px;"><span>Short updates from me.</span><div><br></div><div><span>I continue working on generating layout for std::string and found that it is failing on cxx branch:</span></div><div><br></div><div><span>Scoped: TOPLEVEL <toplevel></span></div><div><span> Scoped: STRUCT __mbstate_t layout = [i32(__count)[i32(__wch)|[4:b8](__wchb)](__value)](__mbstate_t)</span></div><div><span> Attr: LINK -> []</span></div><div><span> Variable: FIELD __count type = Int(layout = i32)</span></div><div><span> Variable: FIELD __value type = Declared([i32(__wch)|[4:b8](__wchb)](union (unnamed at enum.h:28:3)))</span></div><div><br></div><div><span>java.lang.IllegalArgumentException: Invalid member name: union (unnamed at enum.h:28:3)</span></div><div><span> at java.base/java.lang.constant.ConstantUtils.validateMemberName(ConstantUtils.java:152)</span></div><div><span> at java.base/java.lang.constant.ClassDesc.of(ClassDesc.java:129)</span></div><div><span> at org.openjdk.jextract@21/org.openjdk.jextract.impl.ClassSourceBuilder.<init>(ClassSourceBuilder.java:70)</span></div><div><span> at org.openjdk.jextract@21/org.openjdk.jextract.impl.StructBuilder.<init>(StructBuilder.java:67)</span></div><div><span> at org.openjdk.jextract@21/org.openjdk.jextract.impl.StructBuilder.<init>(StructBuilder.java:62)</span></div><div><span> at org.openjdk.jextract@21/org.openjdk.jextract.impl.StructBuilder.addStruct(StructBuilder.java:136)</span></div><div><span> at org.openjdk.jextract@21/org.openjdk.jextract.impl.OutputFactory.visitScoped(OutputFactory.java:187)</span></div><div><span> at org.openjdk.jextract@21/org.openjdk.jextract.impl.OutputFactory.visitScoped(OutputFactory.java:54)</span></div><div><span> at org.openjdk.jextract@21/org.openjdk.jextract.impl.DeclarationImpl$ScopedImpl.accept(DeclarationImpl.java:333)</span></div><div><span> at org.openjdk.jextract@21/org.openjdk.jextract.impl.OutputFactory.visitVariable(OutputFactory.java:354)</span></div><div><span> at org.openjdk.jextract@21/org.openjdk.jextract.impl.OutputFactory.visitVariable(OutputFactory.java:54)</span></div><div><span> at org.openjdk.jextract@21/org.openjdk.jextract.impl.DeclarationImpl$VariableImpl.accept(DeclarationImpl.java:172)</span></div><div><span> at org.openjdk.jextract@21/org.openjdk.jextract.impl.OutputFactory.lambda$visitScoped$0(OutputFactory.java:201)</span></div><div><br></div><div><span>But same worked with latest changes in panama branch.</span></div><div><br></div><div><span>In
order to update cxx branch to panama branch I decided to use rebase
instead of merge (I see Maurizio was merging them instead). The reason
why I did rebase is that way our cpp changes will be always on top of
whatever changes were done in panama branch (and not spread across the
branch) so it will be easy to track them.</span></div><div><br></div><div><span>Initially we had following branch:</span></div><div><span>cxx - Maurizio initial cpp support</span></div><div><br></div><div><span>Now I added cxx2 branch which is rebase on latest panama branch with Maurizio changes.<br></span></div><div><br></div><div><span>Now, if
you remember previously we did mangle only for member functions, and
for ordinary functions we had define wrapper manually like:</span></div><div><br></div><div><span><a href="https://github.com/enatai/panamaexperiments/blob/ec76f9c2d25734a8c9f93f6b4200161b353c81f0/cppexperiments/src/main/java/libcppexperiments/CalcDistance.java" rel="noreferrer nofollow noopener" target="_blank">https://github.com/enatai/panamaexperiments/blob/ec76f9c2d25734a8c9f93f6b4200161b353c81f0/cppexperiments/src/main/java/libcppexperiments/CalcDistance.java</a></span></div><div><br></div><div><span>I fixed it so jextract mangles, in case of C++, non member functions too:</span></div><div><br></div><div><span><a href="https://github.com/enatai/jextractcpp/commit/f1f64e31702b06aa9325546013758ce912f36363" rel="noreferrer nofollow noopener" target="_blank">https://github.com/enatai/jextractcpp/commit/f1f64e31702b06aa9325546013758ce912f36363</a></span></div><span></span><div><br></div><div><span>I plan to continue to do my changes in cxx2 branch and keep rebasing it to panama branch once in a while</span></div><br></div>