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

Should have a way to construct an InterruptStackFrameValue? #466

Closed
GZTimeWalker opened this issue Mar 15, 2024 · 3 comments · Fixed by #467
Closed

Should have a way to construct an InterruptStackFrameValue? #466

GZTimeWalker opened this issue Mar 15, 2024 · 3 comments · Fixed by #467

Comments

@GZTimeWalker
Copy link
Contributor

I need to store the InterruptStackFrameValue, which means I need some way to initialize the InterruptStackFrameValue.

As the _reserved1 and _reserved2 were introduced in #263 for v0.15.0, I found no way to initialize it.

Maybe add a default to it?

@Freax13
Copy link
Member

Freax13 commented Mar 15, 2024

I need to store the InterruptStackFrameValue, which means I need some way to initialize the InterruptStackFrameValue.

As the _reserved1 and _reserved2 were introduced in #263 for v0.15.0, I found no way to initialize it.

Maybe add a default to it?

I'm unsure if implementing Default is the way to go here. Zero-initializing all the fields may produce a value, but one that's not very useful. I agree that we should have a way to construct an InterruptStackFrameValue, so perhaps a normal constructor taking all fields as parameters would be a better fit.

@GZTimeWalker GZTimeWalker changed the title Maybe impl Default for InterruptStackFrameValue? Should have a way to construct an InterruptStackFrameValue? Mar 15, 2024
@GZTimeWalker
Copy link
Contributor Author

I'm unsure if implementing Default is the way to go here. Zero-initializing all the fields may produce a value, but one that's not very useful. I agree that we should have a way to construct an InterruptStackFrameValue, so perhaps a normal constructor taking all fields as parameters would be a better fit.

I agree. I have changed the issue's title.

@Freax13
Copy link
Member

Freax13 commented Mar 15, 2024

Feel free to open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants