Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for pos (0.27 sec)

  1. src/cmd/asm/internal/lex/slice.go

    	base   *src.PosBase
    	line   int
    	pos    int
    }
    
    func NewSlice(base *src.PosBase, line int, tokens []Token) *Slice {
    	return &Slice{
    		tokens: tokens,
    		base:   base,
    		line:   line,
    		pos:    -1, // Next will advance to zero.
    	}
    }
    
    func (s *Slice) Next() ScanToken {
    	s.pos++
    	if s.pos >= len(s.tokens) {
    		return scanner.EOF
    	}
    	return s.tokens[s.pos].ScanToken
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jun 29 22:49:50 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  2. src/cmd/cgo/ast.go

    	}
    	if context == ctxAssign2 {
    		context = ctxExpr
    	}
    	if context == ctxEmbedType {
    		error_(sel.Pos(), "cannot embed C type")
    	}
    	goname := sel.Sel.Name
    	if goname == "errno" {
    		error_(sel.Pos(), "cannot refer to errno directly; see documentation")
    		return
    	}
    	if goname == "_CMalloc" {
    		error_(sel.Pos(), "cannot refer to C._CMalloc; use C.malloc")
    		return
    	}
    	if goname == "malloc" {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jun 07 16:54:27 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  3. src/archive/tar/reader.go

    		if sr.pos < holeStart { // In a data fragment
    			bf := b[:min(int64(len(b)), holeStart-sr.pos)]
    			nf, err = tryReadFull(sr.fr, bf)
    		} else { // In a hole fragment
    			bf := b[:min(int64(len(b)), holeEnd-sr.pos)]
    			nf, err = tryReadFull(zeroReader{}, bf)
    		}
    		b = b[nf:]
    		sr.pos += int64(nf)
    		if sr.pos >= holeEnd && len(sr.sp) > 1 {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  4. src/cmd/cgo/gcc.go

    				}
    			}
    		}
    		conv.FinishType(pos)
    	}
    }
    
    // recordTypedefs remembers in p.typedefs all the typedefs used in dtypes and its children.
    func (p *Package) recordTypedefs(dtype dwarf.Type, pos token.Pos) {
    	p.recordTypedefs1(dtype, pos, map[dwarf.Type]bool{})
    }
    
    func (p *Package) recordTypedefs1(dtype dwarf.Type, pos token.Pos, visited map[dwarf.Type]bool) {
    	if dtype == nil {
    		return
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  5. src/archive/tar/tar_test.go

    	}
    	if len(s) > len(b) {
    		f.ops[0] = s[len(b):]
    	} else {
    		f.ops = f.ops[1:]
    	}
    	f.pos += int64(len(b))
    	return len(b), nil
    }
    
    func (f *testFile) Seek(pos int64, whence int) (int64, error) {
    	if pos == 0 && whence == io.SeekCurrent {
    		return f.pos, nil
    	}
    	if len(f.ops) == 0 {
    		return 0, errors.New("unexpected Seek operation")
    	}
    	s, ok := f.ops[0].(int64)
    	if !ok {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24K bytes
    - Viewed (0)
  6. src/archive/tar/common.go

    	dst := src[:0]
    	for _, s := range src {
    		pos, end := s.Offset, s.endOffset()
    		pos += blockPadding(+pos) // Round-up to nearest blockSize
    		if end != size {
    			end -= blockPadding(-end) // Round-down to nearest blockSize
    		}
    		if pos < end {
    			dst = append(dst, sparseEntry{Offset: pos, Length: end - pos})
    		}
    	}
    	return dst
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24.7K bytes
    - Viewed (2)
  7. src/cmd/api/main_test.go

    				if strings.HasPrefix(c.Text, "// Deprecated:") {
    					return true
    				}
    			}
    		}
    		return false
    	}
    
    	w.deprecated = make(map[token.Pos]bool)
    	mark := func(id *ast.Ident) {
    		if id != nil {
    			w.deprecated[id.Pos()] = true
    		}
    	}
    	for _, file := range w.current.Files {
    		ast.Inspect(file, func(n ast.Node) bool {
    			switch n := n.(type) {
    			case *ast.File:
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Apr 09 20:48:51 GMT 2024
    - 31.4K bytes
    - Viewed (0)
  8. src/cmd/asm/internal/lex/tokenizer.go

    	return t.base
    }
    
    func (t *Tokenizer) SetBase(base *src.PosBase) {
    	t.base = base
    }
    
    func (t *Tokenizer) Line() int {
    	return t.line
    }
    
    func (t *Tokenizer) Col() int {
    	return t.s.Pos().Column
    }
    
    func (t *Tokenizer) Next() ScanToken {
    	s := t.s
    	for {
    		t.tok = ScanToken(s.Scan())
    		if t.tok != scanner.Comment {
    			break
    		}
    		text := s.TokenText()
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Aug 04 20:35:21 GMT 2022
    - 3K bytes
    - Viewed (0)
  9. src/bytes/bytes_test.go

    			}
    			b1[j] = 0
    			pos = IndexByte(b1, 'x')
    			if pos != -1 {
    				t.Errorf("IndexByte(%q, 'x') = %v", b1, pos)
    			}
    		}
    		// different start and end alignments
    		b1 = b[i/2 : n-(i+1)/2]
    		for j := 0; j < len(b1); j++ {
    			b1[j] = 'x'
    			pos := IndexByte(b1, 'x')
    			if pos != j {
    				t.Errorf("IndexByte(%q, 'x') = %v", b1, pos)
    			}
    			b1[j] = 0
    			pos = IndexByte(b1, 'x')
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  10. src/archive/tar/writer.go

    		if sw.pos < dataStart { // In a hole fragment
    			bf := b[:min(int64(len(b)), dataStart-sw.pos)]
    			nf, err = zeroWriter{}.Write(bf)
    		} else { // In a data fragment
    			bf := b[:min(int64(len(b)), dataEnd-sw.pos)]
    			nf, err = sw.fw.Write(bf)
    		}
    		b = b[nf:]
    		sw.pos += int64(nf)
    		if sw.pos >= dataEnd && len(sw.sp) > 1 {
    			sw.sp = sw.sp[1:] // Ensure last fragment always remains
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
Back to top