Repository navigation
feat: 単一所有者のクラス実体を自動回収する - #180
Draft
milkeclair wants to merge 2 commits into
Draft
milkeclair wants to merge 2 commits into
milkeclair wants to merge 2 commits into
Conversation
Tie each owner to its variable lifetime and sweep expired instances as allocations continue. Require predeclared destinations and support transferring ownership without relying on prompts, loops, or call framing.
This branch has not been deployed
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.
やったこと
z.cls.new Counter counterは宣言済みの書き込み可能な変数を受け取り、実体の唯一の所有者として登録します。z.cls.owner.move from=counter to=savedで所有権を移せます。移動元や通常の代入でコピーした実体IDは借用参照です。前回の回収から実体の生成が64件に達すると、次の生成前に、所有者が消えた非実行中の実体を回収します。スクリプトと対話シェルで同じタイミングで動きます。
メソッドと属性アクセサーは実体IDを接頭辞として登録します。
z.cls.new Counter counterで生成した実体は$counter.increment、${counter}.count.getのように呼び出せます。動作確認 (方法、事前準備、確認したこと、動画などの資料)
方法:
z.tを全件実行し、lsでnpm test -- --maxWorkers=2を実行しました。変更したZshファイルの構文と差分も確認しました。事前準備:
77224c9をベースに検証しました。確認したこと:
10を読み出せました。エビデンス:
その他 (レビュワーへの注意点など)
z.cls.deleteを使えます。