Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the @name attribute seems to be redundant #923

Closed
yegor256 opened this issue Nov 29, 2024 · 8 comments
Closed

the @name attribute seems to be redundant #923

yegor256 opened this issue Nov 29, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request soon This issue will be solved soon

Comments

@yegor256
Copy link
Member

This is what I see in XMIR after jeo:disassemble:

[..]
<o base="jeo.seq.of3" name="@">
  <o base="jeo.opcode.aload" name="aload-1C"><!-- #25:aload(0) -->
    <o base="jeo.int"><!-- 25 -->
      <o base="org.eolang.bytes">00-00-00-00-00-00-00-19</o>
    </o>
[...]

Here, I believe, you may stop using @name attribute, since you have all necessary information in the @base -- you know the name of the opcode.

If you remove @name, you can remove three XSL from the unroll procedure: add-cuts.xsl, remove-cuts.xsl, and vars-float-down.xsl.

@yegor256
Copy link
Member Author

@volodya-lombrozo check this out please

@volodya-lombrozo
Copy link
Member

@yegor256 I will check it, thank you.

@volodya-lombrozo volodya-lombrozo self-assigned this Nov 29, 2024
@volodya-lombrozo volodya-lombrozo added enhancement New feature or request soon This issue will be solved soon labels Nov 29, 2024
volodya-lombrozo added a commit to volodya-lombrozo/jeo-maven-plugin that referenced this issue Dec 3, 2024
volodya-lombrozo added a commit to volodya-lombrozo/jeo-maven-plugin that referenced this issue Dec 3, 2024
volodya-lombrozo added a commit to volodya-lombrozo/jeo-maven-plugin that referenced this issue Dec 3, 2024
@volodya-lombrozo
Copy link
Member

@yegor256 I have removed opcode names and then add-cuts.xsl, remove-cuts.xsl, and vars-float-down.xsl transformations from the unroll procedure. And after it the tests failed. Seems, just removing names doesn't help.
You can find more info here: #935

@yegor256
Copy link
Member Author

yegor256 commented Dec 3, 2024

@volodya-lombrozo I don't see the logs of failure in the PR :(

@volodya-lombrozo
Copy link
Member

volodya-lombrozo commented Dec 3, 2024

@yegor256 Here is the failed pipeline: https://github.com/objectionary/jeo-maven-plugin/actions/runs/12135454483/job/33834545174?pr=935

As you can see, the phi-unphi integration test failed:

Error:  The following builds failed:
Error:  *  phi-unphi/pom.xml

Here are logs from the phi-unphi integration test:
build.log

By using the following link you may download the failed pipeline folders (and find exact files that were created during all phases): https://github.com/objectionary/jeo-maven-plugin/actions/runs/12135454483/artifacts/2265953649

Long story short, I'm getting something like:

Caused by: java.lang.IllegalArgumentException: Annotation [o: null] has no child at index 0
    at org.eolang.jeo.representation.xmir.XmlAnnotation.child (XmlAnnotation.java:99)
    at org.eolang.jeo.representation.xmir.XmlAnnotation.descriptor (XmlAnnotation.java:78)
    at org.eolang.jeo.representation.xmir.XmlAnnotation.bytecode (XmlAnnotation.java:58)
    at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:195)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining (ArrayList.java:1655)
    at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:484)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:474)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential (ReduceOps.java:913)
    at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect (ReferencePipeline.java:578)
    at org.eolang.jeo.representation.bytecode.BytecodeAnnotations.<init> (BytecodeAnnotations.java:61)
    at org.eolang.jeo.representation.xmir.XmlAnnotations.bytecode (XmlAnnotations.java:54)
    at java.util.Optional.map (Optional.java:265)

It means, that phi/unphi makes the final xmir unreadable by jeo.

volodya-lombrozo added a commit to volodya-lombrozo/jeo-maven-plugin that referenced this issue Dec 3, 2024
volodya-lombrozo added a commit to volodya-lombrozo/jeo-maven-plugin that referenced this issue Dec 3, 2024
@0pdd
Copy link

0pdd commented Dec 3, 2024

@yegor256 the puzzle #936 is still not solved.

@yegor256
Copy link
Member Author

yegor256 commented Dec 3, 2024

@volodya-lombrozo thanks!

@yegor256 yegor256 closed this as completed Dec 3, 2024
@0pdd
Copy link

0pdd commented Feb 12, 2025

@yegor256 the only puzzle #936 is solved here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request soon This issue will be solved soon
Projects
None yet
Development

No branches or pull requests

3 participants