Skip to content

Add match for sparse constants#22

Merged
mengzhuo merged 1 commit intoplctlab:mainfrom
AdUhTkJm:main
Feb 6, 2025
Merged

Add match for sparse constants#22
mengzhuo merged 1 commit intoplctlab:mainfrom
AdUhTkJm:main

Conversation

@AdUhTkJm
Copy link

@AdUhTkJm AdUhTkJm commented Feb 1, 2025

Now supports matching for sparse constants (where max - min > 256), compiled into a series of if-else.

I chose not to implement a hash function because such sparseness in match is quite rare, so we don't need to target it with great effort.

Now the compiler passes test match03.

@mengzhuo mengzhuo merged commit c8337c8 into plctlab:main Feb 6, 2025
2 checks passed
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