Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for typehash (0.14 sec)

  1. src/runtime/alg.go

    		// typehash, but we want to report the topmost type in
    		// the error text (e.g. in a struct with a field of slice type
    		// we want to report the struct, not the slice).
    		panic(errorString("hash of unhashable type " + toRType(t).string()))
    	}
    	if isDirectIface(t) {
    		return c1 * typehash(t, unsafe.Pointer(&a.data), h^c0)
    	} else {
    		return c1 * typehash(t, a.data, h^c0)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  2. src/runtime/type.go

    			} else {
    				t = prev.typemap[typeOff(tl)]
    			}
    			// Add to typehash if not seen before.
    			tlist := typehash[t.Hash]
    			for _, tcur := range tlist {
    				if tcur == t {
    					continue collect
    				}
    			}
    			typehash[t.Hash] = append(tlist, t)
    		}
    
    		if md.typemap == nil {
    			// If any of this module's typelinks match a type from a
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/typestring.go

    				w.string(f.pkg.Path())
    				w.string(" */ ")
    			}
    			if tag := t.Tag(i); tag != "" {
    				w.byte(' ')
    				// TODO(gri) If tag contains blanks, replacing them with '#'
    				//           in Context.TypeHash may produce another tag
    				//           accidentally.
    				w.string(strconv.Quote(tag))
    			}
    		}
    		w.byte('}')
    
    	case *Pointer:
    		w.byte('*')
    		w.typ(t.base)
    
    	case *Tuple:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  4. src/go/types/typestring.go

    				w.string(f.pkg.Path())
    				w.string(" */ ")
    			}
    			if tag := t.Tag(i); tag != "" {
    				w.byte(' ')
    				// TODO(gri) If tag contains blanks, replacing them with '#'
    				//           in Context.TypeHash may produce another tag
    				//           accidentally.
    				w.string(strconv.Quote(tag))
    			}
    		}
    		w.byte('}')
    
    	case *Pointer:
    		w.byte('*')
    		w.typ(t.base)
    
    	case *Tuple:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/stmt.go

    				err.report()
    				continue L
    			}
    		}
    		seen[T] = e
    		if x != nil && T != nil {
    			check.typeAssertion(e, x, T, true)
    		}
    	}
    	return
    }
    
    // TODO(gri) Once we are certain that typeHash is correct in all situations, use this version of caseTypes instead.
    // (Currently it may be possible that different types have identical names and import paths due to ImporterFrom.)
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  6. src/go/types/stmt.go

    				err.report()
    				continue L
    			}
    		}
    		seen[T] = e
    		if x != nil && T != nil {
    			check.typeAssertion(e, x, T, true)
    		}
    	}
    	return
    }
    
    // TODO(gri) Once we are certain that typeHash is correct in all situations, use this version of caseTypes instead.
    // (Currently it may be possible that different types have identical names and import paths due to ImporterFrom.)
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  7. src/runtime/map_test.go

    }
    
    type canString int
    
    func (c canString) String() string {
    	return fmt.Sprintf("%d", int(c))
    }
    
    func TestMapInterfaceKey(t *testing.T) {
    	// Test all the special cases in runtime.typehash.
    	type GrabBag struct {
    		f32  float32
    		f64  float64
    		c64  complex64
    		c128 complex128
    		s    string
    		i0   any
    		i1   interface {
    			String() string
    		}
    		a [4]string
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/rewrite.go

    		}
    	}
    	return false
    }
    func fixed32(c *Config, sym Sym, off int64) int32 {
    	lsym := sym.(*obj.LSym)
    	if ti, ok := (*lsym.Extra).(*obj.TypeInfo); ok {
    		if off == 2*c.PtrSize {
    			return int32(types.TypeHash(ti.Type.(*types.Type)))
    		}
    	}
    	base.Fatalf("fixed32 data not known for %s:%d", sym, off)
    	return 0
    }
    
    // isFixedSym returns true if the contents of sym at the given offset
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 64.2K bytes
    - Viewed (0)
  9. src/runtime/map_fast32.go

    			} else {
    				memclrNoHeapPointers(e, t.Elem.Size_)
    			}
    			b.tophash[i] = emptyOne
    			// If the bucket now ends in a bunch of emptyOne states,
    			// change those to emptyRest states.
    			if i == abi.MapBucketCount-1 {
    				if b.overflow(t) != nil && b.overflow(t).tophash[0] != emptyRest {
    					goto notLast
    				}
    			} else {
    				if b.tophash[i+1] != emptyRest {
    					goto notLast
    				}
    			}
    			for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  10. src/runtime/map_fast64.go

    			} else {
    				memclrNoHeapPointers(e, t.Elem.Size_)
    			}
    			b.tophash[i] = emptyOne
    			// If the bucket now ends in a bunch of emptyOne states,
    			// change those to emptyRest states.
    			if i == abi.MapBucketCount-1 {
    				if b.overflow(t) != nil && b.overflow(t).tophash[0] != emptyRest {
    					goto notLast
    				}
    			} else {
    				if b.tophash[i+1] != emptyRest {
    					goto notLast
    				}
    			}
    			for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 14.1K bytes
    - Viewed (0)
Back to top