Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 496 for index (0.04 sec)

  1. test/fixedbugs/issue65417.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"strings"
    	"unsafe"
    )
    
    func main() {
    	shouldPanic("runtime error: index out of range", func() { f(0) })
    	shouldPanic("runtime error: index out of range", func() { g(0) })
    }
    
    func f[T byte](t T) {
    	const str = "a"
    	_ = str[unsafe.Sizeof(t)]
    }
    
    func g[T byte](t T) {
    	const str = "a"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 22:29:14 UTC 2024
    - 752 bytes
    - Viewed (0)
  2. src/go/types/methodset.go

    // and is treated as a collision.
    func (s methodSet) add(list []*Func, index []int, indirect bool, multiples bool) methodSet {
    	if len(list) == 0 {
    		return s
    	}
    	for i, f := range list {
    		s = s.addOne(f, concat(index, i), indirect, multiples)
    	}
    	return s
    }
    
    func (s methodSet) addOne(f *Func, index []int, indirect bool, multiples bool) methodSet {
    	if s == nil {
    		s = make(methodSet)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  3. src/runtime/symtabinl.go

    	// always a "call PC" (not a "return PC"). This is 0 when the iterator is
    	// exhausted.
    	pc uintptr
    
    	// index is the index of the current record in inlTree, or -1 if we are in
    	// the outermost function.
    	index int32
    }
    
    // newInlineUnwinder creates an inlineUnwinder initially set to the inner-most
    // inlined frame at PC. PC should be a "call PC" (not a "return PC").
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  4. src/internal/reflectlite/swapper.go

    	}
    	// Fast path for slices of size 0 and 1. Nothing to swap.
    	switch v.Len() {
    	case 0:
    		return func(i, j int) { panic("reflect: slice index out of range") }
    	case 1:
    		return func(i, j int) {
    			if i != 0 || j != 0 {
    				panic("reflect: slice index out of range")
    			}
    		}
    	}
    
    	typ := v.Type().Elem().common()
    	size := typ.Size()
    	hasPtr := typ.Pointers()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:30 UTC 2024
    - 2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/selection.go

    	return s.obj.Type()
    }
    
    // Index describes the path from x to f in x.f.
    // The last index entry is the field or method index of the type declaring f;
    // either:
    //
    //  1. the list of declared methods of a named type; or
    //  2. the list of methods of an interface type; or
    //  3. the list of fields of a struct type.
    //
    // The earlier index entries are the indices of the embedded fields implicitly
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  6. src/cmd/internal/obj/pass.go

    	switch a.Type {
    	case TYPE_NONE, TYPE_REGREG2, TYPE_REGLIST:
    		return
    
    	case TYPE_BRANCH, TYPE_TEXTSIZE:
    		if a.Reg != 0 || a.Index != 0 || a.Scale != 0 || a.Name != 0 {
    			break
    		}
    		return
    
    	case TYPE_MEM:
    		return
    
    	case TYPE_CONST:
    		// TODO(rsc): After fixing SHRQ, check a.Index != 0 too.
    		if a.Name != 0 || a.Sym != nil || a.Reg != 0 {
    			ctxt.Diag("argument is TYPE_CONST, should be TYPE_ADDR, in %v", p)
    			return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 01:26:58 UTC 2023
    - 5K bytes
    - Viewed (0)
  7. src/go/types/typeparam.go

    	return typ
    }
    
    // Obj returns the type name for the type parameter t.
    func (t *TypeParam) Obj() *TypeName { return t.obj }
    
    // Index returns the index of the type param within its param list, or -1 if
    // the type parameter has not yet been bound to a type.
    func (t *TypeParam) Index() int {
    	return t.index
    }
    
    // Constraint returns the type constraint specified for t.
    func (t *TypeParam) Constraint() Type {
    	return t.bound
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  8. pkg/scheduler/apis/config/v1/default_plugins.go

    	return defaultPlugins
    }
    
    type pluginIndex struct {
    	index  int
    	plugin v1.Plugin
    }
    
    func mergePluginSet(logger klog.Logger, defaultPluginSet, customPluginSet v1.PluginSet) v1.PluginSet {
    	disabledPlugins := sets.New[string]()
    	enabledCustomPlugins := make(map[string]pluginIndex)
    	// replacedPluginIndex is a set of index of plugins, which have replaced the default plugins.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 06:27:01 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/sys/unix/cap_freebsd.go

    		if err != nil {
    			return err
    		}
    		if i >= n {
    			return errors.New("index overflow")
    		}
    		if capidxbit(rights.Rights[i]) != capidxbit(right) {
    			return errors.New("index mismatch")
    		}
    		rights.Rights[i] |= right
    		if capidxbit(rights.Rights[i]) != capidxbit(right) {
    			return errors.New("index mismatch (after assign)")
    		}
    	}
    
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 5K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/typeparams/common.go

    )
    
    // UnpackIndexExpr extracts data from AST nodes that represent index
    // expressions.
    //
    // For an ast.IndexExpr, the resulting indices slice will contain exactly one
    // index expression. For an ast.IndexListExpr (go1.18+), it may have a variable
    // number of index expressions.
    //
    // For nodes that don't represent index expressions, the first return value of
    // UnpackIndexExpr will be nil.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 4.3K bytes
    - Viewed (0)
Back to top