github.com/goplusjs/gopherjs@v1.2.6-0.20211206034512-f187917453b8/compiler/natives/src/testing/go116_helper.go (about) 1 // +build js 2 // +build go1.16 3 4 package testing 5 6 // Helper may be called simultaneously from multiple goroutines. 7 func (c *common) Helper() { 8 c.mu.Lock() 9 defer c.mu.Unlock() 10 if c.helperPCs == nil { 11 c.helperPCs = make(map[uintptr]struct{}) 12 } 13 c.helperPCs[0] = struct{}{} 14 c.helperNames = nil // map will be recreated next time it is needed 15 }