- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 55 for dumpfields (0.48 sec)
-
src/cmd/compile/internal/walk/complit.go
fixedlit(inInitFunction, initKindDynamic, n, var_, init) break } var components int64 if n.Op() == ir.OARRAYLIT { components = t.NumElem() } else { components = int64(t.NumFields()) } // initialization of an array or struct with unspecified components (missing fields or arrays) if isSimpleName(var_) || int64(len(n.List)) < components {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:03:54 UTC 2023 - 19.5K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/value.go
// not supported on SSA variables. // TODO: allow if all indexes are constant. if t.NumElem() <= 1 { return CanSSA(t.Elem()) } return false case types.TSTRUCT: if t.NumFields() > MaxStruct { return false } for _, t1 := range t.Fields() { if !CanSSA(t1.Type) { return false } } return true default: return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 16:40:22 UTC 2024 - 16.7K bytes - Viewed (0) -
src/cmd/doc/pkg.go
s := buf.String() if strings.Contains(s, "\n") { return dotDotDot } return s } } func (pkg *Package) formatTypeParams(list *ast.FieldList, depth int) string { if list.NumFields() == 0 { return "" } var tparams []string for _, field := range list.List { tparams = append(tparams, pkg.oneLineField(field, depth)) } return "[" + joinStrings(tparams) + "]" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 08 20:15:52 UTC 2024 - 32K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/generic.rules
(StructSelect [3] (StructMake4 _ _ _ x)) => x (Load <t> _ _) && t.IsStruct() && t.NumFields() == 0 && CanSSA(t) => (StructMake0) (Load <t> ptr mem) && t.IsStruct() && t.NumFields() == 1 && CanSSA(t) => (StructMake1 (Load <t.FieldType(0)> (OffPtr <t.FieldType(0).PtrTo()> [0] ptr) mem)) (Load <t> ptr mem) && t.IsStruct() && t.NumFields() == 2 && CanSSA(t) => (StructMake2
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 22:21:05 UTC 2024 - 135.3K bytes - Viewed (0) -
src/cmd/go/internal/load/test.go
var why string if !isTestFunc(fn, arg) { why = fmt.Sprintf("must be: func %s(%s *testing.%s)", fn.Name.String(), strings.ToLower(arg), arg) } if fn.Type.TypeParams.NumFields() > 0 { why = "test functions cannot have type parameters" } if why != "" { pos := testFileSet.Position(fn.Pos()) return fmt.Errorf("%s: wrong signature for %s, %s", pos, fn.Name.String(), why) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 14:01:23 UTC 2024 - 28.2K bytes - Viewed (0) -
src/go/printer/nodes.go
if closing := p.lineFor(fields.Closing); 0 < prevLine && prevLine < closing { p.print(token.COMMA) p.linebreak(closing, 0, ignore, true) } else if mode == typeTParam && fields.NumFields() == 1 && combinesWithName(fields.List[0].Type) { // A type parameter list [P T] where the name P and the type expression T syntactically // combine to another valid (value) expression requires a trailing comma, as in [P *T,]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0) -
src/go/doc/reader.go
// case and then show those methods in an appropriate section. return } // Associate factory functions with the first visible result type, as long as // others are predeclared types. if fun.Type.Results.NumFields() >= 1 { var typ *namedType // type to associate the function with numResultTypes := 0 for _, res := range fun.Type.Results.List { factoryType := res.Type if t, ok := factoryType.(*ast.ArrayType); ok {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 27.5K bytes - Viewed (0) -
src/go/types/issues_test.go
if spec, _ := n.(*ast.TypeSpec); spec != nil { if tv, ok := info.Types[spec.Type]; ok && spec.Name.Name == "T" { want := strings.Count(src, ";") + 1 if got := tv.Type.(*Struct).NumFields(); got != want { t.Errorf("%s: got %d fields; want %d", src, got, want) } } } return true }) } } func TestIssue28005(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 28.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/issues_test.go
if decl, _ := n.(*syntax.TypeDecl); decl != nil { if tv, ok := info.Types[decl.Type]; ok && decl.Name.Value == "T" { want := strings.Count(src, ";") + 1 if got := tv.Type.(*Struct).NumFields(); got != want { t.Errorf("%s: got %d fields; want %d", src, got, want) } } } return true }) } } func TestIssue28005(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 28.1K bytes - Viewed (0) -
src/cmd/compile/internal/ssagen/ssa.go
// Grab information about the structure type. left := left.(*ir.SelectorExpr) t := left.X.Type() nf := t.NumFields() idx := fieldIdx(left) // Grab old value of structure. old := s.expr(left.X) // Make new structure. new := s.newValue0(ssa.StructMakeOp(t.NumFields()), t) // Add fields as args. for i := 0; i < nf; i++ { if i == idx { new.AddArg(right)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 19:44:43 UTC 2024 - 284.9K bytes - Viewed (0)