- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for rangefunc (0.14 sec)
-
src/internal/goexperiment/exp_rangefunc_off.go
// Code generated by mkconsts.go. DO NOT EDIT. //go:build !goexperiment.rangefunc package goexperiment const RangeFunc = false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 15:32:14 UTC 2023 - 153 bytes - Viewed (0) -
src/internal/goexperiment/exp_rangefunc_on.go
// Code generated by mkconsts.go. DO NOT EDIT. //go:build goexperiment.rangefunc package goexperiment const RangeFunc = true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 15:32:14 UTC 2023 - 151 bytes - Viewed (0) -
test/range2.go
// errorcheck -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. // See ../internal/types/testdata/spec/range.go for most tests. // The ones in this file cannot be expressed in that framework // due to conflicts between that framework's error location pickiness // and gofmt's comment location pickiness. package p
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 15:32:14 UTC 2023 - 830 bytes - Viewed (0) -
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) -
src/internal/goexperiment/flags.go
CacheProg bool // NewInliner enables a new+improved version of the function // inlining phase within the Go compiler. NewInliner bool // RangeFunc enables range over func. RangeFunc bool // AliasTypeParams enables type parameters for alias types. // Requires that gotypesalias=1 is set with GODEBUG. // This flag will be removed with Go 1.24. AliasTypeParams bool
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 16:19:47 UTC 2024 - 4.2K 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/compiler_internal.go
// // fmt.Sprintf("#rv%d", i+1)` // // the newly named object is inserted into the signature's scope, // and the object and new field name are returned. // // The intended use for RenameResult is to allow rangefunc to assign results within a closure. // This is a hack, as narrowly targeted as possible to discourage abuse. func (s *Signature) RenameResult(results []*syntax.Field, i int) (*Var, *syntax.Name) { a := results[i]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 21:08:03 UTC 2024 - 1.4K bytes - Viewed (0) -
src/runtime/race/testdata/rangefunc_test.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 package race_test import ( "runtime" "sync/atomic" "testing" ) type Seq2[T1, T2 any] func(yield func(T1, T2) bool) // ofSliceIndex returns a Seq over the elements of s. It is equivalent
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 21:08:03 UTC 2024 - 1.8K 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/testdata/testprog/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 package main import ( "fmt" "iter" "runtime" ) func init() { register("CoroLockOSThreadIterLock", func() { println("expect: OK") CoroLockOSThread(callerExhaust, iterLock) })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 19:46:10 UTC 2024 - 3.6K bytes - Viewed (0)