Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for caniuse (0.33 sec)

  1. src/cmd/cgo/internal/testplugin/testdata/mangle/plugin.go

    // Test cases for symbol name mangling.
    
    package main
    
    import (
    	"fmt"
    	"strings"
    )
    
    // Issue 58800:
    // Instantiated function name may contain weird characters
    // that confuse the external linker, so it needs to be
    // mangled.
    type S struct {
    	X int `parser:"|@@)"`
    }
    
    //go:noinline
    func F[T any]() {}
    
    func P() {
    	F[S]()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 18 15:53:47 UTC 2023
    - 722 bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testsanitizers/testdata/tsan7.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    // Setting an environment variable in a cgo program changes the C
    // environment. Test that this does not confuse the race detector.
    
    /*
    #cgo CFLAGS: -fsanitize=thread
    #cgo LDFLAGS: -fsanitize=thread
    */
    import "C"
    
    import (
    	"fmt"
    	"os"
    	"sync"
    	"time"
    )
    
    func main() {
    	var wg sync.WaitGroup
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 708 bytes
    - Viewed (0)
  3. src/cmd/compile/internal/test/issue50182_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package test
    
    import (
    	"fmt"
    	"sort"
    	"testing"
    )
    
    // Test that calling methods on generic types doesn't cause allocations.
    func genericSorted[T sort.Interface](data T) bool {
    	n := data.Len()
    	for i := n - 1; i > 0; i-- {
    		if data.Less(i, i-1) {
    			return false
    		}
    	}
    	return true
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 13 23:35:37 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/test/testdata/gen/arithBoundaryGen.go

    type sizedTestData struct {
    	name string
    	sn   string
    	u    []uint64
    	i    []int64
    }
    
    // values to generate tests. these should include the smallest and largest values, along
    // with any other values that might cause issues. we generate n^2 tests for each size to
    // cover all cases.
    var szs = []sizedTestData{
    	sizedTestData{name: "uint64", sn: "64", u: []uint64{0, 1, 4294967296, 0xffffFFFFffffFFFF}},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testsanitizers/testdata/msan6.go

    	uintptr_t a[20];
    } S;
    
    S f() {
    	S *p;
    
    	p = (S *)(malloc(sizeof(S)));
    	p->a[0] = 0;
    	return *p;
    }
    */
    import "C"
    
    // allocateStack extends the stack so that stack copying doesn't
    // confuse the msan data structures.
    //
    //go:noinline
    func allocateStack(i int) int {
    	if i == 0 {
    		return i
    	}
    	return allocateStack(i - 1)
    }
    
    // F1 marks a chunk of stack as uninitialized.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/testgodefs/testdata/main.go

    var v4 = N{}
    var v5 = A{}
    var v6 = B{}
    
    // Test that S is fully defined
    var v7 = S{}
    
    // Test that #define'd type is fully defined
    var _ = issue38649{X: 0}
    
    // Test that prefixes do not cause duplicate field names.
    var _ = Issue48396{Fd: 1, Bpf_fd: 2}
    
    func main() {
    	pass := true
    
    	// The Go translation of bitfields should not have any of the
    	// bitfield types. The order in which bitfields are laid out
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  7. src/cmd/go/internal/gover/toolchain.go

    //	FromToolchain("go1.2.3-bigcorp") == "1.2.3"
    //	FromToolchain("invalid") == ""
    func FromToolchain(name string) string {
    	if strings.ContainsAny(name, "\\/") {
    		// The suffix must not include a path separator, since that would cause
    		// exec.LookPath to resolve it from a relative directory instead of from
    		// $PATH.
    		return ""
    	}
    
    	var v string
    	if strings.HasPrefix(name, "go") {
    		v = name[2:]
    	} else {
    		return ""
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 3K bytes
    - Viewed (0)
  8. src/cmd/go/internal/lockedfile/lockedfile_test.go

    			t.Helper()
    			t.Logf("%s is unexpectedly still blocked after %v", desc, quiescent)
    
    			// Wait for the operation to actually complete, no matter how long it
    			// takes. If the test has deadlocked, this will cause the test to time out
    			// and dump goroutines.
    			<-done
    
    		case <-done:
    		}
    	}
    }
    
    func TestMutexExcludes(t *testing.T) {
    	t.Parallel()
    
    	dir, remove := mustTempDir(t)
    	defer remove()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/tighten.go

    // dominates all blocks in which it is used.
    func tighten(f *Func) {
    	if base.Flag.N != 0 && len(f.Blocks) < 10000 {
    		// Skip the optimization in -N mode, except for huge functions.
    		// Too many values live across blocks can cause pathological
    		// behavior in the register allocator (see issue 52180).
    		return
    	}
    
    	canMove := f.Cache.allocBoolSlice(f.NumValues())
    	defer f.Cache.freeBoolSlice(canMove)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 16 01:01:38 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/testshared/testdata/trivial/trivial.go

    package main
    
    func main() {
    	// This is enough to make sure that the executable references
    	// a type descriptor, which was the cause of
    	// https://golang.org/issue/25970.
    	c := make(chan int)
    	_ = c
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 203 bytes
    - Viewed (0)
Back to top