- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for rangefunc (0.16 sec)
-
test/inline.go
_ = want } func inlineRangeIntoMe(data []int) { // ERROR "can inline inlineRangeIntoMe" "data does not escape" rangeFunc(data, 12) // ERROR "inlining call to rangeFunc" } func rangeFunc(xs []int, b int) int { // ERROR "can inline rangeFunc" "xs does not escape" for i, x := range xs { if x == b { return i } } return -1 } type T struct{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 11.7K bytes - Viewed (0) -
test/newinline.go
_ = want } func inlineRangeIntoMe(data []int) { // ERROR "can inline inlineRangeIntoMe" "data does not escape" rangeFunc(data, 12) // ERROR "inlining call to rangeFunc" } func rangeFunc(xs []int, b int) int { // ERROR "can inline rangeFunc" "xs does not escape" for i, x := range xs { if x == b { return i } } return -1 } type T struct{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 16 20:15:25 UTC 2023 - 11.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/check_test.go
testFiles(t, []string{"p.go"}, [][]byte{[]byte(src)}, 0, 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", 50, false) // TODO(gri) narrow column tolerance }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 19:45:33 UTC 2024 - 13.8K 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) -
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) -
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/internal/trace/trace_test.go
cmd := testenv.Command(t, testenv.GoToolPath(t), "run") if race.Enabled { cmd.Args = append(cmd.Args, "-race") } cmd.Args = append(cmd.Args, testPath) cmd.Env = append(os.Environ(), "GOEXPERIMENT=rangefunc") // Add a stack ownership check. This is cheap enough for testing. godebug := "tracecheckstackownership=1" if stress { // Advance a generation constantly to stress the tracer.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 18.5K bytes - Viewed (0)