Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for IsVariadic (0.13 sec)

  1. src/go/internal/gccgoimporter/parser.go

    	var list []*types.Var
    	isVariadic := false
    
    	p.expect('(')
    	for p.tok != ')' && p.tok != scanner.EOF {
    		if len(list) > 0 {
    			p.expect(',')
    		}
    		par, variadic := p.parseParam(pkg)
    		list = append(list, par)
    		if variadic {
    			if isVariadic {
    				p.error("... not on final argument")
    			}
    			isVariadic = true
    		}
    	}
    	p.expect(')')
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 02 23:14:07 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types/identity.go

    		// We intentionally ignore receiver parameters for type
    		// equality, because they're never relevant.
    		if t1.NumParams() != t2.NumParams() ||
    			t1.NumResults() != t2.NumResults() ||
    			t1.IsVariadic() != t2.IsVariadic() {
    			return false
    		}
    
    		fs1 := t1.ParamsResults()
    		fs2 := t2.ParamsResults()
    		for i, f1 := range fs1 {
    			if !identical(f1.Type, fs2[i].Type, flags, assumedEqual) {
    				return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 20:57:01 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  3. src/reflect/badlinkname.go

    func badlinkname_rtype_Implements(*rtype, Type) bool
    
    //go:linkname badlinkname_rtype_In reflect.(*rtype).In
    func badlinkname_rtype_In(*rtype, int) Type
    
    //go:linkname badlinkname_rtype_IsVariadic reflect.(*rtype).IsVariadic
    func badlinkname_rtype_IsVariadic(*rtype) bool
    
    //go:linkname badlinkname_rtype_Key reflect.(*rtype).Key
    func badlinkname_rtype_Key(*rtype) Type
    
    //go:linkname badlinkname_rtype_Kind reflect.(*rtype).Kind
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  4. src/go/internal/gccgoimporter/importer_test.go

    Elem() Type; Field(i int) StructField; FieldAlign() int; FieldByIndex(index []int) StructField; FieldByName(name string) (StructField, bool); FieldByNameFunc(match func(string) bool) (StructField, bool); Implements(u Type) bool; In(i int) Type; IsVariadic() bool; Key() Type; Kind() Kind; Len() int; Method(int) Method; MethodByName(string) (Method, bool); Name() string; NumField() int; NumIn() int; NumMethod() int; NumOut() int; Out(i int) Type; PkgPath() string; Size() uintptr; String() string; common()...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:17:57 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  5. src/reflect/type.go

    	//
    	//	t.NumIn() == 2
    	//	t.In(0) is the reflect.Type for "int"
    	//	t.In(1) is the reflect.Type for "[]float64"
    	//	t.IsVariadic() == true
    	//
    	// IsVariadic panics if the type's Kind is not Func.
    	IsVariadic() bool
    
    	// Elem returns a type's element type.
    	// It panics if the type's Kind is not Array, Chan, Map, Pointer, or Slice.
    	Elem() Type
    
    	// Field returns a struct type's i'th field.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  6. src/text/template/funcs.go

    	}
    
    	if err := goodFunc(name, typ); err != nil {
    		return reflect.Value{}, err
    	}
    	numIn := typ.NumIn()
    	var dddType reflect.Type
    	if typ.IsVariadic() {
    		if len(args) < numIn-1 {
    			return reflect.Value{}, fmt.Errorf("wrong number of args for %s: got %d want at least %d", name, len(args), numIn-1)
    		}
    		dddType = typ.In(numIn - 1).Elem()
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types/type.go

    func (t *Type) NumRecvs() int   { return len(t.Recvs()) }
    func (t *Type) NumParams() int  { return len(t.Params()) }
    func (t *Type) NumResults() int { return len(t.Results()) }
    
    // IsVariadic reports whether function type t is variadic.
    func (t *Type) IsVariadic() bool {
    	n := t.NumParams()
    	return n > 0 && t.Param(n-1).IsDDD()
    }
    
    // Recv returns the receiver of function type t, if any.
    func (t *Type) Recv() *Field {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
  8. src/text/template/exec.go

    	}
    	// Now the ... args.
    	if typ.IsVariadic() {
    		argType := typ.In(typ.NumIn() - 1).Elem() // Argument is a slice.
    		for ; i < len(args); i++ {
    			argv[i] = s.evalArg(dot, argType, args[i])
    		}
    	}
    	// Add final value if necessary.
    	if !isMissing(final) {
    		t := typ.In(typ.NumIn() - 1)
    		if typ.IsVariadic() {
    			if numIn-1 < numFixed {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:22:24 UTC 2024
    - 32K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/func.go

    	return n
    }
    
    // FixVariadicCall rewrites calls to variadic functions to use an
    // explicit ... argument if one is not already present.
    func FixVariadicCall(call *ir.CallExpr) {
    	fntype := call.Fun.Type()
    	if !fntype.IsVariadic() || call.IsDDD {
    		return
    	}
    
    	vi := fntype.NumParams() - 1
    	vt := fntype.Param(vi).Type
    
    	args := call.Args
    	extra := args[vi:]
    	slice := MakeDotArgs(call.Pos(), vt, extra)
    	for i := range extra {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssagen/abi.go

    		tailcall = false
    	}
    
    	var tail ir.Node
    	call := ir.NewCallExpr(base.Pos, ir.OCALL, f.Nname, nil)
    	call.Args = ir.ParamNames(fn.Type())
    	call.IsDDD = fn.Type().IsVariadic()
    	tail = call
    	if tailcall {
    		tail = ir.NewTailCallStmt(base.Pos, call)
    	} else if fn.Type().NumResults() > 0 {
    		n := ir.NewReturnStmt(base.Pos, nil)
    		n.Results = []ir.Node{call}
    		tail = n
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 13.8K bytes
    - Viewed (0)
Back to top