]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/inline_sync.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / test / inline_sync.go
index d1ce5f521cf0bb7e8733bb12050cf5d38efa69a2..eaa2176d5fdc3dfeaa8c67182533ce4a0bb7854b 100644 (file)
@@ -1,6 +1,7 @@
-// +build !nacl,!386,!wasm,!arm,!gcflags_noopt
 // errorcheck -0 -m
 
+//go:build !nacl && !386 && !wasm && !arm && !gcflags_noopt
+
 // Copyright 2019 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
@@ -35,19 +36,18 @@ func small6() { // ERROR "can inline small6"
 var once *sync.Once
 
 func small7() { // ERROR "can inline small7"
-        // the Do fast path should be inlined
-        once.Do(small5) // ERROR "(inlining call to sync\.\(\*Once\)\.Do|inlining call to atomic\.\(\*Bool\)\.Load)"
+       // the Do fast path should be inlined
+       once.Do(small5) // ERROR "inlining call to sync\.\(\*Once\)\.Do" "inlining call to atomic\.\(\*Uint32\)\.Load"
 }
 
 var rwmutex *sync.RWMutex
 
 func small8() { // ERROR "can inline small8"
-        // the RUnlock fast path should be inlined
-        rwmutex.RUnlock() // ERROR "inlining call to sync\.\(\*RWMutex\)\.RUnlock"
+       // the RUnlock fast path should be inlined
+       rwmutex.RUnlock() // ERROR "inlining call to sync\.\(\*RWMutex\)\.RUnlock" "inlining call to atomic\.\(\*Int32\)\.Add"
 }
 
 func small9() { // ERROR "can inline small9"
-        // the RLock fast path should be inlined
-        rwmutex.RLock() // ERROR "inlining call to sync\.\(\*RWMutex\)\.RLock"
+       // the RLock fast path should be inlined
+       rwmutex.RLock() // ERROR "inlining call to sync\.\(\*RWMutex\)\.RLock" "inlining call to atomic\.\(\*Int32\)\.Add"
 }
-