mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-21 12:42:51 +00:00
refactor: port method symbol full names to Java
This commit is contained in:
1 parent
55f21ef7df
commit
a670ea3edb
4 files changed
+36
-11
No files matched your search
@@ -16,7 +16,7 @@ migration checkout; `codex/tile-compatibility-fixes` was deleted after its fixes
|
||||
|
||||
## Current state and next target
|
||||
|
||||
**491 plain-JVM tests and 237 Java 8 Forge tests pass, with zero failures/errors/skips.** Sources total **224 Java
|
||||
**498 plain-JVM tests and 237 Java 8 Forge tests pass, with zero failures/errors/skips.** Sources total **224 Java
|
||||
files and 9 Scala files / 744 nonblank Scala lines**. The packaged inventory has 443 classes.
|
||||
|
||||
Review follow-up: restored packet-scheduler callback mutation behavior with the original Scala hash-map traversal,
|
||||
@@ -24,16 +24,15 @@ virtual tile accessor dispatch throughout `TMultiPart`, and null-safe equality f
|
||||
Six JVM and two Forge regression cases cover the fixes. Callable signatures remain unchanged; the packet traversal
|
||||
callback adds one anonymous class. See the latest history entries for the individual fixes and validation.
|
||||
|
||||
Latest bounded target: `ScalaSignature.ClassSymbolRef.full` delegates owner/name concatenation to
|
||||
`ScalaSignatureParser.classSymbolFull`. Seven characterization tests were committed first as `05c2792`. They pin
|
||||
literal/null results, owner/full/name read order, repeated uncached reads, failure boundaries, unused member access
|
||||
and the legacy static trait helper descriptor. A frozen Scala 2.11.5 caller and direct trait implementation preserve
|
||||
the old `$class.full` bridge. All 491 frozen JVM consumers pass; checks preserve 442 retained class/member APIs, all
|
||||
17 ScalaSignature payloads, 3,740 unrelated method bodies and all 116 generated dumps. No class is added or removed;
|
||||
the total stays 443 classes. Evidence: `run/migration-class-symbol-full-reference/`.
|
||||
Latest bounded target: `ScalaSignature.MethodSymbol.full` delegates owner/name concatenation to
|
||||
`ScalaSignatureParser.methodSymbolFull`. Seven characterization tests were committed first as `55f21ef`. They pin
|
||||
literal/null results, owner/full/name read order, repeated uncached reads, failure boundaries, unused derived-member
|
||||
access and the old Scala caller descriptor. All 498 frozen JVM consumers pass; checks preserve 442 retained
|
||||
class/member APIs, all 17 ScalaSignature payloads, 3,741 unrelated method bodies and all 116 generated dumps. No
|
||||
class is added or removed; the total stays 443 classes. Evidence: `run/migration-method-symbol-full-reference/`.
|
||||
|
||||
**Next bounded candidate: `ScalaSignature.MethodSymbol.full`.** Characterize owner/name concatenation, virtual read
|
||||
order, nulls and failures while retaining the case-class and path-dependent declarations.
|
||||
**Next bounded candidate: `ScalaSignature.ClassSymbolRef.jParent`.** Characterize info/parent/name lookup order,
|
||||
nulls and failures while retaining the trait, case-class and path-dependent declarations.
|
||||
Keep case-class/product/serialization shapes and simple model accessors. Broader shell replacement and opcode
|
||||
algorithm fixes remain separate work.
|
||||
The external ProjectRed Scala-trait fixture and ScalaSignature model bridges remain required. Actual client
|
||||
|
||||
@@ -1601,3 +1601,24 @@ differences belong in the [divergence ledger](../../JAVA_MIGRATION_DIVERGENCES.m
|
||||
frozen tests/resources, reports, logs and comparison tools. Frozen runs use its `version.txt`; final builds use the
|
||||
committed version. Sources remain 224 Java files and nine Scala files / 744 nonblank lines. Next:
|
||||
`MethodSymbol.full`, preserving owner/name concatenation, virtual reads and failure order.
|
||||
|
||||
### 2026-09-04 — ScalaSignature method-symbol full names
|
||||
|
||||
- Committed seven JVM characterization cases first as `55f21ef` against the untouched `MethodSymbol.full`. They pin
|
||||
constructor and punctuation names, literal null full/name results, repeated owner/full/name read order, null-owner
|
||||
and getter failure boundaries, unused derived members and a frozen Scala caller's descriptor/null behavior.
|
||||
- Added `ReferenceScalaMethodSymbolFull`, compiled once with Scala 2.11.5 under Java 8 against the unchanged dev jar
|
||||
at `64f5abc`. Its frozen Scala caller preserves source-compiled dispatch while Java accessor overrides exercise the
|
||||
public JVM virtual surface. Source, encoded class and SHA-256 provenance are committed under `src/test/fixtures/`
|
||||
and `src/test/resources/compat/`; do not regenerate them against the port.
|
||||
- Extracted concatenation into `ScalaSignatureParser.methodSymbolFull(Object)`. Java retains owner getter, virtual
|
||||
owner `full()` and name getter order plus Java/Scala null string conversion. Scala keeps the inferred return type,
|
||||
case class, path-dependent declaration, products and serialization shape.
|
||||
- Normal and clean validation pass 498 JVM tests, all 498 frozen consumers and 237 Java 8 Forge tests with zero
|
||||
failures/errors/skips. All 116 generated dumps match. Both jars contain 443 Java 8 classes and matching sources;
|
||||
comparison preserves 442 retained class/member APIs, all 17 ScalaSignature payloads and 3,741 unrelated method
|
||||
bodies. The helper adds one package-private method; no class inventory or effective divergence changes.
|
||||
- Evidence is under ignored `run/migration-method-symbol-full-reference/`, including the reference/fixture jars,
|
||||
frozen tests/resources, reports, logs and comparison tools. Frozen runs use its `version.txt`; final builds use the
|
||||
committed version. Sources remain 224 Java files and nine Scala files / 744 nonblank lines. Next:
|
||||
`ClassSymbolRef.jParent`, preserving info/parent/name lookup order and failures.
|
||||
@@ -81,7 +81,7 @@ class ScalaSignature(val bytes: Bytes) {
|
||||
infoId: Int
|
||||
) extends SymbolRef {
|
||||
override def toString = ScalaSignatureParser.methodSymbolString(this)
|
||||
def full = owner.full + "." + name
|
||||
def full = ScalaSignatureParser.methodSymbolFull(this)
|
||||
|
||||
def info: TMethodType = evalT(infoId)
|
||||
def jDesc = info.jDesc
|
||||
|
||||
@@ -107,6 +107,11 @@ final class ScalaSignatureParser {
|
||||
+ ")";
|
||||
}
|
||||
|
||||
static String methodSymbolFull(Object value) {
|
||||
ScalaSignature.MethodSymbol symbol = (ScalaSignature.MethodSymbol) value;
|
||||
return symbol.owner().full() + "." + symbol.name();
|
||||
}
|
||||
|
||||
static byte[] section(Bytes bytes) {
|
||||
byte[] array = bytes.arr();
|
||||
int start = bytes.pos();
|
||||
|
||||
Reference in new issue
Block a user