- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 929 for closureFn (0.13 sec)
-
src/runtime/start_line_test.go
func inlineFunc() int { return inlineFunc1() } func inlineFunc1() int { return callerStartLine(true) } var closureFn func() int func normalClosure() int { // Assign to global to ensure this isn't inlined. closureFn = func() int { return callerStartLine(false) } return closureFn() } func inlineClosure() int { return func() int { return callerStartLine(true) }() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 20 22:54:22 UTC 2023 - 2.6K bytes - Viewed (0) -
src/cmd/compile/internal/walk/closure.go
} // Add to Closures for enqueueFunc. It's no longer a proper // closure, but we may have already skipped over it in the // functions list as a non-trivial closure, so this just // ensures it's compiled. ir.CurFunc.Closures = append(ir.CurFunc.Closures, clofn) } func walkClosure(clo *ir.ClosureExpr, init *ir.Nodes) ir.Node { clofn := clo.Func // If no closure vars, don't bother wrapping.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:56:08 UTC 2023 - 6.5K bytes - Viewed (0) -
test/closure2.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Check that these do not use "by value" capturing, // because changes are made to the value during the closure. package main var never bool func main() { { type X struct { v int } var x X func() { x.v++ }() if x.v != 1 { panic("x.v != 1") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 06 18:34:24 UTC 2023 - 1.9K bytes - Viewed (0) -
test/closure5.go
// compiledir // Copyright 2021 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. // Check correctness of various closure corner cases // that are expected to be inlined
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 20 22:53:32 UTC 2021 - 280 bytes - Viewed (0) -
test/closure3.go
//go:build !goexperiment.newinliner // Copyright 2017 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. // Check correctness of various closure corner cases // that are expected to be inlined
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 358 bytes - Viewed (0) -
test/closure.go
// run // Copyright 2009 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. // Test the behavior of closures. package main import "runtime" var c = make(chan int) func check(a []int) { for i := 0; i < len(a); i++ { n := <-c if n != a[i] { println("want", a[i], "got", n, "at", i) panic("fail") } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Jul 01 17:59:50 UTC 2012 - 1.7K bytes - Viewed (0) -
test/closure6.go
Dan Scales <******@****.***> 1611360420 -0800
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Jan 23 02:15:24 UTC 2021 - 346 bytes - Viewed (0) -
test/closure4.go
Richard Musiol <******@****.***> 1533487935 +0200
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 14 09:19:38 UTC 2018 - 364 bytes - Viewed (0) -
test/closure7.go
Dan Scales <******@****.***> 1612116303 -0800
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 01 18:28:05 UTC 2021 - 373 bytes - Viewed (0) -
test/closure1.go
Dmitry Vyukov <******@****.***> 1421697598 +0300
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 29 13:07:30 UTC 2015 - 280 bytes - Viewed (0)