Skip to content

bug(#5165): rename Ph* objects, batch bindings, drop PhCopy#5172

Merged
yegor256 merged 2 commits into
objectionary:masterfrom
maxonfjvipon:bug/#5165/ph-application
May 27, 2026
Merged

bug(#5165): rename Ph* objects, batch bindings, drop PhCopy#5172
yegor256 merged 2 commits into
objectionary:masterfrom
maxonfjvipon:bug/#5165/ph-application

Conversation

@maxonfjvipon

Copy link
Copy Markdown
Member

Summary

  • Rename PhMethodPhDispatch and PhWithPhApplication (runtime, tests, and to-java.xsl).
  • PhApplication now accepts several bindings at once via a new Bind value object (positional or named). to-java.xsl emits a single new PhApplication(r, new Bind(0, …), new Bind(1, …)) instead of nesting one application per binding. The single-pair constructors delegate to the varargs one.
  • Remove PhCopy. The copy that isolates an object before its bindings are applied now happens once inside PhApplication (copy the receiver, then apply all binds) — exactly mirroring the old PhCopy(receiver) + bindings. Dispatch copying remains handled by AtWithRho, so PhDispatch is a plain take.
  • φ-term renders a multi-binding application as head(0->a,1->b) and still collapses literal number/string constructions to their values.

Test plan

  • mvn -Pqulice verify is clean
  • full eo-runtime suite (incl. EOgoTest, EOwhileTest, EOmallocTest) — copy-on-application semantics preserved
  • full CI build incl. EO-source transpilation with the new generator

Groundwork for the pure-objects cache; related to #5165.

Rename PhMethod to PhDispatch and PhWith to PhApplication. PhApplication
now accepts several bindings at once through the new Bind value object, so
to-java.xsl emits a single application with multiple Bind arguments
instead of nesting one application per binding. Remove PhCopy: the copy
that isolates an object before its bindings are applied now happens once
inside PhApplication, while dispatch copying stays in AtWithRho.
@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

🚀 Performance Analysis

All benchmarks are within the acceptable range. No critical degradation detected (threshold is 100%). Please refer to the detailed report for more information.

Click to see the detailed report
Test Base Score PR Score Change % Change Unit Mode
benchmarks.XmirBench.xmirToEO 12058.341 12068.777 10.436 0.09% ms/op Average Time

⚠️ Performance loss: benchmarks.XmirBench.xmirToEO is slower by 10.436 ms/op (0.09%)

Adjust MjTranspileTest packs to the new generated output: PhMethod is now
PhDispatch, PhWith is PhApplication with Bind arguments (batched per object),
and the explicit PhCopy line is gone since the copy moved into PhApplication.
@sonarqubecloud

Copy link
Copy Markdown

@maxonfjvipon

Copy link
Copy Markdown
Member Author

@yegor256 please check

@yegor256
yegor256 merged commit ae6e54b into objectionary:master May 27, 2026
25 of 26 checks passed
@0crat

0crat commented Jun 9, 2026

Copy link
Copy Markdown

@maxonfjvipon Great work on your contribution! 🎉 You've earned +4 points (+16 base, -4 for 922 hits-of-code ≥ 100, -8 for 922 ≥ 400). Quality over quantity helps maximize your rewards! Your total score is now +165 - check your Zerocracy account for details.

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.

3 participants