Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 47 for Offs (0.14 sec)

  1. src/go/token/position_test.go

    	for _, offs := range lines {
    		f.AddLine(offs)
    		f.AddLineInfo(offs, "bar", 42)
    	}
    	// verify positions for all offsets
    	for offs := 0; offs <= f.Size(); offs++ {
    		p := f.Pos(offs)
    		_, col := linecol(lines, offs)
    		msg := fmt.Sprintf("%s (offs = %d, p = %d)", f.Name(), offs, p)
    		checkPos(t, msg, f.Position(f.Pos(offs)), Position{"bar", offs, 42, col})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:26:14 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/field.go

    	} else {
    		return fmt.Sprintf("[%d, len=0]", b.Offs)
    	}
    }
    
    // Parse extracts the bitfield b from i, and return it as an unsigned integer.
    // Parse will panic if b is invalid.
    func (b BitField) Parse(i [2]uint32) uint32 {
    	if b.Bits > 32 || b.Bits == 0 || b.Offs > 31 || b.Offs+b.Bits > 32 {
    		panic(fmt.Sprintf("invalid bitfiled %v", b))
    	}
    	return (i[b.Word] >> (32 - b.Offs - b.Bits)) & ((1 << b.Bits) - 1)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 10 18:59:52 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/gcsizes.go

    	offsets := make([]int64, len(fields))
    	var offs int64
    	for i, f := range fields {
    		if offs < 0 {
    			// all remaining offsets are too large
    			offsets[i] = -1
    			continue
    		}
    		// offs >= 0
    		a := s.Alignof(f.typ)
    		offs = align(offs, a) // possibly < 0 if align overflows
    		offsets[i] = offs
    		if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
    			offs += d // ok to overflow to < 0
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. src/go/types/gcsizes.go

    	offsets := make([]int64, len(fields))
    	var offs int64
    	for i, f := range fields {
    		if offs < 0 {
    			// all remaining offsets are too large
    			offsets[i] = -1
    			continue
    		}
    		// offs >= 0
    		a := s.Alignof(f.typ)
    		offs = align(offs, a) // possibly < 0 if align overflows
    		offsets[i] = offs
    		if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
    			offs += d // ok to overflow to < 0
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  5. src/go/types/sizes.go

    	offsets := make([]int64, len(fields))
    	var offs int64
    	for i, f := range fields {
    		if offs < 0 {
    			// all remaining offsets are too large
    			offsets[i] = -1
    			continue
    		}
    		// offs >= 0
    		a := s.Alignof(f.typ)
    		offs = align(offs, a) // possibly < 0 if align overflows
    		offsets[i] = offs
    		if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
    			offs += d // ok to overflow to < 0
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/sizes.go

    	offsets := make([]int64, len(fields))
    	var offs int64
    	for i, f := range fields {
    		if offs < 0 {
    			// all remaining offsets are too large
    			offsets[i] = -1
    			continue
    		}
    		// offs >= 0
    		a := s.Alignof(f.typ)
    		offs = align(offs, a) // possibly < 0 if align overflows
    		offsets[i] = offs
    		if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
    			offs += d // ok to overflow to < 0
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  7. src/go/token/serialize_test.go

    		f := p.AddFile(fmt.Sprintf("file%d", i), p.Base()+i, i*100)
    		checkSerialize(t, p)
    		// add some lines and alternative file infos
    		line := 1000
    		for offs := 0; offs < f.Size(); offs += 40 + i {
    			f.AddLine(offs)
    			if offs%7 == 0 {
    				f.AddLineInfo(offs, fmt.Sprintf("file%d", offs), line)
    				line += 33
    			}
    		}
    		checkSerialize(t, p)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 17 15:02:55 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  8. src/go/scanner/scanner.go

    	s.next()
    	if s.ch == bom {
    		s.next() // ignore BOM at file beginning
    	}
    }
    
    func (s *Scanner) error(offs int, msg string) {
    	if s.err != nil {
    		s.err(s.file.Position(s.file.Pos(offs)), msg)
    	}
    	s.ErrorCount++
    }
    
    func (s *Scanner) errorf(offs int, format string, args ...any) {
    	s.error(offs, fmt.Sprintf(format, args...))
    }
    
    // scanComment returns the text of the comment and (if nonzero)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 24.3K bytes
    - Viewed (0)
  9. src/go/printer/printer_test.go

    		return nil, fmt.Errorf("re-parse: %s\n%s", err, buf.Bytes())
    	}
    
    	return res, nil
    }
    
    // lineAt returns the line in text starting at offset offs.
    func lineAt(text []byte, offs int) []byte {
    	i := offs
    	for i < len(text) && text[i] != '\n' {
    		i++
    	}
    	return text[offs:i]
    }
    
    // checkEqual compares a and b.
    func checkEqual(aname, bname string, a, b []byte) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  10. src/reflect/export_test.go

    			gc = append(gc, gcdata[i/8]>>(i%8)&1)
    		}
    	}
    	return
    }
    
    func TypeLinks() []string {
    	var r []string
    	sections, offset := typelinks()
    	for i, offs := range offset {
    		rodata := sections[i]
    		for _, off := range offs {
    			typ := (*rtype)(resolveTypeOff(rodata, off))
    			r = append(r, typ.String())
    		}
    	}
    	return r
    }
    
    var GCBits = gcbits
    
    func gcbits(any) []byte // provided by runtime
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 3.8K bytes
    - Viewed (0)
Back to top