cs: tcs の f32 数値モデル (T226) へ追従 — double/long を粉砕 - #21
Merged
Conversation
tcs 最新 (395c234) で double/long が TinyC# サブセット外になったため、 cs-lib と全 30 サンプルを int/float の 2 型へ移行する: - double → float、実数リテラルへ f suffix 付与 - double を返す System.Math API は (float) cast で受ける (tcs 上流と同じ流儀) - xorshift32 (lubx/Rand, 20_audio) は long + 0xFFFFFFFF マスクをやめ、 int32 wrap + 算術シフト & マスクで Haxe と同じ乱数列をビット一致で維持 - manual 08-csharp を同期 (double/long 不可、struct/record struct 解禁) tcs は float を Lua へそのまま実数として出す (f32 丸め・定数畳み込みなし) ため生成 Lua の実行時挙動は不変。全 30 サンプルの WARP capture が移行前と byte 一致することを確認済み (check/build/実行も 30/30)。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T8xmDHVsgKEp6HzS1iRATr
playground の C# snapshot 経路で `tcs registry: write to undeclared global: _` になる回帰 (web-verify で検出) の修正を取り込む。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T8xmDHVsgKEp6HzS1iRATr
A6/A7/A8 が Flappy17.cs の `velocityY = 3.0;` を探して編集するが、 f suffix 付与で `3.0f` になり marker 不一致で fail していた。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T8xmDHVsgKEp6HzS1iRATr
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 を最新へ更新する (pin は 395c234 + 下記回帰 fix の 9dbe4a0)。T226 で double / long が TinyC# サブセット外になったため、cs-lib と全 30 の C# サンプルを int / float の 2 型へ移行する。
double→float、実数リテラルにfsuffixSystem.MathAPI は(float)cast で受ける (tcs 上流と同じ流儀)lubx/Rand, 20_audio) は long +0xFFFFFFFFマスクをやめ、int32 wrap + 算術シフト& 0x7FFFで Haxe と同じ乱数列をビット一致で維持08-csharp.mdを同期 (double/long 不可を明記、struct / record struct を使える側へ移動)tcs は float を f32 丸め・定数畳み込みなしで Lua の実数に出すため、生成 Lua の実行時挙動は不変。
tcs 側の付随 fix (neguse/tcs fix/out-discard-predecl):
out _(bare discard) の local 前宣言が 395c234 で失われ、registry _ENV (playground の snapshot 経路) で undeclared global write エラーになる回帰を修正。検証
dotnet build(csproj の IDE 型チェック経路) 0 エラー、docs lint / dotnet format whitespace clean🤖 Generated with Claude Code
https://claude.ai/code/session_01T8xmDHVsgKEp6HzS1iRATr