Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 291 for pos (0.35 sec)

  1. src/cmd/compile/internal/syntax/pos.go

    func MakePos(base *PosBase, line, col uint) Pos { return Pos{base, sat32(line), sat32(col)} }
    
    // TODO(gri) IsKnown makes an assumption about linebase < 1.
    // Maybe we should check for Base() != nil instead.
    
    func (pos Pos) Pos() Pos       { return pos }
    func (pos Pos) IsKnown() bool  { return pos.line > 0 }
    func (pos Pos) Base() *PosBase { return pos.base }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 20:44:57 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. src/cmd/internal/src/pos.go

    	}
    	base := *orig
    	base.inl = inlTreeIndex
    	base.fileIndex = -1
    	if orig == orig.pos.base {
    		base.pos.base = &base
    	}
    	return &base
    }
    
    var noPos Pos
    
    // Pos returns the position at which base is located.
    // If b == nil, the result is the zero position.
    func (b *PosBase) Pos() *Pos {
    	if b != nil {
    		return &b.pos
    	}
    	return &noPos
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 15.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/iexport.go

    //         Tag  byte // 'V'
    //         Pos  Pos
    //         Type typeOff
    //     }
    //
    //     type Func struct {
    //         Tag       byte // 'F' or 'G'
    //         Pos       Pos
    //         TypeParams []typeOff  // only present if Tag == 'G'
    //         Signature Signature
    //     }
    //
    //     type Const struct {
    //         Tag   byte // 'C'
    //         Pos   Pos
    //         Value Value
    //     }
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 21 02:40:02 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/nilcheck.go

    					v.Pos = v.Pos.WithIsStmt()
    					pendingLines.remove(v.Pos)
    				}
    			}
    			if pendingLines.contains(b.Pos) {
    				b.Pos = b.Pos.WithIsStmt()
    				pendingLines.remove(b.Pos)
    			}
    
    			// Add all dominated blocks to the work list.
    			for w := sdom[node.block.ID].child; w != nil; w = sdom[w.ID].sibling {
    				work = append(work, bp{op: Work, block: w})
    			}
    
    		case ClearPtr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:45:54 UTC 2023
    - 11.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/assign.go

    	nifnz := ir.NewIfStmt(base.Pos, ir.NewBinaryExpr(base.Pos, ir.ONE, l2, ir.NewInt(base.Pos, 0)), nil, nil)
    	nifnz.Likely = true
    	nodes = append(nodes, nifnz)
    
    	elemtype := s.Type().Elem()
    
    	// n := s.len + l2
    	nn := typecheck.TempAt(base.Pos, ir.CurFunc, types.Types[types.TINT])
    	nifnz.Body = append(nifnz.Body, ir.NewAssignStmt(base.Pos, nn, ir.NewBinaryExpr(base.Pos, ir.OADD, ir.NewUnaryExpr(base.Pos, ir.OLEN, s), l2)))
    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/vendor/golang.org/x/tools/go/analysis/passes/buildtag/buildtag.go

    			check.inStar = true
    			i++
    			pos += token.Pos(i)
    			text = text[i:]
    			for text != "" {
    				i := strings.Index(text, "\n")
    				if i < 0 {
    					i = len(text)
    				} else {
    					i++
    				}
    				line := text[:i]
    				if strings.HasPrefix(line, "//") {
    					check.comment(pos, line)
    				}
    				pos += token.Pos(i)
    				text = text[i:]
    			}
    			check.inStar = false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/syntax/positions.go

    			}
    			m = n.Type
    
    		// expressions
    		case *BadExpr:
    			return n.Pos()
    		case *Name:
    			p := n.Pos()
    			return MakePos(p.Base(), p.Line(), p.Col()+uint(len(n.Value)))
    		case *BasicLit:
    			p := n.Pos()
    			return MakePos(p.Base(), p.Line(), p.Col()+uint(len(n.Value)))
    		case *CompositeLit:
    			return n.Rbrace
    		case *KeyValueExpr:
    			m = n.Value
    		case *FuncLit:
    			m = n.Body
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/test/pgo_devirtualize_test.go

    		}
    	}
    
    	want := []devirtualization{
    		// ExerciseIface
    		{
    			pos:    "./devirt.go:101:20",
    			callee: "mult.Mult.Multiply",
    		},
    		{
    			pos:    "./devirt.go:101:39",
    			callee: "Add.Add",
    		},
    		// ExerciseFuncConcrete
    		{
    			pos:    "./devirt.go:173:36",
    			callee: "AddFn",
    		},
    		{
    			pos:    "./devirt.go:173:15",
    			callee: "mult.MultFn",
    		},
    		// ExerciseFuncField
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 15 21:30:35 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/typeset.go

    		// Types don't generally have position information.
    		// If we don't have a valid pos provided, try to use
    		// one close enough.
    		if !pos.IsKnown() && len(ityp.methods) > 0 {
    			pos = ityp.methods[0].pos
    		}
    
    		check.trace(pos, "-- type set for %s", ityp)
    		check.indent++
    		defer func() {
    			check.indent--
    			check.trace(pos, "=> %s ", ityp.typeSet())
    		}()
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat/timeformat.go

    				// Check if it's a literal string, otherwise we can't suggest a fix.
    				if _, ok := arg.(*ast.BasicLit); ok {
    					pos := int(arg.Pos()) + badAt + 1 // +1 to skip the " or `
    					end := pos + len(badFormat)
    
    					pass.Report(analysis.Diagnostic{
    						Pos:     token.Pos(pos),
    						End:     token.Pos(end),
    						Message: badFormat + " should be " + goodFormat,
    						SuggestedFixes: []analysis.SuggestedFix{{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.3K bytes
    - Viewed (0)
Back to top