Skip to content

Change Prepare::BranchTable to a mutable reference #735

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

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

zhouwfang
Copy link
Contributor

@zhouwfang zhouwfang commented Feb 10, 2025

#46

@zhouwfang zhouwfang requested a review from ia0 as a code owner February 10, 2025 22:51
Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not what I had in mind. This can be much simpler by having Prepare::BranchTable<'a, 'm> = &'a Vec<BranchTableEntry>.

@zhouwfang
Copy link
Contributor Author

That's not what I had in mind. This can be much simpler by having Prepare::BranchTable<'a, 'm> = &'a Vec<BranchTableEntry>.

Hmm, I don't quite understand. Could you clarify how that helps? What type for the branch table would you store in Expr in that case?

@ia0
Copy link
Member

ia0 commented Feb 12, 2025

Hmm, I don't quite understand. Could you clarify how that helps? What type for the branch table would you store in Expr in that case?

I've did the change since it's simpler than explain it.

@ia0 ia0 merged commit 2b0ae56 into google:dev/fast-interp Feb 12, 2025
20 checks passed
@zhouwfang
Copy link
Contributor Author

That's not what I had in mind. This can be much simpler by having Prepare::BranchTable<'a, 'm> = &'a Vec<BranchTableEntry>.

Thanks, you actually meant Prepare::BranchTable<'a, 'm> = &'a mut Vec<BranchTableEntry>.

@zhouwfang zhouwfang changed the title Make next_branch_table() return value Change Prepare::BranchTable to a mutable reference Feb 13, 2025
@ia0
Copy link
Member

ia0 commented Feb 13, 2025

Thanks, you actually meant Prepare::BranchTable<'a, 'm> = &'a mut Vec<BranchTableEntry>.

Oh yes, that was a typo I didn't see.

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.

2 participants