mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
src/runtime: remove extra if check in hashmap set logic
This commit is contained in:
@@ -153,12 +153,6 @@ func hashmapLenUnsafePointer(p unsafe.Pointer) int {
|
||||
func hashmapSet(m *hashmap, key unsafe.Pointer, value unsafe.Pointer, hash uint32) {
|
||||
tophash := hashmapTopHash(hash)
|
||||
|
||||
if m.buckets == nil {
|
||||
// No bucket was allocated yet, do so now.
|
||||
m.buckets = unsafe.Pointer(hashmapInsertIntoNewBucket(m, key, value, tophash))
|
||||
return
|
||||
}
|
||||
|
||||
if hashmapShouldGrow(m) {
|
||||
hashmapGrow(m)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user