Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for rangefunc (0.21 sec)

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