From 9a8328fcb76314240d2632bd0deaa17d33170e45 Mon Sep 17 00:00:00 2001 From: Damian Gryski Date: Mon, 7 Mar 2022 14:54:36 -0800 Subject: [PATCH] src/runtime/hashmap: comments for iterator structure --- src/runtime/hashmap.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/runtime/hashmap.go b/src/runtime/hashmap.go index c8c12419..1da9e962 100644 --- a/src/runtime/hashmap.go +++ b/src/runtime/hashmap.go @@ -41,11 +41,11 @@ type hashmapBucket struct { } type hashmapIterator struct { - buckets unsafe.Pointer - numBuckets uintptr - bucketNumber uintptr - bucket *hashmapBucket - bucketIndex uint8 + buckets unsafe.Pointer // pointer to array of hashapBuckets + numBuckets uintptr // length of buckets array + bucketNumber uintptr // current index into buckets array + bucket *hashmapBucket // current bucket in chain + bucketIndex uint8 // current index into bucket } // Get the topmost 8 bits of the hash, without using a special value (like 0).