Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for readVarint (0.16 sec)

  1. src/internal/reflectlite/type.go

    		}
    	}
    }
    
    func (n name) name() string {
    	if n.bytes == nil {
    		return ""
    	}
    	i, l := n.readVarint(1)
    	return unsafe.String(n.data(1+i, "non-empty string"), l)
    }
    
    func (n name) tag() string {
    	if !n.hasTag() {
    		return ""
    	}
    	i, l := n.readVarint(1)
    	i2, l2 := n.readVarint(1 + i + l)
    	return unsafe.String(n.data(1+i+l+i2, "non-empty string"), l2)
    }
    
    func pkgPath(n abi.Name) string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/net/http2/hpack/hpack.go

    	buf := d.buf
    	size, buf, err := readVarInt(5, buf)
    	if err != nil {
    		return err
    	}
    	if size > uint64(d.dynTab.allowedMaxSize) {
    		return DecodingError{errors.New("dynamic table size update too large")}
    	}
    	d.dynTab.setMaxSize(uint32(size))
    	d.buf = buf
    	return nil
    }
    
    var errVarintOverflow = DecodingError{errors.New("varint integer overflow")}
    
    // readVarInt reads an unsigned variable length integer off the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 14 18:30:34 UTC 2023
    - 14.7K bytes
    - Viewed (0)
  3. src/internal/abi/type.go

    func (n Name) Name() string {
    	if n.Bytes == nil {
    		return ""
    	}
    	i, l := n.ReadVarint(1)
    	return unsafe.String(n.DataChecked(1+i, "non-empty string"), l)
    }
    
    // Tag returns the tag string for n, or empty if there is none.
    func (n Name) Tag() string {
    	if !n.HasTag() {
    		return ""
    	}
    	i, l := n.ReadVarint(1)
    	i2, l2 := n.ReadVarint(1 + i + l)
    	return unsafe.String(n.DataChecked(1+i+l+i2, "non-empty string"), l2)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:09:59 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  4. src/debug/gosym/pclntab.go

    		return funcData{}
    	}
    	idx := sort.Search(int(t.nfunctab), func(i int) bool {
    		return ft.pc(i) > pc
    	})
    	idx--
    	return t.funcData(uint32(idx))
    }
    
    // readvarint reads, removes, and returns a varint from *pp.
    func (t *LineTable) readvarint(pp *[]byte) uint32 {
    	var v, shift uint32
    	p := *pp
    	for shift = 0; ; shift += 7 {
    		b := p[0]
    		p = p[1:]
    		v |= (uint32(b) & 0x7F) << shift
    		if b&0x80 == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 25 19:43:24 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  5. src/go/internal/gcimporter/iimport.go

    	return r.uint64() != 0
    }
    
    func (r *importReader) int64() int64 {
    	n, err := binary.ReadVarint(&r.declReader)
    	if err != nil {
    		errorf("readVarint: %v", err)
    	}
    	return n
    }
    
    func (r *importReader) uint64() uint64 {
    	n, err := binary.ReadUvarint(&r.declReader)
    	if err != nil {
    		errorf("readUvarint: %v", err)
    	}
    	return n
    }
    
    func (r *importReader) byte() byte {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  6. src/runtime/symtab.go

    	uvdelta := uint32(p[0])
    	if uvdelta == 0 && !first {
    		return nil, false
    	}
    	n := uint32(1)
    	if uvdelta&0x80 != 0 {
    		n, uvdelta = readvarint(p)
    	}
    	*val += int32(-(uvdelta & 1) ^ (uvdelta >> 1))
    	p = p[n:]
    
    	pcdelta := uint32(p[0])
    	n = 1
    	if pcdelta&0x80 != 0 {
    		n, pcdelta = readvarint(p)
    	}
    	p = p[n:]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 40K bytes
    - Viewed (0)
  7. src/runtime/type.go

    type name = abi.Name
    
    type structtype = abi.StructType
    
    func pkgPath(n name) string {
    	if n.Bytes == nil || *n.Data(0)&(1<<2) == 0 {
    		return ""
    	}
    	i, l := n.ReadVarint(1)
    	off := 1 + i + l
    	if *n.Data(0)&(1<<1) != 0 {
    		i2, l2 := n.ReadVarint(off)
    		off += i2 + l2
    	}
    	var nameOff nameOff
    	copy((*[4]byte)(unsafe.Pointer(&nameOff))[:], (*[4]byte)(unsafe.Pointer(n.Data(off)))[:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  8. src/runtime/panic.go

    	print("\n")
    }
    
    // readvarintUnsafe reads the uint32 in varint format starting at fd, and returns the
    // uint32 and a pointer to the byte following the varint.
    //
    // The implementation is the same with runtime.readvarint, except that this function
    // uses unsafe.Pointer for speed.
    func readvarintUnsafe(fd unsafe.Pointer) (uint32, unsafe.Pointer) {
    	var r uint32
    	var shift int
    	for {
    		b := *(*uint8)(fd)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 43.8K bytes
    - Viewed (0)
  9. src/internal/trace/generation.go

    			// Read the frame data.
    			pc, err := binary.ReadUvarint(r)
    			if err != nil {
    				return fmt.Errorf("reading frame %d's PC for stack %d: %w", i+1, id, err)
    			}
    			funcID, err := binary.ReadUvarint(r)
    			if err != nil {
    				return fmt.Errorf("reading frame %d's funcID for stack %d: %w", i+1, id, err)
    			}
    			fileID, err := binary.ReadUvarint(r)
    			if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 22:14:45 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  10. src/internal/pkgbits/decoder.go

    	}
    }
    
    func (r *Decoder) rawUvarint() uint64 {
    	x, err := readUvarint(&r.Data)
    	r.checkErr(err)
    	return x
    }
    
    // readUvarint is a type-specialized copy of encoding/binary.ReadUvarint.
    // This avoids the interface conversion and thus has better escape properties,
    // which flows up the stack.
    func readUvarint(r *strings.Reader) (uint64, error) {
    	var x uint64
    	var s uint
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 20:58:46 UTC 2022
    - 13.2K bytes
    - Viewed (0)
Back to top