Berry strtab test case (#18623)

This commit is contained in:
s-hadinger 2023-05-09 21:13:00 +02:00 committed by GitHub
parent be27b4c488
commit fec3a21c8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -268,9 +268,13 @@ void be_gcstrtab(bvm *vm)
}
}
}
#if BE_USE_DEBUG_GC == 0
if (tab->count < size >> 2 && size > 8) {
resize(vm, size >> 1);
}
#else
resize(vm, tab->count + 4);
#endif
}
uint32_t be_strhash(const bstring *s)