Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 20 for NewPtr (0.11 sec)

  1. src/runtime/slice.go

    //	newLen = new length (= oldLen + num)
    //	oldCap = original slice's capacity.
    //	   num = number of elements being added
    //	    et = element type
    //
    // return values:
    //
    //	newPtr = pointer to the new backing store
    //	newLen = same value as the argument
    //	newCap = capacity of the new backing store
    //
    // Requires that uint(newLen) > uint(oldCap).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types/size.go

    func PtrDataSize(t *Type) int64 {
    	CalcSize(t)
    	x := t.ptrBytes
    	if t.Kind() == TPTR && t.Elem().NotInHeap() {
    		// Note: this is done here instead of when we're setting
    		// the ptrBytes field, because at that time (in NewPtr, usually)
    		// the NotInHeap bit of the element type might not be set yet.
    		x = 0
    	}
    	return x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 15K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/compare.go

    		// compare against the itab address directly?
    		var eqtype ir.Node
    		tab := ir.NewUnaryExpr(base.Pos, ir.OITAB, l)
    		rtyp := reflectdata.CompareRType(base.Pos, n)
    		if l.Type().IsEmptyInterface() {
    			tab.SetType(types.NewPtr(types.Types[types.TUINT8]))
    			tab.SetTypecheck(1)
    			eqtype = ir.NewBinaryExpr(base.Pos, eq, tab, rtyp)
    		} else {
    			nonnil := ir.NewBinaryExpr(base.Pos, brcom(eq), typecheck.NodNil(), tab)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 21:55:14 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/complit.go

    		} else {
    			vstat = staticinit.StaticName(t)
    		}
    		fixedlit(ctxt, initKindStatic, n, vstat, init)
    	}
    
    	// make new auto *array (3 declare)
    	vauto := typecheck.TempAt(base.Pos, ir.CurFunc, types.NewPtr(t))
    
    	// set auto to point at new temp or heap (3 assign)
    	var a ir.Node
    	if x := n.Prealloc; x != nil {
    		// temp allocated during order.go for dddarg
    		if !types.Identical(t, x.Type()) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:03:54 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/assign.go

    	n.Rhs = []ir.Node{call}
    	n.SetOp(ir.OAS2FUNC)
    
    	// don't generate a = *var if a is _
    	if ir.IsBlank(a) {
    		return walkExpr(typecheck.Stmt(n), init)
    	}
    
    	var_ := typecheck.TempAt(base.Pos, ir.CurFunc, types.NewPtr(t.Elem()))
    	var_.SetTypecheck(1)
    	var_.MarkNonNil() // mapaccess always returns a non-nil pointer
    
    	n.Lhs[0] = var_
    	init.Append(walkExpr(n, init))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/expr.go

    		mapFn = mapfn("mapaccess1_fat", t, true)
    	default:
    		mapFn = mapfn(mapaccess1[fast], t, false)
    	}
    	call := mkcall1(mapFn, nil, init, args...)
    	call.SetType(types.NewPtr(t.Elem()))
    	call.MarkNonNil() // mapaccess1* and mapassign always return non-nil pointers.
    	star := ir.NewStarExpr(base.Pos, call)
    	star.SetType(t.Elem())
    	star.SetTypecheck(1)
    	return star
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  7. src/crypto/cipher/example_test.go

    		panic(err)
    	}
    
    	stream := cipher.NewCTR(block, iv)
    	stream.XORKeyStream(ciphertext[aes.BlockSize:], plaintext)
    
    	// It's important to remember that ciphertexts must be authenticated
    	// (i.e. by using crypto/hmac) as well as being encrypted in order to
    	// be secure.
    
    	// CTR mode is the same for both encryption and decryption, so we can
    	// also decrypt that ciphertext with NewCTR.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 30 16:23:44 UTC 2018
    - 11.8K bytes
    - Viewed (0)
  8. src/crypto/internal/boring/aes.go

    	key []byte
    	enc C.GO_AES_KEY
    	dec C.GO_AES_KEY
    }
    
    type extraModes interface {
    	// Copied out of crypto/aes/modes.go.
    	NewCBCEncrypter(iv []byte) cipher.BlockMode
    	NewCBCDecrypter(iv []byte) cipher.BlockMode
    	NewCTR(iv []byte) cipher.Stream
    	NewGCM(nonceSize, tagSize int) (cipher.AEAD, error)
    }
    
    var _ extraModes = (*aesCipher)(nil)
    
    func NewAESCipher(key []byte) (cipher.Block, error) {
    	c := &aesCipher{key: bytes.Clone(key)}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 26 22:52:27 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  9. src/crypto/tls/ticket.go

    		return nil, err
    	}
    	key := ticketKeys[0]
    	block, err := aes.NewCipher(key.aesKey[:])
    	if err != nil {
    		return nil, errors.New("tls: failed to create cipher while encrypting ticket: " + err.Error())
    	}
    	cipher.NewCTR(block, iv).XORKeyStream(ciphertext, state)
    
    	mac := hmac.New(sha256.New, key.hmacKey[:])
    	mac.Write(authenticated)
    	mac.Sum(macBytes[:0])
    
    	return encrypted, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 17:23:54 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  10. src/crypto/ecdsa/ecdsa.go

    	}
    
    	// Create a CSPRNG that xors a stream of zeros with
    	// the output of the AES-CTR instance.
    	const aesIV = "IV for ECDSA CTR"
    	return &cipher.StreamReader{
    		R: zeroReader,
    		S: cipher.NewCTR(block, []byte(aesIV)),
    	}, nil
    }
    
    type zr struct{}
    
    var zeroReader = zr{}
    
    // Read replaces the contents of dst with zeros. It is safe for concurrent use.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
Back to top