Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for sevenBitS (0.13 sec)

  1. src/cmd/internal/dwarf/dwarf_test.go

    		for v := int64(-255); v < 255; v++ {
    			s := sevenBitU(v)
    			if s == nil {
    				continue
    			}
    			b := AppendUleb128(nil, uint64(v))
    			if !reflect.DeepEqual(b, s) {
    				t.Errorf("sevenBitU(%d) = %v but AppendUleb128(%d) = %v", v, s, v, b)
    			}
    		}
    	})
    
    	t.Run("signed", func(t *testing.T) {
    		for v := int64(-255); v < 255; v++ {
    			s := sevenBitS(v)
    			if s == nil {
    				continue
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 27 17:58:53 UTC 2017
    - 828 bytes
    - Viewed (0)
  2. src/cmd/internal/dwarf/dwarf.go

    }
    
    // sevenBitU returns the unsigned LEB128 encoding of v if v is seven bits and nil otherwise.
    // The contents of the returned slice must not be modified.
    func sevenBitU(v int64) []byte {
    	if uint64(v) < uint64(len(sevenbits)) {
    		return sevenbits[v : v+1]
    	}
    	return nil
    }
    
    // sevenBitS returns the signed LEB128 encoding of v if v is seven bits and nil otherwise.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 43K bytes
    - Viewed (0)
Back to top