Repository navigation
Remove abandoned binary AST generation and persistence - #692
Merged
Merged
Conversation
Keep executable bytecode and the compiler source AST while removing the duplicate binary tree classes, compiler construction, caches and register serialization support. Preserve existing method records by skipping legacy metadata on read and writing an empty reserved slot. Add regression coverage for legacy payload consumption, truncation and rewriting without changing executable code.
ggleyzer
requested changes
Oct 12, 2026
ggleyzer
approved these changes
Oct 12, 2026
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why?
How?
.xtcformat to 0.20261012. Executable instructions are followed immediately by source information.Implications
This is an independent PR against current master, including the already merged Gradle compiler-model export. It needs none of the pending embedding or LSP changes. The diff touches 128 files (+697/−8317); most changes remove binary AST generation interleaved with existing bytecode generation.
The removed Java
org.xvm.asm.astclasses and associated accessors are intentionally no longer available. No active repository runtime, JIT orlangconsumer uses them. This does not remove the compiler'sorg.xvm.compiler.astmodel or the syntax/semantic model needed by the compiler-backed LSP.This intentionally changes the binary file format. Existing
.xtcmodules must be rebuilt with the new compiler, and the runtime and modules must use matching formats. There is no legacy skip/write-zero compatibility shim. Real artifact checks verify that new bytecode executes and that both old-reader/new-file and new-reader/old-file combinations fail explicitly with an unsupported-version error, before method records are interpreted.Changes
javatools/src/main/java/org/xvm/asm/ast/: remove the abandoned binary AST implementation.javatools/src/main/java/org/xvm/asm/MethodStructure.java: persist executable method code and source information directly, with no discarded metadata slot. The forced-assembly path no longer writes the temporary registry field.javatools/src/test/java/org/xvm/asm/MethodCodePersistenceTest.java: four regressions covering record boundaries, the exact emitted record layout, source/code round trips through normal and forced assembly, and early rejection of the previous file version.version.properties: update the format version consumed byFileStructurethrough generated build information.lValues/lValuesAllnames in assignment-related AST nodes, including the reflective child-field metadata; compact the loop-label constants and debugger parameter-array declarations.else. Rollout is explicitly limited to the 67 Java files already touched by this removal, listed ingradle/java-layout-files.txt; only 27 needed automatic formatting. No repository-wide whitespace rewrite is included. Literal/comment preservation and idempotence have regression coverage.Known follow-ups
The integration follow-up is complete in the eight prepared compiler/LSP integration and comparison branches. Atomic regressions now execute serialized bytecode and check results and receiver mutations; switch checks inspect executable instructions; partial-analysis checks assert that no executable operations were emitted. Removed classes, accessors, imports and test assertions are gone. The compiler source AST and semantic/cursor facts are retained.
The production
.xtcconsumers continue to useFileStructure; they need no separate metadata parser. The rebuilt compiler and packaged-server JARs contain none of the removed classes. Stacked comparison-base merges preserve the tested source trees and keep this shared removal out of each incremental feature diff.Manual verification
After the file-format change:
spotlessCheckpassed and a repeated run reused the configuration cache.try/finally. Explicit mismatched-version rejection passed in both reader/file directions.lang, tests and build logic. All shared changes are synchronized, and comparison-branch ancestry is preserved.Fresh forced validation of the full compiler/LSP reference also passed against the new format: 2,246 LSP tests, 82 packaged-server tests, 545 compiler/runtime tests, 118 utility tests and 50 DSL tests, with zero failures/errors. The respective existing skips were 2, 0, 42, 2 and 0; these are separate from the pass counts. The 120-cycle retention workload issued 960 edit requests and observed 3,154 weak references with zero retained compiler objects after close/shutdown. Root formatting passed, and the worktree remained clean.
All 25 review threads are addressed and resolved. Review has been requested again from @ggleyzer, @cpurdy and @thegridman.
The follow-up readability cleanup in
c8d4d9a98rebuilt the XDK and passed 390 Java tests (42 existing skips), Spotless, and eight AST field-model/tree-copy checks in the synchronized compiler/LSP branch (no skips). The earlier CI failure was a VS Code version-resolution network timeout; rerun attempt 2 passed all required jobs without a source change. The cleanup commit starts a fresh CI run.