Repository navigation
Commit cebb4a9
committed
core: migrate to jdc-core 0.2.17 (Arc<str> IR, FxHash, borrowed APIs)
jdc-core 0.2 moved the machine-neutral IR to Arc<str> payloads and
Fx-hashed maps. This ports the JVM front-end:
- Expr::Field/Method/New payloads are Arc<str>; Method.desc is
Arc<MethodDescriptor>; ConstVal::Str is Arc<str>; Catch.exc is
Vec<Arc<str>>. A small JStr bridge keeps the comparisons readable.
- Expr::New carries arg_tys: the folded <init> descriptor's formals
(the private-inner marker drop keeps it in step with args) for the
core's typed-argument rendering; raw `new` sites leave it empty.
- The structurer keys fold regions with the core's Fx maps; the textual
map is converted at the two with_diamonds call sites.
- pool::referenced_outside_nest builds its reverse index once per pool
(OnceLock) instead of once per render worker. All 18 workers used to
build it simultaneously while contending the pool mutex: JDK 28 image
sys time 19.3 s -> 11.1 s, wall 8.2 s -> 5.1 s; rt.jar 3.4 s -> 2.4 s.
Verification:
- workspace build with zero warnings; all tests green;
- features 59/59 on both structurer paths (one jdk6 SIGBUS launcher
flake with identical output);
- jclassd syntax gate: 1 syntax-bad (the established asm '()' baseline);
- corpus spot (jdk8, 30 sources): identical stats to the 0.1.11 build
(303 methods, 195 byte-equal, same failure set);
- rt.jar output differs from 0.1.11 only in the expected core-0.2 shape
families: static-member qualifiers, member-access downcast witnesses,
redundant-paren cleanup, and the while(true) loop rotation (it drops a
fabricated condition that re-evaluated the header call);
- deterministic: parallel x2 and JCDC_THREADS=1 byte-identical.
Perf (18 cores, medians): rt.jar 2.4 s / 694 MB parallel, 10.0 s /
426 MB single-threaded; JDK 28 image 5.1 s / 947 MB parallel, 25.0 s /
526 MB single-threaded. Both READMEs refreshed.1 parent 0c46b48 commit cebb4a9
14 files changed
Lines changed: 427 additions & 364 deletions
File tree
- crates
- cli/src
- decompiler/src
- jvm/src
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| |||
0 commit comments