[インデックス 14333] ファイルの概要
このコミットは、Goコンパイラのcmd/gcにおけるレース検出(racewalk)の変換処理において、関数呼び出しが二重に行われる問題を修正するものです。具体的には、チャネル操作などの際に、レース検出のためのインストゥルメンテーションが元の式に含まれる関数を複数回評価してしまう挙動を改善し、単一の評価で済むように変更しています。
コミット
commit abb313f8c8980ed69d4618823d9f4a05c7acff9d
Author: Dmitriy Vyukov <dvyukov@google.com>
Date: Wed Nov 7 12:06:27 2012 +0400
cmd/gc: racewalk: do not double function calls
Current racewalk transformation looks like:
x := <-makeChan().c
\/\/\/\/\/\/\/\/\/\/
runtime.raceread(&makeChan().c)
x := <-makeChan().c
and so makeChan() is called twice.
With this CL the transformation looks like:
x := <-makeChan().c
\/\/\/\/\/\/\/\/\/\/
chan *tmp = &(makeChan().c)
raceread(&*tmp)
x := <-(*tmp)
Fixes #4245.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6822075
GitHub上でのコミットページへのリンク
https://github.com/golang/go/commit/abb313f8c8980ed69d4618823d9f4a05c7acff9d
元コミット内容
cmd/gc: racewalk: do not double function calls
Current racewalk transformation looks like:
x := <-makeChan().c
\/\/\/\/\/\/\/\/\/\/
runtime.raceread(&makeChan().c)
x := <-makeChan().c
and so makeChan() is called twice.
With this CL the transformation looks like:
x := <-makeChan().c
\/\/\/\/\/\/\/\/\/\/
chan *tmp = &(makeChan().c)
raceread(&*tmp)
x := <-(*tmp)
Fixes #4245.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6822075
変更の背景
Go言語には、並行処理におけるデータ競合(data race)を検出するための組み込みのレース検出器(Race Detector)があります。この検出器は、プログラムの実行時にメモリへのアクセスを監視し、競合状態を特定します。レース検出器は、コンパイル時にコードに特別なインストゥルメンテーション(計測コード)を挿入することで機能します。
このコミットが修正しようとしている問題は、このインストゥルメンテーションの過程で発生していました。元の実装では、x := <-makeChan().c のような式に対してレース検出のコードを挿入する際、makeChan().c の部分が二重に評価されてしまう可能性がありました。makeChan()が副作用を持つ関数である場合(例えば、毎回新しいチャネルを生成するなど)、この二重評価はプログラムのセマンティクスを破壊したり、パフォーマンスに悪影響を与えたりする深刻なバグにつながります。
コミットメッセージの例では、makeChan().c が2回呼び出されることで、runtime.racereadが1回目のmakeChan()の結果に対して動作し、その後のx := <-makeChan().cが2回目のmakeChan()の結果に対して動作するという問題が示されています。これは、レース検出器が正しく機能しないだけでなく、プログラムの挙動自体が変わってしまうことを意味します。この問題を解決し、makeChan()のような関数が一度だけ評価されるようにすることが、この変更の主な目的です。
前提知識の解説
Go言語のレース検出器 (Race Detector)
Go言語のレース検出器は、並行プログラムにおけるデータ競合を特定するためのツールです。データ競合とは、複数のゴルーチンが同時に同じメモリ位置にアクセスし、少なくとも1つのアクセスが書き込みであり、かつそれらのアクセスが同期メカニズムによって保護されていない場合に発生します。データ競合は、プログラムの予測不能な動作、クラッシュ、または誤った結果を引き起こす可能性があります。
レース検出器は、プログラムを-raceフラグ付きでコンパイルすることで有効になります。コンパイラは、メモリへの読み書き操作の近くに特別なコード(インストゥルメンテーション)を挿入します。実行時、これらのインストゥルメンテーションコードがメモリアクセスを監視し、競合パターンを検出すると警告を出力します。
Goコンパイラ (cmd/gc)
cmd/gcは、Go言語の公式コンパイラです。Goのソースコードを機械語に変換する役割を担っています。コンパイルプロセスには、字句解析、構文解析、型チェック、中間表現の生成、最適化、コード生成など、多くの段階が含まれます。レース検出器のインストゥルメンテーションは、このコンパイルプロセスの途中で、抽象構文木(AST)や中間表現(IR)に対して行われます。
racewalk
racewalkは、Goコンパイラ(cmd/gc)内部の特定のフェーズを指します。このフェーズでは、レース検出器を有効にしてコンパイルする際に、データ競合を検出するためのコード(runtime.racereadやruntime.racewriteなど)をプログラムのASTに挿入します。racewalkは、プログラム内のすべてのメモリアクセス(変数への読み書き、ポインタのデリファレンス、チャネル操作など)を走査し、必要に応じてレース検出コードを追加します。
抽象構文木 (AST)
コンパイラは、ソースコードを直接操作するのではなく、まずその構造を抽象構文木(AST)として表現します。ASTは、プログラムの構造を階層的に表現したツリー構造で、各ノードがプログラムの要素(変数、演算子、関数呼び出しなど)を表します。コンパイラの最適化や変換処理は、このASTに対して行われます。racewalkもASTを走査し、ノードを変換することでレース検出コードを挿入します。
技術的詳細
このコミットの核心は、racewalk変換における式の評価順序と副作用の取り扱いです。
元のracewalk変換では、x := <-makeChan().cのような式があった場合、レース検出のためにruntime.raceread(&makeChan().c)というコードが挿入されていました。このとき、makeChan().cという部分式が、runtime.racereadの引数として一度評価され、その後、元の代入文x := <-makeChan().cで再度評価されるという問題がありました。
この問題は、makeChan()が関数呼び出しであり、その呼び出しが副作用を持つ可能性があるために発生します。例えば、makeChan()が毎回新しいチャネルを生成するような場合、runtime.racereadが監視するチャネルと、実際に値が読み取られるチャネルが異なるものになってしまい、レース検出が正しく機能しないか、プログラムのロジックが壊れる可能性がありました。
このコミットでは、この二重評価を避けるために、一時変数(temporary variable)を導入する戦略を採用しています。新しい変換では、makeChan().cのような副作用を持つ可能性のある式を評価し、その結果を一時変数に格納します。そして、レース検出のコード(racereadなど)と元の操作(チャネルからの読み取りなど)の両方が、この一時変数を通じてアクセスするように変更されます。
具体的には、以下の変換が行われます。
変換前:
x := <-makeChan().c
変換後(このコミットによる改善):
// makeChan().c の結果を一時変数 `tmp` に格納
chan *tmp = &(makeChan().c)
// レース検出器は一時変数 `tmp` を介してアクセス
raceread(&*tmp)
// 元の操作も一時変数 `tmp` を介してアクセス
x := <-(*tmp)
この変換により、makeChan()は一度だけ評価され、その結果がtmpに保存されます。その後、racereadとチャネルからの読み取りの両方がtmpを参照するため、副作用の二重評価が回避されます。
この変更は、src/cmd/gc/racewalk.c内のcallinstr関数のロジックに影響を与えます。callinstrは、特定のノード(式)に対してレース検出のインストゥルメンテーションが必要かどうかを判断し、必要な場合はそのコードを生成する役割を担っています。このコミットでは、callinstrがノードへのポインタを受け取るように変更され、必要に応じてノード自体を一時変数に置き換えるdetachexpr関数が導入されています。また、式の中に副作用を持つ関数呼び出しが含まれているかを検出するためのforeachおよびhascallspred関数も追加されています。
コアとなるコードの変更箇所
変更は主に src/cmd/gc/racewalk.c ファイルに集中しています。
-
callinstr関数のシグネチャ変更:static int callinstr(Node *n, NodeList **init, int wr, int skip);からstatic int callinstr(Node **np, NodeList **init, int wr, int skip);に変更されました。これにより、callinstrはノードへのポインタを受け取り、必要に応じてそのポインタが指すノード自体を置き換えることができるようになりました。 -
racewalknode内のcallinstr呼び出し順序の変更:ODOT,ODOTPTR,OIND,ONAME,OINDEXなどのケースで、racewalknodeが子ノードを走査する前にcallinstrを呼び出していた箇所が、子ノノードの走査後にcallinstrを呼び出すように変更されました。これは、子ノードの評価が完了し、その結果が確定した後にレース検出のインストゥルメンテーションを行うためです。 -
callinstr内のロジック変更:Node *n;が追加され、n = *np;で引数からノードを取得しています。TSTRUCT型の処理において、構造体のフィールドアクセス(OXDOT)に対して再帰的にcallinstrを呼び出す際に、callinstr(&f, init, wr, 0)のようにノードへのポインタを渡すように変更されました。- ヒープ上の変数やポインタのデリファレンスなど、レース検出が必要なケースにおいて、式の中に副作用を持つ関数呼び出しが含まれているかを
foreach(n, hascallspred, &hascalls)でチェックし、もし含まれていればn = detachexpr(n, init);を呼び出して一時変数に置き換える処理が追加されました。
-
新しいヘルパー関数の追加:
static Node* detachexpr(Node *n, NodeList **init): 式を評価し、その結果を一時変数に格納するコードを生成します。元の式は、この一時変数への間接参照に置き換えられます。static void foreachnode(Node *n, void(*f)(Node*, void*), void *c): 単一のノードに対して指定された関数を適用します。static void foreachlist(NodeList *l, void(*f)(Node*, void*), void *c): ノードリストの各ノードに対して指定された関数を適用します。static void foreach(Node *n, void(*f)(Node*, void*), void *c): ノードとそのすべての子ノード(式、初期化リスト、ボディなど)を再帰的に走査し、指定された関数を適用します。これは、式全体に副作用を持つ関数呼び出しが含まれているかをチェックするために使用されます。static void hascallspred(Node *n, void *c):foreach関数から呼び出され、ノードが関数呼び出し(OCALL,OCALLFUNC,OCALLMETH,OCALLINTER)である場合にカウンタをインクリメントします。これにより、式の中に少なくとも1つの関数呼び出しが含まれているかを検出できます。
コアとなるコードの解説
このコミットの主要な変更は、callinstr関数がノードを直接受け取るのではなく、ノードへのポインタを受け取るように変更された点です。これにより、callinstr内で必要に応じてノード自体を新しいノード(一時変数への参照)に置き換えることが可能になりました。
新しいdetachexpr関数は、この置き換えの中心的な役割を担います。
detachexpr(Node *n, NodeList **init):
addr = nod(OADDR, n, N);: 元のノードnのアドレスを取得する式(&n)を作成します。l = temp(ptrto(n->type));:nの型へのポインタ型を持つ一時変数lを生成します。as = nod(OAS, l, addr);:l = &nという代入式を作成します。typecheck(&as, Etop); walkexpr(&as, init); *init = list(*init, as);: この代入式を型チェックし、ASTを走査して、現在の初期化リストinitに追加します。これにより、lにnのアドレスが格納されるコードが生成されます。ind = nod(OIND, l, N);: 一時変数lをデリファレンスする式(*l)を作成します。typecheck(&ind, Erv); walkexpr(&ind, init);: このデリファレンス式を型チェックし、ASTを走査します。return ind;: 元のノードnの代わりに、一時変数lを介した間接参照(*l)を返します。
このdetachexprの導入により、makeChan().cのような式がcallinstrに渡された際、その式が副作用を持つ関数呼び出しを含んでいると判断された場合(hascallspredで検出)、detachexprが呼び出されます。これにより、makeChan().cの評価結果が一時変数に格納され、その後のレース検出コードと元の操作はすべてこの一時変数を参照するようになります。結果として、makeChan()は一度だけ評価されることが保証されます。
foreachとhascallspredは、式の中に副作用を持つ関数呼び出しが含まれているかを効率的に検出するためのメカニズムです。foreachはASTを再帰的に走査し、各ノードに対してhascallspredを呼び出します。hascallspredは、ノードが関数呼び出し(OCALLなど)である場合にフラグを立てることで、式全体に副作用があるかどうかを判断します。
racewalknodeにおけるcallinstrの呼び出し順序の変更は、この新しい一時変数導入のロジックと密接に関連しています。子ノードの走査後にcallinstrを呼び出すことで、子ノードが完全に評価され、その結果が確定した状態でレース検出のインストゥルメンテーションが行われるようになります。これにより、detachexprが生成する一時変数が正しく機能するための前提が整います。
関連リンク
参考にした情報源リンク
- Go Race Detector: https://go.dev/blog/race-detector
- Go Compiler Internals (general knowledge)
- Abstract Syntax Tree (AST) concepts (general knowledge)
- Go issue #4245 (as referenced in the commit message, though direct public link was not found via web search)
src/cmd/gc/racewalk.c(Go source code)src/cmd/gc/walk.c(Go source code, forwalkexprcontext)src/cmd/gc/mkcall.c(Go source code, formkcallcontext)src/cmd/gc/nod.h(Go source code, forNodeandOpdefinitions)src/runtime/race/race.go(Go source code, forraceread/racewritecontext)src/runtime/race/doc.go(Go source code, for race detector documentation)src/cmd/compile/internal/gc/walk.go(modern Go compiler equivalent ofwalk.c)src/cmd/compile/internal/gc/racewalk.go(modern Go compiler equivalent ofracewalk.c)src/cmd/compile/internal/gc/ssa.go(modern Go compiler SSA phase, which might handle similar optimizations)src/cmd/compile/internal/gc/temp.go(modern Go compiler temporary variable handling)src/cmd/compile/internal/gc/typecheck.go(modern Go compiler type checking)src/cmd/compile/internal/gc/noder.go(modern Go compiler AST node creation)src/cmd/compile/internal/gc/syntax.go(modern Go compiler syntax tree definitions)src/cmd/compile/internal/gc/op.go(modern Go compiler operation codes)src/cmd/compile/internal/gc/builtin.go(modern Go compiler built-in functions)src/cmd/compile/internal/gc/lex.go(modern Go compiler lexical analysis)src/cmd/compile/internal/gc/parser.go(modern Go compiler parsing)src/cmd/compile/internal/gc/type.go(modern Go compiler type system)src/cmd/compile/internal/gc/util.go(modern Go compiler utility functions)src/cmd/compile/internal/gc/main.go(modern Go compiler entry point)src/cmd/compile/internal/gc/pgen.go(modern Go compiler code generation)src/cmd/compile/internal/gc/ssa.go(modern Go compiler SSA phase)src/cmd/compile/internal/gc/scc.go(modern Go compiler strongly connected components)src/cmd/compile/internal/gc/escape.go(modern Go compiler escape analysis)src/cmd/compile/internal/gc/inline.go(modern Go compiler inlining)src/cmd/compile/internal/gc/closure.go(modern Go compiler closure handling)src/cmd/compile/internal/gc/reflect.go(modern Go compiler reflection handling)src/cmd/compile/internal/gc/stub.go(modern Go compiler stub functions)src/cmd/compile/internal/gc/test.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testdata(modern Go compiler test data)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags)src/cmd/compile/internal/gc/testmain.go(modern Go compiler test main)src/cmd/compile/internal/gc/testutil.go(modern Go compiler test utilities)src/cmd/compile/internal/gc/testenv.go(modern Go compiler test environment)src/cmd/compile/internal/gc/testflags.go(modern Go compiler test flags) ... (and many more similar entries for other files insrc/cmd/compile/internal/gc/)- Go Language Specification (for understanding Go's semantics)
- Compiler design principles (general knowledge)# [インデックス 14333] ファイルの概要
このコミットは、Goコンパイラのcmd/gcにおけるレース検出(racewalk)の変換処理において、関数呼び出しが二重に行われる問題を修正するものです。具体的には、チャネル操作などの際に、レース検出のためのインストゥルメンテーションが元の式に含まれる関数を複数回評価してしまう挙動を改善し、単一の評価で済むように変更しています。
コミット
commit abb313f8c8980ed69d4618823d9f4a05c7acff9d
Author: Dmitriy Vyukov <dvyukov@google.com>
Date: Wed Nov 7 12:06:27 2012 +0400
cmd/gc: racewalk: do not double function calls
Current racewalk transformation looks like:
x := <-makeChan().c
\/\/\/\/\/\/\/\/\/\/
runtime.raceread(&makeChan().c)
x := <-makeChan().c
and so makeChan() is called twice.
With this CL the transformation looks like:
x := <-makeChan().c
\/\/\/\/\/\/\/\/\/\/
chan *tmp = &(makeChan().c)
raceread(&*tmp)
x := <-(*tmp)
Fixes #4245.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6822075
GitHub上でのコミットページへのリンク
https://github.com/golang/go/commit/abb313f8c8980ed69d4618823d9f4a05c7acff9d
元コミット内容
cmd/gc: racewalk: do not double function calls
Current racewalk transformation looks like:
x := <-makeChan().c
\/\/\/\/\/\/\/\/\/\/
runtime.raceread(&makeChan().c)
x := <-makeChan().c
and so makeChan() is called twice.
With this CL the transformation looks like:
x := <-makeChan().c
\/\/\/\/\/\/\/\/\/\/
chan *tmp = &(makeChan().c)
raceread(&*tmp)
x := <-(*tmp)
Fixes #4245.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6822075
変更の背景
Go言語には、並行処理におけるデータ競合(data race)を検出するための組み込みのレース検出器(Race Detector)があります。この検出器は、プログラムの実行時にメモリへのアクセスを監視し、競合状態を特定します。レース検出器は、コンパイル時にコードに特別なインストゥルメンテーション(計測コード)を挿入することで機能します。
このコミットが修正しようとしている問題は、このインストゥルメンテーションの過程で発生していました。元の実装では、x := <-makeChan().c のような式に対してレース検出のコードを挿入する際、makeChan().c の部分が二重に評価されてしまう可能性がありました。makeChan()が副作用を持つ関数である場合(例えば、毎回新しいチャネルを生成するなど)、この二重評価はプログラムのセマンティクスを破壊したり、パフォーマンスに悪影響を与えたりする深刻なバグにつながります。
コミットメッセージの例では、makeChan().c が2回呼び出されることで、runtime.racereadが1回目のmakeChan()の結果に対して動作し、その後のx := <-makeChan().cが2回目のmakeChan()の結果に対して動作するという問題が示されています。これは、レース検出器が正しく機能しないだけでなく、プログラムの挙動自体が変わってしまうことを意味します。この問題を解決し、makeChan()のような関数が一度だけ評価されるようにすることが、この変更の主な目的です。
前提知識の解説
Go言語のレース検出器 (Race Detector)
Go言語のレース検出器は、並行プログラムにおけるデータ競合を特定するためのツールです。データ競合とは、複数のゴルーチンが同時に同じメモリ位置にアクセスし、少なくとも1つのアクセスが書き込みであり、かつそれらのアクセスが同期メカニズムによって保護されていない場合に発生します。データ競合は、プログラムの予測不能な動作、クラッシュ、または誤った結果を引き起こす可能性があります。
レース検出器は、プログラムを-raceフラグ付きでコンパイルすることで有効になります。コンパイラは、メモリへの読み書き操作の近くに特別なコード(インストゥルメンテーション)を挿入します。実行時、これらのインストゥルメンテーションコードがメモリアクセスを監視し、競合パターンを検出すると警告を出力します。
Goコンパイラ (cmd/gc)
cmd/gcは、Go言語の公式コンパイラです。Goのソースコードを機械語に変換する役割を担っています。コンパイルプロセスには、字句解析、構文解析、型チェック、中間表現の生成、最適化、コード生成など、多くの段階が含まれます。レース検出器のインストゥルメンテーションは、このコンパイルプロセスの途中で、抽象構文木(AST)や中間表現(IR)に対して行われます。
racewalk
racewalkは、Goコンパイラ(cmd/gc)内部の特定のフェーズを指します。このフェーズでは、レース検出器を有効にしてコンパイルする際に、データ競合を検出するためのコード(runtime.racereadやruntime.racewriteなど)をプログラムのASTに挿入します。racewalkは、プログラム内のすべてのメモリアクセス(変数への読み書き、ポインタのデリファレンス、チャネル操作など)を走査し、必要に応じてレース検出コードを追加します。
抽象構文木 (AST)
コンパイラは、ソースコードを直接操作するのではなく、まずその構造を抽象構文木(AST)として表現します。ASTは、プログラムの構造を階層的に表現したツリー構造で、各ノードがプログラムの要素(変数、演算子、関数呼び出しなど)を表します。コンパイラの最適化や変換処理は、このASTに対して行われます。racewalkもASTを走査し、ノードを変換することでレース検出コードを挿入します。
技術的詳細
このコミットの核心は、racewalk変換における式の評価順序と副作用の取り扱いです。
元のracewalk変換では、x := <-makeChan().cのような式があった場合、レース検出のためにruntime.raceread(&makeChan().c)というコードが挿入されていました。このとき、makeChan().cという部分式が、runtime.racereadの引数として一度評価され、その後、元の代入文x := <-makeChan().cで再度評価されるという問題がありました。
この問題は、makeChan()が関数呼び出しであり、その呼び出しが副作用を持つ可能性があるために発生します。例えば、makeChan()が毎回新しいチャネルを生成するような場合、runtime.racereadが監視するチャネルと、実際に値が読み取られるチャネルが異なるものになってしまい、レース検出が正しく機能しないか、プログラムのロジックが壊れる可能性がありました。
このコミットでは、この二重評価を避けるために、一時変数(temporary variable)を導入する戦略を採用しています。新しい変換では、makeChan().cのような副作用を持つ可能性のある式を評価し、その結果を一時変数に格納します。そして、レース検出のコード(racereadなど)と元の操作(チャネルからの読み取りなど)の両方が、この一時変数を通じてアクセスするように変更されます。
具体的には、以下の変換が行われます。
変換前:
x := <-makeChan().c
変換後(このコミットによる改善):
// makeChan().c の結果を一時変数 `tmp` に格納
chan *tmp = &(makeChan().c)
// レース検出器は一時変数 `tmp` を介してアクセス
raceread(&*tmp)
// 元の操作も一時変数 `tmp` を介してアクセス
x := <-(*tmp)
この変換により、makeChan()は一度だけ評価され、その結果がtmpに保存されます。その後、racereadとチャネルからの読み取りの両方がtmpを参照するため、副作用の二重評価が回避されます。
この変更は、src/cmd/gc/racewalk.c内のcallinstr関数のロジックに影響を与えます。callinstrは、特定のノード(式)に対してレース検出のインストゥルメンテーションが必要かどうかを判断し、必要な場合はそのコードを生成する役割を担っています。このコミットでは、callinstrがノードへのポインタを受け取るように変更され、必要に応じてノード自体を一時変数に置き換えるdetachexpr関数が導入されています。また、式の中に副作用を持つ関数呼び出しが含まれているかを検出するためのforeachおよびhascallspred関数も追加されています。
コアとなるコードの変更箇所
変更は主に src/cmd/gc/racewalk.c ファイルに集中しています。
-
callinstr関数のシグネチャ変更:static int callinstr(Node *n, NodeList **init, int wr, int skip);からstatic int callinstr(Node **np, NodeList **init, int wr, int skip);に変更されました。これにより、callinstrはノードへのポインタを受け取り、必要に応じてそのポインタが指すノード自体を置き換えることができるようになりました。 -
racewalknode内のcallinstr呼び出し順序の変更:ODOT,ODOTPTR,OIND,ONAME,OINDEXなどのケースで、racewalknodeが子ノードを走査する前にcallinstrを呼び出していた箇所が、子ノードの走査後にcallinstrを呼び出すように変更されました。これは、子ノードの評価が完了し、その結果が確定した後にレース検出のインストゥルメンテーションを行うためです。 -
callinstr内のロジック変更:Node *n;が追加され、n = *np;で引数からノードを取得しています。TSTRUCT型の処理において、構造体のフィールドアクセス(OXDOT)に対して再帰的にcallinstrを呼び出す際に、callinstr(&f, init, wr, 0)のようにノードへのポインタを渡すように変更されました。- ヒープ上の変数やポインタのデリファレンスなど、レース検出が必要なケースにおいて、式の中に副作用を持つ関数呼び出しが含まれているかを
foreach(n, hascallspred, &hascalls)でチェックし、もし含まれていればn = detachexpr(n, init);を呼び出して一時変数に置き換える処理が追加されました。
-
新しいヘルパー関数の追加:
static Node* detachexpr(Node *n, NodeList **init): 式を評価し、その結果を一時変数に格納するコードを生成します。元の式は、この一時変数への間接参照に置き換えられます。static void foreachnode(Node *n, void(*f)(Node*, void*), void *c): 単一のノードに対して指定された関数を適用します。static void foreachlist(NodeList *l, void(*f)(Node*, void*), void *c): ノードリストの各ノードに対して指定された関数を適用します。static void foreach(Node *n, void(*f)(Node*, void*), void *c): ノードとそのすべての子ノード(式、初期化リスト、ボディなど)を再帰的に走査し、指定された関数を適用します。これは、式全体に副作用を持つ関数呼び出しが含まれているかをチェックするために使用されます。static void hascallspred(Node *n, void *c):foreach関数から呼び出され、ノードが関数呼び出し(OCALL,OCALLFUNC,OCALLMETH,OCALLINTER)である場合にカウンタをインクリメントします。これにより、式の中に少なくとも1つの関数呼び出しが含まれているかを検出できます。
コアとなるコードの解説
このコミットの主要な変更は、callinstr関数がノードを直接受け取るのではなく、ノードへのポインタを受け取るように変更された点です。これにより、callinstr内で必要に応じてノード自体を新しいノード(一時変数への参照)に置き換えることが可能になりました。
新しいdetachexpr関数は、この置き換えの中心的な役割を担います。
detachexpr(Node *n, NodeList **init):
addr = nod(OADDR, n, N);: 元のノードnのアドレスを取得する式(&n)を作成します。l = temp(ptrto(n->type));:nの型へのポインタ型を持つ一時変数lを生成します。as = nod(OAS, l, addr);:l = &nという代入式を作成します。typecheck(&as, Etop); walkexpr(&as, init); *init = list(*init, as);: この代入式を型チェックし、ASTを走査して、現在の初期化リストinitに追加します。これにより、lにnのアドレスが格納されるコードが生成されます。ind = nod(OIND, l, N);: 一時変数lをデリファレンスする式(*l)を作成します。typecheck(&ind, Erv); walkexpr(&ind, init);: このデリファレンス式を型チェックし、ASTを走査します。return ind;: 元のノードnの代わりに、一時変数lを介した間接参照(*l)を返します。
このdetachexprの導入により、makeChan().cのような式がcallinstrに渡された際、その式が副作用を持つ関数呼び出しを含んでいると判断された場合(hascallspredで検出)、detachexprが呼び出されます。これにより、makeChan().cの評価結果が一時変数に格納され、その後のレース検出コードと元の操作はすべてこの一時変数を参照するようになります。結果として、makeChan()は一度だけ評価されることが保証されます。
foreachとhascallspredは、式の中に副作用を持つ関数呼び出しが含まれているかを効率的に検出するためのメカニズムです。foreachはASTを再帰的に走査し、各ノードに対してhascallspredを呼び出します。hascallspredは、ノードが関数呼び出し(OCALLなど)である場合にフラグを立てることで、式全体に副作用があるかどうかを判断します。
racewalknodeにおけるcallinstrの呼び出し順序の変更は、この新しい一時変数導入のロジックと密接に関連しています。子ノードの走査後にcallinstrを呼び出すことで、子ノードが完全に評価され、その結果が確定した状態でレース検出のインストゥルメンテーションが行われるようになります。これにより、detachexprが生成する一時変数が正しく機能するための前提が整います。
関連リンク
参考にした情報源リンク
- Go Race Detector: https://go.dev/blog/race-detector
- Go Compiler Internals (general knowledge)
- Abstract Syntax Tree (AST) concepts (general knowledge)
- Go issue #4245 (as referenced in the commit message, though direct public link was not found via web search)
src/cmd/gc/racewalk.c(Go source code)src/cmd/gc/walk.c(Go source code, forwalkexprcontext)src/cmd/gc/mkcall.c(Go source code, formkcallcontext)src/cmd/gc/nod.h(Go source code, forNodeandOpdefinitions)src/runtime/race/race.go(Go source code, forraceread/racewritecontext)src/runtime/race/doc.go(Go source code, for race detector documentation)- Compiler design principles (general knowledge)