Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 201 for pos (0.08 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/go/ast/ast.go

    	}
    	return x.Lbrace
    }
    func (x *ParenExpr) Pos() token.Pos      { return x.Lparen }
    func (x *SelectorExpr) Pos() token.Pos   { return x.X.Pos() }
    func (x *IndexExpr) Pos() token.Pos      { return x.X.Pos() }
    func (x *IndexListExpr) Pos() token.Pos  { return x.X.Pos() }
    func (x *SliceExpr) Pos() token.Pos      { return x.X.Pos() }
    func (x *TypeAssertExpr) Pos() token.Pos { return x.X.Pos() }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/cmd/compile/internal/walk/switch.go

    			// Search within this run of same-length strings.
    			pos := run[0].pos
    			s.done.Append(ir.NewLabelStmt(pos, label))
    			stringSearch(s.exprname, run, &s.done)
    			s.done.Append(ir.NewBranchStmt(pos, ir.OGOTO, endLabel))
    
    			// Add length case to outer switch.
    			cas := ir.NewInt(pos, runLen(run))
    			jmp := ir.NewBranchStmt(pos, ir.OGOTO, label)
    			outer.Add(pos, cas, nil, jmp)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/errors.go

    func (err *error_) addAltDecl(obj Object) {
    	if pos := obj.Pos(); pos.IsKnown() {
    		// We use "other" rather than "previous" here because
    		// the first declaration seen may not be textually
    		// earlier in the source.
    		err.addf(obj, "other declaration of %s", obj.Name())
    	}
    }
    
    func (err *error_) empty() bool {
    	return err.desc == nil
    }
    
    func (err *error_) pos() syntax.Pos {
    	if err.empty() {
    		return nopos
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.6K bytes
    - Viewed (0)
Back to top