Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 52 for makeslice (0.23 sec)

  1. src/os/dir_windows.go

    				nextEntryOffset = info.NextEntryOffset
    				nameslice = unsafe.Slice(&info.FileName[0], info.FileNameLength/2)
    			}
    			d.bufp += int(nextEntryOffset)
    			islast = nextEntryOffset == 0
    			if islast {
    				d.bufp = 0
    			}
    			if (len(nameslice) == 1 && nameslice[0] == '.') ||
    				(len(nameslice) == 2 && nameslice[0] == '.' && nameslice[1] == '.') {
    				// Ignore "." and ".." and avoid allocating a string for them.
    				continue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 20:52:06 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  2. src/net/http/mapping.go

    }
    
    type entry[K comparable, V any] struct {
    	key   K
    	value V
    }
    
    // maxSlice is the maximum number of pairs for which a slice is used.
    // It is a variable for benchmarking.
    var maxSlice int = 8
    
    // add adds a key-value pair to the mapping.
    func (h *mapping[K, V]) add(k K, v V) {
    	if h.m == nil && len(h.s) < maxSlice {
    		h.s = append(h.s, entry[K, V]{k, v})
    	} else {
    		if h.m == nil {
    			h.m = map[K]V{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 17:47:07 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. src/net/http/mapping_test.go

    import (
    	"cmp"
    	"fmt"
    	"slices"
    	"strconv"
    	"testing"
    )
    
    func TestMapping(t *testing.T) {
    	var m mapping[int, string]
    	for i := 0; i < maxSlice; i++ {
    		m.add(i, strconv.Itoa(i))
    	}
    	if m.m != nil {
    		t.Fatal("m.m != nil")
    	}
    	for i := 0; i < maxSlice; i++ {
    		g, _ := m.find(i)
    		w := strconv.Itoa(i)
    		if g != w {
    			t.Fatalf("%d: got %s, want %s", i, g, w)
    		}
    	}
    	m.add(4, "4")
    	if m.s != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 17:47:07 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  4. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/transform/ArtifactTransformOfDirectoriesIntegrationTest.groovy

                }
                configurations {
                    compile
                }
                dependencies {
                    compile files(producer.output)
    
                    registerTransform(MakeSize) {
                        from.attribute(artifactType, 'directory')
                        to.attribute(artifactType, 'size')
                    }
                }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/_gen/generic.rules

    // Recognise make([]T, 0) and replace it with a pointer to the zerobase
    (StaticLECall {callAux} _ (Const(64|32) [0]) (Const(64|32) [0]) mem)
    	&& isSameCall(callAux, "runtime.makeslice")
    	=> (MakeResult (Addr <v.Type.FieldType(0)> {ir.Syms.Zerobase} (SB)) mem)
    
    // Evaluate constant address comparisons.
    (EqPtr  x x) => (ConstBool [true])
    (NeqPtr x x) => (ConstBool [false])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 22:21:05 UTC 2024
    - 135.3K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/reflectdata/helpers.go

    // type, and returns an expression that yields the *runtime._type
    // value representing that slice type's element type.
    func MakeSliceElemRType(pos src.XPos, n *ir.MakeExpr) ir.Node {
    	assertOp2(n, ir.OMAKESLICE, ir.OMAKESLICECOPY)
    	if hasRType(n, n.RType, "RType") {
    		return n.RType
    	}
    	return sliceElemRType(pos, n.Type())
    }
    
    // RangeMapRType asserts that n is a "range" loop over a map value,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 04:50:32 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  7. src/cmd/internal/src/pos.go

    // NoPos is a valid unknown position.
    var NoPos Pos
    
    // MakePos creates a new Pos value with the given base, and (file-absolute)
    // line and column.
    func MakePos(base *PosBase, line, col uint) Pos {
    	return Pos{base, makeLico(line, col)}
    }
    
    // IsKnown reports whether the position p is known.
    // A position is known if it either has a non-nil
    // position base, or a non-zero line number.
    func (p Pos) IsKnown() bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 15.5K bytes
    - Viewed (0)
  8. src/cmd/trace/testdata/go122.test

    String id=76
    	data="runtime.deductAssistCredit"
    String id=77
    	data="/usr/local/google/home/mknyszek/work/go-1/src/runtime/malloc.go"
    String id=78
    	data="runtime.mallocgc"
    String id=79
    	data="runtime.makeslice"
    String id=80
    	data="/usr/local/google/home/mknyszek/work/go-1/src/runtime/slice.go"
    String id=81
    	data="syscall.fcntl"
    String id=82
    	data="syscall.SetNonblock"
    String id=83
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 17:15:58 UTC 2024
    - 166K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ir/fmt.go

    			fmt.Fprintf(s, "%v", n.ReturnVars[0])
    			return
    		}
    		fmt.Fprintf(s, "(.%v)", n.ReturnVars)
    
    	case OMAKEMAP, OMAKECHAN, OMAKESLICE:
    		n := n.(*MakeExpr)
    		if n.Cap != nil {
    			fmt.Fprintf(s, "make(%v, %v, %v)", n.Type(), n.Len, n.Cap)
    			return
    		}
    		if n.Len != nil && (n.Op() == OMAKESLICE || !n.Len.Type().IsUntyped()) {
    			fmt.Fprintf(s, "make(%v, %v)", n.Type(), n.Len)
    			return
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  10. src/internal/trace/testdata/tests/go122-gc-stress.test

    String id=27
    	data="runtime.deductAssistCredit"
    String id=28
    	data="/usr/local/google/home/mknyszek/work/go-1/src/runtime/malloc.go"
    String id=29
    	data="runtime.mallocgc"
    String id=30
    	data="runtime.makeslice"
    String id=31
    	data="/usr/local/google/home/mknyszek/work/go-1/src/runtime/slice.go"
    String id=32
    	data="main.main.func1"
    String id=33
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 139.1K bytes
    - Viewed (0)
Back to top