Skip to content

Commit 6e26728

Browse files
aykevldeadprogram
authored andcommitted
compiler: remove some dead code
1 parent 0d34f93 commit 6e26728

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

compiler/map.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -152,28 +152,6 @@ func (c *Compiler) emitMapDelete(keyType types.Type, m, key llvm.Value, pos toke
152152
}
153153
}
154154

155-
// Get FNV-1a hash of this string.
156-
//
157-
// https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash
158-
func hashmapHash(data []byte) uint32 {
159-
var result uint32 = 2166136261 // FNV offset basis
160-
for _, c := range data {
161-
result ^= uint32(c)
162-
result *= 16777619 // FNV prime
163-
}
164-
return result
165-
}
166-
167-
// Get the topmost 8 bits of the hash, without using a special value (like 0).
168-
func hashmapTopHash(hash uint32) uint8 {
169-
tophash := uint8(hash >> 24)
170-
if tophash < 1 {
171-
// 0 means empty slot, so make it bigger.
172-
tophash += 1
173-
}
174-
return tophash
175-
}
176-
177155
// Returns true if this key type does not contain strings, interfaces etc., so
178156
// can be compared with runtime.memequal.
179157
func hashmapIsBinaryKey(keyType types.Type) bool {

0 commit comments

Comments
 (0)