Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for identicalInstance (0.38 sec)

  1. src/cmd/compile/internal/types2/context.go

    // Otherwise, it returns nil.
    func (ctxt *Context) lookup(h string, orig Type, targs []Type) Type {
    	ctxt.mu.Lock()
    	defer ctxt.mu.Unlock()
    
    	for _, e := range ctxt.typeMap[h] {
    		if identicalInstance(orig, targs, e.orig, e.targs) {
    			return e.instance
    		}
    		if debug {
    			// Panic during development to surface any imperfections in our hash.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 17:29:21 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  2. src/go/types/context.go

    // Otherwise, it returns nil.
    func (ctxt *Context) lookup(h string, orig Type, targs []Type) Type {
    	ctxt.mu.Lock()
    	defer ctxt.mu.Unlock()
    
    	for _, e := range ctxt.typeMap[h] {
    		if identicalInstance(orig, targs, e.orig, e.targs) {
    			return e.instance
    		}
    		if debug {
    			// Panic during development to surface any imperfections in our hash.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/predicates.go

    func identicalOrigin(x, y *Named) bool {
    	// TODO(gri) is this correct?
    	return x.Origin().obj == y.Origin().obj
    }
    
    // identicalInstance reports if two type instantiations are identical.
    // Instantiations are identical if their origin and type arguments are
    // identical.
    func identicalInstance(xorig Type, xargs []Type, yorig Type, yargs []Type) bool {
    	if len(xargs) != len(yargs) {
    		return false
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  4. src/go/types/predicates.go

    func identicalOrigin(x, y *Named) bool {
    	// TODO(gri) is this correct?
    	return x.Origin().obj == y.Origin().obj
    }
    
    // identicalInstance reports if two type instantiations are identical.
    // Instantiations are identical if their origin and type arguments are
    // identical.
    func identicalInstance(xorig Type, xargs []Type, yorig Type, yargs []Type) bool {
    	if len(xargs) != len(yargs) {
    		return false
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.6K bytes
    - Viewed (0)
Back to top