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

Adding support for MInt{128} #1160

Merged
merged 6 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions runtime/collections/hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ void k_hash(block *arg, void *h) {
add_hash64(h, *intptr);
break;
}
case MINT_LAYOUT + 128: {
auto *intptr = (uint64_t *)(argintptr + offset);
add_hash64(h, intptr[0]);
add_hash64(h, intptr[1]);
break;
}
case MINT_LAYOUT + 160: {
auto *intptr = (uint64_t *)(argintptr + offset);
add_hash64(h, intptr[0]);
Expand Down
10 changes: 10 additions & 0 deletions runtime/collections/kelemle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@ bool hook_KEQUAL_eq(block *arg1, block *arg2) {
}
break;
}
case MINT_LAYOUT + 128: {
auto *child1ptr = (int64_t *)(child1intptr);
auto *child2ptr = (int64_t *)(child2intptr);
bool cmp
= child1ptr[0] == child2ptr[0] && child1ptr[1] == child2ptr[1];
if (!cmp) {
return false;
}
break;
}
case MINT_LAYOUT + 160: {
auto *child1ptr = (int64_t *)(child1intptr);
auto *child2ptr = (int64_t *)(child2intptr);
Expand Down
Loading
Loading