Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 211 for Map (0.03 sec)

  1. src/go/types/context.go

    // The use of a shared context does not guarantee that identical instances are
    // deduplicated in all cases.
    type Context struct {
    	mu        sync.Mutex
    	typeMap   map[string][]ctxtEntry // type hash -> instances entries
    	nextID    int                    // next unique ID
    	originIDs map[Type]int           // origin type -> unique ID
    }
    
    type ctxtEntry struct {
    	orig     Type
    	targs    []Type
    	instance Type // = orig[targs]
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. src/internal/types/testdata/check/decls0.go

    		I10
    	}
    	I10 interface {
    		I11
    	}
    	I11 interface {
    		I9
    	}
    
    	C1 chan int
    	C2 <-chan int
    	C3 chan<- C3
    	C4 chan C5
    	C5 chan C6
    	C6 chan C4
    
    	M1 map[Last]string
    	M2 map[string]M2
    
    	Last int
    )
    
    // cycles in function/method declarations
    // (test cases for issues #5217, #25790 and variants)
    func f1(x f1 /* ERROR "not a type" */ ) {}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  3. src/testing/fstest/mapfs.go

    //
    // File system operations read directly from the map,
    // so that the file system can be changed by editing the map as needed.
    // An implication is that file system operations must not run concurrently
    // with changes to the map, which would be a race.
    // Another implication is that opening or reading a directory requires
    // iterating over the entire map, so a MapFS should typically be used with not more
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  4. src/internal/coverage/cformat/format.go

    )
    
    type Formatter struct {
    	// Maps import path to package state.
    	pm map[string]*pstate
    	// Records current package being visited.
    	pkg string
    	// Pointer to current package state.
    	p *pstate
    	// Counter mode.
    	cm coverage.CounterMode
    }
    
    // pstate records package-level coverage data state:
    // - a table of functions (file/fname/literal)
    // - a map recording the index/ID of each func encountered so far
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  5. src/reflect/iter_test.go

    // license that can be found in the LICENSE file.
    
    package reflect_test
    
    import (
    	"iter"
    	"maps"
    	. "reflect"
    	"testing"
    )
    
    func TestValueSeq(t *testing.T) {
    	m := map[string]int{
    		"1": 1,
    		"2": 2,
    		"3": 3,
    		"4": 4,
    	}
    	c := make(chan int, 3)
    	for i := range 3 {
    		c <- i
    	}
    	close(c)
    	tests := []struct {
    		name  string
    		val   Value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 14:27:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. src/internal/trace/event/event.go

    	"stack",   // stack ID
    	"value",   // uint64
    	"task",    // trace.TaskID
    }
    
    // Names is a helper that produces a mapping of event names to event types.
    func Names(specs []Spec) map[string]Type {
    	nameToType := make(map[string]Type)
    	for i, spec := range specs {
    		nameToType[spec.Name] = Type(byte(i))
    	}
    	return nameToType
    }
    
    // Experiment is an experiment ID that events may be associated with.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/util.go

    func localFunctionDecls(info *types.Info, files []*ast.File) func(*types.Func) *ast.FuncDecl {
    	var fnDecls map[*types.Func]*ast.FuncDecl // computed lazily
    	return func(f *types.Func) *ast.FuncDecl {
    		if f != nil && fnDecls == nil {
    			fnDecls = make(map[*types.Func]*ast.FuncDecl)
    			for _, file := range files {
    				for _, decl := range file.Decls {
    					if fnDecl, ok := decl.(*ast.FuncDecl); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  8. test/fixedbugs/issue65957.dir/main.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"./a"
    	"reflect"
    )
    
    var s = []rune{0, 1, 2, 3}
    
    func main() {
    	m := map[any]int{}
    	k := reflect.New(reflect.ArrayOf(4, reflect.TypeOf(int32(0)))).Elem().Interface()
    	m[k] = 1
    	a.F()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 05:32:14 UTC 2024
    - 368 bytes
    - Viewed (0)
  9. src/net/internal/socktest/switch.go

    // A Switch represents a callpath point switch for socket system
    // calls.
    type Switch struct {
    	once sync.Once
    
    	fmu   sync.RWMutex
    	fltab map[FilterType]Filter
    
    	smu   sync.RWMutex
    	sotab Sockets
    	stats stats
    }
    
    func (sw *Switch) init() {
    	sw.fltab = make(map[FilterType]Filter)
    	sw.sotab = make(Sockets)
    	sw.stats = make(stats)
    }
    
    // Stats returns a list of per-cookie socket statistics.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. src/internal/types/testdata/fixedbugs/issue66878.go

    package p
    
    func _[T bool](ch chan T) {
    	var _, _ T = <-ch
    }
    
    // offending code snippets from issue
    
    func _[T ~bool](ch <-chan T) {
    	var x, ok T = <-ch
    	println(x, ok)
    }
    
    func _[T ~bool](m map[int]T) {
    	var x, ok T = m[0]
    	println(x, ok)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 17:42:47 UTC 2024
    - 399 bytes
    - Viewed (0)
Back to top