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

bug(#3481): removed globals-to-abstracts.xsl + fixed indents in to-java.xsl #3783

Merged
merged 8 commits into from
Dec 31, 2024

Conversation

maxonfjvipon
Copy link
Member

@maxonfjvipon maxonfjvipon commented Dec 30, 2024

Ref: #3481

In this PR I removed globals-to-abstract.xsl. Now such global EO object

3.14 > pi

is transpiled to such java class:

public final class EOpi extends PhOnce {
  /**
   * Ctor.
   */
  public EOpi() {
    super(
      () -> {
        Phi ret = Phi.Φ.take("org").take("eolang").take("number");
        ret = new PhCopy(ret);

          Phi ret_1 = Phi.Φ.take("org").take("eolang").take("bytes").copy();
          ret_1 = new PhWith(ret_1, 0, new PhDefault(new byte[] {(byte) 0x40, (byte) 0x09, (byte) 0x21, (byte) 0xFB, (byte) 0x54, (byte) 0x44, (byte) 0x2D, (byte) 0x18}));

        ret = new PhWith(ret, 0, ret_1);
        ret = new PhSafe(ret, "org.eolang.math.pi", 29, 0, "Φ.org.eolang.math.pi");
        return ret;
      }
    );
  }
}

As you may see - it's just lazy phi object as it supposed to without any unnecessary attributes.

Also I fixed indents in to-java.xsl. Now it looks more readable

UPD: fixed flaky thread safety problem related to accessing single HashMap inside StickyBiFunc from multiple threads in ShakeMojo and TranspileMojo

@maxonfjvipon
Copy link
Member Author

@yegor256 please check

Copy link
Member

@yegor256 yegor256 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxonfjvipon cool, thanks!

@yegor256 yegor256 added this pull request to the merge queue Dec 31, 2024
Merged via the queue into objectionary:master with commit eca8fc6 Dec 31, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants