golang/go

cmd/compile: don't compile some unexported, inlined functions

オープン

#41,117 opened on 2020/08/28

 (5 件のコメント) (2 件のリアクション) (0 人の担当者)Go (19,008 件のフォーク)batch import
NeedsInvestigationToolSpeedcompiler/runtimehelp wanted

Repository metrics

Stars
 (133,883 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

If a function is:

  • inlined at all call sites
  • not exported
  • not referred to by value (any uses of the function are as a static call)
  • not present in any interface types in its containing package

then we don't need to compile that function.

I suspect that these conditions are frequently met, cheap to check, and reasonably easy to implement.

I thought we had an issue for this, but I don't see one. I don't plan to work on this. I'm filing it in case someone else wants to. :)

コントリビューターガイド