- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 30 for rangefunc (0.17 sec)
-
src/runtime/testdata/testprogcgo/coro.go
// Copyright 2024 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. //go:build goexperiment.rangefunc && !windows package main /* #include <stdint.h> // for uintptr_t void go_callback_coro(uintptr_t handle); static void call_go(uintptr_t handle) { go_callback_coro(handle); } */ import "C" import ( "fmt" "iter"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 19:46:10 UTC 2024 - 3.4K bytes - Viewed (0) -
src/runtime/panic.go
// but an atomic list hanging off: // // g._defer => d4 -> d3 -> drangefunc -> d2 -> d1 -> nil // | .head // | // +--> dY -> dX -> nil // // with each -> indicating a d.link pointer, and where drangefunc // has the d.rangefunc = true bit set. // Note that the function being ranged over may have added
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 43.8K bytes - Viewed (0) -
src/go/types/check_test.go
testFiles(t, []string{"p.go"}, [][]byte{[]byte(src)}, false, withSizes(&StdSizes{4, 4})) } func TestCheck(t *testing.T) { old := buildcfg.Experiment.RangeFunc defer func() { buildcfg.Experiment.RangeFunc = old }() buildcfg.Experiment.RangeFunc = true DefPredeclaredTestFuncs() testDirFiles(t, "../../internal/types/testdata/check", false) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 19:45:33 UTC 2024 - 14.1K bytes - Viewed (0) -
test/range4.go
// run -goexperiment rangefunc // Copyright 2023 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 'for range' construct ranging over functions. package main var gj int func yield4x(yield func() bool) { _ = yield() && yield() && yield() && yield() } func yield4(yield func(int) bool) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 08 16:00:53 UTC 2024 - 5.1K bytes - Viewed (0) -
src/cmd/compile/internal/rangefunc/rewrite.go
} type State int // Rewrite rewrites all the range-over-funcs in the files. // It returns the set of function literals generated from rangefunc loop bodies. // This allows for rangefunc loop bodies to be distingushed by debuggers. func Rewrite(pkg *types2.Package, info *types2.Info, files []*syntax.File) map[*syntax.FuncLit]bool { ri := make(map[*syntax.FuncLit]bool)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 41.6K bytes - Viewed (0) -
src/runtime/crash_test.go
cmd = testenv.CleanCmdEnv(cmd) // Add the rangefunc GOEXPERIMENT unconditionally since some tests depend on it. // TODO(61405): Remove this once it's enabled by default. edited := false for i := range cmd.Env { e := cmd.Env[i] if _, vars, ok := strings.Cut(e, "GOEXPERIMENT="); ok { cmd.Env[i] = "GOEXPERIMENT=" + vars + ",rangefunc" edited = true } } if !edited {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 19:46:10 UTC 2024 - 27K bytes - Viewed (0) -
test/rangegen.go
// runoutput -goexperiment rangefunc // Copyright 2023 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. // Torture test for range-over-func. // // cmd/internal/testdir runs this like // // go run rangegen.go >x.go // go run x.go // // but a longer version can be run using // // go run rangegen.go long //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 23:35:19 UTC 2023 - 8.4K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/_builtin/runtime.go
// we only need to pass one. func ifaceeq(tab *uintptr, x, y unsafe.Pointer) (ret bool) func efaceeq(typ *uintptr, x, y unsafe.Pointer) (ret bool) // panic for various rangefunc iterator errors func panicrangestate(state int) // defer in range over func func deferrangefunc() interface{} func rand32() uint32 // *byte is really *runtime.Type
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 21:08:03 UTC 2024 - 10.6K bytes - Viewed (0) -
src/runtime/runtime2.go
// and for heap defers, marked. type _defer struct { heap bool rangefunc bool // true for rangefunc list sp uintptr // sp at time of defer pc uintptr // pc at time of defer fn func() // can be nil for open-coded defers link *_defer // next defer on G; can point to either heap or stack! // If rangefunc is true, *head is the head of the atomic linked list
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:57:37 UTC 2024 - 47.9K bytes - Viewed (0) -
src/cmd/dist/test.go
pkg: "crypto/x509", }) } // GOEXPERIMENT=rangefunc tests if !t.compileOnly { for _, pkg := range []string{"iter", "slices", "maps"} { t.registerTest("GOEXPERIMENT=rangefunc", &goTest{ variant: pkg, short: t.short, env: []string{"GOEXPERIMENT=rangefunc"}, pkg: pkg, }) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 16:01:35 UTC 2024 - 50K bytes - Viewed (0)