Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 57 for dumpfields (0.09 sec)

  1. src/cmd/compile/internal/typecheck/expr.go

    		errored := false
    		if len(n.List) != 0 && nokeys(n.List) {
    			// simple list of variables
    			ls := n.List
    			for i, n1 := range ls {
    				ir.SetPos(n1)
    				n1 = Expr(n1)
    				ls[i] = n1
    				if i >= t.NumFields() {
    					if !errored {
    						base.Errorf("too many values in %v", n)
    						errored = true
    					}
    					continue
    				}
    
    				f := t.Field(i)
    				s := f.Sym
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. src/go/types/unify.go

    		// and they have identical tags. Two embedded fields are considered to have the same
    		// name. Lower-case field names from different packages are always different.
    		if y, ok := y.(*Struct); ok {
    			if x.NumFields() == y.NumFields() {
    				for i, f := range x.fields {
    					g := y.fields[i]
    					if f.embedded != g.embedded ||
    						x.Tag(i) != y.Tag(i) ||
    						!f.sameId(g.pkg, g.name, false) ||
    						!u.nify(f.typ, g.typ, emode, p) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 16:24:39 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/stmt.go

    			checkassignto(typ, lhs[i])
    		}
    	}
    
    	cr := len(rhs)
    	if len(rhs) == 1 {
    		rhs[0] = typecheck(rhs[0], ctxExpr|ctxMultiOK)
    		if rtyp := rhs[0].Type(); rtyp != nil && rtyp.IsFuncArgStruct() {
    			cr = rtyp.NumFields()
    		}
    	} else {
    		Exprs(rhs)
    	}
    
    	// x, ok = y
    assignOK:
    	for len(lhs) == 2 && cr == 1 {
    		stmt := stmt.(*ir.AssignListStmt)
    		r := rhs[0]
    
    		switch r.Op() {
    		case ir.OINDEXMAP:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/unify.go

    		// and they have identical tags. Two embedded fields are considered to have the same
    		// name. Lower-case field names from different packages are always different.
    		if y, ok := y.(*Struct); ok {
    			if x.NumFields() == y.NumFields() {
    				for i, f := range x.fields {
    					g := y.fields[i]
    					if f.embedded != g.embedded ||
    						x.Tag(i) != y.Tag(i) ||
    						!f.sameId(g.pkg, g.name, false) ||
    						!u.nify(f.typ, g.typ, emode, p) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 16:24:39 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  5. src/go/types/decl.go

    	}).describef(obj, "validType(%s)", obj.Name())
    
    	// First type parameter, or nil.
    	var tparam0 *ast.Field
    	if tdecl.TypeParams.NumFields() > 0 {
    		tparam0 = tdecl.TypeParams.List[0]
    	}
    
    	// alias declaration
    	if tdecl.Assign.IsValid() {
    		// Report highest version requirement first so that fixing a version issue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types/fmt.go

    		}
    
    		b.WriteString("struct {")
    		for i, f := range t.Fields() {
    			if i != 0 {
    				b.WriteByte(';')
    			}
    			b.WriteByte(' ')
    			fldconv(b, f, 'L', mode, visited, false)
    		}
    		if t.NumFields() != 0 {
    			b.WriteByte(' ')
    		}
    		b.WriteByte('}')
    
    	case TFORW:
    		b.WriteString("undefined")
    		if t.Sym() != nil {
    			b.WriteByte(' ')
    			sconv2(b, t.Sym(), 'v', mode)
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 15:41:17 UTC 2023
    - 15.7K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/types/typeutil/map.go

    	case *types.Array:
    		return 9043 + 2*uint32(t.Len()) + 3*h.Hash(t.Elem())
    
    	case *types.Slice:
    		return 9049 + 2*h.Hash(t.Elem())
    
    	case *types.Struct:
    		var hash uint32 = 9059
    		for i, n := 0, t.NumFields(); i < n; i++ {
    			f := t.Field(i)
    			if f.Anonymous() {
    				hash += 8861
    			}
    			hash += hashString(t.Tag(i))
    			hash += hashString(f.Name()) // (ignore f.Pkg)
    			hash += h.Hash(f.Type())
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  8. src/go/ast/ast.go

    	// be conservative and guard against bad ASTs
    	if n := len(f.List); n > 0 {
    		return f.List[n-1].End()
    	}
    	return token.NoPos
    }
    
    // NumFields returns the number of parameters or struct fields represented by a [FieldList].
    func (f *FieldList) NumFields() int {
    	n := 0
    	if f != nil {
    		for _, g := range f.List {
    			m := len(g.Names)
    			if m == 0 {
    				m = 1
    			}
    			n += m
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types/type.go

    		TUINTPTR, TCOMPLEX64, TCOMPLEX128, TFLOAT32, TFLOAT64:
    		return true
    	}
    	return false
    }
    
    func (t *Type) PtrTo() *Type {
    	return NewPtr(t)
    }
    
    func (t *Type) NumFields() int {
    	if t.kind == TRESULTS {
    		return len(t.extra.(*Results).Types)
    	}
    	return len(t.Fields())
    }
    func (t *Type) FieldType(i int) *Type {
    	if t.kind == TTUPLE {
    		switch i {
    		case 0:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/loopreschedchecks.go

    		if last.Type.IsTuple() {
    			last = b.NewValue1(last.Pos, OpSelect1, types.TypeMem, last)
    		} else if last.Type.IsResults() {
    			last = b.NewValue1I(last.Pos, OpSelectN, types.TypeMem, int64(last.Type.NumFields()-1), last)
    		}
    
    		lastMems[b.ID] = last
    	}
    	return lastMems
    }
    
    // mark values
    type markKind uint8
    
    const (
    	notFound    markKind = iota // block has not been discovered yet
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 21:17:10 UTC 2023
    - 16K bytes
    - Viewed (0)
Back to top