mirror of
https://github.com/morluto/rea.git
synced 2026-10-26 17:35:11 +00:00
fix(android): recover original bodies when Java source is omitted
Resolve smali using frozen raw method names and full DEX descriptors. Select one complete block before truncation for missing Java, static initializers and decompiler marker fallbacks. Reject ambiguous or incomplete blocks and preserve upstream disassembly failure notes. Bind method replies to the selected descriptor with bridge protocol 3. Remove consumer placeholder/error-prefix interpretations and the superseded blanket overload fallback rejection. Producer failures now use the shared failed-tool path before truncation. Migrate protocol fixtures and consumers. Adapt the direct selector guard from PR #3450; recover original bytecode instead of inferring a holder from generated comments. Validation: 122 focused tests in 9 files; real pinned-JAR baseline regression fails and candidate passes, including overloads, aliases after generation, branches/handlers, 16-byte output and negative selection controls. Nine real CLI and nine MCP fixture calls pass with parity/identity/digest/no-mutation checks. Static/docs checks and two source reviews pass. Six completed real MCP cost workflows recorded; same calls with improved source, no speedup claim. Tiny authored APKs, macOS/JDK 21 only; reported editor APK and native Linux/Windows unverified. Heavy profiling and stress remain stopped. Fixes #3443 Co-authored-by: Taksh <takshkothari09@gmail.com>
This commit is contained in:
1 parent
742b6f587f
commit
63c65a2243
11 files changed
+271
-69
No files matched your search
@@ -147,9 +147,16 @@ queries accept the same `overload_index`; the bridge resolves the selected
|
||||
method node and the result reports its index and displayed signature. These
|
||||
indices are tied to the current artifact and engine, not stable across builds.
|
||||
|
||||
The engine's smali fallback also joins same-name overloads; REA rejects that
|
||||
fallback for an overloaded method instead of attributing all bodies to one
|
||||
selected overload. Native and abstract methods are identified from access flags
|
||||
Smali fallbacks select one complete block using the original method name and DEX
|
||||
descriptor, before applying the source byte limit. This preserves the selected
|
||||
overload even when Java code generation renames a method. If the selected Java
|
||||
body was omitted, including a method merged into a synthetic bridge, REA returns
|
||||
its original smali with the `java_body_unavailable` marker. The marker describes
|
||||
missing Java; it does not infer why the method was omitted or name a replacement.
|
||||
Unresolved or duplicate disassembly identities fail instead of attributing another
|
||||
method's instructions to the selection.
|
||||
|
||||
Native and abstract methods are identified from access flags
|
||||
captured before code generation. They report `body_status: "not_available"`, an
|
||||
empty source, and the `native_method` or `abstract_method` marker; their declarations
|
||||
are not passed through the engine's source slicer. Other missing decompiled bodies
|
||||
|
||||
Reference in new issue
Block a user