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

Implement symbol_index_in_linear_memory #46

Merged
merged 6 commits into from
Nov 18, 2024
Merged

Conversation

bbyalcinkaya
Copy link
Member

@bbyalcinkaya bbyalcinkaya commented Nov 11, 2024

This PR introduces the symbol_index_in_linear_memory host function. It performs a linear search to find the index of a given symbol in an array of byte slices.

This function is used in converting SCVal values to enums by locating symbols that match enum variants. The test_custom_types contract is added to define a sample enum type and test conversions between Val and enum representations.

@bbyalcinkaya bbyalcinkaya marked this pull request as ready for review November 12, 2024 08:33
Copy link

@ACassimiro ACassimiro left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@rv-jenkins rv-jenkins merged commit 3b9a1d9 into master Nov 18, 2024
3 checks passed
@rv-jenkins rv-jenkins deleted the symbol-linear-search branch November 18, 2024 08:28
@bbyalcinkaya bbyalcinkaya mentioned this pull request Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants