Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subtypeのチェックが甘くて不正な値を入れられてしまう #3

Open
White-Green opened this issue Dec 18, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@White-Green
Copy link
Owner

White-Green commented Dec 18, 2021

ref:
https://twitter.com/White_Green2525/status/1463372015570538500?s=20

同じことが#{value: Number}#{value: Number | String}とか(Number,)(Number | String,)とかでも起こる

@White-Green White-Green added the bug Something isn't working label Dec 18, 2021
@White-Green
Copy link
Owner Author

  • 各値の真の型を保存しておいて、代入などの時にチェックするようにする
  • その値への参照がただ一つであれば、適宜真の型を書き換える

のセットで良い感じに解決できないかと考え中

VMではVec<Arc<_>>でデータを持ってるのでこれによる参照カウントをいい感じに減らす変更が必要
loadと別にmove命令(メモリ上からスタックへ値をmoveする)をもてばいいかも

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant