Allow MappingGenerator to keep the same name for method bridges

オープン
#800 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java

調査の方向性

まず MappingGenerator と NameGenerator を追跡し、次にモデル例で bridge メソッドとメソッドシグネチャがどのように表現されているかを調べます。一般的な「メソッドがこのメソッドへの bridge である」という関係をどのように追跡すべきかを判断し、マッピングされた bridge メソッドが実際のメソッドの名前を保持しながら親のシグネチャを使用していることを確認します。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Java
スター
7.5k
フォーク
549
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Col-E/Recaf のほかの issue

Col-E/Recaf の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。