Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 93 for pos (0.18 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/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)
  3. 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)
  4. src/cmd/compile/internal/ssa/memcombine.go

    	}
    	loadBlock := mergePoint(root.Block, loads...)
    	if loadBlock == nil {
    		return false
    	}
    	// Find a source position to use.
    	pos := src.NoXPos
    	for _, load := range loads {
    		if load.Block == loadBlock {
    			pos = load.Pos
    			break
    		}
    	}
    	if pos == src.NoXPos {
    		return false
    	}
    
    	// Check to see if we need byte swap before storing.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 19:45:41 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/decl.go

    // firstInSrc reports the index of the object with the "smallest"
    // source position in path. path must not be empty.
    func firstInSrc(path []Object) int {
    	fst, pos := 0, path[0].Pos()
    	for i, t := range path[1:] {
    		if cmpPos(t.Pos(), pos) < 0 {
    			fst, pos = i+1, t.Pos()
    		}
    	}
    	return fst
    }
    
    func (check *Checker) constDecl(obj *Const, typ, init syntax.Expr, inherited bool) {
    	assert(obj.typ == nil)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssagen/abi.go

    	}
    
    	// Q: is this needed?
    	savepos := base.Pos
    	savedcurfn := ir.CurFunc
    
    	pos := base.AutogeneratedPos
    	base.Pos = pos
    
    	// At the moment we don't support wrapping a method, we'd need machinery
    	// below to handle the receiver. Panic if we see this scenario.
    	ft := f.Nname.Type()
    	if ft.NumRecvs() != 0 {
    		base.ErrorfAt(f.Pos(), 0, "makeABIWrapper support for wrapping methods not implemented")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/util.go

    func ExprString(x syntax.Node) string { return syntax.String(x) }
    
    // startPos returns the start position of node n.
    func startPos(n syntax.Node) syntax.Pos { return syntax.StartPos(n) }
    
    // endPos returns the position of the first character immediately after node n.
    func endPos(n syntax.Node) syntax.Pos { return syntax.EndPos(n) }
    
    // makeFromLiteral returns the constant value for the given literal string and kind.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/liveness/intervals.go

    func (c *IntervalsBuilder) Live(pos int) error {
    	if pos < 0 {
    		return fmt.Errorf("bad pos, negative")
    	}
    	if c.last() == -1 {
    		c.setLast(pos)
    		if debugtrace {
    			fmt.Fprintf(os.Stderr, "=-= begin lifetime at pos=%d\n", pos)
    		}
    		c.s = append(c.s, Interval{st: pos, en: pos + 1})
    		return nil
    	}
    	if pos >= c.last() {
    		return fmt.Errorf("pos not decreasing")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 21:55:27 UTC 2024
    - 10K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/alias.go

    // arguments, recording pos as the position of its synthetic object (for error
    // reporting).
    func (check *Checker) newAliasInstance(pos syntax.Pos, orig *Alias, targs []Type, ctxt *Context) *Alias {
    	assert(len(targs) > 0)
    	obj := NewTypeName(pos, orig.obj.pkg, orig.obj.name, nil)
    	rhs := check.subst(pos, orig.fromRHS, makeSubstMap(orig.TypeParams().list(), targs), nil, ctxt)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/staticinit/sched.go

    				continue
    			}
    			// Requires computation, but we're
    			// copying someone else's computation.
    			ll := ir.NewNameOffsetExpr(base.Pos, l, loff+e.Xoffset, typ)
    			rr := ir.NewNameOffsetExpr(base.Pos, orig, e.Xoffset, typ)
    			ir.SetPos(rr)
    			s.append(ir.NewAssignStmt(base.Pos, ll, rr))
    		}
    
    		return true
    	}
    
    	return false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
Back to top