Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 642 for Map (0.05 sec)

  1. src/go/types/resolver_test.go

    		files = append(files, mustParse(fset, src))
    	}
    
    	// resolve and type-check package AST
    	importer := new(resolveTestImporter)
    	conf := Config{Importer: importer}
    	uses := make(map[*ast.Ident]Object)
    	defs := make(map[*ast.Ident]Object)
    	_, err := conf.Check("testResolveIdents", fset, files, &Info{Defs: defs, Uses: uses})
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// check that all packages were imported
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. src/cmd/internal/obj/x86/obj6_test.go

    	marks              []int
    	marker_to_input    map[int][]string
    	marker_to_expected map[int][]string
    	marker_to_output   map[int][]string
    }
    
    const marker_start = 1234
    
    func parseTestData(t *testing.T) *ParsedTestData {
    	r := &ParsedTestData{}
    	scanner := bufio.NewScanner(strings.NewReader(testdata))
    	r.marker_to_input = make(map[int][]string)
    	r.marker_to_expected = make(map[int][]string)
    	marker := marker_start
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:21:30 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  3. src/debug/dwarf/open.go

    	// New sections added in DWARF 5.
    	addr       []byte
    	lineStr    []byte
    	strOffsets []byte
    	rngLists   []byte
    
    	// parsed data
    	abbrevCache map[uint64]abbrevTable
    	bigEndian   bool
    	order       binary.ByteOrder
    	typeCache   map[Offset]Type
    	typeSigs    map[uint64]*typeUnit
    	unit        []unit
    }
    
    var errSegmentSelector = errors.New("non-zero segment_selector size not supported")
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/reflectdata/helpers.go

    // map type.
    func DeleteMapRType(pos src.XPos, n *ir.CallExpr) ir.Node {
    	assertOp(n, ir.ODELETE)
    	if hasRType(n, n.RType, "RType") {
    		return n.RType
    	}
    	return mapRType(pos, n.Args[0].Type())
    }
    
    // IndexMapRType asserts that n is a map index operation, and returns
    // an expression that yields the *runtime._type value representing the
    // map type.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 04:50:32 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  5. src/internal/types/errors/generrordocs.go

    	if err != nil {
    		log.Fatalf("ParseFile failed: %s", err)
    	}
    	conf := Config{Importer: importer.Default()}
    	info := &Info{
    		Types: make(map[ast.Expr]TypeAndValue),
    		Defs:  make(map[*ast.Ident]Object),
    		Uses:  make(map[*ast.Ident]Object),
    	}
    	_, err = conf.Check("types", fset, []*ast.File{file}, info)
    	if err != nil {
    		log.Fatalf("Check failed: %s", err)
    	}
    	for _, decl := range file.Decls {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 03:14:42 UTC 2023
    - 3K bytes
    - Viewed (0)
  6. src/internal/types/testdata/fixedbugs/issue50755.go

    // during constraint type inference.
    func f4[M4 map[K4]int, K4 comparable](m4 M4) {}
    
    func f5[M5 map[K5]int, K5 comparable](m5 M5) {
    	f4(m5)
    }
    
    // test case from issue
    
    func Copy[MC ~map[KC]VC, KC comparable, VC any](dst, src MC) {
    	for k, v := range src {
    		dst[k] = v
    	}
    }
    
    func Merge[MM ~map[KM]VM, KM comparable, VM any](ms ...MM) MM {
    	result := MM{}
    	for _, m := range ms {
    		Copy(result, m)
    	}
    	return result
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 02:58:32 UTC 2022
    - 1K bytes
    - Viewed (0)
  7. src/sync/map_reference_test.go

    }
    
    func (m *DeepCopyMap) Range(f func(key, value any) (shouldContinue bool)) {
    	clean, _ := m.clean.Load().(map[any]any)
    	for k, v := range clean {
    		if !f(k, v) {
    			break
    		}
    	}
    }
    
    func (m *DeepCopyMap) dirty() map[any]any {
    	clean, _ := m.clean.Load().(map[any]any)
    	dirty := make(map[any]any, len(clean)+1)
    	for k, v := range clean {
    		dirty[k] = v
    	}
    	return dirty
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 01 15:34:22 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  8. src/cmd/internal/pgo/pgo.go

    	CalleeName     string
    	CallSiteOffset int // Line offset from function start line.
    }
    
    // NamedEdgeMap contains all unique call edges in the profile and their
    // edge weight.
    type NamedEdgeMap struct {
    	Weight map[NamedCallEdge]int64
    
    	// ByWeight lists all keys in Weight, sorted by edge weight from
    	// highest to lowest.
    	ByWeight []NamedCallEdge
    }
    
    func emptyProfile() *Profile {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 20:20:01 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/example_test.go

    		return x
    	}
    	return fib(x-1) - fib(x-2)
    }`
    	// Type-check the package.
    	// We create an empty map for each kind of input
    	// we're interested in, and Check populates them.
    	info := types2.Info{
    		Types: make(map[syntax.Expr]types2.TypeAndValue),
    		Defs:  make(map[*syntax.Name]types2.Object),
    		Uses:  make(map[*syntax.Name]types2.Object),
    	}
    	pkg := mustTypecheck(input, nil, &info)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 28 17:58:07 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  10. src/internal/types/testdata/fixedbugs/issue40789.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import "fmt"
    
    func main() {
    	m := map[string]int{
    		"a": 6,
    		"b": 7,
    	}
    	fmt.Println(copyMap[map[string]int, string, int](m))
    }
    
    type Map[K comparable, V any] interface {
    	map[K] V
    }
    
    func copyMap[M Map[K, V], K comparable, V any](m M) M {
    	m1 := make(M)
    	for k, v := range m {
    		m1[k] = v
    	}
    	return m1
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 02:58:32 UTC 2022
    - 614 bytes
    - Viewed (0)
Back to top