Repository navigation
Conversation
入力を受け取って結果を返す job を Api/ に置く: TcsCompile (tcs check の検査と IL)、TcsToC、TcsToVm、TcsSession (編集をまたいで続く tcs VM の build)。 配る library を session に入れる所は TcsInputs の 1 か所になる。 結果 (TcsResult) は型のある診断を持つ。CompileResult.Diagnostics は文字列ではなく Diagnostic の列になり、警告かどうかを文字列で見分ける所が無くなる。 tcs VM が受ける compliance error の規則は Compiler/VmAccepted.cs の 1 か所になる。 CLI (check、c、vm、--watch、名前で持つ session) は、引数を job に渡し、結果を file、標準出力、標準エラー、終了 code に直すだけになる。 job は結果を持たず、Step が返す。旧世代にある job が結果を指すと、境界で結果が昇格するためである。 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEQcu1nJxjeAsG7A2n4QN3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
問題
tcs の
Tool/は、引数の解釈、file の読み書き、compile の進行、結果の整形を同じ class の中で行っていた。tcs を使う側 (CLI、lub-gen、テストの入口) は、それぞれ compile の session を自分で組み立てていた。
Linq.cs、ValueTuple.cs) を session に入れる所が 8 か所にあった。Cli.IsWarning、テストの入口、lub-gen)。VmEmitter、テストのIlExport、lub-gen)。変更
src/tcs/Api/に、入力を受け取って結果を返す job を置く。job は file にも標準出力にも書かない。TcsInputsTcsCompiletcs checkの検査と、backend が読む ILTcsToCTcsToVmTcsSessionTcsResultCompileResult.DiagnosticsをDiagnosticの列にする。DiagnosticにPath、Line、Columnを足す。Compiler/VmAccepted.csの 1 か所にする。check、c、vm、--watch、名前で持つ session) は、引数を job に渡し、結果を file、標準出力、標準エラー、終了 code に直すだけにする。Checker、IlExport、SelfHostC、SelfHostVm、VmSession)、analyzer を、型のある診断と API の上に載せる。Stepが返す (続く間は null)。旧世代にある job が結果を指すと、境界で結果が昇格するためである。1 回の
Stepで進む量は今のままにしている (tcs cは段ごと、tcs vmと session は 1 回で最後まで)。振る舞いの変化
tcs vmで-oが無いとき、入力に診断があっても-o is requiredを先に出す。今は診断が先だった。tcs vmはexport failedを出す。今は理由を出さずに止まっていた。検査
tests/tcs/run-tests.shが通る。src/tcs/native.sh: C の tcs と .NET の tcs の出力の一致と、固定点。scripts/build-lub-gen.sh --verify: C の lub-gen と .NET の lub-gen の出力の一致。SessionsTestsを足した。名前で持つ session の open、update (編集、誤り、file の追加と削除)、close の返事と、書き出す file を見る。cが +0.01%、vmが +0.09%。命令数は CI で見る。やらなかったこと
TcsHostを file の IF と CLI の宣言に分けること、Tool/の改名。次の PR で行う。CFail) が static なので、job の全体を lock の中で回す。今までは compile が lock の外だった。C / VM backend の誤りの記録 (TcsC.CFail) が process に 1 つの static で、同時の変換で混ざる #447 が直るまでこのままにする。Part of #670.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FEQcu1nJxjeAsG7A2n4QN3