- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 47 for makeSwap (1.94 sec)
-
src/reflect/example_test.go
return []reflect.Value{in[1], in[0]} } // makeSwap expects fptr to be a pointer to a nil function. // It sets that pointer to a new function created with MakeFunc. // When the function is invoked, reflect turns the arguments // into Values, calls swap, and then turns swap's result slice // into the values returned by the new function. makeSwap := func(fptr any) { // fptr is a pointer to a function.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 19 20:04:36 UTC 2022 - 4.5K bytes - Viewed (0) -
test/makemap.go
Matthew Dempsky <******@****.***> 1619131113 -0700
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 23 00:41:01 UTC 2021 - 1.3K bytes - Viewed (0) -
test/range.go
panic("fail") } } func testmap1() { s := 0 nmake = 0 for i := range makemap() { s += i } if nmake != 1 { println("range called makemap", nmake, "times") panic("fail") } if s != 10 { println("wrong sum ranging over makemap", s) panic("fail") } } func testmap2() { n := 0 nmake = 0 for range makemap() { n++ }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 05:50:54 UTC 2017 - 8.1K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/main/java/org/gradle/internal/classloader/CachingClassLoader.java
private static final Object MISSING = new Object(); private final ConcurrentMap<String, Object> loadedClasses = new MapMaker().weakValues().makeMap(); private final ConcurrentMap<String, Object> resources = new MapMaker().makeMap(); private final ClassLoader parent; static { try { ClassLoader.registerAsParallelCapable(); } catch (NoSuchMethodError ignore) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Jan 26 14:58:23 UTC 2024 - 3.6K bytes - Viewed (0) -
platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/modulecache/ResolvedArtifactCaches.java
private final Map<String, Map<ComponentArtifactIdentifier, ResolvableArtifact>> cachePerRepo = new MapMaker().makeMap(); private final Map<String, Map<ComponentArtifactIdentifier, ResolvableArtifact>> cachePerRepoWithVerification = new MapMaker().makeMap(); /** * For a remote repository, the only thing required is a resolved artifact cache.
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Dec 11 13:37:56 UTC 2023 - 4.1K bytes - Viewed (0) -
src/runtime/race/testdata/regression_test.go
c := make(chan bool) go func() { _ = l c <- true }() l = LogImpl{} <-c return } var _ LogImpl = NewLog() func MakeMap() map[int]int { return make(map[int]int) } func InstrumentMapLen() { _ = len(MakeMap()) } func InstrumentMapLen2() { m := make(map[int]map[int]int) _ = len(m[0]) } func InstrumentMapLen3() { m := make(map[int]*map[int]int)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 03 02:01:34 UTC 2015 - 2.7K bytes - Viewed (0) -
test/fixedbugs/issue37716.go
type K struct { a, b int32 // these get merged by the compiler into a single field, something typehash doesn't do c float64 } func main() { k := K{a: 1, b: 2, c: 3} // Make a reflect map. m := reflect.MakeMap(reflect.MapOf(reflect.TypeOf(K{}), reflect.TypeOf(true))) m.SetMapIndex(reflect.ValueOf(k), reflect.ValueOf(true)) // The binary must not contain the type map[K]bool anywhere, or reflect.MapOf
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 10 16:26:59 UTC 2020 - 872 bytes - Viewed (0) -
test/live2.go
func printnl() //go:noescape func useT40(*T40) type T40 struct { m map[int]int } func newT40() *T40 { ret := T40{} ret.m = make(map[int]int, 42) // ERROR "live at call to makemap: &ret$" return &ret } func bad40() { t := newT40() // ERROR "stack object ret T40$" "stack object .autotmp_[0-9]+ runtime.hmap$" printnl() // ERROR "live at call to printnl: ret$" useT40(t) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 21 23:29:33 UTC 2023 - 953 bytes - Viewed (0) -
guava/src/com/google/common/collect/MapMaker.java
* * <p>Usage example: * * <pre>{@code * ConcurrentMap<Request, Stopwatch> timers = new MapMaker() * .concurrencyLevel(4) * .weakKeys() * .makeMap(); * }</pre> * * <p>These features are all optional; {@code new MapMaker().makeMap()} returns a valid concurrent * map that behaves similarly to a {@link ConcurrentHashMap}. *
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Mar 13 14:30:51 UTC 2023 - 12.8K bytes - Viewed (0) -
src/cmd/compile/internal/walk/builtin.go
// BUCKETSIZE runtime.makemap will allocate the buckets on the heap. // Maximum key and elem size is 128 bytes, larger objects // are stored with an indirection. So max bucket size is 2048+eps. if !ir.IsConst(hint, constant.Int) || constant.Compare(hint.Val(), token.LEQ, constant.MakeInt64(abi.MapBucketCount)) { // In case hint is larger than BUCKETSIZE runtime.makemap
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 22:35:22 UTC 2024 - 31.2K bytes - Viewed (0)