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

klee: Fix self's usage where its reference is implied #252

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

zpzigi754
Copy link
Collaborator

@zpzigi754 zpzigi754 commented Dec 15, 2023

This PR is a prerequisite for KLEE integration. Before this change, KLEE has aborted on compiling the previous code.

Relates to one of the cases in #247

This is required for KLEE integration. Before this change, KLEE
has aborted on compiling the previous code.

Relates to islet-project#247
@hihi-wang
Copy link
Collaborator

Just for curious, why does methods takes ownership instead of reference &self? Most of does methods check for some status, with naming is_XXX, so I found no reason this to be self...

@zpzigi754
Copy link
Collaborator Author

Just for curious, why does methods takes ownership instead of reference &self? Most of does methods check for some status, with naming is_XXX, so I found no reason this to be self...

Good question. I think that &self should be used when borrow semantic is used while self be used when move semantic is used. I guess that the previous self was used mistakenly for ownership, or self might be allowed for borrow semantic as a syntactic sugar.

@zpzigi754 zpzigi754 merged commit 0cbf094 into islet-project:main Dec 18, 2023
7 checks passed
@zpzigi754 zpzigi754 deleted the fix-self branch December 18, 2023 06:27
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 this pull request may close these issues.

4 participants