-
Notifications
You must be signed in to change notification settings - Fork 5
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
python support #95
python support #95
Conversation
Signed-off-by: Thomas Pelletier <[email protected]>
@@ -36,20 +56,37 @@ type vmem interface { | |||
func deref[T any](r vmem, p ptr) T { |
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.
Could we add a stricter constraint to the type parameter?
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.
What do you have in mind?
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 a constraint like:
type dereferenceable interface {
~ptr32 | ~ptr64 | // etc...
}
I imagine there are types that would not be valid to pass (e.g. things containing inner pointers), so the compiler could help us validate that if we are more strict.
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 use deref
on struct types. Is there a way to express a type constraint of structs only made of dereferenceable types?
otherwise the full type set is
type derefable interface {
~int32 | ~int64 | ~uint32 | ~uint64 | ~byte | findfuncbucket | moduledata | functab | textsect | inlinedCall
}
I will put the stretch action items into separate GitHub issues to open them up for contributions. @achille-roussel since |
Draft changes to support stack walking and symbolization for Python guests to provide meaningful profiles for python scripts.
Limitations: only support CPython3.11 (testing against https://github.com/stealthrocket/timecraft/tree/main/python), which is built with debug symbols.
Refs #64
TODO
_PyEvalFramePushAndInit
triggers twice).Stretch