Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for rangefunc (0.12 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top