Skip to content

Refine Eclipse M3 slot ranks and JFace source ranges - #26

Merged
hsoliwal merged 1 commit into
masterfrom
m3/eclipse-array-range-refinement-20261021
Oct 21, 2026
Merged

hsoliwal merged 1 commit into
masterfrom
m3/eclipse-array-range-refinement-20261021

Conversation

@hsoliwal

@hsoliwal hsoliwal commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Why this change is needed

The M3 marker implementation merged in #21 already stores rows in blocked primitive arrays. M3SlotOrder.get and rank lookup still scan preceding block lengths, while JFace mnemonic removal creates temporary substrings solely to append them to a builder.

This PR refines those actual Eclipse owners through the canonical Synexia recipes, retaining the existing APIs and observed contracts.

Changes

  • Add private primitive cumulative block counts to M3SlotOrder. Prefix sums, point updates and cumulative selection reuse pinned Synexia/SWT Fenwick implementations. Directories of at most eight blocks retain the measured cheaper scan.
  • Preserve the original comparator operands/order, caller-array effects, bounds and failure observations. Incomplete fill invalidates derived counts and retains the original scan behavior.
  • Change exactly three builder append inputs in LegacyActionTools.removeMnemonics to source ranges. UTF-16 scanning, escaped/trailing ampersands, DBCS behavior and reference relationships remain unchanged.
  • Remove three unread private M3MarkerCategory fields and their dead write, fixing the owning compiler errors. Keep its no-op clearCache() override so it does not inherit child traversal.
  • Move the existing five M3IndexTest tests byte-for-byte into a Java 21 JFace host fragment and add seven mnemonic regression tests. No production exports are added.
  • Package donor notices and the full Apache licence in both ui.ide distributions. The final source header distinguishes the Apache-only LongFenwick portions from the original/SWT dual-granted portions.

Qualification

Gate Actual result
M3SlotOrder differential, per JDK 21 and 25 3,900,772 paired operations; 46 scenarios; 32,845,623 comparator-call traces; zero differences
LegacyActionTools differential, per JDK 21 and 25 2,302,521 inputs; 33,691,962 UTF-16 units; zero differences
API and failure controls Existing surfaces preserved; failed-fill and trailing-ampersand mutants rejected
Final real SDK replay on the receiving checkout (JDK 21) Five passes, seven tests each; 35 passed, zero changes, stable source hashes
Actual offline Tycho JFace host/fragment 12 passed: five M3 index tests and seven mnemonic tests
Actual offline Tycho marker-owning reactor, with -am 23 passed: six marker algorithms, sixteen harness tests, one geometry test
Actual binary/source JARs Exact about.html and Apache licence present; final Java header/source present in source JAR
Independent review No findings within the recorded scope

The selected Tycho tests have zero failures, errors or skips. Builds use Maven 3.9.12 and fixed SDK I20261018-2300; missing-artifact attempts and bounded dependency bootstrap are retained, followed by successful offline clean verify runs. The final source index matches all fifteen paths, the old test is absent, and all 573 earlier JFace inputs plus 2,250 final marker inputs remain unchanged.

The licensed M3SlotOrder source is SHA-256 e43165029073da1da0501210f450711d81d4d0f7685de349413899d4a39a685d. Its 9,579 bytes from the package declaration onward exactly match the behaviorally qualified fd75ecf5… candidate. The final source also passes Java 21 all-lint compilation with warnings as errors.

Measured tradeoffs

These are finite standalone JDK 21 measurements, not UI latency or complete M3JDK21 runtime results:

  • At 1,048,576 rows, two-fork median indexed lookup changes from 578.104 to 57.913 ns/op; rank lookup from 485.081 to 261.801 ns/op.
  • Count metadata adds 8,224 allocated bytes during the measured million-row construction/fill.
  • An all-Fenwick small-directory candidate regressed and was superseded. Its source/results remain in the catalogue.
  • Sampled mnemonic cases allocate 33–78% fewer bytes; the sampled inputs without ampersands remain allocation-free. Focused warmed short/long samples also improve, with all raw samples retained.

Recipe ownership and runtime connection

Canonical recipes, donor pins, category catalogue, selection/rejection rationale, exact fixtures, raw logs and replay instructions: com.synexia #12665.

The existing M3JDK21 String owner receives the public range-append API under its own admission conditions. The JFace pass reuses that API without copying JDK implementation bodies. Related Java collection/JNI work is M3JDK21 #1619, with prerequisite #1618. This Eclipse pass introduces no additional JNI symbol.

Scope and remaining gates

Draft for review. The current ui.ide reactor requires Java 25; the actual Eclipse Tycho build/test runtime was JDK 25, although JFace and its fragment emit Java 21 classes. The recipe SDK gate uses JDK 21. This does not qualify the full current IDE on M3JDK21.

Full UI/native smoke execution, a complete source-built M3JDK21 image, repository-wide dependency source closure, and the remaining marked-source census are separate gates. The catalogue records the existing resource-scoped marker-identity issue and rejects map/mask substitutions that change observable key or alias behavior. Those issues are not claimed fixed here.

Receiving base: 10da6ccd9b8c109a2e507a4fbc7afdc7f53eb264. It has exactly the same tree as the originally frozen #21 head.

Preserve array payloads, comparator and UTF-16 contracts through qualified Synexia recipes. Repair owning test placement and dead cache fields; ship pinned donor notices with the actual bundle.

Validation: 35 final SDK tests, 35 selected offline Tycho tests, independent Java 21/25 differentials, and exact binary/source attribution checks. Full UI/native and complete M3JDK21 image gates remain open.
@hsoliwal
hsoliwal marked this pull request as ready for review October 21, 2026 04:48
@hsoliwal
hsoliwal merged commit 760a060 into master Oct 21, 2026
1 of 4 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.

1 participant