Allow MappingGenerator to keep the same name for method bridges

Aperta
#800 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java

Direzione di ricerca

Inizia tracciando MappingGenerator e NameGenerator, quindi esamina come sono rappresentati i metodi bridge e le firme dei metodi nell’esempio del modello. Determina come dovrebbe essere tracciata una relazione generica “il metodo è un bridge verso questo metodo” e verifica che i metodi bridge mappati mantengano il nome del metodo reale usando al contempo la firma del genitore.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Rough idea given the following model:

abstract class Base<T extends Foo> {
  abstract void accept(T input);
}

class Impl extends Base<FooImpl> {
  void accept(FooImpl input); // becomes bridge to method with signature from parent xlass
  
  // void accept(Foo input); // Method implementation goes here in actuality
}

Currently the mapping generator will see the two methods in Impl as having different signatures and will thus allow the passed NameGenerator to create unique names for each. For keeping things pretty in the decompiler output, it would be nice if we could have these bridge methods share the same name as the real method taking on the parent method's signature.

I think having a generic system to track "this method is a bridge to this method" would be nice, which once completed could be plugged into the MappingGenerator code with ease.

Lingua principale
Java
Stelle
7.5k
Fork
549
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Col-E/Recaf

Tutte le issue di Col-E/Recaf

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.