-
Notifications
You must be signed in to change notification settings - Fork 45
Mark Closure, Function and Handle as write barrier protected #129
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
Conversation
a3e74fb to
a4e7a6f
Compare
They don't have a mark function, so they don't need any change.
a4e7a6f to
ed014aa
Compare
| .dfree = fiddle_handle_free, | ||
| .dsize = fiddle_handle_memsize | ||
| }, | ||
| .flags = RUBY_TYPED_WB_PROTECTED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we specify RUBY_TYPED_FREE_IMMEDIATELY here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe?
The reason I didn't add it is that the dfree function calls dlclose and I don't know all the characteristics of it, so I don't know if it's safe to call from the GC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
I think that we can add it after we improve Fiddle::Handle#[] to refer Fiddle::Handle from the returned symbol. We can ensure keeping Fiddle::Handle while its symbols are referred.
kou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
| .dfree = fiddle_handle_free, | ||
| .dsize = fiddle_handle_memsize | ||
| }, | ||
| .flags = RUBY_TYPED_WB_PROTECTED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
I think that we can add it after we improve Fiddle::Handle#[] to refer Fiddle::Handle from the returned symbol. We can ensure keeping Fiddle::Handle while its symbols are referred.
protected (ruby/fiddle#129) They don't have a mark function, so they don't need any change. ruby/fiddle@9bbc732aef Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
They don't have a mark function, so they don't need any change.