Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 57 for newarray (0.14 sec)

  1. guava-tests/test/com/google/common/primitives/LongsTest.java

        long[] array = {(long) 0, (long) 1, (long) 2};
        List<Long> list = Longs.asList(array);
        long[] newArray = Longs.toArray(list);
    
        // Make sure it returned a copy
        list.set(0, (long) 4);
        assertThat(newArray).isEqualTo(new long[] {(long) 0, (long) 1, (long) 2});
        newArray[1] = (long) 5;
        assertThat((long) list.get(1)).isEqualTo((long) 1);
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 30K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/convert.go

    		}
    		// The actual type is [256]uint64, but we use [256*8]uint8 so we can address
    		// individual bytes.
    		staticuint64s := ir.NewLinksymExpr(base.Pos, ir.Syms.Staticuint64s, types.NewArray(types.Types[types.TUINT8], 256*8))
    		xe := ir.NewIndexExpr(base.Pos, staticuint64s, index)
    		xe.SetBounded(true)
    		value = xe
    	case n.Op() == ir.ONAME && n.(*ir.Name).Class == ir.PEXTERN && n.(*ir.Name).Readonly():
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 17:28:22 UTC 2023
    - 18.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ImmutableCollection.java

          Object[] internal = internalArray();
          if (internal != null) {
            return Platform.copy(internal, internalArrayStart(), internalArrayEnd(), other);
          }
          other = ObjectArrays.newArray(other, size);
        } else if (other.length > size) {
          other[size] = null;
        }
        copyIntoArray(other, 0);
        return other;
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ImmutableCollection.java

          Object[] internal = internalArray();
          if (internal != null) {
            return Platform.copy(internal, internalArrayStart(), internalArrayEnd(), other);
          }
          other = ObjectArrays.newArray(other, size);
        } else if (other.length > size) {
          other[size] = null;
        }
        copyIntoArray(other, 0);
        return other;
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  5. src/runtime/map_faststr.go

    	// Set hashWriting after calling t.hasher for consistency with mapassign.
    	h.flags ^= hashWriting
    
    	if h.buckets == nil {
    		h.buckets = newobject(t.Bucket) // newarray(t.bucket, 1)
    	}
    
    again:
    	bucket := hash & bucketMask(h.B)
    	if h.growing() {
    		growWork_faststr(t, h, bucket)
    	}
    	b := (*bmap)(add(h.buckets, bucket*uintptr(t.BucketSize)))
    	top := tophash(hash)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

      @Override
      public <T> T[] toArray(T[] a) {
        final E[] items = this.items;
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          if (a.length < count) a = ObjectArrays.newArray(a, count);
    
          int k = 0;
          int i = takeIndex;
          while (k < count) {
            // This cast is not itself safe, but the following statement
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  7. src/go/internal/gcimporter/ureader.go

    			return t
    		}
    		return name.Type()
    
    	case pkgbits.TypeTypeParam:
    		return r.dict.tparams[r.Len()]
    
    	case pkgbits.TypeArray:
    		len := int64(r.Uint64())
    		return types.NewArray(r.typ(), len)
    	case pkgbits.TypeChan:
    		dir := types.ChanDir(r.Len())
    		return types.NewChan(dir, r.typ())
    	case pkgbits.TypeMap:
    		return types.NewMap(r.typ(), r.typ())
    	case pkgbits.TypePointer:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

      @Override
      public <T> T[] toArray(T[] a) {
        final E[] items = this.items;
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          if (a.length < count) a = ObjectArrays.newArray(a, count);
    
          int k = 0;
          int i = takeIndex;
          while (k < count) {
            // This cast is not itself safe, but the following statement
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  9. src/go/internal/gcimporter/iimport.go

    	case pointerType:
    		return types.NewPointer(r.typ())
    	case sliceType:
    		return types.NewSlice(r.typ())
    	case arrayType:
    		n := r.uint64()
    		return types.NewArray(r.typ(), int64(n))
    	case chanType:
    		dir := chanDir(int(r.uint64()))
    		return types.NewChan(dir, r.typ())
    	case mapType:
    		return types.NewMap(r.typ(), r.typ())
    	case signatureType:
    		r.currPkg = r.pkg()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/order.go

    	// Fewer than 5 strings use direct runtime helpers.
    	case ir.OADDSTR:
    		n := n.(*ir.AddStringExpr)
    		o.exprList(n.List)
    
    		if len(n.List) > 5 {
    			t := types.NewArray(types.Types[types.TSTRING], int64(len(n.List)))
    			n.Prealloc = o.newTemp(t, false)
    		}
    
    		// Mark string(byteSlice) arguments to reuse byteSlice backing
    		// buffer during conversion. String concatenation does not
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
Back to top