summaryrefslogtreecommitdiff
path: root/chapter33/src/test/java/com
Commit message (Collapse)AuthorAgeFilesLines
* Refresh singleton escapes after type closure and preserve saved calleesch33_try2Cliff Click3 hours3-1/+44
| | | | Recompute final singleton-slot escapes after recursive types are interned. Preserve aggregate, mutable-slot, and opaque bounds. Sharper escapes allow unused imported helpers to die: restore their summaries when later direct calls appear, and retain native entries referenced by serialized IR even when lowering removes the last local caller. Seed those entries with analyzed ranges, and interpret only callback default memory as an outside interface. Add recursive-type and native interpolation regressions; full make -k -j8 tests passes (844 executions).
* Publish escapes from the selected field valueCliff Click4 hours1-0/+51
| | | | Keep prior public escapes and derive new escapes from the field value bounded by its declaration. Do not import unrelated aggregate-private escapes or broaden them when selecting a weaker alias slice. Cover callback publication, alias selection, borrows, and opaque referents. Full make -k -j8 tests passes.
* Start constructor private-memory defaults without escapesCliff Click4 hours2-0/+43
| | | | Use the same defaultArg rule for parsed functions and imported summaries, while preserving broad signature bounds and actual call memory. Add source and separately compiled constructor regressions. Full make -k -j8 tests passes.
* Separate summary call dependencies from function escapesCliff Click4 hours2-0/+32
| | | | Restore a discarded private initializer summary when a later inline import reveals its direct call. Keep class-init dependencies for cycle checking without publishing their function pointers. Cover escape separation and unloaded private initializer cycles; full make -k -j8 tests passes.
* Replace XInt with TypeSet while preserving existing set semanticsCliff Click4 hours8-74/+100
| | | | | | | | Migrate function targets, escape aliases/functions, RPC sets, struct caches, compiler consumers, and serialized types. Keep uniform defaults and the existing cofinite import remapping so this step does not alter parsing or escape policy. Clear lazy struct set caches before recycling TypeSets on reset. Remove XInt source. Use C0DC for the new packed set layout and test rejection of C0D2 objects. Add packing and word-boundary coverage. Before migration, differential checks matched XInt for 10,000 finite/cofinite pairs and 11 million memberships. Validation: make -k -j8 tests passes after rebuilding old-format caches (835 executions), including four lattice shards and native/separate-compilation tests. Warmed TypeSet intern hits allocate no storage. git diff --cached --check passes.
* Add interned TypeSet with duals, reset, and reusable scratch storageCliff Click4 hours1-0/+186
| | | | | | Retain the local/external default design and explicit rebasing API. Add uniform-default overloads for migrating existing finite/cofinite compiler sets without changing import semantics. Tests cover the lattice, discovery, rebasing, reset, and allocation-free warmed intern hits. Validation: make -k -j8 tests passes (834 executions); existing compiler sites still use XInt at this checkpoint.
* Eliminate repeated sign extension of already narrowed integersCliff Click4 hours3-1/+72
| | | | | | Fold matching left/right shifts when their input already has the signed result type. Cover i8/i16/i32 boundaries, unequal shifts, unsigned input, branch Phis, and worklist propagation after narrowing. Update the affected Chapter13 IR expectation; retain all spill baselines. Validation: the repeated-extension test fails before the fix. make -k -j8 tests passes (829 executions), and Chapter33Test plus WorklistTest pass with simple.assert.expensive=1.
* Parse complete qualified forward type names in type contextsCliff Click4 hours1-0/+55
| | | | | | Consume nested type names through open definitions and forward references, including new expressions. Resolve expression primaries separately so dotted member access remains a sequence of loads. Commit forward types only after recognizing a type context. Validation: reproduced two parsing failures before the fix. Four qualified-name regressions and the complete make -k -j8 tests suite pass (825 executions).
* Extract the shared WorkList and accept dead-self peephole resultsCliff Click4 hours1-0/+44
| | | | | | Move the deduplicating node worklist into util, including traversal marks. Skip replacement processing when a peephole has already killed its returned self. Add regressions for traversal/requeue behavior and a rewrite that subsumes itself. Validation: the dead-self regression fails at the old assertion; make -k -j8 tests passes with both regressions (821 executions).
* Start chapter 33 again from the green chapter 32 baselineCliff Click4 hours203-0/+21450
Copy the completed chapter 32 snapshot into chapter33 and register the new Maven and IDE module. Update chapter paths and introductory documentation; retain the chapter 32 compiler behavior. Preserve the previous memory-management attempt on ch33_wip for selective follow-up changes. Validation: make -k -j8 tests passes with 819 JUnit test executions, including all four lattice shards and native/library integration. git diff --cached --check passes.